|
@@ -818,6 +818,12 @@ fast_exception_return:
|
|
andi. r0,r3,MSR_RI
|
|
andi. r0,r3,MSR_RI
|
|
beq- unrecov_restore
|
|
beq- unrecov_restore
|
|
|
|
|
|
|
|
+ /* Load PPR from thread struct before we clear MSR:RI */
|
|
|
|
+BEGIN_FTR_SECTION
|
|
|
|
+ ld r2,PACACURRENT(r13)
|
|
|
|
+ ld r2,TASKTHREADPPR(r2)
|
|
|
|
+END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Clear RI before restoring r13. If we are returning to
|
|
* Clear RI before restoring r13. If we are returning to
|
|
* userspace and we take an exception after restoring r13,
|
|
* userspace and we take an exception after restoring r13,
|
|
@@ -838,8 +844,10 @@ fast_exception_return:
|
|
*/
|
|
*/
|
|
andi. r0,r3,MSR_PR
|
|
andi. r0,r3,MSR_PR
|
|
beq 1f
|
|
beq 1f
|
|
|
|
+BEGIN_FTR_SECTION
|
|
|
|
+ mtspr SPRN_PPR,r2 /* Restore PPR */
|
|
|
|
+END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
|
|
ACCOUNT_CPU_USER_EXIT(r2, r4)
|
|
ACCOUNT_CPU_USER_EXIT(r2, r4)
|
|
- RESTORE_PPR(r2, r4)
|
|
|
|
REST_GPR(13, r1)
|
|
REST_GPR(13, r1)
|
|
1:
|
|
1:
|
|
mtspr SPRN_SRR1,r3
|
|
mtspr SPRN_SRR1,r3
|