diff options
author | Michael Neuling <mikey@neuling.org> | 2006-08-09 03:00:30 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-24 23:17:08 -0400 |
commit | 11a27ad782fc7ae4b7d6ac8fefad4ceb415300d6 (patch) | |
tree | 10e3f8925e8b659a833017ceb674edbbe2fd3c82 | |
parent | 32bc6e095d75233e7c87cc6fa0e07942b124d194 (diff) |
[POWERPC] SLB shadow buffer cleanup
Cleanup some of the #define magic as suggested by Milton.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 13 |
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 2ef7ea860379..a2f95e467a75 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/lppaca.h> | 42 | #include <asm/lppaca.h> |
43 | #include <asm/cache.h> | 43 | #include <asm/cache.h> |
44 | #include <asm/compat.h> | 44 | #include <asm/compat.h> |
45 | #include <asm/mmu.h> | ||
45 | #endif | 46 | #endif |
46 | 47 | ||
47 | #define DEFINE(sym, val) \ | 48 | #define DEFINE(sym, val) \ |
@@ -137,6 +138,10 @@ int main(void) | |||
137 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); | 138 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); |
138 | DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); | 139 | DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); |
139 | 140 | ||
141 | DEFINE(SLBSHADOW_STACKVSID, | ||
142 | offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid)); | ||
143 | DEFINE(SLBSHADOW_STACKESID, | ||
144 | offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].esid)); | ||
140 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); | 145 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); |
141 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); | 146 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); |
142 | DEFINE(LPPACAANYINT, offsetof(struct lppaca, int_dword.any_int)); | 147 | 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 5baea498ea64..2cd872b5283b 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -323,11 +323,6 @@ _GLOBAL(ret_from_fork) | |||
323 | * The code which creates the new task context is in 'copy_thread' | 323 | * The code which creates the new task context is in 'copy_thread' |
324 | * in arch/powerpc/kernel/process.c | 324 | * in arch/powerpc/kernel/process.c |
325 | */ | 325 | */ |
326 | #define SHADOW_SLB_BOLTED_STACK_ESID \ | ||
327 | (SLBSHADOW_SAVEAREA + 0x10*(SLB_NUM_BOLTED-1)) | ||
328 | #define SHADOW_SLB_BOLTED_STACK_VSID \ | ||
329 | (SLBSHADOW_SAVEAREA + 0x10*(SLB_NUM_BOLTED-1) + 8) | ||
330 | |||
331 | .align 7 | 326 | .align 7 |
332 | _GLOBAL(_switch) | 327 | _GLOBAL(_switch) |
333 | mflr r0 | 328 | mflr r0 |
@@ -383,10 +378,10 @@ BEGIN_FTR_SECTION | |||
383 | 378 | ||
384 | /* Update the last bolted SLB */ | 379 | /* Update the last bolted SLB */ |
385 | ld r9,PACA_SLBSHADOWPTR(r13) | 380 | ld r9,PACA_SLBSHADOWPTR(r13) |
386 | li r12,0 | 381 | li r12,0 |
387 | std r12,SHADOW_SLB_BOLTED_STACK_ESID(r9) /* Clear ESID */ | 382 | std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ |
388 | std r7,SHADOW_SLB_BOLTED_STACK_VSID(r9) /* Save VSID */ | 383 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ |
389 | std r0,SHADOW_SLB_BOLTED_STACK_ESID(r9) /* Save ESID */ | 384 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ |
390 | 385 | ||
391 | slbie r6 | 386 | slbie r6 |
392 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ | 387 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ |