Re: [PATCH 2/5] genirq: Allocate IRQ descriptors at boot time for !SPARSEIRQ

From: Shanker Donthineni
Date: Tue Jan 31 2023 - 11:41:42 EST




On 1/31/23 03:16, Thomas Gleixner wrote:
External email: Use caution opening links or attachments


On Sun, Jan 29 2023 at 18:57, Shanker Donthineni wrote:

Remove the use of statically allocated arrays for IRQ descriptors.
Instead, allocate the necessary NR_IRQ descriptors during the boot
time in early_irq_init().

That's not what I meant. I was pondering to remove !SPARSEIRQ
completely.


It's touching many files to drop CONFIG_SPARSE_IRQ=n support. Worried
about removing !SPARSEIRQ without testing on legacy platforms.

Can work on this after moving it to maple tree?

arch/arm/Kconfig | 1 -
arch/arm/include/asm/irq.h | 4 --
arch/arm/kernel/irq.c | 2 -
arch/arm64/Kconfig | 1 -
arch/csky/Kconfig | 1 -
arch/loongarch/Kconfig | 1 -
arch/microblaze/Kconfig | 1 -
arch/nios2/Kconfig | 1 -
arch/openrisc/Kconfig | 1 -
arch/powerpc/Kconfig | 1 -
arch/riscv/Kconfig | 1 -
arch/s390/Kconfig | 1 -
arch/sh/Kconfig | 1 -
arch/sparc/Kconfig | 1 -
arch/x86/Kconfig | 1 -
drivers/irqchip/Kconfig | 5 ---
include/linux/irqdesc.h | 8 ----
kernel/irq/Kconfig | 17 --------
kernel/irq/chip.c | 5 ---
kernel/irq/internals.h | 10 -----
kernel/irq/irqdesc.c | 88 --------------------------------------
kernel/irq/irqdomain.c | 14 +++---
22 files changed, 6 insertions(+), 160 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 43c7773b89ae..d4fc6c549660 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -134,7 +134,6 @@ config ARM
select PCI_SYSCALL if PCI
select PERF_USE_VMALLOC
select RTC_LIB
- select SPARSE_IRQ if !(ARCH_FOOTBRIDGE || ARCH_RPC)
select SYS_SUPPORTS_APM_EMULATION
select THREAD_INFO_IN_TASK
select TIMER_OF if OF
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index a7c2337b0c7d..6d4ff82c40cf 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -4,11 +4,7 @@

...

-#ifndef CONFIG_SPARSE_IRQ
-#include <mach/irqs.h>
-#else
#define NR_IRQS NR_IRQS_LEGACY
-#endif

...
# Make sparse irq Kconfig switch below available
-config MAY_HAVE_SPARSE_IRQ
- bool
-
# Legacy support, required for itanic
config GENERIC_IRQ_LEGACY
bool
@@ -107,19 +103,6 @@ config GENERIC_IRQ_RESERVATION_MODE
config IRQ_FORCED_THREADING
bool


That allocation does not buy us much.


Agree, not much value other than reducing kernel binary size. I will drop
this patch in v2.

Thanks,
Shanker