All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: paulus@au.ibm.com, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org, akpm@linux-foundation.org,
	linuxppc-dev@lists.ozlabs.org, David Miller <davem@davemloft.net>
Subject: [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation to asm-generic
Date: Fri, 20 Aug 2010 15:14:55 +1000	[thread overview]
Message-ID: <1282281295.22370.401.camel@pasglop> (raw)
In-Reply-To: <20100818.222925.233689776.davem@davemloft.net>

Other architectures who support cmpxchg and atomic_long can
use that directly.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/rwsem.h    |  184 +----------------------------------
 include/asm-generic/rwsem-cmpxchg.h |  183 ++++++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+), 183 deletions(-)
 create mode 100644 include/asm-generic/rwsem-cmpxchg.h

diff --git a/arch/powerpc/include/asm/rwsem.h b/arch/powerpc/include/asm/rwsem.h
index 8447d89..1237ad6 100644
--- a/arch/powerpc/include/asm/rwsem.h
+++ b/arch/powerpc/include/asm/rwsem.h
@@ -1,183 +1 @@
-#ifndef _ASM_POWERPC_RWSEM_H
-#define _ASM_POWERPC_RWSEM_H
-
-#ifndef _LINUX_RWSEM_H
-#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
-#endif
-
-#ifdef __KERNEL__
-
-/*
- * R/W semaphores for PPC using the stuff in lib/rwsem.c.
- * Adapted largely from include/asm-i386/rwsem.h
- * by Paul Mackerras <paulus@samba.org>.
- */
-
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <asm/atomic.h>
-#include <asm/system.h>
-
-/*
- * the semaphore definition
- */
-#ifdef CONFIG_PPC64
-# define RWSEM_ACTIVE_MASK		0xffffffffL
-#else
-# define RWSEM_ACTIVE_MASK		0x0000ffffL
-#endif
-
-#define RWSEM_UNLOCKED_VALUE		0x00000000L
-#define RWSEM_ACTIVE_BIAS		0x00000001L
-#define RWSEM_WAITING_BIAS		(-RWSEM_ACTIVE_MASK-1)
-#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
-#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
-
-struct rw_semaphore {
-	long			count;
-	spinlock_t		wait_lock;
-	struct list_head	wait_list;
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-	struct lockdep_map	dep_map;
-#endif
-};
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
-#else
-# define __RWSEM_DEP_MAP_INIT(lockname)
-#endif
-
-#define __RWSEM_INITIALIZER(name)				\
-{								\
-	RWSEM_UNLOCKED_VALUE,					\
-	__SPIN_LOCK_UNLOCKED((name).wait_lock),			\
-	LIST_HEAD_INIT((name).wait_list)			\
-	__RWSEM_DEP_MAP_INIT(name)				\
-}
-
-#define DECLARE_RWSEM(name)		\
-	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
-
-extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
-
-extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
-			 struct lock_class_key *key);
-
-#define init_rwsem(sem)					\
-	do {						\
-		static struct lock_class_key __key;	\
-							\
-		__init_rwsem((sem), #sem, &__key);	\
-	} while (0)
-
-/*
- * lock for reading
- */
-static inline void __down_read(struct rw_semaphore *sem)
-{
-	if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
-		rwsem_down_read_failed(sem);
-}
-
-static inline int __down_read_trylock(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	while ((tmp = sem->count) >= 0) {
-		if (tmp == cmpxchg(&sem->count, tmp,
-				   tmp + RWSEM_ACTIVE_READ_BIAS)) {
-			return 1;
-		}
-	}
-	return 0;
-}
-
-/*
- * lock for writing
- */
-static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
-{
-	long tmp;
-
-	tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
-				     (atomic_long_t *)&sem->count);
-	if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
-		rwsem_down_write_failed(sem);
-}
-
-static inline void __down_write(struct rw_semaphore *sem)
-{
-	__down_write_nested(sem, 0);
-}
-
-static inline int __down_write_trylock(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
-		      RWSEM_ACTIVE_WRITE_BIAS);
-	return tmp == RWSEM_UNLOCKED_VALUE;
-}
-
-/*
- * unlock after reading
- */
-static inline void __up_read(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
-	if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0))
-		rwsem_wake(sem);
-}
-
-/*
- * unlock after writing
- */
-static inline void __up_write(struct rw_semaphore *sem)
-{
-	if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
-				 (atomic_long_t *)&sem->count) < 0))
-		rwsem_wake(sem);
-}
-
-/*
- * implement atomic add functionality
- */
-static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
-{
-	atomic_long_add(delta, (atomic_long_t *)&sem->count);
-}
-
-/*
- * downgrade write lock to read lock
- */
-static inline void __downgrade_write(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
-				     (atomic_long_t *)&sem->count);
-	if (tmp < 0)
-		rwsem_downgrade_wake(sem);
-}
-
-/*
- * implement exchange and add functionality
- */
-static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
-{
-	return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
-}
-
-static inline int rwsem_is_locked(struct rw_semaphore *sem)
-{
-	return sem->count != 0;
-}
-
-#endif	/* __KERNEL__ */
-#endif	/* _ASM_POWERPC_RWSEM_H */
+#include <asm-generic/rwsem-cmpxchg.h>
diff --git a/include/asm-generic/rwsem-cmpxchg.h b/include/asm-generic/rwsem-cmpxchg.h
new file mode 100644
index 0000000..2b1c859
--- /dev/null
+++ b/include/asm-generic/rwsem-cmpxchg.h
@@ -0,0 +1,183 @@
+#ifndef _RWSEM_CMPXCHG_H
+#define _RWSEM_CMPXCHG_H
+
+#ifndef _LINUX_RWSEM_H
+#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
+#endif
+
+#ifdef __KERNEL__
+
+/*
+ * Generic R/W semaphores the stuff in lib/rwsem.c.
+ * Adapted largely from include/asm-i386/rwsem.h
+ * by Paul Mackerras <paulus@samba.org>.
+ */
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include <asm/system.h>
+
+/*
+ * the semaphore definition
+ */
+#if BITS_PER_LONG == 64
+# define RWSEM_ACTIVE_MASK		0xffffffffL
+#else
+# define RWSEM_ACTIVE_MASK		0x0000ffffL
+#endif
+
+#define RWSEM_UNLOCKED_VALUE		0x00000000L
+#define RWSEM_ACTIVE_BIAS		0x00000001L
+#define RWSEM_WAITING_BIAS		(-RWSEM_ACTIVE_MASK-1)
+#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
+#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
+
+struct rw_semaphore {
+	long			count;
+	spinlock_t		wait_lock;
+	struct list_head	wait_list;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map	dep_map;
+#endif
+};
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
+#else
+# define __RWSEM_DEP_MAP_INIT(lockname)
+#endif
+
+#define __RWSEM_INITIALIZER(name)				\
+{								\
+	RWSEM_UNLOCKED_VALUE,					\
+	__SPIN_LOCK_UNLOCKED((name).wait_lock),			\
+	LIST_HEAD_INIT((name).wait_list)			\
+	__RWSEM_DEP_MAP_INIT(name)				\
+}
+
+#define DECLARE_RWSEM(name)		\
+	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
+
+extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
+
+extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
+			 struct lock_class_key *key);
+
+#define init_rwsem(sem)					\
+	do {						\
+		static struct lock_class_key __key;	\
+							\
+		__init_rwsem((sem), #sem, &__key);	\
+	} while (0)
+
+/*
+ * lock for reading
+ */
+static inline void __down_read(struct rw_semaphore *sem)
+{
+	if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
+		rwsem_down_read_failed(sem);
+}
+
+static inline int __down_read_trylock(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	while ((tmp = sem->count) >= 0) {
+		if (tmp == cmpxchg(&sem->count, tmp,
+				   tmp + RWSEM_ACTIVE_READ_BIAS)) {
+			return 1;
+		}
+	}
+	return 0;
+}
+
+/*
+ * lock for writing
+ */
+static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
+{
+	long tmp;
+
+	tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
+				     (atomic_long_t *)&sem->count);
+	if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
+		rwsem_down_write_failed(sem);
+}
+
+static inline void __down_write(struct rw_semaphore *sem)
+{
+	__down_write_nested(sem, 0);
+}
+
+static inline int __down_write_trylock(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
+		      RWSEM_ACTIVE_WRITE_BIAS);
+	return tmp == RWSEM_UNLOCKED_VALUE;
+}
+
+/*
+ * unlock after reading
+ */
+static inline void __up_read(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
+	if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0))
+		rwsem_wake(sem);
+}
+
+/*
+ * unlock after writing
+ */
+static inline void __up_write(struct rw_semaphore *sem)
+{
+	if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
+				 (atomic_long_t *)&sem->count) < 0))
+		rwsem_wake(sem);
+}
+
+/*
+ * implement atomic add functionality
+ */
+static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
+{
+	atomic_long_add(delta, (atomic_long_t *)&sem->count);
+}
+
+/*
+ * downgrade write lock to read lock
+ */
+static inline void __downgrade_write(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
+				     (atomic_long_t *)&sem->count);
+	if (tmp < 0)
+		rwsem_downgrade_wake(sem);
+}
+
+/*
+ * implement exchange and add functionality
+ */
+static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
+{
+	return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
+}
+
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+	return sem->count != 0;
+}
+
+#endif	/* __KERNEL__ */
+#endif	/* _RWSEM_CMPXCHG_H */

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: paulus@au.ibm.com, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org, akpm@linux-foundation.org,
	linuxppc-dev@lists.ozlabs.org, David Miller <davem@davemloft.net>
