Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: b68761da0111 ("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

+6 -1
+6 -1
arch/arm/mach-pxa/pxa_cplds_irqs.c
··· 121 121 return fpga->irq; 122 122 123 123 base_irq = platform_get_irq(pdev, 1); 124 - if (base_irq < 0) 124 + if (base_irq < 0) { 125 125 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 + } 126 131 127 132 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 128 133 fpga->base = devm_ioremap_resource(&pdev->dev, res);