Skip to content

Commit d90fe2a

Browse files
chleroympe
authored andcommitted
powerpc: Wire up memtest
Add call to early_memtest() so that kernel compiled with CONFIG_MEMTEST really perform memtest at startup when requested via 'memtest' boot parameter. Tested-by: Daniel Axtens <[email protected]> Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 803d690 commit d90fe2a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Documentation/admin-guide/kernel-parameters.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@
24042404
seconds. Use this parameter to check at some
24052405
other rate. 0 disables periodic checking.
24062406

2407-
memtest= [KNL,X86,ARM] Enable memtest
2407+
memtest= [KNL,X86,ARM,PPC] Enable memtest
24082408
Format: <integer>
24092409
default : 0 <disable>
24102410
Specifies the number of memtest passes to be

arch/powerpc/kernel/setup-common.c

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <linux/serial_8250.h>
3434
#include <linux/percpu.h>
3535
#include <linux/memblock.h>
36+
#include <linux/bootmem.h>
3637
#include <linux/of_platform.h>
3738
#include <linux/hugetlb.h>
3839
#include <asm/debugfs.h>
@@ -966,6 +967,8 @@ void __init setup_arch(char **cmdline_p)
966967

967968
initmem_init();
968969

970+
early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
971+
969972
#ifdef CONFIG_DUMMY_CONSOLE
970973
conswitchp = &dummy_con;
971974
#endif

0 commit comments

Comments
 (0)