aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/apic.h2
-rw-r--r--arch/x86/include/asm/genapic.h139
-rw-r--r--arch/x86/include/asm/mach-default/mach_apic.h144
-rw-r--r--arch/x86/include/asm/mach-generic/mach_apic.h8
-rw-r--r--arch/x86/include/asm/smp.h19
-rw-r--r--arch/x86/kernel/acpi/boot.c14
-rw-r--r--arch/x86/kernel/apic.c22
-rw-r--r--arch/x86/kernel/cpu/addon_cpuid_features.c2
-rw-r--r--arch/x86/kernel/cpu/amd.c2
-rw-r--r--arch/x86/kernel/cpu/common.c2
-rw-r--r--arch/x86/kernel/cpu/intel.c2
-rw-r--r--arch/x86/kernel/io_apic.c2
-rw-r--r--arch/x86/kernel/ipi.c2
-rw-r--r--arch/x86/kernel/irq_32.c2
-rw-r--r--arch/x86/kernel/mpparse.c3
-rw-r--r--arch/x86/kernel/setup.c2
-rw-r--r--arch/x86/kernel/smp.c2
-rw-r--r--arch/x86/kernel/smpboot.c2
-rw-r--r--arch/x86/kernel/tlb_uv.c2
-rw-r--r--arch/x86/kernel/visws_quirks.c2
-rw-r--r--arch/x86/mach-generic/default.c2
-rw-r--r--arch/x86/mach-generic/probe.c5
22 files changed, 175 insertions, 207 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 3a3202074c63..6a77068e261a 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -215,7 +215,7 @@ static inline void disable_local_APIC(void) { }
215#define SET_APIC_ID(x) (apic->set_apic_id(x)) 215#define SET_APIC_ID(x) (apic->set_apic_id(x))
216#else 216#else
217 217
218static inline unsigned default_get_apic_id(unsigned long x) 218static inline unsigned default_get_apic_id(unsigned long x)
219{ 219{
220 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); 220 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
221 221
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 1772dad01b1d..ce3655a4948d 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -120,4 +120,143 @@ static inline void default_wait_for_init_deassert(atomic_t *deassert)
120 return; 120 return;
121} 121}
122 122
123extern void generic_bigsmp_probe(void);
124
125
126#ifdef CONFIG_X86_LOCAL_APIC
127
128#include <asm/smp.h>
129
130#define APIC_DFR_VALUE (APIC_DFR_FLAT)
131
132static inline const struct cpumask *default_target_cpus(void)
133{
134#ifdef CONFIG_SMP
135 return cpu_online_mask;
136#else
137 return cpumask_of(0);
138#endif
139}
140
141DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
142
143
144static inline unsigned int read_apic_id(void)
145{
146 unsigned int reg;
147
148 reg = *(u32 *)(APIC_BASE + APIC_ID);
149
150 return apic->get_apic_id(reg);
151}
152
153#ifdef CONFIG_X86_64
154extern void default_setup_apic_routing(void);
155#else
156
157/*
158 * Set up the logical destination ID.
159 *
160 * Intel recommends to set DFR, LDR and TPR before enabling
161 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
162 * document number 292116). So here it goes...
163 */
164extern void default_init_apic_ldr(void);
165
166static inline int default_apic_id_registered(void)
167{
168 return physid_isset(read_apic_id(), phys_cpu_present_map);
169}
170
171static inline unsigned int
172default_cpu_mask_to_apicid(const struct cpumask *cpumask)
173{
174 return cpumask_bits(cpumask)[0];
175}
176
177static inline unsigned int
178default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
179 const struct cpumask *andmask)
180{
181 unsigned long mask1 = cpumask_bits(cpumask)[0];
182 unsigned long mask2 = cpumask_bits(andmask)[0];
183 unsigned long mask3 = cpumask_bits(cpu_online_mask)[0];
184
185 return (unsigned int)(mask1 & mask2 & mask3);
186}
187
188static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
189{
190 return cpuid_apic >> index_msb;
191}
192
193static inline void default_setup_apic_routing(void)
194{
195#ifdef CONFIG_X86_IO_APIC
196 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
197 "Flat", nr_ioapics);
198#endif
199}
200
201extern int default_apicid_to_node(int logical_apicid);
202
203#endif
204
205static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
206{
207 return physid_isset(apicid, bitmap);
208}
209
210static inline unsigned long default_check_apicid_present(int bit)
211{
212 return physid_isset(bit, phys_cpu_present_map);
213}
214
215static inline physid_mask_t default_ioapic_phys_id_map(physid_mask_t phys_map)
216{
217 return phys_map;
218}
219
220/* Mapping from cpu number to logical apicid */
221static inline int default_cpu_to_logical_apicid(int cpu)
222{
223 return 1 << cpu;
224}
225
226static inline int __default_cpu_present_to_apicid(int mps_cpu)
227{
228 if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu))
229 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
230 else
231 return BAD_APICID;
232}
233
234static inline int
235__default_check_phys_apicid_present(int boot_cpu_physical_apicid)
236{
237 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
238}
239
240#ifdef CONFIG_X86_32
241static inline int default_cpu_present_to_apicid(int mps_cpu)
242{
243 return __default_cpu_present_to_apicid(mps_cpu);
244}
245
246static inline int
247default_check_phys_apicid_present(int boot_cpu_physical_apicid)
248{
249 return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
250}
251#else
252extern int default_cpu_present_to_apicid(int mps_cpu);
253extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid);
254#endif
255
256static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
257{
258 return physid_mask_of_physid(phys_apicid);
259}
260
261#endif /* CONFIG_X86_LOCAL_APIC */
123#endif /* _ASM_X86_GENAPIC_64_H */ 262#endif /* _ASM_X86_GENAPIC_64_H */
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
deleted file mode 100644
index bae053cdcde5..000000000000
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ /dev/null
@@ -1,144 +0,0 @@
1#ifndef _ASM_X86_MACH_DEFAULT_MACH_APIC_H
2#define _ASM_X86_MACH_DEFAULT_MACH_APIC_H
3
4#ifdef CONFIG_X86_LOCAL_APIC
5
6#include <asm/smp.h>
7
8#define APIC_DFR_VALUE (APIC_DFR_FLAT)
9
10static inline const struct cpumask *default_target_cpus(void)
11{
12#ifdef CONFIG_SMP
13 return cpu_online_mask;
14#else
15 return cpumask_of(0);
16#endif
17}
18
19#ifdef CONFIG_X86_64
20#include <asm/genapic.h>
21#define read_apic_id() (apic->get_apic_id(apic_read(APIC_ID)))
22extern void default_setup_apic_routing(void);
23#else
24/*
25 * Set up the logical destination ID.
26 *
27 * Intel recommends to set DFR, LDR and TPR before enabling
28 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
29 * document number 292116). So here it goes...
30 */
31static inline void default_init_apic_ldr(void)
32{
33 unsigned long val;
34
35 apic_write(APIC_DFR, APIC_DFR_VALUE);
36 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
37 val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
38 apic_write(APIC_LDR, val);
39}
40
41static inline int default_apic_id_registered(void)
42{
43 return physid_isset(read_apic_id(), phys_cpu_present_map);
44}
45
46static inline unsigned int
47default_cpu_mask_to_apicid(const struct cpumask *cpumask)
48{
49 return cpumask_bits(cpumask)[0];
50}
51
52static inline unsigned int
53default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
54 const struct cpumask *andmask)
55{
56 unsigned long mask1 = cpumask_bits(cpumask)[0];
57 unsigned long mask2 = cpumask_bits(andmask)[0];
58 unsigned long mask3 = cpumask_bits(cpu_online_mask)[0];
59
60 return (unsigned int)(mask1 & mask2 & mask3);
61}
62
63static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
64{
65 return cpuid_apic >> index_msb;
66}
67
68static inline void default_setup_apic_routing(void)
69{
70#ifdef CONFIG_X86_IO_APIC
71 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
72 "Flat", nr_ioapics);
73#endif
74}
75
76static inline int default_apicid_to_node(int logical_apicid)
77{
78#ifdef CONFIG_SMP
79 return apicid_2_node[hard_smp_processor_id()];
80#else
81 return 0;
82#endif
83}
84
85#endif
86
87static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
88{
89 return physid_isset(apicid, bitmap);
90}
91
92static inline unsigned long default_check_apicid_present(int bit)
93{
94 return physid_isset(bit, phys_cpu_present_map);
95}
96
97static inline physid_mask_t default_ioapic_phys_id_map(physid_mask_t phys_map)
98{
99 return phys_map;
100}
101
102/* Mapping from cpu number to logical apicid */
103static inline int default_cpu_to_logical_apicid(int cpu)
104{
105 return 1 << cpu;
106}
107
108static inline int __default_cpu_present_to_apicid(int mps_cpu)
109{
110 if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu))
111 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
112 else
113 return BAD_APICID;
114}
115
116static inline int
117__default_check_phys_apicid_present(int boot_cpu_physical_apicid)
118{
119 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
120}
121
122#ifdef CONFIG_X86_32
123static inline int default_cpu_present_to_apicid(int mps_cpu)
124{
125 return __default_cpu_present_to_apicid(mps_cpu);
126}
127
128static inline int
129default_check_phys_apicid_present(int boot_cpu_physical_apicid)
130{
131 return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
132}
133#else
134extern int default_cpu_present_to_apicid(int mps_cpu);
135extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid);
136#endif
137
138static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
139{
140 return physid_mask_of_physid(phys_apicid);
141}
142
143#endif /* CONFIG_X86_LOCAL_APIC */
144#endif /* _ASM_X86_MACH_DEFAULT_MACH_APIC_H */
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
deleted file mode 100644
index 96f217f819e3..000000000000
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_X86_MACH_GENERIC_MACH_APIC_H
2#define _ASM_X86_MACH_GENERIC_MACH_APIC_H
3
4#include <asm/genapic.h>
5
6extern void generic_bigsmp_probe(void);
7
8#endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index d4ac4de4bcec..47d0e21f2b9e 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -173,8 +173,6 @@ extern int safe_smp_processor_id(void);
173 173
174#endif 174#endif
175 175
176#include <asm/genapic.h>
177
178#ifdef CONFIG_X86_LOCAL_APIC 176#ifdef CONFIG_X86_LOCAL_APIC
179 177
180#ifndef CONFIG_X86_64 178#ifndef CONFIG_X86_64
@@ -184,26 +182,9 @@ static inline int logical_smp_processor_id(void)
184 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); 182 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
185} 183}
186 184
187static inline unsigned int read_apic_id(void)
188{
189 unsigned int reg;
190
191 reg = *(u32 *)(APIC_BASE + APIC_ID);
192
193 return apic->get_apic_id(reg);
194}
195#endif 185#endif
196 186
197
198# if defined(APIC_DEFINITION) || defined(CONFIG_X86_64)
199extern int hard_smp_processor_id(void); 187extern int hard_smp_processor_id(void);
200# else
201static inline int hard_smp_processor_id(void)
202{
203 /* we don't want to mark this access volatile - bad code generation */
204 return read_apic_id();
205}
206# endif /* APIC_DEFINITION */
207 188
208#else /* CONFIG_X86_LOCAL_APIC */ 189#else /* CONFIG_X86_LOCAL_APIC */
209 190
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 7b02a1cedca0..cb8b52785e37 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -42,10 +42,6 @@
42#include <asm/mpspec.h> 42#include <asm/mpspec.h>
43#include <asm/smp.h> 43#include <asm/smp.h>
44 44
45#ifdef CONFIG_X86_LOCAL_APIC
46# include <mach_apic.h>
47#endif
48
49static int __initdata acpi_force = 0; 45static int __initdata acpi_force = 0;
50u32 acpi_rsdt_forced; 46u32 acpi_rsdt_forced;
51#ifdef CONFIG_ACPI 47#ifdef CONFIG_ACPI
@@ -56,15 +52,7 @@ int acpi_disabled = 1;
56EXPORT_SYMBOL(acpi_disabled); 52EXPORT_SYMBOL(acpi_disabled);
57 53
58#ifdef CONFIG_X86_64 54#ifdef CONFIG_X86_64
59 55# include <asm/proto.h>
60#include <asm/proto.h>
61
62#else /* X86 */
63
64#ifdef CONFIG_X86_LOCAL_APIC
65#include <mach_apic.h>
66#endif /* CONFIG_X86_LOCAL_APIC */
67
68#endif /* X86 */ 56#endif /* X86 */
69 57
70#define BAD_MADT_ENTRY(entry, end) ( \ 58#define BAD_MADT_ENTRY(entry, end) ( \
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index e6220809ca11..41a0ba34d6b2 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -49,7 +49,6 @@
49#include <asm/i8259.h> 49#include <asm/i8259.h>
50#include <asm/smp.h> 50#include <asm/smp.h>
51 51
52#include <mach_apic.h>
53#include <mach_ipi.h> 52#include <mach_ipi.h>
54 53
55/* 54/*
@@ -1910,11 +1909,30 @@ void __cpuinit generic_processor_info(int apicid, int version)
1910 set_cpu_present(cpu, true); 1909 set_cpu_present(cpu, true);
1911} 1910}
1912 1911
1913#ifdef CONFIG_X86_64
1914int hard_smp_processor_id(void) 1912int hard_smp_processor_id(void)
1915{ 1913{
1916 return read_apic_id(); 1914 return read_apic_id();
1917} 1915}
1916
1917void default_init_apic_ldr(void)
1918{
1919 unsigned long val;
1920
1921 apic_write(APIC_DFR, APIC_DFR_VALUE);
1922 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
1923 val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
1924 apic_write(APIC_LDR, val);
1925}
1926
1927#ifdef CONFIG_X86_32
1928int default_apicid_to_node(int logical_apicid)
1929{
1930#ifdef CONFIG_SMP
1931 return apicid_2_node[hard_smp_processor_id()];
1932#else
1933 return 0;
1934#endif
1935}
1918#endif 1936#endif
1919 1937
1920/* 1938/*
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index e8bb892c09fd..4a48bb409748 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -7,7 +7,7 @@
7#include <asm/pat.h> 7#include <asm/pat.h>
8#include <asm/processor.h> 8#include <asm/processor.h>
9 9
10#include <mach_apic.h> 10#include <asm/genapic.h>
11 11
12struct cpuid_bit { 12struct cpuid_bit {
13 u16 feature; 13 u16 feature;
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 7c878f6aa919..ff4d7b9e32e4 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -12,7 +12,7 @@
12# include <asm/cacheflush.h> 12# include <asm/cacheflush.h>
13#endif 13#endif
14 14
15#include <mach_apic.h> 15#include <asm/genapic.h>
16 16
17#include "cpu.h" 17#include "cpu.h"
18 18
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 055b9c3a6600..c4bdc7f00207 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -26,7 +26,7 @@
26#ifdef CONFIG_X86_LOCAL_APIC 26#ifdef CONFIG_X86_LOCAL_APIC
27#include <asm/mpspec.h> 27#include <asm/mpspec.h>
28#include <asm/apic.h> 28#include <asm/apic.h>
29#include <mach_apic.h> 29#include <asm/genapic.h>
30#include <asm/genapic.h> 30#include <asm/genapic.h>
31#include <asm/uv/uv.h> 31#include <asm/uv/uv.h>
32#endif 32#endif
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 5deefae9064d..1cef0aa5e5dc 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -24,7 +24,7 @@
24#ifdef CONFIG_X86_LOCAL_APIC 24#ifdef CONFIG_X86_LOCAL_APIC
25#include <asm/mpspec.h> 25#include <asm/mpspec.h>
26#include <asm/apic.h> 26#include <asm/apic.h>
27#include <mach_apic.h> 27#include <asm/genapic.h>
28#endif 28#endif
29 29
30static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) 30static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index abae81989c2f..e0744ea6d0f1 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -63,7 +63,7 @@
63#include <asm/uv/uv_irq.h> 63#include <asm/uv/uv_irq.h>
64 64
65#include <mach_ipi.h> 65#include <mach_ipi.h>
66#include <mach_apic.h> 66#include <asm/genapic.h>
67 67
68#define __apicdebuginit(type) static type __init 68#define __apicdebuginit(type) static type __init
69 69
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c
index e16c41b2e4ec..50076d92fbc0 100644
--- a/arch/x86/kernel/ipi.c
+++ b/arch/x86/kernel/ipi.c
@@ -19,7 +19,7 @@
19#include <asm/proto.h> 19#include <asm/proto.h>
20 20
21#ifdef CONFIG_X86_32 21#ifdef CONFIG_X86_32
22#include <mach_apic.h> 22#include <asm/genapic.h>
23#include <mach_ipi.h> 23#include <mach_ipi.h>
24 24
25/* 25/*
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index e0f29be8ab0b..d802c844991e 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -231,7 +231,7 @@ unsigned int do_IRQ(struct pt_regs *regs)
231} 231}
232 232
233#ifdef CONFIG_HOTPLUG_CPU 233#ifdef CONFIG_HOTPLUG_CPU
234#include <mach_apic.h> 234#include <asm/genapic.h>
235 235
236/* A cpu has been removed from cpu_online_mask. Reset irq affinities. */ 236/* A cpu has been removed from cpu_online_mask. Reset irq affinities. */
237void fixup_irqs(void) 237void fixup_irqs(void)
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index a1452a53d14f..94fe71029c37 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -29,8 +29,7 @@
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/smp.h> 30#include <asm/smp.h>
31 31
32#include <mach_apic.h> 32#include <asm/genapic.h>
33
34/* 33/*
35 * Checksum an MP configuration block. 34 * Checksum an MP configuration block.
36 */ 35 */
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 6b27f6dc7bf7..92e42939fb08 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -97,7 +97,7 @@
97#include <asm/mmu_context.h> 97#include <asm/mmu_context.h>
98#include <asm/proto.h> 98#include <asm/proto.h>
99 99
100#include <mach_apic.h> 100#include <asm/genapic.h>
101#include <asm/paravirt.h> 101#include <asm/paravirt.h>
102#include <asm/hypervisor.h> 102#include <asm/hypervisor.h>
103 103
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index c48ba6cc32aa..892e7c389be1 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -27,7 +27,7 @@
27#include <asm/mmu_context.h> 27#include <asm/mmu_context.h>
28#include <asm/proto.h> 28#include <asm/proto.h>
29#include <mach_ipi.h> 29#include <mach_ipi.h>
30#include <mach_apic.h> 30#include <asm/genapic.h>
31/* 31/*
32 * Some notes on x86 processor bugs affecting SMP operation: 32 * Some notes on x86 processor bugs affecting SMP operation:
33 * 33 *
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 3fed177f3457..489fde9d9476 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -65,7 +65,7 @@
65#include <asm/uv/uv.h> 65#include <asm/uv/uv.h>
66#include <linux/mc146818rtc.h> 66#include <linux/mc146818rtc.h>
67 67
68#include <mach_apic.h> 68#include <asm/genapic.h>
69#include <smpboot_hooks.h> 69#include <smpboot_hooks.h>
70 70
71#ifdef CONFIG_X86_32 71#ifdef CONFIG_X86_32
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 89fce1b6d01f..755ede02b13f 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -20,7 +20,7 @@
20#include <asm/tsc.h> 20#include <asm/tsc.h>
21#include <asm/irq_vectors.h> 21#include <asm/irq_vectors.h>
22 22
23#include <mach_apic.h> 23#include <asm/genapic.h>
24 24
25static struct bau_control **uv_bau_table_bases __read_mostly; 25static struct bau_control **uv_bau_table_bases __read_mostly;
26static int uv_bau_retry_limit __read_mostly; 26static int uv_bau_retry_limit __read_mostly;
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index 2ed5bdf15c9f..3bd7f47a91b7 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -34,7 +34,7 @@
34 34
35#include <mach_ipi.h> 35#include <mach_ipi.h>
36 36
37#include "mach_apic.h" 37#include <asm/genapic.h>
38 38
39#include <linux/kernel_stat.h> 39#include <linux/kernel_stat.h>
40 40
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 07817b2a7876..7d5123e474e1 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -12,7 +12,7 @@
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <asm/mach-default/mach_apic.h> 15#include <asm/genapic.h>
16#include <asm/mach-default/mach_ipi.h> 16#include <asm/mach-default/mach_ipi.h>
17 17
18static void default_vector_allocation_domain(int cpu, struct cpumask *retmask) 18static void default_vector_allocation_domain(int cpu, struct cpumask *retmask)
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
index ab68c6e5c48a..c03c72221320 100644
--- a/arch/x86/mach-generic/probe.c
+++ b/arch/x86/mach-generic/probe.c
@@ -154,8 +154,3 @@ int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
154 } 154 }
155 return 0; 155 return 0;
156} 156}
157
158int hard_smp_processor_id(void)
159{
160 return apic->get_apic_id(*(unsigned long *)(APIC_BASE+APIC_ID));
161}