From: tip-bot for Marc Zyngier <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, tglx@linutronix.de, marc.zyngier@arm.com,
linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: [tip:irq/core] irqdomain: Let irq_domain_mapping display ACPI fwnode attributes
Date: Mon, 22 May 2017 13:34:32 -0700 [thread overview]
Message-ID: <tip-2370c00dc7232d0c4af224e7730b4de031f3b1a0@git.kernel.org> (raw)
In-Reply-To: <20170512115538.10767-3-marc.zyngier@arm.com>
Commit-ID: 2370c00dc7232d0c4af224e7730b4de031f3b1a0
Gitweb: http://git.kernel.org/tip/2370c00dc7232d0c4af224e7730b4de031f3b1a0
Author: Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 12 May 2017 12:55:36 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 22 May 2017 22:29:44 +0200
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>
---
kernel/irq/irqdomain.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 1f6cd2c..70b9da7 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -801,15 +801,26 @@ static int virq_debug_show(struct seq_file *m, void *private)
mutex_lock(&irq_domain_mutex);
list_for_each_entry(domain, &irq_domain_list, link) {
struct device_node *of_node;
+ const char *name;
+
int count = 0;
+
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)
count++;
seq_printf(m, "%c%-16s %6u %10u %10u %s\n",
domain == irq_default_domain ? '*' : ' ', domain->name,
domain->revmap_size + count, domain->revmap_size,
domain->revmap_direct_max_irq,
- of_node ? of_node_full_name(of_node) : "");
+ name);
}
mutex_unlock(&irq_domain_mutex);
next prev parent reply other threads:[~2017-05-22 20:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 11:55 [PATCH 0/4] irqdomain: Improve irq_domain_mapping facility Marc Zyngier
2017-05-12 11:55 ` [PATCH 1/4] irqdomain: Let irq_domain_mapping display hierarchical domains Marc Zyngier
2017-05-22 20:33 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-05-12 11:55 ` [PATCH 2/4] irqdomain: Let irq_domain_mapping display ACPI fwnode attributes Marc Zyngier
2017-05-22 20:34 ` tip-bot for Marc Zyngier [this message]
2017-05-12 11:55 ` [PATCH 3/4] genirq/msi: Populate the domain name if provided by the irqchip Marc Zyngier
2017-05-22 20:35 ` [tip:irq/core] " tip-bot for Marc Zyngier
2017-05-12 11:55 ` [PATCH 4/4] Documentation: Update IRQ-domain.txt to document irq_domain_mapping Marc Zyngier
2017-05-22 20:35 ` [tip:irq/core] " tip-bot for Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-2370c00dc7232d0c4af224e7730b4de031f3b1a0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome