]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
powerpc/64e: Fix system call illegal mtmsrd instruction
authorNicholas Piggin <npiggin@gmail.com>
Tue, 6 Jul 2021 05:13:10 +0000 (15:13 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 6 Jul 2021 09:58:54 +0000 (19:58 +1000)
BookE does not have mtmsrd, switch to use wrteei to enable MSR[EE].

Fixes: dd152f70bdc1 ("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
arch/powerpc/kernel/interrupt_64.S

index 4063e8a3f70412503731ac5bdb62e6b63c017f55..d4212d2ff0b54bc64b3167c8e2b34120d08eb70e 100644 (file)
@@ -311,9 +311,13 @@ END_BTB_FLUSH_SECTION
         * trace_hardirqs_off().
         */
        li      r11,IRQS_ALL_DISABLED
-       li      r12,-1 /* Set MSR_EE and MSR_RI */
        stb     r11,PACAIRQSOFTMASK(r13)
+#ifdef CONFIG_PPC_BOOK3S
+       li      r12,-1 /* Set MSR_EE and MSR_RI */
        mtmsrd  r12,1
+#else
+       wrteei  1
+#endif
 
        /* Calling convention has r9 = orig r0, r10 = regs */
        mr      r9,r0