Skip to content

Commit be1c2bb

Browse files
author
Marc Zyngier
committed
ARM: PXA: Fix cplds irqdesc allocation when using legacy mode
The Mainstone PXA platform uses CONFIG_SPARSE_IRQ, and thus we cannot rely on the irq descriptors to be readilly allocated before creating the irqdomain in legacy mode. The kernel then complains loudly about not being able to associate the interrupt in the domain -- can't blame it. Fix it by allocating the irqdescs upfront in the legacy case. Fixes: b68761d ("ARM: PXA: Kill use of irq_create_strict_mappings()") Reported-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210426223942.GA213931@roeck-us.net
1 parent 6efb943 commit be1c2bb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

arch/arm/mach-pxa/pxa_cplds_irqs.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,13 @@ static int cplds_probe(struct platform_device *pdev)
121121
return fpga->irq;
122122

123123
base_irq = platform_get_irq(pdev, 1);
124-
if (base_irq < 0)
124+
if (base_irq < 0) {
125125
base_irq = 0;
126+
} else {
127+
ret = devm_irq_alloc_descs(&pdev->dev, base_irq, base_irq, CPLDS_NB_IRQ, 0);
128+
if (ret < 0)
129+
return ret;
130+
}
126131

127132
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
128133
fpga->base = devm_ioremap_resource(&pdev->dev, res);

0 commit comments

Comments
 (0)