From: Michael Schmitz <schmitzmic@gmail.com>
To: Mike Rapoport <rppt@kernel.org>, Finn Thain <fthain@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Subject: Re: [RFC] m68k: Enable memtest kernel parameter
Date: Mon, 13 Sep 2021 18:53:20 +1200 [thread overview]
Message-ID: <71f1f942-aa38-dd1a-033e-c10b4417554a@gmail.com> (raw)
In-Reply-To: <YT7oDJhKHNVyHZU9@kernel.org>
Hi Mike,
tested and found to work as intended.
Cheers,
Michael
On 13/09/21 17:56, Mike Rapoport wrote:
> Hi Finn,
>
> On Mon, Sep 13, 2021 at 03:17:33PM +1000, Finn Thain wrote:
>> On Mon, 13 Sep 2021, Michael Schmitz wrote:
>>
>>>
>>> I'm amazed this works - I'd expect the kernel text segment to get
>>> trashed by the memory test routines.
>>
>> I think the initramfs may get clobbered when the 'memtest' parameter is
>> set. But that may be expected behaviour...
>
> It's not the expected behaviour. The initramfs is clobbered because memtest
> runs before initramfs memory is reserved. The patch below (not even compile
> tested) should help. Now, for some reason the reservation of initrd does
> not happen on SUN3, which is probably wrong, so maybe we can drop that
> #ifndef CONFIG_SUN3 before #ifdef CONFIG_BLK_DEV_INITRD.
>
> diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
> index 4b51bfd38e5f..4ca8f1120abc 100644
> --- a/arch/m68k/kernel/setup_mm.c
> +++ b/arch/m68k/kernel/setup_mm.c
> @@ -338,12 +338,6 @@ void __init setup_arch(char **cmdline_p)
> panic("No configuration setup");
> }
>
> - paging_init();
> -
> -#ifdef CONFIG_NATFEAT
> - nf_init();
> -#endif
> -
> #ifndef CONFIG_SUN3
> #ifdef CONFIG_BLK_DEV_INITRD
> if (m68k_ramdisk.size) {
> @@ -352,8 +346,16 @@ void __init setup_arch(char **cmdline_p)
> initrd_end = initrd_start + m68k_ramdisk.size;
> pr_info("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
> }
> +#endif
> #endif
>
> + paging_init();
> +
> +#ifdef CONFIG_NATFEAT
> + nf_init();
> +#endif
> +
> +#ifndef CONFIG_SUN3
> #ifdef CONFIG_ATARI
> if (MACH_IS_ATARI)
> atari_stram_reserve_pages((void *)availmem);
>
>
next prev parent reply other threads:[~2021-09-13 6:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 1:34 [RFC] m68k: Enable memtest kernel parameter Finn Thain
2021-09-13 3:40 ` Michael Schmitz
2021-09-13 5:17 ` Michael Schmitz
2021-09-13 5:17 ` Finn Thain
2021-09-13 5:51 ` Michael Schmitz
2021-09-13 5:56 ` Mike Rapoport
2021-09-13 6:42 ` Mike Rapoport
2021-09-13 6:53 ` Michael Schmitz [this message]
2021-09-13 7:59 ` Finn Thain
2021-09-13 5:42 ` Mike Rapoport
2021-09-13 5:49 ` Michael Schmitz
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=71f1f942-aa38-dd1a-033e-c10b4417554a@gmail.com \
--to=schmitzmic@gmail.com \
--cc=fthain@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=rppt@kernel.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