All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] arm64/riscv: Add support for crashkernel CMA reservation
@ 2026-02-12 10:09 ` Jinjie Ruan
  0 siblings, 0 replies; 19+ messages in thread
From: Jinjie Ruan @ 2026-02-12 10:09 UTC (permalink / raw)
  To: corbet, skhan, catalin.marinas, will, chenhuacai, kernel, maddy,
	mpe, npiggin, chleroy, pjw, palmer, aou, alex, tglx, mingo, bp,
	dave.hansen, hpa, akpm, bhe, vgoyal, dyoung, rdunlap, kees, elver,
	paulmck, arnd, ruanjinjie, fvdl, thuth, ardb, leitao, rppt,
	osandov, cfsworks, sourabhjain, ryan.roberts, tangyouling,
	eajames, hbathini, ritesh.list, songshuaishuai, bjorn,
	samuel.holland, kevin.brodsky, junhui.liu, vishal.moola, dwmw,
	pbonzini, kai.huang, ubizjak, coxu, fuqiang.wang, liaoyuanhong,
	brgerst, jbohac, x86, linux-doc, linux-kernel, linux-arm-kernel,
	loongarch, linuxppc-dev, linux-riscv, kexec

Exclude crash kernel memory in crash core to avoid duplication. Also move
the size calculation (and the realloc if needed) into crash core.

And add support for crashkernel CMA reservation for arm64 and riscv.

Changes in v5:
- Fix the kernel test robot build warnings.
- Sort crash memory ranges before preparing elfcorehdr for powerpc
- Link to v4: https://lore.kernel.org/all/20260209095931.2813152-1-ruanjinjie@huawei.com/

Changes in v4:
- Move the size calculation (and the realloc if needed) into the
  generic crash.
- Link to v3: https://lore.kernel.org/all/20260204093728.1447527-1-ruanjinjie@huawei.com/

Changs in v3:
- Exclude crash kernel memory in crash core as Mike suggested.
- Add acked-by.

Jinjie Ruan (3):
  crash: Exclude crash kernel memory in crash core
  arm64: kexec: Add support for crashkernel CMA reservation
  riscv: kexec: Add support for crashkernel CMA reservation

Sourabh Jain (1):
  powerpc/crash: sort crash memory ranges before preparing elfcorehdr

 .../admin-guide/kernel-parameters.txt         |  16 +--
 arch/arm64/include/asm/kexec.h                |   9 +-
 arch/arm64/kernel/machine_kexec_file.c        |  43 +++-----
 arch/arm64/mm/init.c                          |   5 +-
 arch/loongarch/include/asm/kexec.h            |   9 +-
 arch/loongarch/kernel/machine_kexec_file.c    |  41 +++----
 arch/powerpc/include/asm/kexec.h              |  13 +++
 arch/powerpc/include/asm/kexec_ranges.h       |   1 -
 arch/powerpc/kexec/crash.c                    |  67 ++++++-----
 arch/powerpc/kexec/file_load_64.c             |  17 +--
 arch/powerpc/kexec/ranges.c                   | 103 +----------------
 arch/riscv/include/asm/kexec.h                |   9 +-
 arch/riscv/kernel/machine_kexec_file.c        |  39 +++----
 arch/riscv/mm/init.c                          |   5 +-
 arch/x86/include/asm/kexec.h                  |   9 ++
 arch/x86/kernel/crash.c                       | 104 ++----------------
 include/linux/crash_core.h                    |  75 ++++++++++++-
 kernel/crash_core.c                           |  85 ++++++++++++--
 18 files changed, 314 insertions(+), 336 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [PATCH v5 2/4] crash: Exclude crash kernel memory in crash core
@ 2026-02-13  9:10 kernel test robot
  0 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2026-02-13  9:10 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260212101001.343158-3-ruanjinjie@huawei.com>
References: <20260212101001.343158-3-ruanjinjie@huawei.com>
TO: Jinjie Ruan <ruanjinjie@huawei.com>
TO: corbet@lwn.net
TO: skhan@linuxfoundation.org
TO: catalin.marinas@arm.com
TO: will@kernel.org
TO: chenhuacai@kernel.org
TO: kernel@xen0n.name
TO: maddy@linux.ibm.com
TO: mpe@ellerman.id.au
TO: npiggin@gmail.com
TO: chleroy@kernel.org
TO: pjw@kernel.org
TO: palmer@dabbelt.com
TO: aou@eecs.berkeley.edu
TO: alex@ghiti.fr
TO: tglx@kernel.org
TO: mingo@redhat.com
TO: bp@alien8.de
TO: dave.hansen@linux.intel.com
TO: hpa@zytor.com
TO: akpm@linux-foundation.org
TO: bhe@redhat.com
TO: vgoyal@redhat.com
TO: dyoung@redhat.com
TO: rdunlap@infradead.org
TO: kees@kernel.org
TO: elver@google.com
TO: paulmck@kernel.org
TO: arnd@arndb.de
TO: ruanjinjie@huawei.com
TO: fvdl@google.com

Hi Jinjie,

kernel test robot noticed the following build warnings:

[auto build test WARNING on powerpc/next]
[also build test WARNING on powerpc/fixes arm64/for-next/core tip/x86/core linus/master v6.19 next-20260212]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jinjie-Ruan/powerpc-crash-sort-crash-memory-ranges-before-preparing-elfcorehdr/20260212-181247
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20260212101001.343158-3-ruanjinjie%40huawei.com
patch subject: [PATCH v5 2/4] crash: Exclude crash kernel memory in crash core
:::::: branch date: 23 hours ago
:::::: commit date: 23 hours ago
config: powerpc-randconfig-r071-20260213 (https://download.01.org/0day-ci/archive/20260213/202602131740.rGD89wwq-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
smatch version: v0.5.0-8994-gd50c5a4c

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202602131740.rGD89wwq-lkp@intel.com/

smatch warnings:
kernel/crash_core.c:201 crash_exclude_mem_ranges() warn: we never enter this loop

vim +201 kernel/crash_core.c

02aff848053381 Baoquan He  2024-01-24  189  
6d859d47931b2a Jinjie Ruan 2026-02-12  190  	/* Exclude crashkernel region */
6d859d47931b2a Jinjie Ruan 2026-02-12  191  	ret = arch_crash_exclude_mem_range(&cmem, crashk_res.start, crashk_res.end);
6d859d47931b2a Jinjie Ruan 2026-02-12  192  	if (ret)
6d859d47931b2a Jinjie Ruan 2026-02-12  193  		return ret;
02aff848053381 Baoquan He  2024-01-24  194  
6d859d47931b2a Jinjie Ruan 2026-02-12  195  	if (crashk_low_res.end) {
6d859d47931b2a Jinjie Ruan 2026-02-12  196  		ret = arch_crash_exclude_mem_range(&cmem, crashk_low_res.start, crashk_low_res.end);
6d859d47931b2a Jinjie Ruan 2026-02-12  197  		if (ret)
6d859d47931b2a Jinjie Ruan 2026-02-12  198  			return ret;
6d859d47931b2a Jinjie Ruan 2026-02-12  199  	}
02aff848053381 Baoquan He  2024-01-24  200  
6d859d47931b2a Jinjie Ruan 2026-02-12 @201  	for (i = 0; i < crashk_cma_cnt; ++i) {
6d859d47931b2a Jinjie Ruan 2026-02-12  202  		ret = arch_crash_exclude_mem_range(&cmem, crashk_cma_ranges[i].start,
6d859d47931b2a Jinjie Ruan 2026-02-12  203  						   crashk_cma_ranges[i].end);
6d859d47931b2a Jinjie Ruan 2026-02-12  204  		if (ret)
6d859d47931b2a Jinjie Ruan 2026-02-12  205  			return ret;
6d859d47931b2a Jinjie Ruan 2026-02-12  206  	}
6d859d47931b2a Jinjie Ruan 2026-02-12  207  
6d859d47931b2a Jinjie Ruan 2026-02-12  208  	/* Return the computed number of memory ranges, for hotplug usage */
6d859d47931b2a Jinjie Ruan 2026-02-12  209  	if (nr_mem_ranges)
6d859d47931b2a Jinjie Ruan 2026-02-12  210  		*nr_mem_ranges = cmem->nr_ranges;
6d859d47931b2a Jinjie Ruan 2026-02-12  211  
6d859d47931b2a Jinjie Ruan 2026-02-12  212  	return 0;
6d859d47931b2a Jinjie Ruan 2026-02-12  213  }
6d859d47931b2a Jinjie Ruan 2026-02-12  214  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-02-27  8:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 10:09 [PATCH v5 0/4] arm64/riscv: Add support for crashkernel CMA reservation Jinjie Ruan
2026-02-12 10:09 ` Jinjie Ruan
2026-02-12 10:09 ` [PATCH v5 1/4] powerpc/crash: sort crash memory ranges before preparing elfcorehdr Jinjie Ruan
2026-02-12 10:09   ` Jinjie Ruan
2026-02-12 14:43   ` Mike Rapoport
2026-02-12 14:43     ` Mike Rapoport
2026-02-12 10:09 ` [PATCH v5 2/4] crash: Exclude crash kernel memory in crash core Jinjie Ruan
2026-02-12 10:09   ` Jinjie Ruan
2026-02-12 18:58   ` Mike Rapoport
2026-02-12 18:58     ` Mike Rapoport
2026-02-13  3:02     ` Jinjie Ruan
2026-02-13  3:02       ` Jinjie Ruan
2026-02-12 10:10 ` [PATCH v5 3/4] arm64: kexec: Add support for crashkernel CMA reservation Jinjie Ruan
2026-02-12 10:10   ` Jinjie Ruan
2026-02-12 10:10 ` [PATCH v5 4/4] riscv: " Jinjie Ruan
2026-02-12 10:10   ` Jinjie Ruan
2026-02-13  3:10   ` Paul Walmsley
2026-02-13  3:10     ` Paul Walmsley
  -- strict thread matches above, loose matches on Subject: below --
2026-02-13  9:10 [PATCH v5 2/4] crash: Exclude crash kernel memory in crash core kernel test robot

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.