diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2007-10-16 04:26:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:02 -0400 |
commit | de33b821f34dc9e2fabf81a8ba464f3ef039bd00 (patch) | |
tree | fa7486b6a5ab054b7c220559e4af262629579a26 /arch/ia64/mm/init.c | |
parent | 0c0e6195896535481173df98935ad8db174f4d45 (diff) |
memory unplug: ia64 interface
IA64 memory unplug interface.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/mm/init.c')
-rw-r--r-- | arch/ia64/mm/init.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index a096b30734f3..947ec0c73234 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -721,7 +721,17 @@ int arch_add_memory(int nid, u64 start, u64 size) | |||
721 | 721 | ||
722 | int remove_memory(u64 start, u64 size) | 722 | int remove_memory(u64 start, u64 size) |
723 | { | 723 | { |
724 | return -EINVAL; | 724 | unsigned long start_pfn, end_pfn; |
725 | unsigned long timeout = 120 * HZ; | ||
726 | int ret; | ||
727 | start_pfn = start >> PAGE_SHIFT; | ||
728 | end_pfn = start_pfn + (size >> PAGE_SHIFT); | ||
729 | ret = offline_pages(start_pfn, end_pfn, timeout); | ||
730 | if (ret) | ||
731 | goto out; | ||
732 | /* we can free mem_map at this point */ | ||
733 | out: | ||
734 | return ret; | ||
725 | } | 735 | } |
726 | EXPORT_SYMBOL_GPL(remove_memory); | 736 | EXPORT_SYMBOL_GPL(remove_memory); |
727 | #endif | 737 | #endif |