diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-07-11 16:11:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-12 02:45:10 -0400 |
commit | ad66dd340f561bdde2285992314d9e4fd9b6191e (patch) | |
tree | a5335c6762964731603f49ea59b53fffdb2b0325 /arch/x86/xen | |
parent | 277d1f5846d84e16760131a93b7a67ebfa8eded4 (diff) |
x2apic: xen64 paravirt basic apic ops
Define the Xen specific basic apic ops, in additon to paravirt apic ops,
with some misc warning fixes.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/enlighten.c | 41 |
1 files changed, 39 insertions, 2 deletions
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 |
551 | static u32 xen_apic_read(unsigned long reg) | 551 | static u32 xen_apic_read(u32 reg) |
552 | { | 552 | { |
553 | return 0; | 553 | return 0; |
554 | } | 554 | } |
555 | 555 | ||
556 | static void xen_apic_write(unsigned long reg, u32 val) | 556 | static 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 | ||
563 | static u64 xen_apic_icr_read(void) | ||
564 | { | ||
565 | return 0; | ||
566 | } | ||
567 | |||
568 | static 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 | |||
574 | static void xen_apic_wait_icr_idle(void) | ||
575 | { | ||
576 | return; | ||
577 | } | ||
578 | |||
579 | static 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 | ||
563 | static void xen_flush_tlb(void) | 592 | static void xen_flush_tlb(void) |
@@ -1130,9 +1159,11 @@ static const struct pv_irq_ops xen_irq_ops __initdata = { | |||
1130 | 1159 | ||
1131 | static const struct pv_apic_ops xen_apic_ops __initdata = { | 1160 | static 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; |