aboutsummaryrefslogtreecommitdiffstats
path: root/lib/overflow_kunit.c
diff options
context:
space:
mode:
authorJames Morse <[email protected]>2022-09-09 16:59:36 +0000
committerCatalin Marinas <[email protected]>2022-09-16 14:16:34 +0000
commit237405ebef580a7352a52129b2465c117145eafa (patch)
tree230ce084281a4d3c964cbb2e0675ff88be865582 /lib/overflow_kunit.c
parentLinux 6.0-rc3 (diff)
downloadkernel-237405ebef580a7352a52129b2465c117145eafa.tar.gz
kernel-237405ebef580a7352a52129b2465c117145eafa.zip
arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-space
arm64 advertises hardware features to user-space via HWCAPs, and by emulating access to the CPUs id registers. The cpufeature code has a sanitised system-wide view of an id register, and a sanitised user-space view of an id register, where some features use their 'safe' value instead of the hardware value. It is currently possible for a HWCAP to be advertised where the user-space view of the id register does not show the feature as supported. Erratum workaround need to remove both the HWCAP, and the feature from the user-space view of the id register. This involves duplicating the code, and spreading it over cpufeature.c and cpu_errata.c. Make the HWCAP code use the user-space view of id registers. This ensures the values never diverge, and allows erratum workaround to remove HWCAP by modifying the user-space view of the id register. Signed-off-by: James Morse <[email protected]> Reviewed-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'lib/overflow_kunit.c')
0 files changed, 0 insertions, 0 deletions