diff options
author | Mark Rutland <mark.rutland@arm.com> | 2014-07-16 11:32:44 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-07-18 10:24:09 -0400 |
commit | df857416a13734ed9356f6e4f0152d55e4fb748a (patch) | |
tree | c18089d69b5ecc00ba4d2828899801ac5cadb270 /arch/arm64/kernel/smp.c | |
parent | 89c4a306e7631bcb71cc537c8a029172af6047fe (diff) |
arm64: cpuinfo: record cpu system register values
Several kernel subsystems need to know details about CPU system register
values, sometimes for CPUs other than that they are executing on. Rather
than hard-coding system register accesses and cross-calls for these
cases, this patch adds logic to record various system register values at
boot-time. This may be used for feature reporting, firmware bug
detection, etc.
Separate hooks are added for the boot and hotplug paths to enable
one-time intialisation and cold/warm boot value mismatch detection in
later patches.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/smp.c')
-rw-r--r-- | arch/arm64/kernel/smp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 40f38f46c8e0..3e2f5ebbf63e 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
41 | #include <asm/cacheflush.h> | 41 | #include <asm/cacheflush.h> |
42 | #include <asm/cpu.h> | ||
42 | #include <asm/cputype.h> | 43 | #include <asm/cputype.h> |
43 | #include <asm/cpu_ops.h> | 44 | #include <asm/cpu_ops.h> |
44 | #include <asm/mmu_context.h> | 45 | #include <asm/mmu_context.h> |
@@ -155,6 +156,11 @@ asmlinkage void secondary_start_kernel(void) | |||
155 | cpu_ops[cpu]->cpu_postboot(); | 156 | cpu_ops[cpu]->cpu_postboot(); |
156 | 157 | ||
157 | /* | 158 | /* |
159 | * Log the CPU info before it is marked online and might get read. | ||
160 | */ | ||
161 | cpuinfo_store_cpu(); | ||
162 | |||
163 | /* | ||
158 | * Enable GIC and timers. | 164 | * Enable GIC and timers. |
159 | */ | 165 | */ |
160 | notify_cpu_starting(cpu); | 166 | notify_cpu_starting(cpu); |