diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-02-23 06:38:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 13:34:08 -0500 |
commit | bc5e81a1519abc69472bb67deace7bb1ac09d65a (patch) | |
tree | 7d7d22f638e1d50ed1f3774f114b8d9dca1b2d56 /arch/x86_64/kernel/i8259.c | |
parent | b93179bdfcbb0154e63e57194e2648bd0ff648a7 (diff) |
[PATCH] x86_64 irq: Add constants for the reserved IRQ vectors.
For the ISA irqs we reserve 16 vectors. This patch adds constants for
those vectors and modifies the code to use them. Making the code a
little clearer and making it possible to move these vectors in the future.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel/i8259.c')
-rw-r--r-- | arch/x86_64/kernel/i8259.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c index 103517d9f8e6..45d85630196a 100644 --- a/arch/x86_64/kernel/i8259.c +++ b/arch/x86_64/kernel/i8259.c | |||
@@ -299,7 +299,7 @@ void init_8259A(int auto_eoi) | |||
299 | * outb_p - this has to work on a wide range of PC hardware. | 299 | * outb_p - this has to work on a wide range of PC hardware. |
300 | */ | 300 | */ |
301 | outb_p(0x11, 0x20); /* ICW1: select 8259A-1 init */ | 301 | outb_p(0x11, 0x20); /* ICW1: select 8259A-1 init */ |
302 | outb_p(0x20 + 0, 0x21); /* ICW2: 8259A-1 IR0-7 mapped to 0x20-0x27 */ | 302 | outb_p(IRQ0_VECTOR, 0x21); /* ICW2: 8259A-1 IR0-7 mapped to 0x20-0x27 */ |
303 | outb_p(0x04, 0x21); /* 8259A-1 (the master) has a slave on IR2 */ | 303 | outb_p(0x04, 0x21); /* 8259A-1 (the master) has a slave on IR2 */ |
304 | if (auto_eoi) | 304 | if (auto_eoi) |
305 | outb_p(0x03, 0x21); /* master does Auto EOI */ | 305 | outb_p(0x03, 0x21); /* master does Auto EOI */ |
@@ -307,7 +307,7 @@ void init_8259A(int auto_eoi) | |||
307 | outb_p(0x01, 0x21); /* master expects normal EOI */ | 307 | outb_p(0x01, 0x21); /* master expects normal EOI */ |
308 | 308 | ||
309 | outb_p(0x11, 0xA0); /* ICW1: select 8259A-2 init */ | 309 | outb_p(0x11, 0xA0); /* ICW1: select 8259A-2 init */ |
310 | outb_p(0x20 + 8, 0xA1); /* ICW2: 8259A-2 IR0-7 mapped to 0x28-0x2f */ | 310 | outb_p(IRQ8_VECTOR, 0xA1); /* ICW2: 8259A-2 IR0-7 mapped to 0x28-0x2f */ |
311 | outb_p(0x02, 0xA1); /* 8259A-2 is a slave on master's IR2 */ | 311 | outb_p(0x02, 0xA1); /* 8259A-2 is a slave on master's IR2 */ |
312 | outb_p(0x01, 0xA1); /* (slave's support for AEOI in flat mode | 312 | outb_p(0x01, 0xA1); /* (slave's support for AEOI in flat mode |
313 | is to be investigated) */ | 313 | is to be investigated) */ |
@@ -398,24 +398,24 @@ device_initcall(i8259A_init_sysfs); | |||
398 | 398 | ||
399 | static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL}; | 399 | static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL}; |
400 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { | 400 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { |
401 | [0 ... FIRST_EXTERNAL_VECTOR - 1] = -1, | 401 | [0 ... IRQ0_VECTOR - 1] = -1, |
402 | [FIRST_EXTERNAL_VECTOR + 0] = 0, | 402 | [IRQ0_VECTOR] = 0, |
403 | [FIRST_EXTERNAL_VECTOR + 1] = 1, | 403 | [IRQ1_VECTOR] = 1, |
404 | [FIRST_EXTERNAL_VECTOR + 2] = 2, | 404 | [IRQ2_VECTOR] = 2, |
405 | [FIRST_EXTERNAL_VECTOR + 3] = 3, | 405 | [IRQ3_VECTOR] = 3, |
406 | [FIRST_EXTERNAL_VECTOR + 4] = 4, | 406 | [IRQ4_VECTOR] = 4, |
407 | [FIRST_EXTERNAL_VECTOR + 5] = 5, | 407 | [IRQ5_VECTOR] = 5, |
408 | [FIRST_EXTERNAL_VECTOR + 6] = 6, | 408 | [IRQ6_VECTOR] = 6, |
409 | [FIRST_EXTERNAL_VECTOR + 7] = 7, | 409 | [IRQ7_VECTOR] = 7, |
410 | [FIRST_EXTERNAL_VECTOR + 8] = 8, | 410 | [IRQ8_VECTOR] = 8, |
411 | [FIRST_EXTERNAL_VECTOR + 9] = 9, | 411 | [IRQ9_VECTOR] = 9, |
412 | [FIRST_EXTERNAL_VECTOR + 10] = 10, | 412 | [IRQ10_VECTOR] = 10, |
413 | [FIRST_EXTERNAL_VECTOR + 11] = 11, | 413 | [IRQ11_VECTOR] = 11, |
414 | [FIRST_EXTERNAL_VECTOR + 12] = 12, | 414 | [IRQ12_VECTOR] = 12, |
415 | [FIRST_EXTERNAL_VECTOR + 13] = 13, | 415 | [IRQ13_VECTOR] = 13, |
416 | [FIRST_EXTERNAL_VECTOR + 14] = 14, | 416 | [IRQ14_VECTOR] = 14, |
417 | [FIRST_EXTERNAL_VECTOR + 15] = 15, | 417 | [IRQ15_VECTOR] = 15, |
418 | [FIRST_EXTERNAL_VECTOR + 16 ... NR_VECTORS - 1] = -1 | 418 | [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1 |
419 | }; | 419 | }; |
420 | 420 | ||
421 | void __init init_ISA_irqs (void) | 421 | void __init init_ISA_irqs (void) |