From patchwork Wed May 31 07:27:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 768927 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wd29p3nfzz9s78 for ; Wed, 31 May 2017 17:27:26 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 42381C21C5A; Wed, 31 May 2017 07:27:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BA559C21C3D; Wed, 31 May 2017 07:27:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B34A0C21C3D; Wed, 31 May 2017 07:27:13 +0000 (UTC) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by lists.denx.de (Postfix) with ESMTP id DA718C21C3A for ; Wed, 31 May 2017 07:27:12 +0000 (UTC) Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 31 May 2017 16:27:11 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 86B896E5AF; Wed, 31 May 2017 16:27:11 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.38,422,1491231600"; d="scan'208";a="245781178" Received: from unknown (HELO vbox.ree.adwin.renesas.com) ([10.226.37.67]) by relmlii2.idc.renesas.com with ESMTP; 31 May 2017 16:27:09 +0900 From: Phil Edworthy To: Albert Aribaud Date: Wed, 31 May 2017 08:27:05 +0100 Message-Id: <1496215625-25664-1-git-send-email-phil.edworthy@renesas.com> X-Mailer: git-send-email 2.7.4 Cc: u-boot@lists.denx.de, Tom Rini Subject: [U-Boot] [PATCH v2] armv7m: Fix larger builds X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The branch instruction only has an 11-bit relative target address, which is sometimes not enough. Signed-off-by: Phil Edworthy Reviewed-by: Vikas Manocha --- v2: - Use W(b) instead of ldr+mov. Using this macro requires CONFIG_ARM_ASM_UNIFIED and CONFIG_THUMB2_KERNEL to be defined. --- arch/arm/cpu/armv7m/Makefile | 3 +++ arch/arm/cpu/armv7m/start.S | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7m/Makefile b/arch/arm/cpu/armv7m/Makefile index 257fc7f..df1fc95 100644 --- a/arch/arm/cpu/armv7m/Makefile +++ b/arch/arm/cpu/armv7m/Makefile @@ -8,3 +8,6 @@ extra-y := start.o obj-y += cpu.o cache.o mpu.o obj-$(CONFIG_SYS_ARCH_TIMER) += systick-timer.o + +asflags-y += -DCONFIG_ARM_ASM_UNIFIED +asflags-y += -DCONFIG_THUMB2_KERNEL diff --git a/arch/arm/cpu/armv7m/start.S b/arch/arm/cpu/armv7m/start.S index 49f2720..890c773 100644 --- a/arch/arm/cpu/armv7m/start.S +++ b/arch/arm/cpu/armv7m/start.S @@ -5,10 +5,12 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include + .globl reset .type reset, %function reset: - b _main + W(b) _main .globl c_runtime_cpu_setup c_runtime_cpu_setup: