powerpc/xive: Do not mark xive_request_ipi() as __init
PATCH 1/1 powerpc/xive: Do not mark xive_request_ipi() as __init
Compiling ppc64le_defconfig with clang-14 shows a modpost warning:
WARNING: modpost: vmlinux.o(.text+0xa74e0): Section mismatch in reference from the function xive_setup_cpu_ipi() to the function .init.text:xive_request_ipi()
The function xive_setup_cpu_ipi() references
the function __init xive_request_ipi().
This is often because xive_setup_cpu_ipi lacks a __init annotation or the annotation of xive_request_ipi is wrong.
xive_request_ipi() is called from xive_setup_cpu_ipi(), which is not __init, so xive_request_ipi() should not be marked __init. Remove the attribute so there is no more warning.
--- arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1170,7 +1170,7 @@ static int __init xive_init_ipis(void)return ret; } -static int __init xive_request_ipi (unsigned int cpu) +static int xive_request_ipi (unsigned int cpu) {struct xive_ipi_desc *xid = &xive_ipis[early_cpu_to_node (cpu)];int ret;
base-commit: a2824f19e6065a0d3735acd9fe7155b104e7edf5
Signature · 1 line
2.33.0.rc2
Quoted 11 lines · Nathan Chancellor
Compiling
ppc64le_defconfigwith clang-14 shows a modpost warning:WARNING: modpost:
vmlinux.o(.text+0xa74e0): Section mismatch in reference from the functionxive_setup_cpu_ipi()to the function .init.text:xive_request_ipi()
The functionxive_setup_cpu_ipi()references
the function__initxive_request_ipi().
This is often becausexive_setup_cpu_ipilacks a__initannotation or the annotation ofxive_request_ipiis wrong.
Quoted 6 lines
xive_request_ipi()is called fromxive_setup_cpu_ipi(), which is not__init, soxive_request_ipi()should not be marked__init. Remove the attribute so there is no more warning.Fixes cbc06f051c52 ("powerpc/xive: Do not skip CPU-less nodes when creating the IPIs")Signed-off-by Nathan Chancellor <[email protected]>
Thanks for the patch!
Quoted 22 lines
--- arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/sysdev/xive/common.c +1
-1@@ -1170,7 +1170,7 @@ static int __init xive_init_ipis(void)return ret; } -static int __init xive_request_ipi (unsigned int cpu) +static int xive_request_ipi (unsigned int cpu) {struct xive_ipi_desc *xid = &xive_ipis[early_cpu_to_node (cpu)];int ret;base-commit:
a2824f19e6065a0d3735acd9fe7155b104e7edf5--
2.33.0.rc2
Signature · 2 lines
Thanks, ~Nick Desaulniers
Michael Ellerman
AppliedQuoted 11 lines · Nathan Chancellor
Compiling
ppc64le_defconfigwith clang-14 shows a modpost warning:WARNING: modpost:
vmlinux.o(.text+0xa74e0): Section mismatch in reference from the functionxive_setup_cpu_ipi()to the function .init.text:xive_request_ipi()
The functionxive_setup_cpu_ipi()references
the function__initxive_request_ipi().
This is often becausexive_setup_cpu_ipilacks a__initannotation or the annotation ofxive_request_ipiis wrong.[...]
Applied to powerpc/fixes.
[1/1] powerpc/xive: Do not mark xive_request_ipi() as __init
https://git.kernel.org/powerpc/c/3f78c90f9eb2e228f44ecc8f4377753f0e11dbab
cheers