cpumask: powerpc: 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. (Also replaces powerpc internal uses of node_to_cpumask). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
@@ -80,10 +80,10 @@ static void cpu_affinity_set(struct spu *spu, int cpu)
|
||||
u64 route;
|
||||
|
||||
if (nr_cpus_node(spu->node)) {
|
||||
cpumask_t spumask = node_to_cpumask(spu->node);
|
||||
cpumask_t cpumask = node_to_cpumask(cpu_to_node(cpu));
|
||||
const struct cpumask *spumask = cpumask_of_node(spu->node),
|
||||
*cpumask = cpumask_of_node(cpu_to_node(cpu));
|
||||
|
||||
if (!cpus_intersects(spumask, cpumask))
|
||||
if (!cpumask_intersects(spumask, cpumask))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -166,9 +166,9 @@ void spu_update_sched_info(struct spu_context *ctx)
|
||||
static int __node_allowed(struct spu_context *ctx, int node)
|
||||
{
|
||||
if (nr_cpus_node(node)) {
|
||||
cpumask_t mask = node_to_cpumask(node);
|
||||
const struct cpumask *mask = cpumask_of_node(node);
|
||||
|
||||
if (cpus_intersects(mask, ctx->cpus_allowed))
|
||||
if (cpumask_intersects(mask, &ctx->cpus_allowed))
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user