diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-07 01:07:39 +0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-04-24 17:14:04 -0400 |
commit | 862158f2bba6497650cc441e3f97aeda07bf7071 (patch) | |
tree | 2925eb8f2124a21a95a833b400a1bce91451d6a5 /kernel | |
parent | 0bc444b17344e40fec8c3c050189b5d99b7ca56c (diff) | |
download | lwn-862158f2bba6497650cc441e3f97aeda07bf7071.tar.gz lwn-862158f2bba6497650cc441e3f97aeda07bf7071.zip |
Revert "PM / hibernate: avoid unsafe pages in e820 reserved regions"
[ Upstream commit f82daee49c09cf6a99c28303d93438a2566e5552 ]
Commit 84c91b7ae07c (PM / hibernate: avoid unsafe pages in e820 reserved
regions) is reported to make resume from hibernation on Lenovo x230
unreliable, so revert it.
We will revisit the issue the commit in question was supposed to fix
in the future.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=96111
Reported-by: rhn <kebuac.rhn@porcupinefactory.org>
Cc: 3.17+ <stable@vger.kernel.org> # 3.17+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/snapshot.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 791a61892bb5..7325e35403c3 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -954,25 +954,6 @@ static void mark_nosave_pages(struct memory_bitmap *bm) } } -static bool is_nosave_page(unsigned long pfn) -{ - struct nosave_region *region; - - list_for_each_entry(region, &nosave_regions, list) { - if (pfn >= region->start_pfn && pfn < region->end_pfn) { - pr_err("PM: %#010llx in e820 nosave region: " - "[mem %#010llx-%#010llx]\n", - (unsigned long long) pfn << PAGE_SHIFT, - (unsigned long long) region->start_pfn << PAGE_SHIFT, - ((unsigned long long) region->end_pfn << PAGE_SHIFT) - - 1); - return true; - } - } - - return false; -} - /** * create_basic_memory_bitmaps - create bitmaps needed for marking page * frames that should not be saved and free page frames. The pointers @@ -2038,7 +2019,7 @@ static int mark_unsafe_pages(struct memory_bitmap *bm) do { pfn = memory_bm_next_pfn(bm); if (likely(pfn != BM_END_OF_MAP)) { - if (likely(pfn_valid(pfn)) && !is_nosave_page(pfn)) + if (likely(pfn_valid(pfn))) swsusp_set_page_free(pfn_to_page(pfn)); else return -EFAULT; |