aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx/smp.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-02-13 10:08:12 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-30 08:34:23 -0400
commitd2e60075a3d4422dc54b919f3b125d8066b839d4 (patch)
tree0a053b218a2b6645da86b32e75947899158d3c33 /arch/powerpc/platforms/85xx/smp.c
parent8e0b634b132752ec3eba50afb952502b1a87d6ba (diff)
powerpc/64: Use array of paca pointers and allocate pacas individually
Change the paca array into an array of pointers to pacas. Allocate pacas individually. This allows flexibility in where the PACAs are allocated. Future work will allocate them node-local. Platforms that don't have address limits on PACAs would be able to defer PACA allocations until later in boot rather than allocate all possible ones up-front then freeing unused. This is slightly more overhead (one additional indirection) for cross CPU paca references, but those aren't too common. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/85xx/smp.c')
-rw-r--r--arch/powerpc/platforms/85xx/smp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index f51fd35f4618..7e966f4cf19a 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -147,7 +147,7 @@ static void qoriq_cpu_kill(unsigned int cpu)
147 for (i = 0; i < 500; i++) { 147 for (i = 0; i < 500; i++) {
148 if (is_cpu_dead(cpu)) { 148 if (is_cpu_dead(cpu)) {
149#ifdef CONFIG_PPC64 149#ifdef CONFIG_PPC64
150 paca[cpu].cpu_start = 0; 150 paca_ptrs[cpu]->cpu_start = 0;
151#endif 151#endif
152 return; 152 return;
153 } 153 }
@@ -328,7 +328,7 @@ static int smp_85xx_kick_cpu(int nr)
328 return ret; 328 return ret;
329 329
330done: 330done:
331 paca[nr].cpu_start = 1; 331 paca_ptrs[nr]->cpu_start = 1;
332 generic_set_cpu_up(nr); 332 generic_set_cpu_up(nr);
333 333
334 return ret; 334 return ret;
@@ -409,14 +409,14 @@ void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
409 } 409 }
410 410
411 if (disable_threadbit) { 411 if (disable_threadbit) {
412 while (paca[disable_cpu].kexec_state < KEXEC_STATE_REAL_MODE) { 412 while (paca_ptrs[disable_cpu]->kexec_state < KEXEC_STATE_REAL_MODE) {
413 barrier(); 413 barrier();
414 now = mftb(); 414 now = mftb();
415 if (!notified && now - start > 1000000) { 415 if (!notified && now - start > 1000000) {
416 pr_info("%s/%d: waiting for cpu %d to enter KEXEC_STATE_REAL_MODE (%d)\n", 416 pr_info("%s/%d: waiting for cpu %d to enter KEXEC_STATE_REAL_MODE (%d)\n",
417 __func__, smp_processor_id(), 417 __func__, smp_processor_id(),
418 disable_cpu, 418 disable_cpu,
419 paca[disable_cpu].kexec_state); 419 paca_ptrs[disable_cpu]->kexec_state);
420 notified = true; 420 notified = true;
421 } 421 }
422 } 422 }