arm: Add Kconfig symbols used for Linux asm compatibility
PATCH 1/2 arm: Add Kconfig symbols used for Linux asm compatibility
Rather than change asm files that come from Linux, add the symbols to Kconfig. Since one of the symbols is for thumb2 builds, make CPU_V7M always select them.
--- arch/arm/Kconfig | 10 ++++++++++ arch/arm/lib/Makefile | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/Kconfig +10 -0
@@ -19,6 +19,15 @@ config HAS_VBAR config HAS_THUMB2 bool +# Used for compatibility with asm files copied from the kernel +config ARM_ASM_UNIFIED + bool + default y + +# Used for compatibility with asm files copied from the kernel +config THUMB2_KERNEL + bool + # If set, the workarounds for these ARM errata are applied early during U-Boot # startup. Note that in general these options force the workarounds to be # applied; no CPU-type/version detection exists, unlike the similar options in
@@ -128,6 +137,7 @@ config CPU_V7 config CPU_V7M bool select HAS_THUMB2 + select THUMB2_KERNEL select SYS_CACHE_SHIFT_5 config CPU_PXA
arch/arm/lib/Makefile +0 -2
@@ -72,8 +72,6 @@ ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) extra-y += eabi_compat.o endif -asflags-y += -DCONFIG_ARM_ASM_UNIFIED - # some files can only build in ARM or THUMB2, not THUMB1 ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
Signature · 1 line
2.7.4
PATCH v3 2/2 armv7m: Fix larger builds
The branch instruction only has an 11-bit relative target address, which is sometimes not enough.
---
v3:
- Move CONFIG_ARM_ASM_UNIFIED and CONFIG_THUMB2_KERNEL to Kconfig
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/start.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7m/start.S +3 -1
@@ -5,10 +5,12 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include <asm/assembler.h> + .globl reset .type reset, %function reset: - b _main + W(b) _main .globl c_runtime_cpu_setup c_runtime_cpu_setup:
Signature · 1 line
2.7.4
PATCH v3 2/2 armv7m: Fix larger builds
Quoted 4 lines · Phil Edworthy
The branch instruction only has an 11-bit relative target address, which is sometimes not enough.
Signed-off-by Phil Edworthy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/a9d0527b/attachment.sig>
PATCH 1/2 arm: Add Kconfig symbols used for Linux asm compatibility
In reply to Phil EdworthyQuoted 5 lines · Phil Edworthy
Rather than change asm files that come from Linux, add the symbols to
Kconfig. Since one of the symbols is for thumb2 builds, makeCPU_V7Malways select them.Signed-off-by Phil Edworthy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/afcb6da2/attachment.sig>
PATCH 1/2 arm: Add Kconfig symbols used for Linux asm compatibility
In reply to Phil EdworthyHi Albert/Tom,
Quoted 21 lines
-----Original Message-----
From: Phil Edworthy [mailto:phil.edworthy at renesas.com]
Sent: Wednesday, May 31, 2017 11:33 PM
To: Albert Aribaud <[email protected]>
Cc: Tom Rini <[email protected]>; Vikas MANOCHA <[email protected]>; Kamil Lulko <[email protected]>; u- boot at lists.denx.de; Phil Edworthy <[email protected]>
Subject: [PATCH 1/2] arm: AddKconfigsymbols used for Linux asm compatibilityRather than change asm files that come from Linux, add the symbols to
Kconfig. Since one of the symbols is for thumb2 builds, makeCPU_V7Malways select them.Signed-off-by Phil Edworthy <[email protected]>--- arch/arm/Kconfig | 10 ++++++++++ arch/arm/lib/Makefile | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/Kconfig config HAS_VBAR · line 25
Quoted 7 lines
arch/arm/Kconfig renamed from arch/arm/Kconfigl +4
-0@@ -19,6 +19,15 @@ config HAS_VBAR config HAS_THUMB2 bool +# Used for compatibility with asm files copied from the kernel config +ARM_ASM_UNIFIED + bool + default y
Is every arm arch (arm720, arm926 etc) assembly code written for unified ? Otherwise we might have run-time side effects.
Cheers,
Vikas
Quoted 28 lines
arch/arm/Kconfig renamed from arch/arm/Kconfigl +5
-0+ +# Used for compatibility with asm files copied from the kernel config +THUMB2_KERNEL + bool + # If set, the workarounds for these ARM errata are applied early during U-Boot # startup. Note that in general these options forcethe workarounds to be # applied; no CPU-type/version detection exists, unlike the similar options in @@ -128,6 +137,7 @@ config
CPU_V7configCPU_V7March/arm/Kconfig renamed from arch/arm/Kconfigl +1
-0bool select HAS_THUMB2 + select THUMB2_KERNEL select SYS_CACHE_SHIFT_5 config CPU_PXAarch/arm/lib/Makefile +0
-3@@ -72,8 +72,6 @@ ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) extra-y += eabi_compat.o endif -asflags-y += -DCONFIG_ARM_ASM_UNIFIED - # some files can only build in ARM or THUMB2, not THUMB1 ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD --2.7.4
PATCH 1/2 arm: Add Kconfig symbols used for Linux asm compatibility
Quoted 26 lines · Vikas MANOCHA
Hi Albert/Tom,
Quoted 24 lines
-----Original Message-----
From: Phil Edworthy [mailto:phil.edworthy at renesas.com]
Sent: Wednesday, May 31, 2017 11:33 PM
To: Albert Aribaud <[email protected]>
Cc: Tom Rini <[email protected]>; Vikas MANOCHA <[email protected]>; Kamil Lulko <[email protected]>; u- boot at lists.denx.de; Phil Edworthy <[email protected]>
Subject: [PATCH 1/2] arm: AddKconfigsymbols used for Linux asm compatibilityRather than change asm files that come from Linux, add the symbols to
Kconfig. Since one of the symbols is for thumb2 builds, makeCPU_V7Malways select them.Signed-off-by Phil Edworthy <[email protected]>--- arch/arm/Kconfig | 10 ++++++++++ arch/arm/lib/Makefile | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-)arch/arm/Kconfig renamed from arch/arm/Kconfigl +0
-0@@ -19,6 +19,15 @@ config HAS_VBAR config HAS_THUMB2 bool
Quoted 7 lines
arch/arm/Kconfig config HAS_VBAR · line 25
Quoted 4 lines
arch/arm/Kconfig renamed from arch/arm/Kconfigl +4
-0+# Used for compatibility with asm files copied from the kernel config +ARM_ASM_UNIFIED + bool + default yIs every arm arch (arm720, arm926 etc) assembly code written for unified ? Otherwise we might have run-time side effects.
I could be missing something, but this is only used by <asm/assembler.h> and in turn only by arch/arm/lib/*.S, where we already had been defining this.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170608/0a255a7a/attachment.sig>
PATCH 1/2 arm: Add Kconfig symbols used for Linux asm compatibility
Hi Tom,
Quoted 47 lines
-----Original Message-----
From: Tom Rini [mailto:trini at konsulko.com]
Sent: Thursday, June 08, 2017 5:12 PM
To: Vikas MANOCHA <[email protected]>
Cc: Phil Edworthy <[email protected]>; Albert Aribaud <[email protected]>; Kamil Lulko <[email protected]>; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] arm: AddKconfigsymbols used for Linux asm compatibilityQuoted 29 lines · Vikas MANOCHA
Hi Albert/Tom,
Quoted 27 lines
-----Original Message-----
From: Phil Edworthy [mailto:phil.edworthy at renesas.com]
Sent: Wednesday, May 31, 2017 11:33 PM
To: Albert Aribaud <[email protected]>
Cc: Tom Rini <[email protected]>; Vikas MANOCHA <[email protected]>; Kamil Lulko <[email protected]>; u- boot at lists.denx.de; Phil Edworthy <[email protected]>
Subject: [PATCH 1/2] arm: AddKconfigsymbols used for Linux asm compatibilityRather than change asm files that come from Linux, add the symbols
toKconfig. Since one of the symbols is for thumb2 builds, makeCPU_V7Malways select them.Signed-off-by Phil Edworthy <[email protected]>--- arch/arm/Kconfig | 10 ++++++++++ arch/arm/lib/Makefile | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-)arch/arm/Kconfig index renamed from arch/arm/Kconfig +0
-02a3a36e..2793651 100644
arch/arm/Kconfig renamed from arch/arm/Kconfigl +0
-0@@ -19,6 +19,15 @@ config HAS_VBAR config HAS_THUMB2 boolQuoted 7 lines
arch/arm/Kconfig config HAS_VBAR · line 25
Quoted 4 lines
arch/arm/Kconfig renamed from arch/arm/Kconfigl +4
-0+# Used for compatibility with asm files copied from the kernel +config ARM_ASM_UNIFIED + bool + default yIs every arm arch (arm720, arm926 etc) assembly code written for unified ? Otherwise we might have run-time side effects.
Quoted 2 lines
I could be missing something, but this is only used by <
asm/assembler.h> and in turn only byarch/arm/lib/*.S, where we already had been defining this.
Yes, you are right. I was under the impression that asm/assembler.h is being used by all arm archs everywhere like startup code, cache mgt etc.
Cheers,
Vikas
Quoted 3 lines
--
Tom