From: Michael Neuling Date: Wed, 9 Aug 2006 07:00:30 +0000 (+1000) Subject: [POWERPC] SLB shadow buffer cleanup X-Git-Tag: v2.6.19-rc1~1300^2~56 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=11a27ad782fc7ae4b7d6ac8fefad4ceb415300d6;p=linux-2.6-omap-h63xx.git [POWERPC] SLB shadow buffer cleanup Cleanup some of the #define magic as suggested by Milton. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 2ef7ea86037..a2f95e467a7 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -42,6 +42,7 @@ #include #include #include +#include #endif #define DEFINE(sym, val) \ @@ -137,6 +138,10 @@ int main(void) DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); + DEFINE(SLBSHADOW_STACKVSID, + offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid)); + DEFINE(SLBSHADOW_STACKESID, + offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].esid)); DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); DEFINE(LPPACAANYINT, offsetof(struct lppaca, int_dword.any_int)); diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 5baea498ea6..2cd872b5283 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -323,11 +323,6 @@ _GLOBAL(ret_from_fork) * The code which creates the new task context is in 'copy_thread' * in arch/powerpc/kernel/process.c */ -#define SHADOW_SLB_BOLTED_STACK_ESID \ - (SLBSHADOW_SAVEAREA + 0x10*(SLB_NUM_BOLTED-1)) -#define SHADOW_SLB_BOLTED_STACK_VSID \ - (SLBSHADOW_SAVEAREA + 0x10*(SLB_NUM_BOLTED-1) + 8) - .align 7 _GLOBAL(_switch) mflr r0 @@ -383,10 +378,10 @@ BEGIN_FTR_SECTION /* Update the last bolted SLB */ ld r9,PACA_SLBSHADOWPTR(r13) - li r12,0 - std r12,SHADOW_SLB_BOLTED_STACK_ESID(r9) /* Clear ESID */ - std r7,SHADOW_SLB_BOLTED_STACK_VSID(r9) /* Save VSID */ - std r0,SHADOW_SLB_BOLTED_STACK_ESID(r9) /* Save ESID */ + li r12,0 + std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ + std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ + std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ slbie r6 slbie r6 /* Workaround POWER5 < DD2.1 issue */