aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-02-08 19:18:03 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 03:21:28 -0500
commitabcaa2b8319a7673e76c2391cb5de3045ab1b401 (patch)
tree9f10c10439bff92787aac5f29c6fc97e5f67b2f0 /arch
parentf1ee5548a6507d2b4293635c61ddbf12e2c00e94 (diff)
x86: use NR_IRQS_LEGACY to replace 16
Impact: cleanup also could kill platform_legacy_irq Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/hw_irq.h4
-rw-r--r--arch/x86/kernel/io_apic.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index 1a20e3d12006..1b82781b898d 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -25,8 +25,6 @@
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/sections.h> 26#include <asm/sections.h>
27 27
28#define platform_legacy_irq(irq) ((irq) < 16)
29
30/* Interrupt handlers registered during init_IRQ */ 28/* Interrupt handlers registered during init_IRQ */
31extern void apic_timer_interrupt(void); 29extern void apic_timer_interrupt(void);
32extern void error_interrupt(void); 30extern void error_interrupt(void);
@@ -58,7 +56,7 @@ extern void make_8259A_irq(unsigned int irq);
58extern void init_8259A(int aeoi); 56extern void init_8259A(int aeoi);
59 57
60/* IOAPIC */ 58/* IOAPIC */
61#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) 59#define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1<<(x)) & io_apic_irqs))
62extern unsigned long io_apic_irqs; 60extern unsigned long io_apic_irqs;
63 61
64extern void init_VISWS_APIC_irqs(void); 62extern void init_VISWS_APIC_irqs(void);
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 43f95d7b13af..e5be9f35ea54 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3165,6 +3165,7 @@ static int __init ioapic_init_sysfs(void)
3165 3165
3166device_initcall(ioapic_init_sysfs); 3166device_initcall(ioapic_init_sysfs);
3167 3167
3168static int nr_irqs_gsi = NR_IRQS_LEGACY;
3168/* 3169/*
3169 * Dynamic irq allocate and deallocation 3170 * Dynamic irq allocate and deallocation
3170 */ 3171 */
@@ -3179,11 +3180,11 @@ unsigned int create_irq_nr(unsigned int irq_want)
3179 struct irq_desc *desc_new = NULL; 3180 struct irq_desc *desc_new = NULL;
3180 3181
3181 irq = 0; 3182 irq = 0;
3183 if (irq_want < nr_irqs_gsi)
3184 irq_want = nr_irqs_gsi;
3185
3182 spin_lock_irqsave(&vector_lock, flags); 3186 spin_lock_irqsave(&vector_lock, flags);
3183 for (new = irq_want; new < nr_irqs; new++) { 3187 for (new = irq_want; new < nr_irqs; new++) {
3184 if (platform_legacy_irq(new))
3185 continue;
3186
3187 desc_new = irq_to_desc_alloc_cpu(new, cpu); 3188 desc_new = irq_to_desc_alloc_cpu(new, cpu);
3188 if (!desc_new) { 3189 if (!desc_new) {
3189 printk(KERN_INFO "can not get irq_desc for %d\n", new); 3190 printk(KERN_INFO "can not get irq_desc for %d\n", new);
@@ -3208,7 +3209,6 @@ unsigned int create_irq_nr(unsigned int irq_want)
3208 return irq; 3209 return irq;
3209} 3210}
3210 3211
3211static int nr_irqs_gsi = NR_IRQS_LEGACY;
3212int create_irq(void) 3212int create_irq(void)
3213{ 3213{
3214 unsigned int irq_want; 3214 unsigned int irq_want;