Skip to content

Commit 1df3af6

Browse files
npigginmpe
authored andcommitted
powerpc/64e: Fix system call illegal mtmsrd instruction
BookE does not have mtmsrd, switch to use wrteei to enable MSR[EE]. Fixes: dd152f7 ("powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE]") Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210706051310.608992-1-npiggin@gmail.com
1 parent 3f60160 commit 1df3af6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/powerpc/kernel/interrupt_64.S

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,13 @@ END_BTB_FLUSH_SECTION
311311
* trace_hardirqs_off().
312312
*/
313313
li r11,IRQS_ALL_DISABLED
314-
li r12,-1 /* Set MSR_EE and MSR_RI */
315314
stb r11,PACAIRQSOFTMASK(r13)
315+
#ifdef CONFIG_PPC_BOOK3S
316+
li r12,-1 /* Set MSR_EE and MSR_RI */
316317
mtmsrd r12,1
318+
#else
319+
wrteei 1
320+
#endif
317321

318322
/* Calling convention has r9 = orig r0, r10 = regs */
319323
mr r9,r0

0 commit comments

Comments
 (0)