summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-02-26 13:43:40 -0500
committerThomas Gleixner <tglx@linutronix.de>2016-03-01 14:36:57 -0500
commitfc6d73d67436e7784758a831227bd019547a3f73 (patch)
tree81b2941d0c2c1956251a24586a91af8dd2ecea6c /arch
parent1cf4f629d9d246519a1e76c021806f2a51ddba4d (diff)
arch/hotplug: Call into idle with a proper state
Let the non boot cpus call into idle with the corresponding hotplug state, so the hotplug core can handle the further bringup. That's a first step to convert the boot side of the hotplugged cpus to do all the synchronization with the other side through the state machine. For now it'll only start the hotplug thread and kick the full bringup of the cpu. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-arch@vger.kernel.org Cc: Rik van Riel <riel@redhat.com> Cc: Rafael Wysocki <rafael.j.wysocki@intel.com> Cc: "Srivatsa S. Bhat" <srivatsa@mit.edu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Tejun Heo <tj@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul Turner <pjt@google.com> Link: http://lkml.kernel.org/r/20160226182341.614102639@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/smp.c2
-rw-r--r--arch/arc/kernel/smp.c2
-rw-r--r--arch/arm/kernel/smp.c2
-rw-r--r--arch/arm64/kernel/smp.c2
-rw-r--r--arch/blackfin/mach-common/smp.c2
-rw-r--r--arch/hexagon/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/smpboot.c2
-rw-r--r--arch/m32r/kernel/smpboot.c2
-rw-r--r--arch/metag/kernel/smp.c2
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mn10300/kernel/smp.c2
-rw-r--r--arch/parisc/kernel/smp.c2
-rw-r--r--arch/powerpc/kernel/smp.c2
-rw-r--r--arch/s390/kernel/smp.c2
-rw-r--r--arch/sh/kernel/smp.c2
-rw-r--r--arch/sparc/kernel/smp_32.c2
-rw-r--r--arch/sparc/kernel/smp_64.c2
-rw-r--r--arch/tile/kernel/smpboot.c2
-rw-r--r--arch/x86/kernel/smpboot.c2
-rw-r--r--arch/x86/xen/smp.c2
-rw-r--r--arch/xtensa/kernel/smp.c2
21 files changed, 21 insertions, 21 deletions
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 2f24447fef92..46bf263c3153 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -168,7 +168,7 @@ smp_callin(void)
168 cpuid, current, current->active_mm)); 168 cpuid, current, current->active_mm));
169 169
170 preempt_disable(); 170 preempt_disable();
171 cpu_startup_entry(CPUHP_ONLINE); 171 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
172} 172}
173 173
174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ 174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index 424e937da5c8..4cb3add77c75 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -142,7 +142,7 @@ void start_kernel_secondary(void)
142 142
143 local_irq_enable(); 143 local_irq_enable();
144 preempt_disable(); 144 preempt_disable();
145 cpu_startup_entry(CPUHP_ONLINE); 145 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
146} 146}
147 147
148/* 148/*
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 37312f6749f3..baee70267f29 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -409,7 +409,7 @@ asmlinkage void secondary_start_kernel(void)
409 /* 409 /*
410 * OK, it's off to the idle thread for us 410 * OK, it's off to the idle thread for us
411 */ 411 */
412 cpu_startup_entry(CPUHP_ONLINE); 412 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
413} 413}
414 414
415void __init smp_cpus_done(unsigned int max_cpus) 415void __init smp_cpus_done(unsigned int max_cpus)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index b1adc51b2c2e..460765799c64 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -195,7 +195,7 @@ asmlinkage void secondary_start_kernel(void)
195 /* 195 /*
196 * OK, it's off to the idle thread for us 196 * OK, it's off to the idle thread for us
197 */ 197 */
198 cpu_startup_entry(CPUHP_ONLINE); 198 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
199} 199}
200 200
201#ifdef CONFIG_HOTPLUG_CPU 201#ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index 0030e21cfceb..23c4ef5f8bdc 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -333,7 +333,7 @@ void secondary_start_kernel(void)
333 333
334 /* We are done with local CPU inits, unblock the boot CPU. */ 334 /* We are done with local CPU inits, unblock the boot CPU. */
335 set_cpu_online(cpu, true); 335 set_cpu_online(cpu, true);
336 cpu_startup_entry(CPUHP_ONLINE); 336 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
337} 337}
338 338
339void __init smp_prepare_boot_cpu(void) 339void __init smp_prepare_boot_cpu(void)
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c
index ff759f26b96a..983bae7d2665 100644
--- a/arch/hexagon/kernel/smp.c
+++ b/arch/hexagon/kernel/smp.c
@@ -180,7 +180,7 @@ void start_secondary(void)
180 180
181 local_irq_enable(); 181 local_irq_enable();
182 182
183 cpu_startup_entry(CPUHP_ONLINE); 183 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
184} 184}
185 185
186 186
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 0e76fad27975..74fe317477e6 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -454,7 +454,7 @@ start_secondary (void *unused)
454 preempt_disable(); 454 preempt_disable();
455 smp_callin(); 455 smp_callin();
456 456
457 cpu_startup_entry(CPUHP_ONLINE); 457 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
458 return 0; 458 return 0;
459} 459}
460 460
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index a468467542f4..f98d2f6519d6 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -432,7 +432,7 @@ int __init start_secondary(void *unused)
432 */ 432 */
433 local_flush_tlb_all(); 433 local_flush_tlb_all();
434 434
435 cpu_startup_entry(CPUHP_ONLINE); 435 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
436 return 0; 436 return 0;
437} 437}
438 438
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c
index c3c6f0864881..bad13232de51 100644
--- a/arch/metag/kernel/smp.c
+++ b/arch/metag/kernel/smp.c
@@ -396,7 +396,7 @@ asmlinkage void secondary_start_kernel(void)
396 /* 396 /*
397 * OK, it's off to the idle thread for us 397 * OK, it's off to the idle thread for us
398 */ 398 */
399 cpu_startup_entry(CPUHP_ONLINE); 399 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
400} 400}
401 401
402void __init smp_cpus_done(unsigned int max_cpus) 402void __init smp_cpus_done(unsigned int max_cpus)
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index bd4385a8e6e8..f2112a8ddf15 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -191,7 +191,7 @@ asmlinkage void start_secondary(void)
191 WARN_ON_ONCE(!irqs_disabled()); 191 WARN_ON_ONCE(!irqs_disabled());
192 mp_ops->smp_finish(); 192 mp_ops->smp_finish();
193 193
194 cpu_startup_entry(CPUHP_ONLINE); 194 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
195} 195}
196 196
197static void stop_this_cpu(void *dummy) 197static void stop_this_cpu(void *dummy)
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c
index f984193718b1..426173c4b0b9 100644
--- a/arch/mn10300/kernel/smp.c
+++ b/arch/mn10300/kernel/smp.c
@@ -675,7 +675,7 @@ int __init start_secondary(void *unused)
675#ifdef CONFIG_GENERIC_CLOCKEVENTS 675#ifdef CONFIG_GENERIC_CLOCKEVENTS
676 init_clockevents(); 676 init_clockevents();
677#endif 677#endif
678 cpu_startup_entry(CPUHP_ONLINE); 678 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
679 return 0; 679 return 0;
680} 680}
681 681
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 52e85973a283..c2a9cc55a62f 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -305,7 +305,7 @@ void __init smp_callin(void)
305 305
306 local_irq_enable(); /* Interrupts have been off until now */ 306 local_irq_enable(); /* Interrupts have been off until now */
307 307
308 cpu_startup_entry(CPUHP_ONLINE); 308 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
309 309
310 /* NOTREACHED */ 310 /* NOTREACHED */
311 panic("smp_callin() AAAAaaaaahhhh....\n"); 311 panic("smp_callin() AAAAaaaaahhhh....\n");
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index ec9ec2058d2d..cc13d4c83291 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -727,7 +727,7 @@ void start_secondary(void *unused)
727 727
728 local_irq_enable(); 728 local_irq_enable();
729 729
730 cpu_startup_entry(CPUHP_ONLINE); 730 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
731 731
732 BUG(); 732 BUG();
733} 733}
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 3c65a8eae34d..40a6b4f9c36c 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -798,7 +798,7 @@ static void smp_start_secondary(void *cpuvoid)
798 set_cpu_online(smp_processor_id(), true); 798 set_cpu_online(smp_processor_id(), true);
799 inc_irq_stat(CPU_RST); 799 inc_irq_stat(CPU_RST);
800 local_irq_enable(); 800 local_irq_enable();
801 cpu_startup_entry(CPUHP_ONLINE); 801 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
802} 802}
803 803
804/* Upping and downing of CPUs */ 804/* Upping and downing of CPUs */
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index de6be008fc01..13f633add29a 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -203,7 +203,7 @@ asmlinkage void start_secondary(void)
203 set_cpu_online(cpu, true); 203 set_cpu_online(cpu, true);
204 per_cpu(cpu_state, cpu) = CPU_ONLINE; 204 per_cpu(cpu_state, cpu) = CPU_ONLINE;
205 205
206 cpu_startup_entry(CPUHP_ONLINE); 206 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
207} 207}
208 208
209extern struct { 209extern struct {
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c
index b3a5d81b20f0..fb30e7c6a5b1 100644
--- a/arch/sparc/kernel/smp_32.c
+++ b/arch/sparc/kernel/smp_32.c
@@ -364,7 +364,7 @@ static void sparc_start_secondary(void *arg)
364 local_irq_enable(); 364 local_irq_enable();
365 365
366 wmb(); 366 wmb();
367 cpu_startup_entry(CPUHP_ONLINE); 367 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
368 368
369 /* We should never reach here! */ 369 /* We should never reach here! */
370 BUG(); 370 BUG();
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 19cd08d18672..8a6151a628ce 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -134,7 +134,7 @@ void smp_callin(void)
134 134
135 local_irq_enable(); 135 local_irq_enable();
136 136
137 cpu_startup_entry(CPUHP_ONLINE); 137 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
138} 138}
139 139
140void cpu_panic(void) 140void cpu_panic(void)
diff --git a/arch/tile/kernel/smpboot.c b/arch/tile/kernel/smpboot.c
index 20d52a98e171..6c0abaacec33 100644
--- a/arch/tile/kernel/smpboot.c
+++ b/arch/tile/kernel/smpboot.c
@@ -208,7 +208,7 @@ void online_secondary(void)
208 /* Set up tile-timer clock-event device on this cpu */ 208 /* Set up tile-timer clock-event device on this cpu */
209 setup_tile_timer(); 209 setup_tile_timer();
210 210
211 cpu_startup_entry(CPUHP_ONLINE); 211 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
212} 212}
213 213
214int __cpu_up(unsigned int cpu, struct task_struct *tidle) 214int __cpu_up(unsigned int cpu, struct task_struct *tidle)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 24d57f77b3c1..293b22a7ab02 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -248,7 +248,7 @@ static void notrace start_secondary(void *unused)
248 x86_cpuinit.setup_percpu_clockev(); 248 x86_cpuinit.setup_percpu_clockev();
249 249
250 wmb(); 250 wmb();
251 cpu_startup_entry(CPUHP_ONLINE); 251 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
252} 252}
253 253
254void __init smp_store_boot_cpu_info(void) 254void __init smp_store_boot_cpu_info(void)
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 3f4ebf0261f2..3c6d17fd423a 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -112,7 +112,7 @@ asmlinkage __visible void cpu_bringup_and_idle(int cpu)
112 xen_pvh_secondary_vcpu_init(cpu); 112 xen_pvh_secondary_vcpu_init(cpu);
113#endif 113#endif
114 cpu_bringup(); 114 cpu_bringup();
115 cpu_startup_entry(CPUHP_ONLINE); 115 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
116} 116}
117 117
118static void xen_smp_intr_free(unsigned int cpu) 118static void xen_smp_intr_free(unsigned int cpu)
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c
index 4d02e38514f5..fc4ad21a5ed4 100644
--- a/arch/xtensa/kernel/smp.c
+++ b/arch/xtensa/kernel/smp.c
@@ -157,7 +157,7 @@ void secondary_start_kernel(void)
157 157
158 complete(&cpu_running); 158 complete(&cpu_running);
159 159
160 cpu_startup_entry(CPUHP_ONLINE); 160 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
161} 161}
162 162
163static void mx_cpu_start(void *p) 163static void mx_cpu_start(void *p)