coresight: Fix issue where a source device's helpers aren't disabled
authorJames Clark <james.clark@arm.com>
Mon, 29 Jan 2024 15:40:32 +0000 (15:40 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 12 Feb 2024 10:21:37 +0000 (10:21 +0000)
commitf68bbe4dcfa303164922bc331d2e8d38ed2d4f23
tree86f3e31fc8b1000b35815690453d8984b4622f89
parentdd95255d44c05c9977f962bf0f2afe5e11f8ab3e
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>
drivers/hwtracing/coresight/coresight-core.c
drivers/hwtracing/coresight/coresight-etm-perf.c
drivers/hwtracing/coresight/coresight-priv.h