Re: [PATCH 3/3] 64-bit futexes: x86 support

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ulrich Drepper <drepper@...>
Cc: <linux-kernel@...>, <akpm@...>, <mtk.manpages@...>, <torvalds@...>, <x86@...>
Date: Monday, June 2, 2008 - 4:22 am

* Ulrich Drepper <drepper@redhat.com> wrote:


great work - the first two patches look good and we've created a new 
-tip topic branch for it, tip/core/futex-64bit.

but this 32-bit x86 patch has problems, it needed 3 fixes to even build 
(see below), then it stopped with various failures related to the 
assembly constraints:

  kernel/futex.c: In function 'do_futex':
  include/asm/futex.h:155: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
  [...]

	Ingo

-------------------->
Subject: 64 bit futexes: fixes
From: Ingo Molnar <mingo@elte.hu>
Date: Mon Jun 02 10:07:08 CEST 2008

- various build fixes on 32-bit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/sys_i386_32.c |    1 +
 include/asm-x86/futex.h       |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Index: linux/arch/x86/kernel/sys_i386_32.c
===================================================================
--- linux.orig/arch/x86/kernel/sys_i386_32.c
+++ linux/arch/x86/kernel/sys_i386_32.c
@@ -18,6 +18,7 @@
 #include <linux/file.h>
 #include <linux/utsname.h>
 #include <linux/ipc.h>
+#include <linux/futex.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
Index: linux/include/asm-x86/futex.h
===================================================================
--- linux.orig/include/asm-x86/futex.h
+++ linux/include/asm-x86/futex.h
@@ -65,7 +65,7 @@
 		     _ASM_EXTABLE(1b, 5b)			\
 		     _ASM_EXTABLE(2b, 5b)			\
 		     _ASM_EXTABLE(3b, 5b)			\
-		     : "=&a" (oldvaltemp1), "=&d" (oldvaltmep2),\
+		     : "=&a" (oldvaltemp1), "=&d" (oldvaltemp2),\
 		       "=&r" (ret),				\
 		       "+m" (((u32 __user *) uaddr)[0]),	\
 		       "+m" (((u32 __user *) uaddr)[1]),	\
@@ -127,7 +127,7 @@ static inline int futex_atomic_op_inuser
 #ifdef CONFIG_X86_32
 	/* Not all 32-bit machines support 8-byte cmpxchg.  We just
 	   unconditionally perform a runtime check for the feature.  */
-	if ((op & FUTEX_FLAG_64) && !boot_cpu_has(X86_FEATURE_CX8))
+	if ((op & FUTEX_64_FLAG) && !boot_cpu_has(X86_FEATURE_CX8))
 		return -ENOSYS;
 #endif
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] 64-bit futexes: x86 support, Ulrich Drepper, (Fri May 30, 9:27 pm)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Ingo Molnar, (Mon Jun 2, 4:22 am)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Ingo Molnar, (Mon Jun 2, 2:43 pm)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Linus Torvalds, (Fri May 30, 10:25 pm)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Ulrich Drepper, (Fri May 30, 11:18 pm)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Linus Torvalds, (Fri May 30, 11:59 pm)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Ulrich Drepper, (Sat May 31, 12:25 am)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Linus Torvalds, (Sat May 31, 12:34 am)
Re: [PATCH 3/3] 64-bit futexes: x86 support, Ulrich Drepper, (Sat May 31, 12:45 am)
Re: [PATCH 3/3] 64-bit futexes: x86 support, David Miller, (Sat May 31, 3:47 am)