]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[S390] Fix __ctl_load/__ctl_store inline assembly constraints
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 10 Jun 2008 08:03:24 +0000 (10:03 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 10 Jun 2008 08:03:28 +0000 (10:03 +0200)
__ctl_load/__ctl_store are called with either an array of unsigned long or
a single unsigned long value. Add an address operator to the "m"/"=m"
contraints to make them work for unsigned long arguments as well.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
include/asm-s390/system.h

index e0d4500d5f95c14478205c60269849a8d5852ace..819e7d99ca0c4b0180c4909f0c911c7a810a9988 100644 (file)
@@ -315,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
        asm volatile(                                           \
                "       lctlg   %1,%2,0(%0)\n"                  \
                : : "a" (&array), "i" (low), "i" (high),        \
-                   "m" (*(addrtype *)(array)));                \
+                   "m" (*(addrtype *)(&array)));               \
        })
 
 #define __ctl_store(array, low, high) ({                       \
        typedef struct { char _[sizeof(array)]; } addrtype;     \
        asm volatile(                                           \
                "       stctg   %2,%3,0(%1)\n"                  \
-               : "=m" (*(addrtype *)(array))                   \
+               : "=m" (*(addrtype *)(&array))                  \
                : "a" (&array), "i" (low), "i" (high));         \
        })
 
@@ -333,14 +333,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
        asm volatile(                                           \
                "       lctl    %1,%2,0(%0)\n"                  \
                : : "a" (&array), "i" (low), "i" (high),        \
-                   "m" (*(addrtype *)(array)));                \
+                   "m" (*(addrtype *)(&array)));               \
 })
 
 #define __ctl_store(array, low, high) ({                       \
        typedef struct { char _[sizeof(array)]; } addrtype;     \
        asm volatile(                                           \
                "       stctl   %2,%3,0(%1)\n"                  \
-               : "=m" (*(addrtype *)(array))                   \
+               : "=m" (*(addrtype *)(&array))                  \
                : "a" (&array), "i" (low), "i" (high));         \
        })