Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1320594
| From | Suzuki K Poulose <suzuki.poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/6] arm64: cpufeature: Track 32bit EL0 support |
| Date | 2016-01-28 12:40 +0100 |
| Message-ID | <qVT5F-2Js-25@gated-at.bofh.it> (permalink) |
| References | <qVT5E-2Js-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Keep track of the support for 32bit EL0.
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 8 +++++++-
arch/arm64/kernel/cpufeature.c | 11 +++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index 98f83d7..46c6f4c 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -30,8 +30,9 @@
#define ARM64_HAS_LSE_ATOMICS 5
#define ARM64_WORKAROUND_CAVIUM_23154 6
#define ARM64_WORKAROUND_834220 7
+#define ARM64_HAS_32BIT_EL0 8
-#define ARM64_NCAPS 8
+#define ARM64_NCAPS 9
#ifndef __ASSEMBLY__
@@ -187,6 +188,11 @@ 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_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));
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 853e575..8deaa20 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -675,6 +675,17 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
.min_field_value = 2,
},
#endif /* CONFIG_AS_LSE && CONFIG_ARM64_LSE_ATOMICS */
+#ifdef CONFIG_COMPAT
+ {
+ .desc = "32 bit EL0",
+ .capability = ARM64_HAS_32BIT_EL0,
+ .matches = has_cpuid_feature,
+ .sys_reg = SYS_ID_AA64PFR0_EL1,
+ .field_pos = ID_AA64PFR0_EL0_SHIFT,
+ .sign = FTR_UNSIGNED,
+ .min_field_value = ID_AA64PFR0_EL0_32BIT_64BIT,
+ },
+#endif
{},
};
--
1.7.9.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] Support for systems without AArch32 state Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100 [PATCH 3/6] arm64: Add helpers for detecting AArch32 support at EL0 Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100 [PATCH 2/6] arm64: HWCAP: Split COMPAT HWCAP table entries Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100 [PATCH 1/6] arm64: hwcaps: Cleanup naming Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100 [PATCH 4/6] arm64: cpufeature: Check availability of AArch32 Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100 [PATCH 5/6] arm64: cpufeature: Track 32bit EL0 support Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100 [PATCH 6/6] arm64: compat: Check for AArch32 state Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-01-28 12:40 +0100
csiph-web