ia64/xen-unstable

changeset 5400:d2b6518a768a

bitkeeper revision 1.1702 (42a86f65gBB_DT3imKRA_tkGBTiKQA)

Fix io_apic -> i8259 irq handling transition.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 09 16:33:41 2005 +0000 (2005-06-09)
parents 849b58da37b7
children 260c108b2c0b
files xen/arch/x86/i8259.c xen/arch/x86/io_apic.c xen/arch/x86/irq.c xen/include/asm-x86/irq.h
line diff
     1.1 --- a/xen/arch/x86/i8259.c	Thu Jun 09 16:08:20 2005 +0000
     1.2 +++ b/xen/arch/x86/i8259.c	Thu Jun 09 16:33:41 2005 +0000
     1.3 @@ -204,13 +204,6 @@ int i8259A_irq_pending(unsigned int irq)
     1.4      return ret;
     1.5  }
     1.6  
     1.7 -void make_8259A_irq(unsigned int irq)
     1.8 -{
     1.9 -    disable_irq_nosync(irq);
    1.10 -    io_apic_irqs &= ~(1<<irq);
    1.11 -    enable_irq(irq);
    1.12 -}
    1.13 -
    1.14  /*
    1.15   * This function assumes to be called rarely. Switching between
    1.16   * 8259A registers is slow.
     2.1 --- a/xen/arch/x86/io_apic.c	Thu Jun 09 16:08:20 2005 +0000
     2.2 +++ b/xen/arch/x86/io_apic.c	Thu Jun 09 16:33:41 2005 +0000
     2.3 @@ -34,6 +34,8 @@
     2.4  #include <mach_apic.h>
     2.5  #include <io_ports.h>
     2.6  
     2.7 +#define make_8259A_irq(irq) (io_apic_irqs &= ~(1<<(irq)))
     2.8 +
     2.9  int (*ioapic_renumber_irq)(int ioapic, int irq);
    2.10  atomic_t irq_mis_count;
    2.11  
    2.12 @@ -1278,8 +1280,8 @@ static struct hw_interrupt_type ioapic_l
    2.13  static inline void init_IO_APIC_traps(void)
    2.14  {
    2.15      int irq;
    2.16 -    for (irq = 0; irq < NR_IRQS ; irq++)
    2.17 -        if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq) && (irq < 16))
    2.18 +    for (irq = 0; irq < 16 ; irq++)
    2.19 +        if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq))
    2.20              make_8259A_irq(irq);
    2.21  }
    2.22  
     3.1 --- a/xen/arch/x86/irq.c	Thu Jun 09 16:08:20 2005 +0000
     3.2 +++ b/xen/arch/x86/irq.c	Thu Jun 09 16:33:41 2005 +0000
     3.3 @@ -44,42 +44,6 @@ struct hw_interrupt_type no_irq_type = {
     3.4  
     3.5  atomic_t irq_err_count;
     3.6  
     3.7 -inline void disable_irq_nosync(unsigned int irq)
     3.8 -{
     3.9 -    unsigned int  vector = irq_to_vector(irq);
    3.10 -    irq_desc_t   *desc = &irq_desc[vector];
    3.11 -    unsigned long flags;
    3.12 -
    3.13 -    spin_lock_irqsave(&desc->lock, flags);
    3.14 -
    3.15 -    if ( desc->depth++ == 0 )
    3.16 -    {
    3.17 -        desc->status |= IRQ_DISABLED;
    3.18 -        desc->handler->disable(vector);
    3.19 -    }
    3.20 -
    3.21 -    spin_unlock_irqrestore(&desc->lock, flags);
    3.22 -}
    3.23 -
    3.24 -void enable_irq(unsigned int irq)
    3.25 -{
    3.26 -    unsigned int  vector = irq_to_vector(irq);
    3.27 -    irq_desc_t   *desc = &irq_desc[vector];
    3.28 -    unsigned long flags;
    3.29 -
    3.30 -    spin_lock_irqsave(&desc->lock, flags);
    3.31 -
    3.32 -    if ( --desc->depth == 0 )
    3.33 -    {
    3.34 -        desc->status &= ~IRQ_DISABLED;
    3.35 -        if ( (desc->status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING )
    3.36 -            desc->status |= IRQ_REPLAY;
    3.37 -        desc->handler->enable(vector);
    3.38 -    }
    3.39 -
    3.40 -    spin_unlock_irqrestore(&desc->lock, flags);
    3.41 -}
    3.42 -
    3.43  asmlinkage void do_IRQ(struct cpu_user_regs *regs)
    3.44  {
    3.45      unsigned int      vector = regs->entry_vector;
     4.1 --- a/xen/include/asm-x86/irq.h	Thu Jun 09 16:08:20 2005 +0000
     4.2 +++ b/xen/include/asm-x86/irq.h	Thu Jun 09 16:33:41 2005 +0000
     4.3 @@ -18,9 +18,6 @@
     4.4      (IO_APIC_IRQ(irq) ? IO_APIC_VECTOR(irq) : LEGACY_VECTOR(irq))
     4.5  #define vector_to_irq(vec)  (vector_irq[vec])
     4.6  
     4.7 -extern void disable_irq_nosync(unsigned int);
     4.8 -extern void enable_irq(unsigned int);
     4.9 -
    4.10  extern int vector_irq[NR_VECTORS];
    4.11  extern u8 irq_vector[NR_IRQ_VECTORS];
    4.12  #define AUTO_ASSIGN             -1
    4.13 @@ -30,7 +27,6 @@ extern u8 irq_vector[NR_IRQ_VECTORS];
    4.14  void disable_8259A_irq(unsigned int irq);
    4.15  void enable_8259A_irq(unsigned int irq);
    4.16  int i8259A_irq_pending(unsigned int irq);
    4.17 -void make_8259A_irq(unsigned int irq);
    4.18  void init_8259A(int aeoi);
    4.19  
    4.20  void setup_IO_APIC(void);