From: Ian.Campbell@xensource.com Date: Thu, 12 Jan 2006 10:37:10 +0000 (+0000) Subject: Fix x86_64 domU build by conditionalizing NMI support on CONFIG_X86_LOCAL_APIC X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16541^2~61^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2c5ceaba047a86db25cae8768da2df30ff2ddb75;p=xen.git Fix x86_64 domU build by conditionalizing NMI support on CONFIG_X86_LOCAL_APIC 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 --- diff --git a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S index 9ecc36e5ca..2fbe90706c 100644 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S @@ -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: diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h index bad118e44c..84186bbe96 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h @@ -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); }