]> git.ipfire.org Git - thirdparty/linux.git/commit
coresight: Change device mode to atomic type
authorLeo Yan <leo.yan@arm.com>
Tue, 11 Nov 2025 18:58:35 +0000 (18:58 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 11 Nov 2025 21:47:57 +0000 (21:47 +0000)
commit693d1eaca940f277af24c74873ef2313816ff444
treeb22b875c3f7ec205b1ccc9543feb32e79a67836d
parentb139702a889692ec30702534ebb1ae2b11ed1cbf
coresight: Change device mode to atomic type

The device mode is defined as local type. This type cannot promise
SMP-safe access.

Change to atomic type and impose relax ordering, which ensures the
SMP-safe synchronisation and the ordering between the mode setting and
relevant operations.

Fixes: 22fd532eaa0c ("coresight: etm3x: adding operation mode for etm_enable()")
Reviewed-by: Mike Leach <mike.leach@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/20251111-arm_coresight_power_management_fix-v6-1-f55553b6c8b3@arm.com
include/linux/coresight.h