2
# User Keir Fraser <keir@xen.org>
3
# Date 1286028622 -3600
4
# Node ID f7d54e1d7044a7d3836b017b0806021b1c17ac7a
5
# Parent 7f190f6f1f5a861383fc1a3a877ab63841c00a15
6
x86: fix boot failure (regression from pre-4.0 IRQ handling changes)
8
With the change to index irq_desc[] by IRQ rather than by vector, the
9
prior implicit change of the used flow handler when altering the IRQ
10
routing path to go through the 8259A didn't work anymore, and hence
11
on boards needing the ExtINT delivery workaround failed to boot.
13
Make make_8259A_irq() a real function again, thus allowing the flow
14
handler to be changed there.
16
Also eliminate the generally superfluous and (at least theoretically)
17
dangerous hard coded setting of the flow handler for IRQ0: Earlier
18
code should have set this already based on information coming from
19
ACPI/MPS, and non-standard systems may e.g. have this IRQ level
22
Signed-off-by: Jan Beulich <jbeulich@novell.com>
23
Tested-by: Markus Schuster <ml@markus.schuster.name>
24
xen-unstable changeset: 22222:aed9fd361340
25
xen-unstable date: Sat Oct 02 15:03:15 2010 +0100
27
diff -r 7f190f6f1f5a -r f7d54e1d7044 xen/arch/x86/i8259.c
28
--- a/xen/arch/x86/i8259.c Sat Oct 02 15:10:01 2010 +0100
29
+++ b/xen/arch/x86/i8259.c Sat Oct 02 15:10:22 2010 +0100
31
spin_unlock_irqrestore(&i8259A_lock, flags);
34
+void __init make_8259A_irq(unsigned int irq)
36
+ io_apic_irqs &= ~(1 << irq);
37
+ irq_to_desc(irq)->handler = &i8259A_irq_type;
40
static struct irqaction __read_mostly cascade = { no_action, "cascade", NULL};
42
void __init init_IRQ(void)
43
diff -r 7f190f6f1f5a -r f7d54e1d7044 xen/arch/x86/io_apic.c
44
--- a/xen/arch/x86/io_apic.c Sat Oct 02 15:10:01 2010 +0100
45
+++ b/xen/arch/x86/io_apic.c Sat Oct 02 15:10:22 2010 +0100
48
#include <public/physdev.h>
50
-/* Different to Linux: our implementation can be simpler. */
51
-#define make_8259A_irq(irq) (io_apic_irqs &= ~(1<<(irq)))
53
int (*ioapic_renumber_irq)(int ioapic, int irq);
54
atomic_t irq_mis_count;
58
irq_desc[0].depth = 0;
59
irq_desc[0].status &= ~IRQ_DISABLED;
60
- irq_desc[0].handler = &ioapic_edge_type;
63
* Subtle, code in do_timer_interrupt() expects an AEOI
64
diff -r 7f190f6f1f5a -r f7d54e1d7044 xen/include/asm-x86/irq.h
65
--- a/xen/include/asm-x86/irq.h Sat Oct 02 15:10:01 2010 +0100
66
+++ b/xen/include/asm-x86/irq.h Sat Oct 02 15:10:22 2010 +0100
68
void mask_8259A(void);
69
void unmask_8259A(void);
70
void init_8259A(int aeoi);
71
+void make_8259A_irq(unsigned int irq);
72
int i8259A_suspend(void);
73
int i8259A_resume(void);