projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9524f22
)
powerpc/64s/interrupt: masked handler debug check for previous hard disable
author
Nicholas Piggin
<npiggin@gmail.com>
Mon, 26 Sep 2022 05:43:03 +0000
(15:43 +1000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:11 +0000
(19:22 +1000)
Prior changes eliminated cases of masked PACA_IRQ_MUST_HARD_MASK
interrupts that re-fire due to MSR[EE] being enabled while they are
pending. Add a debug check in the masked interrupt handler to catch
if this occurs.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/20220926054305.2671436-6-npiggin@gmail.com
arch/powerpc/kernel/exceptions-64s.S
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index a3b51441b039f237e89cd110945ee0ca5db0f42f..43e538502f523c9cd129ec066b4d632f757cc91b 100644
(file)
--- a/
arch/powerpc/kernel/exceptions-64s.S
+++ b/
arch/powerpc/kernel/exceptions-64s.S
@@
-2794,6
+2794,16
@@
masked_Hinterrupt:
masked_interrupt:
.endif
stw r9,PACA_EXGEN+EX_CCR(r13)
+#ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG
+ /*
+ * Ensure there was no previous MUST_HARD_MASK interrupt or
+ * HARD_DIS setting.
+ */
+ lbz r9,PACAIRQHAPPENED(r13)
+ andi. r9,r9,(PACA_IRQ_MUST_HARD_MASK|PACA_IRQ_HARD_DIS)
+0: tdnei r9,0
+ EMIT_BUG_ENTRY 0b,__FILE__,__LINE__,0
+#endif
lbz r9,PACAIRQHAPPENED(r13)
or r9,r9,r10
stb r9,PACAIRQHAPPENED(r13)