diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-26 11:53:38 (GMT) |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-26 11:53:38 (GMT) |
commit | 96d76a74870d5f11ce2abdd09a8dcdc401d714d1 (patch) | |
tree | efb10f0e18c29d0c177a13c66953bc20ed86dcf1 /arch/sparc/include/asm/topology_64.h | |
parent | 393d68fb9929817cde7ab31c82d66fcb28ad35fc (diff) | |
download | linux-fsl-qoriq-96d76a74870d5f11ce2abdd09a8dcdc401d714d1.tar.xz |
cpumask: sparc: 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.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/topology_64.h')
-rw-r--r-- | arch/sparc/include/asm/topology_64.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h index 001c040..afd3cc1 100644 --- a/arch/sparc/include/asm/topology_64.h +++ b/arch/sparc/include/asm/topology_64.h @@ -16,8 +16,12 @@ static inline cpumask_t node_to_cpumask(int node) { return numa_cpumask_lookup_table[node]; } +#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) -/* Returns a pointer to the cpumask of CPUs on Node 'node'. */ +/* + * Returns a pointer to the cpumask of CPUs on Node 'node'. + * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" + */ #define node_to_cpumask_ptr(v, node) \ cpumask_t *v = &(numa_cpumask_lookup_table[node]) @@ -26,9 +30,7 @@ static inline cpumask_t node_to_cpumask(int node) static inline int node_to_first_cpu(int node) { - cpumask_t tmp; - tmp = node_to_cpumask(node); - return first_cpu(tmp); + return cpumask_first(cpumask_of_node(node)); } struct pci_bus; |