diff options
author | Suzuki K. Poulose <suzuki.poulose@arm.com> | 2015-10-19 15:24:48 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-10-21 16:35:57 +0200 |
commit | c1e8656cbae139c8aaf34d7b802edecbc8a1cf58 (patch) | |
tree | b016f4a78810859444547b4cea8177df15ad62bd /arch/arm64/include | |
parent | arm64: Read system wide CPUID value (diff) | |
download | linux-c1e8656cbae139c8aaf34d7b802edecbc8a1cf58.tar.xz 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')
-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 |