Skip to content

Commit 862158f

Browse files
rafaeljwsashalevin
authored andcommitted
Revert "PM / hibernate: avoid unsafe pages in e820 reserved regions"
[ Upstream commit f82daee ] Commit 84c91b7 (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>
1 parent 0bc444b commit 862158f

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

‎kernel/power/snapshot.c‎

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -954,25 +954,6 @@ static void mark_nosave_pages(struct memory_bitmap *bm)
954954
}
955955
}
956956

957-
static bool is_nosave_page(unsigned long pfn)
958-
{
959-
struct nosave_region *region;
960-
961-
list_for_each_entry(region, &nosave_regions, list) {
962-
if (pfn >= region->start_pfn && pfn < region->end_pfn) {
963-
pr_err("PM: %#010llx in e820 nosave region: "
964-
"[mem %#010llx-%#010llx]\n",
965-
(unsigned long long) pfn << PAGE_SHIFT,
966-
(unsigned long long) region->start_pfn << PAGE_SHIFT,
967-
((unsigned long long) region->end_pfn << PAGE_SHIFT)
968-
- 1);
969-
return true;
970-
}
971-
}
972-
973-
return false;
974-
}
975-
976957
/**
977958
* create_basic_memory_bitmaps - create bitmaps needed for marking page
978959
* 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)
20382019
do {
20392020
pfn = memory_bm_next_pfn(bm);
20402021
if (likely(pfn != BM_END_OF_MAP)) {
2041-
if (likely(pfn_valid(pfn)) && !is_nosave_page(pfn))
2022+
if (likely(pfn_valid(pfn)))
20422023
swsusp_set_page_free(pfn_to_page(pfn));
20432024
else
20442025
return -EFAULT;

0 commit comments

Comments
 (0)