diff --git a/xen/common/numa.c b/xen/common/numa.c index ad75955a16..8544a15982 100644 --- a/xen/common/numa.c +++ b/xen/common/numa.c @@ -4,6 +4,7 @@ * Adapted for Xen: Ryan Harper */ +#ifdef __XEN__ #include #include #include @@ -13,6 +14,7 @@ #include #include #include +#endif /* __XEN__ */ static nodemask_t __initdata processor_nodes_parsed; static nodemask_t __initdata memory_nodes_parsed; @@ -561,6 +563,12 @@ void __init numa_init_array(void) } } +void numa_set_node(unsigned int cpu, nodeid_t node) +{ + cpu_to_node[cpu] = node; +} + +#ifdef __XEN__ #ifdef CONFIG_NUMA_EMU static unsigned int __initdata numa_fake; @@ -661,11 +669,6 @@ void numa_add_cpu(unsigned int cpu) cpumask_set_cpu(cpu, &node_to_cpumask[cpu_to_node(cpu)]); } -void numa_set_node(unsigned int cpu, nodeid_t node) -{ - cpu_to_node[cpu] = node; -} - /* [numa=off] */ static int __init cf_check numa_setup(const char *opt) { @@ -830,3 +833,4 @@ static int __init cf_check register_numa_trigger(void) return 0; } __initcall(register_numa_trigger); +#endif /* __XEN__ */