aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2013-06-06 17:20:44 -0400
committerGrant Likely <grant.likely@linaro.org>2013-06-10 06:52:09 -0400
commit1400ea86025a22862f97e7fe544433751b43ecec (patch)
treed7ce4026f1cfb9472631e286a176f9b5ae7ff6f6 /kernel/irq
parentfa40f377577752b83252b9d2b3165d4acee0eb7c (diff)
irqdomain: Beef up debugfs output
This patch increases the amount of output produced by the irq_domain_mapping debugfs file by first listing all of the registered irq domains at the beginning of the output, and then by including all mapped IRQs in the output, not just the active ones. It is very useful when debugging irqdomain issues to be able to see the entire list of mapped irqs, not just the ones that happen to be connected to devices. Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/irqdomain.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index e0db59e2eef6..280b8047d8db 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -596,12 +596,29 @@ static int virq_debug_show(struct seq_file *m, void *private)
596{ 596{
597 unsigned long flags; 597 unsigned long flags;
598 struct irq_desc *desc; 598 struct irq_desc *desc;
599 void *data; 599 struct irq_domain *domain;
600 struct radix_tree_iter iter;
601 void *data, **slot;
600 int i; 602 int i;
601 603
602 seq_printf(m, "%-5s %-7s %-15s %-*s %s\n", "irq", "hwirq", 604 seq_printf(m, " %-16s %-6s %-10s %-10s %s\n",
605 "name", "mapped", "linear-max", "direct-max", "devtree-node");
606 mutex_lock(&irq_domain_mutex);
607 list_for_each_entry(domain, &irq_domain_list, link) {
608 int count = 0;
609 radix_tree_for_each_slot(slot, &domain->revmap_tree, &iter, 0)
610 count++;
611 seq_printf(m, "%c%-16s %6u %10u %10u %s\n",
612 domain == irq_default_domain ? '*' : ' ', domain->name,
613 domain->revmap_size + count, domain->revmap_size,
614 domain->revmap_direct_max_irq,
615 domain->of_node ? of_node_full_name(domain->of_node) : "");
616 }
617 mutex_unlock(&irq_domain_mutex);
618
619 seq_printf(m, "%-5s %-7s %-15s %-*s %6s %-14s %s\n", "irq", "hwirq",
603 "chip name", (int)(2 * sizeof(void *) + 2), "chip data", 620 "chip name", (int)(2 * sizeof(void *) + 2), "chip data",
604 "domain name"); 621 "active", "type", "domain");
605 622
606 for (i = 1; i < nr_irqs; i++) { 623 for (i = 1; i < nr_irqs; i++) {
607 desc = irq_to_desc(i); 624 desc = irq_to_desc(i);
@@ -609,12 +626,15 @@ static int virq_debug_show(struct seq_file *m, void *private)
609 continue; 626 continue;
610 627
611 raw_spin_lock_irqsave(&desc->lock, flags); 628 raw_spin_lock_irqsave(&desc->lock, flags);
629 domain = desc->irq_data.domain;
612 630
613 if (desc->action && desc->action->handler) { 631 if (domain) {
614 struct irq_chip *chip; 632 struct irq_chip *chip;
633 int hwirq = desc->irq_data.hwirq;
634 bool direct;
615 635
616 seq_printf(m, "%5d ", i); 636 seq_printf(m, "%5d ", i);
617 seq_printf(m, "0x%05lx ", desc->irq_data.hwirq); 637 seq_printf(m, "0x%05x ", hwirq);
618 638
619 chip = irq_desc_get_chip(desc); 639 chip = irq_desc_get_chip(desc);
620 seq_printf(m, "%-15s ", (chip && chip->name) ? chip->name : "none"); 640 seq_printf(m, "%-15s ", (chip && chip->name) ? chip->name : "none");
@@ -622,6 +642,11 @@ static int virq_debug_show(struct seq_file *m, void *private)
622 data = irq_desc_get_chip_data(desc); 642 data = irq_desc_get_chip_data(desc);
623 seq_printf(m, data ? "0x%p " : " %p ", data); 643 seq_printf(m, data ? "0x%p " : " %p ", data);
624 644
645 seq_printf(m, " %c ", (desc->action && desc->action->handler) ? '*' : ' ');
646 direct = (i == hwirq) && (i < domain->revmap_direct_max_irq);
647 seq_printf(m, "%6s%-8s ",
648 (hwirq < domain->revmap_size) ? "LINEAR" : "RADIX",
649 direct ? "(DIRECT)" : "");
625 seq_printf(m, "%s\n", desc->irq_data.domain->name); 650 seq_printf(m, "%s\n", desc->irq_data.domain->name);
626 } 651 }
627 652