From patchwork Tue Aug 11 16:16:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 6993451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 42D649F358 for ; Tue, 11 Aug 2015 16:18:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66970205C4 for ; Tue, 11 Aug 2015 16:18:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F40B205C1 for ; Tue, 11 Aug 2015 16:18:56 +0000 (UTC) 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 1ZPCEh-0006D8-V0; Tue, 11 Aug 2015 16:17:11 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPCEe-0005jG-5U for linux-arm-kernel@lists.infradead.org; Tue, 11 Aug 2015 16:17:09 +0000 Received: by pawu10 with SMTP id u10so167357719paw.1 for ; Tue, 11 Aug 2015 09:16:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aFhue8o+WyXlMxNhqV4EcuUFPPq+317HFLOoC2utj08=; b=E7rdjyyI1Wfc+Jruoi79hq2Yc69AjlupbkfJEdk0XaM/PxDSSCKAERoMLttuDQWLkD E2p+wcSPWDRNr+hCXEJjqEorDalA7jgehVwqsCn4eibbOwmYWc5I6C79ushs/9Y+P0eD O0z67RoH8zfEtYTMAEHDuSQvmCkGtEixa1mZAZUpSU5jmscxPdegtoa5z74jKCqZZc0e SLvPrS42CFK4FzJ3GPDFwT08F7wnI5WqPbGy+RlbKw8w/3XMuuHpkB9MfOBeqbP5L8Wh x631Gk97ukyT5PZ3htYWwvsSp7taH96QiJZrItkTxZ1umXj8W0uZd7OVFaOP+QtqsWXz B+NQ== X-Gm-Message-State: ALoCoQnmIhmTXr8J5vuS2CzHJR+EivPpATN6rbEaNxEdq+XLKJjgNBO4slxWivb7CzJoMySIfNLp X-Received: by 10.68.211.42 with SMTP id mz10mr58438479pbc.118.1439309805542; Tue, 11 Aug 2015 09:16:45 -0700 (PDT) Received: from localhost (c-67-160-101-93.hsd1.wa.comcast.net. [67.160.101.93]) by smtp.gmail.com with ESMTPSA id bx7sm3202451pdb.82.2015.08.11.09.16.44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Aug 2015 09:16:44 -0700 (PDT) From: Kevin Hilman To: stable@vger.kernel.org Subject: [PATCH stable/3.14] ARM: sunxi: fix build for THUMB2_KERNEL Date: Tue, 11 Aug 2015 09:16:43 -0700 Message-Id: <1439309803-20163-1-git-send-email-khilman@kernel.org> X-Mailer: git-send-email 2.4.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150811_091708_304318_E8778B9E X-CRM114-Status: GOOD ( 15.81 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.shi@linaro.org, Maxime Ripard , Kevin Hilman , Arnd Bergmann , linux-arm-kernel@lists.infradead.org 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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Arnd Bergmann 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 Cc: # v3.14 (cherry picked from commit 1146b600044de64af0ef775025731eeef1fa2189) Signed-off-by: Kevin Hilman --- arch/arm/include/asm/smp.h | 1 + arch/arm/mach-sunxi/Makefile | 2 +- arch/arm/mach-sunxi/headsmp.S | 9 --------- arch/arm/mach-sunxi/platsmp.c | 2 +- 4 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 arch/arm/mach-sunxi/headsmp.S diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 22a3b9b5d4a1..4157aec4e307 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h @@ -74,6 +74,7 @@ struct secondary_data { }; extern struct secondary_data secondary_data; extern volatile int pen_release; +extern void secondary_startup(void); extern int __cpu_disable(void); diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index d9397202d6ec..27b168f121a1 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/headsmp.S b/arch/arm/mach-sunxi/headsmp.S deleted file mode 100644 index a10d494fb37b..000000000000 --- 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 7b141d8342a1..0c7dbce033cc 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 */