mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
MIPS: Rework smt cmdline parameters
Provide a generic smt parameters interface aligned with s390 to allow users to limit smt usage and threads per core. It replaced previous undocumented "nothreads" parameter for smp-cps which is ambiguous and does not cover smp-mt. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
committed by
Thomas Bogendoerfer
parent
dfbd992e0e
commit
96cb8ae28c
@@ -25,24 +25,13 @@
|
||||
#include <asm/time.h>
|
||||
#include <asm/uasm.h>
|
||||
|
||||
static bool threads_disabled;
|
||||
static DECLARE_BITMAP(core_power, NR_CPUS);
|
||||
|
||||
struct core_boot_config *mips_cps_core_bootcfg;
|
||||
|
||||
static int __init setup_nothreads(char *s)
|
||||
{
|
||||
threads_disabled = true;
|
||||
return 0;
|
||||
}
|
||||
early_param("nothreads", setup_nothreads);
|
||||
|
||||
static unsigned core_vpe_count(unsigned int cluster, unsigned core)
|
||||
{
|
||||
if (threads_disabled)
|
||||
return 1;
|
||||
|
||||
return mips_cps_numvps(cluster, core);
|
||||
return min(smp_max_threads, mips_cps_numvps(cluster, core));
|
||||
}
|
||||
|
||||
static void __init cps_smp_setup(void)
|
||||
|
||||
Reference in New Issue
Block a user