[patch 02/52] genirq/debugfs: Show debug information for all irq descriptors

Thomas Gleixner
2017-09-13T21:48:09Z

[-- Attachment #1: genirq-debugfs--Show-debug-information-for-all-irq-descriptors.patch --]
[-- Type: text/plain, Size: 1132 bytes --]

Currently the debugfs shows only information about actively used interrupts
like /proc/irq/ does. That's fine for most cases, but not helpful when
internals of allocated, but unused interrupt descriptors have to
debugged. It's also useful to provide information about all descriptors so
leaks can be debugged in a simpler way.

Move the debugfs registration to the descriptor allocation code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/irqdesc.c | 1 +
kernel/irq/manage.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -462,6 +462,7 @@ static int alloc_descs(unsigned int star
goto err;
irq_insert_desc(start + i, desc);
irq_sysfs_add(start + i, desc);
+ irq_add_debugfs_entry(start + i, desc);
}
bitmap_set(allocated_irqs, start, cnt);
return start;
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1400,7 +1400,6 @@ static int
wake_up_process(new->secondary->thread);

register_irq_proc(irq, desc);
- irq_add_debugfs_entry(irq, desc);
new->dir = NULL;
register_handler_proc(irq, new);
return 0;