]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/cpufeature: Fix field sign for DIT hwcap detection
authorMark Brown <broonie@kernel.org>
Tue, 27 Dec 2022 12:55:54 +0000 (12:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:53 +0000 (09:32 +0100)
commit7f5530b241006a2de7fc5cbd7ca998ada756b2c2
tree8040a4cb6aba358288dd99cec45270d3b39c6ebf
parenta12828d9f72e3c9df0e084c168af20a4fa39503d
arm64/cpufeature: Fix field sign for DIT hwcap detection

[ Upstream commit d88f7086345cc1a82c4e2585eb416ffb9d534904 ]

Since it was added our hwcap for DIT has specified that DIT is a signed
field but this appears to be incorrect, the two values for the enumeration
are:

0b0000 NI
0b0001 IMP

which look like a normal unsigned enumeration and the in-kernel DIT usage
added by 1b3eb0a66b04 ("arm64: Enable data independent timing (DIT) in the
kernel") detects the feature with an unsigned enum. Fix the hwcap to specify
the field as unsigned.

Fixes: c9a45e52c848 ("arm64: Expose Arm v8.4 features")
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v3-1-0d71a7b174a8@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kernel/cpufeature.c