diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-26 06:53:40 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-26 06:53:40 -0500 |
commit | fbb776c3ca4501d5a2821bf1e9bceefcaec7ae47 (patch) | |
tree | ef2b0bba2d31a6408224b4bedcd518b5e5ed6e5c /arch/ia64/include/asm/topology.h | |
parent | 86c6f274f52c3e991d429869780945c0790e7b65 (diff) |
cpumask: IA64: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask
Impact: New APIs
The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these
return a pointer to a struct cpumask. Part of removing cpumasks from
the stack.
We can also use the new for_each_cpu_and() to avoid a temporary cpumask,
and a gratuitous test in sn_topology_show.
(Includes fix from KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tony Luck <tony.luck@intel.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Diffstat (limited to 'arch/ia64/include/asm/topology.h')
-rw-r--r-- | arch/ia64/include/asm/topology.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 35bcb641c9e5..66f0f1ef9e7f 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 |
@@ -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 */ |