diff options
author | Suzuki K. Poulose <suzuki.poulose@arm.com> | 2015-10-19 14:24:48 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-10-21 15:35:57 +0100 |
commit | c1e8656cbae139c8aaf34d7b802edecbc8a1cf58 (patch) | |
tree | b016f4a78810859444547b4cea8177df15ad62bd /arch/arm64/include/asm/cpufeature.h | |
parent | b3f1537893b54d0f42f52e0f4cde5e17e21f564c (diff) | |
download | linux-c1e8656cbae139c8aaf34d7b802edecbc8a1cf58.tar.gz linux-c1e8656cbae139c8aaf34d7b802edecbc8a1cf58.tar.bz2 linux-c1e8656cbae139c8aaf34d7b802edecbc8a1cf58.zip |
arm64: Cleanup mixed endian support detection
Make use of the system wide safe register to decide the support
for mixed endian.
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Tested-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/cpufeature.h')
-rw-r--r-- | arch/arm64/include/asm/cpufeature.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 81217220eb92..1e281b27732b 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -141,11 +141,19 @@ void check_cpu_capabilities(const struct arm64_cpu_capabilities *caps, const char *info); void check_local_cpu_errata(void); void check_local_cpu_features(void); -bool cpu_supports_mixed_endian_el0(void); -bool system_supports_mixed_endian_el0(void); u64 read_system_reg(u32 id); +static inline bool cpu_supports_mixed_endian_el0(void) +{ + return id_aa64mmfr0_mixed_endian_el0(read_cpuid(ID_AA64MMFR0_EL1)); +} + +static inline bool system_supports_mixed_endian_el0(void) +{ + return id_aa64mmfr0_mixed_endian_el0(read_system_reg(SYS_ID_AA64MMFR0_EL1)); +} + #endif /* __ASSEMBLY__ */ #endif |