Git pull request: disable Neon on old i.MX51
Subsystems (2)
Russell, could you please pull:
git://git.linaro.org/kernel/linux-linaro-next.git for_rmk
This contains 2 patches to allow i.MX51 code to disable Neon on those revisions where it is broken, and so in a generic way. Those patches are following in subsequent emails. This is based on v2.6.35.
[PATCH 1/2] ARM: link board specific files after core files [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
Nicolas
PATCH 1/2 ARM: link board specific files after core files
From: Nicolas Pitre <[email protected]>
This allows for board specific issues to override decisions made in generic code that might not be suitable due to some errata or the like, by making the initcall hooks from those board specific files run after the core ones, therefore avoiding ugly #ifdef's in core code.
--- arch/arm/Makefile | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/Makefile +4 -3
@@ -236,13 +236,14 @@ ifeq ($(FASTFPE),$(wildcard $(FASTFPE))) FASTFPE_OBJ :=$(FASTFPE)/ endif -# If we have a machine-specific directory, then include it in the build. -core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ -core-y += $(machdirs) $(platdirs) core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) core-$(CONFIG_VFP) += arch/arm/vfp/ +# If we have a machine-specific directory, then include it in the build. +core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ +core-y += $(machdirs) $(platdirs) + drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ libs-y := arch/arm/lib/ $(libs-y)
Signature · 1 line
1.7.2.2.440.g49ea7
PATCH 2/2 ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
In reply to Nicolas PitreFrom: Amit Kucheria <[email protected]>
Versions of silicon older than TO3 have broken NEON implementation. Turn off NEON in such cases.
--- arch/arm/mach-mx5/cpu.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/cpu.c +19 -0
@@ -70,6 +70,25 @@ int mx51_revision(void) }EXPORT_SYMBOL (mx51_revision); +#ifdef CONFIG_NEON + +/* All versions of the silicon before Rev. 3 have broken NEON implementations. +* Dependent on link order - so the assumption is that vfp_init is called before us +*/ +static int __init mx51_neon_fixup (void ) +{ +if (mx51_revision () <MX51_CHIP_REV_3_0 ) { +if (elf_hwcap &HWCAP_NEON ) { + elf_hwcap &= ~HWCAP_NEON ; +pr_info ("Turning off NEON support, detected broken NEON implementation\n" ); + } + } +return 0 ; +} + +late_initcall (mx51_neon_fixup); +#endif +static int __init post_cpu_init (void ) {unsigned int reg;
Signature · 1 line
1.7.2.2.440.g49ea7
PATCH 2/2 ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
Hello.
Quoted 19 lines · Nicolas Pitre
From: Amit Kucheria <[email protected]>
Versions of silicon older than TO3 have broken NEON implementation. Turn off NEON in such cases.
Signed-off-by Amit Kucheria <[email protected]>Tested-by Dave Martin <[email protected]>Tested-by Jason Hui <[email protected]>Signed-off-by Nicolas Pitre <[email protected]>--- arch/arm/mach-mx5/cpu.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)arch/arm/mach-mx5/cpu.c +0
-0@@ -70,6 +70,25 @@ int mx51_revision(void) }
arch/arm/mach-mx5/cpu.c int mx51_revision(void) · line 80
Quoted 10 lines
arch/arm/mach-mx5/cpu.c +8
-0EXPORT_SYMBOL (mx51_revision); +#ifdef CONFIG_NEON + +/* All versions of the silicon before Rev. 3 have broken NEON implementations. +* Dependent on link order - so the assumption is that vfp_init is called before us +*/ +static int __init mx51_neon_fixup (void ) +{ +if (mx51_revision () <MX51_CHIP_REV_3_0 ) {
Too many spaces after '<'?
arch/arm/mach-mx5/cpu.c int mx51_revision(void) · line 81
Quoted 1 line
arch/arm/mach-mx5/cpu.c +1
-0+if (elf_hwcap &HWCAP_NEON ) {
Could be collapsed into the preceding *if*, and so indentation level made
one less...
arch/arm/mach-mx5/cpu.c int mx51_revision(void) · line 91
Quoted 10 lines
arch/arm/mach-mx5/cpu.c +10
-0+ elf_hwcap &= ~HWCAP_NEON ; + pr_info("Turning off NEON support, detected broken NEON implementation\n"); + } + } +return 0 ; +} + +late_initcall (mx51_neon_fixup); +#endif +
WBR, Sergei
PATCH 2/2 ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
Quoted 28 lines · Sergei Shtylyov
Hello.
Quoted 24 lines · Nicolas Pitre
From: Amit Kucheria <[email protected]>
Versions of silicon older than TO3 have broken NEON implementation. Turn off NEON in such cases.
Signed-off-by Amit Kucheria <[email protected]>Tested-by Dave Martin <[email protected]>Tested-by Jason Hui <[email protected]>Signed-off-by Nicolas Pitre <[email protected]>--- arch/arm/mach-mx5/cpu.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)arch/arm/mach-mx5/cpu.c +2
-0@@ -70,6 +70,25 @@ int mx51_revision(void) }EXPORT_SYMBOL (mx51_revision); +#ifdef CONFIG_NEON + +/* All versions of the silicon before Rev. 3 have broken NEON implementations.
Quoted 8 lines
arch/arm/mach-mx5/cpu.c int mx51_revision(void) · line 80
Quoted 6 lines
+ * Dependent on link order - so the assumption is that
vfp_initis called before us
+ */arch/arm/mach-mx5/cpu.c +3
-0+static int __init mx51_neon_fixup (void ) +{ +if (mx51_revision () <MX51_CHIP_REV_3_0 ) {Too many spaces after '<'?
Yup.
Quoted 4 lines
arch/arm/mach-mx5/cpu.c int mx51_revision(void) · line 81
Quoted 1 line
arch/arm/mach-mx5/cpu.c +1
-0+if (elf_hwcap &HWCAP_NEON ) {Could be collapsed into the preceding *if*, and so indentation level made
one less...
I amended this patch with your suggestion and pushed it out.
Russell, if you pulled this already I'll just send you a fixup patch in that case.
Nicolas
Quoted 6 lines · Nicolas Pitre
Russell, could you please pull:
git://git.linaro.org/kernel/linux-linaro-next.gitfor_rmkThis contains 2 patches to allow i.MX51 code to disable Neon on those revisions where it is broken, and so in a generic way.
Ping.
Nicolas