powerpc: Abstract indexing of lppaca structs
Currently we have the lppaca structs as a simple array of NR_CPUS entries, taking up space in the data section of the kernel image. In future we would like to allocate them dynamically, so this abstracts out the accesses to the array, making it easier to change how we locate the lppaca for a given cpu in future. Specifically, lppaca[cpu] changes to lppaca_of(cpu). Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
e1f0ece113
commit
8154c5d22d
@@ -153,6 +153,8 @@ struct lppaca {
|
||||
|
||||
extern struct lppaca lppaca[];
|
||||
|
||||
#define lppaca_of(cpu) (lppaca[cpu])
|
||||
|
||||
/*
|
||||
* SLB shadow buffer structure as defined in the PAPR. The save_area
|
||||
* contains adjacent ESID and VSID pairs for each shadowed SLB. The
|
||||
|
Reference in New Issue
Block a user