[tip: irq/core] genirq/debug: Re-implement flags printks in print_irq_desc()
From: tip-bot2 for yangfeng
Date: Sun Nov 08 2026 - 11:44:24 EST
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 403e2849fb51a1b8ca06a5fe70d75ee635d79520
Gitweb: https://git.kernel.org/tip/403e2849fb51a1b8ca06a5fe70d75ee635d79520
Author: yangfeng <yangfeng.lucky@xxxxxxxxx>
AuthorDate: Fri, 04 Sep 2026 21:51:17 +09:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Sun, 08 Nov 2026 17:39:43 +01:00
genirq/debug: Re-implement flags printks in print_irq_desc()
When the INPROGRESS/DISABLED/MASKED flags where moved from the interrupt
descriptor state to irq_desc::irq_data the related debug printks were
disabled and not fixed up.
Re-implement them so the state printouts are complete.
Signed-off-by: Yang Feng <yangfeng.lucky@xxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20260904125205.15311-1-yangfeng.lucky@xxxxxxxxx
v2:
- Implement missing FIXME in ___PD() with __irqd_to_state
- move the define of __irqd_to_state before "include debug.h" in internals.h
- Adjust printk() width from 14 to 20
- Use full legal name in Signed-off-by
- Rebase to latest master
---
kernel/irq/debug.h | 13 ++++++-------
kernel/irq/internals.h | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h
index 8ccb326..4514391 100644
--- a/kernel/irq/debug.h
+++ b/kernel/irq/debug.h
@@ -3,10 +3,9 @@
* Debugging printout:
*/
-#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
-#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
-/* FIXME */
-#define ___PD(f) do { } while (0)
+#define ___P(f) if (desc->status_use_accessors & f) printk("%20s set\n", #f)
+#define ___PS(f) if (desc->istate & f) printk("%20s set\n", #f)
+#define ___PD(f) if (__irqd_to_state(&(desc->irq_data)) & f) printk("%20s set\n", #f)
static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
{
@@ -39,9 +38,9 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
___PS(IRQS_WAITING);
___PS(IRQS_PENDING);
- ___PD(IRQS_INPROGRESS);
- ___PD(IRQS_DISABLED);
- ___PD(IRQS_MASKED);
+ ___PD(IRQD_IRQ_INPROGRESS);
+ ___PD(IRQD_IRQ_DISABLED);
+ ___PD(IRQD_IRQ_MASKED);
}
#undef ___P
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 703a062..daa1507 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -79,6 +79,8 @@ enum {
IRQS_SYSFS = 0x00004000,
};
+#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
+
#include "debug.h"
#include "settings.h"
@@ -218,8 +220,6 @@ static inline class_irqdesc_lock_t class_irqdesc_lock_constructor(unsigned int i
#define scoped_irqdesc ((struct irq_desc *)(__guard_ptr(irqdesc_lock)(&scope)))
-#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
-
static inline unsigned int irqd_get(struct irq_data *d)
{
return __irqd_to_state(d);