diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-12-05 21:58:32 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-08 08:31:52 -0500 |
commit | 99d093d12897562a253540a902bbf65ec16042ac (patch) | |
tree | 34e8ca60b1d47944c7c85b66f84df51526db5f80 /arch/x86/kernel/io_apic.c | |
parent | 0b8f1efad30bd58f89961b82dfe68b9edf8fd2ac (diff) |
x86: use NR_IRQS_LEGACY
Impact: cleanup
Introduce NR_IRQS_LEGACY instead of hard coded number.
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index 9de17f5c1125..9870461ae933 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -847,7 +847,7 @@ EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); | |||
847 | */ | 847 | */ |
848 | static int EISA_ELCR(unsigned int irq) | 848 | static int EISA_ELCR(unsigned int irq) |
849 | { | 849 | { |
850 | if (irq < 16) { | 850 | if (irq < NR_IRQS_LEGACY) { |
851 | unsigned int port = 0x4d0 + (irq >> 3); | 851 | unsigned int port = 0x4d0 + (irq >> 3); |
852 | return (inb(port) >> (irq & 7)) & 1; | 852 | return (inb(port) >> (irq & 7)) & 1; |
853 | } | 853 | } |
@@ -1388,7 +1388,7 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq, | |||
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | ioapic_register_intr(irq, trigger); | 1390 | ioapic_register_intr(irq, trigger); |
1391 | if (irq < 16) | 1391 | if (irq < NR_IRQS_LEGACY) |
1392 | disable_8259A_irq(irq); | 1392 | disable_8259A_irq(irq); |
1393 | 1393 | ||
1394 | ioapic_write_entry(apic, pin, entry); | 1394 | ioapic_write_entry(apic, pin, entry); |
@@ -2080,7 +2080,7 @@ static unsigned int startup_ioapic_irq(unsigned int irq) | |||
2080 | struct irq_cfg *cfg; | 2080 | struct irq_cfg *cfg; |
2081 | 2081 | ||
2082 | spin_lock_irqsave(&ioapic_lock, flags); | 2082 | spin_lock_irqsave(&ioapic_lock, flags); |
2083 | if (irq < 16) { | 2083 | if (irq < NR_IRQS_LEGACY) { |
2084 | disable_8259A_irq(irq); | 2084 | disable_8259A_irq(irq); |
2085 | if (i8259A_irq_pending(irq)) | 2085 | if (i8259A_irq_pending(irq)) |
2086 | was_pending = 1; | 2086 | was_pending = 1; |
@@ -2504,7 +2504,7 @@ static inline void init_IO_APIC_traps(void) | |||
2504 | * so default to an old-fashioned 8259 | 2504 | * so default to an old-fashioned 8259 |
2505 | * interrupt if we can.. | 2505 | * interrupt if we can.. |
2506 | */ | 2506 | */ |
2507 | if (irq < 16) | 2507 | if (irq < NR_IRQS_LEGACY) |
2508 | make_8259A_irq(irq); | 2508 | make_8259A_irq(irq); |
2509 | else | 2509 | else |
2510 | /* Strange. Oh, well.. */ | 2510 | /* Strange. Oh, well.. */ |
@@ -3794,7 +3794,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p | |||
3794 | /* | 3794 | /* |
3795 | * IRQs < 16 are already in the irq_2_pin[] map | 3795 | * IRQs < 16 are already in the irq_2_pin[] map |
3796 | */ | 3796 | */ |
3797 | if (irq >= 16) { | 3797 | if (irq >= NR_IRQS_LEGACY) { |
3798 | cfg = desc->chip_data; | 3798 | cfg = desc->chip_data; |
3799 | add_pin_to_irq_cpu(irq, cpu, ioapic, pin); | 3799 | add_pin_to_irq_cpu(irq, cpu, ioapic, pin); |
3800 | } | 3800 | } |