Fix x86_64 domU build by conditionalizing NMI support on CONFIG_X86_LOCAL_APIC
authorIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Thu, 12 Jan 2006 10:37:10 +0000 (10:37 +0000)
committerIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Thu, 12 Jan 2006 10:37:10 +0000 (10:37 +0000)
The NMI handler is not built unless CONFIG_X86_LOCAL_APIC is defined, and
CONFIG_X86_LOCAL_APIC requires a dom0 build.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h

index 9ecc36e5ca9f9e960004cf7fddcefad9af90b385..2fbe90706cd8247632bb11335f7f49caf99fea4c 100644 (file)
@@ -719,6 +719,7 @@ ENTRY(do_hypervisor_callback)   # do_hyperviosr_callback(struct *pt_regs)
        call evtchn_do_upcall
         jmp  error_exit
 
+#ifdef CONFIG_X86_LOCAL_APIC
 ENTRY(nmi)
        zeroentry do_nmi_callback
 ENTRY(do_nmi_callback)
@@ -728,6 +729,7 @@ ENTRY(do_nmi_callback)
         XEN_BLOCK_EVENTS(%rsi)
         GET_THREAD_INFO(%rcx)
         jmp  retint_restore_args
+#endif
 
         ALIGN
 restore_all_enable_events:  
index bad118e44cbe3ac929b3fcd0e47ab16dd921cc2d..84186bbe9660624c1651ab6828696988da6a2cbf 100644 (file)
@@ -44,7 +44,9 @@ static void __init machine_specific_arch_setup(void)
                 (unsigned long) failsafe_callback,
                 (unsigned long) system_call);
 
+#ifdef CONFIG_X86_LOCAL_APIC
        HYPERVISOR_nmi_op(XENNMI_register_callback, (unsigned long)&nmi);
+#endif
 
        machine_specific_modify_cpu_capabilities(&boot_cpu_data);
 }