diff options
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 52f54ee4559f..ae225c3ae9a8 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -427,7 +427,10 @@ static void __init init_gbpages(void) | |||
427 | direct_gbpages = 0; | 427 | direct_gbpages = 0; |
428 | } | 428 | } |
429 | 429 | ||
430 | static void __init memtest(unsigned long start_phys, unsigned long size, unsigned pattern) | 430 | #ifdef CONFIG_MEMTEST_BOOTPARAM |
431 | |||
432 | static void __init memtest(unsigned long start_phys, unsigned long size, | ||
433 | unsigned pattern) | ||
431 | { | 434 | { |
432 | unsigned long i; | 435 | unsigned long i; |
433 | unsigned long *start; | 436 | unsigned long *start; |
@@ -486,11 +489,12 @@ static void __init memtest(unsigned long start_phys, unsigned long size, unsigne | |||
486 | 489 | ||
487 | } | 490 | } |
488 | 491 | ||
489 | static int __initdata memtest_pattern; | 492 | static int memtest_pattern __initdata = CONFIG_MEMTEST_BOOTPARAM_VALUE; |
493 | |||
490 | static int __init parse_memtest(char *arg) | 494 | static int __init parse_memtest(char *arg) |
491 | { | 495 | { |
492 | if (arg) | 496 | if (arg) |
493 | memtest_pattern = simple_strtoul(arg, NULL, 0) + 1; | 497 | memtest_pattern = simple_strtoul(arg, NULL, 0); |
494 | return 0; | 498 | return 0; |
495 | } | 499 | } |
496 | 500 | ||
@@ -501,8 +505,10 @@ static void __init early_memtest(unsigned long start, unsigned long end) | |||
501 | unsigned long t_start, t_size; | 505 | unsigned long t_start, t_size; |
502 | unsigned pattern; | 506 | unsigned pattern; |
503 | 507 | ||
504 | if (memtest_pattern) | 508 | if (!memtest_pattern) |
505 | printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern); | 509 | return; |
510 | |||
511 | printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern); | ||
506 | for (pattern = 0; pattern < memtest_pattern; pattern++) { | 512 | for (pattern = 0; pattern < memtest_pattern; pattern++) { |
507 | t_start = start; | 513 | t_start = start; |
508 | t_size = 0; | 514 | t_size = 0; |
@@ -523,9 +529,13 @@ static void __init early_memtest(unsigned long start, unsigned long end) | |||
523 | t_start += t_size; | 529 | t_start += t_size; |
524 | } | 530 | } |
525 | } | 531 | } |
526 | if (memtest_pattern) | 532 | printk(KERN_CONT "\n"); |
527 | printk(KERN_CONT "\n"); | ||
528 | } | 533 | } |
534 | #else | ||
535 | static void __init early_memtest(unsigned long start, unsigned long end) | ||
536 | { | ||
537 | } | ||
538 | #endif | ||
529 | 539 | ||
530 | /* | 540 | /* |
531 | * Setup the direct mapping of the physical memory at PAGE_OFFSET. | 541 | * Setup the direct mapping of the physical memory at PAGE_OFFSET. |