Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53b9ec3f authored by Joerg Roedel's avatar Joerg Roedel
Browse files

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: default avatarThomas Gleixner <tglx@linutronix.de>
Fixes: 2b324506 ('iommu/amd: Add routines to manage irq remapping tables')
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 37946d95
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -4102,7 +4102,9 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
		else
		else
			ret = -ENOMEM;
			ret = -ENOMEM;
	} else {
	} 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) {
	if (index < 0) {
		pr_warn("Failed to allocate IRTE\n");
		pr_warn("Failed to allocate IRTE\n");