X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=arch%2Farm64%2Finclude%2Fasm%2Fcpufeature.h;fp=arch%2Farm64%2Finclude%2Fasm%2Fcpufeature.h;h=d00e27eebe9797b3c68d58e560b7a96935a6afdc;hb=f25fed271059c7a4afe6db46f085e80e2c4db073;hp=6e993094996e9958b7dc0082fccf17591dc4219c;hpb=43819b656c1e23a21049d20ff1be4c7d97923c22;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 6e993094996e..d00e27eebe97 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -38,7 +38,8 @@ #define ARM64_HAS_VIRT_HOST_EXTN 12 #define ARM64_HARDEN_BRANCH_PREDICTOR 13 #define ARM64_UNMAP_KERNEL_AT_EL0 14 -#define ARM64_NCAPS 15 +#define ARM64_HAS_32BIT_EL0 15 +#define ARM64_NCAPS 16 #ifndef __ASSEMBLY__ @@ -190,6 +191,11 @@ static inline bool cpu_supports_mixed_endian_el0(void) return id_aa64mmfr0_mixed_endian_el0(read_cpuid(SYS_ID_AA64MMFR0_EL1)); } +static inline bool system_supports_32bit_el0(void) +{ + return cpus_have_cap(ARM64_HAS_32BIT_EL0); +} + static inline bool system_supports_mixed_endian_el0(void) { return id_aa64mmfr0_mixed_endian_el0(read_system_reg(SYS_ID_AA64MMFR0_EL1));