Skip to content

Commit

Permalink
iommu/amd: Allocate IOMMU irqs using numa locality info
Browse files Browse the repository at this point in the history
Use numa information to allocate irq resources and also to set
irq affinity. This optimizes the IOMMU interrupt handling.

Reviewed-by: Suravee Suthikulpanit <[email protected]>
Reviewed-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Vasant Hegde <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
hegdevasant authored and joergroedel committed Mar 22, 2023
1 parent 0d571dc commit 4d4a0db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iommu/amd/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2383,6 +2383,7 @@ static int iommu_setup_intcapxt(struct amd_iommu *iommu)
struct irq_domain *domain;
struct irq_alloc_info info;
int irq, ret;
int node = dev_to_node(&iommu->dev->dev);

domain = iommu_get_irqdomain();
if (!domain)
Expand All @@ -2392,7 +2393,7 @@ static int iommu_setup_intcapxt(struct amd_iommu *iommu)
info.type = X86_IRQ_ALLOC_TYPE_AMDVI;
info.data = iommu;

irq = irq_domain_alloc_irqs(domain, 1, NUMA_NO_NODE, &info);
irq = irq_domain_alloc_irqs(domain, 1, node, &info);
if (irq < 0) {
irq_domain_remove(domain);
return irq;
Expand Down

0 comments on commit 4d4a0db

Please sign in to comment.