Subject: [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation
Date: Fri, 20 Aug 2010 05:14:55 +0000	[thread overview]
Message-ID: <1282281295.22370.401.camel@pasglop> (raw)
In-Reply-To: <20100818.222925.233689776.davem@davemloft.net>

Other architectures who support cmpxchg and atomic_long can
use that directly.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/rwsem.h    |  184 +----------------------------------
 include/asm-generic/rwsem-cmpxchg.h |  183 ++++++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+), 183 deletions(-)
 create mode 100644 include/asm-generic/rwsem-cmpxchg.h

diff --git a/arch/powerpc/include/asm/rwsem.h b/arch/powerpc/include/asm/rwsem.h
index 8447d89..1237ad6 100644
--- a/arch/powerpc/include/asm/rwsem.h
+++ b/arch/powerpc/include/asm/rwsem.h
@@ -1,183 +1 @@
-#ifndef _ASM_POWERPC_RWSEM_H
-#define _ASM_POWERPC_RWSEM_H
-
-#ifndef _LINUX_RWSEM_H
-#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
-#endif
-
-#ifdef __KERNEL__
-
-/*
- * R/W semaphores for PPC using the stuff in lib/rwsem.c.
- * Adapted largely from include/asm-i386/rwsem.h
- * by Paul Mackerras <paulus@samba.org>.
- */
-
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <asm/atomic.h>
-#include <asm/system.h>
-
-/*
- * the semaphore definition
- */
-#ifdef CONFIG_PPC64
-# define RWSEM_ACTIVE_MASK		0xffffffffL
-#else
-# define RWSEM_ACTIVE_MASK		0x0000ffffL
-#endif
-
-#define RWSEM_UNLOCKED_VALUE		0x00000000L
-#define RWSEM_ACTIVE_BIAS		0x00000001L
-#define RWSEM_WAITING_BIAS		(-RWSEM_ACTIVE_MASK-1)
-#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
-#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
-
-struct rw_semaphore {
-	long			count;
-	spinlock_t		wait_lock;
-	struct list_head	wait_list;
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-	struct lockdep_map	dep_map;
-#endif
-};
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
-#else
-# define __RWSEM_DEP_MAP_INIT(lockname)
-#endif
-
-#define __RWSEM_INITIALIZER(name)				\
-{								\
-	RWSEM_UNLOCKED_VALUE,					\
-	__SPIN_LOCK_UNLOCKED((name).wait_lock),			\
-	LIST_HEAD_INIT((name).wait_list)			\
-	__RWSEM_DEP_MAP_INIT(name)				\
-}
-
-#define DECLARE_RWSEM(name)		\
-	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
-
-extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
-
-extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
-			 struct lock_class_key *key);
-
-#define init_rwsem(sem)					\
-	do {						\
-		static struct lock_class_key __key;	\
-							\
-		__init_rwsem((sem), #sem, &__key);	\
-	} while (0)
-
-/*
- * lock for reading
- */
-static inline void __down_read(struct rw_semaphore *sem)
-{
-	if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
-		rwsem_down_read_failed(sem);
-}
-
-static inline int __down_read_trylock(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	while ((tmp = sem->count) >= 0) {
-		if (tmp = cmpxchg(&sem->count, tmp,
-				   tmp + RWSEM_ACTIVE_READ_BIAS)) {
-			return 1;
-		}
-	}
-	return 0;
-}
-
-/*
- * lock for writing
- */
-static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
-{
-	long tmp;
-
-	tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
-				     (atomic_long_t *)&sem->count);
-	if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
-		rwsem_down_write_failed(sem);
-}
-
-static inline void __down_write(struct rw_semaphore *sem)
-{
-	__down_write_nested(sem, 0);
-}
-
-static inline int __down_write_trylock(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
-		      RWSEM_ACTIVE_WRITE_BIAS);
-	return tmp = RWSEM_UNLOCKED_VALUE;
-}
-
-/*
- * unlock after reading
- */
-static inline void __up_read(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
-	if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) = 0))
-		rwsem_wake(sem);
-}
-
-/*
- * unlock after writing
- */
-static inline void __up_write(struct rw_semaphore *sem)
-{
-	if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
-				 (atomic_long_t *)&sem->count) < 0))
-		rwsem_wake(sem);
-}
-
-/*
- * implement atomic add functionality
- */
-static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
-{
-	atomic_long_add(delta, (atomic_long_t *)&sem->count);
-}
-
-/*
- * downgrade write lock to read lock
- */
-static inline void __downgrade_write(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
-				     (atomic_long_t *)&sem->count);
-	if (tmp < 0)
-		rwsem_downgrade_wake(sem);
-}
-
-/*
- * implement exchange and add functionality
- */
-static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
-{
-	return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
-}
-
-static inline int rwsem_is_locked(struct rw_semaphore *sem)
-{
-	return sem->count != 0;
-}
-
-#endif	/* __KERNEL__ */
-#endif	/* _ASM_POWERPC_RWSEM_H */
+#include <asm-generic/rwsem-cmpxchg.h>
diff --git a/include/asm-generic/rwsem-cmpxchg.h b/include/asm-generic/rwsem-cmpxchg.h
new file mode 100644
index 0000000..2b1c859
--- /dev/null
+++ b/include/asm-generic/rwsem-cmpxchg.h
@@ -0,0 +1,183 @@
+#ifndef _RWSEM_CMPXCHG_H
+#define _RWSEM_CMPXCHG_H
+
+#ifndef _LINUX_RWSEM_H
+#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
+#endif
+
+#ifdef __KERNEL__
+
+/*
+ * Generic R/W semaphores the stuff in lib/rwsem.c.
+ * Adapted largely from include/asm-i386/rwsem.h
+ * by Paul Mackerras <paulus@samba.org>.
+ */
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include <asm/system.h>
+
+/*
+ * the semaphore definition
+ */
+#if BITS_PER_LONG = 64
+# define RWSEM_ACTIVE_MASK		0xffffffffL
+#else
+# define RWSEM_ACTIVE_MASK		0x0000ffffL
+#endif
+
+#define RWSEM_UNLOCKED_VALUE		0x00000000L
+#define RWSEM_ACTIVE_BIAS		0x00000001L
+#define RWSEM_WAITING_BIAS		(-RWSEM_ACTIVE_MASK-1)
+#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
+#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
+
+struct rw_semaphore {
+	long			count;
+	spinlock_t		wait_lock;
+	struct list_head	wait_list;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map	dep_map;
+#endif
+};
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
+#else
+# define __RWSEM_DEP_MAP_INIT(lockname)
+#endif
+
+#define __RWSEM_INITIALIZER(name)				\
+{								\
+	RWSEM_UNLOCKED_VALUE,					\
+	__SPIN_LOCK_UNLOCKED((name).wait_lock),			\
+	LIST_HEAD_INIT((name).wait_list)			\
+	__RWSEM_DEP_MAP_INIT(name)				\
+}
+
+#define DECLARE_RWSEM(name)		\
+	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
+
+extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
+
+extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
+			 struct lock_class_key *key);
+
+#define init_rwsem(sem)					\
+	do {						\
+		static struct lock_class_key __key;	\
+							\
+		__init_rwsem((sem), #sem, &__key);	\
+	} while (0)
+
+/*
+ * lock for reading
+ */
+static inline void __down_read(struct rw_semaphore *sem)
+{
+	if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
+		rwsem_down_read_failed(sem);
+}
+
+static inline int __down_read_trylock(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	while ((tmp = sem->count) >= 0) {
+		if (tmp = cmpxchg(&sem->count, tmp,
+				   tmp + RWSEM_ACTIVE_READ_BIAS)) {
+			return 1;
+		}
+	}
+	return 0;
+}
+
+/*
+ * lock for writing
+ */
+static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
+{
+	long tmp;
+
+	tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
+				     (atomic_long_t *)&sem->count);
+	if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
+		rwsem_down_write_failed(sem);
+}
+
+static inline void __down_write(struct rw_semaphore *sem)
+{
+	__down_write_nested(sem, 0);
+}
+
+static inline int __down_write_trylock(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
+		      RWSEM_ACTIVE_WRITE_BIAS);
+	return tmp = RWSEM_UNLOCKED_VALUE;
+}
+
+/*
+ * unlock after reading
+ */
+static inline void __up_read(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
+	if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) = 0))
+		rwsem_wake(sem);
+}
+
+/*
+ * unlock after writing
+ */
+static inline void __up_write(struct rw_semaphore *sem)
+{
+	if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
+				 (atomic_long_t *)&sem->count) < 0))
+		rwsem_wake(sem);
+}
+
+/*
+ * implement atomic add functionality
+ */
+static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
+{
+	atomic_long_add(delta, (atomic_long_t *)&sem->count);
+}
+
+/*
+ * downgrade write lock to read lock
+ */
+static inline void __downgrade_write(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
+				     (atomic_long_t *)&sem->count);
+	if (tmp < 0)
+		rwsem_downgrade_wake(sem);
+}
+
+/*
+ * implement exchange and add functionality
+ */
+static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
+{
+	return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
+}
+
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+	return sem->count != 0;
+}
+
+#endif	/* __KERNEL__ */
+#endif	/* _RWSEM_CMPXCHG_H */



WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: akpm@linux-foundation.org, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, paulus@au.ibm.com,
	linuxppc-dev@lists.ozlabs.org, David Miller <davem@davemloft.net>
Subject: [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation to asm-generic
Date: Fri, 20 Aug 2010 15:14:55 +1000	[thread overview]
Message-ID: <1282281295.22370.401.camel@pasglop> (raw)
In-Reply-To: <20100818.222925.233689776.davem@davemloft.net>

Other architectures who support cmpxchg and atomic_long can
use that directly.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/rwsem.h    |  184 +----------------------------------
 include/asm-generic/rwsem-cmpxchg.h |  183 ++++++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+), 183 deletions(-)
 create mode 100644 include/asm-generic/rwsem-cmpxchg.h

diff --git a/arch/powerpc/include/asm/rwsem.h b/arch/powerpc/include/asm/rwsem.h
index 8447d89..1237ad6 100644
--- a/arch/powerpc/include/asm/rwsem.h
+++ b/arch/powerpc/include/asm/rwsem.h
@@ -1,183 +1 @@
-#ifndef _ASM_POWERPC_RWSEM_H
-#define _ASM_POWERPC_RWSEM_H
-
-#ifndef _LINUX_RWSEM_H
-#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
-#endif
-
-#ifdef __KERNEL__
-
-/*
- * R/W semaphores for PPC using the stuff in lib/rwsem.c.
- * Adapted largely from include/asm-i386/rwsem.h
- * by Paul Mackerras <paulus@samba.org>.
- */
-
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <asm/atomic.h>
-#include <asm/system.h>
-
-/*
- * the semaphore definition
- */
-#ifdef CONFIG_PPC64
-# define RWSEM_ACTIVE_MASK		0xffffffffL
-#else
-# define RWSEM_ACTIVE_MASK		0x0000ffffL
-#endif
-
-#define RWSEM_UNLOCKED_VALUE		0x00000000L
-#define RWSEM_ACTIVE_BIAS		0x00000001L
-#define RWSEM_WAITING_BIAS		(-RWSEM_ACTIVE_MASK-1)
-#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
-#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
-
-struct rw_semaphore {
-	long			count;
-	spinlock_t		wait_lock;
-	struct list_head	wait_list;
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-	struct lockdep_map	dep_map;
-#endif
-};
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
-#else
-# define __RWSEM_DEP_MAP_INIT(lockname)
-#endif
-
-#define __RWSEM_INITIALIZER(name)				\
-{								\
-	RWSEM_UNLOCKED_VALUE,					\
-	__SPIN_LOCK_UNLOCKED((name).wait_lock),			\
-	LIST_HEAD_INIT((name).wait_list)			\
-	__RWSEM_DEP_MAP_INIT(name)				\
-}
-
-#define DECLARE_RWSEM(name)		\
-	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
-
-extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
-
-extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
-			 struct lock_class_key *key);
-
-#define init_rwsem(sem)					\
-	do {						\
-		static struct lock_class_key __key;	\
-							\
-		__init_rwsem((sem), #sem, &__key);	\
-	} while (0)
-
-/*
- * lock for reading
- */
-static inline void __down_read(struct rw_semaphore *sem)
-{
-	if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
-		rwsem_down_read_failed(sem);
-}
-
-static inline int __down_read_trylock(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	while ((tmp = sem->count) >= 0) {
-		if (tmp == cmpxchg(&sem->count, tmp,
-				   tmp + RWSEM_ACTIVE_READ_BIAS)) {
-			return 1;
-		}
-	}
-	return 0;
-}
-
-/*
- * lock for writing
- */
-static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
-{
-	long tmp;
-
-	tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
-				     (atomic_long_t *)&sem->count);
-	if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
-		rwsem_down_write_failed(sem);
-}
-
-static inline void __down_write(struct rw_semaphore *sem)
-{
-	__down_write_nested(sem, 0);
-}
-
-static inline int __down_write_trylock(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
-		      RWSEM_ACTIVE_WRITE_BIAS);
-	return tmp == RWSEM_UNLOCKED_VALUE;
-}
-
-/*
- * unlock after reading
- */
-static inline void __up_read(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
-	if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0))
-		rwsem_wake(sem);
-}
-
-/*
- * unlock after writing
- */
-static inline void __up_write(struct rw_semaphore *sem)
-{
-	if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
-				 (atomic_long_t *)&sem->count) < 0))
-		rwsem_wake(sem);
-}
-
-/*
- * implement atomic add functionality
- */
-static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
-{
-	atomic_long_add(delta, (atomic_long_t *)&sem->count);
-}
-
-/*
- * downgrade write lock to read lock
- */
-static inline void __downgrade_write(struct rw_semaphore *sem)
-{
-	long tmp;
-
-	tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
-				     (atomic_long_t *)&sem->count);
-	if (tmp < 0)
-		rwsem_downgrade_wake(sem);
-}
-
-/*
- * implement exchange and add functionality
- */
-static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
-{
-	return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
-}
-
-static inline int rwsem_is_locked(struct rw_semaphore *sem)
-{
-	return sem->count != 0;
-}
-
-#endif	/* __KERNEL__ */
-#endif	/* _ASM_POWERPC_RWSEM_H */
+#include <asm-generic/rwsem-cmpxchg.h>
diff --git a/include/asm-generic/rwsem-cmpxchg.h b/include/asm-generic/rwsem-cmpxchg.h
new file mode 100644
index 0000000..2b1c859
--- /dev/null
+++ b/include/asm-generic/rwsem-cmpxchg.h
@@ -0,0 +1,183 @@
+#ifndef _RWSEM_CMPXCHG_H
+#define _RWSEM_CMPXCHG_H
+
+#ifndef _LINUX_RWSEM_H
+#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
+#endif
+
+#ifdef __KERNEL__
+
+/*
+ * Generic R/W semaphores the stuff in lib/rwsem.c.
+ * Adapted largely from include/asm-i386/rwsem.h
+ * by Paul Mackerras <paulus@samba.org>.
+ */
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include <asm/system.h>
+
+/*
+ * the semaphore definition
+ */
+#if BITS_PER_LONG == 64
+# define RWSEM_ACTIVE_MASK		0xffffffffL
+#else
+# define RWSEM_ACTIVE_MASK		0x0000ffffL
+#endif
+
+#define RWSEM_UNLOCKED_VALUE		0x00000000L
+#define RWSEM_ACTIVE_BIAS		0x00000001L
+#define RWSEM_WAITING_BIAS		(-RWSEM_ACTIVE_MASK-1)
+#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
+#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
+
+struct rw_semaphore {
+	long			count;
+	spinlock_t		wait_lock;
+	struct list_head	wait_list;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map	dep_map;
+#endif
+};
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
+#else
+# define __RWSEM_DEP_MAP_INIT(lockname)
+#endif
+
+#define __RWSEM_INITIALIZER(name)				\
+{								\
+	RWSEM_UNLOCKED_VALUE,					\
+	__SPIN_LOCK_UNLOCKED((name).wait_lock),			\
+	LIST_HEAD_INIT((name).wait_list)			\
+	__RWSEM_DEP_MAP_INIT(name)				\
+}
+
+#define DECLARE_RWSEM(name)		\
+	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
+
+extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
+
+extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
+			 struct lock_class_key *key);
+
+#define init_rwsem(sem)					\
+	do {						\
+		static struct lock_class_key __key;	\
+							\
+		__init_rwsem((sem), #sem, &__key);	\
+	} while (0)
+
+/*
+ * lock for reading
+ */
+static inline void __down_read(struct rw_semaphore *sem)
+{
+	if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
+		rwsem_down_read_failed(sem);
+}
+
+static inline int __down_read_trylock(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	while ((tmp = sem->count) >= 0) {
+		if (tmp == cmpxchg(&sem->count, tmp,
+				   tmp + RWSEM_ACTIVE_READ_BIAS)) {
+			return 1;
+		}
+	}
+	return 0;
+}
+
+/*
+ * lock for writing
+ */
+static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
+{
+	long tmp;
+
+	tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
+				     (atomic_long_t *)&sem->count);
+	if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
+		rwsem_down_write_failed(sem);
+}
+
+static inline void __down_write(struct rw_semaphore *sem)
+{
+	__down_write_nested(sem, 0);
+}
+
+static inline int __down_write_trylock(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
+		      RWSEM_ACTIVE_WRITE_BIAS);
+	return tmp == RWSEM_UNLOCKED_VALUE;
+}
+
+/*
+ * unlock after reading
+ */
+static inline void __up_read(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
+	if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0))
+		rwsem_wake(sem);
+}
+
+/*
+ * unlock after writing
+ */
+static inline void __up_write(struct rw_semaphore *sem)
+{
+	if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
+				 (atomic_long_t *)&sem->count) < 0))
+		rwsem_wake(sem);
+}
+
+/*
+ * implement atomic add functionality
+ */
+static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
+{
+	atomic_long_add(delta, (atomic_long_t *)&sem->count);
+}
+
+/*
+ * downgrade write lock to read lock
+ */
+static inline void __downgrade_write(struct rw_semaphore *sem)
+{
+	long tmp;
+
+	tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
+				     (atomic_long_t *)&sem->count);
+	if (tmp < 0)
+		rwsem_downgrade_wake(sem);
+}
+
+/*
+ * implement exchange and add functionality
+ */
+static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
+{
+	return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
+}
+
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+	return sem->count != 0;
+}
+
+#endif	/* __KERNEL__ */
+#endif	/* _RWSEM_CMPXCHG_H */



  parent reply	other threads:[~2010-08-20  5:15 UTC|newest]

