aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/tm.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/tm.S')
-rw-r--r--arch/powerpc/kernel/tm.S18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/tm.S b/arch/powerpc/kernel/tm.S
index 2da67e7a16d5..51be8fb24803 100644
--- a/arch/powerpc/kernel/tm.S
+++ b/arch/powerpc/kernel/tm.S
@@ -112,9 +112,18 @@ _GLOBAL(tm_reclaim)
112 std r3, STACK_PARAM(0)(r1) 112 std r3, STACK_PARAM(0)(r1)
113 SAVE_NVGPRS(r1) 113 SAVE_NVGPRS(r1)
114 114
115 /* We need to setup MSR for VSX register save instructions. Here we
116 * also clear the MSR RI since when we do the treclaim, we won't have a
117 * valid kernel pointer for a while. We clear RI here as it avoids
118 * adding another mtmsr closer to the treclaim. This makes the region
119 * maked as non-recoverable wider than it needs to be but it saves on
120 * inserting another mtmsrd later.
121 */
115 mfmsr r14 122 mfmsr r14
116 mr r15, r14 123 mr r15, r14
117 ori r15, r15, MSR_FP 124 ori r15, r15, MSR_FP
125 li r16, MSR_RI
126 andc r15, r15, r16
118 oris r15, r15, MSR_VEC@h 127 oris r15, r15, MSR_VEC@h
119#ifdef CONFIG_VSX 128#ifdef CONFIG_VSX
120 BEGIN_FTR_SECTION 129 BEGIN_FTR_SECTION
@@ -349,9 +358,10 @@ restore_gprs:
349 mtcr r5 358 mtcr r5
350 mtxer r6 359 mtxer r6
351 360
352 /* MSR and flags: We don't change CRs, and we don't need to alter 361 /* Clear the MSR RI since we are about to change R1. EE is already off
353 * MSR.
354 */ 362 */
363 li r4, 0
364 mtmsrd r4, 1
355 365
356 REST_4GPRS(0, r7) /* GPR0-3 */ 366 REST_4GPRS(0, r7) /* GPR0-3 */
357 REST_GPR(4, r7) /* GPR4-6 */ 367 REST_GPR(4, r7) /* GPR4-6 */
@@ -377,6 +387,10 @@ restore_gprs:
377 GET_PACA(r13) 387 GET_PACA(r13)
378 GET_SCRATCH0(r1) 388 GET_SCRATCH0(r1)
379 389
390 /* R1 is restored, so we are recoverable again. EE is still off */
391 li r4, MSR_RI
392 mtmsrd r4, 1
393
380 REST_NVGPRS(r1) 394 REST_NVGPRS(r1)
381 395
382 addi r1, r1, TM_FRAME_SIZE 396 addi r1, r1, TM_FRAME_SIZE