All of lore.kernel.org
 help / color / mirror / Atom feed
* Git pull request: disable Neon on old i.MX51
@ 2010-09-07 20:18 Nicolas Pitre
  2010-09-07 20:18 ` [PATCH 1/2] ARM: link board specific files after core files Nicolas Pitre
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nicolas Pitre @ 2010-09-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ARM: link board specific files after core files
  2010-09-07 20:18 Git pull request: disable Neon on old i.MX51 Nicolas Pitre
@ 2010-09-07 20:18 ` Nicolas Pitre
  2010-09-07 20:18 ` [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon Nicolas Pitre
  2010-09-20  3:16 ` Git pull request: disable Neon on old i.MX51 Nicolas Pitre
  2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pitre @ 2010-09-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

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.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Dave Martin <dave.martin@linaro.org>
Tested-by: Jason Hui <jason.hui@linaro.org>
---
 arch/arm/Makefile |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 64ba313..1373bfe 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -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)
-- 
1.7.2.2.440.g49ea7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
  2010-09-07 20:18 Git pull request: disable Neon on old i.MX51 Nicolas Pitre
  2010-09-07 20:18 ` [PATCH 1/2] ARM: link board specific files after core files Nicolas Pitre
@ 2010-09-07 20:18 ` Nicolas Pitre
  2010-09-08 14:00   ` Sergei Shtylyov
  2010-09-20  3:16 ` Git pull request: disable Neon on old i.MX51 Nicolas Pitre
  2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2010-09-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

From: Amit Kucheria <amit.kucheria@verdurent.com>

Versions of silicon older than TO3 have broken NEON implementation. Turn off
NEON in such cases.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Dave Martin <dave.martin@linaro.org>
Tested-by: Jason Hui <jason.hui@linaro.org>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-mx5/cpu.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
index 2d37785..548c55b 100644
--- a/arch/arm/mach-mx5/cpu.c
+++ b/arch/arm/mach-mx5/cpu.c
@@ -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;
-- 
1.7.2.2.440.g49ea7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
  2010-09-07 20:18 ` [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon Nicolas Pitre
@ 2010-09-08 14:00   ` Sergei Shtylyov
  2010-09-08 17:46     ` Nicolas Pitre
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2010-09-08 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Nicolas Pitre wrote:

> From: Amit Kucheria <amit.kucheria@verdurent.com>

> Versions of silicon older than TO3 have broken NEON implementation. Turn off
> NEON in such cases.

> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> Tested-by: Dave Martin <dave.martin@linaro.org>
> Tested-by: Jason Hui <jason.hui@linaro.org>
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
>  arch/arm/mach-mx5/cpu.c |   19 +++++++++++++++++++
>  1 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
> index 2d37785..548c55b 100644
> --- a/arch/arm/mach-mx5/cpu.c
> +++ b/arch/arm/mach-mx5/cpu.c
> @@ -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) {

   Too many spaces after '<'?

> +		if (elf_hwcap & HWCAP_NEON) {

    Could be collapsed into the preceding *if*, and so indentation level made 
one less...

> +			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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
  2010-09-08 14:00   ` Sergei Shtylyov
@ 2010-09-08 17:46     ` Nicolas Pitre
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pitre @ 2010-09-08 17:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 8 Sep 2010, Sergei Shtylyov wrote:

> Hello.
> 
> Nicolas Pitre wrote:
> 
> > From: Amit Kucheria <amit.kucheria@verdurent.com>
> 
> > Versions of silicon older than TO3 have broken NEON implementation. Turn off
> > NEON in such cases.
> 
> > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> > Tested-by: Dave Martin <dave.martin@linaro.org>
> > Tested-by: Jason Hui <jason.hui@linaro.org>
> > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > ---
> >  arch/arm/mach-mx5/cpu.c |   19 +++++++++++++++++++
> >  1 files changed, 19 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
> > index 2d37785..548c55b 100644
> > --- a/arch/arm/mach-mx5/cpu.c
> > +++ b/arch/arm/mach-mx5/cpu.c
> > @@ -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) {
> 
>   Too many spaces after '<'?

Yup.

> > +		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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Git pull request: disable Neon on old i.MX51
  2010-09-07 20:18 Git pull request: disable Neon on old i.MX51 Nicolas Pitre
  2010-09-07 20:18 ` [PATCH 1/2] ARM: link board specific files after core files Nicolas Pitre
  2010-09-07 20:18 ` [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon Nicolas Pitre
@ 2010-09-20  3:16 ` Nicolas Pitre
  2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pitre @ 2010-09-20  3:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 7 Sep 2010, Nicolas Pitre wrote:

> 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.

Ping.


Nicolas

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-20  3:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 20:18 Git pull request: disable Neon on old i.MX51 Nicolas Pitre
2010-09-07 20:18 ` [PATCH 1/2] ARM: link board specific files after core files Nicolas Pitre
2010-09-07 20:18 ` [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon Nicolas Pitre
2010-09-08 14:00   ` Sergei Shtylyov
2010-09-08 17:46     ` Nicolas Pitre
2010-09-20  3:16 ` Git pull request: disable Neon on old i.MX51 Nicolas Pitre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.