From patchwork Fri May 25 16:10:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10427939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 11EF1601D5 for ; Fri, 25 May 2018 16:13:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE29329765 for ; Fri, 25 May 2018 16:13:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E23A729770; Fri, 25 May 2018 16:13:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7293429765 for ; Fri, 25 May 2018 16:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=t4quSAncsclCKlOF8L5ZPlLdKmNO+qhno4M4NQ/nf7g=; b=GxjDd6zUvXP+VWCUflkQ0mKkCJ RHhm0zcHHciw0RhqTPwnwxcGnliojc4rqMgJ+Lpur6PjGxkx/1BoviNCldYt2HBhCEicQHACbEXM1 REmQ7T60elKpuiS1GoD2lQ2oJHBDZtJoRHXbbAGBogfyMJMVrRLIKLL0YfvjS8ZUFNxsW052H84XJ jugxWhzzZqkkZWYdPvZtA3irSrDZR4bdf60ApsrKMJY1MTS7KLCi9hpK2bwaWX6ZLBkxi1vQjsJxd xP+g0DJZGJUXUEKCvrn9WtE2vM5r1WBP7UN6vRWNrnG63X3U2OMsKatZL9MQXwuYteeL/F2U3FRXk rhDKSt+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMFLR-0007Gt-Qt; Fri, 25 May 2018 16:13:34 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMFK5-0006gO-SZ for linux-arm-kernel@lists.infradead.org; Fri, 25 May 2018 16:12:13 +0000 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MEVKb-1fXTZj1vI1-00FmfG; Fri, 25 May 2018 18:11:38 +0200 From: Arnd Bergmann To: arm@kernel.org, Simon Horman , Magnus Damm Subject: [PATCH 2/2] ARM: shmobile: only call secure_cntvoff_init on SMP builds Date: Fri, 25 May 2018 18:10:21 +0200 Message-Id: <20180525161051.187324-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180525161051.187324-1-arnd@arndb.de> References: <20180525161051.187324-1-arnd@arndb.de> X-Provags-ID: V03:K1:tFqMGYmqpd1pR9JmWrYP2e90QFG4mMIYNQpNkumNPMw5XvlhsWP EGuElLzacMKhddXe7PxXRHrvKyVLPdALORgcU1dKhAaWAWFlsmYEQ5SUJa7dWpEddc60DHf eb32kp9J3YxBbeIJfs+HCFiAs3IFqU4EHEiGQBbKgLyu4TiGcaysXf41YrRGWlXP3NEfLfE is1wHzSpk2+dVyfHCyaUA== X-UI-Out-Filterresults: notjunk:1; V01:K0:AQGS+dQrUAM=:N4MTO+YHVWs5hI9IKEorJ2 yHqh2BI2MwOOTfpAXBvAoe99dl0OOKlbeYBrYEOswvpvLhF/nPG2twsGkI9nxf14kHk+1jvSR TnYo7fUzhTHNpr+AyXTN3Ms5LyPoLu2Z/rF2yq4b2hOc6dK+bhTidlEcHFHkckBnmUo21F3vr dc5+jCh3IoHYnw8KD0XG3f5aZ4i/nP7pPZdsst8cXTRQJUJoDNFSlB6vsFzi4P0UPqjcBp1IW xJpzD5oQfxhTvslaqMPUD0juzPv4pPiBA6Z/o/Cfx1CstPvnUbEHuNw1ML9t5GwrOudu+Q2lx uPEXIdx1ce2NCNmlx2jEHSCE3i8XCMMppjjGPrnUJ70VDtMKrcxr3Ybb80SWdo5QPAqB4Havv qMzz1/zVqLgC9LRFkiTtLexQ99EIVuahdmrD9ntE/kjF9bbk5IacmHorn3XNlBiNHYFNnE8gt 41HtE7NOsaJ/wm4aPBFl8MHZhGGyYGsGqQ+wVgrgdQP1kUxT6/85TOJKK6K6t2U6gatWYPt1w E+GwK+0GtYXqonuCFS8g+J/xvfigJ5Zos+R4/tBOwXUWtmvPDmMLgmkxCtZ3Me0BgQLjFm9ju kIyoLPaeaTyic/HqOz0EMMj1gVofzYlGraS8+Ld3N0xR+tH/r4L7UL/Ct0O5q+tr3EE69dTo8 6wq6XOBsICFuNEowWaKr1VjIY1scdaPwDgs+qChNbt0mwDMoIctNySLwgL4BOnVFS84Q= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180525_091210_286572_399454B6 X-CRM114-Status: GOOD ( 15.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Geert Uytterhoeven , linux-kernel@vger.kernel.org, Biju Das , linux-renesas-soc@vger.kernel.org, =?UTF-8?q?Myl=C3=A8ne=20Josserand?= , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The secure_cntvoff_init() function is not available without CONFIG_SMP, leading to a link error on shmobile: arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init': setup-rcar-gen2.c:(.init.text+0x18): undefined reference to `secure_cntvoff_init' From the description in commit 3fd45a136ff6 ("ARM: shmobile: rcar-gen2: Make sure CNTVOFF is initialized on CA7/15"), I understand that we don't need to call it on non-SMP builds because the boot CPU is always initialized by common code, so we can simply avoid the reference by checking for CONFIG_SMP. Fixes: cad160ed0a94 ("ARM: shmobile: Convert file to use cntvoff") Signed-off-by: Arnd Bergmann --- arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 88fdc1801d90..39085d7a8f37 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c @@ -71,7 +71,8 @@ void __init rcar_gen2_timer_init(void) void __iomem *base; u32 freq; - secure_cntvoff_init(); + if (IS_ENABLED(CONFIG_SMP)) + secure_cntvoff_init(); if (of_machine_is_compatible("renesas,r8a7745") || of_machine_is_compatible("renesas,r8a77470") ||