lkml.org 
[lkml]   [2008]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 3/3] 64-bit futexes: x86 support

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

> This patch adds 64-bit futex support for x86. As explained in the
> introduction, this requires a new system call. The remaining changes
> are similarly to the x86-64 changes: enable support for FUTEX_WAKE_OP.

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


\
 
 \ /
  Last update: 2008-06-02 10:25    [W:0.052 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site