Skip to content

Commit 2f00905

Browse files
brooniectmarinas
authored andcommitted
arm64/sve: Ensure that all fields in ZCR_EL1 are set to known values
At present nothing in our CPU initialisation code ever sets unknown fields in ZCR_EL1 to known values, all updates to ZCR_EL1 are read/modify/write sequences for LEN. All the unknown fields are RES0, explicitly initialise them as such to avoid future surprises. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 21eb468 commit 2f00905

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,8 @@ void cpu_enable_sve(const struct arm64_cpu_capabilities *__always_unused p)
11341134
{
11351135
write_sysreg(read_sysreg(CPACR_EL1) | CPACR_EL1_ZEN_EL1EN, CPACR_EL1);
11361136
isb();
1137+
1138+
write_sysreg_s(0, SYS_ZCR_EL1);
11371139
}
11381140

11391141
void __init sve_setup(void)

0 commit comments

Comments
 (0)