sparc64: Do not change num_physpages during initmem freeing
PATCH v2 1/1 sparc64: Do not change num_physpages during initmem freeing
Common hibernation code looks at num_physpages during suspend and restore. Restore is able to be called from initcall, which is before initmem freeing. This case leads to restore fail.
--- arch/sparc/mm/init_64.c | 2 -- 1 file changed, 2 deletions(-)
arch/sparc/mm/init_64.c +0 -2
@@ -2125,7 +2125,6 @@ void free_initmem(void)ClearPageReserved (p);init_page_count (p);__free_page (p); - num_physpages++; totalram_pages++; } }
@@ -2142,7 +2141,6 @@ void free_initrd_mem(unsigned long start, unsigned long end)ClearPageReserved (p);init_page_count (p);__free_page (p); - num_physpages++; totalram_pages++; } }
From: Kirill Tkhai <[email protected]>
Date: Wed, 20 Mar 2013 05:12:08 +0400
Quoted 5 lines
Common hibernation code looks at
num_physpagesduring suspend and restore. Restore is able to be called from initcall, which is before initmem freeing. This case leads to restore fail.Signed-off-by Kirill Tkhai <[email protected]>
Applied.
Quoted 10 lines · David Miller
From: Kirill Tkhai <[email protected]>
Date: Wed, 20 Mar 2013 05:12:08 +0400Quoted 5 lines
Common hibernation code looks at
num_physpagesduring suspend and restore. Restore is able to be called from initcall, which is before initmem freeing. This case leads to restore fail.Signed-off-by Kirill Tkhai <[email protected]>Applied.
Btw. I expect this patch to introduce some trivial conflict with a patch in Andrew's queue which cleans up some memory management stuff.
This: "mm/SPARC: use common help functions to free reserved pages"
Just so we are prepared when it happens.
Stephen will tell us...
Sam