aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2005-08-24 07:15:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-24 12:40:45 -0400
commit3725822f7c7134249addcd4549aff086950c8090 (patch)
treed7db18d3d5f75fe4309ddc7aa373f3213f845b41
parent40bb0c3ef52d872de348e10000eb5432a43a147d (diff)
[PATCH] cpu_exclusive sched domains build fix
As reported by Paul Mackerras <paulus@samba.org>, the previous patch "cpu_exclusive sched domains fix" broke the ppc64 build with CONFIC_CPUSET, yielding error messages: kernel/cpuset.c: In function 'update_cpu_domains': kernel/cpuset.c:648: error: invalid lvalue in unary '&' kernel/cpuset.c:648: error: invalid lvalue in unary '&' On some arch's, the node_to_cpumask() is a function, returning a cpumask_t. But the for_each_cpu_mask() requires an lvalue mask. The following patch fixes this build failure by making a copy of the cpumask_t on the stack. Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/cpuset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index e0d296c5b302..d7f4d0c95737 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -645,7 +645,9 @@ static void update_cpu_domains(struct cpuset *cur)
645 int i, j; 645 int i, j;
646 646
647 for_each_cpu_mask(i, cur->cpus_allowed) { 647 for_each_cpu_mask(i, cur->cpus_allowed) {
648 for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { 648 cpumask_t mask = node_to_cpumask(cpu_to_node(i));
649
650 for_each_cpu_mask(j, mask) {
649 if (!cpu_isset(j, cur->cpus_allowed)) 651 if (!cpu_isset(j, cur->cpus_allowed))
650 return; 652 return;
651 } 653 }