diff options
author | Serge Semin <[email protected]> | 2019-04-24 01:47:42 +0300 |
---|---|---|
committer | Paul Burton <[email protected]> | 2019-05-02 11:24:34 -0700 |
commit | 4e50a35de4ccc834dbc32c664fb068f4c24cfebf (patch) | |
tree | 7959b52b611bd61369ee560187f15e39660cbfe6 | |
parent | eadb6925efeb0c254d17e1da9bb730d2add5613d (diff) |
mips: Use memblock to reserve the __nosave memory range
Originally before legacy bootmem was removed, the memory for the range was
correctly reserved by reserve_bootmem_region(). But since memblock has been
selected for early memory allocation the function can be utilized only
after paging is fully initialized (as it is done by memblock_free_all()
function). So calling it from arch_mem_init() method is prone to errors,
and at this stage we need to reserve the memory in the memblock allocator.
Signed-off-by: Serge Semin <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Matt Redfearn <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: [email protected]
Cc: [email protected]
-rw-r--r-- | arch/mips/kernel/setup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 2ae6b02b948f..3a5140943f54 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -814,8 +814,9 @@ static void __init arch_mem_init(char **cmdline_p) dma_contiguous_reserve(PFN_PHYS(max_low_pfn)); - reserve_bootmem_region(__pa_symbol(&__nosave_begin), - __pa_symbol(&__nosave_end)); /* Reserve for hibernation */ + /* Reserve for hibernation. */ + memblock_reserve(__pa_symbol(&__nosave_begin), + __pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin)); } static void __init resource_init(void) |