Skip to content

Commit 3725822

Browse files
Paul JacksonLinus Torvalds
authored andcommitted
[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>
1 parent 40bb0c3 commit 3725822

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/cpuset.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,9 @@ static void update_cpu_domains(struct cpuset *cur)
645645
int i, j;
646646

647647
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) {
649651
if (!cpu_isset(j, cur->cpus_allowed))
650652
return;
651653
}

0 commit comments

Comments
 (0)