diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2008-04-28 05:12:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:17 -0400 |
commit | ea01ea937dcae2caa146dea1918cccf2f16ed3c4 (patch) | |
tree | aa3189d587dc04f75bd6a0d79d7f5a764200cd81 /include/linux/memory_hotplug.h | |
parent | 2a4e2b8780c6df42b19c053243dada7fa4d311ee (diff) |
hotplug memory remove: generic __remove_pages() support
Generic helper function to remove section mappings and sysfs entries for the
section of the memory we are removing. offline_pages() correctly adjusted
zone and marked the pages reserved.
TODO: Yasunori Goto is working on patches to free up allocations from bootmem.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/memory_hotplug.h')
-rw-r--r-- | include/linux/memory_hotplug.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 8fee7a45736b..aca9c65f8d08 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -8,6 +8,7 @@ | |||
8 | struct page; | 8 | struct page; |
9 | struct zone; | 9 | struct zone; |
10 | struct pglist_data; | 10 | struct pglist_data; |
11 | struct mem_section; | ||
11 | 12 | ||
12 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
13 | /* | 14 | /* |
@@ -64,9 +65,11 @@ extern int offline_pages(unsigned long, unsigned long, unsigned long); | |||
64 | /* reasonably generic interface to expand the physical pages in a zone */ | 65 | /* reasonably generic interface to expand the physical pages in a zone */ |
65 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, | 66 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, |
66 | unsigned long nr_pages); | 67 | unsigned long nr_pages); |
68 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | ||
69 | unsigned long nr_pages); | ||
67 | 70 | ||
68 | /* | 71 | /* |
69 | * Walk thorugh all memory which is registered as resource. | 72 | * Walk through all memory which is registered as resource. |
70 | * arg is (start_pfn, nr_pages, private_arg_pointer) | 73 | * arg is (start_pfn, nr_pages, private_arg_pointer) |
71 | */ | 74 | */ |
72 | extern int walk_memory_resource(unsigned long start_pfn, | 75 | extern int walk_memory_resource(unsigned long start_pfn, |
@@ -176,5 +179,6 @@ extern int arch_add_memory(int nid, u64 start, u64 size); | |||
176 | extern int remove_memory(u64 start, u64 size); | 179 | extern int remove_memory(u64 start, u64 size); |
177 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, | 180 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, |
178 | int nr_pages); | 181 | int nr_pages); |
182 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); | ||
179 | 183 | ||
180 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 184 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |