]> 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 09:00:07 +0000 (11:00 +0200)
commit8217fa7d92f0bdcfc61c20ba9fa2b6ae50970110
tree1430340bb9c4094d217cbeb7d3ed9de81cb27658
parent8dbc01f09cadb8b5ef7fc4fc9b4cceca5fbb7c92
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