summaryrefslogtreecommitdiff
path: root/include/asm-s390/system.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2005-03-07 17:43:28 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-07 17:43:28 -0800
commitfc6fcffc7d3fc84d8895848885aefdb1e66812ec (patch)
tree642be16341addb162193936b5613d1818b5d0305 /include/asm-s390/system.h
parent43816472f92ab49da06001659a77042ae9c38463 (diff)
[PATCH] s390: gcc4 compile fixes.
Make s390 compile and work with gcc4. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-s390/system.h')
-rw-r--r--include/asm-s390/system.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index 037b8d16e435..81514d76edcf 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -335,19 +335,23 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
__asm__ __volatile__("lpswe 0(%0)" : : "a" (&psw), "m" (psw) : "cc" );
#define __ctl_load(array, low, high) ({ \
+ typedef struct { char _[sizeof(array)]; } addrtype; \
__asm__ __volatile__ ( \
" bras 1,0f\n" \
" lctlg 0,0,0(%0)\n" \
"0: ex %1,0(1)" \
- : : "a" (&array), "a" (((low)<<4)+(high)) : "1" ); \
+ : : "a" (&array), "a" (((low)<<4)+(high)), \
+ "m" (*(addrtype *)(array)) : "1" ); \
})
#define __ctl_store(array, low, high) ({ \
+ typedef struct { char _[sizeof(array)]; } addrtype; \
__asm__ __volatile__ ( \
" bras 1,0f\n" \
" stctg 0,0,0(%1)\n" \
"0: ex %2,0(1)" \
- : "=m" (array) : "a" (&array), "a" (((low)<<4)+(high)) : "1" ); \
+ : "=m" (*(addrtype *)(array)) \
+ : "a" (&array), "a" (((low)<<4)+(high)) : "1" ); \
})
#define __ctl_set_bit(cr, bit) ({ \
@@ -390,19 +394,23 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
__asm__ __volatile__("lpsw 0(%0)" : : "a" (&psw) : "cc" );
#define __ctl_load(array, low, high) ({ \
+ typedef struct { char _[sizeof(array)]; } addrtype; \
__asm__ __volatile__ ( \
" bras 1,0f\n" \
" lctl 0,0,0(%0)\n" \
"0: ex %1,0(1)" \
- : : "a" (&array), "a" (((low)<<4)+(high)) : "1" ); \
+ : : "a" (&array), "a" (((low)<<4)+(high)), \
+ "m" (*(addrtype *)(array)) : "1" ); \
})
#define __ctl_store(array, low, high) ({ \
+ typedef struct { char _[sizeof(array)]; } addrtype; \
__asm__ __volatile__ ( \
" bras 1,0f\n" \
" stctl 0,0,0(%1)\n" \
"0: ex %2,0(1)" \
- : "=m" (array) : "a" (&array), "a" (((low)<<4)+(high)): "1" ); \
+ : "=m" (*(addrtype *)(array)) \
+ : "a" (&array), "a" (((low)<<4)+(high)): "1" ); \
})
#define __ctl_set_bit(cr, bit) ({ \