ia64/xen-unstable

changeset 5035:5b1f038d3d65

bitkeeper revision 1.1482 (428dbc17RT9NQ-_ttXtXBKQgwnM38g)

Ensure the static correspondence IRQ0<->FIRST_DEVICE_VECTOR is
reflected in the vector_irq[] and irq_vector[] arrays.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 20 10:29:43 2005 +0000 (2005-05-20)
parents 805d6412f908
children 08bcb94afa37
files xen/arch/x86/i8259.c xen/arch/x86/io_apic.c xen/arch/x86/vmx.c xen/include/asm-x86/irq.h
line diff
     1.1 --- a/xen/arch/x86/i8259.c	Fri May 20 10:27:36 2005 +0000
     1.2 +++ b/xen/arch/x86/i8259.c	Fri May 20 10:29:43 2005 +0000
     1.3 @@ -391,18 +391,18 @@ void __init init_IRQ(void)
     1.4          set_intr_gate(FIRST_EXTERNAL_VECTOR+i, interrupt[i]);
     1.5      }
     1.6  
     1.7 -#ifdef CONFIG_SMP
     1.8      /*
     1.9       * IRQ0 must be given a fixed assignment and initialized,
    1.10       * because it's used before the IO-APIC is set up.
    1.11       */
    1.12 +    irq_vector[0] = FIRST_DEVICE_VECTOR;
    1.13 +    vector_irq[FIRST_DEVICE_VECTOR] = 0;
    1.14      set_intr_gate(FIRST_DEVICE_VECTOR, interrupt[0]);
    1.15  
    1.16      /* Various IPI functions. */
    1.17      set_intr_gate(EVENT_CHECK_VECTOR, event_check_interrupt);
    1.18      set_intr_gate(INVALIDATE_TLB_VECTOR, invalidate_interrupt);
    1.19      set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
    1.20 -#endif	
    1.21  
    1.22      /* Self-generated IPI for local APIC timer. */
    1.23      set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
     2.1 --- a/xen/arch/x86/io_apic.c	Fri May 20 10:27:36 2005 +0000
     2.2 +++ b/xen/arch/x86/io_apic.c	Fri May 20 10:29:43 2005 +0000
     2.3 @@ -1047,7 +1047,7 @@ static inline int IO_APIC_irq_trigger(in
     2.4  }
     2.5  
     2.6  /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
     2.7 -u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
     2.8 +u8 irq_vector[NR_IRQ_VECTORS];
     2.9  
    2.10  int assign_irq_vector(int irq)
    2.11  {
     3.1 --- a/xen/arch/x86/vmx.c	Fri May 20 10:27:36 2005 +0000
     3.2 +++ b/xen/arch/x86/vmx.c	Fri May 20 10:29:43 2005 +0000
     3.3 @@ -1176,7 +1176,6 @@ asmlinkage void vmx_vmexit_handler(struc
     3.4      }
     3.5      case EXIT_REASON_EXTERNAL_INTERRUPT: 
     3.6      {
     3.7 -        extern int vector_irq[];
     3.8          extern asmlinkage void do_IRQ(struct cpu_user_regs *);
     3.9          extern void smp_apic_timer_interrupt(struct cpu_user_regs *);
    3.10          extern void timer_interrupt(int, void *, struct cpu_user_regs *);
     4.1 --- a/xen/include/asm-x86/irq.h	Fri May 20 10:27:36 2005 +0000
     4.2 +++ b/xen/include/asm-x86/irq.h	Fri May 20 10:29:43 2005 +0000
     4.3 @@ -12,6 +12,7 @@ extern void disable_irq(unsigned int);
     4.4  extern void disable_irq_nosync(unsigned int);
     4.5  extern void enable_irq(unsigned int);
     4.6  
     4.7 +extern int vector_irq[NR_VECTORS];
     4.8  extern u8 irq_vector[NR_IRQ_VECTORS];
     4.9  #define IO_APIC_VECTOR(irq)     irq_vector[irq]
    4.10  #define AUTO_ASSIGN             -1