diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-10-06 12:22:06 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-10-10 16:04:20 +0200 |
commit | 53b9ec3fbb7da97d13951debbd42e3a0c4a7c9f7 (patch) | |
tree | 997405f3b20a8130d440f5125f7cac36b2c03f5b /drivers | |
parent | 37946d95fc1a41ed79efb613b0818c2cdecbb2fa (diff) | |
download | blackbird-op-linux-53b9ec3fbb7da97d13951debbd42e3a0c4a7c9f7.tar.gz blackbird-op-linux-53b9ec3fbb7da97d13951debbd42e3a0c4a7c9f7.zip |
iommu/amd: Enforce alignment for MSI IRQs
Make use of the new alignment capability of
alloc_irq_index() to enforce IRQ index alignment
for MSI.
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Fixes: 2b324506341cb ('iommu/amd: Add routines to manage irq remapping tables')
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 2d4ee2555a0d..cb7c531542da 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -4102,7 +4102,9 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq, else ret = -ENOMEM; } else { - index = alloc_irq_index(devid, nr_irqs, false); + bool align = (info->type == X86_IRQ_ALLOC_TYPE_MSI); + + index = alloc_irq_index(devid, nr_irqs, align); } if (index < 0) { pr_warn("Failed to allocate IRTE\n"); |