aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r--arch/x86/kernel/e820.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 988c00a1f60d..49f886481615 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -682,15 +682,14 @@ void __init parse_e820_ext(u64 phys_addr, u32 data_len)
682 * hibernation (32 bit) or software suspend and suspend to RAM (64 bit). 682 * hibernation (32 bit) or software suspend and suspend to RAM (64 bit).
683 * 683 *
684 * This function requires the e820 map to be sorted and without any 684 * This function requires the e820 map to be sorted and without any
685 * overlapping entries and assumes the first e820 area to be RAM. 685 * overlapping entries.
686 */ 686 */
687void __init e820_mark_nosave_regions(unsigned long limit_pfn) 687void __init e820_mark_nosave_regions(unsigned long limit_pfn)
688{ 688{
689 int i; 689 int i;
690 unsigned long pfn; 690 unsigned long pfn = 0;
691 691
692 pfn = PFN_DOWN(e820.map[0].addr + e820.map[0].size); 692 for (i = 0; i < e820.nr_map; i++) {
693 for (i = 1; i < e820.nr_map; i++) {
694 struct e820entry *ei = &e820.map[i]; 693 struct e820entry *ei = &e820.map[i];
695 694
696 if (pfn < PFN_UP(ei->addr)) 695 if (pfn < PFN_UP(ei->addr))