Make use of the new alignment capability of
alloc_irq_index() to enforce IRQ index alignment
for MSI.
Reported-by: Thomas Gleixner <[email protected]>
Fixes: 2b324506341cb ('iommu/amd: Add routines to manage irq remapping tables')
Reviewed-by: Thomas Gleixner <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
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");