diff options
author | Mark Brown <[email protected]> | 2022-08-18 22:36:13 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2022-08-23 11:26:01 +0100 |
commit | 53d2d84a1f6d68e036adab71df8e0f37cd2724f6 (patch) | |
tree | b05ac940956fbe1673ce34f5c55bc75d9ff67e39 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | a10edea4efbba4e8756f493781e953dd3592f24a (diff) |
arm64/cache: Fix cache_type_cwg() for register generation
Ard noticed that since we converted CTR_EL0 to automatic generation we have
been seeing errors on some systems handling the value of cache_type_cwg()
such as
CPU features: No Cache Writeback Granule information, assuming 128
This is because the manual definition of CTR_EL0_CWG_MASK was done without
a shift while our convention is to define the mask after shifting. This
means that the user in cache_type_cwg() was broken as it was written for
the manually written shift then mask. Fix this by converting to use
SYS_FIELD_GET().
The only other field where the _MASK for this register is used is IminLine
which is at offset 0 so unaffected.
Fixes: 9a3634d02301 ("arm64/sysreg: Convert CTR_EL0 to automatic generation")
Reported-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions