[PATCH 06/13] nios2: move pr_debug() about memory start and end to setup_arch()

Mike Rapoport
2025-03-06T18:53:04Z

This will help with pulling out memblock_free_all() to the generic
code and reducing code duplication in arch::mem_init().

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
arch/nios2/kernel/setup.c | 2 ++
arch/nios2/mm/init.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index da122a5fa43b..a4cffbfc1399 100644
--- a/arch/nios2/kernel/setup.c
+++ b/arch/nios2/kernel/setup.c
@@ -149,6 +149,8 @@ void __init setup_arch(char **cmdline_p)
memory_start = memblock_start_of_DRAM();
memory_end = memblock_end_of_DRAM();

+ pr_debug("%s: start=%lx, end=%lx\n", __func__, memory_start, memory_end);
+
setup_initial_init_mm(_stext, _etext, _edata, _end);
init_task.thread.kregs = &fake_regs;

diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c
index a2278485de19..aa692ad30044 100644
--- a/arch/nios2/mm/init.c
+++ b/arch/nios2/mm/init.c
@@ -65,8 +65,6 @@ void __init mem_init(void)
unsigned long end_mem = memory_end; /* this must not include
kernel stack at top */

- pr_debug("mem_init: start=%lx, end=%lx\n", memory_start, memory_end);
-
end_mem &= PAGE_MASK;
high_memory = __va(end_mem);

--
2.47.2