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

Commit c3595fdc authored by Yabin Cui's avatar Yabin Cui
Browse files

UPSTREAM: coresight: tmc-etr: Fix updating buffer in not-snapshot mode.



(Upstream commit 13af88f312fc57becacfcbb1cc77f844281a30ec).

TMC etr always copies all available data to perf aux buffer, which
may exceed the available space in perf aux buffer. It isn't suitable
for not-snapshot mode, because:
1) It may overwrite previously written data.
2) It may make the perf_event_mmap_page->aux_head report having more
or less data than the reality.

So change to only copy the latest data fitting the available space in
perf aux buffer.

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-14-mathieu.poirier@linaro.org


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

Bug: 140266694
Change-Id: Idcdd505c77637d0dc3329a1d145ddca20ca895da
Signed-off-by: default avatarYabin Cui <yabinc@google.com>
parent f071d370
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