]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: perf: Update buffer on AUX pause
authorLeo Yan <leo.yan@arm.com>
Tue, 1 Apr 2025 18:07:07 +0000 (19:07 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 14 May 2025 10:56:17 +0000 (11:56 +0100)
commit973f47a9886ac45525985790dffbf5ddeb5097a9
tree7033c8534622efab391aeb0cd12102013cb827a0
parentd5f7e4bea90f2e0630b0c76b0f6cf64304c5b514
coresight: perf: Update buffer on AUX pause

Due to sinks like ETR and ETB don't support interrupt handling, the
hardware trace data might be lost for continuous running tasks.

This commit takes advantage of the AUX pause for updating trace buffer
to mitigate the trace data losing issue.

The per CPU sink has its own interrupt handling.  Thus, there will be a
race condition between the updating buffer in NMI and sink's interrupt
handler.  To avoid the race condition, this commit disallows updating
buffer on AUX pause for the per CPU sink.  Currently, this is only
applied for TRBE.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250401180708.385396-7-leo.yan@arm.com
drivers/hwtracing/coresight/coresight-etm-perf.c