All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Xianting Tian <xianting.tian@linux.alibaba.com>
Cc: Simon Horman <horms@kernel.org>,
	kexec@lists.infradead.org, mick@ics.forth.gr,
	yixun.lan@gmail.com, guoren@kernel.org
Subject: Re: [PATCH V2] RISC-V: Add support for riscv kexec/kdump on kexec-tools
Date: Fri, 28 Oct 2022 11:58:31 +0200	[thread overview]
Message-ID: <Y1unx7jgiSXCIF6L@vergenet.net> (raw)
In-Reply-To: <44c6ec02-ab91-a9ba-a0b8-fed6b93b82d4@linux.alibaba.com>

On Wed, Oct 26, 2022 at 10:13:48AM +0800, Xianting Tian wrote:
> 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?

Yes, I think so.

The workflow passes on main: https://github.com/horms/kexec-tools/actions/runs/3344523519
But not with the riscv patch applied: https://github.com/horms/kexec-tools/tree/build-test-riscv-v2

> 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.

Thanks.

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

  parent reply	other threads:[~2022-10-28 11:16 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
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 [this message]
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=Y1unx7jgiSXCIF6L@vergenet.net \
    --to=horms@kernel.org \
    --cc=guoren@kernel.org \
    --cc=kexec@lists.infradead.org \
    --cc=mick@ics.forth.gr \
    --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 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.