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

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 |   20 ++++++++++++++++++++
 scripts/prepare-kernel.sh     |    5 +++++
 2 files changed, 25 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..231aa6b
--- /dev/null
+++ b/include/asm-x86/ipipe/setup.h
@@ -0,0 +1,20 @@
+#ifndef _XENO_ASM_X86_IPIPE_SETUP_H
+#define _XENO_ASM_X86_IPIPE_SETUP_H
+
+#include <asm/processor.h>
+
+#ifdef cpu_has_xsave
+/*
+ * We don't handle the extended processor state yet. Disable
+ * xsave/xrstor to keep a correct behavior.
+ */
+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..36f9a4a 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -601,6 +601,11 @@ 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 -a \
+    -d $xenomai_root/include/asm-$xenomai_arch/ipipe
+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