aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2008-06-23 21:33:05 -0400
committerPaul Mackerras <paulus@samba.org>2008-06-30 21:28:31 -0400
commitc230328def963373ec474056f372e1918692c3c8 (patch)
treeea582324a2026e6a00daa38cfd52eaacea43c938 /arch/powerpc
parent362e7701fd183d990e0863883461edef61392710 (diff)
powerpc: Use an alternative feature section in entry_64.S
Use an alternative feature section in _switch. There are three cases handled here, either we don't have an SLB, in which case we jump over the entire code section, or if we do we either do or don't have 1TB segments. Boot tested on Power3, Power5 and Power5+. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/entry_64.S12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index c0db5b769e55..6ca3044e2e32 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -383,16 +383,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
383 383
384 ld r8,KSP(r4) /* new stack pointer */ 384 ld r8,KSP(r4) /* new stack pointer */
385BEGIN_FTR_SECTION 385BEGIN_FTR_SECTION
386 b 2f 386 BEGIN_FTR_SECTION_NESTED(95)
387END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
388BEGIN_FTR_SECTION
389 clrrdi r6,r8,28 /* get its ESID */ 387 clrrdi r6,r8,28 /* get its ESID */
390 clrrdi r9,r1,28 /* get current sp ESID */ 388 clrrdi r9,r1,28 /* get current sp ESID */
391END_FTR_SECTION_IFCLR(CPU_FTR_1T_SEGMENT) 389 FTR_SECTION_ELSE_NESTED(95)
392BEGIN_FTR_SECTION
393 clrrdi r6,r8,40 /* get its 1T ESID */ 390 clrrdi r6,r8,40 /* get its 1T ESID */
394 clrrdi r9,r1,40 /* get current sp 1T ESID */ 391 clrrdi r9,r1,40 /* get current sp 1T ESID */
395END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) 392 ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_1T_SEGMENT, 95)
393FTR_SECTION_ELSE
394 b 2f
395ALT_FTR_SECTION_END_IFSET(CPU_FTR_SLB)
396 clrldi. r0,r6,2 /* is new ESID c00000000? */ 396 clrldi. r0,r6,2 /* is new ESID c00000000? */
397 cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */ 397 cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */
398 cror eq,4*cr1+eq,eq 398 cror eq,4*cr1+eq,eq