From patchwork Mon May 28 08:40:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10430045 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 7C9BC601BE for ; Mon, 28 May 2018 08:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D4DE289F3 for ; Mon, 28 May 2018 08:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 618A928A06; Mon, 28 May 2018 08:40:42 +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 C8DDF289F3 for ; Mon, 28 May 2018 08:40:41 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=xe2abzIU9n+drbtxYVWjZcmviXGt69zoT04Cg5QizR8=; b=I2vR2CM8X8LLJ4 QEaVbhwHr/jkzC28D5QW89mMtkQPGtdsXan1cuHvwtrUsgcAMZX0CYhPYnIBKaZVYUbxUfkCKWvnh zMWxVZBDl8mtjLmLVCbutmQ53pqgu9slIE3Jeqr0Kax0NgNBf87H3G9F1+buxRZ1sA4QIdNJ6EW3C ZUbdZcaG8dtO6VHCsNtUnurCtpIvCLKepxX0m9SHxhXrcEIOyiGhTuQT6VRbeWV79maZnp8PKU5cb b7iQFfXQEK4WZ92xvnO/IE05xfrF76A106OlWRYO7ESJkviPdbIVv2fJhyZQl/x7XlGJqjm09hQuA YlzW4U/aqjaxC5JJ5kkw==; 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 1fNDhi-0004PN-Cc; Mon, 28 May 2018 08:40:34 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNDhe-0003nX-77 for linux-arm-kernel@lists.infradead.org; Mon, 28 May 2018 08:40:32 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 68AE720750; Mon, 28 May 2018 10:40:18 +0200 (CEST) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 2F4B320719; Mon, 28 May 2018 10:40:18 +0200 (CEST) From: Maxime Ripard To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm: cntvoff: Add a function definition when !SMP Date: Mon, 28 May 2018 10:40:16 +0200 Message-Id: <20180528084016.9271-1-maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180528_014030_402803_78D38FC8 X-CRM114-Status: GOOD ( 10.41 ) 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: Maxime Ripard , Olof Johansson , =?UTF-8?q?Myl=C3=A8ne=20Josserand?= , Magnus Damm , Simon Horman 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 only compiled if CONFIG_SMP is set to true. However, that will lead to linking errors if one uses this function without an ifdef CONFIG_SMP guard, which isn't ideal. Provide a dumb implementation when CONFIG_SMP is false so that we don't end up with a compilation error on our hands. Cc: Olof Johansson Cc: Mylène Josserand Cc: Simon Horman Cc: Magnus Damm Fixes: cad160ed0a94 ("ARM: shmobile: Convert file to use cntvoff") Signed-off-by: Maxime Ripard --- arch/arm/include/asm/secure_cntvoff.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/include/asm/secure_cntvoff.h b/arch/arm/include/asm/secure_cntvoff.h index 1f93aee1f630..ce96cd781838 100644 --- a/arch/arm/include/asm/secure_cntvoff.h +++ b/arch/arm/include/asm/secure_cntvoff.h @@ -3,6 +3,10 @@ #ifndef __ASMARM_ARCH_CNTVOFF_H #define __ASMARM_ARCH_CNTVOFF_H +#ifdef CONFIG_SMP extern void secure_cntvoff_init(void); +#else +static inline void secure_cntvoff_init(void) {}; +#endif #endif