Skip to content

Commit cea29b6

Browse files
committed
iommu/vt-d: Use named irq domain interface
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Joerg Roedel <joro@8bytes.org> 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: iommu@lists.linux-foundation.org Cc: Christoph Hellwig <hch@lst.de> Link: http://lkml.kernel.org/r/20170619235444.063083997@linutronix.de
1 parent 667724c commit cea29b6

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

drivers/iommu/intel_irq_remapping.c

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,9 @@ static void iommu_enable_irq_remapping(struct intel_iommu *iommu)
500500
static int intel_setup_irq_remapping(struct intel_iommu *iommu)
501501
{
502502
struct ir_table *ir_table;
503-
struct page *pages;
503+
struct fwnode_handle *fn;
504504
unsigned long *bitmap;
505+
struct page *pages;
505506

506507
if (iommu->ir_table)
507508
return 0;
@@ -525,15 +526,24 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)
525526
goto out_free_pages;
526527
}
527528

528-
iommu->ir_domain = irq_domain_add_hierarchy(arch_get_ir_parent_domain(),
529-
0, INTR_REMAP_TABLE_ENTRIES,
530-
NULL, &intel_ir_domain_ops,
531-
iommu);
529+
fn = irq_domain_alloc_named_id_fwnode("INTEL-IR", iommu->seq_id);
530+
if (!fn)
531+
goto out_free_bitmap;
532+
533+
iommu->ir_domain =
534+
irq_domain_create_hierarchy(arch_get_ir_parent_domain(),
535+
0, INTR_REMAP_TABLE_ENTRIES,
536+
fn, &intel_ir_domain_ops,
537+
iommu);
538+
irq_domain_free_fwnode(fn);
532539
if (!iommu->ir_domain) {
533540
pr_err("IR%d: failed to allocate irqdomain\n", iommu->seq_id);
534541
goto out_free_bitmap;
535542
}
536-
iommu->ir_msi_domain = arch_create_msi_irq_domain(iommu->ir_domain);
543+
iommu->ir_msi_domain =
544+
arch_create_remap_msi_irq_domain(iommu->ir_domain,
545+
"INTEL-IR-MSI",
546+
iommu->seq_id);
537547

538548
ir_table->base = page_address(pages);
539549
ir_table->bitmap = bitmap;

0 commit comments

Comments
 (0)