arm64: cpufeature: Relax AArch32 system checks if EL1 is 64-bit only
authorWill Deacon <will@kernel.org>
Tue, 21 Apr 2020 14:29:20 +0000 (15:29 +0100)
committerWill Deacon <will@kernel.org>
Tue, 28 Apr 2020 13:23:37 +0000 (14:23 +0100)
commiteab2f92607461fc7fa9dba599772a4b214fd9d1a
treeec79dfd50d4a7bbae8a6ce66ba361dd598556451
parent1efcfe79d97dff9d436748a13a329f64cda6e67e
arm64: cpufeature: Relax AArch32 system checks if EL1 is 64-bit only

If AArch32 is not supported at EL1, the AArch32 feature register fields
no longer advertise support for some system features:

  * ISAR4.SMC
  * PFR1.{Virt_frac, Sec_frac, Virtualization, Security, ProgMod}

In which case, we don't need to emit "SANITY CHECK" failures for all of
them.

Add logic to relax the strictness of individual feature register fields
at runtime and use this for the fields above if 32-bit EL1 is not
supported.

Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20200421142922.18950-7-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c