public inbox for linux-alpha@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alpha: Fix arch_irqs_disabled_flags() to handle intermediate IPL levels
@ 2026-04-03 15:01 Matt Turner
  2026-04-04  8:26 ` Magnus Lindholm
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Turner @ 2026-04-03 15:01 UTC (permalink / raw)
  To: Magnus Lindholm; +Cc: linux-alpha, linux-kernel, Matt Turner

arch_irqs_disabled_flags() only considered IRQs disabled when IPL was
at IPL_MAX (7). However, PALcode enters interrupt handlers at
intermediate IPL levels (e.g., IPL_DEV1=4, IPL_TIMER=5), which also
have interrupts disabled at that level and below.

This caused a lockdep warning when TRACE_IRQFLAGS_SUPPORT was enabled:
lockdep_hardirqs_off() calls irqs_disabled() inside an interrupt
handler and expects it to return true, but the intermediate IPL didn't
match the IPL_MAX check.

Fix by treating any IPL above IPL_MIN as interrupts disabled.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
 arch/alpha/include/asm/irqflags.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git ./arch/alpha/include/asm/irqflags.h ./arch/alpha/include/asm/irqflags.h
index 9f25d4e0d37e..80a01702b03a 100644
--- ./arch/alpha/include/asm/irqflags.h
+++ ./arch/alpha/include/asm/irqflags.h
@@ -57,7 +57,7 @@ static inline void arch_local_irq_restore(unsigned long flags)
 
 static inline bool arch_irqs_disabled_flags(unsigned long flags)
 {
-	return flags == IPL_MAX;
+	return (flags & 7) > IPL_MIN;
 }
 
 static inline bool arch_irqs_disabled(void)
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-04  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-03 15:01 [PATCH] alpha: Fix arch_irqs_disabled_flags() to handle intermediate IPL levels Matt Turner
2026-04-04  8:26 ` Magnus Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox