* [PATCH v2] irq/debug: implement missing FIXME in print_irq_desc()
@ 2026-09-04 12:51 yangfeng
0 siblings, 0 replies; only message in thread
From: yangfeng @ 2026-09-04 12:51 UTC (permalink / raw)
To: tglx; +Cc: radu, linux-kernel, yangfeng
The original code ___PD(f) left a FIXME, so fix it.
The maximum length of a macro is 19, so modify the printk() from 14 to 20.
Signed-off-by: Yang Feng <yangfeng.lucky@gmail.com>
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 8ccb326d2977..451439135bed 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 0ce21dd45404..43fe07a25b66 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -77,6 +77,8 @@ enum {
IRQS_SYSFS = 0x00004000,
};
+#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
+
#include "debug.h"
#include "settings.h"
@@ -215,8 +217,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);
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-04 12:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04 12:51 [PATCH v2] irq/debug: implement missing FIXME in print_irq_desc() yangfeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®