diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 71f27da025b59f55feb13545dab6dbd775defbbb..a67c0ba56f1a3c855cf28d0d63eb6d36715ca0d2 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -91,6 +91,7 @@ extern void __offline_isolated_pages(unsigned long, unsigned long); typedef void (*online_page_callback_t)(struct page *page, unsigned int order); +extern void generic_online_page(struct page *page, unsigned int order); extern int set_online_page_callback(online_page_callback_t callback); extern int restore_online_page_callback(online_page_callback_t callback); diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 84a7b8a0471afa39a8b80e1f1686a0a2b7620a13..19f653683cc65ed36dba66d4e90e6885f4c0eef1 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -48,8 +48,6 @@ * and restore_online_page_callback() for generic callback restore. */ -static void generic_online_page(struct page *page, unsigned int order); - static online_page_callback_t online_page_callback = generic_online_page; static DEFINE_MUTEX(online_page_callback_lock); @@ -617,7 +615,7 @@ void __online_page_free(struct page *page) } EXPORT_SYMBOL_GPL(__online_page_free); -static void generic_online_page(struct page *page, unsigned int order) +void generic_online_page(struct page *page, unsigned int order) { __free_pages_core(page, order); totalram_pages += (1UL << order); @@ -626,6 +624,7 @@ static void generic_online_page(struct page *page, unsigned int order) totalhigh_pages_add(1UL << order); #endif } +EXPORT_SYMBOL_GPL(generic_online_page); static int online_pages_blocks(unsigned long start, unsigned long nr_pages) {