author: Wen Congyang <wency@cn.fujitsu.com> 2013-02-22 16:32:58 -0800
committer: Linus Torvalds <torvalds@linux-foundation.org> 2013-02-23 17:50:12 -0800
commit: 24d335ca3606b610ec69c66a1e42760c96d89470
parent: 46c66c4b7ba0f9bb3e2ae3a3cfd40cd3472c8f80
Commit Summary:
Diffstat:
1 file changed, 15 insertions, 0 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index b755ea92aea7..20bc967c7209 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -688,6 +688,24 @@ int arch_add_memory(int nid, u64 start, u64 size)
return ret;
}
+
+#ifdef CONFIG_MEMORY_HOTREMOVE
+int arch_remove_memory(u64 start, u64 size)
+{
+ unsigned long start_pfn = start >> PAGE_SHIFT;
+ unsigned long nr_pages = size >> PAGE_SHIFT;
+ struct zone *zone;
+ int ret;
+
+ zone = page_zone(pfn_to_page(start_pfn));
+ ret = __remove_pages(zone, start_pfn, nr_pages);
+ if (ret)
+ pr_warn("%s: Problem encountered in __remove_pages() as"
+ " ret=%d\n", __func__, ret);
+
+ return ret;
+}
+#endif
#endif
/*