Commit baf129a1 authored by Andrew Morton's avatar Andrew Morton Committed by Len Brown

[PATCH] ppc64: fix NUMA compile with large cpumasks

From: Anton Blanchard <anton@samba.org>

The recent NUMA changes fail to compile with large cpumasks, we need to use
a temporary to get around the type checking.
parent 9e533ec6
...@@ -1115,6 +1115,8 @@ static int __init find_next_best_node(int node, void *used_node_mask) ...@@ -1115,6 +1115,8 @@ static int __init find_next_best_node(int node, void *used_node_mask)
int best_node = -1; int best_node = -1;
for (i = 0; i < numnodes; i++) { for (i = 0; i < numnodes; i++) {
cpumask_t tmp;
/* Start from local node */ /* Start from local node */
n = (node+i)%numnodes; n = (node+i)%numnodes;
...@@ -1126,7 +1128,8 @@ static int __init find_next_best_node(int node, void *used_node_mask) ...@@ -1126,7 +1128,8 @@ static int __init find_next_best_node(int node, void *used_node_mask)
val = node_distance(node, n); val = node_distance(node, n);
/* Give preference to headless and unused nodes */ /* Give preference to headless and unused nodes */
if (!cpus_empty(node_to_cpumask(n))) tmp = node_to_cpumask(n);
if (!cpus_empty(tmp))
val += PENALTY_FOR_NODE_WITH_CPUS; val += PENALTY_FOR_NODE_WITH_CPUS;
/* Slight preference for less loaded node */ /* Slight preference for less loaded node */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment