+ s390-futex-atomic-operations-part-2.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     s390: futex atomic operations part 2

has been added to the -mm tree.  Its filename is

     s390-futex-atomic-operations-part-2.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>

Add missing primitive futex_atomic_cmpxchg_inatomic.  Remove incorrect type
cast of uaddr memory constraint from __futex_atomic_op.

Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/asm-s390/futex.h |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff -puN include/asm-s390/futex.h~s390-futex-atomic-operations-part-2 include/asm-s390/futex.h
--- 25/include/asm-s390/futex.h~s390-futex-atomic-operations-part-2	Wed Apr 26 14:16:15 2006
+++ 25-akpm/include/asm-s390/futex.h	Wed Apr 26 14:16:15 2006
@@ -30,9 +30,9 @@
 		     "2:\n"						\
 		     __futex_atomic_fixup				\
 		     : "=d" (ret), "=&d" (oldval), "=&d" (newval),	\
-		       "=m" (*(unsigned long __user *) uaddr)		\
+		       "=m" (*uaddr)					\
 		     : "0" (-EFAULT), "d" (oparg), "a" (uaddr),		\
-		       "m" (*(unsigned long __user *) uaddr) : "cc" );
+		       "m" (*uaddr) : "cc" );
 
 static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
 {
@@ -90,5 +90,32 @@ static inline int futex_atomic_op_inuser
 	return ret;
 }
 
+static inline int
+futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
+{
+	int ret;
+
+	if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
+		return -EFAULT;
+	asm volatile("   cs   %1,%4,0(%5)\n"
+		     "0: lr   %0,%1\n"
+		     "1:\n"
+#ifndef __s390x__
+		     ".section __ex_table,\"a\"\n"
+		     "   .align 4\n"
+		     "   .long  0b,1b\n"
+		     ".previous"
+#else /* __s390x__ */
+		     ".section __ex_table,\"a\"\n"
+		     "   .align 8\n"
+		     "   .quad  0b,1b\n"
+		     ".previous"
+#endif /* __s390x__ */
+		     : "=d" (ret), "+d" (oldval), "=m" (*uaddr)
+		     : "0" (-EFAULT), "d" (newval), "a" (uaddr), "m" (*uaddr)
+		     : "cc", "memory" );
+	return oldval;
+}
+
 #endif /* __KERNEL__ */
 #endif /* _ASM_S390_FUTEX_H */
_

Patches currently in -mm which might be from schwidefsky@xxxxxxxxxx are

s390-make-qeth-buildable.patch
s390-fix-i-o-termination-race-in-cio.patch
s390-enable-interrupts-on-error-path.patch
s390-bug-in-setup_rt_frame.patch
s390-alternate-signal-stack-handling-bug.patch
s390-qdio-memory-allocations.patch
s390-dasd-ioctl-never-returns.patch
s390-fix-slab-debugging.patch
s390-futex-atomic-operations.patch
s390-futex-atomic-operations-part-2.patch
s390-tape-3590-changes.patch
s390-segment-operation-error-codes.patch
s390-instruction-processing-damage-handling.patch
s390-add-read_mostly-optimization.patch
s390-dasd-device-identifiers.patch
s390-statistics-infrastructure.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux