Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 1/3] MIPS: Reserve nosave data for hibernation
@ 2016-03-06  3:50 Huacai Chen
  2016-03-06  3:50 ` [PATCH 2/3] MIPS: Loongson-3: Fix build error after ld-version.sh modification Huacai Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Huacai Chen @ 2016-03-06  3:50 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Aurelien Jarno, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, Huacai Chen

After commit 92923ca3aacef63c92dc (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 <chenhc@lemote.com>
---
 arch/mips/kernel/setup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 5fdaf8b..6f68cdd 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-06 12:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-06  3:50 [PATCH 1/3] MIPS: Reserve nosave data for hibernation Huacai Chen
2016-03-06  3:50 ` [PATCH 2/3] MIPS: Loongson-3: Fix build error after ld-version.sh modification Huacai Chen
2016-03-06 12:18   ` Sergei Shtylyov
2016-03-06  3:50 ` [PATCH 3/3] MIPS: Loongson-3: Adjust irq dispatch to speedup processing Huacai Chen
2016-03-06 12:17 ` [PATCH 1/3] MIPS: Reserve nosave data for hibernation Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox