Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2361834imm; Mon, 28 May 2018 06:44:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZolWafxm/QGD1UAH37me9j2CT8i9JiRGNEngTzT6llSv/FfQ+SziTOwM7a7FZ0pwzGhG/G1 X-Received: by 2002:a62:4a88:: with SMTP id c8-v6mr13553294pfj.23.1527515085047; Mon, 28 May 2018 06:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527515085; cv=none; d=google.com; s=arc-20160816; b=r+GkSm7vxLoEUhtqIUmadmUi9dMS+GBkitjtMiZNp5i11ZlzUWewukfbFF2yw0e/xz YNGF/E+cqi3rZhROX1rQ6Pu32dtIgEXxwba2lWguIxv8+fkgv9l3d+crXxg53pFyKMcn aW4O6LK/NBD7VbEFTwrhvBCxj4DeQHZ+2wZQTFR0cYBrf7EseHKFbYxFumXu9yiisIzu Ak7p9Pude3MWNkd6Iq6e60dP4QHX2R9+3+3lwENkEXrLyH0TB5FBKOxgsCPu/WKmEZGc NjNi7krzbqSXA/PWZ+iRJq+dw+pfxmlx1KWWQ4BzAKZDrJ+s4sDC/IHyR15jpYYyK92z N18A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=1hSf+HN6Ud3OLL0WRl4Yw7hO8JN9sB8o1CGaKwIa80c=; b=mEn54e5kmz8FM3/YG2BwSiCmd4cXBGM3+5E/zmPCFsLQB+MXTSZ/a2/asZKogdGNq+ 9DFofkuv8E6fACoEtEIuiX9dAFCrQIbquRYN8TWhYOylHFXc5GBcfkiWxVPgmsP69x3x I0JMn35vZPucPeuQjH29GwBJMSuE9sQKqOu1GfTUvqNEH5zSEgrpxJjiQAkUmz2gzGa6 Ew8YXMvKwyLey7b8c+GtcdKfavjITshKp0QUaz7f8BEfKRjp/mQJPfgR6Vn+nukGhIBF 31bY1nZSQYpEHULU0G1+Mvvll0cQ2mMpAIQDL+oC9ft5RjzcA0d+Ph1+l2yfsnC9g9g4 +npQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nDidDBzr; 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 i64-v6si1695028pli.431.2018.05.28.06.44.30; Mon, 28 May 2018 06:44:45 -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=@kernel.org header.s=default header.b=nDidDBzr; 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 S1165497AbeE1Nnm (ORCPT + 99 others); Mon, 28 May 2018 09:43:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162962AbeE1Knd (ORCPT ); Mon, 28 May 2018 06:43:33 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4A651204EE; Mon, 28 May 2018 10:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504212; bh=kTHHj3ItO3YG33hndeCh6grEbGVXUv3zQKwADrJ9AHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nDidDBzrus0/C+H2gXaHHPnbWcFe7LOD3SWxkxWtnBLakSBd/uHkEXXOLFlwnIZTu mfe1lvIcwUru7HF4qV2A5IEBhXAPavY7NcaZAx4am1ssL7p6PnfgDJlccVty8rS6rL aaoa5/QSISlM4Am3hPgzAR5oG63Fs6jYk3qJWDOM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, greg@kroah.com Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman Subject: [PATCH 4.14 055/496] powerpc/64s: Fix section mismatch warnings from setup_rfi_flush() Date: Mon, 28 May 2018 11:57:20 +0200 Message-Id: <20180528100322.103711113@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Ellerman commit 501a78cbc17c329fabf8e9750a1e9ab810c88a0e upstream. The recent LPM changes to setup_rfi_flush() are causing some section mismatch warnings because we removed the __init annotation on setup_rfi_flush(): The function setup_rfi_flush() references the function __init ppc64_bolted_size(). the function __init memblock_alloc_base(). The references are actually in init_fallback_flush(), but that is inlined into setup_rfi_flush(). These references are safe because: - only pseries calls setup_rfi_flush() at runtime - pseries always passes L1D_FLUSH_FALLBACK at boot - so the fallback flush area will always be allocated - so the check in init_fallback_flush() will always return early: /* Only allocate the fallback flush area once (at boot time). */ if (l1d_flush_fallback_area) return; - and therefore we won't actually call the freed init routines. We should rework the code to make it safer by default rather than relying on the above, but for now as a quick-fix just add a __ref annotation to squash the warning. Fixes: abf110f3e1ce ("powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again") Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/setup_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -831,7 +831,7 @@ void rfi_flush_enable(bool enable) rfi_flush = enable; } -static void init_fallback_flush(void) +static void __ref init_fallback_flush(void) { u64 l1d_size, limit; int cpu;