Re: [PATCH 1/2] alpha: marvel: Fix irq_set_status_flags to use correct IRQ number

Magnus Lindholm <[email protected]> Fri, 29 May 2026 12:13:51 +0200
Newsgroups org.kernel.vger.linux-alpha,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <CA+=Fv5TcVgZQZtYfSq=QPp3GkMkq7RhNWnJurSSWCogRU2q9TA@mail.gmail.com>
On Fri, May 29, 2026 at 1:05 AM Matt Turner <[email protected]> wrote:
>
> Pass base + i to irq_set_status_flags() to match the IRQ number
> used in irq_set_chip_and_handler(). Previously, IRQ_LEVEL was set
> on the wrong (low-numbered) IRQ descriptors rather than the IO7
> IRQs at base + i.
>
> Cc: [email protected]
> Fixes: 08876fe8519c ("alpha: marvel: Convert irq_chip functions")
> Signed-off-by: Matt Turner <[email protected]>
> ---
>  arch/alpha/kernel/sys_marvel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git ./arch/alpha/kernel/sys_marvel.c ./arch/alpha/kernel/sys_marvel.c
> index 1f99b03effc2..bebeea3c286d 100644
> --- ./arch/alpha/kernel/sys_marvel.c
> +++ ./arch/alpha/kernel/sys_marvel.c
> @@ -275,7 +275,7 @@ init_io7_irqs(struct io7 *io7,
>         /* Set up the lsi irqs.  */
>         for (i = 0; i < 128; ++i) {
>                 irq_set_chip_and_handler(base + i, lsi_ops, handle_level_irq);
> -               irq_set_status_flags(i, IRQ_LEVEL);
> +               irq_set_status_flags(base + i, IRQ_LEVEL);
>         }
>
>         /* Disable the implemented irqs in hardware.  */
> @@ -289,7 +289,7 @@ init_io7_irqs(struct io7 *io7,
>         /* Set up the msi irqs.  */
>         for (i = 128; i < (128 + 512); ++i) {
>                 irq_set_chip_and_handler(base + i, msi_ops, handle_level_irq);
> -               irq_set_status_flags(i, IRQ_LEVEL);
> +               irq_set_status_flags(base + i, IRQ_LEVEL);
>         }
>
>         for (i = 0; i < 16; ++i)
> --
> 2.53.0
>

This looks correct to me. irq_set_status_flags() should use the same Linux
IRQ number as irq_set_chip_and_handler(), i.e. base + i, otherwise IRQ_LEVEL
is applied to the wrong low-numbered descriptors rather than the IO7 IRQs.

Reviewed-by: Magnus Lindholm <[email protected]>