x86: Unify NUMA initialization between 32 and 64bit
[deliverable/linux.git] / arch / x86 / include / asm / numa.h
CommitLineData
bbc9e2f4
TH
1#ifndef _ASM_X86_NUMA_H
2#define _ASM_X86_NUMA_H
3
de2d9445 4#include <asm/topology.h>
bbc9e2f4
TH
5#include <asm/apicdef.h>
6
7#ifdef CONFIG_NUMA
8/*
9 * __apicid_to_node[] stores the raw mapping between physical apicid and
10 * node and is used to initialize cpu_to_node mapping.
11 *
12 * The mapping may be overridden by apic->numa_cpu_node() on 32bit and thus
13 * should be accessed by the accessors - set_apicid_to_node() and
14 * numa_cpu_node().
15 */
16extern s16 __apicid_to_node[MAX_LOCAL_APIC];
17
18static inline void set_apicid_to_node(int apicid, s16 node)
19{
20 __apicid_to_node[apicid] = node;
21}
22#else /* CONFIG_NUMA */
23static inline void set_apicid_to_node(int apicid, s16 node)
24{
25}
26#endif /* CONFIG_NUMA */
27
96a388de
TG
28#ifdef CONFIG_X86_32
29# include "numa_32.h"
30#else
31# include "numa_64.h"
32#endif
bbc9e2f4 33
645a7919
TH
34#ifdef CONFIG_NUMA
35extern void __cpuinit numa_set_node(int cpu, int node);
36extern void __cpuinit numa_clear_node(int cpu);
8db78cc4
TH
37extern void __init numa_init_array(void);
38extern void __init init_cpu_to_node(void);
de2d9445
TH
39extern void __cpuinit numa_add_cpu(int cpu);
40extern void __cpuinit numa_remove_cpu(int cpu);
645a7919
TH
41#else /* CONFIG_NUMA */
42static inline void numa_set_node(int cpu, int node) { }
43static inline void numa_clear_node(int cpu) { }
8db78cc4
TH
44static inline void numa_init_array(void) { }
45static inline void init_cpu_to_node(void) { }
de2d9445
TH
46static inline void numa_add_cpu(int cpu) { }
47static inline void numa_remove_cpu(int cpu) { }
645a7919
TH
48#endif /* CONFIG_NUMA */
49
de2d9445
TH
50#ifdef CONFIG_DEBUG_PER_CPU_MAPS
51struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable);
52#endif
53
bbc9e2f4 54#endif /* _ASM_X86_NUMA_H */
This page took 0.331445 seconds and 5 git commands to generate.