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>
This commit is contained in:

committed by
Michael Ellerman

parent
8e0b634b13
commit
d2e60075a3
@@ -110,7 +110,7 @@ static inline int smp_startup_cpu(unsigned int lcpu)
|
||||
}
|
||||
|
||||
/* Fixup atomic count: it exited inside IRQ handler. */
|
||||
task_thread_info(paca[lcpu].__current)->preempt_count = 0;
|
||||
task_thread_info(paca_ptrs[lcpu]->__current)->preempt_count = 0;
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE)
|
||||
goto out;
|
||||
@@ -165,7 +165,7 @@ static int smp_pSeries_kick_cpu(int nr)
|
||||
* cpu_start field to become non-zero After we set cpu_start,
|
||||
* the processor will continue on to secondary_start
|
||||
*/
|
||||
paca[nr].cpu_start = 1;
|
||||
paca_ptrs[nr]->cpu_start = 1;
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
set_preferred_offline_state(nr, CPU_STATE_ONLINE);
|
||||
|
||||
|
Reference in New Issue
Block a user