* [PATCH] mm: meminit: mark init_reserved_page as __meminit
@ 2017-09-15 19:31 Arnd Bergmann
2017-09-16 9:34 ` Mel Gorman
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-09-15 19:31 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, Michal Hocko, Vlastimil Babka, Mel Gorman,
Hillf Danton, linux-mm, linux-kernel
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.
Fixes: 7e18adb4f80b ("mm: meminit: initialise remaining struct pages in parallel with kswapd")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a123dee01872..ff45b8ebace3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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;
--
2.9.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: meminit: mark init_reserved_page as __meminit
2017-09-15 19:31 [PATCH] mm: meminit: mark init_reserved_page as __meminit Arnd Bergmann
@ 2017-09-16 9:34 ` Mel Gorman
0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2017-09-16 9:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Michal Hocko, Vlastimil Babka, Hillf Danton,
linux-mm, linux-kernel
On Fri, Sep 15, 2017 at 09:31:30PM +0200, Arnd Bergmann wrote:
> 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.
>
> Fixes: 7e18adb4f80b ("mm: meminit: initialise remaining struct pages in parallel with kswapd")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
--
Mel Gorman
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-16 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 19:31 [PATCH] mm: meminit: mark init_reserved_page as __meminit Arnd Bergmann
2017-09-16 9:34 ` Mel Gorman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox