Re: 2.6.7-mm2: compile error SCHED_SMT + NUMA + gcc 2.95

Andrew Morton
2004-06-24T21:21:54Z

Adrian Bunk <bunk@fs.tum.de> wrote:
>
> CC arch/i386/kernel/smpboot.o
> arch/i386/kernel/smpboot.c: In function `arch_init_sched_domains':
> arch/i386/kernel/smpboot.c:1195: invalid lvalue in unary `&'
> arch/i386/kernel/smpboot.c:1231: invalid lvalue in unary `&'

--- 25/arch/i386/kernel/smpboot.c~smpboot-build-fix Thu Jun 24 14:22:55 2004
+++ 25-akpm/arch/i386/kernel/smpboot.c Thu Jun 24 14:22:55 2004
@@ -1192,7 +1192,9 @@ __init void arch_init_sched_domains(void
int j;
cpumask_t nodemask;
struct sched_group *node = &sched_group_nodes[i];
- cpus_and(nodemask, node_to_cpumask(i), cpu_possible_map);
+ cpumask_t node_cpumask = node_to_cpumask(i);
+
+ cpus_and(nodemask, node_cpumask, cpu_possible_map);

if (cpus_empty(nodemask))
continue;
@@ -1228,7 +1230,9 @@ __init void arch_init_sched_domains(void
for (i = 0; i < MAX_NUMNODES; i++) {
struct sched_group *cpu = &sched_group_nodes[i];
cpumask_t nodemask;
- cpus_and(nodemask, node_to_cpumask(i), cpu_possible_map);
+ cpumask_t node_cpumask = node_to_cpumask(i);
+
+ cpus_and(nodemask, node_cpumask, cpu_possible_map);

if (cpus_empty(nodemask))
continue;
_