debuggers.hg

changeset 22268:aed9fd361340

x86: fix boot failure (regression from pre-4.0 IRQ handling changes)

With the change to index irq_desc[] by IRQ rather than by vector, the
prior implicit change of the used flow handler when altering the IRQ
routing path to go through the 8259A didn't work anymore, and hence
on boards needing the ExtINT delivery workaround failed to boot.

Make make_8259A_irq() a real function again, thus allowing the flow
handler to be changed there.

Also eliminate the generally superfluous and (at least theoretically)
dangerous hard coded setting of the flow handler for IRQ0: Earlier
code should have set this already based on information coming from
ACPI/MPS, and non-standard systems may e.g. have this IRQ level
triggered.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Tested-by: Markus Schuster <ml@markus.schuster.name>
author Keir Fraser <keir@xen.org>
date Sat Oct 02 15:03:15 2010 +0100 (2010-10-02)
parents 3518149c4d5d
children 4beee5779122
files xen/arch/x86/i8259.c xen/arch/x86/io_apic.c xen/include/asm-x86/irq.h
line diff
     1.1 --- a/xen/arch/x86/i8259.c	Sat Oct 02 15:00:05 2010 +0100
     1.2 +++ b/xen/arch/x86/i8259.c	Sat Oct 02 15:03:15 2010 +0100
     1.3 @@ -367,6 +367,12 @@ void __devinit init_8259A(int auto_eoi)
     1.4      spin_unlock_irqrestore(&i8259A_lock, flags);
     1.5  }
     1.6  
     1.7 +void __init make_8259A_irq(unsigned int irq)
     1.8 +{
     1.9 +    io_apic_irqs &= ~(1 << irq);
    1.10 +    irq_to_desc(irq)->handler = &i8259A_irq_type;
    1.11 +}
    1.12 +
    1.13  static struct irqaction __read_mostly cascade = { no_action, "cascade", NULL};
    1.14  
    1.15  void __init init_IRQ(void)
     2.1 --- a/xen/arch/x86/io_apic.c	Sat Oct 02 15:00:05 2010 +0100
     2.2 +++ b/xen/arch/x86/io_apic.c	Sat Oct 02 15:03:15 2010 +0100
     2.3 @@ -38,9 +38,6 @@
     2.4  #include <io_ports.h>
     2.5  #include <public/physdev.h>
     2.6  
     2.7 -/* Different to Linux: our implementation can be simpler. */
     2.8 -#define make_8259A_irq(irq) (io_apic_irqs &= ~(1<<(irq)))
     2.9 -
    2.10  int (*ioapic_renumber_irq)(int ioapic, int irq);
    2.11  atomic_t irq_mis_count;
    2.12  
    2.13 @@ -1929,7 +1926,6 @@ static inline void check_timer(void)
    2.14      
    2.15      irq_desc[0].depth  = 0;
    2.16      irq_desc[0].status &= ~IRQ_DISABLED;
    2.17 -    irq_desc[0].handler = &ioapic_edge_type;
    2.18  
    2.19      /*
    2.20       * Subtle, code in do_timer_interrupt() expects an AEOI
     3.1 --- a/xen/include/asm-x86/irq.h	Sat Oct 02 15:00:05 2010 +0100
     3.2 +++ b/xen/include/asm-x86/irq.h	Sat Oct 02 15:03:15 2010 +0100
     3.3 @@ -91,6 +91,7 @@ int i8259A_irq_pending(unsigned int irq)
     3.4  void mask_8259A(void);
     3.5  void unmask_8259A(void);
     3.6  void init_8259A(int aeoi);
     3.7 +void make_8259A_irq(unsigned int irq);
     3.8  int i8259A_suspend(void);
     3.9  int i8259A_resume(void);
    3.10