Skip to contentSkip to conversation

powerpc/smp: Add __init to init_big_cores()

PATCH Applied Cédric Le Goater 2 participants 2 messages Dec 21, 2020 – Dec 22, 2020 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/smp: Add __init to init_big_cores()

It fixes this link warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x2d98): Section mismatch in reference from the function init_big_cores.isra.0() to the function .init.text:init_thread_group_cache_map() The function init_big_cores.isra.0() references
the function __init init_thread_group_cache_map().
This is often because init_big_cores.isra.0 lacks a __init
annotation or the annotation of init_thread_group_cache_map is wrong.

Fixes 425752c63b6f ("powerpc: Detect the presence of big-cores via "ibm, thread-groups"")
Cc Gautham R. Shenoy <[email protected]>
---
 arch/powerpc/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/smp.c +1 -1
index 378328b402f0..5a4d59a1070d 100644
@@ -991,7 +991,7 @@ static struct sched_domain_topology_level powerpc_topology[] = {
 	{ NULL, },
 };
 
-static int init_big_cores(void)
+static int __init init_big_cores(void)
 {
 	int cpu;
 
Signature · 1 line
2.26.2
#1 lore raw
Quoted 7 lines · Cédric Le Goater

It fixes this link warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x2d98): Section mismatch in reference from the function init_big_cores.isra.0() to the function .init.text:init_thread_group_cache_map() The function init_big_cores.isra.0() references
the function __init init_thread_group_cache_map().
This is often because init_big_cores.isra.0 lacks a __init
annotation or the annotation of init_thread_group_cache_map is wrong.

Applied to powerpc/fixes.

[1/1] powerpc/smp: Add __init to init_big_cores()

      https://git.kernel.org/powerpc/c/9014eab6a38c60fd185bc92ed60f46cf99a462ab

cheers