Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/irq: Standardize on CONFIG_SPARSE_IRQ=y

Sparseirq got introduced in v2.6.28 and Thomas did a huge cleanup
around v2.6.38 that eliminated basically all disadvantages
of it.

So we can remove non-sparseirq support now and simplify
our IRQ degrees of freedom a bit.

Suggested-and-acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/4E95E21D.6090200@oracle.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Yinghai Lu and committed by
Ingo Molnar
141d55e6 6f50d45f

+3 -33
+1
arch/x86/Kconfig
··· 64 64 select HAVE_TEXT_POKE_SMP 65 65 select HAVE_GENERIC_HARDIRQS 66 66 select HAVE_SPARSE_IRQ 67 + select SPARSE_IRQ 67 68 select GENERIC_FIND_FIRST_BIT 68 69 select GENERIC_IRQ_PROBE 69 70 select GENERIC_PENDING_IRQ if SMP
+2 -10
arch/x86/include/asm/irq_vectors.h
··· 160 160 #define IO_APIC_VECTOR_LIMIT ( 32 * MAX_IO_APICS ) 161 161 162 162 #ifdef CONFIG_X86_IO_APIC 163 - # ifdef CONFIG_SPARSE_IRQ 164 - # define CPU_VECTOR_LIMIT (64 * NR_CPUS) 165 - # define NR_IRQS \ 163 + # define CPU_VECTOR_LIMIT (64 * NR_CPUS) 164 + # define NR_IRQS \ 166 165 (CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \ 167 166 (NR_VECTORS + CPU_VECTOR_LIMIT) : \ 168 167 (NR_VECTORS + IO_APIC_VECTOR_LIMIT)) 169 - # else 170 - # define CPU_VECTOR_LIMIT (32 * NR_CPUS) 171 - # define NR_IRQS \ 172 - (CPU_VECTOR_LIMIT < IO_APIC_VECTOR_LIMIT ? \ 173 - (NR_VECTORS + CPU_VECTOR_LIMIT) : \ 174 - (NR_VECTORS + IO_APIC_VECTOR_LIMIT)) 175 - # endif 176 168 #else /* !CONFIG_X86_IO_APIC: */ 177 169 # define NR_IRQS NR_IRQS_LEGACY 178 170 #endif
-23
arch/x86/kernel/apic/io_apic.c
··· 186 186 187 187 188 188 /* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */ 189 - #ifdef CONFIG_SPARSE_IRQ 190 189 static struct irq_cfg irq_cfgx[NR_IRQS_LEGACY]; 191 - #else 192 - static struct irq_cfg irq_cfgx[NR_IRQS]; 193 - #endif 194 190 195 191 int __init arch_early_irq_init(void) 196 192 { ··· 230 234 return 0; 231 235 } 232 236 233 - #ifdef CONFIG_SPARSE_IRQ 234 237 static struct irq_cfg *irq_cfg(unsigned int irq) 235 238 { 236 239 return irq_get_chip_data(irq); ··· 263 268 free_cpumask_var(cfg->old_domain); 264 269 kfree(cfg); 265 270 } 266 - 267 - #else 268 - 269 - struct irq_cfg *irq_cfg(unsigned int irq) 270 - { 271 - return irq < nr_irqs ? irq_cfgx + irq : NULL; 272 - } 273 - 274 - static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node) 275 - { 276 - return irq_cfgx + irq; 277 - } 278 - 279 - static inline void free_irq_cfg(unsigned int at, struct irq_cfg *cfg) { } 280 - 281 - #endif 282 271 283 272 static struct irq_cfg *alloc_irq_and_cfg_at(unsigned int at, int node) 284 273 { ··· 3623 3644 return nr_irqs_gsi; 3624 3645 } 3625 3646 3626 - #ifdef CONFIG_SPARSE_IRQ 3627 3647 int __init arch_probe_nr_irqs(void) 3628 3648 { 3629 3649 int nr; ··· 3642 3664 3643 3665 return NR_IRQS_LEGACY; 3644 3666 } 3645 - #endif 3646 3667 3647 3668 int io_apic_set_pci_routing(struct device *dev, int irq, 3648 3669 struct io_apic_irq_attr *irq_attr)