[PATCH] Adds __init annotation at mmu_init_secondary func

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE2932d

5 messages, 3 authors, 2018-08-01 · open the first message on its own page

[PATCH] Adds __init annotation at mmu_init_secondary func

From: Alexey Spirkov <hidden>
Date: 2018-07-26 12:52:56

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 <redacted>
---
 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

Re: [PATCH] Adds __init annotation at mmu_init_secondary func

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-07-27 10:47:44

Alexey Spirkov [off-list ref] 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
quoted hunk
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

RE: [PATCH] Adds __init annotation at mmu_init_secondary func

From: Alexey Spirkov <hidden>
Date: 2018-07-27 10:57:35

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 <redacted>; Benjamin Herrenschmidt <benh@ker=
nel.crashing.org>; Paul Mackerras [off-list ref]; 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 [off-list ref] 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
quoted hunk
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

RE: [PATCH] Adds __init annotation at mmu_init_secondary func

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-07-30 06:57:25

Alexey Spirkov [off-list ref] 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

Re: Adds __init annotation at mmu_init_secondary func

From: Michael Ellerman <hidden>
Date: 2018-08-01 05:24:17

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 <redacted>
Applied to powerpc next, thanks.

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

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help