Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2194657yba; Mon, 6 May 2019 01:11:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqz30UyR86qHtn4d6GpuG5tVWbV2JTf3L1cy0AIhpiRjeCqEywgnTzlcmOx2WkqBx5E1IDMt X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr29696551pls.275.1557130310245; Mon, 06 May 2019 01:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557130310; cv=none; d=google.com; s=arc-20160816; b=Poz6Y3wMfIvLXqZVQ8Kz8zXqJDO8FgfT4gT81TRxnVn/crO6WNZE9oGaBqR90uDC97 sV6+1gRyjhnYdMk5KmizXUJFDBcB+l+bn6WZJbjdwU/NSCLIIkSadlrVes7L/wljkGPo cSenWope2jwahs9zFDXbwaWPgC4Olyq1o23yFsM5U8POJ7lmgDSTf4ZuTtmKaTPuKafH 3Avy/ZeRuhybYjHYXpOyek0ypiVDRJbtd5lI7XGrgZyd58Y9BgijPRT72iNetaD18jAi 1P5NHyQOgfYTBaUQIVQMGcrSdQaWKg9FWcLEcETAFTXU8uG2oI1Je1CHYXuqfsZgE+xL 856g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=Of2RhhubGl1Te2nzFxMAnUU+f2d0/2ySlpMz5ZHw1cs=; b=EHowY0DTCrfqzDgSAFUv4TkniQhMZ0cbXxHRr/EZ5QASBBV3Dj7gvyTk8QdBxpmbpr 6UILD3pn6UAe6cAmicYHx9kE/+YPAtDpvCGAxhFO644+TLBKT4TIiNBq2fAVkuT+fF6c vAfIaO4zYKvatbNHW02NV4GKNAJl2k0o+BaND04nZLPkS3Bze3wlfS4V47ZUYGPB6RPD UFC6bPJLeQ5Wkn6b1Pv7p+vbB3pMBSDm+xPsVfZ+I9rTgHSjJp4C7fse832lnYAuuo3s 74LfCMJSaJa5AUZWCEtTMnAgjJpPxtiSTdYQvskhJHkPVdGUHreQWU0jJOaMlBPrqirr FznQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=EVyjXNAR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si13081092pfd.228.2019.05.06.01.11.34; Mon, 06 May 2019 01:11:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=EVyjXNAR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725894AbfEFIKp (ORCPT + 99 others); Mon, 6 May 2019 04:10:45 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:5430 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725836AbfEFIKo (ORCPT ); Mon, 6 May 2019 04:10:44 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44yFmH1dz8z9v1Pf; Mon, 6 May 2019 10:10:39 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=EVyjXNAR; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id TO0FP1mGXTrP; Mon, 6 May 2019 10:10:39 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44yFmH0bjkz9v1Pd; Mon, 6 May 2019 10:10:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1557130239; bh=Of2RhhubGl1Te2nzFxMAnUU+f2d0/2ySlpMz5ZHw1cs=; h=From:Subject:To:Cc:Date:From; b=EVyjXNARxDDVmsSgNDq15PUEktCyj18VKtPeAESAkSXR96TV1vVuajC5zPMrHW5QG wU6FT0LeTWOuQONovHidvc6wJdWYBvCwie6VvWFOP0Fs/3/wcWVHWSoOSEciwtvsAO F7URvwxMhQAUuic2dJ23CN9LOTyznf2VLmH52Pnk= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 90B5B8B8A4; Mon, 6 May 2019 10:10:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id kmaPqq4R6FZK; Mon, 6 May 2019 10:10:43 +0200 (CEST) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.6]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6627F8B74F; Mon, 6 May 2019 10:10:43 +0200 (CEST) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 54E7F672A7; Mon, 6 May 2019 08:10:43 +0000 (UTC) Message-Id: <3a330ee8d98fce60c08c3d26054d2f0f8f53b66a.1557130203.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH] powerpc/mm: fix section mismatch for setup_kup() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 6 May 2019 08:10:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit b28c97505eb1 ("powerpc/64: Setup KUP on secondary CPUs") moved setup_kup() out of the __init section. As stated in that commit, "this is only for 64-bit". But this function is also used on PPC32, where the two functions called by setup_kup() are in the __init section, so setup_kup() has to either be kept in the __init section on PPC32 or marked __ref. This patch marks it __ref, it fixes the below build warnings. MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x169ec): Section mismatch in reference from the function setup_kup() to the function .init.text:setup_kuep() The function setup_kup() references the function __init setup_kuep(). This is often because setup_kup lacks a __init annotation or the annotation of setup_kuep is wrong. WARNING: vmlinux.o(.text+0x16a04): Section mismatch in reference from the function setup_kup() to the function .init.text:setup_kuap() The function setup_kup() references the function __init setup_kuap(). This is often because setup_kup lacks a __init annotation or the annotation of setup_kuap is wrong. Fixes: b28c97505eb1 ("powerpc/64: Setup KUP on secondary CPUs") Signed-off-by: Christophe Leroy --- arch/powerpc/mm/init-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/init-common.c b/arch/powerpc/mm/init-common.c index 6ea5607fc564..3bcae9e5e954 100644 --- a/arch/powerpc/mm/init-common.c +++ b/arch/powerpc/mm/init-common.c @@ -45,7 +45,7 @@ static int __init parse_nosmap(char *p) } early_param("nosmap", parse_nosmap); -void setup_kup(void) +void __ref setup_kup(void) { setup_kuep(disable_kuep); setup_kuap(disable_kuap); -- 2.13.3