[PATCH] PPC64 (2/4) Use cpu_present_map in ppc64

From: Paul Mackerras
Date: Fri Aug 13 2004 - 00:19:11 EST


Adopt the "standard" cpu_present_map for describing cpus which are
present in the system, but not necessarily online. cpu_present_map is
meant to be a superset of cpu_online_map and a subset of
cpu_possible_map.

Signed-off-by: Nathan Lynch <nathanl@xxxxxxxxxxxxxx>
Signed-off-by: Paul Mackerras <paulus@xxxxxxxxx>

diff -puN arch/ppc64/kernel/prom.c~ppc64-add-cpu_present_map arch/ppc64/kernel/prom.c
--- 2.6-tip/arch/ppc64/kernel/prom.c~ppc64-add-cpu_present_map 2004-08-03 18:07:06.000000000 -0500
+++ 2.6-tip-nathanl/arch/ppc64/kernel/prom.c 2004-08-03 18:07:06.000000000 -0500
@@ -943,6 +943,7 @@ static void __init prom_hold_cpus(unsign
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
+ cpu_set(cpuid, RELOC(cpu_present_map));
if (reg == 0)
cpu_set(cpuid, RELOC(cpu_online_map));
#endif /* CONFIG_SMP */
@@ -1045,6 +1046,7 @@ static void __init prom_hold_cpus(unsign
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
+ cpu_set(cpuid, RELOC(cpu_present_map));
#endif
} else {
prom_printf("... failed: %x\n", *acknowledge);
@@ -1057,6 +1059,7 @@ static void __init prom_hold_cpus(unsign
cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_online_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
+ cpu_set(cpuid, RELOC(cpu_present_map));
}
#endif
next:
@@ -1072,6 +1075,7 @@ next:
if (_naca->smt_state) {
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
+ cpu_set(cpuid, RELOC(cpu_present_map));
prom_printf("available\n");
} else {
prom_printf("not available\n");
@@ -1103,6 +1107,7 @@ next:
}
/* cpu_set(i+1, cpu_online_map); */
cpu_set(i+1, RELOC(cpu_possible_map));
+ cpu_set(i+1, RELOC(cpu_present_map));
}
_systemcfg->processorCount *= 2;
} else {
diff -puN arch/ppc64/kernel/smp.c~ppc64-add-cpu_present_map arch/ppc64/kernel/smp.c
--- 2.6-tip/arch/ppc64/kernel/smp.c~ppc64-add-cpu_present_map 2004-08-03 18:07:06.000000000 -0500
+++ 2.6-tip-nathanl/arch/ppc64/kernel/smp.c 2004-08-03 18:07:06.000000000 -0500
@@ -127,6 +127,7 @@ static int smp_iSeries_numProcs(void)
cpu_set(i, cpu_available_map);
cpu_set(i, cpu_possible_map);
cpu_set(i, cpu_present_at_boot);
+ cpu_set(i, cpu_present_map);
++np;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/