Skip to content

Commit 4d4a0db

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Allocate IOMMU irqs using numa locality info
Use numa information to allocate irq resources and also to set irq affinity. This optimizes the IOMMU interrupt handling. Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Alexey Kardashevskiy <aik@amd.com> Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20230321092348.6127-3-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 0d571dc commit 4d4a0db

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/iommu/amd/init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2383,6 +2383,7 @@ static int iommu_setup_intcapxt(struct amd_iommu *iommu)
23832383
struct irq_domain *domain;
23842384
struct irq_alloc_info info;
23852385
int irq, ret;
2386+
int node = dev_to_node(&iommu->dev->dev);
23862387

23872388
domain = iommu_get_irqdomain();
23882389
if (!domain)
@@ -2392,7 +2393,7 @@ static int iommu_setup_intcapxt(struct amd_iommu *iommu)
23922393
info.type = X86_IRQ_ALLOC_TYPE_AMDVI;
23932394
info.data = iommu;
23942395

2395-
irq = irq_domain_alloc_irqs(domain, 1, NUMA_NO_NODE, &info);
2396+
irq = irq_domain_alloc_irqs(domain, 1, node, &info);
23962397
if (irq < 0) {
23972398
irq_domain_remove(domain);
23982399
return irq;

0 commit comments

Comments
 (0)