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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Dec 23 12:57:15 2012 +0100

x86: force noxsave

We don't handle the extended processor state yet. Disable xsave/xrstor
to keep a correct behavior.

---

 include/asm-x86/ipipe/setup.h |   17 +++++++++++++++++
 scripts/prepare-kernel.sh     |    4 ++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/ipipe/setup.h b/include/asm-x86/ipipe/setup.h
new file mode 100644
index 0000000..144300b
--- /dev/null
+++ b/include/asm-x86/ipipe/setup.h
@@ -0,0 +1,17 @@
+#ifndef _XENO_ASM_X86_IPIPE_SETUP_H
+#define _XENO_ASM_X86_IPIPE_SETUP_H
+
+#include <asm/processor.h>
+
+#ifdef cpu_has_xsave
+
+static inline void __ipipe_early_client_setup(void)
+{
+       setup_clear_cpu_cap(X86_FEATURE_XSAVE);
+       setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
+       printk(KERN_INFO "Xenomai: forcing noxsave");
+}
+
+#endif /* cpu_has_xsave */
+
+#endif /* !_XENO_ASM_X86_IPIPE_SETUP_H */
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 2e9509b..f617634 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -601,6 +601,10 @@ for d in include/* ; do
         patch_link r n $d $destdir
     fi
 done
+if test -r $linux_tree/arch/$linux_arch/include/asm/ipipe.h
+then
+    patch_link n n include/asm-$xenomai_arch/ipipe 
arch/$linux_arch/include/ipipe
+fi
 
 if test "x$output_patch" != "x"; then
     if test x$verbose = x1; then


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

Reply via email to