Skip to content

Commit dd152f7

Browse files
npigginmpe
authored andcommitted
powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE]
This extends the MSR[RI]=0 window a little further into the system call in order to pair RI and EE enabling with a single mtmsrd. Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e754f4d commit dd152f7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

arch/powerpc/kernel/exceptions-64s.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,8 +1861,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
18611861
mtctr r10
18621862
bctr
18631863
.else
1864-
li r10,MSR_RI
1865-
mtmsrd r10,1 /* Set RI (EE=0) */
18661864
#ifdef CONFIG_RELOCATABLE
18671865
__LOAD_HANDLER(r10, system_call_common)
18681866
mtctr r10

arch/powerpc/kernel/interrupt_64.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ END_BTB_FLUSH_SECTION
283283
* trace_hardirqs_off().
284284
*/
285285
li r11,IRQS_ALL_DISABLED
286-
li r12,PACA_IRQ_HARD_DIS
286+
li r12,-1 /* Set MSR_EE and MSR_RI */
287287
stb r11,PACAIRQSOFTMASK(r13)
288-
stb r12,PACAIRQHAPPENED(r13)
288+
mtmsrd r12,1
289289

290290
/* Calling convention has r9 = orig r0, r10 = regs */
291291
mr r9,r0

0 commit comments

Comments
 (0)