Skip to contentSkip to conversation

s390: Add missing memory constraint to stcrw().

PATCH New Heiko Carstens 1 participant 1 message Jan 23, 2006 s390

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 s390: Add missing memory constraint to stcrw().

From: Peter Oberparleiter <[email protected]>

Add missing memory constraint to stcrw() inline assembly.

---

 drivers/s390/s390mach.h |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
drivers/s390/s390mach.h +9 -8
diff -urpN linux-2.6/drivers/s390/s390mach.h linux-2.6-patched/drivers/s390/s390mach.h
@@ -90,15 +90,16 @@ struct crw {
 
 static inline int stcrw(struct crw *pcrw )
 {
-        int ccode;
+	int ccode;
 
-        __asm__ __volatile__(
-                "STCRW 0(%1)\n\t"
-                "IPM %0\n\t"
-                "SRL %0,28\n\t"
-                : "=d" (ccode) : "a" (pcrw)
-                : "cc", "1" );
-        return ccode;
+	__asm__ __volatile__(
+		"stcrw 0(%2)\n\t"
+		"ipm %0\n\t"
+		"srl %0,28\n\t"
+		: "=d" (ccode), "=m" (*pcrw)
+		: "a" (pcrw)
+		: "cc" );
+	return ccode;
 }
 
 #endif /* __s390mach */