LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init
@ 2021-08-16 18:57 Nathan Chancellor
2021-08-16 22:04 ` Nick Desaulniers
2021-08-27 13:24 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2021-08-16 18:57 UTC (permalink / raw)
To: Michael Ellerman
Cc: Benjamin Herrenschmidt, Paul Mackerras, Nick Desaulniers,
linuxppc-dev, linux-kernel, clang-built-linux, Nathan Chancellor
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.
Fixes: cbc06f051c52 ("powerpc/xive: Do not skip CPU-less nodes when creating the IPIs")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
arch/powerpc/sysdev/xive/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 943fd30095af..8183ca343675 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init
2021-08-16 18:57 [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init Nathan Chancellor
@ 2021-08-16 22:04 ` Nick Desaulniers
2021-08-27 13:24 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2021-08-16 22:04 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
linuxppc-dev, linux-kernel, clang-built-linux
On Mon, Aug 16, 2021 at 12:06 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> 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.
>
> Fixes: cbc06f051c52 ("powerpc/xive: Do not skip CPU-less nodes when creating the IPIs")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> arch/powerpc/sysdev/xive/common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index 943fd30095af..8183ca343675 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -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
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init
2021-08-16 18:57 [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init Nathan Chancellor
2021-08-16 22:04 ` Nick Desaulniers
@ 2021-08-27 13:24 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2021-08-27 13:24 UTC (permalink / raw)
To: Nathan Chancellor, Michael Ellerman
Cc: Benjamin Herrenschmidt, Paul Mackerras, linux-kernel,
linuxppc-dev, clang-built-linux, Nick Desaulniers
On Mon, 16 Aug 2021 11:57:11 -0700, Nathan Chancellor wrote:
> 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.
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/xive: Do not mark xive_request_ipi() as __init
https://git.kernel.org/powerpc/c/3f78c90f9eb2e228f44ecc8f4377753f0e11dbab
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-27 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 18:57 [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init Nathan Chancellor
2021-08-16 22:04 ` Nick Desaulniers
2021-08-27 13:24 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).