diff options
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 962927309b6e..cad4b9125695 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -268,7 +268,6 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
268 | unsigned long i, pfn, end_pfn, nr_pages; | 268 | unsigned long i, pfn, end_pfn, nr_pages; |
269 | int node = pgdat->node_id; | 269 | int node = pgdat->node_id; |
270 | struct page *page; | 270 | struct page *page; |
271 | struct zone *zone; | ||
272 | 271 | ||
273 | nr_pages = PAGE_ALIGN(sizeof(struct pglist_data)) >> PAGE_SHIFT; | 272 | nr_pages = PAGE_ALIGN(sizeof(struct pglist_data)) >> PAGE_SHIFT; |
274 | page = virt_to_page(pgdat); | 273 | page = virt_to_page(pgdat); |
@@ -276,19 +275,6 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
276 | for (i = 0; i < nr_pages; i++, page++) | 275 | for (i = 0; i < nr_pages; i++, page++) |
277 | get_page_bootmem(node, page, NODE_INFO); | 276 | get_page_bootmem(node, page, NODE_INFO); |
278 | 277 | ||
279 | zone = &pgdat->node_zones[0]; | ||
280 | for (; zone < pgdat->node_zones + MAX_NR_ZONES - 1; zone++) { | ||
281 | if (zone_is_initialized(zone)) { | ||
282 | nr_pages = zone->wait_table_hash_nr_entries | ||
283 | * sizeof(wait_queue_head_t); | ||
284 | nr_pages = PAGE_ALIGN(nr_pages) >> PAGE_SHIFT; | ||
285 | page = virt_to_page(zone->wait_table); | ||
286 | |||
287 | for (i = 0; i < nr_pages; i++, page++) | ||
288 | get_page_bootmem(node, page, NODE_INFO); | ||
289 | } | ||
290 | } | ||
291 | |||
292 | pfn = pgdat->node_start_pfn; | 278 | pfn = pgdat->node_start_pfn; |
293 | end_pfn = pgdat_end_pfn(pgdat); | 279 | end_pfn = pgdat_end_pfn(pgdat); |
294 | 280 | ||
@@ -2131,7 +2117,6 @@ void try_offline_node(int nid) | |||
2131 | unsigned long start_pfn = pgdat->node_start_pfn; | 2117 | unsigned long start_pfn = pgdat->node_start_pfn; |
2132 | unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages; | 2118 | unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages; |
2133 | unsigned long pfn; | 2119 | unsigned long pfn; |
2134 | int i; | ||
2135 | 2120 | ||
2136 | for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { | 2121 | for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { |
2137 | unsigned long section_nr = pfn_to_section_nr(pfn); | 2122 | unsigned long section_nr = pfn_to_section_nr(pfn); |
@@ -2158,20 +2143,6 @@ void try_offline_node(int nid) | |||
2158 | */ | 2143 | */ |
2159 | node_set_offline(nid); | 2144 | node_set_offline(nid); |
2160 | unregister_one_node(nid); | 2145 | unregister_one_node(nid); |
2161 | |||
2162 | /* free waittable in each zone */ | ||
2163 | for (i = 0; i < MAX_NR_ZONES; i++) { | ||
2164 | struct zone *zone = pgdat->node_zones + i; | ||
2165 | |||
2166 | /* | ||
2167 | * wait_table may be allocated from boot memory, | ||
2168 | * here only free if it's allocated by vmalloc. | ||
2169 | */ | ||
2170 | if (is_vmalloc_addr(zone->wait_table)) { | ||
2171 | vfree(zone->wait_table); | ||
2172 | zone->wait_table = NULL; | ||
2173 | } | ||
2174 | } | ||
2175 | } | 2146 | } |
2176 | EXPORT_SYMBOL(try_offline_node); | 2147 | EXPORT_SYMBOL(try_offline_node); |
2177 | 2148 | ||