[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fcf022e3-1d5e-4f66-9f95-49faefda04a6@gmail.com>
Date: Wed, 26 Nov 2025 11:43:21 +0000
From: Usama Arif <usamaarif642@...il.com>
To: Kiryl Shutsemau <kirill@...temov.name>, rppt@...nel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>, changyuanl@...gle.com,
graf@...zon.com, leitao@...ian.org, thevlad@...a.com, pratyush@...nel.org,
dave.hansen@...ux.intel.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH] mm/memblock: only mark/clear KHO scratch memory when
needed
On 26/11/2025 10:40, Kiryl Shutsemau wrote:
> On Wed, Nov 26, 2025 at 07:20:51AM +0000, Usama Arif wrote:
>> @@ -1126,8 +1126,11 @@ int __init_memblock memblock_reserved_mark_noinit(phys_addr_t base, phys_addr_t
>> */
>> __init int memblock_mark_kho_scratch(phys_addr_t base, phys_addr_t size)
>> {
>> - return memblock_setclr_flag(&memblock.memory, base, size, 1,
>> - MEMBLOCK_KHO_SCRATCH);
>> + if (IS_ENABLED(CONFIG_MEMBLOCK_KHO_SCRATCH) && is_kho_boot())
>
> It makes me wounder why CONFIG_MEMBLOCK_KHO_SCRATCH exists? It seems to
> be a proxy for CONFIG_KEXEC_HANDOVER which is the only option that
> selects it and does it always.
>
> Can we make s/CONFIG_MEMBLOCK_KHO_SCRATCH/CONFIG_KEXEC_HANDOVER/ and
> remove IS_ENABLED() from this check? Just is_kho_boot() is enough.
>
>
Thats a very good point! I imagine it might have been for maybe debug purposes?
Looking at the code, CONFIG_MEMBLOCK_KHO_SCRATCH shouldnt be needed. I guess
this might be a good time to clean it up. If Mike is happy for it to be replaced
with CONFIG_KEXEC_HANDOVER (and removed where needed), happy to send that
for review instead of this.
Thanks
Usama
Powered by blists - more mailing lists