1
2
3
4
5
6
7
8
9
10
11 #ifndef _ASM_IA64_NUMA_H
12 #define _ASM_IA64_NUMA_H
13
14
15 #ifdef CONFIG_NUMA
16
17 #include <linux/cache.h>
18 #include <linux/cpumask.h>
19 #include <linux/numa.h>
20 #include <linux/smp.h>
21 #include <linux/threads.h>
22
23 #include <asm/mmzone.h>
24
25 extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
26 extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
27 extern pg_data_t *pgdat_list[MAX_NUMNODES];
28
29
30
31 extern int num_node_memblks;
32
33
34
35
36
37
38 struct node_memblk_s {
39 unsigned long start_paddr;
40 unsigned long size;
41 int nid;
42 int bank;
43 };
44
45 struct node_cpuid_s {
46 u16 phys_id;
47 int nid;
48 };
49
50 extern struct node_memblk_s node_memblk[NR_NODE_MEMBLKS];
51 extern struct node_cpuid_s node_cpuid[NR_CPUS];
52
53
54
55
56
57
58
59
60
61 extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
62 #define slit_distance(from,to) (numa_slit[(from) * MAX_NUMNODES + (to)])
63 extern int __node_distance(int from, int to);
64 #define node_distance(from,to) __node_distance(from, to)
65
66 extern int paddr_to_nid(unsigned long paddr);
67
68 #define local_nodeid (cpu_to_node_map[smp_processor_id()])
69
70 #define numa_off 0
71
72 extern void map_cpu_to_node(int cpu, int nid);
73 extern void unmap_cpu_from_node(int cpu, int nid);
74 extern void numa_clear_node(int cpu);
75
76 #else
77 #define map_cpu_to_node(cpu, nid) do{}while(0)
78 #define unmap_cpu_from_node(cpu, nid) do{}while(0)
79 #define paddr_to_nid(addr) 0
80 #define numa_clear_node(cpu) do { } while (0)
81 #endif
82
83 #endif