diff options
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 44c733f4f829..9ae8451bbc83 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -448,6 +448,19 @@ END_FTR_SECTION_IFSET(CPU_FTR_DSCR) | |||
448 | std r23,_CCR(r1) | 448 | std r23,_CCR(r1) |
449 | std r1,KSP(r3) /* Set old stack pointer */ | 449 | std r1,KSP(r3) /* Set old stack pointer */ |
450 | 450 | ||
451 | #ifdef CONFIG_PPC_BOOK3S_64 | ||
452 | BEGIN_FTR_SECTION | ||
453 | /* | ||
454 | * Back up the TAR across context switches. Note that the TAR is not | ||
455 | * available for use in the kernel. (To provide this, the TAR should | ||
456 | * be backed up/restored on exception entry/exit instead, and be in | ||
457 | * pt_regs. FIXME, this should be in pt_regs anyway (for debug).) | ||
458 | */ | ||
459 | mfspr r0,SPRN_TAR | ||
460 | std r0,THREAD_TAR(r3) | ||
461 | END_FTR_SECTION_IFSET(CPU_FTR_BCTAR) | ||
462 | #endif | ||
463 | |||
451 | #ifdef CONFIG_SMP | 464 | #ifdef CONFIG_SMP |
452 | /* We need a sync somewhere here to make sure that if the | 465 | /* We need a sync somewhere here to make sure that if the |
453 | * previous task gets rescheduled on another CPU, it sees all | 466 | * previous task gets rescheduled on another CPU, it sees all |
@@ -530,6 +543,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
530 | mr r1,r8 /* start using new stack pointer */ | 543 | mr r1,r8 /* start using new stack pointer */ |
531 | std r7,PACAKSAVE(r13) | 544 | std r7,PACAKSAVE(r13) |
532 | 545 | ||
546 | #ifdef CONFIG_PPC_BOOK3S_64 | ||
547 | BEGIN_FTR_SECTION | ||
548 | ld r0,THREAD_TAR(r4) | ||
549 | mtspr SPRN_TAR,r0 | ||
550 | END_FTR_SECTION_IFSET(CPU_FTR_BCTAR) | ||
551 | #endif | ||
552 | |||
533 | #ifdef CONFIG_ALTIVEC | 553 | #ifdef CONFIG_ALTIVEC |
534 | BEGIN_FTR_SECTION | 554 | BEGIN_FTR_SECTION |
535 | ld r0,THREAD_VRSAVE(r4) | 555 | ld r0,THREAD_VRSAVE(r4) |