ARM: Thumb-2: Fix Kconfig rules to avoid nonworking configs
cover ARM: Thumb-2: Fix Kconfig rules to avoid nonworking configs
Some configurations don't make sense with Thumb-2, or don't currently work and are unlikely to be relevant.
The patches avoid Kconfig from allowing these problematic combinations, for now.
Dave Martin (2):
ARM: Thumb-2: Make CONFIG_THUMB2_KERNEL depend on !CPU_V6
ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
arch/arm/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
PATCH 1/2 ARM: Thumb-2: Make CONFIG_THUMB2_KERNEL depend on !CPU_V6
This makes sense, because Thumb-2 code can't execute on plain ARMv6 processors.
This will avoid accidentally configuring a broken kernel where the config otherwise would allow multiple architecture versions to coexist in the same kernel.
Not adding !CPU_V5 etc., because the chance of anyone trying to put v5 and v7 in the same kernel is low, and I'm not aware of any mach which can do this. These could be added later if it matters.
Note that the rules may need to be refined if support for the ARM1156J(F)-S processor is later added to the kernel, since this processor supports the rare ARMv6T2 extensions, which add support for Thumb-2 and a few other ARMv7 features.
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -1
@@ -1311,7 +1311,7 @@ config HZ config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" - depends on CPU_V7 && EXPERIMENTAL + depends on CPU_V7 && !CPU_V6 && EXPERIMENTAL select AEABI select ARM_ASM_UNIFIED help
Signature · 1 line
1.7.1
PATCH 1/2 ARM: Thumb-2: Make CONFIG_THUMB2_KERNEL depend on !CPU_V6
Quoted 12 lines · Dave Martin
This makes sense, because Thumb-2 code can't execute on plain ARMv6 processors.
This will avoid accidentally configuring a broken kernel where the config otherwise would allow multiple architecture versions to coexist in the same kernel.
Not adding !CPU_V5 etc., because the chance of anyone trying to put v5 and v7 in the same kernel is low, and I'm not aware of any mach which can do this. These could be added later if it matters.
Quoted 7 lines
Note that the rules may need to be refined if support for the ARM1156J(F)-S processor is later added to the kernel, since this processor supports the rare ARMv6T2 extensions, which add support for Thumb-2 and a few other ARMv7 features.
Signed-off-by Dave Martin <[email protected]>Acked-by Catalin Marinas <[email protected]>
Quoted 26 lines
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +1
-1@@ -1311,7 +1311,7 @@ config HZ config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" - depends on CPU_V7 && EXPERIMENTAL + depends on CPU_V7 && !CPU_V6 && EXPERIMENTAL select AEABI select ARM_ASM_UNIFIED helpSignature · 7 lines
1.7.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/2 ARM: Thumb-2: Make CONFIG_THUMB2_KERNEL depend on !CPU_V6
In reply to Dave MartinQuoted 20 lines
-----Original Message-----
From: Dave Martin [mailto:dave.martin at linaro.org]
Sent: Thursday, December 09, 2010 5:30 PM
To: linux-arm-kernel at lists.infradead.org
Cc: Dave Martin; Santosh Shilimkar; linux-omap at vger.kernel.org
Subject: [PATCH 1/2] ARM: Thumb-2: MakeCONFIG_THUMB2_KERNELdepend on !CPU_V6This makes sense, because Thumb-2 code can't execute on plain ARMv6 processors.
This will avoid accidentally configuring a broken kernel where the config otherwise would allow multiple architecture versions to coexist in the same kernel.
Not adding !CPU_V5 etc., because the chance of anyone trying to put v5 and v7 in the same kernel is low, and I'm not aware of any mach which can do this. These could be added later if it matters.
Quoted 7 lines
Note that the rules may need to be refined if support for the ARM1156J(F)-S processor is later added to the kernel, since this processor supports the rare ARMv6T2 extensions, which add support for Thumb-2 and a few other ARMv7 features.
Signed-off-by Dave Martin <[email protected]>Acked-by Catalin Marinas <[email protected]>
If you like,
Quoted 19 lines
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +1
-2@@ -1311,7 +1311,7 @@ config HZ config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" - depends on CPU_V7 && EXPERIMENTAL + depends on CPU_V7 && !CPU_V6 && EXPERIMENTAL select AEABI select ARM_ASM_UNIFIED help --1.7.1
PATCH 1/2 ARM: Thumb-2: Make CONFIG_THUMB2_KERNEL depend on !CPU_V6
In reply to Dave MartinQuoted 20 lines
-----Original Message-----
From: Dave Martin [mailto:dave.martin at linaro.org]
Sent: Thursday, December 09, 2010 5:30 PM
To: linux-arm-kernel at lists.infradead.org
Cc: Dave Martin; Santosh Shilimkar; linux-omap at vger.kernel.org
Subject: [PATCH 1/2] ARM: Thumb-2: MakeCONFIG_THUMB2_KERNELdepend on !CPU_V6This makes sense, because Thumb-2 code can't execute on plain ARMv6 processors.
This will avoid accidentally configuring a broken kernel where the config otherwise would allow multiple architecture versions to coexist in the same kernel.
Not adding !CPU_V5 etc., because the chance of anyone trying to put v5 and v7 in the same kernel is low, and I'm not aware of any mach which can do this. These could be added later if it matters.
Quoted 7 lines
Note that the rules may need to be refined if support for the ARM1156J(F)-S processor is later added to the kernel, since this processor supports the rare ARMv6T2 extensions, which add support for Thumb-2 and a few other ARMv7 features.
Signed-off-by Dave Martin <[email protected]>Acked-by Catalin Marinas <[email protected]>
Quoted 19 lines
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +1
-2@@ -1311,7 +1311,7 @@ config HZ config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" - depends on CPU_V7 && EXPERIMENTAL + depends on CPU_V7 && !CPU_V6 && EXPERIMENTAL select AEABI select ARM_ASM_UNIFIED help --1.7.1
PATCH 2/2 ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
In reply to Dave MartinBecause the nwfpe support is unlikely to be used on new platforms and requires CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel.
At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code.
All ARMv7-A/R platforms necessarily have VFPv3 hardware floating- point natively, making emulation unnecessary.
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -1
@@ -1759,7 +1759,7 @@ comment "At least one emulation must be selected" config FPE_NWFPE bool "NWFPE math emulation" - depends on !AEABI || OABI_COMPAT + depends on (!AEABI || OABI_COMPAT) && !THUMB2_KERNEL ---help--- Say Y to include the NWFPE floating point emulator in the kernel. This is necessary to run most binaries. Linux does not currently
Signature · 1 line
1.7.1
PATCH 2/2 ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
Quoted 9 lines · Dave Martin
Because the nwfpe support is unlikely to be used on new platforms and requires
CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel.At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code.
Quoted 5 lines
All ARMv7-A/R platforms necessarily have VFPv3 hardware floating- point natively, making emulation unnecessary.
Signed-off-by Dave Martin <[email protected]>Acked-by Catalin Marinas <[email protected]>
Quoted 26 lines
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +1
-1@@ -1759,7 +1759,7 @@ comment "At least one emulation must be selected" config FPE_NWFPE bool "NWFPE math emulation" - depends on !AEABI || OABI_COMPAT + depends on (!AEABI || OABI_COMPAT) && !THUMB2_KERNEL ---help--- Say Y to include the NWFPE floating point emulator in the kernel. This is necessary to run most binaries. Linux does not currentlySignature · 7 lines
1.7.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/2 ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
In reply to Dave MartinQuoted 17 lines
-----Original Message-----
From: Dave Martin [mailto:dave.martin at linaro.org]
Sent: Thursday, December 09, 2010 5:30 PM
To: linux-arm-kernel at lists.infradead.org
Cc: Dave Martin; Santosh Shilimkar; linux-omap at vger.kernel.org
Subject: [PATCH 2/2] ARM: MakeCONFIG_FPE_NWFPEdepend on !CONFIG_THUMB2_KERNELBecause the nwfpe support is unlikely to be used on new platforms and requires
CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel.At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code.
Quoted 5 lines
All ARMv7-A/R platforms necessarily have VFPv3 hardware floating- point natively, making emulation unnecessary.
Signed-off-by Dave Martin <[email protected]>Acked-by Catalin Marinas <[email protected]>
If you like.
Quoted 9 lines
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +0
-0
arch/arm/Kconfig comment "At least one emulation must be selected" · line 1764
Quoted 7 lines
arch/arm/Kconfig +1
-1@@ -1759,7 +1759,7 @@ comment "At least one emulation must be selected" config FPE_NWFPE bool "NWFPE math emulation" - depends on !AEABI || OABI_COMPAT + depends on (!AEABI || OABI_COMPAT) && !THUMB2_KERNEL ---help--- Say Y to include the NWFPE floating point emulator in the
kernel.
Quoted 3 lines
arch/arm/Kconfig +0
-1This is necessary to run most binaries. Linux does not currently --1.7.1
PATCH 2/2 ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
In reply to Dave MartinQuoted 17 lines
-----Original Message-----
From: Dave Martin [mailto:dave.martin at linaro.org]
Sent: Thursday, December 09, 2010 5:30 PM
To: linux-arm-kernel at lists.infradead.org
Cc: Dave Martin; Santosh Shilimkar; linux-omap at vger.kernel.org
Subject: [PATCH 2/2] ARM: MakeCONFIG_FPE_NWFPEdepend on !CONFIG_THUMB2_KERNELBecause the nwfpe support is unlikely to be used on new platforms and requires
CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel.At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code.
Quoted 6 lines
All ARMv7-A/R platforms necessarily have VFPv3 hardware floating- point natively, making emulation unnecessary.
Signed-off-by Dave Martin <[email protected]>Acked-by Catalin Marinas <[email protected]>---
Quoted 21 lines
arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +0
-0@@ -1759,7 +1759,7 @@ comment "At least one emulation must beselected"
config
FPE_NWFPEarch/arm/Kconfig +1
-1bool "NWFPE math emulation" - depends on !AEABI || OABI_COMPAT + depends on (!AEABI || OABI_COMPAT) && !THUMB2_KERNEL ---help--- Say Y to include the NWFPE floating point emulator in thekernel.
This is necessary to run most binaries. Linux does not
currently
--
1.7.1
PATCH 2/2 ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
In reply to Dave MartinQuoted 8 lines · Dave Martin
Because the nwfpe support is unlikely to be used on new platforms and requires
CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel.At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code.
You might as well make OABI_COMPAT depend on !THUMB2_KERNEL. OABI userland is useless without FPA support.
PATCH 2/2 ARM: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNEL
Quoted 6 lines · Russell King - ARM Linux
Quoted 5 lines · Dave Martin
Because the nwfpe support is unlikely to be used on new platforms and requires
CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel.
Quoted 7 lines
Quoted 3 lines
At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code.
You might as well make
OABI_COMPATdepend on !THUMB2_KERNEL. ?OABI userland is useless without FPA support.
Sure. The original patch is already upstream, but I can roll a supplementary patch for this.
Cheers
---Dave