From: Marc Zyngier <marc.zyngier@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 3/4] genirq/msi: Populate the domain name if provided by the irqchip
Date: Fri, 12 May 2017 12:55:37 +0100 [thread overview]
Message-ID: <20170512115538.10767-4-marc.zyngier@arm.com> (raw)
In-Reply-To: <20170512115538.10767-1-marc.zyngier@arm.com>
In order to ease debug, let's populate the domain name upfront,
before any MSI gets requested. This allows the domain to appear
in the irq_domain_mapping, and the user to easily find the expected
data.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
kernel/irq/msi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index ddc2f5427f75..fe4d48ec5bc4 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -265,13 +265,19 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode,
struct msi_domain_info *info,
struct irq_domain *parent)
{
+ struct irq_domain *domain;
+
if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS)
msi_domain_update_dom_ops(info);
if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS)
msi_domain_update_chip_ops(info);
- return irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0,
- fwnode, &msi_domain_ops, info);
+ domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0,
+ fwnode, &msi_domain_ops, info);
+ if (domain && info->chip && info->chip->name)
+ domain->name = info->chip->name;
+
+ return domain;
}
int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev,
--
2.11.0
next prev parent reply other threads:[~2017-05-12 11:55 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:irq/core] " tip-bot for Marc Zyngier
2017-05-12 11:55 ` Marc Zyngier [this message]
2017-05-22 20:35 ` [tip:irq/core] genirq/msi: Populate the domain name if provided by the irqchip 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=20170512115538.10767-4-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®