All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Adds __init annotation at mmu_init_secondary func
@ 2018-07-26 12:52 Alexey Spirkov
  2018-07-27 10:47 ` Michael Ellerman
  2018-08-01  5:24 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Alexey Spirkov @ 2018-07-26 12:52 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, linuxppc-dev
  Cc: trivial, andrew

mmu_init_secondary function called at initialization sequence
but it misses __init annotation. As result modpost warning is generated.
Some building systems sensitive to such kind of warnings.

Signed-off-by: Alexey Spirkov <alexeis@astrosoft.ru>
---
 arch/powerpc/mm/44x_mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 82b1ff7..12d9251 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -229,7 +229,7 @@ void setup_initial_memory_limit(phys_addr_t first_membl=
ock_base,
 }
=20
 #ifdef CONFIG_SMP
-void mmu_init_secondary(int cpu)
+void __init mmu_init_secondary(int cpu)
 {
 	unsigned long addr;
 	unsigned long memstart =3D memstart_addr & ~(PPC_PIN_SIZE - 1);
--=20
2.9.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Adds __init annotation at mmu_init_secondary func
  2018-07-26 12:52 [PATCH] Adds __init annotation at mmu_init_secondary func Alexey Spirkov
@ 2018-07-27 10:47 ` Michael Ellerman
  2018-07-27 10:57   ` Alexey Spirkov
  2018-08-01  5:24 ` Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2018-07-27 10:47 UTC (permalink / raw)
  To: Alexey Spirkov, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: trivial, andrew

Alexey Spirkov <AlexeiS@astrosoft.ru> writes:

> mmu_init_secondary function called at initialization sequence
> but it misses __init annotation. As result modpost warning is generated.
> Some building systems sensitive to such kind of warnings.

What warning are you seeing?

AFAICS it's not called from, nor does it call, any __init code.

So I'm a bit confused.

cheers

> diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
> index 82b1ff7..12d9251 100644
> --- a/arch/powerpc/mm/44x_mmu.c
> +++ b/arch/powerpc/mm/44x_mmu.c
> @@ -229,7 +229,7 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
>  }
>  
>  #ifdef CONFIG_SMP
> -void mmu_init_secondary(int cpu)
> +void __init mmu_init_secondary(int cpu)
>  {
>  	unsigned long addr;
>  	unsigned long memstart = memstart_addr & ~(PPC_PIN_SIZE - 1);
> -- 
> 2.9.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Adds __init annotation at mmu_init_secondary func
  2018-07-27 10:47 ` Michael Ellerman
@ 2018-07-27 10:57   ` Alexey Spirkov
  2018-07-30  6:57     ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Spirkov @ 2018-07-27 10:57 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: trivial, andrew

Without any additional option=20

WARNING: modpost: Found 1 section mismatch(es).

If detailed debug is switched on than:

WARNING: vmlinux.o(.text+0x142ac): Section mismatch in reference from the f=
unction mmu_init_secondary() to the function .init.text:ppc44x_pin_tlb()
The function mmu_init_secondary() references
the function __init ppc44x_pin_tlb().
This is often because mmu_init_secondary lacks a __init=20
annotation or the annotation of ppc44x_pin_tlb is wrong.

Best regards,
Alexey Spirkov

-----Original Message-----
From: Michael Ellerman <mpe@ellerman.id.au>=20
Sent: Friday, July 27, 2018 1:48 PM
To: Alexey Spirkov <AlexeiS@astrosoft.ru>; Benjamin Herrenschmidt <benh@ker=
nel.crashing.org>; Paul Mackerras <paulus@samba.org>; linuxppc-dev@lists.oz=
labs.org
Cc: trivial@kernel.org; andrew@ncrmnt.org
Subject: Re: [PATCH] Adds __init annotation at mmu_init_secondary func

Alexey Spirkov <AlexeiS@astrosoft.ru> writes:

> mmu_init_secondary function called at initialization sequence but it=20
> misses __init annotation. As result modpost warning is generated.
> Some building systems sensitive to such kind of warnings.

What warning are you seeing?

AFAICS it's not called from, nor does it call, any __init code.

So I'm a bit confused.

cheers

> diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c=20
> index 82b1ff7..12d9251 100644
> --- a/arch/powerpc/mm/44x_mmu.c
> +++ b/arch/powerpc/mm/44x_mmu.c
> @@ -229,7 +229,7 @@ void setup_initial_memory_limit(phys_addr_t=20
> first_memblock_base,  }
> =20
>  #ifdef CONFIG_SMP
> -void mmu_init_secondary(int cpu)
> +void __init mmu_init_secondary(int cpu)
>  {
>  	unsigned long addr;
>  	unsigned long memstart =3D memstart_addr & ~(PPC_PIN_SIZE - 1);
> --
> 2.9.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Adds __init annotation at mmu_init_secondary func
  2018-07-27 10:57   ` Alexey Spirkov
@ 2018-07-30  6:57     ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2018-07-30  6:57 UTC (permalink / raw)
  To: Alexey Spirkov, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: trivial, andrew

Alexey Spirkov <AlexeiS@astrosoft.ru> writes:

> Without any additional option 
>
> WARNING: modpost: Found 1 section mismatch(es).
>
> If detailed debug is switched on than:
>
> WARNING: vmlinux.o(.text+0x142ac): Section mismatch in reference from the function mmu_init_secondary() to the function .init.text:ppc44x_pin_tlb()
> The function mmu_init_secondary() references
> the function __init ppc44x_pin_tlb().
> This is often because mmu_init_secondary lacks a __init 
> annotation or the annotation of ppc44x_pin_tlb is wrong.

Ah right, thanks.

I checked ppc47x_pin_tlb() but didn't spot the call to ppc44x_pin_tlb().

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Adds __init annotation at mmu_init_secondary func
  2018-07-26 12:52 [PATCH] Adds __init annotation at mmu_init_secondary func Alexey Spirkov
  2018-07-27 10:47 ` Michael Ellerman
@ 2018-08-01  5:24 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2018-08-01  5:24 UTC (permalink / raw)
  To: Alexey Spirkov, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: andrew, trivial

On Thu, 2018-07-26 at 12:52:50 UTC, Alexey Spirkov wrote:
> mmu_init_secondary function called at initialization sequence
> but it misses __init annotation. As result modpost warning is generated.
> Some building systems sensitive to such kind of warnings.
> 
> Signed-off-by: Alexey Spirkov <alexeis@astrosoft.ru>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f7e2a152231f4a0308cc8f9c2296ba

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-01  5:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 12:52 [PATCH] Adds __init annotation at mmu_init_secondary func Alexey Spirkov
2018-07-27 10:47 ` Michael Ellerman
2018-07-27 10:57   ` Alexey Spirkov
2018-07-30  6:57     ` Michael Ellerman
2018-08-01  5:24 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.