Commit | Line | Data |
---|---|---|
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 | */ | |
16 | extern s16 __apicid_to_node[MAX_LOCAL_APIC]; | |
17 | ||
18 | static inline void set_apicid_to_node(int apicid, s16 node) | |
19 | { | |
20 | __apicid_to_node[apicid] = node; | |
21 | } | |
22 | #else /* CONFIG_NUMA */ | |
23 | static 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 |
35 | extern void __cpuinit numa_set_node(int cpu, int node); | |
36 | extern void __cpuinit numa_clear_node(int cpu); | |
8db78cc4 TH |
37 | extern void __init numa_init_array(void); |
38 | extern void __init init_cpu_to_node(void); | |
de2d9445 TH |
39 | extern void __cpuinit numa_add_cpu(int cpu); |
40 | extern void __cpuinit numa_remove_cpu(int cpu); | |
645a7919 TH |
41 | #else /* CONFIG_NUMA */ |
42 | static inline void numa_set_node(int cpu, int node) { } | |
43 | static inline void numa_clear_node(int cpu) { } | |
8db78cc4 TH |
44 | static inline void numa_init_array(void) { } |
45 | static inline void init_cpu_to_node(void) { } | |
de2d9445 TH |
46 | static inline void numa_add_cpu(int cpu) { } |
47 | static inline void numa_remove_cpu(int cpu) { } | |
645a7919 TH |
48 | #endif /* CONFIG_NUMA */ |
49 | ||
de2d9445 TH |
50 | #ifdef CONFIG_DEBUG_PER_CPU_MAPS |
51 | struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable); | |
52 | #endif | |
53 | ||
bbc9e2f4 | 54 | #endif /* _ASM_X86_NUMA_H */ |