aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/smp.c')
-rw-r--r--arch/arm64/kernel/smp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 7cfb92a4ab66..f0a141dd5655 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -114,6 +114,11 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
114 return ret; 114 return ret;
115} 115}
116 116
117static void smp_store_cpu_info(unsigned int cpuid)
118{
119 store_cpu_topology(cpuid);
120}
121
117/* 122/*
118 * This is the secondary CPU boot entry. We're using this CPUs 123 * This is the secondary CPU boot entry. We're using this CPUs
119 * idle thread stack, but a set of temporary page tables. 124 * idle thread stack, but a set of temporary page tables.
@@ -152,6 +157,8 @@ asmlinkage void secondary_start_kernel(void)
152 */ 157 */
153 notify_cpu_starting(cpu); 158 notify_cpu_starting(cpu);
154 159
160 smp_store_cpu_info(cpu);
161
155 /* 162 /*
156 * OK, now it's safe to let the boot CPU continue. Wait for 163 * OK, now it's safe to let the boot CPU continue. Wait for
157 * the CPU migration code to notice that the CPU is online 164 * the CPU migration code to notice that the CPU is online
@@ -160,6 +167,7 @@ asmlinkage void secondary_start_kernel(void)
160 set_cpu_online(cpu, true); 167 set_cpu_online(cpu, true);
161 complete(&cpu_running); 168 complete(&cpu_running);
162 169
170 local_dbg_enable();
163 local_irq_enable(); 171 local_irq_enable();
164 local_async_enable(); 172 local_async_enable();
165 173
@@ -390,6 +398,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
390 int err; 398 int err;
391 unsigned int cpu, ncores = num_possible_cpus(); 399 unsigned int cpu, ncores = num_possible_cpus();
392 400
401 init_cpu_topology();
402
403 smp_store_cpu_info(smp_processor_id());
404
393 /* 405 /*
394 * are we trying to boot more cores than exist? 406 * are we trying to boot more cores than exist?
395 */ 407 */