]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i386/x86_64: Remove global IO_APIC_VECTOR
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 8 Oct 2006 13:43:46 +0000 (07:43 -0600)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 8 Oct 2006 19:24:02 +0000 (12:24 -0700)
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: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/io_apic.c
arch/x86_64/kernel/io_apic.c
include/asm-i386/hw_irq.h
include/asm-x86_64/hw_irq.h

index b7287fb499f3f0537b1afd2111e3788976f94aa7..cd082c36ca0368120e4da0b637028c9333d997c3 100644 (file)
@@ -1184,8 +1184,8 @@ static int __assign_irq_vector(int irq)
 
        BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
 
-       if (IO_APIC_VECTOR(irq) > 0)
-               return IO_APIC_VECTOR(irq);
+       if (irq_vector[irq] > 0)
+               return irq_vector[irq];
 
        current_vector += 8;
        if (current_vector == SYSCALL_VECTOR)
@@ -1199,7 +1199,7 @@ static int __assign_irq_vector(int irq)
        }
 
        vector = current_vector;
-       IO_APIC_VECTOR(irq) = vector;
+       irq_vector[irq] = vector;
 
        return vector;
 }
@@ -1967,7 +1967,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
  * operation to prevent an edge-triggered interrupt escaping meanwhile.
  * The idea is from Manfred Spraul.  --macro
  */
-       i = IO_APIC_VECTOR(irq);
+       i = irq_vector[irq];
 
        v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
 
@@ -1984,7 +1984,7 @@ static void ack_ioapic_quirk_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;
 }
@@ -2020,7 +2020,7 @@ static inline void init_IO_APIC_traps(void)
         */
        for (irq = 0; irq < NR_IRQS ; 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,
                         * so default to an old-fashioned 8259
index 91728d9d34724fdcd175d83fce1c5d08290fe0dd..9c3b9b19d699766e7ef3f0a065e9a62d026463ca 100644 (file)
@@ -587,8 +587,8 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
 
        BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
 
-       if (IO_APIC_VECTOR(irq) > 0)
-               old_vector = IO_APIC_VECTOR(irq);
+       if (irq_vector[irq] > 0)
+               old_vector = irq_vector[irq];
        if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) {
                return old_vector;
        }
@@ -620,7 +620,7 @@ next:
                }
                per_cpu(vector_irq, cpu)[vector] = irq;
                vector |= cpu << 8;
-               IO_APIC_VECTOR(irq) = vector;
+               irq_vector[irq] = vector;
                return vector;
        }
        return -ENOSPC;
@@ -1289,7 +1289,7 @@ static inline void init_IO_APIC_traps(void)
         */
        for (irq = 0; irq < NR_IRQS ; 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,
                         * so default to an old-fashioned 8259
index 8806c7e002a770bb88b0dea5aecdb97c28911ae4..0bedbdf5e9078af5d579f80832a057911067f6b8 100644 (file)
@@ -26,9 +26,6 @@
  * 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);
 
 #ifdef CONFIG_SMP
index 53d0d9fd10d62c5986d65644a5251121f35b2c27..792dd52fcd702b0ec45a719845d6da5e46c8deed 100644 (file)
 
 
 #ifndef __ASSEMBLY__
-extern unsigned int irq_vector[NR_IRQ_VECTORS];
 typedef int vector_irq_t[NR_VECTORS];
 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,