Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 05e9e78e authored by Yabin Cui's avatar Yabin Cui
Browse files

UPSTREAM: coresight: tmc-etr: Fix perf_data check



When tracing etm data of multiple threads on multiple cpus through
perf interface, each cpu has a unique etr_perf_buffer while sharing
the same etr device. There is no guarantee that the last cpu starts
etm tracing also stops last. This makes perf_data check fail.

Fix it by checking etr_buf instead of etr_perf_buffer.
Also move the code setting and clearing perf_buf to more suitable
places.

Fixes: 3147da92a8a8 ("coresight: tmc-etr: Allocate and free ETR memory buffers for CPU-wide scenarios")
Signed-off-by: default avatarYabin Cui <yabinc@google.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20190829202842.580-15-mathieu.poirier@linaro.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

(Upstream commit bbedcb91cc3bf252e6031e199ab3d1f07107f7c5).

Bug: 140266694
Change-Id: I6d4f4c461af40596c8bcc70e5d7b9924f3c2b585
Signed-off-by: default avatarYabin Cui <yabinc@google.com>
parent cc09d16d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment