summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2015-04-21 14:38:22 +0200
committerMichael Brown2015-04-21 14:38:22 +0200
commit541beb16501aebdaecdc482453d296f44a298db3 (patch)
tree79d34bf4fb85af02b62cab4a9d28f4d890092bd5
parent[pxe] Allow PXE NBP to accept a command line (diff)
downloadmemtest86-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.c3
-rw-r--r--main.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/init.c b/init.c
index 754b8d7..57239da 100644
--- a/init.c
+++ b/init.c
@@ -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; }
}
diff --git a/main.c b/main.c
index c383bf7..59b9654 100644
--- a/main.c
+++ b/main.c
@@ -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;