Module: xenomai-rpm
Branch: queue/mayday
Commit: 1a57534d5b7224510c83d6e14d14145004acc27a
URL:    
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=1a57534d5b7224510c83d6e14d14145004acc27a

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed May 26 12:12:45 2010 +0200

x86: update fpu state accessor for 2.6.35+

---

 include/asm-x86/wrappers_32.h |    5 ++++-
 include/asm-x86/wrappers_64.h |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/asm-x86/wrappers_32.h b/include/asm-x86/wrappers_32.h
index f738dc4..5f37766 100644
--- a/include/asm-x86/wrappers_32.h
+++ b/include/asm-x86/wrappers_32.h
@@ -219,9 +219,12 @@ typedef irq_handler_t rthal_irq_host_handler_t;
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,25)
 typedef union i387_union x86_fpustate;
 #define x86_fpustate_ptr(t) (&(t)->i387)
-#else
+#elif LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
 typedef union thread_xstate x86_fpustate;
 #define x86_fpustate_ptr(t) ((t)->xstate)
+#else /* 2.6.35 and above */
+typedef union thread_xstate x86_fpustate;
+#define x86_fpustate_ptr(t) ((t)->fpu.state)
 #endif
 
 #endif /* _XENO_ASM_X86_WRAPPERS_32_H */
diff --git a/include/asm-x86/wrappers_64.h b/include/asm-x86/wrappers_64.h
index 346cf71..a61f6ba 100644
--- a/include/asm-x86/wrappers_64.h
+++ b/include/asm-x86/wrappers_64.h
@@ -70,9 +70,12 @@ typedef irq_handler_t rthal_irq_host_handler_t;
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,25)
 typedef union i387_union x86_fpustate;
 #define x86_fpustate_ptr(t) (&(t)->i387)
-#else
+#elif LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
 typedef union thread_xstate x86_fpustate;
 #define x86_fpustate_ptr(t) ((t)->xstate)
+#else /* 2.6.35 and above */
+typedef union thread_xstate x86_fpustate;
+#define x86_fpustate_ptr(t) ((t)->fpu.state)
 #endif
 
 #endif /* _XENO_ASM_X86_WRAPPERS_64_H */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to