Skip to contentSkip to conversation

ppc64 SMT bugfix

PATCH In review Joel Schopp 2 participants 2 messages Jul 27, 2004 – Jul 29, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc64 SMT bugfix

This patch is fairly straightforward. maxcpus should be per SMT thread and not per physical processor. SUSE picked this up back in May (was discussed on ppc64 mailing list) and has had no trouble with it.

arch/ppc64/kernel/smp.c +5 -1
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
@@ -422,7 +422,11 @@
 	}
 
 	maxcpus = ireg[num_addr_cell + num_size_cell];
-	/* DRENG need to account for threads here too */
+
+	/* Double maxcpus for processors which have SMT capability */
+	if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
+		maxcpus *= 2;
+
 
 	if (maxcpus > NR_CPUS) {
 		printk(KERN_WARNING
#1 lore raw

Hi Joel,

Yep, looks good to me. Longer term we should allow an aribtrary number of siblings but we can fix that when the cpu_to_sibling stuff goes in.

Anton

--

From: Joel Schopp <[email protected]>

This patch is fairly straightforward. maxcpus should be per SMT thread and not per physical processor.

arch/ppc64/kernel/smp.c +5 -1
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
@@ -422,7 +422,11 @@
 	}
 
 	maxcpus = ireg[num_addr_cell + num_size_cell];
-	/* DRENG need to account for threads here too */
+
+	/* Double maxcpus for processors which have SMT capability */
+	if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
+		maxcpus *= 2;
+
 
 	if (maxcpus > NR_CPUS) {
 		printk(KERN_WARNING