From: David Gibson <dgibson@redhat.com>
To: Hari Bathini <hbathini@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev <linuxppc-dev@ozlabs.org>,
Dave Young <dyoung@redhat.com>,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>
Subject: Re: [PATCH] powerpc/kdump: handle crashkernel memory reservation failure
Date: Thu, 28 Jun 2018 15:32:56 +1000 [thread overview]
Message-ID: <20180628153256.7848bd3a@umbus.fritz.box> (raw)
In-Reply-To: <153016319642.8584.7868984232962915832.stgit@hbathini.in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
On Thu, 28 Jun 2018 10:49:56 +0530
Hari Bathini <hbathini@linux.ibm.com> wrote:
> Memory reservation for crashkernel could fail if there are holes around
> kdump kernel offset (128M). Fail gracefully in such cases and print an
> error message.
>
> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Tested-by: David Gibson <dgibson@redhat.com>
> ---
> arch/powerpc/kernel/machine_kexec.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
> index 936c7e2..6181442 100644
> --- a/arch/powerpc/kernel/machine_kexec.c
> +++ b/arch/powerpc/kernel/machine_kexec.c
> @@ -188,7 +188,12 @@ void __init reserve_crashkernel(void)
> (unsigned long)(crashk_res.start >> 20),
> (unsigned long)(memblock_phys_mem_size() >> 20));
>
> - memblock_reserve(crashk_res.start, crash_size);
> + if (!memblock_is_region_memory(crashk_res.start, crash_size) ||
> + memblock_reserve(crashk_res.start, crash_size)) {
> + printk(KERN_ERR "Failed to reserve memory for crashkernel!\n");
> + crashk_res.start = crashk_res.end = 0;
> + return;
> + }
> }
>
> int overlaps_crashkernel(unsigned long start, unsigned long size)
>
--
David Gibson <dgibson@redhat.com>
Principal Software Engineer, Virtualization, Red Hat
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-06-28 5:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 5:19 [PATCH] powerpc/kdump: handle crashkernel memory reservation failure Hari Bathini
2018-06-28 5:32 ` David Gibson [this message]
2018-06-28 6:48 ` Dave Young
2018-07-19 6:07 ` Michael Ellerman
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=20180628153256.7848bd3a@umbus.fritz.box \
--to=dgibson@redhat.com \
--cc=dyoung@redhat.com \
--cc=hbathini@linux.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.