Skip to content

Commit 89eb168

Browse files
marcanMarc Zyngier
authored andcommitted
PCI: apple: Change MSI handling to handle 4-cell AIC fwspec form
AIC2 changes the IRQ fwspec to add a cell. Always use the second-to-last cell for the MSI handling, so it will work for both AIC1 and AIC2 devices. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220309192123.152028-2-marcan@marcan.st
1 parent dfd42fa commit 89eb168

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/controller/pcie-apple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static int apple_msi_domain_alloc(struct irq_domain *domain, unsigned int virq,
219219
if (hwirq < 0)
220220
return -ENOSPC;
221221

222-
fwspec.param[1] += hwirq;
222+
fwspec.param[fwspec.param_count - 2] += hwirq;
223223

224224
ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &fwspec);
225225
if (ret)

0 commit comments

Comments
 (0)