]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit266e9b5a25dd1a77b190adef2a0950682b818d7b
tree4d2573492c343b39586e1984390dca58b4d7a2dc
parent7ea161b1c3b49e2cb7fbe43b943a64f0ed4e7439
arm64: cpufeature: Fix the visibility of compat hwcaps

Commit 5821d2b86a0d ("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: 5821d2b86a0d ("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