[PATCH] irqchip/mvebu: Allow EBU irqchips to be compile-tested
Thomas Gleixner
tglx at kernel.org
Mon May 11 06:45:02 PDT 2026
On Sun, May 10 2026 at 12:50, Rosen Penev wrote:
> The Marvell EBU interrupt controller Kconfig symbols are hidden and
> selected only by platform code. This prevents build coverage for the
> drivers on other architectures even though the code only needs OF and
> MMIO support.
>
> Add COMPILE_TEST prompts and the required dependencies for the GICP,
> ICU, ODMI, PIC and SEI irqchips. While touching PIC for this coverage,
> use GENMASK() and BIT() for its masks so that 32-bit platforms can
> compile this safely without running into issues.
While touching PIC? That's related, but you want to prepare the PIC code
first in order to enable the compile test and not burry that change
within a gazillion lines of Kconfig muck.
> config MVEBU_GICP
> + bool "Marvell EBU GICP interrupt controller" if COMPILE_TEST
> + depends on OF
> + depends on HAS_IOMEM
depends on OF && HAS_IOMEM
> select IRQ_MSI_LIB
> - bool
> + help
> + Support the Marvell EBU GICP interrupt controller.
>
> config MVEBU_ICU
> - bool
> + bool "Marvell EBU ICU interrupt controller" if COMPILE_TEST
> + depends on OF
> + depends on HAS_IOMEM
> + select GENERIC_MSI_IRQ
> + help
> + Support the Marvell EBU ICU interrupt controller.
>
> config MVEBU_ODMI
> - bool
> + bool "Marvell EBU ODMI interrupt controller" if COMPILE_TEST
> + depends on OF
> + depends on HAS_IOMEM
> select IRQ_MSI_LIB
> select GENERIC_MSI_IRQ
So while at it you can mop up this too. IRQ_MSI_LIB already selects
GENERIC_MSI_IRQ
> + help
> + Support the Marvell EBU ODMI interrupt controller.
>
> config MVEBU_PIC
> - bool
> + bool "Marvell EBU PIC interrupt controller" if COMPILE_TEST
> + depends on OF
> + depends on HAS_IOMEM
> + help
> + Support the Marvell EBU PIC interrupt controller.
>
> config MVEBU_SEI
> - bool
> + bool "Marvell EBU SEI interrupt controller" if COMPILE_TEST
> + depends on OF
> + depends on HAS_IOMEM
> + help
> + Support the Marvell EBU SEI interrupt controller.
What ensures that IRQ_MSI_LIB is selected, when MVEBU_SEI is selected?
> config LS_EXTIRQ
> bool "Freescale Layerscape external IRQ support" if COMPILE_TEST
> diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
> index 10b85128183a..95090d8efc06 100644
> --- a/drivers/irqchip/irq-mvebu-pic.c
> +++ b/drivers/irqchip/irq-mvebu-pic.c
> @@ -24,7 +24,7 @@
> #define PIC_MASK 0x4
>
> #define PIC_MAX_IRQS 32
> -#define PIC_MAX_IRQ_MASK ((1UL << PIC_MAX_IRQS) - 1)
> +#define PIC_MAX_IRQ_MASK GENMASK(PIC_MAX_IRQS - 1, 0)
What guarantees that 'linux/bits.h' is included under all circumstances?
I'm really not impressed by this AI assisted slop at all.
Thanks,
tglx
More information about the linux-arm-kernel
mailing list