Cleanup MAY_HAVE_SPARSE_IRQ
Subsystems (3)
v2 cover Cleanup MAY_HAVE_SPARSE_IRQ
Most ARCHs support SPARSE_IRQ, the dynamical and statical irq description allocation are alternative.
The last user of MAY_HAVE_SPARSE_IRQ is sh/csky, but the sh use SPARSE_IRQ, MAY_HAVE_SPARSE_IRQ could be kill. and for csky, it uses statical allocation by default.
So MAY_HAVE_SPARSE_IRQ seems to be useless, no need to maintain a separate MAY_HAVE_SPARSE_IRQ config, kill it.
Also cleanup the kernel/irq/Kconfig a little.
v2:
- drop all the NR_IRQS suggested by Geert
- don' use SPARSE_IRQ for csky by default, suggested by Guo.
Kefeng Wang (3):
sh: Cleanup about SPARSE_IRQ
csky: Kill MAY_HAVE_SPARSE_IRQ
genirq: Cleanup Kconfig
arch/csky/Kconfig | 1 - arch/sh/Kconfig | 1 - arch/sh/include/asm/irq.h | 11 --------- kernel/irq/Kconfig | 50 ++++++++++++++++----------------------- 4 files changed, 20 insertions(+), 43 deletions(-)
Signature · 1 line
2.26.2
PATCH v3 3/3 genirq: Cleanup Kconfig
As the last user of MAY_HAVE_SPARSE_IRQ is gone, kill it, and clean up the SPARSE_IRQ description, covert the help text into comment.
Also move GENERIC_IRQ_MULTI_HANDLER into menu, and change all spaces to tabs to fix alignment issue.
--- kernel/irq/Kconfig | 50 +++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 30 deletions(-)
kernel/irq/Kconfig +20 -30
@@ -2,13 +2,9 @@ menu "IRQ subsystem" # Options selectable by the architecture code -# Make sparse irq Kconfig switch below available -config MAY_HAVE_SPARSE_IRQ - bool - # Legacy support, required for itanic config GENERIC_IRQ_LEGACY - bool + bool # Enable the generic irq autoprobe mechanism config GENERIC_IRQ_PROBE
@@ -16,15 +12,15 @@ config GENERIC_IRQ_PROBE # Use the generic /proc/interrupts implementation config GENERIC_IRQ_SHOW - bool + bool # Print level/edge extra information config GENERIC_IRQ_SHOW_LEVEL - bool + bool # Supports effective affinity mask config GENERIC_IRQ_EFFECTIVE_AFF_MASK - bool + bool # Support for delayed migration from interrupt context config GENERIC_PENDING_IRQ
@@ -36,7 +32,7 @@ config GENERIC_IRQ_MIGRATION # Alpha specific irq affinity mechanism config AUTO_IRQ_AFFINITY - bool + bool # Interrupt injection mechanism config GENERIC_IRQ_INJECTION
@@ -44,16 +40,16 @@ config GENERIC_IRQ_INJECTION # Tasklet based software resend for pending interrupts on enable_irq() config HARDIRQS_SW_RESEND - bool + bool # Edge style eoi based handler (cell) config IRQ_EDGE_EOI_HANDLER - bool + bool # Generic configurable interrupt chip implementation config GENERIC_IRQ_CHIP - bool - select IRQ_DOMAIN + bool + select IRQ_DOMAIN # Generic irq_domain hw <--> linux irq number translation config IRQ_DOMAIN
@@ -103,6 +99,10 @@ config HANDLE_DOMAIN_IRQ config IRQ_TIMINGS bool +# Allow to specify the low level IRQ handler at run time. +config GENERIC_IRQ_MULTI_HANDLER + bool + config GENERIC_IRQ_MATRIX_ALLOCATOR bool
@@ -111,20 +111,15 @@ config GENERIC_IRQ_RESERVATION_MODE # Support forced irq threading config IRQ_FORCED_THREADING - bool + bool +# Sparse irq numbering is useful for distro kernels that want +# to define a high CONFIG_NR_CPUS value but still want to have +# low kernel memory footprint on smaller machines. +# Sparse irqs can also be beneficial on NUMA boxes, as they spread +# out the interrupt descriptors in a more NUMA-friendly way. config SPARSE_IRQ - bool "Support sparse irq numbering" if MAY_HAVE_SPARSE_IRQ - help - - Sparse irq numbering is useful for distro kernels that want - to define a high CONFIG_NR_CPUS value but still want to have - low kernel memory footprint on smaller machines. - - ( Sparse irqs can also be beneficial on NUMA boxes, as they spread - out the interrupt descriptors in a more NUMA-friendly way. ) - - If you don't know what to do here, say N. + bool config GENERIC_IRQ_DEBUGFS bool "Expose irq internals in debugfs"
@@ -139,8 +134,3 @@ config GENERIC_IRQ_DEBUGFS If you don't know what to do here, say N. endmenu - -config GENERIC_IRQ_MULTI_HANDLER - bool - help - Allow to specify the low level IRQ handler at run time.
Signature · 1 line
2.26.2
PATCH v2 2/3 csky: Kill MAY_HAVE_SPARSE_IRQ
In reply to Kefeng WangThe csky platforms use statical irq descriptors allocation by default, and the dynamical and statical irq allocation are alternative, it is no need to maintain a separate MAY_HAVE_SPARSE_IRQ, kill it.
--- arch/csky/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/csky/Kconfig +0 -1
@@ -69,7 +69,6 @@ config CSKY select HAVE_RSEQ select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS - select MAY_HAVE_SPARSE_IRQ select MODULES_USE_ELF_RELA if MODULES select OF select OF_EARLY_FLATTREE
Signature · 1 line
2.26.2
PATCH 1/3 sh: Cleanup about SPARSE_IRQ
In reply to Kefeng WangAfter commit 37744feebc08 ("sh: remove sh5 support"), sh always enable SPARSE_IRQ, kill unused MAY_HAVE_SPARSE_IRQ and NR_IRQS define.
--- arch/sh/Kconfig | 1 - arch/sh/include/asm/irq.h | 11 ----------- 2 files changed, 12 deletions(-)
arch/sh/Kconfig +0 -1
@@ -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
arch/sh/include/asm/irq.h +0 -11
@@ -5,17 +5,6 @@#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 * triggered and to simply ignore the IRQ dispatch. This is a special
Signature · 1 line
2.26.2
Hi Kefeng,
Quoted 12 lines · Kefeng Wang
Most ARCHs support
SPARSE_IRQ, the dynamical and statical irq description allocation are alternative.The last user of
MAY_HAVE_SPARSE_IRQis sh/csky, but the sh useSPARSE_IRQ,MAY_HAVE_SPARSE_IRQcould be kill. and for csky, it uses statical allocation by default.So
MAY_HAVE_SPARSE_IRQseems to be useless, no need to maintain a separateMAY_HAVE_SPARSE_IRQconfig, kill it.Also cleanup the
kernel/irq/Kconfiga little.
Quoted 8 lines
v2:
- drop all theNR_IRQSsuggested by Geert
- don' useSPARSE_IRQfor csky by default, suggested by Guo.Kefeng Wang (3):
sh: Cleanup aboutSPARSE_IRQ
csky: KillMAY_HAVE_SPARSE_IRQ
genirq: CleanupKconfig
Thanks for the update!
Tested on SH on landisk (real) and rts7751r2d (qemu), so
P.S. Please use the same version number in all patches of the series,
to avoid confusing tools like b4.
https://lore.kernel.org/all/[email protected]/
2021-09-29 2:35 ` [PATCH v1 1/3] sh: Cleanup about SPARSE_IRQ Kefeng Wang
2021-09-29 2:35 ` [PATCH v2 2/3] csky: Kill MAY_HAVE_SPARSE_IRQ Kefeng Wang
2021-09-29 2:35 ` [PATCH v3 3/3] genirq: Cleanup Kconfig Kefeng Wang
^^Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Quoted 24 lines · Geert Uytterhoeven
Hi Kefeng,
Quoted 12 lines · Kefeng Wang
Most ARCHs support
SPARSE_IRQ, the dynamical and statical irq description allocation are alternative.The last user of
MAY_HAVE_SPARSE_IRQis sh/csky, but the sh useSPARSE_IRQ,MAY_HAVE_SPARSE_IRQcould be kill. and for csky, it uses statical allocation by default.So
MAY_HAVE_SPARSE_IRQseems to be useless, no need to maintain a separateMAY_HAVE_SPARSE_IRQconfig, kill it.Also cleanup the
kernel/irq/Kconfiga little.Quoted 8 lines
v2:
- drop all theNR_IRQSsuggested by Geert
- don' useSPARSE_IRQfor csky by default, suggested by Guo.Kefeng Wang (3):
sh: Cleanup aboutSPARSE_IRQ
csky: KillMAY_HAVE_SPARSE_IRQ
genirq: CleanupKconfig
Quoted 4 lines
Thanks for the update!
Tested on SH on landisk (real) and rts7751r2d (qemu), so
Tested-by Geert Uytterhoeven <[email protected]>
Thanks for your test.
Quoted 10 lines
P.S. Please use the same version number in all patches of the series,
to avoid confusing tools like b4.https://lore.kernel.org/all/[email protected]/
2021-09-29 2:35 ` [PATCH v1 1/3] sh: Cleanup about SPARSE_IRQ Kefeng Wang 2021-09-29 2:35 ` [PATCH v2 2/3] csky: Kill MAY_HAVE_SPARSE_IRQ Kefeng Wang 2021-09-29 2:35 ` [PATCH v3 3/3] genirq: Cleanup Kconfig Kefeng Wang ^^
Strange, maybe some unexpected change in my local dir... sorry for the confusing.
Quoted 4 lines
Gr{oetje,eeting}s,
Geert
Hi Thomas, Could you pickup this cleanup patchset from your tree if possible, thanks.
Quoted 27 lines · Kefeng Wang
Most ARCHs support
SPARSE_IRQ, the dynamical and statical irq description allocation are alternative.The last user of
MAY_HAVE_SPARSE_IRQis sh/csky, but the sh useSPARSE_IRQ,MAY_HAVE_SPARSE_IRQcould be kill. and for csky, it uses statical allocation by default.So
MAY_HAVE_SPARSE_IRQseems to be useless, no need to maintain a separateMAY_HAVE_SPARSE_IRQconfig, kill it.Also cleanup the
kernel/irq/Kconfiga little.v2:
- drop all theNR_IRQSsuggested by Geert
- don' useSPARSE_IRQfor csky by default, suggested by Guo.Kefeng Wang (3):
sh: Cleanup aboutSPARSE_IRQ
csky: KillMAY_HAVE_SPARSE_IRQ
genirq: CleanupKconfigarch/csky/Kconfig | 1 - arch/sh/Kconfig | 1 - arch/sh/include/asm/irq.h | 11 --------- kernel/irq/Kconfig | 50 ++++++++++++++++----------------------- 4 files changed, 20 insertions(+), 43 deletions(-)