Commit f50dda06 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 957ec2fa
......@@ -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
......
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment