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: 136968 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3785071lji; Fri, 25 May 2018 09:12:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp9KmsucnUgObMNAhXHr7kUJQsKOQz/OJU7dYsSdmjLolCwGD9bszxTAhznwnpxZkd/Ydv9 X-Received: by 2002:a17:902:301:: with SMTP id 1-v6mr3292261pld.328.1527264741922; Fri, 25 May 2018 09:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527264741; cv=none; d=google.com; s=arc-20160816; b=FdvOwD0RC5tAwDyp6ky7odG5Dl2rKGVQ95UblW3MXG9dO71hmVC3NoCzkPP20od736 t8PyCYcIhyJze/8tGBMeXNJRj9wv4Vvg76qQTlXrt47WwnFjLeHCufhdObhYIU0yVfWM sO5cy+qqtKa1qxN06wOpGchZG6ItG5r7V+l7fWq0E6CnhPN24SsN5dblYs4gskMGAWrV wef639GZSavR1ZBKlhmcRLbFrODlQOL912WI17YmJL6U81UQ9HklNlmOX0VMETK1pEKF O+1AzG4bxXfRUtzrnv6gVntheB6GvIsXfdzIwLMMXXfyg9rtlvZzjJ5Gbbh3tI8PgUPo dcxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=VGlFm3UbLK0hqj8tsUwOhpEHo0JlzKTKk6kgvyZcQLs=; b=LvE70gd0BeanvZMCiYEBSdZ72Ntr88HcgpzHESCspRC/HXgZ7+yJ+MHnfNSyCcFMI+ lUnYYUxCwXuRrJDmXUDCqGbXTnoL0YN7HKBKvTuuJTRkLS4LEuyKGjYsmrcbsD7el2sR 7fhR3lrN5XT0ItjVDmQx5fYaWw00hr3Nj2x24qIQiub9h+3JfH39ueb2bm2V0AnXmlfm wxD9xt4g9kYnpOwKWK//ZNpkvuFhqniTye7RfkyzNfQgC9y65WRfzKrprwiFmPw/bD96 D94HgdPM82tynEmVVn49/+JfWAocFlbBw509qBB6LRCJjQ7Ydw6tSQuYIJPEzupM1/4L r2mw== ARC-Authentication-Results: i=1; mx.google.com; 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 d190-v6si24799800pfg.142.2018.05.25.09.12.21; Fri, 25 May 2018 09:12:21 -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; 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 S967173AbeEYQMT (ORCPT + 30 others); Fri, 25 May 2018 12:12:19 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:37605 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967068AbeEYQMR (ORCPT ); Fri, 25 May 2018 12:12:17 -0400 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 Cc: Arnd Bergmann , Geert Uytterhoeven , =?utf-8?q?Myl=C3=A8ne_Josserand?= , Biju Das , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org 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= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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") ||