diff mbox series

[01/12] mips: Make sure kernel .bss exists in boot mem pool

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

Commit Message

Serge Semin April 23, 2019, 10:47 p.m. UTC
Current MIPS platform code makes sure the kernel text, data and init
sections are added to the boot memory map pool right after the
arch-specific memory setup method has been executed. But for some reason
the MIPS platform code skipped the kernel .bss section, which definitely
should be in the boot mem pool as well in any case. Lets fix this just be
adding the space between __bss_start and __bss_stop.

Reviewed-by: Matt Redfearn <matt.redfearn@mips.com>
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 arch/mips/kernel/setup.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Paul Burton April 24, 2019, 10:30 p.m. UTC | #1
Hello,

Serge Semin wrote:
> Current MIPS platform code makes sure the kernel text, data and init
> sections are added to the boot memory map pool right after the
> arch-specific memory setup method has been executed. But for some reason
> the MIPS platform code skipped the kernel .bss section, which definitely
> should be in the boot mem pool as well in any case. Lets fix this just be
> adding the space between __bss_start and __bss_stop.
> 
> Reviewed-by: Matt Redfearn <matt.redfearn@mips.com>
> 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 8d1dc6c71173..0ee033c44116 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -809,6 +809,9 @@  static void __init arch_mem_init(char **cmdline_p)
 	arch_mem_addpart(PFN_UP(__pa_symbol(&__init_begin)) << PAGE_SHIFT,
 			 PFN_DOWN(__pa_symbol(&__init_end)) << PAGE_SHIFT,
 			 BOOT_MEM_INIT_RAM);
+	arch_mem_addpart(PFN_DOWN(__pa_symbol(&__bss_start)) << PAGE_SHIFT,
+			 PFN_UP(__pa_symbol(&__bss_stop)) << PAGE_SHIFT,
+			 BOOT_MEM_RAM);
 
 	pr_info("Determined physical RAM map:\n");
 	print_memory_map();