Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024
@ 2026-03-04  1:19 Ming Wang
  2026-03-23  6:16 ` Ming Wang
  2026-04-27 16:02 ` Simon Horman
  0 siblings, 2 replies; 3+ messages in thread
From: Ming Wang @ 2026-03-04  1:19 UTC (permalink / raw)
  To: kexec; +Cc: horms, loongarch

On some LoongArch systems, especially multi-socket machines like 3D6000,
the current limit of MAX_MEMORY_RANGES (64) is too small to accommodate
all memory range entries in /proc/iomem.

When the limit is reached, get_memory_ranges() stops parsing, which causes
kexec to fail with "locate_hole failed" because it cannot correctly identify
the crash kernel reserved memory or necessary RAM segments.

Increase MAX_MEMORY_RANGES to 1024 to support systems with complex
memory layouts.

Signed-off-by: Ming Wang <wangming01@loongson.cn>
---
 kexec/arch/loongarch/kexec-loongarch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/arch/loongarch/kexec-loongarch.h b/kexec/arch/loongarch/kexec-loongarch.h
index 2e65eb0..895809c 100644
--- a/kexec/arch/loongarch/kexec-loongarch.h
+++ b/kexec/arch/loongarch/kexec-loongarch.h
@@ -8,7 +8,7 @@
 #define BOOT_BLOCK_VERSION 17
 #define BOOT_BLOCK_LAST_COMP_VERSION 16
 
-#define MAX_MEMORY_RANGES 64
+#define MAX_MEMORY_RANGES 1024
 #define MAX_LINE 160
 
 #define CORE_TYPE_ELF64 1
-- 
2.43.0



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

* Re: [PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024
  2026-03-04  1:19 [PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024 Ming Wang
@ 2026-03-23  6:16 ` Ming Wang
  2026-04-27 16:02 ` Simon Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Ming Wang @ 2026-03-23  6:16 UTC (permalink / raw)
  To: kexec; +Cc: horms, loongarch, chenhuacai

Just a gentle ping.

在 2026/3/4 09:19, Ming Wang 写道:
> On some LoongArch systems, especially multi-socket machines like 3D6000,
> the current limit of MAX_MEMORY_RANGES (64) is too small to accommodate
> all memory range entries in /proc/iomem.
> 
> When the limit is reached, get_memory_ranges() stops parsing, which causes
> kexec to fail with "locate_hole failed" because it cannot correctly identify
> the crash kernel reserved memory or necessary RAM segments.
> 
> Increase MAX_MEMORY_RANGES to 1024 to support systems with complex
> memory layouts.
> 
> Signed-off-by: Ming Wang <wangming01@loongson.cn>
> ---
>   kexec/arch/loongarch/kexec-loongarch.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kexec/arch/loongarch/kexec-loongarch.h b/kexec/arch/loongarch/kexec-loongarch.h
> index 2e65eb0..895809c 100644
> --- a/kexec/arch/loongarch/kexec-loongarch.h
> +++ b/kexec/arch/loongarch/kexec-loongarch.h
> @@ -8,7 +8,7 @@
>   #define BOOT_BLOCK_VERSION 17
>   #define BOOT_BLOCK_LAST_COMP_VERSION 16
>   
> -#define MAX_MEMORY_RANGES 64
> +#define MAX_MEMORY_RANGES 1024
>   #define MAX_LINE 160
>   
>   #define CORE_TYPE_ELF64 1



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

* Re: [PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024
  2026-03-04  1:19 [PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024 Ming Wang
  2026-03-23  6:16 ` Ming Wang
@ 2026-04-27 16:02 ` Simon Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-04-27 16:02 UTC (permalink / raw)
  To: Ming Wang; +Cc: kexec, loongarch

On Wed, Mar 04, 2026 at 09:19:14AM +0800, Ming Wang wrote:
> On some LoongArch systems, especially multi-socket machines like 3D6000,
> the current limit of MAX_MEMORY_RANGES (64) is too small to accommodate
> all memory range entries in /proc/iomem.
> 
> When the limit is reached, get_memory_ranges() stops parsing, which causes
> kexec to fail with "locate_hole failed" because it cannot correctly identify
> the crash kernel reserved memory or necessary RAM segments.
> 
> Increase MAX_MEMORY_RANGES to 1024 to support systems with complex
> memory layouts.
> 
> Signed-off-by: Ming Wang <wangming01@loongson.cn>

Thanks, and sorry for the delay.

Applied:
- LoongArch: Increase MAX_MEMORY_RANGES to 1024
  https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=677dd2f8bcf7


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04  1:19 [PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024 Ming Wang
2026-03-23  6:16 ` Ming Wang
2026-04-27 16:02 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox