From: Anton Blanchard 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 Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/pacaData.c | 23 +++++++++++++++-------- 25-akpm/include/asm-ppc64/paca.h | 3 +++ 2 files changed, 18 insertions(+), 8 deletions(-) diff -puN arch/ppc64/kernel/pacaData.c~ppc64-cut-down-paca-footprint arch/ppc64/kernel/pacaData.c --- 25/arch/ppc64/kernel/pacaData.c~ppc64-cut-down-paca-footprint 2004-09-06 01:32:51.615554512 -0700 +++ 25-akpm/arch/ppc64/kernel/pacaData.c 2004-09-06 01:32:51.620553752 -0700 @@ -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 -puN include/asm-ppc64/paca.h~ppc64-cut-down-paca-footprint include/asm-ppc64/paca.h --- 25/include/asm-ppc64/paca.h~ppc64-cut-down-paca-footprint 2004-09-06 01:32:51.616554360 -0700 +++ 25-akpm/include/asm-ppc64/paca.h 2004-09-06 01:32:51.621553600 -0700 @@ -16,6 +16,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -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 */ _