Skip to content

Commit 8154850

Browse files
npigginmpe
authored andcommitted
powerpc/64s/interrupt: Change must-hard-mask interrupt check from BUG to WARN
This new assertion added is generally harmless and gets fixed up naturally, but it does indicate a problem with MSR manipulation somewhere. Fixes: c39fb71 ("powerpc/64s/interrupt: masked handler debug check for previous hard disable") Reported-by: Sachin Sant <[email protected]> Signed-off-by: Nicholas Piggin <[email protected]> Tested-by: Sachin Sant <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8535a1a commit 8154850

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arch/powerpc/kernel/exceptions-64s.S

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,12 +2823,16 @@ masked_interrupt:
28232823
#ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG
28242824
/*
28252825
* Ensure there was no previous MUST_HARD_MASK interrupt or
2826-
* HARD_DIS setting.
2826+
* HARD_DIS setting. If this does fire, the interrupt is still
2827+
* masked and MSR[EE] will be cleared on return, so no need to
2828+
* panic, but somebody probably enabled MSR[EE] under
2829+
* PACA_IRQ_HARD_DIS, mtmsr(mfmsr() | MSR_x) being a common
2830+
* cause.
28272831
*/
28282832
lbz r9,PACAIRQHAPPENED(r13)
28292833
andi. r9,r9,(PACA_IRQ_MUST_HARD_MASK|PACA_IRQ_HARD_DIS)
28302834
0: tdnei r9,0
2831-
EMIT_BUG_ENTRY 0b,__FILE__,__LINE__,0
2835+
EMIT_WARN_ENTRY 0b,__FILE__,__LINE__,(BUGFLAG_WARNING | BUGFLAG_ONCE)
28322836
#endif
28332837
lbz r9,PACAIRQHAPPENED(r13)
28342838
or r9,r9,r10

0 commit comments

Comments
 (0)