* [PATCH] irq/generic-chip: fix the irq_chip name for /proc/interrupts
@ 2023-09-25 12:17 Keguang Zhang
2023-10-13 10:31 ` [tip: irq/core] genirq/generic-chip: Fix " tip-bot2 for Keguang Zhang
0 siblings, 1 reply; 2+ messages in thread
From: Keguang Zhang @ 2023-09-25 12:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Gleixner, Keguang Zhang
irq_init_generic_chip() only sets name for the first chip type,
which will lead to empty names for other chip types.
Eventually, these names will be shown as "-" /proc/interrupts.
This patch sets name for all chip types by default.
Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
---
kernel/irq/generic-chip.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index c653cd31548d..81ecca08caad 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -219,11 +219,15 @@ void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
int num_ct, unsigned int irq_base,
void __iomem *reg_base, irq_flow_handler_t handler)
{
+ struct irq_chip_type *ct = gc->chip_types;
+ int i;
+
raw_spin_lock_init(&gc->lock);
gc->num_ct = num_ct;
gc->irq_base = irq_base;
gc->reg_base = reg_base;
- gc->chip_types->chip.name = name;
+ for (i = 0; i < num_ct; i++)
+ ct[i].chip.name = name;
gc->chip_types->handler = handler;
}
base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip: irq/core] genirq/generic-chip: Fix the irq_chip name for /proc/interrupts
2023-09-25 12:17 [PATCH] irq/generic-chip: fix the irq_chip name for /proc/interrupts Keguang Zhang
@ 2023-10-13 10:31 ` tip-bot2 for Keguang Zhang
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Keguang Zhang @ 2023-10-13 10:31 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Keguang Zhang, Thomas Gleixner, x86, linux-kernel, maz
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 021a8ca2ba23c01487a98ad23b68ac062e14cf32
Gitweb: https://git.kernel.org/tip/021a8ca2ba23c01487a98ad23b68ac062e14cf32
Author: Keguang Zhang <keguang.zhang@gmail.com>
AuthorDate: Mon, 25 Sep 2023 20:17:34 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 13 Oct 2023 12:25:31 +02:00
genirq/generic-chip: Fix the irq_chip name for /proc/interrupts
irq_init_generic_chip() only sets the name for the first chip type, which
leads to empty names for other chip types. Eventually, these names will be
shown as "-" /proc/interrupts.
Set the name for all chip types by default.
Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230925121734.93017-1-keguang.zhang@gmail.com
---
kernel/irq/generic-chip.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index c653cd3..81ecca0 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -219,11 +219,15 @@ void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
int num_ct, unsigned int irq_base,
void __iomem *reg_base, irq_flow_handler_t handler)
{
+ struct irq_chip_type *ct = gc->chip_types;
+ int i;
+
raw_spin_lock_init(&gc->lock);
gc->num_ct = num_ct;
gc->irq_base = irq_base;
gc->reg_base = reg_base;
- gc->chip_types->chip.name = name;
+ for (i = 0; i < num_ct; i++)
+ ct[i].chip.name = name;
gc->chip_types->handler = handler;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-13 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 12:17 [PATCH] irq/generic-chip: fix the irq_chip name for /proc/interrupts Keguang Zhang
2023-10-13 10:31 ` [tip: irq/core] genirq/generic-chip: Fix " tip-bot2 for Keguang Zhang
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®