* [PATCH V3 1/4] MIPS: Reserve nosave data for hibernation
@ 2016-03-17 12:37 Huacai Chen
2016-04-10 8:54 ` Huacai Chen
0 siblings, 1 reply; 2+ messages in thread
From: Huacai Chen @ 2016-03-17 12:37 UTC (permalink / raw
To: Ralf Baechle
Cc: Aurelien Jarno, Steven J . Hill, linux-mips, Fuxin Zhang,
Zhangjin Wu, Huacai Chen, stable
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.
Cc: stable@vger.kernel.org
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 4f60734..d20caac 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] 2+ messages in thread
* Re: [PATCH V3 1/4] MIPS: Reserve nosave data for hibernation
2016-03-17 12:37 [PATCH V3 1/4] MIPS: Reserve nosave data for hibernation Huacai Chen
@ 2016-04-10 8:54 ` Huacai Chen
0 siblings, 0 replies; 2+ messages in thread
From: Huacai Chen @ 2016-04-10 8:54 UTC (permalink / raw
To: Ralf Baechle
Cc: Aurelien Jarno, Steven J . Hill, Linux MIPS Mailing List,
Fuxin Zhang, Zhangjin Wu, Huacai Chen, stable
Hi, Ralf,
This series is bugfix for Loongson, please merge it if no problem.
Huacai
On Thu, Mar 17, 2016 at 8:37 PM, Huacai Chen <chenhc@lemote.com> wrote:
> 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.
>
> Cc: stable@vger.kernel.org
> 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 4f60734..d20caac 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 [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-10 8:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 12:37 [PATCH V3 1/4] MIPS: Reserve nosave data for hibernation Huacai Chen
2016-04-10 8:54 ` Huacai Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.