From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
Date: Wed, 08 Sep 2010 18:00:06 +0400 [thread overview]
Message-ID: <4C8796E6.3010905@ru.mvista.com> (raw)
In-Reply-To: <1283890733-6548-3-git-send-email-nico@fluxnic.net>
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
next prev parent reply other threads:[~2010-09-08 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-09-08 17:46 ` Nicolas Pitre
2010-09-20 3:16 ` Git pull request: disable Neon on old i.MX51 Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C8796E6.3010905@ru.mvista.com \
--to=sshtylyov@mvista.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).