Commit de33b821 authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds

memory unplug: ia64 interface

IA64 memory unplug interface.
Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0c0e6195
...@@ -721,7 +721,17 @@ int arch_add_memory(int nid, u64 start, u64 size) ...@@ -721,7 +721,17 @@ int arch_add_memory(int nid, u64 start, u64 size)
int remove_memory(u64 start, u64 size) int remove_memory(u64 start, u64 size)
{ {
return -EINVAL; unsigned long start_pfn, end_pfn;
unsigned long timeout = 120 * HZ;
int ret;
start_pfn = start >> PAGE_SHIFT;
end_pfn = start_pfn + (size >> PAGE_SHIFT);
ret = offline_pages(start_pfn, end_pfn, timeout);
if (ret)
goto out;
/* we can free mem_map at this point */
out:
return ret;
} }
EXPORT_SYMBOL_GPL(remove_memory); EXPORT_SYMBOL_GPL(remove_memory);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment