[PATCH 01/24] alpha: fix arch_irqs_disabled_flags() to treat any raised IPL as disabled
From: Matt Turner
Date: Tue Sep 01 2026 - 11:55:15 EST
arch_irqs_disabled_flags() only reported interrupts as disabled at
IPL_MAX, but the kernel is not the only thing that sets the IPL. PALcode
raises PS.IPL to the level of the interrupt being delivered before
entering the handler, so a handler entered for a device interrupt runs at
IPL_DEV0 or IPL_DEV1, and the timer at IPL_TIMER. Interrupts at and
below that level are blocked, but arch_irqs_disabled() answered that
interrupts were enabled.
Treat any IPL above IPL_MIN, the level arch_local_irq_enable() restores,
as interrupts disabled. This matters as soon as lockdep is asked to
track hardirq state, where irqs_disabled() is expected to be true inside
an interrupt handler.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>
---
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 f207544f52de..ebbf5801f7a5 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 & 7) == IPL_MAX;
+ return (flags & 7) > IPL_MIN;
}
static inline bool arch_irqs_disabled(void)
--
2.54.0