From patchwork Wed Dec 6 14:15:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10095931 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 32DFE60329 for ; Wed, 6 Dec 2017 14:15:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25A9C29B77 for ; Wed, 6 Dec 2017 14:15:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A8B229B79; Wed, 6 Dec 2017 14:15:55 +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 C0DAB29B77 for ; Wed, 6 Dec 2017 14:15:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbdLFOPx (ORCPT ); Wed, 6 Dec 2017 09:15:53 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:50718 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbdLFOPu (ORCPT ); Wed, 6 Dec 2017 09:15:50 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0LhifF-1eqv8p3kP3-00mv6x; Wed, 06 Dec 2017 15:15:19 +0100 From: Arnd Bergmann To: Tony Lindgren Cc: Arnd Bergmann , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds Date: Wed, 6 Dec 2017 15:15:07 +0100 Message-Id: <20171206141517.670032-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:SwvfDK22aZ7V8IrJRI0p6tESz1oKuV+EgOiTMdQS8I/uwhfR6SG UcHfKLvh0A3QawTvoG30fJxYByWAJApBUrsGk0TZFRA6XDNNa9GltNov05Z3DRHEvkeALuy 2OP4vOOstE2vCYQLG821C3xjGBPEgurz01R/9Iqtw9pKwqfE1WyJJwy3ed2q8ZPU6R8AVZX Wsg0aznTzZLkrIW4b4J4Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:v9alYcS3OZY=:Tntg3XzYKl5dMEFoJr4JRI o42qDNflOWwhRqDU+cFSEbEK618Ry2USytx/Wqm93Soe/WbZuLrTmuRjQuogq2ocW4QLFqopg gepvdYWcmCXInkU5/SYaHrzR32Yx/VwqQr9+SQRzComRbQGweHf8vvokps9Q7ZEIV6Jo1I0oC jFKZ0LShJje5C/FjyqL7yM+CO0qKdv+rIUpoPYjO915H0RWrsU+pgBDACHy3rQj/qPwfeNHWp gwviMkFj3Mal0/LlqdEh6Ci0+SurarVzZ+aItPMXW/9JdC49qT3WDqcv5sw893z6bLUSqJh4C ngobaHrAsB49XCZcx8LBYafjsIoyXBYvZbUn2ltxLK2C3ltLwMoTzlP4Lkt8afIKvm8b1u2pX AqYK9XrFI/7lwgDUOH7agFFFjpBgbrz3b5sVHyeywdqzEOBhoJINlnTpuWiaZWbargZOcvm5u nkHD0OLAWbbjNKtio9jJQItBZ/LIrOiYnrz/HOmz6PiaoPjpAkGOuSktjgYkpM9NLG2ZHjfLM smk+Uo39+9IzYUf2nrtpWkuYlb4/lR34IRJwSxI9OtIuyFpHkSYtll4fGtQhfrt6JpofgpBiX cvwwfeVspKTWgVF5aWFE4kAa2PkqVeF8QC+GoEl+FvayLV60xHz+QAp9PDfJE8W1/mia2tCo1 X43qSNzzNudZlTPw7LWvW6a5HREDpMHLvS4qJQaGNx9BiH9Jvzwh1+cTmEaCsB+TXF6FSoHDr KS9F6oBjG//1WtW3lYAF3bgbqrNRuRLpJ255NQ== 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 Tested-by: Dan Murphy --- 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..7be95cd8136d 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; } +#ifdef CONFIG_ARCH_OMAP3 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