This source file includes following definitions.
- set_apicid_to_node
- set_apicid_to_node
- numa_cpu_node
- numa_set_node
- numa_clear_node
- init_cpu_to_node
- numa_add_cpu
- numa_remove_cpu
1
2 #ifndef _ASM_X86_NUMA_H
3 #define _ASM_X86_NUMA_H
4
5 #include <linux/nodemask.h>
6
7 #include <asm/topology.h>
8 #include <asm/apicdef.h>
9
10 #ifdef CONFIG_NUMA
11
12 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
13
14
15
16
17
18
19 #define NODE_MIN_SIZE (4*1024*1024)
20
21 extern int numa_off;
22
23
24
25
26
27
28
29
30
31 extern s16 __apicid_to_node[MAX_LOCAL_APIC];
32 extern nodemask_t numa_nodes_parsed __initdata;
33
34 extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
35 extern void __init numa_set_distance(int from, int to, int distance);
36
37 static inline void set_apicid_to_node(int apicid, s16 node)
38 {
39 __apicid_to_node[apicid] = node;
40 }
41
42 extern int numa_cpu_node(int cpu);
43
44 #else
45 static inline void set_apicid_to_node(int apicid, s16 node)
46 {
47 }
48
49 static inline int numa_cpu_node(int cpu)
50 {
51 return NUMA_NO_NODE;
52 }
53 #endif
54
55 #ifdef CONFIG_X86_32
56 # include <asm/numa_32.h>
57 #endif
58
59 #ifdef CONFIG_NUMA
60 extern void numa_set_node(int cpu, int node);
61 extern void numa_clear_node(int cpu);
62 extern void __init init_cpu_to_node(void);
63 extern void numa_add_cpu(int cpu);
64 extern void numa_remove_cpu(int cpu);
65 #else
66 static inline void numa_set_node(int cpu, int node) { }
67 static inline void numa_clear_node(int cpu) { }
68 static inline void init_cpu_to_node(void) { }
69 static inline void numa_add_cpu(int cpu) { }
70 static inline void numa_remove_cpu(int cpu) { }
71 #endif
72
73 #ifdef CONFIG_DEBUG_PER_CPU_MAPS
74 void debug_cpumask_set_cpu(int cpu, int node, bool enable);
75 #endif
76
77 #ifdef CONFIG_NUMA_EMU
78 #define FAKE_NODE_MIN_SIZE ((u64)32 << 20)
79 #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
80 void numa_emu_cmdline(char *);
81 #endif
82
83 #endif