Skip to content

Commit

Permalink
[PATCH] cpu_exclusive sched domains build fix
Browse files Browse the repository at this point in the history
As reported by Paul Mackerras <[email protected]>, 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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Paul Jackson authored and Linus Torvalds committed Aug 24, 2005
1 parent 40bb0c3 commit 3725822
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,9 @@ static void update_cpu_domains(struct cpuset *cur)
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;
}
Expand Down

0 comments on commit 3725822

Please sign in to comment.