Re: [PATCH 1/3] sh: Cleanup about SPARSE_IRQ

From: Geert Uytterhoeven
Date: Mon Sep 27 2021 - 10:30:00 EST


Hi Kefeng,

On Mon, Sep 27, 2021 at 10:11 AM Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote:
> After commit 37744feebc08 ("sh: remove sh5 support"), sh always
> enable SPARSE_IRQ, kill unused MAY_HAVE_SPARSE_IRQ and NR_IRQS
> define under !CONFIG_SPARSE_IRQ.
>
> Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
> Cc: Rich Felker <dalias@xxxxxxxx>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

One question below...

> --- a/arch/sh/include/asm/irq.h
> +++ b/arch/sh/include/asm/irq.h
> @@ -5,16 +5,7 @@
> #include <linux/cpumask.h>
> #include <asm/machvec.h>
>
> -/*
> - * Only legacy non-sparseirq platforms have to set a reasonably sane
> - * value here. sparseirq platforms allocate their irq_descs on the fly,
> - * so will expand automatically based on the number of registered IRQs.
> - */
> -#ifdef CONFIG_SPARSE_IRQ
> # define NR_IRQS 8
> -#else
> -# define NR_IRQS 512
> -#endif

I'm wondering if we can go even further, and just remove the definition
of NR_IRQS, and fall back to the default in include/asm-generic/irq.h?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds