aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/setup.c
diff options
context:
space:
mode:
authorSuzuki K. Poulose <suzuki.poulose@arm.com>2015-10-19 09:24:40 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2015-10-21 10:33:39 -0400
commit4b998ff1885eecd3dc330bf057e24667c1db84a4 (patch)
tree68ab5a9fb53c6ab4ad143727e4df6d7c4903798c /arch/arm64/kernel/setup.c
parent3a75578efae64b94d76eacbf8adf2a3ab13c6aa1 (diff)
arm64: Delay cpuinfo_store_boot_cpu
At the moment the boot CPU stores the cpuinfo long before the PERCPU areas are initialised by the kernel. This could be problematic as the non-boot CPU data structures might get copied with the data from the boot CPU, giving us no chance to detect if a particular CPU updated its cpuinfo. This patch delays the boot cpu store to smp_prepare_boot_cpu(). Also kills the setup_processor() which no longer does meaningful work. 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/setup.c')
-rw-r--r--arch/arm64/kernel/setup.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 4f0408e1df0d..47e005141598 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -286,13 +286,6 @@ void __init setup_cpu_features(void)
286#endif 286#endif
287} 287}
288 288
289static void __init setup_processor(void)
290{
291 pr_info("Boot CPU: AArch64 Processor [%08x]\n", read_cpuid_id());
292 sprintf(init_utsname()->machine, ELF_PLATFORM);
293 cpuinfo_store_boot_cpu();
294}
295
296static void __init setup_machine_fdt(phys_addr_t dt_phys) 289static void __init setup_machine_fdt(phys_addr_t dt_phys)
297{ 290{
298 void *dt_virt = fixmap_remap_fdt(dt_phys); 291 void *dt_virt = fixmap_remap_fdt(dt_phys);
@@ -404,8 +397,9 @@ u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID };
404 397
405void __init setup_arch(char **cmdline_p) 398void __init setup_arch(char **cmdline_p)
406{ 399{
407 setup_processor(); 400 pr_info("Boot CPU: AArch64 Processor [%08x]\n", read_cpuid_id());
408 401
402 sprintf(init_utsname()->machine, ELF_PLATFORM);
409 init_mm.start_code = (unsigned long) _text; 403 init_mm.start_code = (unsigned long) _text;
410 init_mm.end_code = (unsigned long) _etext; 404 init_mm.end_code = (unsigned long) _etext;
411 init_mm.end_data = (unsigned long) _edata; 405 init_mm.end_data = (unsigned long) _edata;