powerpc: Correct smt_enabled=X boot option for > 2 threads per core
The 'smt_enabled=X' boot option does not handle values of X > 2. For Power 7 processors with smt modes of 0,1,2,3, and 4 this does not work. This patch allows the smt_enabled option to be set to any value limited to a max equal to the number of threads per core. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
1afb56cf97
commit
954e6da54b
@@ -182,10 +182,13 @@ static int smp_pSeries_cpu_bootable(unsigned int nr)
|
||||
/* Special case - we inhibit secondary thread startup
|
||||
* during boot if the user requests it.
|
||||
*/
|
||||
if (system_state < SYSTEM_RUNNING &&
|
||||
cpu_has_feature(CPU_FTR_SMT) &&
|
||||
!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
|
||||
return 0;
|
||||
if (system_state < SYSTEM_RUNNING && cpu_has_feature(CPU_FTR_SMT)) {
|
||||
if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
|
||||
return 0;
|
||||
if (smt_enabled_at_boot
|
||||
&& cpu_thread_in_core(nr) >= smt_enabled_at_boot)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user