PCI/vmd: Create named irq domain
Use the fwnode to create a named domain so diagnosis works. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Jens Axboe <axboe@kernel.dk> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Keith Busch <keith.busch@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-pci@vger.kernel.org Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Christoph Hellwig <hch@lst.de> Link: http://lkml.kernel.org/r/20170619235444.379861978@linutronix.de
This commit is contained in:
parent
f8f37ca789
commit
ae904cafd5
|
@ -554,6 +554,7 @@ static int vmd_find_free_domain(void)
|
||||||
static int vmd_enable_domain(struct vmd_dev *vmd)
|
static int vmd_enable_domain(struct vmd_dev *vmd)
|
||||||
{
|
{
|
||||||
struct pci_sysdata *sd = &vmd->sysdata;
|
struct pci_sysdata *sd = &vmd->sysdata;
|
||||||
|
struct fwnode_handle *fn;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
u32 upper_bits;
|
u32 upper_bits;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -617,8 +618,13 @@ static int vmd_enable_domain(struct vmd_dev *vmd)
|
||||||
|
|
||||||
sd->node = pcibus_to_node(vmd->dev->bus);
|
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);
|
x86_vector_domain);
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
if (!vmd->irq_domain)
|
if (!vmd->irq_domain)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue