[patch 2/4] Use cpu_present_map in ppc64
nathanl at austin.ibm.com
nathanl at austin.ibm.com
Wed Aug 4 09:18:34 EST 2004
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 at austin.ibm.com>
---
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;
}
}
_
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list