All of lore.kernel.org
 help / color / mirror / Atom feed
From: "HAGIO KAZUHITO(萩尾 一仁)" <k-hagio-ab@nec.com>
To: Youling Tang <tangyouling@loongson.cn>
Cc: kexec-ml <kexec@lists.infradead.org>
Subject: RE: [PATCH] mips64: Retrieve MAX_PHYSMEM_BITS from vmcoreinfo
Date: Mon, 22 Feb 2021 02:20:30 +0000	[thread overview]
Message-ID: <OSBPR01MB1991B6519865CA4CC367C4C5DD819@OSBPR01MB1991.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <1613957493-22021-1-git-send-email-tangyouling@loongson.cn>

-----Original Message-----
> Add a common feature for architectures to retrieve AX_PHYSMEM_BITS
> from vmcoreinfo, which was added by kernel commit 1d50e5d0c505 ("
> crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo").
> This makes makedumpfile adaptable for future MAX_PHYSMEM_BITS changes.
> 
> Also ensure backward compatibility for kernel versions in which
> MAX_PHYSMEM_BITS is not available in vmcoreinfo.
> 
> Signed-off-by: Youling Tang <tangyouling@loongson.cn>
> ---
>  arch/mips64.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips64.c b/arch/mips64.c
> index c968082..d541c3e 100644
> --- a/arch/mips64.c
> +++ b/arch/mips64.c
> @@ -35,9 +35,14 @@ get_phys_base_mips64(void)
>  int
>  get_machdep_info_mips64(void)
>  {
> -	info->max_physmem_bits  = _MAX_PHYSMEM_BITS;
>  	info->section_size_bits = _SECTION_SIZE_BITS;
> 
> +	/* Check if we can get MAX_PHYSMEM_BITS from vmcoreinfo */
> +	if (NUMBER(MAX_PHYSMEM_BITS) != NOT_FOUND_NUMBER)
> +		info->max_physmem_bits = NUMBER(MAX_PHYSMEM_BITS);
> +	else
> +		info->max_physmem_bits  = _MAX_PHYSMEM_BITS;
> +
>  	DEBUG_MSG("max_physmem_bits : %lx\n", info->max_physmem_bits);
>  	DEBUG_MSG("section_size_bits: %lx\n", info->section_size_bits);
> 
> --
> 2.1.0

Thanks, I've edited the commit message a bit and applied:
https://github.com/makedumpfile/makedumpfile/commit/974a507447e8d77df3a1e759cc569768372bfb8e

Kazu


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2021-02-22  2:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22  1:31 [PATCH] mips64: Retrieve MAX_PHYSMEM_BITS from vmcoreinfo Youling Tang
2021-02-22  2:20 ` HAGIO KAZUHITO(萩尾 一仁) [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=OSBPR01MB1991B6519865CA4CC367C4C5DD819@OSBPR01MB1991.jpnprd01.prod.outlook.com \
    --to=k-hagio-ab@nec.com \
    --cc=kexec@lists.infradead.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 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.