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: 10097183 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 39013602BF 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 29C8D29FA1 for ; Wed, 6 Dec 2017 21:49:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CF952A167; 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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 5A1482A11C for ; Wed, 6 Dec 2017 21:49:48 +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: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=B6OR+mSExcjvP03AC+ICFcHkB5/CcvQylycBlTcBFbE=; b=Xv5 19Qdy797mnerTISiMKtebuH/U3ANr3vkz8HWGQ5vwUuCzg7qMl3XZqCiiO5OEwenAx/K92BJ46Wbx rkakBxayxlKZmTlJJSD/wRN4TsWn5q+5IpPXDXQQ8CAC+pug9qgHYsO81/M+sulDKB+f68m5ZU/8H s6W3kdXvhpcLEdHhArmt+ZpgcnxVo7llc+ouZRyGc8I6VdBMcWHXonnsSy8iELDtlK3SZJfIUQwzv iDCNzUAQPBR8nuJzDPg7mjHp7A/orJTo7wMYYKrUeMeUnAV7jIkl70GCMZi8rHY7eN6OTjbr5nse8 nghQXUM2xrc2nz4qQOzBQYCFvRIMGjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMhZb-0004sU-To; Wed, 06 Dec 2017 21:49:47 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMhZX-0004OJ-KQ for linux-arm-kernel@lists.infradead.org; Wed, 06 Dec 2017 21:49:46 +0000 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 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171206_134944_159227_E37FCC9F X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. 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: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.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 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