Thread overview: 548+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 20:11 [GIT] Sparc David Miller
2010-03-29 20:11 ` David Miller
2010-04-04  8:15 ` David Miller
2010-04-04  8:15   ` David Miller
2010-04-13 11:43 ` David Miller
2010-04-13 11:43   ` David Miller
2010-05-19 19:50 ` David Miller
2010-05-19 19:50   ` David Miller
2010-07-21  4:25 ` [GIT] SPARC David Miller
2010-07-21  4:25   ` David Miller
2010-08-05  0:21 ` [GIT] Sparc David Miller
2010-08-05  0:21   ` David Miller
2010-08-09 10:28 ` David Miller
2010-08-09 10:28   ` David Miller
2010-08-18  1:03 ` David Miller
2010-08-18  1:03   ` David Miller
2010-08-18  1:31   ` Linus Torvalds
2010-08-18  1:31     ` Linus Torvalds
2010-08-18  1:59     ` Linus Torvalds
2010-08-18  1:59       ` Linus Torvalds
2010-08-18  2:14       ` David Miller
2010-08-18  2:14         ` David Miller
2010-08-18  4:38         ` 64-bit ppc rwsem (was: Re: [GIT] Sparc) Benjamin Herrenschmidt
2010-08-18  4:38           ` Benjamin Herrenschmidt
2010-08-18  4:38           ` Benjamin Herrenschmidt
2010-08-18  5:03           ` Benjamin Herrenschmidt
2010-08-18  5:03             ` Benjamin Herrenschmidt
2010-08-18  5:03             ` Benjamin Herrenschmidt
2010-08-18  5:28             ` 64-bit ppc rwsem David Miller
2010-08-18  5:28               ` David Miller
2010-08-18  5:28               ` David Miller
2010-08-18  5:39               ` Sam Ravnborg
2010-08-18  5:39                 ` Sam Ravnborg
2010-08-18  5:39                 ` Sam Ravnborg
2010-08-18  5:48                 ` David Miller
2010-08-18  5:48                   ` David Miller
2010-08-18  5:48                   ` David Miller
2010-08-19  5:23               ` Benjamin Herrenschmidt
2010-08-19  5:23                 ` Benjamin Herrenschmidt
2010-08-19  5:23                 ` Benjamin Herrenschmidt
2010-08-19  5:29                 ` David Miller
2010-08-19  5:29                   ` David Miller
2010-08-19  5:29                   ` David Miller
2010-08-19 10:24                   ` Benjamin Herrenschmidt
2010-08-19 10:24                     ` Benjamin Herrenschmidt
2010-08-19 10:24                     ` Benjamin Herrenschmidt
2010-08-20  5:14                   ` Benjamin Herrenschmidt [this message]
2010-08-20  5:14                     ` [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation to asm-generic Benjamin Herrenschmidt
2010-08-20  5:14                     ` [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation Benjamin Herrenschmidt
2010-08-20  6:43                     ` [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation to asm-generic Sam Ravnborg
2010-08-20  6:43                       ` Sam Ravnborg
2010-08-20  6:43                       ` [PATCH 2/2] rwsem: Move powerpc atomic-long based Sam Ravnborg
2010-08-24  1:32                       ` [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation to asm-generic Benjamin Herrenschmidt
2010-08-24  1:32                         ` Benjamin Herrenschmidt
2010-08-24  1:32                         ` [PATCH 2/2] rwsem: Move powerpc atomic-long based Benjamin Herrenschmidt
2010-08-23  4:39                     ` [PATCH 2/2] rwsem: Move powerpc atomic-long based implementation to asm-generic David Miller
2010-08-23  4:39                       ` David Miller
2010-08-23  4:39                       ` [PATCH 2/2] rwsem: Move powerpc atomic-long based David Miller
2010-08-20  5:14                   ` [PATCH 1/2] powerpc: Make rwsem use "long" type Benjamin Herrenschmidt
2010-08-20  5:14                     ` Benjamin Herrenschmidt
2010-08-20  5:14                     ` Benjamin Herrenschmidt
2010-08-24  1:37                     ` Timur Tabi
2010-08-24  1:37                       ` Timur Tabi
2010-08-24  1:37                       ` Timur Tabi
2010-08-23 13:44                   ` 64-bit ppc rwsem Arnd Bergmann
2010-08-23 13:44                     ` Arnd Bergmann
2010-08-23 13:44                     ` Arnd Bergmann
2010-08-23 22:01                     ` Benjamin Herrenschmidt
2010-08-23 22:01                       ` Benjamin Herrenschmidt
2010-08-23 22:01                       ` Benjamin Herrenschmidt
2010-08-23 22:18                       ` David Miller
2010-08-23 22:18                         ` David Miller
2010-08-23 22:18                         ` David Miller
2010-08-24  1:31                         ` Benjamin Herrenschmidt
2010-08-24  1:31                           ` Benjamin Herrenschmidt
2010-08-24  1:31                           ` Benjamin Herrenschmidt
2010-08-24 12:06                           ` Arnd Bergmann
2010-08-24 12:06                             ` Arnd Bergmann
2010-08-24 12:06                             ` Arnd Bergmann
2010-08-18  2:12     ` [GIT] Sparc David Miller
2010-08-18  2:12       ` David Miller
2010-08-18  2:50       ` Al Viro
2010-08-18  2:50         ` Al Viro
2010-08-24  9:02 ` David Miller
2010-08-24  9:02   ` David Miller
2010-09-11  4:25 ` David Miller
2010-09-11  4:25   ` David Miller
2010-09-22 18:10 ` David Miller
2010-09-22 18:10   ` David Miller
2010-09-22 18:32   ` Al Viro
2010-09-22 18:32     ` Al Viro
2010-09-22 18:46     ` Linus Torvalds
2010-09-22 18:46       ` Linus Torvalds
2010-09-22 18:53       ` Al Viro
2010-09-22 18:53         ` Al Viro
2010-09-22 19:04         ` Al Viro
2010-09-22 19:04           ` Al Viro
2010-09-22 19:08         ` Linus Torvalds
2010-09-22 19:08           ` Linus Torvalds
2010-09-22 19:53           ` Al Viro
2010-09-22 19:53             ` Al Viro
2010-09-22 20:43             ` Al Viro
2010-09-22 20:43               ` Al Viro
2010-09-22 21:15               ` David Miller
2010-09-22 21:15                 ` David Miller
2010-09-22 23:12                 ` Al Viro
2010-09-22 23:12                   ` Al Viro
2010-09-24  4:48                   ` David Miller
2010-09-24  4:48                     ` David Miller
2010-09-23  0:27                 ` Al Viro
2010-09-23  0:27                   ` Al Viro
2010-09-24  4:53                   ` David Miller
2010-09-24  4:53                     ` David Miller
2010-09-23  4:59           ` Al Viro
2010-09-23  4:59             ` Al Viro
2010-09-24  5:01             ` David Miller
2010-09-24  5:01               ` David Miller
2010-10-29  3:46 ` David Miller
2010-10-29  3:46   ` David Miller
2010-12-14 20:11 ` David Miller
2010-12-14 20:11   ` David Miller
2011-01-06 22:48 ` David Miller
2011-01-06 22:48   ` David Miller
2011-01-12  0:26 ` David Miller
2011-01-12  0:26   ` David Miller
2011-02-17 21:34 ` David Miller
2011-02-17 21:34   ` David Miller
2011-03-17  3:06 ` David Miller
2011-03-17  3:06   ` David Miller
2011-03-21  2:51 ` David Miller
2011-03-21  2:51   ` David Miller
2011-03-25 21:05 ` David Miller
2011-03-25 21:05   ` David Miller
2011-04-01  6:33 ` David Miller
2011-04-01  6:33   ` David Miller
2011-05-12  4:42 ` David Miller
2011-05-12  4:42   ` David Miller
2011-05-23  4:52 ` David Miller
2011-05-23  4:52   ` David Miller
2011-06-09 23:14 ` David Miller
2011-06-09 23:14   ` David Miller
2011-07-16 17:48 ` David Miller
2011-07-16 17:48   ` David Miller
2011-07-28  8:46 ` David Miller
2011-07-28  8:46   ` David Miller
2011-07-28 10:08   ` Anca Emanuel
2011-07-28 10:08     ` Anca Emanuel
2011-08-05 11:25 ` David Miller
2011-08-05 11:25   ` David Miller
2011-08-07 22:48 ` David Miller
2011-08-07 22:48   ` David Miller
2011-08-12  1:08 ` David Miller
2011-08-12  1:08   ` David Miller
2011-08-15 22:47 ` David Miller
2011-08-15 22:47   ` David Miller
2011-08-19  4:54 ` David Miller
2011-08-19  4:54   ` David Miller
2011-08-24  6:34 ` David Miller
2011-08-24  6:34   ` David Miller
2011-08-29 16:50 ` David Miller
2011-08-29 16:50   ` David Miller
2011-08-30 18:13 ` David Miller
2011-08-30 18:13   ` David Miller
2011-09-29 19:31 ` David Miller
2011-09-29 19:31   ` David Miller
2011-10-20  9:48 ` David Miller
2011-10-20  9:48   ` David Miller
2011-10-31  8:32 ` David Miller
2011-10-31  8:32   ` David Miller
2011-11-08 20:07 ` David Miller
2011-11-08 20:07   ` David Miller
2011-11-18 19:22 ` David Miller
2011-11-18 19:22   ` David Miller
2011-12-16 20:22 ` David Miller
2011-12-16 20:22   ` David Miller
2011-12-23 22:11 ` David Miller
2011-12-23 22:11   ` David Miller
2012-01-09 22:22 ` David Miller
2012-01-09 22:22   ` David Miller
2012-01-26 21:55 ` David Miller
2012-01-26 21:55   ` David Miller
2012-03-30  7:39 ` David Miller
2012-03-30  7:39   ` David Miller
2012-03-30 10:02   ` Sam Ravnborg
2012-03-30 10:02     ` Sam Ravnborg
2012-03-31  1:37 ` David Miller
2012-03-31  1:37   ` David Miller
2012-04-04  8:03 ` David Miller
2012-04-04  8:03   ` David Miller
2012-04-10 14:28 ` David Miller
2012-04-13 19:24 ` David Miller
2012-04-13 19:24   ` David Miller
2012-04-13 19:46   ` Linus Torvalds
2012-04-13 19:46     ` Linus Torvalds
2012-04-13 20:12     ` David Miller
2012-04-13 20:12       ` David Miller
2012-04-13 21:50     ` Sam Ravnborg
2012-04-13 21:50       ` Sam Ravnborg
2012-04-14  9:13       ` Ingo Molnar
2012-04-14  9:13         ` Ingo Molnar
2012-04-14 10:23         ` Sam Ravnborg
2012-04-14 10:23           ` Sam Ravnborg
2012-04-14 10:50           ` Ingo Molnar
2012-04-14 10:50             ` Ingo Molnar
2012-04-21 20:58 ` David Miller
2012-04-21 20:58   ` David Miller
2012-05-10 20:52 ` David Miller
2012-05-10 20:52   ` David Miller
2012-05-21  9:03 ` David Miller
2012-05-21  9:03   ` David Miller
2012-05-21 17:37   ` Linus Torvalds
2012-05-21 17:37     ` Linus Torvalds
2012-05-21 18:24     ` Sam Ravnborg
2012-05-21 18:24       ` Sam Ravnborg
2012-05-21 18:28       ` Linus Torvalds
2012-05-21 18:28         ` Linus Torvalds
2012-05-21 18:33         ` Linus Torvalds
2012-05-21 18:33           ` Linus Torvalds
2012-05-21 18:52           ` [PATCH] net: drop NET dependency from HAVE_BPF_JIT Sam Ravnborg
2012-05-21 18:52             ` Sam Ravnborg
2012-05-21 18:54             ` Linus Torvalds
2012-05-21 18:54               ` Linus Torvalds
2012-05-21 19:48               ` David Miller
2012-05-21 19:48                 ` David Miller
2012-05-21 18:38         ` [GIT] Sparc Sam Ravnborg
2012-05-21 18:38           ` Sam Ravnborg
2012-05-30 22:38 ` David Miller
2012-05-30 22:38   ` David Miller
2012-06-15 22:41 ` David Miller
2012-06-15 22:41   ` David Miller
2012-07-26 23:58 ` David Miller
2012-07-26 23:58   ` David Miller
2012-09-21 19:48 ` David Miller
2012-09-21 19:48   ` David Miller
2012-10-02 18:13 ` David Miller
2012-10-02 18:13   ` David Miller
2012-10-03  6:14 ` David Miller
2012-10-03  6:14   ` David Miller
2012-10-08 20:18 ` David Miller
2012-10-08 20:18   ` David Miller
2012-10-10  5:11   ` Al Viro
2012-10-10  5:11     ` Al Viro
2012-10-11  0:34     ` David Miller
2012-10-11  0:34       ` David Miller
2012-10-10  1:26 ` David Miller
2012-10-10  1:26   ` David Miller
2012-10-12 19:26 ` David Miller
2012-10-12 19:26   ` David Miller
2012-10-17  5:05 ` David Miller
2012-10-17  5:05   ` David Miller
2012-11-10 19:21 ` David Miller
2012-11-10 19:21   ` David Miller
2012-11-23 19:48 ` David Miller
2012-11-23 19:48   ` David Miller
2012-12-03 20:33 ` David Miller
2012-12-03 20:33   ` David Miller
2012-12-13 20:11 ` David Miller
2012-12-13 20:11   ` David Miller
2012-12-20  0:15 ` David Miller
2012-12-20  0:15   ` David Miller
2013-01-12 23:56 ` David Miller
2013-02-14 20:14 ` David Miller
2013-02-14 20:14   ` David Miller
2013-03-19 21:18 ` David Miller
2013-03-19 21:18   ` David Miller
2013-04-21  1:16 ` David Miller
2013-04-21  1:16   ` David Miller
2013-04-25  0:08 ` David Miller
2013-04-25  0:08   ` David Miller
2013-05-05  2:42 ` David Miller
2013-05-05  2:42   ` David Miller
2013-06-19  9:28 ` David Miller
2013-06-19  9:28   ` David Miller
2013-07-10 21:00 ` David Miller
2013-07-10 21:00   ` David Miller
2013-09-05 20:45 ` Fw: " David Miller
2013-10-01 17:57 ` David Miller
2013-10-01 17:57   ` David Miller
2013-10-03  3:52 ` David Miller
2013-10-03  3:52   ` David Miller
2013-11-14 23:19 ` David Miller
2013-11-14 23:19   ` David Miller
2013-11-19 22:18 ` David Miller
2013-11-19 22:18   ` David Miller
2014-01-05  2:04 ` David Miller
2014-01-05  2:04   ` David Miller
2014-01-29  8:51 ` David Miller
2014-01-29  8:51   ` David Miller
2014-02-21 17:42 ` David Miller
2014-02-21 17:42   ` David Miller
2014-03-24 19:18 ` David Miller
2014-03-24 19:18   ` David Miller
2014-05-06 15:30 ` David Miller
2014-05-06 15:30   ` David Miller
2014-05-06 16:29   ` Dave Jones
2014-05-06 16:29     ` Dave Jones
2014-05-06 17:13     ` David Miller
2014-05-06 17:13       ` David Miller
2014-05-22 21:53 ` David Miller
2014-05-22 21:53   ` David Miller
2014-06-16  6:45 ` David Miller
2014-06-16  6:45   ` David Miller
2014-07-22  5:38 ` David Miller
2014-07-22  5:38   ` David Miller
2014-08-06  5:03 ` David Miller
2014-08-06  5:03   ` David Miller
2014-08-12  4:01 ` David Miller
2014-08-12  4:01   ` David Miller
2014-08-14 23:17 ` David Miller
2014-08-14 23:17   ` David Miller
2014-10-10 20:01 ` David Miller
2014-10-10 20:01   ` David Miller
2014-10-15 18:45 ` David Miller
2014-10-15 18:45   ` David Miller
2014-10-19 17:26 ` David Miller
2014-10-19 17:26   ` David Miller
2014-10-24 17:32 ` David Miller
2014-10-24 17:32   ` David Miller
2014-10-24 19:47   ` Linus Torvalds
2014-10-24 19:47     ` Linus Torvalds
2014-10-27 21:09     ` Andrew Morton
2014-10-27 21:09       ` Andrew Morton
2014-10-27 22:43       ` David Miller
2014-10-27 22:43         ` David Miller
2014-10-28 10:49         ` Steve Capper
2014-10-31 20:44 ` David Miller
2014-10-31 20:44   ` David Miller
2014-11-16 21:43 ` David Miller
2014-11-16 21:43   ` David Miller
2014-11-26 21:42 ` David Miller
2014-11-26 21:42   ` David Miller
2014-12-12 20:58 ` David Miller
2014-12-12 20:58   ` David Miller
2014-12-18 21:39 ` David Miller
2014-12-18 21:39   ` David Miller
2015-03-19  4:59 ` David Miller
2015-03-19  4:59   ` David Miller
2015-03-23 16:55 ` David Miller
2015-03-23 16:55   ` David Miller
2015-03-23 17:05   ` Linus Torvalds
2015-03-23 17:05     ` Linus Torvalds
2015-03-23 17:12     ` Linus Torvalds
2015-03-23 17:12       ` Linus Torvalds
2015-03-23 19:14       ` David Miller
2015-03-23 19:14         ` David Miller
2015-03-23 19:10     ` David Miller
2015-03-23 19:10       ` David Miller
2015-04-17 20:14 ` David Miller
2015-04-17 20:14   ` David Miller
2015-04-18 21:58 ` David Miller
2015-04-18 21:58   ` David Miller
2015-04-22  2:58 ` David Miller
2015-04-22  2:58   ` David Miller
2015-06-02  0:17 ` David Miller
2015-06-02  0:17   ` David Miller
2015-06-25 13:27 ` David Miller
2015-06-25 13:27   ` David Miller
2015-08-07  2:19 ` David Miller
2015-08-07  2:19   ` David Miller
2015-11-05 21:39 ` David Miller
2015-11-05 21:39   ` David Miller
2015-11-06  0:43   ` Linus Torvalds
2015-11-06  0:43     ` Linus Torvalds
2015-11-06  0:56     ` Linus Torvalds
2015-11-06  0:56       ` Linus Torvalds
2015-11-06  1:05       ` Julian Calaby
2015-11-06  1:05         ` Julian Calaby
2015-11-06  6:44         ` Julia Lawall
2015-11-06  6:44           ` Julia Lawall
2015-11-07  3:31           ` Julian Calaby
2015-11-07  3:31             ` Julian Calaby
2015-11-07  6:04             ` Julia Lawall
2015-11-07  6:04               ` Julia Lawall
2015-11-06 18:32       ` [PATCH] checkpatch: Warn when casting constants to c90 int or longer types Joe Perches
2015-11-06 18:32         ` Joe Perches
2015-11-06  5:14     ` [GIT] Sparc David Miller
2015-11-06  5:14       ` David Miller
2015-12-24 17:16 ` David Miller
2015-12-24 17:16   ` David Miller
2015-12-31 20:30 ` David Miller
2015-12-31 20:30   ` David Miller
2016-01-15 21:04 ` David Miller
2016-01-15 21:04   ` David Miller
2016-03-01  5:47 ` David Miller
2016-03-01  5:47   ` David Miller
2016-03-28 19:45 ` David Miller
2016-03-28 19:45   ` David Miller
2016-05-02  5:10 ` David Miller
2016-05-02  5:10   ` David Miller
2016-05-22  6:03 ` David Miller
2016-05-22  6:03   ` David Miller
2016-06-01  4:17 ` David Miller
2016-06-01  4:17   ` David Miller
2016-07-29 18:15 ` David Miller
2016-07-29 18:15   ` David Miller
2016-10-02 13:02 ` David Miller
2016-10-02 13:02   ` David Miller
2016-10-06  7:57 ` David Miller
2016-10-06  7:57   ` David Miller
2016-10-31  1:04 ` David Miller
2016-10-31  1:04   ` David Miller
2016-11-21 18:41 ` David Miller
2016-11-21 18:41   ` David Miller
2016-11-28 21:03 ` David Miller
2016-11-28 21:03   ` David Miller
2016-12-06 17:19 ` David Miller
2016-12-06 17:19   ` David Miller
2016-12-12 15:10 ` David Miller
2016-12-12 15:10   ` David Miller
2017-01-30 22:37 ` David Miller
2017-01-30 22:37   ` David Miller
2017-02-24 16:34 ` David Miller
2017-02-24 16:34   ` David Miller
2017-04-07 21:21 ` David Miller
2017-04-07 21:21   ` David Miller
2017-04-18 20:20 ` David Miller
2017-04-18 20:20   ` David Miller
2017-04-26 19:22 ` David Miller
2017-04-26 19:22   ` David Miller
2017-05-09 20:04 ` David Miller
2017-05-09 20:04   ` David Miller
2017-05-18 18:03 ` David Miller
2017-05-18 18:03   ` David Miller
2017-06-06 20:57 ` David Miller
2017-06-06 20:57   ` David Miller
2017-07-08 10:40 ` David Miller
2017-07-08 10:40   ` David Miller
2017-07-12  4:05 ` David Miller
2017-07-12  4:05   ` David Miller
2017-07-17 20:57 ` David Miller
2017-07-17 20:57   ` David Miller
2017-08-04 17:11 ` David Miller
2017-08-04 17:11   ` David Miller
2017-08-10  5:26 ` David Miller
2017-08-10  5:26   ` David Miller
2017-08-21 21:01 ` David Miller
2017-08-21 21:01   ` David Miller
2017-09-10  3:24 ` David Miller
2017-09-10  3:24   ` David Miller
2017-11-18  3:15 ` David Miller
2017-11-18  3:15   ` David Miller
2017-11-29 20:17 ` David Miller
2017-11-29 20:17   ` David Miller
2017-12-31  4:17 ` David Miller
2017-12-31  4:17   ` David Miller
2018-01-24 23:23 ` David Miller
2018-01-24 23:23   ` David Miller
2018-02-01 15:20 ` David Miller
2018-02-01 15:20   ` David Miller
2018-03-15 21:20 ` David Miller
2018-03-15 21:20   ` David Miller
2018-04-03 15:31 ` David Miller
2018-04-03 15:31   ` David Miller
2018-04-30 20:12 ` David Miller
2018-04-30 20:12   ` David Miller
2018-06-09 14:21 ` David Miller
2018-06-09 14:21   ` David Miller
2018-08-22  5:16 ` David Miller
2018-08-22  5:16   ` David Miller
2018-10-08  6:48 ` David Miller
2018-10-08  6:48   ` David Miller
2018-10-08 14:26   ` Greg KH
2018-10-08 14:26     ` Greg KH
2018-10-08 18:42 ` John Paul Adrian Glaubitz
2018-10-16  2:39 ` David Miller
2018-10-16  2:39   ` David Miller
2018-10-16 16:55   ` Greg KH
2018-10-16 16:55     ` Greg KH
2018-10-18 23:33 ` David Miller
2018-10-18 23:33   ` David Miller
2018-10-19  7:16   ` Greg KH
2018-10-19  7:16     ` Greg KH
2018-10-24  3:31 ` David Miller
2018-10-24  3:31   ` David Miller
2018-10-24  5:43   ` Linus Torvalds
2018-10-24  5:43     ` Linus Torvalds
2018-10-25 18:28 ` David Miller
2018-10-25 18:28   ` David Miller
2018-10-26  1:30   ` Linus Torvalds
2018-10-26  1:30     ` Linus Torvalds
2018-10-25 23:39 ` David Miller
2018-10-26  3:29 ` David Miller
2018-10-26 12:41 ` John Paul Adrian Glaubitz
2018-10-26 18:30 ` David Miller
2018-10-26 23:08 ` David Miller
2018-10-26 23:08   ` David Miller
2018-10-27  0:17   ` Linus Torvalds
2018-10-27  0:17     ` Linus Torvalds
2018-11-01  1:44 ` David Miller
2018-11-01  1:44   ` David Miller
2018-11-01 16:15   ` Linus Torvalds
2018-11-01 16:15     ` Linus Torvalds
2018-12-03  5:33 ` David Miller
2018-12-03  5:33   ` David Miller
2018-12-03 17:55   ` pr-tracker-bot
2018-12-21 20:42 ` David Miller
2018-12-21 20:42   ` David Miller
2018-12-21 22:30   ` pr-tracker-bot
2018-12-22 23:46 ` David Miller
2018-12-22 23:46   ` David Miller
2018-12-26 19:20   ` pr-tracker-bot
2019-05-09 21:35 ` David Miller
2019-05-09 21:35   ` David Miller
2019-05-09 22:15   ` pr-tracker-bot
2019-06-03  5:21 ` David Miller
2019-06-03  5:21   ` David Miller
2019-06-03 17:35   ` pr-tracker-bot
2019-07-13  6:17 ` David Miller
2019-07-13  6:17   ` David Miller
2019-07-13 23:15   ` pr-tracker-bot
2020-01-30 10:19 ` David Miller
2020-01-30 10:19   ` David Miller
2020-01-30 18:00   ` pr-tracker-bot
2020-02-02 10:57 ` David Miller
2020-02-02 10:57   ` David Miller
2020-02-02 20:20   ` pr-tracker-bot
2020-04-06 18:25 ` David Miller
2020-04-06 18:25   ` David Miller
2020-04-07 19:55   ` pr-tracker-bot
2020-06-08  0:16 ` David Miller
2020-06-08  0:16   ` David Miller
2020-06-08  0:35   ` pr-tracker-bot
2021-02-23 21:21 ` David Miller
2021-02-23 21:21   ` David Miller
2021-02-23 23:36   ` pr-tracker-bot
2021-03-08 23:46 ` [GIT] SPARC David Miller
2021-03-08 23:46   ` David Miller
2021-03-09  0:19   ` John Paul Adrian Glaubitz
2021-03-09  0:19     ` John Paul Adrian Glaubitz
2021-03-09 19:08     ` David Miller
2021-03-09 19:08       ` David Miller
2021-03-09 19:27       ` Linus Torvalds
2021-03-09 19:27         ` Linus Torvalds
2021-03-10  0:24         ` David Miller
2021-03-10  0:24           ` David Miller
2021-03-10  1:15           ` David Miller
2021-03-10  1:15             ` David Miller
2021-03-10  1:17             ` Linus Torvalds
2021-03-10  1:17               ` Linus Torvalds
2021-03-10  1:18               ` David Miller
2021-03-10  1:18                 ` David Miller
2021-03-10 10:40           ` Geert Uytterhoeven
2021-03-10 10:40             ` Geert Uytterhoeven
2021-03-10 13:14             ` Konstantin Ryabitsev
2021-03-10 13:14               ` Konstantin Ryabitsev
  -- strict thread matches above, loose matches on Subject: below --
2012-05-24 21:32 [GIT] Sparc David Miller
2012-05-24 21:32 ` David Miller
2012-05-24 21:32 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282281295.22370.401.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@au.ibm.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.