diff options
| author | Anton Blanchard <anton@samba.org> | 2004-09-07 17:47:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-07 17:47:10 -0700 |
| commit | f50dda06dc514767ca26233e6bf51e6cb0b408c9 (patch) | |
| tree | 148fe95370783df1273f7bd163bd6b93a1307029 | |
| parent | 957ec2fab62f7e3318b393966858f13e48875b35 (diff) | |
[PATCH] ppc64: cut down paca footprint
The paca currently contains an iseries only structure which is quite large
(~1kB). The following patch removes this overhead on pseries and g5
kernels.
Since the paca is no longer required to be page aligned, remove it from the
page aligned section.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/ppc64/kernel/pacaData.c | 23 | ||||
| -rw-r--r-- | include/asm-ppc64/paca.h | 3 |
2 files changed, 18 insertions, 8 deletions
diff --git a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c index 66fa8124a86f..61d7f8e33f7d 100644 --- a/arch/ppc64/kernel/pacaData.c +++ b/arch/ppc64/kernel/pacaData.c @@ -37,13 +37,23 @@ extern unsigned long __toc_start; * processors. The processor VPD array needs one entry per physical * processor (not thread). */ -#define PACAINITDATA(number,start,lpq,asrr,asrv) \ -{ \ +#ifdef CONFIG_PPC_ISERIES +#define EXTRA_INITS(number, lpq) \ .lppaca_ptr = &paca[number].lppaca, \ + .lpqueue_ptr = (lpq), /* &xItLpQueue, */ \ .reg_save_ptr = &paca[number].reg_save, \ + .reg_save = { \ + .xDesc = 0xd397d9e2, /* "LpRS" */ \ + .xSize = sizeof(struct ItLpRegSave) \ + }, +#else +#define EXTRA_INITS(number, lpq) +#endif + +#define PACAINITDATA(number,start,lpq,asrr,asrv) \ +{ \ .lock_token = 0x8000, \ .paca_index = (number), /* Paca Index */ \ - .lpqueue_ptr = (lpq), /* &xItLpQueue, */ \ .default_decr = 0x00ff0000, /* Initial Decr */ \ .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ .stab_real = (asrr), /* Real pointer to segment table */ \ @@ -58,13 +68,10 @@ extern unsigned long __toc_start; .xEndOfQuantum = 0xfffffffffffffffful, \ .xSLBCount = 64, \ }, \ - .reg_save = { \ - .xDesc = 0xd397d9e2, /* "LpRS" */ \ - .xSize = sizeof(struct ItLpRegSave) \ - }, \ + EXTRA_INITS((number), (lpq)) \ } -struct paca_struct paca[] __page_aligned = { +struct paca_struct paca[] = { #ifdef CONFIG_PPC_ISERIES PACAINITDATA( 0, 1, &xItLpQueue, 0, STAB0_VIRT_ADDR), #else diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h index bba0775bb415..947191f3f47a 100644 --- a/include/asm-ppc64/paca.h +++ b/include/asm-ppc64/paca.h @@ -16,6 +16,7 @@ * 2 of the License, or (at your option) any later version. */ +#include <linux/config.h> #include <asm/types.h> #include <asm/iSeries/ItLpPaca.h> #include <asm/iSeries/ItLpRegSave.h> @@ -104,7 +105,9 @@ struct paca_struct { * The lppaca is also used on POWER5 pSeries boxes. */ struct ItLpPaca lppaca __attribute__((aligned(0x80))); +#ifdef CONFIG_PPC_ISERIES struct ItLpRegSave reg_save; +#endif }; #endif /* _PPC64_PACA_H */ |
