]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: Only check bottom two claim bits
authorJames Clark <james.clark@linaro.org>
Tue, 25 Mar 2025 11:58:47 +0000 (11:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 08:57:55 +0000 (10:57 +0200)
commit89db46dbe5211bbbe13fc46084d1393dea539c8a
tree82e92310c2ecf52def21df744dd7f63d986cedcf
parent4793d76b829a86310537445e5ed65c0472218804
coresight: Only check bottom two claim bits

[ Upstream commit a4e65842e1142aa18ef36113fbd81d614eaefe5a ]

The use of the whole register and == could break the claim mechanism if
any of the other bits are used in the future. The referenced doc "PSCI -
ARM DEN 0022D" also says to only read and clear the bottom two bits.

Use FIELD_GET() to extract only the relevant part.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-2-dfbd3822b2e5@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-core.c
drivers/hwtracing/coresight/coresight-priv.h