diff options
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index d5094929766d..c8b3ca79de2d 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -219,6 +219,25 @@ static void grow_pgdat_span(struct pglist_data *pgdat, | |||
219 | pgdat->node_start_pfn; | 219 | pgdat->node_start_pfn; |
220 | } | 220 | } |
221 | 221 | ||
222 | void online_page(struct page *page) | ||
223 | { | ||
224 | totalram_pages++; | ||
225 | num_physpages++; | ||
226 | |||
227 | #ifdef CONFIG_HIGHMEM | ||
228 | if (PageHighMem(page)) | ||
229 | totalhigh_pages++; | ||
230 | #endif | ||
231 | |||
232 | #ifdef CONFIG_FLATMEM | ||
233 | max_mapnr = max(page_to_pfn(page), max_mapnr); | ||
234 | #endif | ||
235 | |||
236 | ClearPageReserved(page); | ||
237 | init_page_count(page); | ||
238 | __free_page(page); | ||
239 | } | ||
240 | |||
222 | static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, | 241 | static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, |
223 | void *arg) | 242 | void *arg) |
224 | { | 243 | { |