FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-27-2010, 04:00 AM
Bryan Wu
 
Default 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
 

Thread Tools




All times are GMT. The time now is 08:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org