From: "Björn Töpel" <bjorn@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: "Nick Kossifidis" <mick@ics.forth.gr>,
"Song Shuai" <songshuaishuai@tinylab.org>,
"Li Zhengyu" <lizhengyu3@huawei.com>,
kexec@lists.infradead.org, "Dave Young" <dyoung@redhat.com>,
"Yixun Lan" <yixun.lan@gmail.com>,
"Xianting Tian" <xianting.tian@linux.alibaba.com>,
linux-riscv@lists.infradead.org,
"Björn Töpel" <bjorn@rivosinc.com>
Subject: Re: [PATCH 1/4] RISC-V: Add support for riscv kexec/kdump on kexec-tools
Date: Tue, 22 Apr 2025 14:07:28 +0200 [thread overview]
Message-ID: <87bjso5ri7.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20250422104825.GT2789685@horms.kernel.org>
Simon!
Simon Horman <horms@kernel.org> writes:
> Thanks Björn,
>
> Overall I am happy with this patchset. But there are a few minor points
> I'd like addressed, which relate strictly to build coverage and the CI.
> I can handle these myself if you prefer.
It's really up to you! What do you prefer? I can spin a v2 if that's
easier for you (and then I'll try to address all the things you pointed
out below)!
Björn
> Firstly, it would be really great if the following could be included at the
> end of the series, so there is some build coverage of RISC-V in the CI.
> (Feel free to rewrite or attribute however you see fit - it is a trival one
> liner.)
>
> From: Simon Horman <horms@kernel.org>
> Subject: [PATCH] workflow: Add riscv64
>
> Add riscv64 to matrix of build architectures.
>
> Signed-off-by: Simon Horman <horms@kernel.org>
> ---
> .github/workflows/build.yml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
> index fd9ea6c8eca7..d1b3e74391ff 100644
> --- a/.github/workflows/build.yml
> +++ b/.github/workflows/build.yml
> @@ -19,6 +19,7 @@ jobs:
> - powerpc
> - powerpc64
> - powerpc64le
> + - riscv64
> - sh4
> - s390x
> - x86_64-x32
>
> ...
>
>> diff --git a/kexec/arch/riscv/Makefile b/kexec/arch/riscv/Makefile
>> new file mode 100644
>> index 000000000000..f26cc9025e77
>> --- /dev/null
>> +++ b/kexec/arch/riscv/Makefile
>> @@ -0,0 +1,35 @@
>> +#
>> +# kexec riscv
>> +#
>> +riscv_KEXEC_SRCS = kexec/arch/riscv/kexec-riscv.c
>> +riscv_KEXEC_SRCS += kexec/arch/riscv/kexec-elf-riscv.c
>> +riscv_KEXEC_SRCS += kexec/arch/riscv/crashdump-riscv.c
>> +
>> +riscv_MEM_REGIONS = kexec/mem_regions.c
>> +
>> +riscv_DT_OPS += kexec/dt-ops.c
>> +
>> +riscv_ARCH_REUSE_INITRD =
>> +
>> +riscv_CPPFLAGS += -I $(srcdir)/kexec/
>> +
>> +dist += kexec/arch/riscv/Makefile $(riscv_KEXEC_SRCS) \
>
> kexec/arch/riscv/iomem.h also needs to be added to dist
> so that it shows up in the distribution tarball.
>
>> + kexec/arch/riscv/kexec-riscv.h \
>> + kexec/arch/riscv/include/arch/options.h
>
> Also, it would be nice to sort these lines alphabetically.
>
>> +
>> +ifdef HAVE_LIBFDT
>> +
>> +LIBS += -lfdt
>> +
>> +else
>> +
>> +include $(srcdir)/kexec/libfdt/Makefile.libfdt
>> +
>> +libfdt_SRCS += $(LIBFDT_SRCS:%=kexec/libfdt/%)
>> +
>> +riscv_CPPFLAGS += -I$(srcdir)/kexec/libfdt
>> +
>> +riscv_KEXEC_SRCS += $(libfdt_SRCS)
>> +
>> +endif
>> +
>
> ...
>
>> diff --git a/kexec/dt-ops.c b/kexec/dt-ops.c
>> index 0a96b75f65aa..3e285ab2043b 100644
>> --- a/kexec/dt-ops.c
>> +++ b/kexec/dt-ops.c
>> @@ -4,9 +4,11 @@
>> #include <libfdt.h>
>> #include <stdio.h>
>> #include <stdlib.h>
>> +#include <stdbool.h>
>>
>> #include "kexec.h"
>> #include "dt-ops.h"
>> +#include "mem_regions.h"
>
> As dt-ops.c will now use symbols that are implemented in mem_regions.c
> when the former is compiled the latter now must be compiled too.
>
> In practice it is only mips where that is not the case.
> And I believe that can be addressed by squashing the following into
> this patch.
>
> diff --git a/kexec/arch/mips/Makefile b/kexec/arch/mips/Makefile
> index 1fe788608fbe..fa87fbdb7897 100644
> --- a/kexec/arch/mips/Makefile
> +++ b/kexec/arch/mips/Makefile
> @@ -11,6 +11,8 @@ mips_FS2DT_INCLUDE = \
> -include $(srcdir)/kexec/arch/mips/crashdump-mips.h \
> -include $(srcdir)/kexec/arch/mips/kexec-mips.h
>
> +mips_MEM_REGIONS = kexec/mem_regions.c
> +
> mips_DT_OPS += kexec/dt-ops.c
>
> include $(srcdir)/kexec/libfdt/Makefile.libfdt
>
> FTR, I believe this is the same mem_regions_alloc_and_add issue that
> I flagged in the thread [2].
>
> And at the link below you can see a build failure with this patch, but not
> the fix above, applied:
>
> https://github.com/horms/kexec-tools/actions/runs/14591381633/job/40927219243
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-04-22 13:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 20:14 [PATCH 0/4] kexec-tools RISC-V port Björn Töpel
2025-04-09 20:14 ` [PATCH 1/4] RISC-V: Add support for riscv kexec/kdump on kexec-tools Björn Töpel
2025-04-22 10:48 ` Simon Horman
2025-04-22 12:07 ` Björn Töpel [this message]
2025-04-22 13:54 ` Simon Horman
2025-04-09 20:14 ` [PATCH 2/4] RISC-V: Enable kexec_file_load syscall Björn Töpel
2025-04-09 20:14 ` [PATCH 3/4] RISC-V: Separate elf_riscv_find_pbase out Björn Töpel
2025-04-09 20:14 ` [PATCH 4/4] RISC-V: Support loading Image binary file Björn Töpel
2025-04-14 8:40 ` [PATCH 0/4] kexec-tools RISC-V port 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=87bjso5ri7.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=dyoung@redhat.com \
--cc=horms@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lizhengyu3@huawei.com \
--cc=mick@ics.forth.gr \
--cc=songshuaishuai@tinylab.org \
--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