Module: xenomai-2.6
Branch: master
Commit: b1ac2bc5deec9ff26149edeedfa59c78612a27bf
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=b1ac2bc5deec9ff26149edeedfa59c78612a27bf

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Fri Jan 10 02:28:28 2014 +0100

hal/arm: avoid using VFP instructions on SOCs without VFP

---

 doc/asciidoc/TROUBLESHOOTING.adoc |   15 +++++++++++++++
 ksrc/arch/arm/hal.c               |   13 ++++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/doc/asciidoc/TROUBLESHOOTING.adoc 
b/doc/asciidoc/TROUBLESHOOTING.adoc
index 433be63..71edd57 100644
--- a/doc/asciidoc/TROUBLESHOOTING.adoc
+++ b/doc/asciidoc/TROUBLESHOOTING.adoc
@@ -243,6 +243,21 @@ IMPORTANT: Disabling +AMD K8 Cool&Quiet+ option in a BIOS 
does not
 solve the problem.
 
 
+On ARM
+^^^^^^
+
+If you see the following message:
+
+----------------------------------------------------------------
+Xenomai: hal/arm: hardware FPU support enabled but not available
+----------------------------------------------------------------
+
+It means that you enabled CONFIG_VFP and CONFIG_XENO_HW_FPU in the
+kernel configuration, but the processor on which you are running the
+kernel has no support for VFP. In that case, you have to recompile the
+kernel with CONFIG_XENO_HW_FPU disabled.
+
+
 On other supported platforms
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/ksrc/arch/arm/hal.c b/ksrc/arch/arm/hal.c
index 2a48012..32dcc66 100644
--- a/ksrc/arch/arm/hal.c
+++ b/ksrc/arch/arm/hal.c
@@ -44,6 +44,7 @@
 #include <asm/unistd.h>
 #include <asm/xenomai/hal.h>
 #include <asm/cacheflush.h>
+#include <asm/system_info.h>
 #ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
 #endif /* CONFIG_PROC_FS */
@@ -538,7 +539,17 @@ RTHAL_DECLARE_DOMAIN(rthal_domain_entry);
 
 int rthal_arch_init(void)
 {
-       int ret = rthal_tickdev_select();
+       int ret;
+
+#if defined(CONFIG_XENO_HW_FPU) && defined(CONFIG_VFP)
+       if (cpu_architecture() < CPU_ARCH_ARMv6) {
+               printk(KERN_ERR "Xenomai: hal/arm: hardware FPU support enabled"
+                       " but not available\n");
+               return -ENODEV;
+       }
+#endif /* CONFIG_VFP && CONFIG_XENO_OPT_HW_FPU */
+
+       ret = rthal_tickdev_select();
        if (ret < 0)
                return ret;
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to