MIPS: Reserve nosave data for hibernation
Subsystems (2)
PATCH v3 1/4 MIPS: Reserve nosave data for hibernation
After commit 92923ca3aacef63c92d ("mm: meminit: only set page reserved in the memblock region"), the MIPS hibernation is broken. Because pages in nosave data section should be "reserved", but currently they aren't set to "reserved" at initialization. This patch makes hibernation work again.
Signed-off-by Huacai Chen <[email protected]>
--- arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+)
arch/mips/kernel/setup.c +3 -0
@@ -706,6 +706,9 @@ static void __init arch_mem_init(char **cmdline_p)for_each_memblock (reserved, reg)if (reg->size !=0 )reserve_bootmem (reg->base, reg->size,BOOTMEM_DEFAULT ); + +reserve_bootmem_region (__pa_symbol (&__nosave_begin), +__pa_symbol (&__nosave_end));/* Reserve for hibernation */ }static void __init resource_init (void )
Signature · 1 line
2.7.0
Hi, Ralf,
This series is bugfix for Loongson, please merge it if no problem.
Huacai
Quoted 33 lines · Huacai Chen
After commit
92923ca3aacef63c92d("mm: meminit: only set page reserved in the memblock region"), the MIPS hibernation is broken. Because pages in nosave data section should be "reserved", but currently they aren't set to "reserved" at initialization. This patch makes hibernation work again.Signed-off-by Huacai Chen <[email protected]>--- arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+)arch/mips/kernel/setup.c +3
-1@@ -706,6 +706,9 @@ static void __init arch_mem_init(char **cmdline_p)for_each_memblock (reserved, reg)if (reg->size !=0 )reserve_bootmem (reg->base, reg->size,BOOTMEM_DEFAULT ); + +reserve_bootmem_region (__pa_symbol (&__nosave_begin), +__pa_symbol (&__nosave_end));/* Reserve for hibernation */ }static void __init resource_init (void ) --2.7.0