diff options
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 952eba6701f4..0ec134034899 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -373,8 +373,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
373 | 373 | ||
374 | ld r8,KSP(r4) /* new stack pointer */ | 374 | ld r8,KSP(r4) /* new stack pointer */ |
375 | BEGIN_FTR_SECTION | 375 | BEGIN_FTR_SECTION |
376 | b 2f | ||
377 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | ||
378 | BEGIN_FTR_SECTION | ||
376 | clrrdi r6,r8,28 /* get its ESID */ | 379 | clrrdi r6,r8,28 /* get its ESID */ |
377 | clrrdi r9,r1,28 /* get current sp ESID */ | 380 | clrrdi r9,r1,28 /* get current sp ESID */ |
381 | END_FTR_SECTION_IFCLR(CPU_FTR_1T_SEGMENT) | ||
382 | BEGIN_FTR_SECTION | ||
383 | clrrdi r6,r8,40 /* get its 1T ESID */ | ||
384 | clrrdi r9,r1,40 /* get current sp 1T ESID */ | ||
385 | END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) | ||
378 | clrldi. r0,r6,2 /* is new ESID c00000000? */ | 386 | clrldi. r0,r6,2 /* is new ESID c00000000? */ |
379 | cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */ | 387 | cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */ |
380 | cror eq,4*cr1+eq,eq | 388 | cror eq,4*cr1+eq,eq |
@@ -384,16 +392,21 @@ BEGIN_FTR_SECTION | |||
384 | ld r7,KSP_VSID(r4) /* Get new stack's VSID */ | 392 | ld r7,KSP_VSID(r4) /* Get new stack's VSID */ |
385 | oris r0,r6,(SLB_ESID_V)@h | 393 | oris r0,r6,(SLB_ESID_V)@h |
386 | ori r0,r0,(SLB_NUM_BOLTED-1)@l | 394 | ori r0,r0,(SLB_NUM_BOLTED-1)@l |
387 | 395 | BEGIN_FTR_SECTION | |
388 | /* Update the last bolted SLB */ | 396 | li r9,MMU_SEGSIZE_1T /* insert B field */ |
397 | oris r6,r6,(MMU_SEGSIZE_1T << SLBIE_SSIZE_SHIFT)@h | ||
398 | rldimi r7,r9,SLB_VSID_SSIZE_SHIFT,0 | ||
399 | END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) | ||
400 | |||
401 | /* Update the last bolted SLB. No write barriers are needed | ||
402 | * here, provided we only update the current CPU's SLB shadow | ||
403 | * buffer. | ||
404 | */ | ||
389 | ld r9,PACA_SLBSHADOWPTR(r13) | 405 | ld r9,PACA_SLBSHADOWPTR(r13) |
390 | li r12,0 | 406 | li r12,0 |
391 | std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ | 407 | std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ |
392 | eieio | ||
393 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ | 408 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ |
394 | eieio | ||
395 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ | 409 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ |
396 | eieio | ||
397 | 410 | ||
398 | slbie r6 | 411 | slbie r6 |
399 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ | 412 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ |
@@ -401,7 +414,6 @@ BEGIN_FTR_SECTION | |||
401 | isync | 414 | isync |
402 | 415 | ||
403 | 2: | 416 | 2: |
404 | END_FTR_SECTION_IFSET(CPU_FTR_SLB) | ||
405 | clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ | 417 | clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ |
406 | /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE | 418 | /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE |
407 | because we don't need to leave the 288-byte ABI gap at the | 419 | because we don't need to leave the 288-byte ABI gap at the |