Re: [PATCH v4 0/7] Add kexec_file support for LoongArch

2025-09-21 Thread Huacai Chen
Applied with some modifications. You may need to test whether everything is OK. https://github.com/chenhuacai/linux/commits/loongarch-next Huacai On Wed, Sep 3, 2025 at 11:02 AM Youling Tang wrote: > > From: Youling Tang > > This patchset implement kexec_file_load() support on LoongArch. > > Th

Re: [PATCH v3 1/6] LoongArch: Add struct loongarch_image_header for kernel image

2025-08-27 Thread Huacai Chen
Hi, Youling, On Tue, Aug 26, 2025 at 9:18 AM Youling Tang wrote: > > From: Youling Tang > > Define a dedicated image header structure for LoongArch architecture to > standardize kernel loading in bootloaders (primarily for kexec_file). > > This header includes critical metadata such as PE signat

Re: [PATCH v2 0/5] Add kexec_file support for LoongArch

2025-08-22 Thread Huacai Chen
Hi, Youling, On Wed, Aug 20, 2025 at 1:57 PM Youling Tang wrote: > > From: Youling Tang > > This patchset implement kexec_file_load() support on LoongArch. > > This patch series enables us to load the LoongArch vmlinuz.efi(pez) or > vmlinux.efi(pei) or vmlinux(elf) by specifying its file decript

Re: [PATCH v2 2/5] LoongArch: Add kexec_file support

2025-08-22 Thread Huacai Chen
On Thu, Aug 21, 2025 at 9:20 AM Youling Tang wrote: > > On 2025/8/20 19:13, Yao Zi wrote: > > > On Wed, Aug 20, 2025 at 05:13:27PM +0800, Youling Tang wrote: > >> Hi, Yao > >> > >> On 2025/8/20 14:50, Yao Zi wrote: > >> > >>> On Wed, Aug 20, 2025 at 01:56:57PM +0800, Youling Tang wrote: > Fro

Re: [PATCH v2 2/5] LoongArch: Add kexec_file support

2025-08-22 Thread Huacai Chen
Hi, Youling, On Wed, Aug 20, 2025 at 1:57 PM Youling Tang wrote: > > From: Youling Tang > > This patch adds support for kexec_file on LoongArch. > > The efi_kexec_load() as two parts: > - the first part loads the kernel image (vmlinuz.efi or vmlinux.efi) > - the second part loads other segments

Re: [PATCH 3/6] LoongArch/kexec_file: Add initrd loading

2025-08-11 Thread Huacai Chen
On Tue, Aug 12, 2025 at 10:38 AM Youling Tang wrote: > > Hi, Huacai > On 2025/8/11 22:12, Huacai Chen wrote: > > Hi, Youling, > > > > On Mon, Aug 11, 2025 at 5:28 PM Youling Tang wrote: > >> From: Youling Tang > >> > >> Add inird lo

Re: [PATCH 2/6] LoongArch: Add kexec_file support

2025-08-11 Thread Huacai Chen
On Tue, Aug 12, 2025 at 9:22 AM Youling Tang wrote: > > Hi, Huacai > On 2025/8/11 22:07, Huacai Chen wrote: > > Hi, Youling, > > > > On Mon, Aug 11, 2025 at 5:28 PM Youling Tang wrote: > >> From: Youling Tang > >> > >> This patch a

Re: [PATCH 2/6] LoongArch: Add kexec_file support

