File tree Expand file tree Collapse file tree
Documentation/admin-guide Expand file tree Collapse file tree Original file line number Diff line number Diff line change 38383838 nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
38393839 and disable the IO APIC. legacy for "maxcpus=0".
38403840
3841- nosmt [KNL,S390] Disable symmetric multithreading (SMT).
3841+ nosmt [KNL,MIPS, S390] Disable symmetric multithreading (SMT).
38423842 Equivalent to smt=1.
38433843
38443844 [KNL,X86] Disable symmetric multithreading (SMT).
57355735 1: Fast pin select (default)
57365736 2: ATC IRMode
57375737
5738- smt= [KNL,S390] Set the maximum number of threads (logical
5738+ smt= [KNL,MIPS, S390] Set the maximum number of threads (logical
57395739 CPUs) to use per physical CPU on systems capable of
57405740 symmetric multithreading (SMT). Will be capped to the
57415741 actual hardware limit.
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ extern int __cpu_logical_map[NR_CPUS];
5757/* Mask of CPUs which are currently definitely operating coherently */
5858extern cpumask_t cpu_coherent_mask ;
5959
60+ extern unsigned int smp_max_threads __initdata ;
61+
6062extern asmlinkage void smp_bootstrap (void );
6163
6264extern void calculate_cpu_foreign_map (void );
Original file line number Diff line number Diff line change 2525#include <asm/time.h>
2626#include <asm/uasm.h>
2727
28- static bool threads_disabled ;
2928static DECLARE_BITMAP (core_power , NR_CPUS ) ;
3029
3130struct core_boot_config * mips_cps_core_bootcfg ;
3231
33- static int __init setup_nothreads (char * s )
34- {
35- threads_disabled = true;
36- return 0 ;
37- }
38- early_param ("nothreads" , setup_nothreads );
39-
4032static unsigned core_vpe_count (unsigned int cluster , unsigned core )
4133{
42- if (threads_disabled )
43- return 1 ;
44-
45- return mips_cps_numvps (cluster , core );
34+ return min (smp_max_threads , mips_cps_numvps (cluster , core ));
4635}
4736
4837static void __init cps_smp_setup (void )
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ static void __init smvp_copy_vpe_config(void)
4646static unsigned int __init smvp_vpe_init (unsigned int tc , unsigned int mvpconf0 ,
4747 unsigned int ncpu )
4848{
49- if (tc > ((mvpconf0 & MVPCONF0_PVPE ) >> MVPCONF0_PVPE_SHIFT ))
49+ if (tc >= smp_max_threads ||
50+ (tc > ((mvpconf0 & MVPCONF0_PVPE ) >> MVPCONF0_PVPE_SHIFT )))
5051 return ncpu ;
5152
5253 /* Deactivate all but VPE 0 */
Original file line number Diff line number Diff line change @@ -73,6 +73,24 @@ static cpumask_t cpu_core_setup_map;
7373
7474cpumask_t cpu_coherent_mask ;
7575
76+ unsigned int smp_max_threads __initdata = UINT_MAX ;
77+
78+ static int __init early_nosmt (char * s )
79+ {
80+ smp_max_threads = 1 ;
81+ return 0 ;
82+ }
83+ early_param ("nosmt" , early_nosmt );
84+
85+ static int __init early_smt (char * s )
86+ {
87+ get_option (& s , & smp_max_threads );
88+ /* Ensure at least one thread is available */
89+ smp_max_threads = clamp_val (smp_max_threads , 1U , UINT_MAX );
90+ return 0 ;
91+ }
92+ early_param ("smt" , early_smt );
93+
7694#ifdef CONFIG_GENERIC_IRQ_IPI
7795static struct irq_desc * call_desc ;
7896static struct irq_desc * sched_desc ;
You can’t perform that action at this time.
0 commit comments