aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lguest/boot.c4
-rw-r--r--arch/x86/xen/enlighten.c41
2 files changed, 41 insertions, 4 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 50dad44fb542..0c45df20e2b3 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -783,11 +783,11 @@ static void lguest_wbinvd(void)
783 * code qualifies for Advanced. It will also never interrupt anything. It 783 * code qualifies for Advanced. It will also never interrupt anything. It
784 * does, however, allow us to get through the Linux boot code. */ 784 * does, however, allow us to get through the Linux boot code. */
785#ifdef CONFIG_X86_LOCAL_APIC 785#ifdef CONFIG_X86_LOCAL_APIC
786static void lguest_apic_write(unsigned long reg, u32 v) 786static void lguest_apic_write(u32 reg, u32 v)
787{ 787{
788} 788}
789 789
790static u32 lguest_apic_read(unsigned long reg) 790static u32 lguest_apic_read(u32 reg)
791{ 791{
792 return 0; 792 return 0;
793} 793}
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index dcd4e51f2f16..54e255667530 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -548,16 +548,45 @@ static void xen_io_delay(void)
548} 548}
549 549
550#ifdef CONFIG_X86_LOCAL_APIC 550#ifdef CONFIG_X86_LOCAL_APIC
551static u32 xen_apic_read(unsigned long reg) 551static u32 xen_apic_read(u32 reg)
552{ 552{
553 return 0; 553 return 0;
554} 554}
555 555
556static void xen_apic_write(unsigned long reg, u32 val) 556static void xen_apic_write(u32 reg, u32 val)
557{ 557{
558 /* Warn to see if there's any stray references */ 558 /* Warn to see if there's any stray references */
559 WARN_ON(1); 559 WARN_ON(1);
560} 560}
561
562#ifdef CONFIG_X86_64
563static u64 xen_apic_icr_read(void)
564{
565 return 0;
566}
567
568static void xen_apic_icr_write(u32 low, u32 id)
569{
570 /* Warn to see if there's any stray references */
571 WARN_ON(1);
572}
573
574static void xen_apic_wait_icr_idle(void)
575{
576 return;
577}
578
579static struct apic_ops xen_basic_apic_ops = {
580 .read = xen_apic_read,
581 .write = xen_apic_write,
582 .write_atomic = xen_apic_write,
583 .icr_read = xen_apic_icr_read,
584 .icr_write = xen_apic_icr_write,
585 .wait_icr_idle = xen_apic_wait_icr_idle,
586 .safe_wait_icr_idle = xen_apic_wait_icr_idle,
587};
588#endif
589
561#endif 590#endif
562 591
563static void xen_flush_tlb(void) 592static void xen_flush_tlb(void)
@@ -1130,9 +1159,11 @@ static const struct pv_irq_ops xen_irq_ops __initdata = {
1130 1159
1131static const struct pv_apic_ops xen_apic_ops __initdata = { 1160static const struct pv_apic_ops xen_apic_ops __initdata = {
1132#ifdef CONFIG_X86_LOCAL_APIC 1161#ifdef CONFIG_X86_LOCAL_APIC
1162#ifndef CONFIG_X86_64
1133 .apic_write = xen_apic_write, 1163 .apic_write = xen_apic_write,
1134 .apic_write_atomic = xen_apic_write, 1164 .apic_write_atomic = xen_apic_write,
1135 .apic_read = xen_apic_read, 1165 .apic_read = xen_apic_read,
1166#endif
1136 .setup_boot_clock = paravirt_nop, 1167 .setup_boot_clock = paravirt_nop,
1137 .setup_secondary_clock = paravirt_nop, 1168 .setup_secondary_clock = paravirt_nop,
1138 .startup_ipi_hook = paravirt_nop, 1169 .startup_ipi_hook = paravirt_nop,
@@ -1291,6 +1322,12 @@ asmlinkage void __init xen_start_kernel(void)
1291 pv_irq_ops = xen_irq_ops; 1322 pv_irq_ops = xen_irq_ops;
1292 pv_apic_ops = xen_apic_ops; 1323 pv_apic_ops = xen_apic_ops;
1293 pv_mmu_ops = xen_mmu_ops; 1324 pv_mmu_ops = xen_mmu_ops;
1325#ifdef CONFIG_X86_64
1326 /*
1327 * for 64bit, set up the basic apic ops aswell.
1328 */
1329 apic_ops = &xen_basic_apic_ops;
1330#endif
1294 1331
1295 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { 1332 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
1296 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; 1333 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;