[PATCH] alpha: Fix arch_irqs_disabled_flags() to handle intermediate IPL levels
Matt Turner <[email protected]>
| Newsgroups | org.kernel.vger.linux-alpha,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- 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