mm: meminit: mark init_reserved_page as __meminit
Subsystems (2)
PATCH 1/1 mm: meminit: mark init_reserved_page as __meminit
The function is called from __meminit context and calls other __meminit functions but isn't it self mark as such today:
WARNING: vmlinux.o(.text.unlikely+0x4516): Section mismatch in reference from the function init_reserved_page() to the function .meminit.text:early_pfn_to_nid() The function init_reserved_page() references
the function __meminit early_pfn_to_nid().
This is often because init_reserved_page lacks a __meminit
annotation or the annotation of early_pfn_to_nid is wrong.
On most compilers, we don't notice this because the function gets inlined all the time. Adding __meminit here fixes the harmless warning for the old versions and is generally the correct annotation.
--- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
@@ -1190,7 +1190,7 @@ static void __meminit __init_single_pfn(unsigned long pfn, unsigned long zone, }#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT -static void init_reserved_page (unsigned long pfn) +static void __meminit init_reserved_page (unsigned long pfn) {pg_data_t *pgdat;int nid, zid;
Signature · 7 lines
2.9.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Arnd Bergmann
The function is called from
__meminitcontext and calls other__meminitfunctions but isn't it self mark as such today:WARNING:
vmlinux.o(.text.unlikely+0x4516): Section mismatch in reference from the functioninit_reserved_page()to the function .meminit.text:early_pfn_to_nid() The functioninit_reserved_page()references
the function__meminitearly_pfn_to_nid().
This is often becauseinit_reserved_pagelacks a__meminit
annotation or the annotation ofearly_pfn_to_nidis wrong.
Quoted 7 lines
On most compilers, we don't notice this because the function gets inlined all the time. Adding
__meminithere fixes the harmless warning for the old versions and is generally the correct annotation.Fixes 7e18adb4f80b ("mm: meminit: initialise remaining struct pages in parallel with kswapd")Signed-off-by Arnd Bergmann <[email protected]>
Signature · 8 lines
Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>