Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   UBUNTU: SAUCE: IMX51: only export NEON flag to userspace on Freescale iMX51 rev3.x or later silicon (http://www.linux-archive.org/ubuntu-kernel-team/315640-ubuntu-sauce-imx51-only-export-neon-flag-userspace-freescale-imx51-rev3-x-later-silicon.html)

Bryan Wu 01-27-2010 04:00 AM

UBUNTU: SAUCE: IMX51: only export NEON flag to userspace on Freescale iMX51 rev3.x or later silicon
 
BugLink: http://bugs.launchpad.net/bugs/507416

NEON function is broken on old Freescale iMX51 silicons, such as rev1.x and
rev2.x. Since more and more iMX51 based products will move to rev3.x or later
silicon, we need to enable NEON on these newer silicons and disable NEON on
those old ones.

This patch will detect the silicon revision dynamically and only export NEON
flag to userspace on Freescale iMX51 rev3.x or later silicon. It was tested on
Babbage 3.0 board and Babbage 2.x board.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
---
arch/arm/vfp/vfpmodule.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 2d7423a..e0d6b01 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -432,6 +432,10 @@ out:

#include <linux/smp.h>

+#if defined(CONFIG_ARCH_MX51) && defined(CONFIG_NEON)
+#include <mach/hardware.h>
+#endif
+
/*
* VFP support code initialisation.
*/
@@ -498,7 +502,8 @@ static int __init vfp_init(void)
* load/store instructions, integer and single
* precision floating point operations.
*/
- if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
+ if (((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
+ && cpu_is_mx51_rev(CHIP_REV_3_0) > 0)
elf_hwcap |= HWCAP_NEON;
#endif
}
--
1.6.3.3


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 02:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.