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
@@ -99,7 +99,7 @@ void vpa_init(int cpu)
|
||||
* reports that. All SPLPAR support SLB shadow buffer.
|
||||
*/
|
||||
if (!radix_enabled() && firmware_has_feature(FW_FEATURE_SPLPAR)) {
|
||||
addr = __pa(paca[cpu].slb_shadow_ptr);
|
||||
addr = __pa(paca_ptrs[cpu]->slb_shadow_ptr);
|
||||
ret = register_slb_shadow(hwcpu, addr);
|
||||
if (ret)
|
||||
pr_err("WARNING: SLB shadow buffer registration for "
|
||||
@@ -111,7 +111,7 @@ void vpa_init(int cpu)
|
||||
/*
|
||||
* Register dispatch trace log, if one has been allocated.
|
||||
*/
|
||||
pp = &paca[cpu];
|
||||
pp = paca_ptrs[cpu];
|
||||
dtl = pp->dispatch_log;
|
||||
if (dtl) {
|
||||
pp->dtl_ridx = 0;
|
||||
|
Reference in New Issue
Block a user