diff options
author | James Clark <james.clark@arm.com> | 2024-01-29 18:40:32 +0300 |
---|---|---|
committer | Suzuki K Poulose <suzuki.poulose@arm.com> | 2024-02-12 13:21:37 +0300 |
commit | f68bbe4dcfa303164922bc331d2e8d38ed2d4f23 (patch) | |
tree | 86f3e31fc8b1000b35815690453d8984b4622f89 /drivers/hwtracing/coresight/coresight-etm-perf.c | |
parent | dd95255d44c05c9977f962bf0f2afe5e11f8ab3e (diff) | |
download | linux-f68bbe4dcfa303164922bc331d2e8d38ed2d4f23.tar.xz |
coresight: Fix issue where a source device's helpers aren't disabled
The linked commit reverts the change that accidentally used some sysfs
enable/disable functions from Perf which broke the refcounting, but it
also removes the fact that the sysfs disable function disabled the
helpers.
Add a new wrapper function that does both which is used by both Perf and
sysfs, and label the sysfs disable function appropriately. The naming of
all of the functions will be tidied up later to avoid this happening
again.
Fixes: 287e82cf69aa ("coresight: Fix crash when Perf and sysfs modes are used concurrently")
Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20240129154050.569566-2-james.clark@arm.com
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-etm-perf.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm-perf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index a52cfcce25d6..c0c60e6a1703 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -589,7 +589,7 @@ static void etm_event_stop(struct perf_event *event, int mode) return; /* stop tracer */ - source_ops(csdev)->disable(csdev, event); + coresight_disable_source(csdev, event); /* tell the core */ event->hw.state = PERF_HES_STOPPED; |