linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mm: only mark/clear KHO scratch memory when needed
@ 2025-11-28 17:29 Usama Arif
  2025-11-28 17:29 ` [PATCH v3 1/2] mm/memblock: remove CONFIG_MEMBLOCK_KHO_SCRATCH option Usama Arif
  2025-11-28 17:29 ` [PATCH v3 2/2] mm/memblock: only mark/clear KHO scratch memory when needed Usama Arif
  0 siblings, 2 replies; 8+ messages in thread
From: Usama Arif @ 2025-11-28 17:29 UTC (permalink / raw)
  To: rppt, Andrew Morton
  Cc: kas, changyuanl, graf, leitao, thevlad, pratyush, dave.hansen,
	linux-mm, linux-kernel, kernel-team, Usama Arif

The scratch memory for kexec handover is used to bootstrap the
kexec'ed kernel. Only the 1st 1MB is used as scratch, and its a
hack to get around limitations with KHO. It is only needed when
CONFIG_KEXEC_HANDOVER is enabled and only if it is a KHO boot
(both checked by is_kho_boot). Add check to prevent marking a KHO
scratch region unless needed.

CONFIG_MEMBLOCK_KHO_SCRATCH is also removed as its only selected
by KEXEC_HANDOVER.

v2 -> v3:
- is_kho_boot already has stubs when CONFIG_KEXEC_HANDOVER=n,
  no need to move the functions under CONFIG_KEXEC_HANDOVER (Pratyush
  Yadav)
- Commit messsage improvements

v1 -> v2:
- Remove CONFIG_MEMBLOCK_KHO_SCRATCH (Kiryl Shutsemau)
- Move memblock_mark/clear_kho_scratch under alread existing
  CONFIG_KEXEC_HANDOVER in memblock.c.


Usama Arif (2):
  mm/memblock: remove CONFIG_MEMBLOCK_KHO_SCRATCH option
  mm/memblock: only mark/clear KHO scratch memory when needed

 include/linux/memblock.h |  2 +-
 kernel/Kconfig.kexec     |  1 -
 mm/Kconfig               |  4 ----
 mm/memblock.c            | 18 +++++++++++-------
 4 files changed, 12 insertions(+), 13 deletions(-)

-- 
2.47.3



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

end of thread, other threads:[~2025-12-04 19:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-28 17:29 [PATCH v3 0/2] mm: only mark/clear KHO scratch memory when needed Usama Arif
2025-11-28 17:29 ` [PATCH v3 1/2] mm/memblock: remove CONFIG_MEMBLOCK_KHO_SCRATCH option Usama Arif
2025-11-28 17:29 ` [PATCH v3 2/2] mm/memblock: only mark/clear KHO scratch memory when needed Usama Arif
2025-11-30  8:52   ` Mike Rapoport
2025-12-04 14:04     ` Pasha Tatashin
2025-12-04 14:51       ` Usama Arif
2025-12-04 17:52         ` Mike Rapoport
2025-12-04 19:27           ` Usama Arif

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