diff options
author | Suzuki K. Poulose <suzuki.poulose@arm.com> | 2015-10-19 15:24:47 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-10-21 16:35:56 +0200 |
commit | b3f1537893b54d0f42f52e0f4cde5e17e21f564c (patch) | |
tree | 7099fece1301fdee963f52cf406027b3aab433e0 /arch/arm64/kernel | |
parent | arm64: Consolidate CPU Sanity check to CPU Feature infrastructure (diff) | |
download | linux-b3f1537893b54d0f42f52e0f4cde5e17e21f564c.tar.xz linux-b3f1537893b54d0f42f52e0f4cde5e17e21f564c.zip |
arm64: Read system wide CPUID value
Add an API for reading the safe CPUID value across the
system from the new infrastructure.
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/kernel')
-rw-r--r-- | arch/arm64/kernel/cpufeature.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index aae181760e1f..b4656cabf87f 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -590,6 +590,15 @@ void update_cpu_features(int cpu, update_mixed_endian_el0_support(info); } +u64 read_system_reg(u32 id) +{ + struct arm64_ftr_reg *regp = get_arm64_ftr_reg(id); + + /* We shouldn't get a request for an unsupported register */ + BUG_ON(!regp); + return regp->sys_val; +} + static bool feature_matches(u64 reg, const struct arm64_cpu_capabilities *entry) { |