]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: syscfg: Use IRQ-safe spinlock to protect active variables
authorLeo Yan <leo.yan@arm.com>
Fri, 15 May 2026 20:08:21 +0000 (21:08 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 18 May 2026 09:18:46 +0000 (10:18 +0100)
commit3b6e3e04659a7e32cfbf71d6958eb6318bae50c0
tree3aefd9ba731311140b32826de0460eac4bfbbcad
parent81bf1c33f6a7b2be8523e8b3655b85ca959975cf
coresight: syscfg: Use IRQ-safe spinlock to protect active variables

cscfg_config_sysfs_get_active_cfg() will be used from idle flows, while
sleeping locks are not allowed.  Introduce sysfs_store_lock to replace
the mutex to protect sysfs_active_config and sysfs_active_preset
accesses, with IRQ-safe locking to avoid lockdep complaint.

Refactor cscfg_config_sysfs_activate() to use spinlock for
sysfs_active_config and activate/deactivate config.

Tested-by: Jie Gan <jie.gan@oss.qualcomm.com>
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Tested-by: James Clark <james.clark@linaro.org>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20260515-arm_coresight_path_power_management_improvement-v14-14-f88c4a3ecfe9@arm.com
drivers/hwtracing/coresight/coresight-syscfg.c
drivers/hwtracing/coresight/coresight-syscfg.h