arm64: cpufeature: Fix the visibility of compat hwcaps
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Thu, 3 Nov 2022 08:22:32 +0000 (13:52 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 3 Nov 2022 18:04:56 +0000 (18:04 +0000)
commit85f1506337f0c79a4955edfeee86a18628e3735f
tree4d2573492c343b39586e1984390dca58b4d7a2dc
parent024f4b2e1f874934943eb2d3d288ebc52c79f55c
arm64: cpufeature: Fix the visibility of compat hwcaps

Commit 237405ebef58 ("arm64: cpufeature: Force HWCAP to be based on the
sysreg visible to user-space") forced the hwcaps to use sanitised
user-space view of the id registers. However, the ID register structures
used to select few compat cpufeatures (vfp, crc32, ...) are masked and
hence such hwcaps do not appear in /proc/cpuinfo anymore for PER_LINUX32
personality.

Add the ID register structures explicitly and set the relevant entry as
visible. As these ID registers are now of type visible so make them
available in 64-bit userspace by making necessary changes in register
emulation logic and documentation.

While at it, update the comment for structure ftr_generic_32bits[] which
lists the ID register that use it.

Fixes: 237405ebef58 ("arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-space")
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Link: https://lore.kernel.org/r/20221103082232.19189-1-amit.kachhap@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Documentation/arm64/cpu-feature-registers.rst
arch/arm64/kernel/cpufeature.c