From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Galois.linutronix.de ([146.0.238.70]:40014 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753004AbdFSX75 (ORCPT ); Mon, 19 Jun 2017 19:59:57 -0400 Message-Id: <20170619235444.379861978@linutronix.de> Date: Tue, 20 Jun 2017 01:37:15 +0200 From: Thomas Gleixner To: LKML Cc: Marc Zyngier , Christoph Hellwig , Ingo Molnar , Peter Zijlstra , Michael Ellerman , Jens Axboe , Keith Busch , Bjorn Helgaas , linux-pci@vger.kernel.org Subject: [patch 15/55] PCI: vmd: Create named irq domain References: <20170619233700.547167146@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-pci-owner@vger.kernel.org List-ID: Use the fwnode to create a named domain so diagnosis works. Signed-off-by: Thomas Gleixner Cc: Keith Busch Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org --- drivers/pci/host/vmd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/pci/host/vmd.c +++ b/drivers/pci/host/vmd.c @@ -554,6 +554,7 @@ static int vmd_find_free_domain(void) static int vmd_enable_domain(struct vmd_dev *vmd) { struct pci_sysdata *sd = &vmd->sysdata; + struct fwnode_handle *fn; struct resource *res; u32 upper_bits; unsigned long flags; @@ -617,8 +618,13 @@ static int vmd_enable_domain(struct vmd_ sd->node = pcibus_to_node(vmd->dev->bus); - vmd->irq_domain = pci_msi_create_irq_domain(NULL, &vmd_msi_domain_info, + fn = irq_domain_alloc_named_id_fwnode("VMD-MSI", vmd->sysdata.domain); + if (!fn) + return -ENODEV; + + vmd->irq_domain = pci_msi_create_irq_domain(fn, &vmd_msi_domain_info, x86_vector_domain); + kfree(fn); if (!vmd->irq_domain) return -ENODEV;