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