aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-02-17 02:02:14 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-17 06:22:20 -0500
commitc1eeb2de41d7015678bdd412b48a5f071b84e29a (patch)
tree6af99f46f557f9e854e882deac52d23b2fadb5a2 /arch/x86/kernel
parent06cd9a7dc8a58186060a91b6ddc031057435fd34 (diff)
x86: fold apic_ops into genapic
Impact: cleanup make it simpler, don't need have one extra struct. v2: fix the sgi_uv build Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/apic.c63
-rw-r--r--arch/x86/kernel/bigsmp_32.c7
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd_64.c2
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_intel_64.c2
-rw-r--r--arch/x86/kernel/cpu/perfctr-watchdog.c2
-rw-r--r--arch/x86/kernel/es7000_32.c7
-rw-r--r--arch/x86/kernel/genapic_64.c2
-rw-r--r--arch/x86/kernel/genapic_flat_64.c16
-rw-r--r--arch/x86/kernel/genx2apic_cluster.c11
-rw-r--r--arch/x86/kernel/genx2apic_phys.c11
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c9
-rw-r--r--arch/x86/kernel/ipi.c2
-rw-r--r--arch/x86/kernel/irq.c2
-rw-r--r--arch/x86/kernel/nmi.c2
-rw-r--r--arch/x86/kernel/numaq_32.c7
-rw-r--r--arch/x86/kernel/probe_32.c7
-rw-r--r--arch/x86/kernel/summit_32.c7
-rw-r--r--arch/x86/kernel/uv_irq.c2
-rw-r--r--arch/x86/kernel/vmi_32.c6
-rw-r--r--arch/x86/kernel/vmiclock_32.c2
20 files changed, 92 insertions, 77 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 004aa1c31e4f..af494bad8858 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -210,18 +210,13 @@ static int modern_apic(void)
210 return lapic_get_version() >= 0x14; 210 return lapic_get_version() >= 0x14;
211} 211}
212 212
213/* 213void native_apic_wait_icr_idle(void)
214 * Paravirt kernels also might be using these below ops. So we still
215 * use generic apic_read()/apic_write(), which might be pointing to different
216 * ops in PARAVIRT case.
217 */
218void xapic_wait_icr_idle(void)
219{ 214{
220 while (apic_read(APIC_ICR) & APIC_ICR_BUSY) 215 while (apic_read(APIC_ICR) & APIC_ICR_BUSY)
221 cpu_relax(); 216 cpu_relax();
222} 217}
223 218
224u32 safe_xapic_wait_icr_idle(void) 219u32 native_safe_apic_wait_icr_idle(void)
225{ 220{
226 u32 send_status; 221 u32 send_status;
227 int timeout; 222 int timeout;
@@ -237,13 +232,13 @@ u32 safe_xapic_wait_icr_idle(void)
237 return send_status; 232 return send_status;
238} 233}
239 234
240void xapic_icr_write(u32 low, u32 id) 235void native_apic_icr_write(u32 low, u32 id)
241{ 236{
242 apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id)); 237 apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id));
243 apic_write(APIC_ICR, low); 238 apic_write(APIC_ICR, low);
244} 239}
245 240
246static u64 xapic_icr_read(void) 241u64 native_apic_icr_read(void)
247{ 242{
248 u32 icr1, icr2; 243 u32 icr1, icr2;
249 244
@@ -253,54 +248,6 @@ static u64 xapic_icr_read(void)
253 return icr1 | ((u64)icr2 << 32); 248 return icr1 | ((u64)icr2 << 32);
254} 249}
255 250
256static struct apic_ops xapic_ops = {
257 .read = native_apic_mem_read,
258 .write = native_apic_mem_write,
259 .icr_read = xapic_icr_read,
260 .icr_write = xapic_icr_write,
261 .wait_icr_idle = xapic_wait_icr_idle,
262 .safe_wait_icr_idle = safe_xapic_wait_icr_idle,
263};
264
265struct apic_ops __read_mostly *apic_ops = &xapic_ops;
266EXPORT_SYMBOL_GPL(apic_ops);
267
268#ifdef CONFIG_X86_X2APIC
269static void x2apic_wait_icr_idle(void)
270{
271 /* no need to wait for icr idle in x2apic */
272 return;
273}
274
275static u32 safe_x2apic_wait_icr_idle(void)
276{
277 /* no need to wait for icr idle in x2apic */
278 return 0;
279}
280
281void x2apic_icr_write(u32 low, u32 id)
282{
283 wrmsrl(APIC_BASE_MSR + (APIC_ICR >> 4), ((__u64) id) << 32 | low);
284}
285
286static u64 x2apic_icr_read(void)
287{
288 unsigned long val;
289
290 rdmsrl(APIC_BASE_MSR + (APIC_ICR >> 4), val);
291 return val;
292}
293
294static struct apic_ops x2apic_ops = {
295 .read = native_apic_msr_read,
296 .write = native_apic_msr_write,
297 .icr_read = x2apic_icr_read,
298 .icr_write = x2apic_icr_write,
299 .wait_icr_idle = x2apic_wait_icr_idle,
300 .safe_wait_icr_idle = safe_x2apic_wait_icr_idle,
301};
302#endif
303
304/** 251/**
305 * enable_NMI_through_LVT0 - enable NMI through local vector table 0 252 * enable_NMI_through_LVT0 - enable NMI through local vector table 0
306 */ 253 */
@@ -1329,7 +1276,6 @@ void check_x2apic(void)
1329 if (msr & X2APIC_ENABLE) { 1276 if (msr & X2APIC_ENABLE) {
1330 pr_info("x2apic enabled by BIOS, switching to x2apic ops\n"); 1277 pr_info("x2apic enabled by BIOS, switching to x2apic ops\n");
1331 x2apic_preenabled = x2apic = 1; 1278 x2apic_preenabled = x2apic = 1;
1332 apic_ops = &x2apic_ops;
1333 } 1279 }
1334} 1280}
1335 1281
@@ -1403,7 +1349,6 @@ void __init enable_IR_x2apic(void)
1403 1349
1404 if (!x2apic) { 1350 if (!x2apic) {
1405 x2apic = 1; 1351 x2apic = 1;
1406 apic_ops = &x2apic_ops;
1407 enable_x2apic(); 1352 enable_x2apic();
1408 } 1353 }
1409 1354
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index 47a62f46afdb..9eeb714c5ded 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -263,4 +263,11 @@ struct genapic apic_bigsmp = {
263 .smp_callin_clear_local_apic = NULL, 263 .smp_callin_clear_local_apic = NULL,
264 .store_NMI_vector = NULL, 264 .store_NMI_vector = NULL,
265 .inquire_remote_apic = default_inquire_remote_apic, 265 .inquire_remote_apic = default_inquire_remote_apic,
266
267 .read = native_apic_mem_read,
268 .write = native_apic_mem_write,
269 .icr_read = native_apic_icr_read,
270 .icr_write = native_apic_icr_write,
271 .wait_icr_idle = native_apic_wait_icr_idle,
272 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
266}; 273};
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index 4772e91e8246..e22d6ed26e61 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -24,7 +24,7 @@
24#include <linux/smp.h> 24#include <linux/smp.h>
25#include <linux/sysdev.h> 25#include <linux/sysdev.h>
26#include <linux/sysfs.h> 26#include <linux/sysfs.h>
27#include <asm/apic.h> 27#include <asm/genapic.h>
28#include <asm/mce.h> 28#include <asm/mce.h>
29#include <asm/msr.h> 29#include <asm/msr.h>
30#include <asm/percpu.h> 30#include <asm/percpu.h>
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
index 5e8c79e748a6..42f090702f02 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
@@ -7,7 +7,7 @@
7#include <linux/interrupt.h> 7#include <linux/interrupt.h>
8#include <linux/percpu.h> 8#include <linux/percpu.h>
9#include <asm/processor.h> 9#include <asm/processor.h>
10#include <asm/apic.h> 10#include <asm/genapic.h>
11#include <asm/msr.h> 11#include <asm/msr.h>
12#include <asm/mce.h> 12#include <asm/mce.h>
13#include <asm/hw_irq.h> 13#include <asm/hw_irq.h>
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c
index 9abd48b22674..f6c70a164e32 100644
--- a/arch/x86/kernel/cpu/perfctr-watchdog.c
+++ b/arch/x86/kernel/cpu/perfctr-watchdog.c
@@ -19,7 +19,7 @@
19#include <linux/nmi.h> 19#include <linux/nmi.h>
20#include <linux/kprobes.h> 20#include <linux/kprobes.h>
21 21
22#include <asm/apic.h> 22#include <asm/genapic.h>
23#include <asm/intel_arch_perfmon.h> 23#include <asm/intel_arch_perfmon.h>
24 24
25struct nmi_watchdog_ctlblk { 25struct nmi_watchdog_ctlblk {
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index 55515d73d9c2..23f1df4ce18e 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -806,4 +806,11 @@ struct genapic apic_es7000 = {
806 .smp_callin_clear_local_apic = NULL, 806 .smp_callin_clear_local_apic = NULL,
807 .store_NMI_vector = NULL, 807 .store_NMI_vector = NULL,
808 .inquire_remote_apic = default_inquire_remote_apic, 808 .inquire_remote_apic = default_inquire_remote_apic,
809
810 .read = native_apic_mem_read,
811 .write = native_apic_mem_write,
812 .icr_read = native_apic_icr_read,
813 .icr_write = native_apic_icr_write,
814 .wait_icr_idle = native_apic_wait_icr_idle,
815 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
809}; 816};
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index cdc4772d9c87..70b616b4c629 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -19,8 +19,8 @@
19#include <linux/dmar.h> 19#include <linux/dmar.h>
20 20
21#include <asm/smp.h> 21#include <asm/smp.h>
22#include <asm/ipi.h>
23#include <asm/genapic.h> 22#include <asm/genapic.h>
23#include <asm/ipi.h>
24#include <asm/setup.h> 24#include <asm/setup.h>
25 25
26extern struct genapic apic_flat; 26extern struct genapic apic_flat;
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 249d2d3c034c..36ee760fd133 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -17,8 +17,8 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/hardirq.h> 18#include <linux/hardirq.h>
19#include <asm/smp.h> 19#include <asm/smp.h>
20#include <asm/ipi.h>
21#include <asm/genapic.h> 20#include <asm/genapic.h>
21#include <asm/ipi.h>
22 22
23#ifdef CONFIG_ACPI 23#ifdef CONFIG_ACPI
24#include <acpi/acpi_bus.h> 24#include <acpi/acpi_bus.h>
@@ -229,6 +229,13 @@ struct genapic apic_flat = {
229 .smp_callin_clear_local_apic = NULL, 229 .smp_callin_clear_local_apic = NULL,
230 .store_NMI_vector = NULL, 230 .store_NMI_vector = NULL,
231 .inquire_remote_apic = NULL, 231 .inquire_remote_apic = NULL,
232
233 .read = native_apic_mem_read,
234 .write = native_apic_mem_write,
235 .icr_read = native_apic_icr_read,
236 .icr_write = native_apic_icr_write,
237 .wait_icr_idle = native_apic_wait_icr_idle,
238 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
232}; 239};
233 240
234/* 241/*
@@ -374,4 +381,11 @@ struct genapic apic_physflat = {
374 .smp_callin_clear_local_apic = NULL, 381 .smp_callin_clear_local_apic = NULL,
375 .store_NMI_vector = NULL, 382 .store_NMI_vector = NULL,
376 .inquire_remote_apic = NULL, 383 .inquire_remote_apic = NULL,
384
385 .read = native_apic_mem_read,
386 .write = native_apic_mem_write,
387 .icr_read = native_apic_icr_read,
388 .icr_write = native_apic_icr_write,
389 .wait_icr_idle = native_apic_wait_icr_idle,
390 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
377}; 391};
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 7c87156b6411..dd6e8d685426 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -7,8 +7,8 @@
7#include <linux/dmar.h> 7#include <linux/dmar.h>
8 8
9#include <asm/smp.h> 9#include <asm/smp.h>
10#include <asm/ipi.h>
11#include <asm/genapic.h> 10#include <asm/genapic.h>
11#include <asm/ipi.h>
12 12
13DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid); 13DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);
14 14
@@ -46,7 +46,7 @@ static void
46 /* 46 /*
47 * send the IPI. 47 * send the IPI.
48 */ 48 */
49 x2apic_icr_write(cfg, apicid); 49 native_x2apic_icr_write(cfg, apicid);
50} 50}
51 51
52/* 52/*
@@ -234,4 +234,11 @@ struct genapic apic_x2apic_cluster = {
234 .smp_callin_clear_local_apic = NULL, 234 .smp_callin_clear_local_apic = NULL,
235 .store_NMI_vector = NULL, 235 .store_NMI_vector = NULL,
236 .inquire_remote_apic = NULL, 236 .inquire_remote_apic = NULL,
237
238 .read = native_apic_msr_read,
239 .write = native_apic_msr_write,
240 .icr_read = native_x2apic_icr_read,
241 .icr_write = native_x2apic_icr_write,
242 .wait_icr_idle = native_x2apic_wait_icr_idle,
243 .safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle,
237}; 244};
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 5cbae8aa0408..eb1486bb002e 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -7,8 +7,8 @@
7#include <linux/dmar.h> 7#include <linux/dmar.h>
8 8
9#include <asm/smp.h> 9#include <asm/smp.h>
10#include <asm/ipi.h>
11#include <asm/genapic.h> 10#include <asm/genapic.h>
11#include <asm/ipi.h>
12 12
13static int x2apic_phys; 13static int x2apic_phys;
14 14
@@ -50,7 +50,7 @@ static void __x2apic_send_IPI_dest(unsigned int apicid, int vector,
50 /* 50 /*
51 * send the IPI. 51 * send the IPI.
52 */ 52 */
53 x2apic_icr_write(cfg, apicid); 53 native_x2apic_icr_write(cfg, apicid);
54} 54}
55 55
56static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) 56static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector)
@@ -220,4 +220,11 @@ struct genapic apic_x2apic_phys = {
220 .smp_callin_clear_local_apic = NULL, 220 .smp_callin_clear_local_apic = NULL,
221 .store_NMI_vector = NULL, 221 .store_NMI_vector = NULL,
222 .inquire_remote_apic = NULL, 222 .inquire_remote_apic = NULL,
223
224 .read = native_apic_msr_read,
225 .write = native_apic_msr_write,
226 .icr_read = native_x2apic_icr_read,
227 .icr_write = native_x2apic_icr_write,
228 .wait_icr_idle = native_x2apic_wait_icr_idle,
229 .safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle,
223}; 230};
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 89b84e004f04..9ae4a92fac8c 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -22,8 +22,8 @@
22#include <linux/proc_fs.h> 22#include <linux/proc_fs.h>
23#include <asm/current.h> 23#include <asm/current.h>
24#include <asm/smp.h> 24#include <asm/smp.h>
25#include <asm/ipi.h>
26#include <asm/genapic.h> 25#include <asm/genapic.h>
26#include <asm/ipi.h>
27#include <asm/pgtable.h> 27#include <asm/pgtable.h>
28#include <asm/uv/uv.h> 28#include <asm/uv/uv.h>
29#include <asm/uv/uv_mmrs.h> 29#include <asm/uv/uv_mmrs.h>
@@ -292,6 +292,13 @@ struct genapic apic_x2apic_uv_x = {
292 .smp_callin_clear_local_apic = NULL, 292 .smp_callin_clear_local_apic = NULL,
293 .store_NMI_vector = NULL, 293 .store_NMI_vector = NULL,
294 .inquire_remote_apic = NULL, 294 .inquire_remote_apic = NULL,
295
296 .read = native_apic_msr_read,
297 .write = native_apic_msr_write,
298 .icr_read = native_x2apic_icr_read,
299 .icr_write = native_x2apic_icr_write,
300 .wait_icr_idle = native_x2apic_wait_icr_idle,
301 .safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle,
295}; 302};
296 303
297static __cpuinit void set_x2apic_extra_bits(int pnode) 304static __cpuinit void set_x2apic_extra_bits(int pnode)
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c
index dbf5445727a9..1326272cae43 100644
--- a/arch/x86/kernel/ipi.c
+++ b/arch/x86/kernel/ipi.c
@@ -15,7 +15,7 @@
15#include <asm/mtrr.h> 15#include <asm/mtrr.h>
16#include <asm/tlbflush.h> 16#include <asm/tlbflush.h>
17#include <asm/mmu_context.h> 17#include <asm/mmu_context.h>
18#include <asm/apic.h> 18#include <asm/genapic.h>
19#include <asm/proto.h> 19#include <asm/proto.h>
20#include <asm/ipi.h> 20#include <asm/ipi.h>
21 21
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index f13ca1650aaf..3957776b1930 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -8,7 +8,7 @@
8#include <linux/smp.h> 8#include <linux/smp.h>
9#include <linux/ftrace.h> 9#include <linux/ftrace.h>
10 10
11#include <asm/apic.h> 11#include <asm/genapic.h>
12#include <asm/io_apic.h> 12#include <asm/io_apic.h>
13#include <asm/irq.h> 13#include <asm/irq.h>
14#include <asm/idle.h> 14#include <asm/idle.h>
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index bdfad80c3cf1..48b9ca5e088c 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -11,7 +11,7 @@
11 * Mikael Pettersson : PM converted to driver model. Disable/enable API. 11 * Mikael Pettersson : PM converted to driver model. Disable/enable API.
12 */ 12 */
13 13
14#include <asm/apic.h> 14#include <asm/genapic.h>
15 15
16#include <linux/nmi.h> 16#include <linux/nmi.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 0cc41a1d2550..f0f0c2f0596b 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -569,4 +569,11 @@ struct genapic apic_numaq = {
569 .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic, 569 .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic,
570 .store_NMI_vector = numaq_store_NMI_vector, 570 .store_NMI_vector = numaq_store_NMI_vector,
571 .inquire_remote_apic = NULL, 571 .inquire_remote_apic = NULL,
572
573 .read = native_apic_mem_read,
574 .write = native_apic_mem_write,
575 .icr_read = native_apic_icr_read,
576 .icr_write = native_apic_icr_write,
577 .wait_icr_idle = native_apic_wait_icr_idle,
578 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
572}; 579};
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index 22337b75de62..1f701caa95bc 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -127,6 +127,13 @@ struct genapic apic_default = {
127 .smp_callin_clear_local_apic = NULL, 127 .smp_callin_clear_local_apic = NULL,
128 .store_NMI_vector = NULL, 128 .store_NMI_vector = NULL,
129 .inquire_remote_apic = default_inquire_remote_apic, 129 .inquire_remote_apic = default_inquire_remote_apic,
130
131 .read = native_apic_mem_read,
132 .write = native_apic_mem_write,
133 .icr_read = native_apic_icr_read,
134 .icr_write = native_apic_icr_write,
135 .wait_icr_idle = native_apic_wait_icr_idle,
136 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
130}; 137};
131 138
132extern struct genapic apic_numaq; 139extern struct genapic apic_numaq;
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 1e733eff9b33..1cf32c325d12 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -599,4 +599,11 @@ struct genapic apic_summit = {
599 .smp_callin_clear_local_apic = NULL, 599 .smp_callin_clear_local_apic = NULL,
600 .store_NMI_vector = NULL, 600 .store_NMI_vector = NULL,
601 .inquire_remote_apic = default_inquire_remote_apic, 601 .inquire_remote_apic = default_inquire_remote_apic,
602
603 .read = native_apic_mem_read,
604 .write = native_apic_mem_write,
605 .icr_read = native_apic_icr_read,
606 .icr_write = native_apic_icr_write,
607 .wait_icr_idle = native_apic_wait_icr_idle,
608 .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
602}; 609};
diff --git a/arch/x86/kernel/uv_irq.c b/arch/x86/kernel/uv_irq.c
index aeef529917e4..75eb5ec5dd2a 100644
--- a/arch/x86/kernel/uv_irq.c
+++ b/arch/x86/kernel/uv_irq.c
@@ -11,7 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/irq.h> 12#include <linux/irq.h>
13 13
14#include <asm/apic.h> 14#include <asm/genapic.h>
15#include <asm/uv/uv_irq.h> 15#include <asm/uv/uv_irq.h>
16 16
17static void uv_noop(unsigned int irq) 17static void uv_noop(unsigned int irq)
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index f052c84ecbe4..a1c7b71dc0d0 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -32,7 +32,7 @@
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/fixmap.h> 33#include <asm/fixmap.h>
34#include <asm/apicdef.h> 34#include <asm/apicdef.h>
35#include <asm/apic.h> 35#include <asm/genapic.h>
36#include <asm/processor.h> 36#include <asm/processor.h>
37#include <asm/timer.h> 37#include <asm/timer.h>
38#include <asm/vmi_time.h> 38#include <asm/vmi_time.h>
@@ -798,8 +798,8 @@ static inline int __init activate_vmi(void)
798#endif 798#endif
799 799
800#ifdef CONFIG_X86_LOCAL_APIC 800#ifdef CONFIG_X86_LOCAL_APIC
801 para_fill(apic_ops->read, APICRead); 801 para_fill(apic->read, APICRead);
802 para_fill(apic_ops->write, APICWrite); 802 para_fill(apic->write, APICWrite);
803#endif 803#endif
804 804
805 /* 805 /*
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c
index a4791ef412d1..2a5e0e6a7c0d 100644
--- a/arch/x86/kernel/vmiclock_32.c
+++ b/arch/x86/kernel/vmiclock_32.c
@@ -30,7 +30,7 @@
30#include <asm/vmi_time.h> 30#include <asm/vmi_time.h>
31#include <asm/arch_hooks.h> 31#include <asm/arch_hooks.h>
32#include <asm/apicdef.h> 32#include <asm/apicdef.h>
33#include <asm/apic.h> 33#include <asm/genapic.h>
34#include <asm/timer.h> 34#include <asm/timer.h>
35#include <asm/i8253.h> 35#include <asm/i8253.h>
36#include <asm/irq_vectors.h> 36#include <asm/irq_vectors.h>