diff mbox series

[1/3] sh: Cleanup about SPARSE_IRQ

Message ID 20210927081402.191717-2-wangkefeng.wang@huawei.com (mailing list archive)
State New, archived
Headers show
Series Cleanup MAY_HAVE_SPARSE_IRQ | expand

Commit Message

Kefeng Wang Sept. 27, 2021, 8:14 a.m. UTC
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@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/sh/Kconfig           | 1 -
 arch/sh/include/asm/irq.h | 9 ---------
 2 files changed, 10 deletions(-)

Comments

Geert Uytterhoeven Sept. 27, 2021, 2:29 p.m. UTC | #1
Hi Kefeng,

On Mon, Sep 27, 2021 at 10:11 AM Kefeng Wang <wangkefeng.wang@huawei.com> 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@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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
diff mbox series

Patch

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 6904f4bdbf00..70afb30e0b32 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -56,7 +56,6 @@  config SUPERH
 	select HAVE_STACKPROTECTOR
 	select HAVE_SYSCALL_TRACEPOINTS
 	select IRQ_FORCED_THREADING
-	select MAY_HAVE_SPARSE_IRQ
 	select MODULES_USE_ELF_RELA
 	select NEED_SG_DMA_LENGTH
 	select NO_DMA if !MMU && !DMA_COHERENT
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
index 839551ce398c..5a7b6e324e4c 100644
--- 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
 
 /*
  * This is a special IRQ number for indicating that no IRQ has been