diff options
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 6837a1014372..b17371185468 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/highmem.h> | 22 | #include <linux/highmem.h> |
23 | #include <linux/vmalloc.h> | 23 | #include <linux/vmalloc.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/cpuset.h> | ||
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
27 | #include <linux/migrate.h> | 26 | #include <linux/migrate.h> |
28 | #include <linux/page-isolation.h> | 27 | #include <linux/page-isolation.h> |
@@ -190,7 +189,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn, | |||
190 | pgdat->node_start_pfn; | 189 | pgdat->node_start_pfn; |
191 | } | 190 | } |
192 | 191 | ||
193 | static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) | 192 | static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn) |
194 | { | 193 | { |
195 | struct pglist_data *pgdat = zone->zone_pgdat; | 194 | struct pglist_data *pgdat = zone->zone_pgdat; |
196 | int nr_pages = PAGES_PER_SECTION; | 195 | int nr_pages = PAGES_PER_SECTION; |
@@ -217,7 +216,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) | |||
217 | return 0; | 216 | return 0; |
218 | } | 217 | } |
219 | 218 | ||
220 | static int __add_section(struct zone *zone, unsigned long phys_start_pfn) | 219 | static int __meminit __add_section(struct zone *zone, unsigned long phys_start_pfn) |
221 | { | 220 | { |
222 | int nr_pages = PAGES_PER_SECTION; | 221 | int nr_pages = PAGES_PER_SECTION; |
223 | int ret; | 222 | int ret; |
@@ -274,7 +273,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms) | |||
274 | * call this function after deciding the zone to which to | 273 | * call this function after deciding the zone to which to |
275 | * add the new pages. | 274 | * add the new pages. |
276 | */ | 275 | */ |
277 | int __add_pages(struct zone *zone, unsigned long phys_start_pfn, | 276 | int __ref __add_pages(struct zone *zone, unsigned long phys_start_pfn, |
278 | unsigned long nr_pages) | 277 | unsigned long nr_pages) |
279 | { | 278 | { |
280 | unsigned long i; | 279 | unsigned long i; |
@@ -471,7 +470,8 @@ static void rollback_node_hotadd(int nid, pg_data_t *pgdat) | |||
471 | } | 470 | } |
472 | 471 | ||
473 | 472 | ||
474 | int add_memory(int nid, u64 start, u64 size) | 473 | /* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */ |
474 | int __ref add_memory(int nid, u64 start, u64 size) | ||
475 | { | 475 | { |
476 | pg_data_t *pgdat = NULL; | 476 | pg_data_t *pgdat = NULL; |
477 | int new_pgdat = 0; | 477 | int new_pgdat = 0; |
@@ -498,8 +498,6 @@ int add_memory(int nid, u64 start, u64 size) | |||
498 | /* we online node here. we can't roll back from here. */ | 498 | /* we online node here. we can't roll back from here. */ |
499 | node_set_online(nid); | 499 | node_set_online(nid); |
500 | 500 | ||
501 | cpuset_track_online_nodes(); | ||
502 | |||
503 | if (new_pgdat) { | 501 | if (new_pgdat) { |
504 | ret = register_one_node(nid); | 502 | ret = register_one_node(nid); |
505 | /* | 503 | /* |