From patchwork Wed Dec 6 21:48:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10097185 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 BDEB4602BF for ; Wed, 6 Dec 2017 21:49:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B10B429FA1 for ; Wed, 6 Dec 2017 21:49:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5CFC2A11C; Wed, 6 Dec 2017 21:49: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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1EA82A10B for ; Wed, 6 Dec 2017 21:49:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbdLFVts (ORCPT ); Wed, 6 Dec 2017 16:49:48 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:51563 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbdLFVtr (ORCPT ); Wed, 6 Dec 2017 16:49:47 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0Mfjsa-1ejkBm3FHI-00NCy1; Wed, 06 Dec 2017 22:49:18 +0100 From: Arnd Bergmann To: Tony Lindgren Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds Date: Wed, 6 Dec 2017 22:48:04 +0100 Message-Id: <20171206214916.2856657-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:BQtlUVR5TrCAp1oyZ4ruHJ3oxtko5RMwGdENZprZDiRKKYZLjQA CUnGhH5ww+i7izWxmkJ6zydANZUN9QgAGQmnFxrHGSTLra3zkBHTnIPy1uax+t/fB7nmBnQ EzeJQdALcW+051o+hrcuCfPxgLt/xbE0FmhwsBZ9SwCPnk2UbLw+8ry2WbL+z+qVhUh5DaK SMc9ozMXqljD80W3kCtpQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:dXqKSDQpiKQ=:3JzVbfW/TM00/OAT4FhYQy eWEtXiyb9szWh+m8Vv+bi/C7DaabUkToy6ASXCXrznf+KHgZjScpIeQcvZlhVhoI18MGQQW/K Rbzb+xs7AMU5AXbwPjkI2yz7seWafoXLW5bmOZ9Alofl2bT6uF7y8XPipfMaGtD/2jDnTrHXo t8+I5Z4JIvHbKSZrPPA/ICF/lq1ONrLZP9rJqsgdpD3kn9hyKHi1AScTtVTbwzNha9LerZVfq GySQksXv/aHVBAW/i0P+wqFSGoXPQM8TIg5jbTLq2RKqQm+/0wPWTlE513pwcwq0S4Kj1F3PN 8149FG/NbgfsawSmazC7gfzQFmBQwHHmoqW1JYijj6mqb9I2rzCJBj2oUFyz/pfkjIxSEvcO8 M9C7DzvlkGX908mG1PzJcgGy6inWCDSV0d2s57HrnxP5uaB9jLG8Owudzshg3ku9pHO5jXNT4 e7rdGDK7wAEi42aAUX5WABBwaCH7uraIWryLJdreSIKro1RhW2D0HuPy2P/u5U2uyokgWt1uQ YSY5N/PasIBsY5wUydMQ5yTzONNMl60mfDOYp6xT5Qb2YBR7FcKuKLe2gu8yyqzbbuPL2bLHT yrev7J3rV03N0OFuWjavqfHrqWXSLNFjm1ouZ+nhgDCBjuv6M7CZpaxMQq1mk0s1l3kDh+bf/ F1LZzGRD98iYy29kgDnBF2a4HgddsppQ7N1MnqFl5eGT/laIU8nU7XRSygtqxk1GNNY09Am9l 2gKvRf/yN6NxHe84v42XpIKah9Eg+7hWqbvFNQ== Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In configurations without CONFIG_OMAP3 but with secure RAM support, we now run into a link failure: arch/arm/mach-omap2/omap-secure.o: In function `omap3_save_secure_ram': omap-secure.c:(.text+0x130): undefined reference to `save_secure_ram_context' The omap3_save_secure_ram() function is only called from the OMAP34xx power management code, so we can simply hide that function in the appropriate #ifdef. Fixes: d09220a887f7 ("ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context") Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren --- v2: also check for CONFIG_PM arch/arm/mach-omap2/omap-secure.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c index f9303dc631e4..55b967758bb3 100644 --- a/arch/arm/mach-omap2/omap-secure.c +++ b/arch/arm/mach-omap2/omap-secure.c @@ -72,6 +72,7 @@ phys_addr_t omap_secure_ram_mempool_base(void) return omap_secure_memblock_base; } +#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) u32 omap3_save_secure_ram(void __iomem *addr, int size) { u32 ret; @@ -90,6 +91,7 @@ u32 omap3_save_secure_ram(void __iomem *addr, int size) return ret; } +#endif /** * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls