aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/cpuinfo.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2014-11-25 08:27:43 -0500
committerWill Deacon <will.deacon@arm.com>2014-11-25 10:56:44 -0500
commit3eebdbe5fc7d64c7a6ef14cc5b8be518ffd563fa (patch)
treea0becda51d87b3dc19f00401a1ef138f0c133acd /arch/arm64/kernel/cpuinfo.c
parentefdf4211d5b103535ae22972acadf57c9fc38b30 (diff)
arm64: sanity checks: add ID_AA64DFR{0,1}_EL1
While we currently expect self-hosted debug support to be identical across CPUs, we don't currently sanity check this. This patch adds logging of the ID_AA64DFR{0,1}_EL1 values and associated sanity checking code. It's not clear to me whether we need to check PMUVer, TraceVer, and DebugVer, as we don't currently rely on these fields at all. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/cpuinfo.c')
-rw-r--r--arch/arm64/kernel/cpuinfo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 9da33f96b678..57b641747534 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -112,6 +112,15 @@ static void cpuinfo_sanity_check(struct cpuinfo_arm64 *cur)
112 diff |= CHECK(cntfrq, boot, cur, cpu); 112 diff |= CHECK(cntfrq, boot, cur, cpu);
113 113
114 /* 114 /*
115 * The kernel uses self-hosted debug features and expects CPUs to
116 * support identical debug features. We presently need CTX_CMPs, WRPs,
117 * and BRPs to be identical.
118 * ID_AA64DFR1 is currently RES0.
119 */
120 diff |= CHECK(id_aa64dfr0, boot, cur, cpu);
121 diff |= CHECK(id_aa64dfr1, boot, cur, cpu);
122
123 /*
115 * Even in big.LITTLE, processors should be identical instruction-set 124 * Even in big.LITTLE, processors should be identical instruction-set
116 * wise. 125 * wise.
117 */ 126 */
@@ -171,6 +180,8 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info)
171 info->reg_dczid = read_cpuid(DCZID_EL0); 180 info->reg_dczid = read_cpuid(DCZID_EL0);
172 info->reg_midr = read_cpuid_id(); 181 info->reg_midr = read_cpuid_id();
173 182
183 info->reg_id_aa64dfr0 = read_cpuid(ID_AA64DFR0_EL1);
184 info->reg_id_aa64dfr1 = read_cpuid(ID_AA64DFR1_EL1);
174 info->reg_id_aa64isar0 = read_cpuid(ID_AA64ISAR0_EL1); 185 info->reg_id_aa64isar0 = read_cpuid(ID_AA64ISAR0_EL1);
175 info->reg_id_aa64isar1 = read_cpuid(ID_AA64ISAR1_EL1); 186 info->reg_id_aa64isar1 = read_cpuid(ID_AA64ISAR1_EL1);
176 info->reg_id_aa64mmfr0 = read_cpuid(ID_AA64MMFR0_EL1); 187 info->reg_id_aa64mmfr0 = read_cpuid(ID_AA64MMFR0_EL1);