From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Youling Tang <tangyouling@loongson.cn>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: kexec: Add crashkernel=YM handling
Date: Mon, 21 Sep 2020 22:41:03 +0200 [thread overview]
Message-ID: <20200921204103.GK29322@alpha.franken.de> (raw)
In-Reply-To: <1600480546-10448-1-git-send-email-tangyouling@loongson.cn>
On Sat, Sep 19, 2020 at 09:55:46AM +0800, Youling Tang wrote:
> When the kernel crashkernel parameter is specified with just a size,
> we are supposed to allocate a region from RAM to store the crashkernel.
> However, MIPS merely reserves physical address zero with no checking
> that there is even RAM there.
>
> Fix this by lifting similar code from x86, importing it to MIPS with the
> MIPS specific parameters added. In the absence of any platform specific
> information, we allocate the crashkernel region from the first 512MB of
> physical memory (limited to CKSEG0 or KSEG0 address range).
>
> When X is not specified, crash_base defaults to 0 (crashkernel=YM@XM).
>
> E.g. without this patch:
>
> The environment as follows:
> [ 0.000000] MIPS: machine is loongson,loongson64c-4core-ls7a
> ...
> [ 0.000000] Kernel command line: root=/dev/sda2 crashkernel=96M ...
>
> The warning as follows:
> [ 0.000000] Invalid memory region reserved for crash kernel
>
> And the iomem as follows:
> 00200000-0effffff : System RAM
> 00200000-00b47f87 : Kernel code
> 00b47f88-00dfffff : Kernel data
> 00e60000-01f73c7f : Kernel bss
> 1a000000-1bffffff : pci@1a000000
> ...
>
> With this patch:
>
> After increasing crash_base <= 0 handling.
>
> And the iomem as follows:
> 00200000-0effffff : System RAM
> 00200000-00b47f87 : Kernel code
> 00b47f88-00dfffff : Kernel data
> 00e60000-01f73c7f : Kernel bss
> 04000000-09ffffff : Crash kernel
> 1a000000-1bffffff : pci@1a000000
> ...
>
> Signed-off-by: Youling Tang <tangyouling@loongson.cn>
> ---
> arch/mips/kernel/setup.c | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2020-09-21 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 1:55 Youling Tang
2020-09-19 7:02 ` Jiaxun Yang
2020-09-19 8:29 ` Youling Tang
2020-09-19 10:17 ` Jiaxun Yang
2020-09-21 20:41 ` Thomas Bogendoerfer [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=20200921204103.GK29322@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tangyouling@loongson.cn \
/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
Powered by JetHome