Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: fix ics_rtas_init and start_secondary section mismatch

It seems, we're fine with just annotating the two functions.
Thus, this fixes the following build warnings on ppc64:

WARNING: arch/powerpc/sysdev/xics/built-in.o(.text+0x1664):
The function .ics_rtas_init() references
the function __init .xics_register_ics().
This is often because .ics_rtas_init lacks a __init
annotation or the annotation of .xics_register_ics is wrong.

WARNING: arch/powerpc/sysdev/built-in.o(.text+0x6044):
The function .ics_rtas_init() references
the function __init .xics_register_ics().
This is often because .ics_rtas_init lacks a __init
annotation or the annotation of .xics_register_ics is wrong.

WARNING: arch/powerpc/kernel/built-in.o(.text+0x2db30):
The function .start_secondary() references
the function __cpuinit .vdso_getcpu_init().
This is often because .start_secondary lacks a __cpuinit
annotation or the annotation of .vdso_getcpu_init is wrong.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Daniel Borkmann and committed by
Benjamin Herrenschmidt
174ea471 71cf1def

+2 -2
+1 -1
arch/powerpc/kernel/smp.c
··· 610 610 } 611 611 612 612 /* Activate a secondary processor. */ 613 - void start_secondary(void *unused) 613 + __cpuinit void start_secondary(void *unused) 614 614 { 615 615 unsigned int cpu = smp_processor_id(); 616 616 struct device_node *l2_cache;
+1 -1
arch/powerpc/sysdev/xics/ics-rtas.c
··· 213 213 return !of_device_is_compatible(node, "chrp,iic"); 214 214 } 215 215 216 - int ics_rtas_init(void) 216 + __init int ics_rtas_init(void) 217 217 { 218 218 ibm_get_xive = rtas_token("ibm,get-xive"); 219 219 ibm_set_xive = rtas_token("ibm,set-xive");