[PATCH v2 0/3] coresight: catu: Introduce refcount and spinlock for enabling/disabling
From: Yabin Cui
Date: Tue Apr 01 2025 - 21:19:31 EST
Hi Coresight maintainers,
When tracing ETM data on multiple CPUs concurrently via the
perf interface, the CATU device is shared across different CPU
paths. This can lead to race conditions when multiple CPUs attempt
to enable or disable the CATU device simultaneously. This patchset
is to fix race conditions when enabling/disabling a CATU device.
Changes since v1:
- Use raw_spinlock_t and guard().
- Add a patch to check enabled mode.
- Add a patch to disable helpers when fails to enable a device.
Yabin Cui (3):
coresight: catu: Introduce refcount and spinlock for
enabling/disabling
coresight: catu: Prevent concurrent PERF and SYSFS mode enablement
coresight: core: Disable helpers for devices that fail to enable
drivers/hwtracing/coresight/coresight-catu.c | 33 ++++++++++++++------
drivers/hwtracing/coresight/coresight-catu.h | 2 ++
drivers/hwtracing/coresight/coresight-core.c | 12 +++----
3 files changed, 30 insertions(+), 17 deletions(-)
--
2.49.0.472.ge94155a9ec-goog