Skip to content

Commit f31deaa

Browse files
committed
arm64: cpufeature: Don't enforce system-wide SPE capability
The statistical profiling extension (SPE) is an optional feature of ARMv8.1 and is unlikely to be supported by all of the CPUs in a heterogeneous system. This patch updates the cpufeature checks so that such systems are not tainted as unsupported. Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Suzuki Poulose <suzuki.poulose@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent b20d1ba commit f31deaa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arch/arm64/include/asm/sysreg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
#define ID_AA64MMFR2_CNP_SHIFT 0
191191

192192
/* id_aa64dfr0 */
193+
#define ID_AA64DFR0_PMSVER_SHIFT 32
193194
#define ID_AA64DFR0_CTX_CMPS_SHIFT 28
194195
#define ID_AA64DFR0_WRPS_SHIFT 20
195196
#define ID_AA64DFR0_BRPS_SHIFT 12

arch/arm64/kernel/cpufeature.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ static const struct arm64_ftr_bits ftr_id_mmfr0[] = {
180180
};
181181

182182
static const struct arm64_ftr_bits ftr_id_aa64dfr0[] = {
183-
ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 32, 32, 0),
183+
ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 36, 28, 0),
184+
ARM64_FTR_BITS(FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64DFR0_PMSVER_SHIFT, 4, 0),
184185
ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_CTX_CMPS_SHIFT, 4, 0),
185186
ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_WRPS_SHIFT, 4, 0),
186187
ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_BRPS_SHIFT, 4, 0),

0 commit comments

Comments
 (0)