[PATCH] ARM: drop unnecessary ifdef

Arnd Bergmann arnd at arndb.de
Mon Apr 24 05:36:41 PDT 2023



On Mon, Apr 24, 2023, at 14:23, Linus Walleij wrote:
> + Marc Z
>
> On Mon, Apr 24, 2023 at 2:09 PM Linus Walleij <linus.walleij at linaro.org> wrote:
>>
>> The ifdef around the assignment of handle_arch_irq makes it seem
>> optional, but GENERIC_IRQ_MULTI_HANDLER is selected by the ARM
>> architecture so this will always be true for arm. Drop the ifdef.
>>
>> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> (...)
>> -
>> -#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
>>         handle_arch_irq = mdesc->handle_irq;
>> -#endif
>
> Maybe this is a bit cheap. When I look at it, only these few machines still
> define mdesc->handle_irq():
>
> $ git grep '\.handle_irq' arch/arm
> arch/arm/mach-mxs/mach-mxs.c:   .handle_irq     = icoll_handle_irq,
> arch/arm/mach-omap1/board-ams-delta.c:  .handle_irq     = omap1_handle_irq,
> arch/arm/mach-omap1/board-nokia770.c:   .handle_irq     = omap1_handle_irq,
> arch/arm/mach-omap1/board-osk.c:        .handle_irq     = omap1_handle_irq,
> arch/arm/mach-omap1/board-palmte.c:     .handle_irq     = omap1_handle_irq,
> arch/arm/mach-omap1/board-sx1.c:        .handle_irq     = omap1_handle_irq,
> arch/arm/mach-pxa/gumstix.c:    .handle_irq     = pxa25x_handle_irq,
> arch/arm/mach-pxa/spitz.c:      .handle_irq     = pxa27x_handle_irq,
> arch/arm/mach-pxa/spitz.c:      .handle_irq     = pxa27x_handle_irq,
> arch/arm/mach-pxa/spitz.c:      .handle_irq     = pxa27x_handle_irq,
>
> All others leave mdesc->handle_irq as NULL and let a later call from
> OF assign it with set_handle_irq().
>
> What do you folks thing about patching these few machines to issue
> set_handle_irq() in mdesc->init_early() as well and just delete
> .handle_irq from the machine descriptor?

Not in .init_early, but in .init_irq, as in the other drivers.
It looks like irqchip/irq-mxs.c and mach-pxa/irq.c already do this
for some cases and just need to do it consistently, and
mach-omap1/irq.c can be trivially converted the same way.

      Arnd



More information about the linux-arm-kernel mailing list