summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/lppaca.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2010-08-12 22:18:15 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-09-02 06:07:31 +0200
commit8154c5d22d91cd16bd9985b0638c8957e4688d0e (patch)
tree3f86ef67c9242a585f08a1220d3113718b438869 /arch/powerpc/include/asm/lppaca.h
parentpowerpc: Move arch_sd_sibling_asym_packing() to smp.c (diff)
downloadlinux-8154c5d22d91cd16bd9985b0638c8957e4688d0e.tar.xz
linux-8154c5d22d91cd16bd9985b0638c8957e4688d0e.zip
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>
Diffstat (limited to 'arch/powerpc/include/asm/lppaca.h')
-rw-r--r--arch/powerpc/include/asm/lppaca.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index 14b592dfb4e8..6b73554433a0 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -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