android_kernel_samsung_sm8650/arch
Mark Brown dfadde1697 arm64/fpsimd: Only provide the length to cpufeature for xCR registers
[ Upstream commit 01948b09edc3fecf8486c57c2d2fb8b80886f3d0 ]

For both SVE and SME we abuse the generic register field comparison
support in the cpufeature code as part of our detection of unsupported
variations in the vector lengths available to PEs, reporting the maximum
vector lengths via ZCR_EL1.LEN and SMCR_EL1.LEN.  Since these are
configuration registers rather than identification registers the
assumptions the cpufeature code makes about how unknown bitfields behave
are invalid, leading to warnings when SME features like FA64 are enabled
and we hotplug a CPU:

  CPU features: SANITY CHECK: Unexpected variation in SYS_SMCR_EL1. Boot CPU: 0x0000000000000f, CPU3: 0x0000008000000f
  CPU features: Unsupported CPU feature variation detected.

SVE has no controls other than the vector length so is not yet impacted
but the same issue will apply there if any are defined.

Since the only field we are interested in having the cpufeature code
handle is the length field and we use a custom read function to obtain
the value we can avoid these warnings by filtering out all other bits
when we return the register value, if we're doing that we don't need to
bother reading the register at all and can simply use the RDVL/RDSVL
value we were filling in instead.

Fixes: 2e0f2478ea ("arm64/sve: Probe SVE capabilities and usable vector lengths")
FixeS: b42990d3bf ("arm64/sme: Identify supported SME vector lengths at boot")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20230731-arm64-sme-fa64-hotplug-v2-1-7714c00dd902@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:29 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:27:31 +02:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-19 16:21:42 +02:00
arm ARM: ptrace: Restore syscall skipping for tracers 2023-09-13 09:42:28 +02:00
arm64 arm64/fpsimd: Only provide the length to cpufeature for xCR registers 2023-09-13 09:42:29 +02:00
csky csky: fix up lock_mm_and_find_vma() conversion 2023-07-01 13:16:27 +02:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
ia64 ia64/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:46 +02:00
loongarch LoongArch: Fix the write_fcsr() macro 2023-09-13 09:42:25 +02:00
m68k m68k: Fix invalid .section syntax 2023-09-13 09:42:21 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
mips Revert "MIPS: unhide PATA_PLATFORM" 2023-09-13 09:42:20 +02:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
openrisc mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
parisc parisc: sys_parisc: parisc_personality() is called from asm code 2023-09-02 09:16:19 +02:00
powerpc powerpc/powermac: Use early_* IO variants in via_calibrate_decr() 2023-09-13 09:42:24 +02:00
riscv riscv: Fix build errors using binutils2.37 toolchains 2023-08-30 16:11:08 +02:00
s390 KVM: s390: fix sthyi error handling 2023-08-11 12:08:11 +02:00
sh sh/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:47 +02:00
sparc sparc/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:47 +02:00
um um/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:47 +02:00
x86 x86/decompressor: Don't rely on upper 32 bits of GPRs being preserved 2023-09-13 09:42:28 +02:00
xtensa init: Remove check_bugs() leftovers 2023-08-08 20:03:47 +02:00
.gitignore
Kconfig init: Provide arch_cpu_finalize_init() 2023-08-08 20:03:46 +02:00