genirq/debugfs: Use irq_print_chip() when provided by irqchip
PATCH 1/1 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 <[email protected]>
---
Notes:
I plan to take this into 5.18 as part of this[1] series.
[1] https://lore.kernel.org/all/[email protected]
kernel/irq/debugfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/irq/debugfs.c +6 -2
@@ -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)); }
Signature · 1 line
2.34.1
The following commit has been merged into the irq/irqchip-next branch of irqchip:
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 <[email protected]> AuthorDate: Thu, 10 Feb 2022 09:27:21 Committer: Marc Zyngier <[email protected]> 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 <[email protected]>
--- kernel/irq/debugfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/irq/debugfs.c +6 -2
@@ -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)); }