Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Xianting Tian <xianting.tian@linux.alibaba.com>
Cc: Simon Horman <horms@kernel.org>,
	kexec@lists.infradead.org, wefu@redhat.com, yixun.lan@gmail.com,
	guoren@kernel.org
Subject: Re: [PATCH V2] RISC-V: Add support for riscv kexec/kdump on kexec-tools
Date: Mon, 27 Mar 2023 09:52:02 +0800	[thread overview]
Message-ID: <ZCD2wkLCIAztKb/C@MiWiFi-R3L-srv> (raw)
In-Reply-To: <c87af556-1996-bc22-52da-1da23761d591@linux.alibaba.com>

Hi Xianting,

On 10/26/22 at 10:59am, Xianting Tian wrote:
> 
> 在 2022/10/26 上午10:13, Xianting Tian 写道:
> > Hi Simon
> > 
> > thanks for the comments
> > 
> > 在 2022/10/21 下午11:27, Simon Horman 写道:
> > > On Thu, Oct 20, 2022 at 11:15:48AM +0800, Xianting Tian wrote:
> > > > From: Nick Kossifidis <mick@ics.forth.gr>
> > > > 
> > > > This patch adds support for loading the ELF kernel image. It parses
> > > > the current/provided device tree to determine the system's memory
> > > > layout, and /proc/iomem for the various kernel segments.
> > > > 
> > > > This patch was firstly developed by Nick Kossifidis, and two fixes (
> > > >     1: fail to find free memory area for dtb load when using
> > > > initrd image,
> > > > lists.infradead.org/pipermail/linux-riscv/2022-August/018398.html;
> > > >     2: fix memory range size calculation,
> > > >         kexec/arch/riscv/crashdump-riscv.c:line 85
> > > > ) are contributed by Yixun Lan, Xianting Tian.
> > > > 
> > > > Tested on Qemu's rv64 virt machine and SoC of T-Head RISC-V
> > > > Xuantie 910 CPU.
> > > Hi,
> > > 
> > > thanks for some patch.
> > > 
> > > Some minor feedback follows.
> > > 
> > > Separately, I'll post a patch to add RISC-V builds to the github
> > > workflow. If you could include that in V3 I'd be most grateful.
> > > 
> > > > Tested-by: Yixun Lan <yixun.lan@gmail.com>
> > > > Co-developed-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> > > > Co-developed-by: Yixun Lan <yixun.lan@gmail.com>
> > > > Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> > > ...
> > > 
> > > > +    ret = mem_regions_alloc_and_add(mem_ranges, start,
> > > > +                    end - start, type);
> > > mem_regions_alloc_and_add isn't always available.
> > > f.e. on mips this causes a build failure.
> > > 
> > > Ref: https://github.com/horms/kexec-tools/actions/runs/3298491143/jobs/5440677595
> > 
> > As you know, mem_regions_sort, mem_regions_alloc_and_add are the common
> > funtions,
> > 
> > The build error of mips is caused by this riscv patch?
> > 
> > kexec/mem_regions.c:void mem_regions_sort(struct memory_ranges *ranges)
> > kexec/mem_regions.h:void mem_regions_sort(struct memory_ranges *ranges);
> > 
> > 
> > kexec/mem_regions.c:int mem_regions_alloc_and_add(struct memory_ranges
> > *ranges,
> > kexec/mem_regions.h:int mem_regions_alloc_and_add(struct memory_ranges
> > *ranges,
> > 
> > > 
> > > ...
> > > 
> > > > +int dtb_get_memory_ranges(char *dtb, struct memory_ranges
> > > > *mem_ranges, struct memory_ranges *extra_ranges)
> > > > +{
> > > ...
> > > 
> > > > +    mem_regions_sort(mem_ranges);
> > > Likewise, mem_regions_sort isn't always available.
> > > f.e. on mips this causes a build failure.
> > > 
> > > ...
> > > 
> > > > diff --git a/purgatory/arch/riscv/Makefile
> > > > b/purgatory/arch/riscv/Makefile
> > > > new file mode 100644
> > > > index 0000000..8bded71
> > > > --- /dev/null
> > > > +++ b/purgatory/arch/riscv/Makefile
> > > > @@ -0,0 +1,7 @@
> > > > +#
> > > > +# Purgatory riscv
> > > > +#
> > > > +
> > > > +riscv_PURGATORY_SRCS =
> > > > +
> > > > +dist += purgatory/arch/sh/Makefile $(riscv_PURGATORY_SRCS)
> > > s/sh/riscv/
> > > 
> > > Else the distribution tarball won't include this Makefile
> > > 
> > > You can exercise this using:
> > >    make distcheck DISTCHECK_CONFIGURE_FLAGS="--host=riscv64-linux-gnu"
> > thanks, I will fix this.
> 
> the fix is in my personal gitee
> 
> https://gitee.com/xianting-tian/kexec-tools/commits/master

Is this patchset reposting still in your working plan? I don't see the
code in kexe-tools, so ping to ask.

If this is not your work tasks any more, people interested can pick this
patchset and post after polishing.

Thanks
Baoquan


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

  reply	other threads:[~2023-03-27  1:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  3:15 [PATCH V2] RISC-V: Add support for riscv kexec/kdump on kexec-tools Xianting Tian
2022-10-21 15:27 ` Simon Horman
2022-10-26  2:13   ` Xianting Tian
2022-10-26  2:59     ` Xianting Tian
2023-03-27  1:52       ` Baoquan He [this message]
2023-03-27  8:27         ` Guo Ren
2023-07-18  9:37           ` Petr Tesařík
2023-07-18  9:40             ` Xianting Tian
2023-07-18  9:49               ` Petr Tesařík
2022-10-28  9:58     ` Simon Horman
2022-10-21 15:31 ` [PATCH kexec-tools] github: add RISC-V to workflow Simon Horman

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=ZCD2wkLCIAztKb/C@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=guoren@kernel.org \
    --cc=horms@kernel.org \
    --cc=kexec@lists.infradead.org \
    --cc=wefu@redhat.com \
    --cc=xianting.tian@linux.alibaba.com \
    --cc=yixun.lan@gmail.com \
    /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