Tejun Heo | bbc9e2f | 2011-01-23 14:37:39 +0100 | [diff] [blame] | 1 | #ifndef _ASM_X86_NUMA_H |
| 2 | #define _ASM_X86_NUMA_H |
| 3 | |
| 4 | #include <asm/apicdef.h> |
| 5 | |
| 6 | #ifdef CONFIG_NUMA |
| 7 | /* |
| 8 | * __apicid_to_node[] stores the raw mapping between physical apicid and |
| 9 | * node and is used to initialize cpu_to_node mapping. |
| 10 | * |
| 11 | * The mapping may be overridden by apic->numa_cpu_node() on 32bit and thus |
| 12 | * should be accessed by the accessors - set_apicid_to_node() and |
| 13 | * numa_cpu_node(). |
| 14 | */ |
| 15 | extern s16 __apicid_to_node[MAX_LOCAL_APIC]; |
| 16 | |
| 17 | static inline void set_apicid_to_node(int apicid, s16 node) |
| 18 | { |
| 19 | __apicid_to_node[apicid] = node; |
| 20 | } |
| 21 | #else /* CONFIG_NUMA */ |
| 22 | static inline void set_apicid_to_node(int apicid, s16 node) |
| 23 | { |
| 24 | } |
| 25 | #endif /* CONFIG_NUMA */ |
| 26 | |
Thomas Gleixner | 96a388d | 2007-10-11 11:20:03 +0200 | [diff] [blame] | 27 | #ifdef CONFIG_X86_32 |
| 28 | # include "numa_32.h" |
| 29 | #else |
| 30 | # include "numa_64.h" |
| 31 | #endif |
Tejun Heo | bbc9e2f | 2011-01-23 14:37:39 +0100 | [diff] [blame] | 32 | |
Tejun Heo | 645a791 | 2011-01-23 14:37:40 +0100 | [diff] [blame^] | 33 | #ifdef CONFIG_NUMA |
| 34 | extern void __cpuinit numa_set_node(int cpu, int node); |
| 35 | extern void __cpuinit numa_clear_node(int cpu); |
| 36 | #else /* CONFIG_NUMA */ |
| 37 | static inline void numa_set_node(int cpu, int node) { } |
| 38 | static inline void numa_clear_node(int cpu) { } |
| 39 | #endif /* CONFIG_NUMA */ |
| 40 | |
Tejun Heo | bbc9e2f | 2011-01-23 14:37:39 +0100 | [diff] [blame] | 41 | #endif /* _ASM_X86_NUMA_H */ |