diff mbox series

[v2,1/5] mips: Dump memblock regions for debugging

Message ID 20190503175041.7949-2-fancer.lancer@gmail.com (mailing list archive)
State Accepted
Headers show
Series mips: Post-bootmem-memblock transition fixes | expand

Commit Message

Serge Semin May 3, 2019, 5:50 p.m. UTC
It is useful to have the whole memblock memory space printed to console
when basic memlock initializations are done. It can be performed by
ready-to-use method memblock_dump_all(), which prints the available
and reserved memory spaces if memblock=debug kernel parameter is
specified. Lets call it at the very end of arch_mem_init() function,
when all memblock memory and reserved regions are defined, but before
any serious allocation is performed.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>

---
Changelog v2
- Reword commit message since memblock debug printout is activated by
  memblock=debug kernel parameter
---
 arch/mips/kernel/setup.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paul Burton May 6, 2019, 7:11 p.m. UTC | #1
Hello,

Serge Semin wrote:
> It is useful to have the whole memblock memory space printed to console
> when basic memlock initializations are done. It can be performed by
> ready-to-use method memblock_dump_all(), which prints the available
> and reserved memory spaces if memblock=debug kernel parameter is
> specified. Lets call it at the very end of arch_mem_init() function,
> when all memblock memory and reserved regions are defined, but before
> any serious allocation is performed.
> 
> Signed-off-by: Serge Semin <fancer.lancer@gmail.com>

Applied to mips-next.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]
diff mbox series

Patch

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 2a1b2e7a1bc9..ca493fdf69b0 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -824,6 +824,8 @@  static void __init arch_mem_init(char **cmdline_p)
 	/* Reserve for hibernation. */
 	memblock_reserve(__pa_symbol(&__nosave_begin),
 		__pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin));
+
+	memblock_dump_all();
 }
 
 static void __init resource_init(void)