]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: etm3x: Always set tracer's device mode on target CPU
authorLeo Yan <leo.yan@arm.com>
Tue, 11 Nov 2025 18:58:37 +0000 (18:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:56 +0000 (14:02 +0100)
commit9698a89977fb885499b853ff16efecb14528d60d
treeadc64afb02c304582d82c687edbe4037e21b97a0
parente45178e98848feaf1fddfa1b70d31ecc6ec9ea61
coresight: etm3x: Always set tracer's device mode on target CPU

[ Upstream commit ab3fde32afe6a77e5cc60f868e44e6e09424752b ]

The ETMv3 driver shares the same issue as ETMv4 regarding race
conditions when accessing the device mode.

This commit applies the same fix: ensuring that the device mode is
modified only by the target CPU to eliminate race conditions across
CPUs.

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-3-f55553b6c8b3@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-etm3x-core.c