arm64: cpufeature: Check availability of AArch32
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 18 Apr 2016 09:28:35 +0000 (10:28 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 20 Apr 2016 11:22:42 +0000 (12:22 +0100)
commita6dc3cd718ec2a19b8ca812087666899852af78f
treef1ac05011fd06e703592a56076f4c7f245626af9
parentc80aba803a9aa131f997f62a71ab453e456d08a8
arm64: cpufeature: Check availability of AArch32

On ARMv8 support for AArch32 state is optional. Hence it is
not safe to check the AArch32 ID registers for sanity, which
could lead to false warnings. This patch makes sure that the
AArch32 state is implemented before we keep track of the 32bit
ID registers.

As per ARM ARM (D.1.21.2 - Support for Exception Levels and
Execution States, DDI0487A.h), checking the support for AArch32
at EL0 is good enough to check the support for AArch32 (i.e,
AArch32 at EL1 => AArch32 at EL0, but not vice versa).

Tested-by: Yury Norov <ynorov@caviumnetworks.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/cpuinfo.c