aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/include/asm/topology.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-26 06:53:41 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-12-26 06:53:41 -0500
commit2258a5bb1064351b552aceaff29393967d694fa3 (patch)
treeddfe5c19232e0dd73963360089cb7dc6c3ea4f53 /arch/alpha/include/asm/topology.h
parentb4a2f916a8326065816a0743dd1b0ca2ffd18f5f (diff)
cpumask: alpha: 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. I'm not sure the existing code even compiles, but new version is straightforward. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'arch/alpha/include/asm/topology.h')
-rw-r--r--arch/alpha/include/asm/topology.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/alpha/include/asm/topology.h b/arch/alpha/include/asm/topology.h
index 149532e162c4..b4f284c72ff3 100644
--- a/arch/alpha/include/asm/topology.h
+++ b/arch/alpha/include/asm/topology.h
@@ -39,7 +39,24 @@ static inline cpumask_t node_to_cpumask(int node)
39 return node_cpu_mask; 39 return node_cpu_mask;
40} 40}
41 41
42extern struct cpumask node_to_cpumask_map[];
43/* FIXME: This is dumb, recalculating every time. But simple. */
44static const struct cpumask *cpumask_of_node(int node)
45{
46 int cpu;
47
48 cpumask_clear(&node_to_cpumask_map[node]);
49
50 for_each_online_cpu(cpu) {
51 if (cpu_to_node(cpu) == node)
52 cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
53 }
54
55 return &node_to_cpumask_map[node];
56}
57
42#define pcibus_to_cpumask(bus) (cpu_online_map) 58#define pcibus_to_cpumask(bus) (cpu_online_map)
59#define cpumask_of_pcibus(bus) (cpu_online_mask)
43 60
44#endif /* !CONFIG_NUMA */ 61#endif /* !CONFIG_NUMA */
45# include <asm-generic/topology.h> 62# include <asm-generic/topology.h>