memblock: get rid of CONFIG_MEMBLOCK_KHO_SCRATCH

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@kernel.org>
Link: https://patch.msgid.link/20260922041321.233986-2-pratyush@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
Pratyush Yadav (Google) 2026-09-22 06:13:13 +02:00 committed by Mike Rapoport
parent dc645f2db7
commit 22626c347d
4 changed files with 3 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -483,10 +483,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.

View File

@ -113,7 +113,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
@ -2596,7 +2596,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;