Re: [PATCH v2 14/18] memblock: use kho_scratch_overlap() to decide migratetype

From: Mike Rapoport

Date: Sun Jun 14 2026 - 08:03:37 EST


On Fri, 05 Jun 2026 20:34:47 +0200, Pratyush Yadav <pratyush@xxxxxxxxxx> wrote:
> diff --git a/include/linux/memblock.h b/include/linux/memblock.h
> index 5afcd99aa8c1..546d7ef798b8 100644
> --- a/include/linux/memblock.h
> +++ b/include/linux/memblock.h
> @@ -618,7 +619,7 @@ bool memblock_is_kho_scratch_memory(phys_addr_t addr);
> static inline enum migratetype kho_scratch_migratetype(unsigned long pfn,
> enum migratetype mt)
> {
> - if (memblock_is_kho_scratch_memory(PFN_PHYS(pfn)))
> + if (kho_scratch_overlap(PFN_PHYS(pfn), pageblock_nr_pages << PAGE_SHIFT))

I'd move it to kexec_handover.h and kill
memblock_is_kho_scratch_memory() in the same patch

BTW, please double check that the extended scratch does not require
updates to efi_init()::reserve_regions().

--
Sincerely yours,
Mike.