aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/io_apic.c12
-rw-r--r--arch/x86_64/kernel/io_apic.c8
-rw-r--r--include/asm-i386/hw_irq.h3
-rw-r--r--include/asm-x86_64/hw_irq.h2
4 files changed, 10 insertions, 15 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index b7287fb499f3..cd082c36ca03 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1184,8 +1184,8 @@ static int __assign_irq_vector(int irq)
1184 1184
1185 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 1185 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
1186 1186
1187 if (IO_APIC_VECTOR(irq) > 0) 1187 if (irq_vector[irq] > 0)
1188 return IO_APIC_VECTOR(irq); 1188 return irq_vector[irq];
1189 1189
1190 current_vector += 8; 1190 current_vector += 8;
1191 if (current_vector == SYSCALL_VECTOR) 1191 if (current_vector == SYSCALL_VECTOR)
@@ -1199,7 +1199,7 @@ static int __assign_irq_vector(int irq)
1199 } 1199 }
1200 1200
1201 vector = current_vector; 1201 vector = current_vector;
1202 IO_APIC_VECTOR(irq) = vector; 1202 irq_vector[irq] = vector;
1203 1203
1204 return vector; 1204 return vector;
1205} 1205}
@@ -1967,7 +1967,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
1967 * operation to prevent an edge-triggered interrupt escaping meanwhile. 1967 * operation to prevent an edge-triggered interrupt escaping meanwhile.
1968 * The idea is from Manfred Spraul. --macro 1968 * The idea is from Manfred Spraul. --macro
1969 */ 1969 */
1970 i = IO_APIC_VECTOR(irq); 1970 i = irq_vector[irq];
1971 1971
1972 v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); 1972 v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
1973 1973
@@ -1984,7 +1984,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
1984 1984
1985static int ioapic_retrigger_irq(unsigned int irq) 1985static int ioapic_retrigger_irq(unsigned int irq)
1986{ 1986{
1987 send_IPI_self(IO_APIC_VECTOR(irq)); 1987 send_IPI_self(irq_vector[irq]);
1988 1988
1989 return 1; 1989 return 1;
1990} 1990}
@@ -2020,7 +2020,7 @@ static inline void init_IO_APIC_traps(void)
2020 */ 2020 */
2021 for (irq = 0; irq < NR_IRQS ; irq++) { 2021 for (irq = 0; irq < NR_IRQS ; irq++) {
2022 int tmp = irq; 2022 int tmp = irq;
2023 if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { 2023 if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
2024 /* 2024 /*
2025 * Hmm.. We don't have an entry for this, 2025 * Hmm.. We don't have an entry for this,
2026 * so default to an old-fashioned 8259 2026 * so default to an old-fashioned 8259
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 91728d9d3472..9c3b9b19d699 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -587,8 +587,8 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
587 587
588 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 588 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
589 589
590 if (IO_APIC_VECTOR(irq) > 0) 590 if (irq_vector[irq] > 0)
591 old_vector = IO_APIC_VECTOR(irq); 591 old_vector = irq_vector[irq];
592 if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) { 592 if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) {
593 return old_vector; 593 return old_vector;
594 } 594 }
@@ -620,7 +620,7 @@ next:
620 } 620 }
621 per_cpu(vector_irq, cpu)[vector] = irq; 621 per_cpu(vector_irq, cpu)[vector] = irq;
622 vector |= cpu << 8; 622 vector |= cpu << 8;
623 IO_APIC_VECTOR(irq) = vector; 623 irq_vector[irq] = vector;
624 return vector; 624 return vector;
625 } 625 }
626 return -ENOSPC; 626 return -ENOSPC;
@@ -1289,7 +1289,7 @@ static inline void init_IO_APIC_traps(void)
1289 */ 1289 */
1290 for (irq = 0; irq < NR_IRQS ; irq++) { 1290 for (irq = 0; irq < NR_IRQS ; irq++) {
1291 int tmp = irq; 1291 int tmp = irq;
1292 if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { 1292 if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
1293 /* 1293 /*
1294 * Hmm.. We don't have an entry for this, 1294 * Hmm.. We don't have an entry for this,
1295 * so default to an old-fashioned 8259 1295 * so default to an old-fashioned 8259
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 8806c7e002a7..0bedbdf5e907 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -26,9 +26,6 @@
26 * Interrupt entry/exit code at both C and assembly level 26 * Interrupt entry/exit code at both C and assembly level
27 */ 27 */
28 28
29extern u8 irq_vector[NR_IRQ_VECTORS];
30#define IO_APIC_VECTOR(irq) (irq_vector[irq])
31
32extern void (*interrupt[NR_IRQS])(void); 29extern void (*interrupt[NR_IRQS])(void);
33 30
34#ifdef CONFIG_SMP 31#ifdef CONFIG_SMP
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h
index 53d0d9fd10d6..792dd52fcd70 100644
--- a/include/asm-x86_64/hw_irq.h
+++ b/include/asm-x86_64/hw_irq.h
@@ -74,10 +74,8 @@
74 74
75 75
76#ifndef __ASSEMBLY__ 76#ifndef __ASSEMBLY__
77extern unsigned int irq_vector[NR_IRQ_VECTORS];
78typedef int vector_irq_t[NR_VECTORS]; 77typedef int vector_irq_t[NR_VECTORS];
79DECLARE_PER_CPU(vector_irq_t, vector_irq); 78DECLARE_PER_CPU(vector_irq_t, vector_irq);
80#define IO_APIC_VECTOR(irq) (irq_vector[irq])
81 79
82/* 80/*
83 * Various low-level irq details needed by irq.c, process.c, 81 * Various low-level irq details needed by irq.c, process.c,