diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-07-06 15:13:10 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-07-06 19:58:54 +1000 |
commit | 1df3af6dc3cfe643f43d46f202bd44861ccbdb99 (patch) | |
tree | 46a015b251af77803cce529eb611b87744fe3da5 /arch | |
parent | 3f601608b71c3ca1e199898cd16f09d707fedb56 (diff) | |
download | lwn-1df3af6dc3cfe643f43d46f202bd44861ccbdb99.tar.gz lwn-1df3af6dc3cfe643f43d46f202bd44861ccbdb99.zip |
powerpc/64e: Fix system call illegal mtmsrd instruction
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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/interrupt_64.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/interrupt_64.S b/arch/powerpc/kernel/interrupt_64.S index 4063e8a3f704..d4212d2ff0b5 100644 --- a/arch/powerpc/kernel/interrupt_64.S +++ b/arch/powerpc/kernel/interrupt_64.S @@ -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 |