From patchwork Thu Feb 14 22:47:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 220541 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9004B2C0079 for ; Fri, 15 Feb 2013 09:52:54 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U67d3-0000AN-Gg; Thu, 14 Feb 2013 22:50:09 +0000 Received: from moutng.kundenserver.de ([212.227.17.8]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U67bA-0007Lm-8g for linux-arm-kernel@lists.infradead.org; Thu, 14 Feb 2013 22:48:13 +0000 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0MVFW5-1UOSEH10ZB-00YU1b; Thu, 14 Feb 2013 23:47:52 +0100 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 8/9] [HACK] ARM: imx: work around v7_cpu_resume link error Date: Thu, 14 Feb 2013 23:47:50 +0100 Message-Id: <1360882071-4072668-9-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360882071-4072668-1-git-send-email-arnd@arndb.de> References: <1360882071-4072668-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:V6ldB/2L8w+ngB4V9aDnr5qcSZbLgopqm/mnI30dXr2 z6OOP44FTJW4EgVLsT2Y3X3hap2YDazJCN9w70V3x+RqSCFMLu iGjxTP2ME2WIBAXutyq11/qz2v5qnu7g+poenVVPySZSHwmpQh qx5X/CEHjrP1AMEZmzSNGNb2cJF1+RyeWJHq6TotURyp5S94G1 rM5B8zoBaxFm/tEslhQmOFsP0uPjPkW/LtJFe1Bb9gwjrIYJM2 D1ggoLE5Epa5ShXmn6qstB0HjQTTOpjfzvdDN455FxCcEmf0mX of5WwiUjo+rQG/vBHovSacyspU/1fFK3Ic0TfK5cJZa/0J0pOv GCl3/keN/BCFyMTZE1gC8Q84Ofe5N//U5uA4mVbtM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130214_174812_592737_F51642A2 X-CRM114-Status: GOOD ( 12.24 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.8 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Stephen Warren , Arnd Bergmann , Pavel Machek , Sascha Hauer , linux-kernel@vger.kernel.org, arm@kernel.org, Simon Horman , Shawn Guo , Dinh Nguyen X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Patch c08e20d24 "arm: Add v7_invalidate_l1 to cache-v7.S" moves the v7_invalidate_l1 symbol out of imx/headsmp.S, which seems to cause a link error because it is now too far away from v7_cpu_resume when building an allyesconfig kernel. If we move the v7_cpu_resume function from the .data section to .text, that creates another link error for the reference to phys_l2x0_saved_regs, but we can move all of the above to .text. I believe that this is not a correct bug fix but just a bad workaround, so I'm open to ideas from people who understand the bigger picture. Without this patch, building allyesconfig results in: arch/arm/mach-imx/built-in.o: In function `v7_cpu_resume': arch/arm/mach-imx/headsmp.S:55:(.data+0x87f8): relocation truncated to fit: R_ARM_CALL against symbol `v7_invalidate_l1' defined in .text section in arch/arm/mm/built-in.o Signed-off-by: Arnd Bergmann Cc: Shawn Guo Cc: Sascha Hauer Cc: Dinh Nguyen Cc: Pavel Machek Cc: Stephen Warren Cc: Simon Horman --- arch/arm/mach-imx/headsmp.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S index 921fc15..0de76cc 100644 --- a/arch/arm/mach-imx/headsmp.S +++ b/arch/arm/mach-imx/headsmp.S @@ -30,7 +30,7 @@ ENDPROC(v7_secondary_startup) * allow phys_l2x0_saved_regs to be accessed with a relative load * as we are running on physical address here. */ - .data + .text .align #ifdef CONFIG_CACHE_L2X0 @@ -51,6 +51,8 @@ phys_l2x0_saved_regs: .endm #endif + .text + ENTRY(v7_cpu_resume) bl v7_invalidate_l1 pl310_resume