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 <marc.zyngier@arm.com> Link: http://lkml.kernel.org/r/20170512115538.10767-3-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
fe17a42e70
commit
2370c00dc7
|
@ -801,15 +801,26 @@ static int virq_debug_show(struct seq_file *m, void *private)
|
||||||
mutex_lock(&irq_domain_mutex);
|
mutex_lock(&irq_domain_mutex);
|
||||||
list_for_each_entry(domain, &irq_domain_list, link) {
|
list_for_each_entry(domain, &irq_domain_list, link) {
|
||||||
struct device_node *of_node;
|
struct device_node *of_node;
|
||||||
|
const char *name;
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
of_node = irq_domain_get_of_node(domain);
|
of_node = irq_domain_get_of_node(domain);
|
||||||
|
if (of_node)
|
||||||
|
name = of_node_full_name(of_node);
|
||||||
|
else if (is_fwnode_irqchip(domain->fwnode))
|
||||||
|
name = container_of(domain->fwnode, struct irqchip_fwid,
|
||||||
|
fwnode)->name;
|
||||||
|
else
|
||||||
|
name = "";
|
||||||
|
|
||||||
radix_tree_for_each_slot(slot, &domain->revmap_tree, &iter, 0)
|
radix_tree_for_each_slot(slot, &domain->revmap_tree, &iter, 0)
|
||||||
count++;
|
count++;
|
||||||
seq_printf(m, "%c%-16s %6u %10u %10u %s\n",
|
seq_printf(m, "%c%-16s %6u %10u %10u %s\n",
|
||||||
domain == irq_default_domain ? '*' : ' ', domain->name,
|
domain == irq_default_domain ? '*' : ' ', domain->name,
|
||||||
domain->revmap_size + count, domain->revmap_size,
|
domain->revmap_size + count, domain->revmap_size,
|
||||||
domain->revmap_direct_max_irq,
|
domain->revmap_direct_max_irq,
|
||||||
of_node ? of_node_full_name(of_node) : "");
|
name);
|
||||||
}
|
}
|
||||||
mutex_unlock(&irq_domain_mutex);
|
mutex_unlock(&irq_domain_mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue