Skip to content

Commit f6953e2

Browse files
RichardWeiYangakpm00
authored andcommitted
mm/page_alloc: put __free_pages_core() in __meminit section
__free_pages_core() is only used in bootmem init and hot-add memory init path. Let's put it in __meminit section. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Wei Yang <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Oscar Salvador <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 26c7d84 commit f6953e2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mm/memory_hotplug.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ int restore_online_page_callback(online_page_callback_t callback)
628628
}
629629
EXPORT_SYMBOL_GPL(restore_online_page_callback);
630630

631-
void generic_online_page(struct page *page, unsigned int order)
631+
/* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
632+
void __ref generic_online_page(struct page *page, unsigned int order)
632633
{
633634
__free_pages_core(page, order, MEMINIT_HOTPLUG);
634635
}

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ static void __free_pages_ok(struct page *page, unsigned int order,
12191219
__count_vm_events(PGFREE, 1 << order);
12201220
}
12211221

1222-
void __free_pages_core(struct page *page, unsigned int order,
1222+
void __meminit __free_pages_core(struct page *page, unsigned int order,
12231223
enum meminit_context context)
12241224
{
12251225
unsigned int nr_pages = 1 << order;

0 commit comments

Comments
 (0)