Commit b940d22d authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds

[PATCH] i386/x86_64: Remove global IO_APIC_VECTOR

Which vector an irq is assigned to now varies dynamically and is
not needed outside of io_apic.c.  So remove the possibility
of accessing the information outside of io_apic.c and remove
the silly macro that makes looking for users of irq_vector
difficult.

The fact this compiles ensures there aren't any more pieces
of the old CONFIG_PCI_MSI weirdness that I failed to remove.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7da5d406
...@@ -1184,8 +1184,8 @@ static int __assign_irq_vector(int irq) ...@@ -1184,8 +1184,8 @@ static int __assign_irq_vector(int irq)
BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
if (IO_APIC_VECTOR(irq) > 0) if (irq_vector[irq] > 0)
return IO_APIC_VECTOR(irq); return irq_vector[irq];
current_vector += 8; current_vector += 8;
if (current_vector == SYSCALL_VECTOR) if (current_vector == SYSCALL_VECTOR)
...@@ -1199,7 +1199,7 @@ static int __assign_irq_vector(int irq) ...@@ -1199,7 +1199,7 @@ static int __assign_irq_vector(int irq)
} }
vector = current_vector; vector = current_vector;
IO_APIC_VECTOR(irq) = vector; irq_vector[irq] = vector;
return vector; return vector;
} }
...@@ -1967,7 +1967,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq) ...@@ -1967,7 +1967,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
* operation to prevent an edge-triggered interrupt escaping meanwhile. * operation to prevent an edge-triggered interrupt escaping meanwhile.
* The idea is from Manfred Spraul. --macro * The idea is from Manfred Spraul. --macro
*/ */
i = IO_APIC_VECTOR(irq); i = irq_vector[irq];
v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
...@@ -1984,7 +1984,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq) ...@@ -1984,7 +1984,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
static int ioapic_retrigger_irq(unsigned int irq) static int ioapic_retrigger_irq(unsigned int irq)
{ {
send_IPI_self(IO_APIC_VECTOR(irq)); send_IPI_self(irq_vector[irq]);
return 1; return 1;
} }
...@@ -2020,7 +2020,7 @@ static inline void init_IO_APIC_traps(void) ...@@ -2020,7 +2020,7 @@ static inline void init_IO_APIC_traps(void)
*/ */
for (irq = 0; irq < NR_IRQS ; irq++) { for (irq = 0; irq < NR_IRQS ; irq++) {
int tmp = irq; int tmp = irq;
if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
/* /*
* Hmm.. We don't have an entry for this, * Hmm.. We don't have an entry for this,
* so default to an old-fashioned 8259 * so default to an old-fashioned 8259
......
...@@ -587,8 +587,8 @@ static int __assign_irq_vector(int irq, cpumask_t mask) ...@@ -587,8 +587,8 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
if (IO_APIC_VECTOR(irq) > 0) if (irq_vector[irq] > 0)
old_vector = IO_APIC_VECTOR(irq); old_vector = irq_vector[irq];
if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) { if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) {
return old_vector; return old_vector;
} }
...@@ -620,7 +620,7 @@ static int __assign_irq_vector(int irq, cpumask_t mask) ...@@ -620,7 +620,7 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
} }
per_cpu(vector_irq, cpu)[vector] = irq; per_cpu(vector_irq, cpu)[vector] = irq;
vector |= cpu << 8; vector |= cpu << 8;
IO_APIC_VECTOR(irq) = vector; irq_vector[irq] = vector;
return vector; return vector;
} }
return -ENOSPC; return -ENOSPC;
...@@ -1289,7 +1289,7 @@ static inline void init_IO_APIC_traps(void) ...@@ -1289,7 +1289,7 @@ static inline void init_IO_APIC_traps(void)
*/ */
for (irq = 0; irq < NR_IRQS ; irq++) { for (irq = 0; irq < NR_IRQS ; irq++) {
int tmp = irq; int tmp = irq;
if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
/* /*
* Hmm.. We don't have an entry for this, * Hmm.. We don't have an entry for this,
* so default to an old-fashioned 8259 * so default to an old-fashioned 8259
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
* Interrupt entry/exit code at both C and assembly level * Interrupt entry/exit code at both C and assembly level
*/ */
extern u8 irq_vector[NR_IRQ_VECTORS];
#define IO_APIC_VECTOR(irq) (irq_vector[irq])
extern void (*interrupt[NR_IRQS])(void); extern void (*interrupt[NR_IRQS])(void);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -74,10 +74,8 @@ ...@@ -74,10 +74,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
extern unsigned int irq_vector[NR_IRQ_VECTORS];
typedef int vector_irq_t[NR_VECTORS]; typedef int vector_irq_t[NR_VECTORS];
DECLARE_PER_CPU(vector_irq_t, vector_irq); DECLARE_PER_CPU(vector_irq_t, vector_irq);
#define IO_APIC_VECTOR(irq) (irq_vector[irq])
/* /*
* Various low-level irq details needed by irq.c, process.c, * Various low-level irq details needed by irq.c, process.c,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment