From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe LEROY <christophe.leroy@c-s.fr>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: wire up memtest
Date: Fri, 28 Sep 2018 22:44:07 +1000 [thread overview]
Message-ID: <878t3lu6zs.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <9f0055e2-ebd1-649b-272e-cb9b58bd4e15@c-s.fr>
Christophe LEROY <christophe.leroy@c-s.fr> writes:
> Le 28/09/2018 à 05:41, Michael Ellerman a écrit :
>> Christophe Leroy <christophe.leroy@c-s.fr> writes:
>>> Add call to early_memtest() so that kernel compiled with
>>> CONFIG_MEMTEST really perform memtest at startup when requested
>>> via 'memtest' boot parameter.
>>>
>>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>>> ---
>>> 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..904b728eb20d 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>
>>> @@ -917,6 +918,8 @@ void __init setup_arch(char **cmdline_p)
>>> /* Parse memory topology */
>>> mem_topology_setup();
>>>
>>> + early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
>>
>> On a ppc64le VM this boils down to early_memtest(0, 0) for me.
>>
>> I think it's too early, we don't set up max_low_pfn until
>> initmem_init().
>>
>> If I move it after initmem_init() then it does something more useful:
>
> Ok. On my 8xx max_low_pfn is set in mem_topology_setup().
>
> Moving the test afte initmem_init() still works on the 8xx so I'll do that.
Great, thanks.
cheers
prev parent reply other threads:[~2018-09-28 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 9:02 [PATCH] powerpc: wire up memtest Christophe Leroy
2018-09-28 3:41 ` Michael Ellerman
2018-09-28 8:28 ` Christophe LEROY
2018-09-28 12:44 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878t3lu6zs.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).