diff options
author | Michael Brown | 2015-04-21 14:38:22 +0200 |
---|---|---|
committer | Michael Brown | 2015-04-21 14:38:22 +0200 |
commit | 541beb16501aebdaecdc482453d296f44a298db3 (patch) | |
tree | 79d34bf4fb85af02b62cab4a9d28f4d890092bd5 | |
parent | [pxe] Allow PXE NBP to accept a command line (diff) | |
download | memtest86-541beb16501aebdaecdc482453d296f44a298db3.tar.gz memtest86-541beb16501aebdaecdc482453d296f44a298db3.tar.xz memtest86-541beb16501aebdaecdc482453d296f44a298db3.zip |
[smp] Allow CONSERVATIVE_SMP to be overridden by "smp" command-line option
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | init.c | 3 | ||||
-rw-r--r-- | main.c | 6 |
2 files changed, 8 insertions, 1 deletions
@@ -46,6 +46,7 @@ static void get_cache_size(); static void cpu_cache_speed(); void get_cpuid(); int beepmode; +int conservative_smp = CONSERVATIVE_SMP; extern short dmi_initialized; extern int dmi_err_cnts[MAX_DMI_MEMDEVS]; @@ -641,7 +642,7 @@ void smp_default_mode(void) } // For 5.01 release, SMP disabled by defualt by config.h toggle - if(CONSERVATIVE_SMP) { v->fail_safe |= 0b10; } + if(conservative_smp) { v->fail_safe |= 0b10; } } @@ -41,6 +41,7 @@ extern struct barrier_s *barr; extern int num_cpus; extern int act_cpus; extern unsigned smp_page; +extern int conservative_smp; static int find_ticks_for_test(int test); void find_ticks_for_pass(void); @@ -319,6 +320,11 @@ static void parse_command_line(void) cp += 8; maxcpus=(int)simple_strtoul(cp, &dummy, 10); } + /* Allow SMP to be enabled by default */ + if (!strncmp(cp, "smp", 3)) { + cp += 3; + conservative_smp = 0; + } /* Run one pass and exit if there are no errors */ if (!strncmp(cp, "onepass", 7)) { cp += 7; |