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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Dec 26 10:39:53 2012 +0100

x86: force noxsave only when xsave is present

---

 include/asm-x86/ipipe/setup.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/asm-x86/ipipe/setup.h b/include/asm-x86/ipipe/setup.h
index 231aa6b..baed275 100644
--- a/include/asm-x86/ipipe/setup.h
+++ b/include/asm-x86/ipipe/setup.h
@@ -10,9 +10,11 @@
  */
 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");
+       if (cpu_has_xsave) {
+               setup_clear_cpu_cap(X86_FEATURE_XSAVE);
+               setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
+               printk(KERN_INFO "Xenomai: forcing noxsave");
+       }
 }
 
 #endif /* cpu_has_xsave */


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

Reply via email to