aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yinghai.lu@oracle.com>2011-10-12 14:53:17 -0400
committerIngo Molnar <mingo@elte.hu>2011-10-13 06:12:12 -0400
commit141d55e6cc590293ea1378f55b9ebd38f5024bf0 (patch)
treecf3026eb84d80ec48e8ef39ba8e5d4b0c0c84596 /arch
parent6f50d45fae8189365805d26e1fdf26a75301bcae (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/x86/include/asm/irq_vectors.h12
-rw-r--r--arch/x86/kernel/apic/io_apic.c23
3 files changed, 3 insertions, 33 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6a47bb22657f..fcd34c30debd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -64,6 +64,7 @@ config X86
64 select HAVE_TEXT_POKE_SMP 64 select HAVE_TEXT_POKE_SMP
65 select HAVE_GENERIC_HARDIRQS 65 select HAVE_GENERIC_HARDIRQS
66 select HAVE_SPARSE_IRQ 66 select HAVE_SPARSE_IRQ
67 select SPARSE_IRQ
67 select GENERIC_FIND_FIRST_BIT 68 select GENERIC_FIND_FIRST_BIT
68 select GENERIC_IRQ_PROBE 69 select GENERIC_IRQ_PROBE
69 select GENERIC_PENDING_IRQ if SMP 70 select GENERIC_PENDING_IRQ if SMP
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index 7e50f06393aa..4b4448761e88 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -160,19 +160,11 @@ static inline int invalid_vm86_irq(int irq)
160#define IO_APIC_VECTOR_LIMIT ( 32 * MAX_IO_APICS ) 160#define IO_APIC_VECTOR_LIMIT ( 32 * MAX_IO_APICS )
161 161
162#ifdef CONFIG_X86_IO_APIC 162#ifdef CONFIG_X86_IO_APIC
163# ifdef CONFIG_SPARSE_IRQ 163# define CPU_VECTOR_LIMIT (64 * NR_CPUS)
164# define CPU_VECTOR_LIMIT (64 * NR_CPUS) 164# define NR_IRQS \
165# define NR_IRQS \
166 (CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \ 165 (CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \
167 (NR_VECTORS + CPU_VECTOR_LIMIT) : \ 166 (NR_VECTORS + CPU_VECTOR_LIMIT) : \
168 (NR_VECTORS + IO_APIC_VECTOR_LIMIT)) 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#else /* !CONFIG_X86_IO_APIC: */ 168#else /* !CONFIG_X86_IO_APIC: */
177# define NR_IRQS NR_IRQS_LEGACY 169# define NR_IRQS NR_IRQS_LEGACY
178#endif 170#endif
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 08f0d165e139..05a30c122b1b 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -186,11 +186,7 @@ static struct irq_pin_list *alloc_irq_pin_list(int node)
186 186
187 187
188/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */ 188/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
189#ifdef CONFIG_SPARSE_IRQ
190static struct irq_cfg irq_cfgx[NR_IRQS_LEGACY]; 189static struct irq_cfg irq_cfgx[NR_IRQS_LEGACY];
191#else
192static struct irq_cfg irq_cfgx[NR_IRQS];
193#endif
194 190
195int __init arch_early_irq_init(void) 191int __init arch_early_irq_init(void)
196{ 192{
@@ -234,7 +230,6 @@ int __init arch_early_irq_init(void)
234 return 0; 230 return 0;
235} 231}
236 232
237#ifdef CONFIG_SPARSE_IRQ
238static struct irq_cfg *irq_cfg(unsigned int irq) 233static struct irq_cfg *irq_cfg(unsigned int irq)
239{ 234{
240 return irq_get_chip_data(irq); 235 return irq_get_chip_data(irq);
@@ -269,22 +264,6 @@ static void free_irq_cfg(unsigned int at, struct irq_cfg *cfg)
269 kfree(cfg); 264 kfree(cfg);
270} 265}
271 266
272#else
273
274struct irq_cfg *irq_cfg(unsigned int irq)
275{
276 return irq < nr_irqs ? irq_cfgx + irq : NULL;
277}
278
279static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node)
280{
281 return irq_cfgx + irq;
282}
283
284static inline void free_irq_cfg(unsigned int at, struct irq_cfg *cfg) { }
285
286#endif
287
288static struct irq_cfg *alloc_irq_and_cfg_at(unsigned int at, int node) 267static struct irq_cfg *alloc_irq_and_cfg_at(unsigned int at, int node)
289{ 268{
290 int res = irq_alloc_desc_at(at, node); 269 int res = irq_alloc_desc_at(at, node);
@@ -3644,7 +3623,6 @@ int get_nr_irqs_gsi(void)
3644 return nr_irqs_gsi; 3623 return nr_irqs_gsi;
3645} 3624}
3646 3625
3647#ifdef CONFIG_SPARSE_IRQ
3648int __init arch_probe_nr_irqs(void) 3626int __init arch_probe_nr_irqs(void)
3649{ 3627{
3650 int nr; 3628 int nr;
@@ -3664,7 +3642,6 @@ int __init arch_probe_nr_irqs(void)
3664 3642
3665 return NR_IRQS_LEGACY; 3643 return NR_IRQS_LEGACY;
3666} 3644}
3667#endif
3668 3645
3669int io_apic_set_pci_routing(struct device *dev, int irq, 3646int io_apic_set_pci_routing(struct device *dev, int irq,
3670 struct io_apic_irq_attr *irq_attr) 3647 struct io_apic_irq_attr *irq_attr)