ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h @ 8574:08d2a74dce81

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 <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Thu Jan 12 10:37:10 2006 +0000 (2006-01-12)
parents 0ffd94a02318
children
line source
1 /**
2 * machine_specific_memory_setup - Hook for machine specific memory setup.
3 *
4 * Description:
5 * This is included late in kernel/setup.c so that it can make
6 * use of all of the static functions.
7 **/
9 static char * __init machine_specific_memory_setup(void)
10 {
11 char *who;
12 unsigned long start_pfn, max_pfn;
14 who = "Xen";
16 start_pfn = 0;
17 max_pfn = xen_start_info->nr_pages;
19 e820.nr_map = 0;
20 add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
22 return who;
23 }
25 void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
26 {
27 clear_bit(X86_FEATURE_VME, c->x86_capability);
28 clear_bit(X86_FEATURE_DE, c->x86_capability);
29 clear_bit(X86_FEATURE_PSE, c->x86_capability);
30 clear_bit(X86_FEATURE_PGE, c->x86_capability);
31 clear_bit(X86_FEATURE_SEP, c->x86_capability);
32 if (!(xen_start_info->flags & SIF_PRIVILEGED))
33 clear_bit(X86_FEATURE_MTRR, c->x86_capability);
34 }
36 extern void hypervisor_callback(void);
37 extern void failsafe_callback(void);
38 extern void nmi(void);
40 static void __init machine_specific_arch_setup(void)
41 {
42 HYPERVISOR_set_callbacks(
43 (unsigned long) hypervisor_callback,
44 (unsigned long) failsafe_callback,
45 (unsigned long) system_call);
47 #ifdef CONFIG_X86_LOCAL_APIC
48 HYPERVISOR_nmi_op(XENNMI_register_callback, (unsigned long)&nmi);
49 #endif
51 machine_specific_modify_cpu_capabilities(&boot_cpu_data);
52 }