[PATCH] sh: update outdated reference to init_bootmem()

From: Kexin Sun

Date: Sat Mar 21 2026 - 07:04:58 EST


The bootmem allocator was replaced by memblock in commit
355c45affca7 ("mm: remove bootmem allocator implementation.")
and init_bootmem() no longer exists. The comment in
early_reserve_mem() still describes a two-step bootmem
validation that no longer applies: the reservation is now a
single memblock_reserve() call. Rewrite the comment to
describe what the reservation actually covers.

Assisted-by: unnamed:deepseek-v3.2 coccinelle
Signed-off-by: Kexin Sun <kexinsun@xxxxxxxxxxxxxxxx>
---
arch/sh/mm/init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 464a3a63e2fa..c008db3d422e 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -242,10 +242,10 @@ static void __init early_reserve_mem(void)
start_pfn = PFN_UP(__pa(_end));

/*
- * Reserve the kernel text and Reserve the bootmem bitmap. We do
- * this in two steps (first step was init_bootmem()), because
- * this catches the (definitely buggy) case of us accidentally
- * initializing the bootmem allocator with an invalid RAM area.
+ * Use memblock_reserve() to protect the kernel image (text
+ * through bss). The start address accounts for the zero-page
+ * offset configured by the platform; the size is rounded up
+ * past _end.
*/
memblock_reserve(start, (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) - start);

--
2.25.1