]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:56 +0000 (14:02 +0100)
commit4305e94270fab6cdba356e446b816acaa854526f
tree0b263d4e0884af002c809ac7c7bc7ce7e005bb8c
parent192e8ce302f14ac66259231dd10cede19858d742
coresight: Change device mode to atomic type

[ Upstream commit 693d1eaca940f277af24c74873ef2313816ff444 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/coresight.h