diff options
author | Huacai Chen <chenhc@lemote.com> | 2016-03-17 20:37:10 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-12 08:48:19 -0400 |
commit | 1dd0964204277108e3e06e7df4c1f06a79d55093 (patch) | |
tree | 344703af985587578a871fa942edde0e2136162d /arch/mips | |
parent | 1e694169c9b1a84eec5ca3b631c8fc14e89cd670 (diff) | |
download | linux-stable-1dd0964204277108e3e06e7df4c1f06a79d55093.tar.gz linux-stable-1dd0964204277108e3e06e7df4c1f06a79d55093.tar.bz2 linux-stable-1dd0964204277108e3e06e7df4c1f06a79d55093.zip |
MIPS: Reserve nosave data for hibernation
[ Upstream commit a95d069204e178f18476f5499abab0d0d9cbc32c ]
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 <chenhc@lemote.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Steven J . Hill <sjhill@realitydiluted.com>
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12888/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index f3b635f86c39..2168355591f5 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -685,6 +685,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) |