diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2006-01-12 18:26:42 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 05:17:39 -0500 |
commit | 3356bb9f7ba378a6e2709f9df95f4ea52111f4df (patch) | |
tree | 84f370df6e58cec63132f9acce492d585226e671 /include/asm-powerpc/lppaca.h | |
parent | e58c3495e6007af59382540bb21ee941e470d88d (diff) |
[PATCH] powerpc: Remove lppaca structure from the PACA
At present the lppaca - the structure shared with the iSeries
hypervisor and phyp - is contained within the PACA, our own low-level
per-cpu structure. This doesn't have to be so, the patch below
removes it, making a separate array of lppaca structures.
This saves approximately 500*NR_CPUS bytes of image size and kernel
memory, because we don't need aligning gap between the Linux and
hypervisor portions of every PACA. On the other hand it means an
extra level of dereference in many accesses to the lppaca.
The patch also gets rid of several places where we assign the paca
address to a local variable for no particular reason.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/lppaca.h')
-rw-r--r-- | include/asm-powerpc/lppaca.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asm-powerpc/lppaca.h b/include/asm-powerpc/lppaca.h index ff82ea7c4829..cd9f11f1ef14 100644 --- a/include/asm-powerpc/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
@@ -29,7 +29,9 @@ | |||
29 | //---------------------------------------------------------------------------- | 29 | //---------------------------------------------------------------------------- |
30 | #include <asm/types.h> | 30 | #include <asm/types.h> |
31 | 31 | ||
32 | struct lppaca { | 32 | /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k |
33 | * alignment is sufficient to prevent this */ | ||
34 | struct __attribute__((__aligned__(0x400))) lppaca { | ||
33 | //============================================================================= | 35 | //============================================================================= |
34 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data | 36 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data |
35 | // NOTE: The xDynXyz fields are fields that will be dynamically changed by | 37 | // NOTE: The xDynXyz fields are fields that will be dynamically changed by |
@@ -129,5 +131,7 @@ struct lppaca { | |||
129 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF | 131 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF |
130 | }; | 132 | }; |
131 | 133 | ||
134 | extern struct lppaca lppaca[]; | ||
135 | |||
132 | #endif /* __KERNEL__ */ | 136 | #endif /* __KERNEL__ */ |
133 | #endif /* _ASM_POWERPC_LPPACA_H */ | 137 | #endif /* _ASM_POWERPC_LPPACA_H */ |