diff options
author | Yinghai Lu <yhlu.kernel.send@gmail.com> | 2008-04-18 20:49:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:28:15 -0400 |
commit | 0327318445d55808991a63137cfb698a90ab6adf (patch) | |
tree | 7f69e3cdb237d38ed675e0206413b16397ff70fd | |
parent | 492c2e476eac010962850006c49df326919b284c (diff) |
x86_64: simplify the memtest parameter setting
use CONFIG_MEMTEST only. if it is set, will have memtest=0 (disabled)
need to have memtest=4 in command line to test more patterns.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/Kconfig | 30 | ||||
-rw-r--r-- | arch/x86/mm/init_64.c | 5 |
2 files changed, 10 insertions, 25 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fe361ae7ef2f..a1a9021146bc 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -419,35 +419,19 @@ config PARAVIRT | |||
419 | 419 | ||
420 | endif | 420 | endif |
421 | 421 | ||
422 | config MEMTEST_BOOTPARAM | 422 | config MEMTEST |
423 | bool "Memtest boot parameter" | 423 | bool "Memtest" |
424 | depends on X86_64 | 424 | depends on X86_64 |
425 | default y | 425 | default y |
426 | help | 426 | help |
427 | This option adds a kernel parameter 'memtest', which allows memtest | 427 | This option adds a kernel parameter 'memtest', which allows memtest |
428 | to be disabled at boot. If this option is selected, memtest | 428 | to be set. |
429 | functionality can be disabled with memtest=0 on the kernel | 429 | memtest=0, mean disabled; -- default |
430 | command line. The purpose of this option is to allow a single | 430 | memtest=1, mean do 1 test pattern; |
431 | kernel image to be distributed with memtest built in, but not | 431 | ... |
432 | necessarily enabled. | 432 | memtest=4, mean do 4 test patterns. |
433 | |||
434 | If you are unsure how to answer this question, answer Y. | 433 | If you are unsure how to answer this question, answer Y. |
435 | 434 | ||
436 | config MEMTEST_BOOTPARAM_VALUE | ||
437 | int "Memtest boot parameter default value (0-4)" | ||
438 | depends on MEMTEST_BOOTPARAM | ||
439 | range 0 4 | ||
440 | default 0 | ||
441 | help | ||
442 | This option sets the default value for the kernel parameter | ||
443 | 'memtest', which allows memtest to be disabled at boot. If this | ||
444 | option is set to 0 (zero), the memtest kernel parameter will | ||
445 | default to 0, disabling memtest at bootup. If this option is | ||
446 | set to 4, the memtest kernel parameter will default to 4, | ||
447 | enabling memtest at bootup, and use that as pattern number. | ||
448 | |||
449 | If you are unsure how to answer this question, answer 0. | ||
450 | |||
451 | config ACPI_SRAT | 435 | config ACPI_SRAT |
452 | def_bool y | 436 | def_bool y |
453 | depends on X86_32 && ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH) | 437 | depends on X86_32 && ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH) |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 32ba13b0f818..c6d81316db65 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -431,7 +431,7 @@ static void __init init_gbpages(void) | |||
431 | direct_gbpages = 0; | 431 | direct_gbpages = 0; |
432 | } | 432 | } |
433 | 433 | ||
434 | #ifdef CONFIG_MEMTEST_BOOTPARAM | 434 | #ifdef CONFIG_MEMTEST |
435 | 435 | ||
436 | static void __init memtest(unsigned long start_phys, unsigned long size, | 436 | static void __init memtest(unsigned long start_phys, unsigned long size, |
437 | unsigned pattern) | 437 | unsigned pattern) |
@@ -493,7 +493,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size, | |||
493 | 493 | ||
494 | } | 494 | } |
495 | 495 | ||
496 | static int memtest_pattern __initdata = CONFIG_MEMTEST_BOOTPARAM_VALUE; | 496 | /* default is disabled */ |
497 | static int memtest_pattern __initdata; | ||
497 | 498 | ||
498 | static int __init parse_memtest(char *arg) | 499 | static int __init parse_memtest(char *arg) |
499 | { | 500 | { |