From: Thomas Gleixner Date: Mon, 19 Jun 2017 23:37:12 +0000 (+0200) Subject: iommu/amd: Use named irq domain interface X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3e49a8182277ea57736285aede5f43bfa6aa11b1;p=openwrt%2Fstaging%2Fblogic.git iommu/amd: Use named irq domain interface Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.142270582@linutronix.de --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 590e1e8288a1..503849d186c3 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -4395,13 +4395,20 @@ static struct irq_chip amd_ir_chip = { int amd_iommu_create_irq_domain(struct amd_iommu *iommu) { - iommu->ir_domain = irq_domain_add_tree(NULL, &amd_ir_domain_ops, iommu); + struct fwnode_handle *fn; + + fn = irq_domain_alloc_named_id_fwnode("AMD-IR", iommu->index); + if (!fn) + return -ENOMEM; + iommu->ir_domain = irq_domain_create_tree(fn, &amd_ir_domain_ops, iommu); + irq_domain_free_fwnode(fn); if (!iommu->ir_domain) return -ENOMEM; iommu->ir_domain->parent = arch_get_ir_parent_domain(); - iommu->msi_domain = arch_create_msi_irq_domain(iommu->ir_domain); - + iommu->msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain, + "AMD-IR-MSI", + iommu->index); return 0; }