]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: change asm constraint.
authorGlauber Costa <gcosta@redhat.com>
Mon, 30 Jun 2008 20:07:51 +0000 (17:07 -0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Jul 2008 07:14:14 +0000 (09:14 +0200)
Our integration efforts broke a build with this function being used
with i386. Reason is "g" can put the operand in an imm32, which according
to The Book (tm), is invalid as the second operand.

This is actually a bug
in x86_64 too, since the x86_64 instruction set reference does not list
it as valid.

We probably didn't trigger this before due to the ammount of
registers available for 64-bit platforms. But that's just my guess.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/uaccess_64.h

index 012cba3972d72e1514d73eee0b7bdbc44346c1a5..dc6dde0583811c15918d6b0055efe2c4d498cf17 100644 (file)
@@ -44,7 +44,7 @@
        asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0"             \
            : "=&r" (flag), "=r" (roksum)                               \
            : "1" (addr), "g" ((long)(size)),                           \
-             "g" (current_thread_info()->addr_limit.seg));             \
+             "rm" (current_thread_info()->addr_limit.seg));            \
        flag;                                                           \
 })