From patchwork Fri Mar 21 16:24:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3875421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC222BF540 for ; Fri, 21 Mar 2014 16:25:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CD4F20259 for ; Fri, 21 Mar 2014 16:25:04 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 583E120225 for ; Fri, 21 Mar 2014 16:25:02 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR2FZ-0008CU-OV; Fri, 21 Mar 2014 16:24:53 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR2FX-00033L-D6; Fri, 21 Mar 2014 16:24:51 +0000 Received: from moutng.kundenserver.de ([212.227.17.13]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR2FU-00032b-KK for linux-arm-kernel@lists.infradead.org; Fri, 21 Mar 2014 16:24:49 +0000 Received: from wuerfel.localnet (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0M2dAz-1XH4Or37W1-00sMr8; Fri, 21 Mar 2014 17:24:24 +0100 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 61/62] ARM: sunxi: fix build for THUMB2_KERNEL Date: Fri, 21 Mar 2014 17:24:21 +0100 Message-ID: <6006528.k1jnepzDNv@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <4626847.CFbp3XOTnf@wuerfel> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> <4626847.CFbp3XOTnf@wuerfel> MIME-Version: 1.0 X-Provags-ID: V02:K0:I8BhltsoNCW5pKlBW675E8CRGM52bxGiRimHAhL3455 KZByO8+uzzGichePSQ9GUNjpFONIRgdAFgYZ2bI9u9ODDbmKbn bbujq9zZgD3D7BSMCjfTlVuxg/F9DBxyzCNRi03K0STn8E12e8 QwC3se9TOcns0nAum1QRKeLl1gUv6CWdMSK0t54YvM40NhO4Aa yrprR74/nn+2FiAhVzzcdi7aoE9HAb79OjfWS0Yqx7IG+eRkkk xtDwFsCcwVzjxOJi52rZ1ELiOMienn2kMqDd/rdc94DhRg1T3b pfg9P5ZD5dUlKBcN0bMQb165Ug+bZuZk7UZTxC4VOOFUIgl8fY WjUJ/4WxTRg1k522a+kA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140321_122448_888986_BF383CEA X-CRM114-Status: GOOD ( 17.08 ) X-Spam-Score: -1.9 (-) Cc: Maxime Ripard , "arm@kernel.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Friday 21 March 2014 17:05:09 Arnd Bergmann wrote: > On Friday 21 March 2014 10:54:49 Rob Herring wrote: > > The first things secondary_startup do are: > > > > -set BE mode > > -if in HYP mode, install hyp vectors and drop to SVC > > -set the CPSR to a know value (safe_svcmode_maskall r9) > > > > So this code is completely redundant and unnecessary. If there were > > some reason for it, then it should be in secondary_startup. > > Ah, thanks for the clarification. Shall we just delete the file then > and jump straight to secondary_startup? Maxime, can you test the new version? From 2f6220cee15e45446c43e5c43affa85a6c407b31 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 16 Mar 2014 18:04:54 +0100 Subject: [PATCH] ARM: sunxi: fix build for THUMB2_KERNEL Building an SMP kernel for the sunxi platform with THUMB2 instructions fails with this error at the moment: headsmp.S:7: Error: Thumb encoding does not support an immediate here -- `msr cpsr_fsxc,#0xd3' Since the generic secondary_startup function already does the same thing in a safe way, we can just drop the private sunxi implementation and jump straight to secondary_startup. Signed-off-by: Arnd Bergmann Cc: Maxime Ripard Acked-by: Rob Herring diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index d939720..27b168f 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -1,2 +1,2 @@ obj-$(CONFIG_ARCH_SUNXI) += sunxi.o -obj-$(CONFIG_SMP) += platsmp.o headsmp.o +obj-$(CONFIG_SMP) += platsmp.o diff --git a/arch/arm/mach-sunxi/common.h b/arch/arm/mach-sunxi/common.h index 9e5ac47..08deb30 100644 --- a/arch/arm/mach-sunxi/common.h +++ b/arch/arm/mach-sunxi/common.h @@ -13,7 +13,6 @@ #ifndef __ARCH_SUNXI_COMMON_H_ #define __ARCH_SUNXI_COMMON_H_ -void sun6i_secondary_startup(void); extern struct smp_operations sun6i_smp_ops; #endif /* __ARCH_SUNXI_COMMON_H_ */ diff --git a/arch/arm/mach-sunxi/headsmp.S b/arch/arm/mach-sunxi/headsmp.S deleted file mode 100644 index a10d494..0000000 --- a/arch/arm/mach-sunxi/headsmp.S +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include - - .section ".text.head", "ax" - -ENTRY(sun6i_secondary_startup) - msr cpsr_fsxc, #0xd3 - b secondary_startup -ENDPROC(sun6i_secondary_startup) diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c index 7b141d8..3f9b889 100644 --- a/arch/arm/mach-sunxi/platsmp.c +++ b/arch/arm/mach-sunxi/platsmp.c @@ -82,7 +82,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu, spin_lock(&cpu_lock); /* Set CPU boot address */ - writel(virt_to_phys(sun6i_secondary_startup), + writel(virt_to_phys(secondary_startup), cpucfg_membase + CPUCFG_PRIVATE0_REG); /* Assert the CPU core in reset */ @@ -120,5 +120,5 @@ static int sun6i_smp_boot_secondary(unsigned int cpu, struct smp_operations sun6i_smp_ops __initdata = { .smp_prepare_cpus = sun6i_smp_prepare_cpus, - .smp_boot_secondary = sun6i_smp_boot_secondary, + .smp_boot_secondary = sun6i_smp_secondary_startup, };