On Mon, 2008-06-09 at 10:33 +0200, Martin Schwidefsky wrote: > I'll add this patch to the queue for 2.6.26 and have to think about some > more fixes. The patch below should fix the problem with unsigned long arguments instead of arrays of unsigned long. Could you test if your gcc still crashes with the patch (but without yours)? -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. --- Subject: [PATCH] Fix __ctl_load/__ctl_store inline assembly constraints From: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> __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@xxxxxxxxxx> --- include/asm-s390/system.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -urpN linux-2.6/include/asm-s390/system.h linux-2.6-patched/include/asm-s390/system.h --- linux-2.6/include/asm-s390/system.h 2008-06-09 11:07:18.000000000 +0200 +++ linux-2.6-patched/include/asm-s390/system.h 2008-06-09 11:07:25.000000000 +0200 @@ -315,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned l 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 l 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)); \ }) -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html