public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq/debugfs: Use irq_print_chip() when provided by irqchip
@ 2022-02-15 11:21 Marc Zyngier
  2022-02-15 12:20 ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Zyngier @ 2022-02-15 11:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Thomas Gleixner

Since irqchips have the option to implement irq_print_chip, use this
when available to output the irqchip name in debugfs.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---

Notes:
    I plan to take this into 5.18 as part of this[1] series.
    
    [1] https://lore.kernel.org/all/20220209162607.1118325-1-maz@kernel.org

 kernel/irq/debugfs.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c
index e4cff358b437..2b43f5f5033d 100644
--- a/kernel/irq/debugfs.c
+++ b/kernel/irq/debugfs.c
@@ -69,8 +69,12 @@ irq_debug_show_chip(struct seq_file *m, struct irq_data *data, int ind)
 		seq_printf(m, "chip: None\n");
 		return;
 	}
-	seq_printf(m, "%*schip:    %s\n", ind, "", chip->name);
-	seq_printf(m, "%*sflags:   0x%lx\n", ind + 1, "", chip->flags);
+	seq_printf(m, "%*schip:    ", ind, "");
+	if (chip->irq_print_chip)
+		chip->irq_print_chip(data, m);
+	else
+		seq_printf(m, "%s", chip->name);
+	seq_printf(m, "\n%*sflags:   0x%lx\n", ind + 1, "", chip->flags);
 	irq_debug_show_bits(m, ind, chip->flags, irqchip_flags,
 			    ARRAY_SIZE(irqchip_flags));
 }
-- 
2.34.1


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

* [irqchip: irq/irqchip-next] genirq/debugfs: Use irq_print_chip() when provided by irqchip
  2022-02-15 11:21 [PATCH] genirq/debugfs: Use irq_print_chip() when provided by irqchip Marc Zyngier
@ 2022-02-15 12:20 ` irqchip-bot for Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-15 12:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     0a25cb5544f4f01d2e7c06164555fd9cd6eb64fd
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/0a25cb5544f4f01d2e7c06164555fd9cd6eb64fd
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Thu, 10 Feb 2022 09:27:21 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Tue, 15 Feb 2022 11:22:34 

genirq/debugfs: Use irq_print_chip() when provided by irqchip

Since irqchips have the option to implement irq_print_chip, use this
when available to output the irqchip name in debugfs.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220215112154.1360040-1-maz@kernel.org
---
 kernel/irq/debugfs.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c
index e4cff35..2b43f5f 100644
--- a/kernel/irq/debugfs.c
+++ b/kernel/irq/debugfs.c
@@ -69,8 +69,12 @@ irq_debug_show_chip(struct seq_file *m, struct irq_data *data, int ind)
 		seq_printf(m, "chip: None\n");
 		return;
 	}
-	seq_printf(m, "%*schip:    %s\n", ind, "", chip->name);
-	seq_printf(m, "%*sflags:   0x%lx\n", ind + 1, "", chip->flags);
+	seq_printf(m, "%*schip:    ", ind, "");
+	if (chip->irq_print_chip)
+		chip->irq_print_chip(data, m);
+	else
+		seq_printf(m, "%s", chip->name);
+	seq_printf(m, "\n%*sflags:   0x%lx\n", ind + 1, "", chip->flags);
 	irq_debug_show_bits(m, ind, chip->flags, irqchip_flags,
 			    ARRAY_SIZE(irqchip_flags));
 }

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

end of thread, other threads:[~2022-02-15 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-15 11:21 [PATCH] genirq/debugfs: Use irq_print_chip() when provided by irqchip Marc Zyngier
2022-02-15 12:20 ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier

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