2025-08-11 Thread Huacai Chen
On Tue, Aug 12, 2025 at 1:09 AM Yao Zi wrote: > > On Mon, Aug 11, 2025 at 05:26:55PM +0800, Youling Tang wrote: > > From: Youling Tang > > > > This patch adds support for kexec_file on LoongArch. > > > > The image_load() as two parts: > > - the first part loads the kernel image (vmlinuz.efi or vm

Re: [PATCH 3/6] LoongArch/kexec_file: Add initrd loading

2025-08-11 Thread Huacai Chen
Hi, Youling, On Mon, Aug 11, 2025 at 5:28 PM Youling Tang wrote: > > From: Youling Tang > > Add inird loading support and pass it to the second kernel via the > cmdline 'initrd=start,size'. I think Patch-3 and Patch-5 should be merged into Patch-2. Huacai > > Signed-off-by: Youling Tang > ---

Re: [PATCH 2/6] LoongArch: Add kexec_file support

2025-08-11 Thread Huacai Chen
Hi, Youling, On Mon, Aug 11, 2025 at 5:28 PM Youling Tang wrote: > > From: Youling Tang > > This patch adds support for kexec_file on LoongArch. > > The image_load() as two parts: > - the first part loads the kernel image (vmlinuz.efi or vmlinux.efi) > - the second part loads other segments (eg:

Re: [PATCH 1/2] arch/loongarch: clean up the left code and Kconfig item related to CRASH_CORE

2024-04-16 Thread Huacai Chen
Hi, Andrew, On Sat, Mar 30, 2024 at 10:24 PM Baoquan He wrote: > > On 03/30/24 at 09:59pm, Huacai Chen wrote: > > Queued, thanks. > > Thanks, Huacai. While I noticed Andrew has queued this patchset in his > mm-unstable branch. If I'm not mistaken, mm-unstable is target

Re: [PATCH 1/2] arch/loongarch: clean up the left code and Kconfig item related to CRASH_CORE

2024-03-30 Thread Huacai Chen
. And also rename each > ARCH's to accordingly. > > But the relevant part in loongarch is missed. Do it now. > > Signed-off-by: Baoquan He > Cc: Huacai Chen > Cc: WANG Xuerui > Cc: loonga...@lists.linux.dev > --- > arch/loongarch/Kconfig

[PATCH] kdump: Defer the insertion of crashkernel resources

2023-12-29 Thread Huacai Chen
fa19-fe0b : System RAM fa19-fa1b : Reserved fe4e-47fff : System RAM 43c00-441ff : Reserved 47ff98000-47ffa3fff : Reserved 47ffa4000-47ffa7fff : Reserved 47ffa8000-47ffabfff : Reserved 47ffac000-47ffa : Reserved 47ffb-47ffb3fff : Reserv

Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread Huacai Chen
On Sat, Dec 2, 2023 at 8:46 PM Simon Horman wrote: > > On Sat, Dec 02, 2023 at 08:30:27PM +0800, Huacai Chen wrote: > > On Sat, Dec 2, 2023 at 6:11 PM WANG Rui wrote: > > > > > > > On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote: > > > > >

Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread Huacai Chen
On Sat, Dec 2, 2023 at 6:11 PM WANG Rui wrote: > > > On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote: > > > Currently, kexec loads vmlinux.efi to address 0 instead of the link > > > address. This causes kexec to fail to boot the new vmlinux.efi on qemu. > > > > > > pei_loongarch_load: k

Re: [PATCH v2] LoongArch: Load vmlinux.efi to the link address

2023-12-01 Thread Huacai Chen
Hi, Simon, On Fri, Dec 1, 2023 at 10:06 PM Simon Horman wrote: > > On Wed, Nov 29, 2023 at 12:15:17PM +0800, Huacai Chen wrote: > > Hi, all, > > > > On Tue, Nov 28, 2023 at 2:27 PM WANG Rui wrote: > > > > > > Hi, > > > > &

Re: [PATCH v2] LoongArch: Load vmlinux.efi to the link address

2023-11-28 Thread Huacai Chen
Hi, all, On Tue, Nov 28, 2023 at 2:27 PM WANG Rui wrote: > > Hi, > > On Mon, Nov 27, 2023 at 10:36 AM RuiRui Yang wrote: > > > > On Mon, 27 Nov 2023 at 09:53, RuiRui Yang wrote: > > > > > > On Sat, 25 Nov 2023 at 14:54, WANG Rui wrote: > > > > > > > > Currently, kexec loads vmlinux.efi to addr

Re: [PATCH] LoongArch: Fix an issue with relocatable vmlinux

2023-11-25 Thread Huacai Chen
Reviewed-by: Huacai Chen On Fri, Nov 24, 2023 at 4:54 PM WANG Rui wrote: > > Normally vmlinux for LoongArch is of ET_EXEC type, while if built with > CONFIG_RELOCATABLE (this is PIE) and Clang, it will be of ET_DYN type. > Meanwhile, physical address field of segments in vmlinux

Re: [PATCH v2] LoongArch: Load vmlinux.efi to the link address

2023-11-25 Thread Huacai Chen
Reviewed-by: Huacai Chen On Sat, Nov 25, 2023 at 2:53 PM WANG Rui wrote: > > Currently, kexec loads vmlinux.efi to address 0 instead of the link > address. This causes kexec to fail to boot the new vmlinux.efi on qemu. > > pei_loongarch_load: kernel_segment: 0

Re: [PATCH v2 1/3] LoongArch: Add kexec support

2022-09-09 Thread Huacai Chen
Hi, Youling, On Fri, Sep 9, 2022 at 11:20 AM Youling Tang wrote: > > Add three new files, kexec.h, machine_kexec.c and relocate_kernel.S to the > LoongArch architecture that add support for the kexec re-boot mechanis > (CONFIG_KEXEC) on LoongArch platforms. > > Supports loading vmlinux (vmlinux.e

Re: [PATCH v2 2/3] LoongArch: Add kdump support

2022-09-09 Thread Huacai Chen
Hi, Youling, On Fri, Sep 9, 2022 at 11:20 AM Youling Tang wrote: > > This patch adds support for kdump, the kernel will reserve a region > for the crash kernel and jump there on panic. > > Arch-specific functions are added to allow for implementing a crash > dump file interface, /proc/vmcore, whi

Re: [PATCH 2/3] LoongArch: Add kdump support

2022-09-05 Thread Huacai Chen
Hi, Youling, On Mon, Sep 5, 2022 at 3:45 PM Youling Tang wrote: > > Hi, Huacai > > On 09/05/2022 03:32 PM, Huacai Chen wrote: > > Hi, Youling, > > > > On Mon, Sep 5, 2022 at 10:22 AM Youling Tang > > wrote: > >> > >> > >> >

Re: [PATCH 2/3] LoongArch: Add kdump support

2022-09-05 Thread Huacai Chen
Hi, Youling, On Mon, Sep 5, 2022 at 10:22 AM Youling Tang wrote: > > > > On 09/05/2022 10:14 AM, Huacai Chen wrote: > > On Mon, Sep 5, 2022 at 10:04 AM Youling Tang > > wrote: > >> > >> Hi, Huacai > >> > >> On 09/05/2022 09:38 AM, Hua

Re: [PATCH 2/3] LoongArch: Add kdump support

2022-09-04 Thread Huacai Chen
On Mon, Sep 5, 2022 at 10:04 AM Youling Tang wrote: > > Hi, Huacai > > On 09/05/2022 09:38 AM, Huacai Chen wrote: > > Hi, Youling, > > > > On Mon, Sep 5, 2022 at 8:54 AM Youling Tang wrote: > >> > >> Hi, Huacai > >> > >> On 09/04/

Re: [PATCH 2/3] LoongArch: Add kdump support

2022-09-04 Thread Huacai Chen
Hi, Youling, On Mon, Sep 5, 2022 at 8:54 AM Youling Tang wrote: > > Hi, Huacai > > On 09/04/2022 08:21 PM, Huacai Chen wrote: > > Hi, Youling, > > > > I think crash.c can be merged into crash_dump.c > > Most architectures only implement copy_oldmem_page(

Re: [PATCH 2/3] LoongArch: Add kdump support

2022-09-04 Thread Huacai Chen
Hi, Youling, I think crash.c can be merged into crash_dump.c Huacai On Mon, Aug 29, 2022 at 12:37 PM Youling Tang wrote: > > This patch adds support for kdump, the kernel will reserve a region > for the crash kernel and jump there on panic. > > Arch-specific functions are added to allow for imp

Re: [PATCH 1/3] LoongArch: Add kexec support

2022-08-29 Thread Huacai Chen
On Tue, Aug 30, 2022 at 11:26 AM Youling Tang wrote: > > Hi, Jinyang > > On 08/30/2022 09:53 AM, Jinyang He wrote: > > Hi, Youling, > > > > > > On 08/29/2022 12:37 PM, Youling Tang wrote: > >> Add three new files, kexec.h, machine_kexec.c and relocate_kernel.S to > >> the > >> LoongArch architectu

Re: [PATCH V3] MIPS: Loongson64: Add kexec/kdump support

2021-01-16 Thread Huacai Chen
Hi, Jiaxun, On Sat, Jan 9, 2021 at 3:38 PM Jiaxun Yang wrote: > > 在 2021/1/9 上午9:36, Huacai Chen 写道: > > Hi, Jiaxun, > > > > On Fri, Jan 8, 2021 at 6:15 PM Jiaxun Yang wrote: > >> 在 2021/1/8 下午6:07, Jinyang He 写道: > >>> Hi, Thomas, > >>>

Re: [PATCH V3] MIPS: Loongson64: Add kexec/kdump support

2021-01-08 Thread Huacai Chen
Hi, Jiaxun, On Fri, Jan 8, 2021 at 6:15 PM Jiaxun Yang wrote: > > 在 2021/1/8 下午6:07, Jinyang He 写道: > > Hi, Thomas, > > > > On 01/08/2021 01:26 AM, Thomas Bogendoerfer wrote: > > --- a/arch/mips/kernel/relocate_kernel.S > > +++ b/arch/mips/kernel/relocate_kernel.S > > @@ -6,6 +6,7 @@

Re: [PATCH V3] MIPS: Loongson64: Add kexec/kdump support

2020-12-30 Thread Huacai Chen
Hi, Thomas, On Tue, Dec 22, 2020 at 2:41 PM Jinyang He wrote: > > On 12/21/2020 08:02 PM, Huacai Chen wrote: > > > From: Huacai Chen > > > > Add kexec/kdump support for Loongson64 by: > > 1, Provide Loongson-specific kexec functions: loongson_kexec_prepare()

[PATCH V3] MIPS: Loongson64: Add kexec/kdump support

2020-12-21 Thread Huacai Chen
From: Huacai Chen Add kexec/kdump support for Loongson64 by: 1, Provide Loongson-specific kexec functions: loongson_kexec_prepare(), loongson_kexec_shutdown() and loongson_crash_shutdown(); 2, Provide Loongson-specific assembly code in kexec_smp_wait(); To start Loongson64, The boot CPU

[PATCH V2 2/3] MIPS: Reserve extra memory for crash dump

2020-09-24 Thread Huacai Chen
a node is more than 1GB, we reserve the top 128MB for the crash kernel. Signed-off-by: Huacai Chen --- arch/mips/kernel/setup.c | 63 1 file changed, 63 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index e2804a2.

[PATCH V2 3/3] MIPS: Loongson64: Add kexec/kdump support

2020-09-24 Thread Huacai Chen
nd 64K, KEXEC data Cc: Eric Biederman Signed-off-by: Huacai Chen Signed-off-by: Jinyang He Signed-off-by: Youling Tang --- arch/mips/kernel/relocate_kernel.S | 27 + arch/mips/loongson64/reset.c | 111 + 2 files changed, 149 insertions(+) d

[PATCH V2 1/3] MIPS: Crash kernel should be able to see old memories

2020-09-24 Thread Huacai Chen
ash kernel should be able to see all old memories, even though it is not supposed to use them. Fixes: a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Huacai Chen --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel

Re: [PATCH 3/3] MIPS: Loongson64: Add kexec/kdump support

2020-09-23 Thread Huacai Chen
Hi, Jiaxun, On Wed, Sep 23, 2020 at 9:37 PM Jiaxun Yang wrote: > > > > 在 2020/9/23 10:30, Huacai Chen 写道: > > Add kexec/kdump support for Loongson64 by: > > 1, Provide Loongson-specific kexec functions: loongson_kexec_prepare, > > loongson_kexec_shutdown and

Re: [PATCH 3/3] MIPS: Loongson64: Add kexec/kdump support

2020-09-23 Thread Huacai Chen
Hi, Jinyang, On Wed, Sep 23, 2020 at 11:35 AM Jinyang He wrote: > > Hi, Huacai, > > On 09/23/2020 10:30 AM, Huacai Chen wrote: > > Add kexec/kdump support for Loongson64 by: > > 1, Provide Loongson-specific kexec functions: loongson_kexec_prepare, > >

Re: [PATCH 1/3] MIPS: Crash kernel should be able to see old memories

2020-09-22 Thread Huacai Chen
Hi, Jinyang, On Wed, Sep 23, 2020 at 11:02 AM Jinyang He wrote: > > On 09/23/2020 10:30 AM, Huacai Chen wrote: > > Kexec-tools use mem=X@Y to pass usable memories to crash kernel, but in > > commit a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") all

Re: [PATCH 1/3] MIPS: Crash kernel should be able to see old memories

2020-09-22 Thread Huacai Chen
Hi, Baoquan, On Wed, Sep 23, 2020 at 10:46 AM Baoquan He wrote: > > On 09/23/20 at 10:30am, Huacai Chen wrote: > > Kexec-tools use mem=X@Y to pass usable memories to crash kernel, but in > > commit a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") all

[PATCH 3/3] MIPS: Loongson64: Add kexec/kdump support

2020-09-22 Thread Huacai Chen
_args. The assembly part in kexec_smp_wait provide a routine as BIOS does, in order to keep secondary CPUs in a querying loop. Cc: Eric Biederman Signed-off-by: Huacai Chen Signed-off-by: Jinyang He Signed-off-by: Youling Tang --- arch/mips/kernel/relocate_kernel.S | 27 + arch/mips/lo

[PATCH 1/3] MIPS: Crash kernel should be able to see old memories

2020-09-22 Thread Huacai Chen
ash kernel should be able to see all old memories, even though it is not supposed to use them. Fixes: a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Huacai Chen --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel

[PATCH 2/3] MIPS: Reserve extra memory for crash dump

2020-09-22 Thread Huacai Chen
a node is more than 1GB, we reserve the top 128MB for the crash kernel. Signed-off-by: Huacai Chen --- arch/mips/kernel/setup.c | 63 1 file changed, 63 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index e2804a2.

Re: [PATCH] MIPS: Loongson64: Add kexec/kdump support

2020-09-18 Thread Huacai Chen
Hi, Jinyang, On Fri, Sep 18, 2020 at 2:20 PM Jinyang He wrote: > > On 09/17/2020 09:52 PM, Zhou Yanjie wrote: > > Hello, > > > > 在 2020/9/17 下午8:41, Jinyang He 写道: > >> Hi, Huacai, > >> > >> > >> On 09/16/2020 01:39 PM, Huacai Chen wrot

Re: [PATCH] MIPS: Loongson64: Add kexec/kdump support

2020-09-15 Thread Huacai Chen
Hi, Jinyang, On Tue, Sep 15, 2020 at 10:17 PM Jinyang He wrote: > > > > On 09/16/2020 09:33 AM, Jiaxun Yang wrote: > > > > 于 2020年9月15日 GMT+08:00 下午9:07:43, Jinyang He 写到: > >> Add loongson_kexec_prepare(), loongson_kexec_shutdown() and > >> loongson_kexec_crashdown() for passing the parameters