Broken LPAR cpu bringup

Nathan Lynch nathanl at austin.ibm.com
Fri Jul 16 08:39:10 EST 2004


On Wed, 2004-07-14 at 23:29, Nathan Lynch wrote:
> Does this fix it?  The problem is that ppc64 doesn't know about
> cpu_present_map.  The arch-independent code copies cpu_possible_map to
> cpu_present_map if the latter has not been modified by the arch bootup
> code -- as you have discovered, this breaks on LPAR.

Well, that's not the only problem, it seems.  With this one on top of
the previous patch, does it work?  I have tested it on a similar
configuration, but not Power4.

Nathan

diff -prauN -X /home/nathanl/working/dontdiff 2.6.8-rc1-mm1.1/arch/ppc64/kernel/smp.c 2.6.8-rc1-mm1.2/arch/ppc64/kernel/smp.c
--- 2.6.8-rc1-mm1.1/arch/ppc64/kernel/smp.c	2004-07-15 17:27:54.000000000 -0500
+++ 2.6.8-rc1-mm1.2/arch/ppc64/kernel/smp.c	2004-07-15 16:59:46.000000000 -0500
@@ -373,7 +373,7 @@ static inline int __devinit smp_startup_

 	/* At boot time the cpus are already spinning in hold
 	 * loops, so nothing to do. */
- 	if (system_state == SYSTEM_BOOTING)
+ 	if (system_state < SYSTEM_RUNNING)
 		return 1;

 	pcpu = find_physical_cpu_to_start(get_hard_smp_processor_id(lcpu));
@@ -423,6 +423,11 @@ static inline void look_for_more_cpus(vo
 	maxcpus = ireg[num_addr_cell + num_size_cell];
 	/* DRENG need to account for threads here too */

+	if ((cur_cpu_spec->cpu_features & CPU_FTR_SMT) &&
+	    ((naca->smt_state == SMT_ON) || (naca->smt_state == SMT_DYNAMIC)))
+		maxcpus *= 2;
+
+
 	if (maxcpus > NR_CPUS) {
 		printk(KERN_WARNING
 		       "Partition configured for %d cpus, "


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list