1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/2892ca2b9c17
2 # HG changeset 748 patch
3 # User Keir Fraser <keir.fraser@citrix.com>
5 # Node ID 2892ca2b9c17857f6922e803406711881988d850
6 # Parent 39a8680e7a70a28ce639c507fb6a9bc0aa7d8f14
7 Subject: linux/x86: cleanup IO-APIC code
8 Patch-mainline: obsolete
10 - get 32-bit code in sync with 64-bit wrt ExtINT pin detection being
12 - eliminate build warnings resulting from c/s 725
14 Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 Index: head-2008-12-01/arch/x86/kernel/io_apic_32-xen.c
17 ===================================================================
18 --- head-2008-12-01.orig/arch/x86/kernel/io_apic_32-xen.c 2008-11-25 12:22:34.000000000 +0100
19 +++ head-2008-12-01/arch/x86/kernel/io_apic_32-xen.c 2008-12-01 11:28:17.000000000 +0100
20 @@ -87,8 +87,10 @@ static inline void xen_io_apic_write(uns
21 int (*ioapic_renumber_irq)(int ioapic, int irq);
22 atomic_t irq_mis_count;
25 /* Where if anywhere is the i8259 connect in external int mode */
26 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
29 static DEFINE_SPINLOCK(ioapic_lock);
30 static DEFINE_SPINLOCK(vector_lock);
31 @@ -793,6 +795,7 @@ static int find_irq_entry(int apic, int
37 * Find the pin to which IRQ[irq] (ISA) is connected
39 @@ -842,6 +845,7 @@ static int __init find_isa_irq_apic(int
46 * Find a specific PCI IRQ entry.
47 @@ -1687,7 +1691,9 @@ void /*__init*/ print_PIC(void)
48 static void __init enable_IO_APIC(void)
50 union IO_APIC_reg_01 reg_01;
52 int i8259_apic, i8259_pin;
57 @@ -1708,6 +1714,7 @@ static void __init enable_IO_APIC(void)
58 spin_unlock_irqrestore(&ioapic_lock, flags);
59 nr_ioapic_registers[apic] = reg_01.bits.entries+1;
62 for(apic = 0; apic < nr_ioapics; apic++) {
64 /* See if any of the pins is in ExtINT mode */
65 @@ -1749,6 +1756,7 @@ static void __init enable_IO_APIC(void)
67 printk(KERN_WARNING "ExtINT in hardware and MP table differ\n");
72 * Do not trust the IO-APIC being empty at bootup
73 @@ -2517,6 +2525,8 @@ static int __init io_apic_bug_finalize(v
75 late_initcall(io_apic_bug_finalize);
79 struct sysfs_ioapic_data {
80 struct sys_device dev;
81 struct IO_APIC_route_entry entry[0];
82 @@ -2570,10 +2580,8 @@ static int ioapic_resume(struct sys_devi
84 static struct sysdev_class ioapic_sysdev_class = {
85 set_kset_name("ioapic"),
87 .suspend = ioapic_suspend,
88 .resume = ioapic_resume,
92 static int __init ioapic_init_sysfs(void)
93 @@ -2611,6 +2619,8 @@ static int __init ioapic_init_sysfs(void
95 device_initcall(ioapic_init_sysfs);
97 +#endif /* CONFIG_XEN */
99 /* --------------------------------------------------------------------------
100 ACPI-based IOAPIC Configuration
101 -------------------------------------------------------------------------- */
102 Index: head-2008-12-01/arch/x86/kernel/io_apic_64-xen.c
103 ===================================================================
104 --- head-2008-12-01.orig/arch/x86/kernel/io_apic_64-xen.c 2008-11-25 12:22:34.000000000 +0100
105 +++ head-2008-12-01/arch/x86/kernel/io_apic_64-xen.c 2008-12-01 11:28:17.000000000 +0100
106 @@ -2054,6 +2054,8 @@ void __init setup_IO_APIC(void)
112 struct sysfs_ioapic_data {
113 struct sys_device dev;
114 struct IO_APIC_route_entry entry[0];
115 @@ -2107,10 +2109,8 @@ static int ioapic_resume(struct sys_devi
117 static struct sysdev_class ioapic_sysdev_class = {
118 set_kset_name("ioapic"),
120 .suspend = ioapic_suspend,
121 .resume = ioapic_resume,
125 static int __init ioapic_init_sysfs(void)
126 @@ -2148,6 +2148,8 @@ static int __init ioapic_init_sysfs(void
128 device_initcall(ioapic_init_sysfs);
130 +#endif /* CONFIG_XEN */
132 /* --------------------------------------------------------------------------
133 ACPI-based IOAPIC Configuration
134 -------------------------------------------------------------------------- */