Skip to content

Commit

Permalink
powerpc: Wire up memtest
Browse files Browse the repository at this point in the history
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 <dja@axtens.net>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Oct 3, 2018
1 parent 803d690 commit d90fe2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2404,7 +2404,7 @@
seconds. Use this parameter to check at some
other rate. 0 disables periodic checking.

memtest= [KNL,X86,ARM] Enable memtest
memtest= [KNL,X86,ARM,PPC] Enable memtest
Format: <integer>
default : 0 <disable>
Specifies the number of memtest passes to be
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/serial_8250.h>
#include <linux/percpu.h>
#include <linux/memblock.h>
#include <linux/bootmem.h>
#include <linux/of_platform.h>
#include <linux/hugetlb.h>
#include <asm/debugfs.h>
Expand Down Expand Up @@ -966,6 +967,8 @@ void __init setup_arch(char **cmdline_p)

initmem_init();

early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);

#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
Expand Down

0 comments on commit d90fe2a

Please sign in to comment.