From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02on0609.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41cQsY6TTjzDqkJ for ; Fri, 27 Jul 2018 20:57:35 +1000 (AEST) From: Alexey Spirkov To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , "linuxppc-dev@lists.ozlabs.org" CC: "trivial@kernel.org" , "andrew@ncrmnt.org" Subject: RE: [PATCH] Adds __init annotation at mmu_init_secondary func Date: Fri, 27 Jul 2018 10:57:29 +0000 Message-ID: References: <87tvolrm43.fsf@concordia.ellerman.id.au> In-Reply-To: <87tvolrm43.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 =20 Sent: Friday, July 27, 2018 1:48 PM To: Alexey Spirkov ; Benjamin Herrenschmidt ; Paul Mackerras ; 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 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