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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Mon Jul 20 08:41:04 2009 +0200

x86-64: Work around gcc issues with populating syscall registers

gcc-4.1.3 of kubuntu has problem with proper syscall register
initialization in rt_task_shadow if TLS is enabled. But it is likely
that more compiler versions below 4.3 and more configuration variants
are affected.

This patch installs a workaround for these gcc versions which places an
optimization barrier before the register variable setup. This forces gcc
to actually load the registers.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-x86/syscall_64.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/syscall_64.h b/include/asm-x86/syscall_64.h
index adaa40b..53d76e4 100644
--- a/include/asm-x86/syscall_64.h
+++ b/include/asm-x86/syscall_64.h
@@ -82,7 +82,11 @@ static inline int __xn_interrupted_p(struct pt_regs *regs)
  * in kernel space.
  */
 
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+#define LOAD_ARGS_0()  asm volatile ("" : /* */ : /* */ : "memory");
+#else
 #define LOAD_ARGS_0()
+#endif
 #define LOAD_REGS_0
 #define ASM_ARGS_0
 


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

Reply via email to