]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
arm64: cpufeature: Fix missing ZFR0 in __read_sysreg_by_encoding()
authorDave Martin <Dave.Martin@arm.com>
Mon, 3 Jun 2019 15:35:02 +0000 (16:35 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 5 Jun 2019 12:05:28 +0000 (13:05 +0100)
In commit 06a916feca2b ("arm64: Expose SVE2 features for
userspace"), new hwcaps are added that are detected via fields in
the SVE-specific ID register ID_AA64ZFR0_EL1.

In order to check compatibility of secondary cpus with the hwcaps
established at boot, the cpufeatures code uses
__read_sysreg_by_encoding() to read this ID register based on the
sys_reg field of the arm64_elf_hwcaps[] table.

This leads to a kernel splat if an hwcap uses an ID register that
__read_sysreg_by_encoding() doesn't explicitly handle, as now
happens when exercising cpu hotplug on an SVE2-capable platform.

So fix it by adding the required case in there.

Fixes: 06a916feca2b ("arm64: Expose SVE2 features for userspace")
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpufeature.c

index ca27e08e3d8a7ea96fd209064e02efd05add7827..80babf451519930c6ecbdd7742ef76ceaafb27ef 100644 (file)
@@ -830,6 +830,7 @@ static u64 __read_sysreg_by_encoding(u32 sys_id)
 
        read_sysreg_case(SYS_ID_AA64PFR0_EL1);
        read_sysreg_case(SYS_ID_AA64PFR1_EL1);
+       read_sysreg_case(SYS_ID_AA64ZFR0_EL1);
        read_sysreg_case(SYS_ID_AA64DFR0_EL1);
        read_sysreg_case(SYS_ID_AA64DFR1_EL1);
        read_sysreg_case(SYS_ID_AA64MMFR0_EL1);