提交 3e49a818 编写于 作者: T Thomas Gleixner

iommu/amd: Use named irq domain interface

Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Acked-by: NJoerg 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.142270582@linutronix.de
上级 cea29b65
...@@ -4395,13 +4395,20 @@ static struct irq_chip amd_ir_chip = { ...@@ -4395,13 +4395,20 @@ static struct irq_chip amd_ir_chip = {
int amd_iommu_create_irq_domain(struct amd_iommu *iommu) 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) if (!iommu->ir_domain)
return -ENOMEM; return -ENOMEM;
iommu->ir_domain->parent = arch_get_ir_parent_domain(); 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; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册