[PATCH 1/4] memblock: get rid of CONFIG_MEMBLOCK_KHO_SCRATCH
Pratyush Yadav
pratyush at kernel.org
Tue Aug 11 09:26:37 PDT 2026
From: "Pratyush Yadav (Google)" <pratyush at kernel.org>
This config is only a proxy for CONFIG_KEXEC_HANDOVER. It is only
enabled by KHO. No point in the indirection. Use CONFIG_KEXEC_HANDOVER
directly.
Signed-off-by: Pratyush Yadav (Google) <pratyush at kernel.org>
---
include/linux/memblock.h | 2 +-
kernel/liveupdate/Kconfig | 1 -
mm/Kconfig | 4 ----
mm/memblock.c | 4 ++--
4 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index d62db9e776cf..db3b106c6335 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -614,7 +614,7 @@ static inline void early_memtest(phys_addr_t start, phys_addr_t end) { }
static inline void memtest_report_meminfo(struct seq_file *m) { }
#endif
-#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH
+#ifdef CONFIG_KEXEC_HANDOVER
void memblock_set_kho_scratch_only(void);
void memblock_clear_kho_scratch_only(void);
#else
diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
index c13af38ba23a..f50daee8eff0 100644
--- a/kernel/liveupdate/Kconfig
+++ b/kernel/liveupdate/Kconfig
@@ -5,7 +5,6 @@ menu "Live Update and Kexec HandOver"
config KEXEC_HANDOVER
bool "kexec handover"
depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
- select MEMBLOCK_KHO_SCRATCH
select KEXEC_FILE
select LIBFDT
select CMA
diff --git a/mm/Kconfig b/mm/Kconfig
index 9e0ca4824905..5415e0b38b5d 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -485,10 +485,6 @@ config HAVE_GUP_FAST
depends on MMU
bool
-# Enable memblock support for scratch memory which is needed for kexec handover
-config MEMBLOCK_KHO_SCRATCH
- bool
-
# Don't discard allocated memory used to track "memory" and "reserved" memblocks
# after early boot, so it can still be used to test for validity of memory.
# Also, memblocks are updated with memory hot(un)plug.
diff --git a/mm/memblock.c b/mm/memblock.c
index 37e06e70c1d0..8e425791ad66 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -112,7 +112,7 @@ unsigned long min_low_pfn;
unsigned long max_pfn;
unsigned long long max_possible_pfn;
-#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH
+#ifdef CONFIG_KEXEC_HANDOVER
/* When set to true, only allocate from MEMBLOCK_KHO_SCRATCH ranges */
static bool kho_scratch_only;
#else
@@ -2597,7 +2597,7 @@ int reserve_mem_release_by_name(const char *name)
return 1;
}
-#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH
+#ifdef CONFIG_KEXEC_HANDOVER
__init void memblock_set_kho_scratch_only(void)
{
kho_scratch_only = true;
--
2.55.0.679.g6767b8d81c-goog
More information about the kexec
mailing list