[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <874le9k83l.fsf@linkitivity.dja.id.au>
Date: Sat, 29 Sep 2018 00:30:22 +1000
From: Daniel Axtens <dja@...ens.net>
To: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2] powerpc: wire up memtest
Hi Christophe,
> Add call to early_memtest() so that kernel compiled with
> CONFIG_MEMTEST really perform memtest at startup when requested
> via 'memtest' boot parameter.
>
This works for me on an e6500.
Tested-by: Daniel Axtens <dja@...ens.net>
However, you should also change Documentation/admin-guide/kernel-parameters.txt
to reflect that memtest is supported natively on ppc with your patch.
Regards,
Daniel
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
> ---
> v2: moved the test after initmem_init() as PPC64 sets max_low_pfn later than PPC32.
>
> arch/powerpc/kernel/setup-common.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 93fa0c99681e..9ca9db707bcb 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -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>
> @@ -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
> --
> 2.13.3
Powered by blists - more mailing lists