diff options
Diffstat (limited to 'arch/ia64/include/asm/topology.h')
-rw-r--r-- | arch/ia64/include/asm/topology.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 35bcb641c9e5..76a33a91ca69 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h | |||
@@ -34,6 +34,7 @@ | |||
34 | * Returns a bitmask of CPUs on Node 'node'. | 34 | * Returns a bitmask of CPUs on Node 'node'. |
35 | */ | 35 | */ |
36 | #define node_to_cpumask(node) (node_to_cpu_mask[node]) | 36 | #define node_to_cpumask(node) (node_to_cpu_mask[node]) |
37 | #define cpumask_of_node(node) (&node_to_cpu_mask[node]) | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * Returns the number of the node containing Node 'nid'. | 40 | * Returns the number of the node containing Node 'nid'. |
@@ -45,7 +46,7 @@ | |||
45 | /* | 46 | /* |
46 | * Returns the number of the first CPU on Node 'node'. | 47 | * Returns the number of the first CPU on Node 'node'. |
47 | */ | 48 | */ |
48 | #define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node))) | 49 | #define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node))) |
49 | 50 | ||
50 | /* | 51 | /* |
51 | * Determines the node for a given pci bus | 52 | * Determines the node for a given pci bus |
@@ -55,7 +56,6 @@ | |||
55 | void build_cpu_to_node_map(void); | 56 | void build_cpu_to_node_map(void); |
56 | 57 | ||
57 | #define SD_CPU_INIT (struct sched_domain) { \ | 58 | #define SD_CPU_INIT (struct sched_domain) { \ |
58 | .span = CPU_MASK_NONE, \ | ||
59 | .parent = NULL, \ | 59 | .parent = NULL, \ |
60 | .child = NULL, \ | 60 | .child = NULL, \ |
61 | .groups = NULL, \ | 61 | .groups = NULL, \ |
@@ -80,7 +80,6 @@ void build_cpu_to_node_map(void); | |||
80 | 80 | ||
81 | /* sched_domains SD_NODE_INIT for IA64 NUMA machines */ | 81 | /* sched_domains SD_NODE_INIT for IA64 NUMA machines */ |
82 | #define SD_NODE_INIT (struct sched_domain) { \ | 82 | #define SD_NODE_INIT (struct sched_domain) { \ |
83 | .span = CPU_MASK_NONE, \ | ||
84 | .parent = NULL, \ | 83 | .parent = NULL, \ |
85 | .child = NULL, \ | 84 | .child = NULL, \ |
86 | .groups = NULL, \ | 85 | .groups = NULL, \ |
@@ -111,6 +110,8 @@ void build_cpu_to_node_map(void); | |||
111 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | 110 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) |
112 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 111 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
113 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 112 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
113 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
114 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | ||
114 | #define smt_capable() (smp_num_siblings > 1) | 115 | #define smt_capable() (smp_num_siblings > 1) |
115 | #endif | 116 | #endif |
116 | 117 | ||
@@ -121,6 +122,10 @@ extern void arch_fix_phys_package_id(int num, u32 slot); | |||
121 | node_to_cpumask(pcibus_to_node(bus)) \ | 122 | node_to_cpumask(pcibus_to_node(bus)) \ |
122 | ) | 123 | ) |
123 | 124 | ||
125 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | ||
126 | cpu_all_mask : \ | ||
127 | cpumask_from_node(pcibus_to_node(bus))) | ||
128 | |||
124 | #include <asm-generic/topology.h> | 129 | #include <asm-generic/topology.h> |
125 | 130 | ||
126 | #endif /* _ASM_IA64_TOPOLOGY_H */ | 131 | #endif /* _ASM_IA64_TOPOLOGY_H */ |