Skip to content

Commit 2370c00

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
irqdomain: Let irq_domain_mapping display ACPI fwnode attributes
If the system is using ACPI, there is no of_node to display. But ACPI can use a struct irqchip_fwid as a domain identifier, and it can be used to display the name contained in that structure. The output on such a system will look like this: pMSI 0 0 0 irqchip@00000000e1180000 MSI 37 0 0 irqchip@00000000e1180000 GICv2m 37 0 0 irqchip@00000000e1180000 GICv2 448 448 0 irqchip@ffff000008003000 Signed-off-by: Marc Zyngier <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent fe17a42 commit 2370c00

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

kernel/irq/irqdomain.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,15 +801,26 @@ static int virq_debug_show(struct seq_file *m, void *private)
801801
mutex_lock(&irq_domain_mutex);
802802
list_for_each_entry(domain, &irq_domain_list, link) {
803803
struct device_node *of_node;
804+
const char *name;
805+
804806
int count = 0;
807+
805808
of_node = irq_domain_get_of_node(domain);
809+
if (of_node)
810+
name = of_node_full_name(of_node);
811+
else if (is_fwnode_irqchip(domain->fwnode))
812+
name = container_of(domain->fwnode, struct irqchip_fwid,
813+
fwnode)->name;
814+
else
815+
name = "";
816+
806817
radix_tree_for_each_slot(slot, &domain->revmap_tree, &iter, 0)
807818
count++;
808819
seq_printf(m, "%c%-16s %6u %10u %10u %s\n",
809820
domain == irq_default_domain ? '*' : ' ', domain->name,
810821
domain->revmap_size + count, domain->revmap_size,
811822
domain->revmap_direct_max_irq,
812-
of_node ? of_node_full_name(of_node) : "");
823+
name);
813824
}
814825
mutex_unlock(&irq_domain_mutex);
815826

0 commit comments

Comments
 (0)