[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Ensure the static correspondence IRQ0<->FIRST_DEVICE_VECTOR is



ChangeSet 1.1482, 2005/05/20 11:29:43+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Ensure the static correspondence IRQ0<->FIRST_DEVICE_VECTOR is
        reflected in the vector_irq[] and irq_vector[] arrays.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 arch/x86/i8259.c      |    4 ++--
 arch/x86/io_apic.c    |    2 +-
 arch/x86/vmx.c        |    1 -
 include/asm-x86/irq.h |    1 +
 4 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c      2005-05-20 07:03:42 -04:00
+++ b/xen/arch/x86/i8259.c      2005-05-20 07:03:42 -04:00
@@ -391,18 +391,18 @@
         set_intr_gate(FIRST_EXTERNAL_VECTOR+i, interrupt[i]);
     }
 
-#ifdef CONFIG_SMP
     /*
      * IRQ0 must be given a fixed assignment and initialized,
      * because it's used before the IO-APIC is set up.
      */
+    irq_vector[0] = FIRST_DEVICE_VECTOR;
+    vector_irq[FIRST_DEVICE_VECTOR] = 0;
     set_intr_gate(FIRST_DEVICE_VECTOR, interrupt[0]);
 
     /* Various IPI functions. */
     set_intr_gate(EVENT_CHECK_VECTOR, event_check_interrupt);
     set_intr_gate(INVALIDATE_TLB_VECTOR, invalidate_interrupt);
     set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
-#endif 
 
     /* Self-generated IPI for local APIC timer. */
     set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
diff -Nru a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    2005-05-20 07:03:42 -04:00
+++ b/xen/arch/x86/io_apic.c    2005-05-20 07:03:42 -04:00
@@ -1047,7 +1047,7 @@
 }
 
 /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
-u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
+u8 irq_vector[NR_IRQ_VECTORS];
 
 int assign_irq_vector(int irq)
 {
diff -Nru a/xen/arch/x86/vmx.c b/xen/arch/x86/vmx.c
--- a/xen/arch/x86/vmx.c        2005-05-20 07:03:42 -04:00
+++ b/xen/arch/x86/vmx.c        2005-05-20 07:03:42 -04:00
@@ -1176,7 +1176,6 @@
     }
     case EXIT_REASON_EXTERNAL_INTERRUPT: 
     {
-        extern int vector_irq[];
         extern asmlinkage void do_IRQ(struct cpu_user_regs *);
         extern void smp_apic_timer_interrupt(struct cpu_user_regs *);
         extern void timer_interrupt(int, void *, struct cpu_user_regs *);
diff -Nru a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h 2005-05-20 07:03:42 -04:00
+++ b/xen/include/asm-x86/irq.h 2005-05-20 07:03:42 -04:00
@@ -12,6 +12,7 @@
 extern void disable_irq_nosync(unsigned int);
 extern void enable_irq(unsigned int);
 
+extern int vector_irq[NR_VECTORS];
 extern u8 irq_vector[NR_IRQ_VECTORS];
 #define IO_APIC_VECTOR(irq)     irq_vector[irq]
 #define AUTO_ASSIGN             -1

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.