[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <407f32f4cd6c96b1bb86c076e82e0ab31edf6d24.1574798487.git.msuchanek@suse.de>
Date: Tue, 26 Nov 2019 21:13:35 +0100
From: Michal Suchanek <msuchanek@...e.de>
To: linuxppc-dev@...ts.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Oleg Nesterov <oleg@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <christian@...uner.io>,
Nicholas Piggin <npiggin@...il.com>,
Allison Randal <allison@...utok.net>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Michal Suchanek <msuchanek@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Breno Leitao <leitao@...ian.org>,
Christophe Leroy <christophe.leroy@....fr>,
Claudio Carvalho <cclaudio@...ux.ibm.com>,
Russell Currey <ruscur@...sell.cc>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Firoz Khan <firoz.khan@...aro.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Hari Bathini <hbathini@...ux.ibm.com>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
Nicolai Stange <nstange@...e.de>,
Valentin Schneider <valentin.schneider@....com>,
Diana Craciun <diana.craciun@....com>,
Daniel Axtens <dja@...ens.net>,
Michael Neuling <mikey@...ling.org>,
Gustavo Romero <gromero@...ux.ibm.com>,
Mathieu Malaterre <malat@...ian.org>,
"Steven Rostedt" <rostedt@...dmis.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
David Howells <dhowells@...hat.com>,
Brajeswar Ghosh <brajeswar.linux@...il.com>,
Jagadeesh Pagadala <jagdsh.linux@...il.com>,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 21/35] powerpc/64s/exception: soft nmi interrupt should not use ret_from_except
From: Nicholas Piggin <npiggin@...il.com>
The soft nmi handler does not reconcile interrupt state, so it should
not return via the normal ret_from_except path. Return like other NMIs,
using the EXCEPTION_RESTORE_REGS macro.
This becomes important when the scv interrupt is implemented, which
must handle soft-masked interrupts that have r13 set to something other
than the PACA -- returning to kernel in this case must restore r13.
Signed-off-by: Nicholas Piggin <npiggin@...il.com>
---
arch/powerpc/kernel/exceptions-64s.S | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 38bc66b95516..af1264cd005f 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -2740,7 +2740,11 @@ EXC_COMMON_BEGIN(soft_nmi_common)
bl save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD
bl soft_nmi_interrupt
- b ret_from_except
+ /* Clear MSR_RI before setting SRR0 and SRR1. */
+ li r9,0
+ mtmsrd r9,1
+ EXCEPTION_RESTORE_REGS hsrr=0
+ RFI_TO_KERNEL
#endif /* CONFIG_PPC_WATCHDOG */
--
2.23.0
Powered by blists - more mailing lists