]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/60022_748-x86-ioapic-cleanup.patch1
Corrected links and text on ids.cgi
[people/pmueller/ipfire-2.x.git] / src / patches / 60022_748-x86-ioapic-cleanup.patch1
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>
4 # Date 1227879081 0
5 # Node ID 2892ca2b9c17857f6922e803406711881988d850
6 # Parent 39a8680e7a70a28ce639c507fb6a9bc0aa7d8f14
7 Subject: linux/x86: cleanup IO-APIC code
8 Patch-mainline: obsolete
9
10 - get 32-bit code in sync with 64-bit wrt ExtINT pin detection being
11 unnecessary
12 - eliminate build warnings resulting from c/s 725
13
14 Signed-off-by: Jan Beulich <jbeulich@novell.com>
15
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;
23
24 +#ifndef CONFIG_XEN
25 /* Where if anywhere is the i8259 connect in external int mode */
26 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
27 +#endif
28
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
32 return -1;
33 }
34
35 +#ifndef CONFIG_XEN
36 /*
37 * Find the pin to which IRQ[irq] (ISA) is connected
38 */
39 @@ -842,6 +845,7 @@ static int __init find_isa_irq_apic(int
40
41 return -1;
42 }
43 +#endif
44
45 /*
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)
49 {
50 union IO_APIC_reg_01 reg_01;
51 +#ifndef CONFIG_XEN
52 int i8259_apic, i8259_pin;
53 +#endif
54 int i, apic;
55 unsigned long flags;
56
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;
60 }
61 +#ifndef CONFIG_XEN
62 for(apic = 0; apic < nr_ioapics; apic++) {
63 int pin;
64 /* See if any of the pins is in ExtINT mode */
65 @@ -1749,6 +1756,7 @@ static void __init enable_IO_APIC(void)
66 {
67 printk(KERN_WARNING "ExtINT in hardware and MP table differ\n");
68 }
69 +#endif
70
71 /*
72 * Do not trust the IO-APIC being empty at bootup
73 @@ -2517,6 +2525,8 @@ static int __init io_apic_bug_finalize(v
74
75 late_initcall(io_apic_bug_finalize);
76
77 +#ifndef CONFIG_XEN
78 +
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
83
84 static struct sysdev_class ioapic_sysdev_class = {
85 set_kset_name("ioapic"),
86 -#ifndef CONFIG_XEN
87 .suspend = ioapic_suspend,
88 .resume = ioapic_resume,
89 -#endif
90 };
91
92 static int __init ioapic_init_sysfs(void)
93 @@ -2611,6 +2619,8 @@ static int __init ioapic_init_sysfs(void
94
95 device_initcall(ioapic_init_sysfs);
96
97 +#endif /* CONFIG_XEN */
98 +
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)
107 print_IO_APIC();
108 }
109
110 +#ifndef CONFIG_XEN
111 +
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
116
117 static struct sysdev_class ioapic_sysdev_class = {
118 set_kset_name("ioapic"),
119 -#ifndef CONFIG_XEN
120 .suspend = ioapic_suspend,
121 .resume = ioapic_resume,
122 -#endif
123 };
124
125 static int __init ioapic_init_sysfs(void)
126 @@ -2148,6 +2148,8 @@ static int __init ioapic_init_sysfs(void
127
128 device_initcall(ioapic_init_sysfs);
129
130 +#endif /* CONFIG_XEN */
131 +
132 /* --------------------------------------------------------------------------
133 ACPI-based IOAPIC Configuration
134 -------------------------------------------------------------------------- */