public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.13-rc6] cpu_exclusive sched domains build fix
@ 2005-08-24 11:15 Paul Jackson
  2005-08-24 11:26 ` Dinakar Guniguntala
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Jackson @ 2005-08-24 11:15 UTC (permalink / raw)
  To: paulus, Andrew Morton
  Cc: nickpiggin, linux-ia64, linux-kernel, torvalds, mingo, hawkes,
	Paul Jackson, dino

As reported by Paul Mackerras <paulus@samba.org>, the previous
patch "cpu_exclusive sched domains fix" broke the ppc64 build,
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.

I have _not_ yet tried to build this for ppc64 - just for ia64.
I will try that now.  But the fix seems obvious enough that it
is worth sending out now.

Signed-off-by: Paul Jackson <pj@sgi.com>

Index: linux-2.6.13-cpuset-mempolicy-migrate/kernel/cpuset.c
===================================================================
--- linux-2.6.13-cpuset-mempolicy-migrate.orig/kernel/cpuset.c
+++ linux-2.6.13-cpuset-mempolicy-migrate/kernel/cpuset.c
@@ -645,7 +645,9 @@ static void update_cpu_domains(struct cp
 		int i, j;
 
 		for_each_cpu_mask(i, cur->cpus_allowed) {
-			for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) {
+			cpumask_t mask = node_to_cpumask(cpu_to_node(i));
+
+			for_each_cpu_mask(j, mask) {
 				if (!cpu_isset(j, cur->cpus_allowed))
 					return;
 			}

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-08-25 16:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-24 11:15 [PATCH 2.6.13-rc6] cpu_exclusive sched domains build fix Paul Jackson
2005-08-24 11:26 ` Dinakar Guniguntala
2005-08-24 11:46   ` Paul Jackson
2005-08-24 12:01     ` Nick Piggin
2005-08-24 20:31       ` Paul Jackson
2005-08-25  0:02         ` Nick Piggin
2005-08-25  0:57           ` Paul Jackson
2005-08-25 14:41         ` Dinakar Guniguntala
2005-08-25 15:20           ` Paul Jackson
2005-08-24 16:09   ` John Hawkes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox