From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762327AbdEVUgT (ORCPT ); Mon, 22 May 2017 16:36:19 -0400 Received: from terminus.zytor.com ([65.50.211.136]:57951 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758066AbdEVUgQ (ORCPT ); Mon, 22 May 2017 16:36:16 -0400 Date: Mon, 22 May 2017 13:35:06 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, marc.zyngier@arm.com Reply-To: hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, tglx@linutronix.de In-Reply-To: <20170512115538.10767-4-marc.zyngier@arm.com> References: <20170512115538.10767-4-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq/msi: Populate the domain name if provided by the irqchip Git-Commit-ID: a97b852b4d4c2f8c50cab13c71566639f9a1a990 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a97b852b4d4c2f8c50cab13c71566639f9a1a990 Gitweb: http://git.kernel.org/tip/a97b852b4d4c2f8c50cab13c71566639f9a1a990 Author: Marc Zyngier AuthorDate: Fri, 12 May 2017 12:55:37 +0100 Committer: Thomas Gleixner CommitDate: Mon, 22 May 2017 22:29:45 +0200 genirq/msi: Populate the domain name if provided by the irqchip 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 Link: http://lkml.kernel.org/r/20170512115538.10767-4-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner --- 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 ddc2f54..fe4d48e 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,