diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:27 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:27 -0500 |
commit | f0b848ce6fe9062d504d997e9e97fe0f87d57217 (patch) | |
tree | a65d0d47ba2b13f740ea4477617fdcb710ae5889 /include/asm-generic | |
parent | aab46da0520af9c99b7802cebe4f14a81ff39415 (diff) |
cpumask: 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.
This defines them in the generic non-NUMA case.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/topology.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 54bbf6e04ee8..0e9e2bc0ee96 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h | |||
@@ -40,6 +40,9 @@ | |||
40 | #ifndef node_to_cpumask | 40 | #ifndef node_to_cpumask |
41 | #define node_to_cpumask(node) ((void)node, cpu_online_map) | 41 | #define node_to_cpumask(node) ((void)node, cpu_online_map) |
42 | #endif | 42 | #endif |
43 | #ifndef cpumask_of_node | ||
44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) | ||
45 | #endif | ||
43 | #ifndef node_to_first_cpu | 46 | #ifndef node_to_first_cpu |
44 | #define node_to_first_cpu(node) ((void)(node),0) | 47 | #define node_to_first_cpu(node) ((void)(node),0) |
45 | #endif | 48 | #endif |
@@ -54,9 +57,18 @@ | |||
54 | ) | 57 | ) |
55 | #endif | 58 | #endif |
56 | 59 | ||
60 | #ifndef cpumask_of_pcibus | ||
61 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | ||
62 | cpu_all_mask : \ | ||
63 | cpumask_of_node(pcibus_to_node(bus))) | ||
64 | #endif | ||
65 | |||
57 | #endif /* CONFIG_NUMA */ | 66 | #endif /* CONFIG_NUMA */ |
58 | 67 | ||
59 | /* returns pointer to cpumask for specified node */ | 68 | /* |
69 | * returns pointer to cpumask for specified node | ||
70 | * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" | ||
71 | */ | ||
60 | #ifndef node_to_cpumask_ptr | 72 | #ifndef node_to_cpumask_ptr |
61 | 73 | ||
62 | #define node_to_cpumask_ptr(v, node) \ | 74 | #define node_to_cpumask_ptr(v, node) \ |