From patchwork Tue Jul 22 10:26:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 372415 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 294701400DD for ; Tue, 22 Jul 2014 20:30:51 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9XHh-0000Z6-7E; Tue, 22 Jul 2014 10:27:01 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9XHe-0000Sh-Du for linux-arm-kernel@lists.infradead.org; Tue, 22 Jul 2014 10:26:59 +0000 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue004) with ESMTP (Nemesis) id 0MBo5j-1XGvPE3lAN-00AnvA; Tue, 22 Jul 2014 12:26:32 +0200 From: Arnd Bergmann To: Shawn Guo Subject: Re: [PATCH] ARM: imx6: fix SMP compilation again Date: Tue, 22 Jul 2014 12:26:31 +0200 Message-ID: <16557676.B1fW0k49Wz@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20140722085055.GX8537@dragon> References: <37015543.ZyZKZyEIPW@wuerfel> <20140722085055.GX8537@dragon> MIME-Version: 1.0 X-Provags-ID: V02:K0:1T+wnC6IowrC2dIqKPohQYHmKdR3YmM/v9ArtSuCgei kJ73bA3++wnGhlXWMMgmO1WIu10RrKbOtcT7iTxphNPVYvXdTl xkN079j6WRAO8kVJjLAm4MIE3MuaraPwaFg5n8kWLO62es1Q/t mJIbKjJKTx/ijg20HjPy9CEL/rYVrCVJm9sR0Ag+KEAB+COK1e 4uqJlX41w0yGwPdEQZXZIRqRVJkysyEY/4jaQn8RPD12WPzyiS qv7ZgxgqTp02KgoiY/foF8HSkWYBVCEzXvg6kXM6+AQAikBZEu a1gQv2austtNUFlCahKB7szsxl7yXUcLMT58WNyitLzN6Kz0Hp MoGgTa2fEVntTsr0zL88= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140722_032658_828628_07FA47CE X-CRM114-Status: GOOD ( 15.78 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.130 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.130 listed in wl.mailspike.net] Cc: Sascha Hauer , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Tuesday 22 July 2014 16:50:56 Shawn Guo wrote: > On Tue, Jul 22, 2014 at 10:30:50AM +0200, Arnd Bergmann wrote: > > My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions > > only when needed") fixed a problem with building an i.MX5 kernel, > > but missed the corner case of building a kernel for i.MX5 with > > SMP enabled. It is an extremely rare case that has only now > > happened after many thousands of randconfig kernel builds. > > > > The error message I get is > > arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup': > > :(.text+0x5124): undefined reference to `v7_invalidate_l1' > > I cannot reproduce it, and unsure how it happens. > > The v7_invalidate_l1() is defined in arch/arm/mm/cache-v7.S, and should > be available for i.MX5 build. > Ah, you are right, I got the text wrong here, and I think I now understand why it didn't happen earlier. Updated patch below (same patch, new text). 8<------------- Subject: [PATCH] ARM: imx6: fix SMP compilation again My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions only when needed") fixed a problem with building an i.MX5 kernel, but now the problem has returned for the case where we allow ARMv6K SMP builds in multiplatform. With CONFIG_CPU_V7 disabled, but i.MX3 and SMP enabled, we get this build error: arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup': :(.text+0x5124): undefined reference to `v7_invalidate_l1' This puts the code inside of an "ifdef CONFIG_SMP" to hopefully do the right thing in all configurations. Signed-off-by: Arnd Bergmann Acked-by: Shawn Guo diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index ac88599ca080..23c02932bf84 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -93,9 +93,11 @@ obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +ifdef CONFIG_SOC_IMX6 AFLAGS_headsmp.o :=-Wa,-march=armv7-a obj-$(CONFIG_SMP) += headsmp.o platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o +endif obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o