From: Lee, Chun-Yi Date: Fri, 12 Sep 2014 03:03:58 +0000 (+0800) Subject: x86/mm, hibernate: Do not assume the first e820 area to be RAM X-Git-Tag: fixes-against-v3.18-rc2~88^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84779575554e2a19b9f6fc8d44f9763546a822ad;p=pandora-kernel.git x86/mm, hibernate: Do not assume the first e820 area to be RAM In arch/x86/kernel/setup.c::trim_bios_range(), the codes introduced by 1b5576e6 (base on d8a9e6a5), it updates the first 4Kb of memory to be E820_RESERVED region. That's because it's a BIOS owned area but generally not listed in the E820 table: e820: BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x0000000000096fff] usable BIOS-e820: [mem 0x0000000000097000-0x0000000000097fff] reserved ... e820: update [mem 0x00000000-0x00000fff] usable ==> reserved e820: remove [mem 0x000a0000-0x000fffff] usable But the region of first 4Kb didn't register to nosave memory: PM: Registered nosave memory: [mem 0x00097000-0x00097fff] PM: Registered nosave memory: [mem 0x000a0000-0x000fffff] The code in e820_mark_nosave_regions() assumes the first e820 area to be RAM, so it causes the first 4Kb E820_RESERVED region ignored when register to nosave. This patch removed assumption of the first e820 area. Signed-off-by: Lee, Chun-Yi Acked-by: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Yinghai Lu Cc: Takashi Iwai Link: http://lkml.kernel.org/r/1410491038-17576-1-git-send-email-jlee@suse.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed