Messages in this thread Patch in this message | | | Date | Thu, 29 Jul 2004 15:52:34 +1000 | From | Anton Blanchard <> | Subject | Re: [PATCH] ppc64 SMT bugfix |
| |
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 <jschopp@austin.ibm.com>
This patch is fairly straightforward. maxcpus should be per SMT thread and not per physical processor.
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Anton Blanchard <anton@samba.org>
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c Tue Jul 27 13:44:45 2004 +++ b/arch/ppc64/kernel/smp.c Tue Jul 27 13:44:45 2004 @@ -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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |