diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2008-10-18 23:25:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 11:50:25 -0400 |
commit | 71088785c6bc68fddb450063d57b1bd1c78e0ea1 (patch) | |
tree | 026e0e2be8aac85959424211f7e319be6cac40ca /arch/powerpc/mm/mem.c | |
parent | 8433ac61acf733dc4b427de5f0891518c21538f9 (diff) |
mm: cleanup to make remove_memory() arch-neutral
There is nothing architecture specific about remove_memory().
remove_memory() function is common for all architectures which support
hotplug memory remove. Instead of duplicating it in every architecture,
collapse them into arch neutral function.
[akpm@linux-foundation.org: fix the export]
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Gary Hade <garyhade@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r-- | arch/powerpc/mm/mem.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 98d7bf99533a..b9e1a1da6e52 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -134,23 +134,6 @@ int arch_add_memory(int nid, u64 start, u64 size) | |||
134 | 134 | ||
135 | return __add_pages(zone, start_pfn, nr_pages); | 135 | return __add_pages(zone, start_pfn, nr_pages); |
136 | } | 136 | } |
137 | |||
138 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
139 | int remove_memory(u64 start, u64 size) | ||
140 | { | ||
141 | unsigned long start_pfn, end_pfn; | ||
142 | int ret; | ||
143 | |||
144 | start_pfn = start >> PAGE_SHIFT; | ||
145 | end_pfn = start_pfn + (size >> PAGE_SHIFT); | ||
146 | ret = offline_pages(start_pfn, end_pfn, 120 * HZ); | ||
147 | if (ret) | ||
148 | goto out; | ||
149 | /* Arch-specific calls go here - next patch */ | ||
150 | out: | ||
151 | return ret; | ||
152 | } | ||
153 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||
154 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 137 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
155 | 138 | ||
156 | /* | 139 | /* |