diff options
Diffstat (limited to 'arch/x86/kernel/e820_64.c')
-rw-r--r-- | arch/x86/kernel/e820_64.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index 3b2e0b1bb49b..5e063e72b24a 100644 --- a/arch/x86/kernel/e820_64.c +++ b/arch/x86/kernel/e820_64.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/kexec.h> | 17 | #include <linux/kexec.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/suspend.h> | ||
21 | #include <linux/pfn.h> | 20 | #include <linux/pfn.h> |
22 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
23 | 22 | ||
@@ -94,37 +93,6 @@ void __init e820_reserve_resources(void) | |||
94 | } | 93 | } |
95 | 94 | ||
96 | /* | 95 | /* |
97 | * Find the ranges of physical addresses that do not correspond to | ||
98 | * e820 RAM areas and mark the corresponding pages as nosave for software | ||
99 | * suspend and suspend to RAM. | ||
100 | * | ||
101 | * This function requires the e820 map to be sorted and without any | ||
102 | * overlapping entries and assumes the first e820 area to be RAM. | ||
103 | */ | ||
104 | void __init e820_mark_nosave_regions(void) | ||
105 | { | ||
106 | int i; | ||
107 | unsigned long paddr; | ||
108 | |||
109 | paddr = round_down(e820.map[0].addr + e820.map[0].size, PAGE_SIZE); | ||
110 | for (i = 1; i < e820.nr_map; i++) { | ||
111 | struct e820entry *ei = &e820.map[i]; | ||
112 | |||
113 | if (paddr < ei->addr) | ||
114 | register_nosave_region(PFN_DOWN(paddr), | ||
115 | PFN_UP(ei->addr)); | ||
116 | |||
117 | paddr = round_down(ei->addr + ei->size, PAGE_SIZE); | ||
118 | if (ei->type != E820_RAM) | ||
119 | register_nosave_region(PFN_UP(ei->addr), | ||
120 | PFN_DOWN(paddr)); | ||
121 | |||
122 | if (paddr >= (end_pfn << PAGE_SHIFT)) | ||
123 | break; | ||
124 | } | ||
125 | } | ||
126 | |||
127 | /* | ||
128 | * Finds an active region in the address range from start_pfn to last_pfn and | 96 | * Finds an active region in the address range from start_pfn to last_pfn and |
129 | * returns its range in ei_startpfn and ei_endpfn for the e820 entry. | 97 | * returns its range in ei_startpfn and ei_endpfn for the e820 entry. |
130 | */ | 98 | */ |