diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-02-08 19:18:03 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 03:21:28 -0500 |
commit | abcaa2b8319a7673e76c2391cb5de3045ab1b401 (patch) | |
tree | 9f10c10439bff92787aac5f29c6fc97e5f67b2f0 /arch/x86/kernel/io_apic.c | |
parent | f1ee5548a6507d2b4293635c61ddbf12e2c00e94 (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/x86/kernel/io_apic.c')
-rw-r--r-- | arch/x86/kernel/io_apic.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 | ||
3166 | device_initcall(ioapic_init_sysfs); | 3166 | device_initcall(ioapic_init_sysfs); |
3167 | 3167 | ||
3168 | static 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 | ||
3211 | static int nr_irqs_gsi = NR_IRQS_LEGACY; | ||
3212 | int create_irq(void) | 3212 | int create_irq(void) |
3213 | { | 3213 | { |
3214 | unsigned int irq_want; | 3214 | unsigned int irq_want; |