aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r--arch/sh/mm/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 82cc576fab15..105794037143 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -558,4 +558,21 @@ int memory_add_physaddr_to_nid(u64 addr)
558EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); 558EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
559#endif 559#endif
560 560
561#ifdef CONFIG_MEMORY_HOTREMOVE
562int arch_remove_memory(u64 start, u64 size)
563{
564 unsigned long start_pfn = start >> PAGE_SHIFT;
565 unsigned long nr_pages = size >> PAGE_SHIFT;
566 struct zone *zone;
567 int ret;
568
569 zone = page_zone(pfn_to_page(start_pfn));
570 ret = __remove_pages(zone, start_pfn, nr_pages);
571 if (unlikely(ret))
572 pr_warn("%s: Failed, __remove_pages() == %d\n", __func__,
573 ret);
574
575 return ret;
576}
577#endif
561#endif /* CONFIG_MEMORY_HOTPLUG */ 578#endif /* CONFIG_MEMORY_HOTPLUG */