726328d92a
locking/spinlock, arch: Update and fix spin_unlock_wait() implementations
...
This patch updates/fixes all spin_unlock_wait() implementations.
The update is in semantics; where it previously was only a control
dependency, we now upgrade to a full load-acquire to match the
store-release from the spin_unlock() we waited on. This ensures that
when spin_unlock_wait() returns, we're guaranteed to observe the full
critical section we waited on.
This fixes a number of spin_unlock_wait() users that (not
unreasonably) rely on this.
I also fixed a number of ticket lock versions to only wait on the
current lock holder, instead of for a full unlock, as this is
sufficient.
Furthermore; again for ticket locks; I added an smp_rmb() in between
the initial ticket load and the spin loop testing the current value
because I could not convince myself the address dependency is
sufficient, esp. if the loads are of different sizes.
I'm more than happy to remove this smp_rmb() again if people are
certain the address dependency does indeed work as expected.
Note: PPC32 will be fixed independently
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: chris@zankel.net
Cc: cmetcalf@mellanox.com
Cc: davem@davemloft.net
Cc: dhowells@redhat.com
Cc: james.hogan@imgtec.com
Cc: jejb@parisc-linux.org
Cc: linux@armlinux.org.uk
Cc: mpe@ellerman.id.au
Cc: ralf@linux-mips.org
Cc: realmz6@gmail.com
Cc: rkuo@codeaurora.org
Cc: rth@twiddle.net
Cc: schwidefsky@de.ibm.com
Cc: tony.luck@intel.com
Cc: vgupta@synopsys.com
Cc: ysato@users.sourceforge.jp
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2016-06-14 11:55:15 +02:00
c9034c3a1d
Disintegrate asm/system.h for M32R
...
Disintegrate asm/system.h for M32R.
Signed-off-by: David Howells <dhowells@redhat.com >
cc: linux-m32r@ml.linux-m32r.org
2012-03-28 18:30:02 +01:00
60063497a9
atomic: use <linux/atomic.h>
...
This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>
Signed-off-by: Arun Sharma <asharma@fb.com >
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: David Miller <davem@davemloft.net >
Cc: Eric Dumazet <eric.dumazet@gmail.com >
Acked-by: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2011-07-26 16:49:47 -07:00
e5931943d0
locking: Convert raw_rwlock functions to arch_rwlock
...
Name space cleanup for rwlock functions. No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra <peterz@infradead.org >
Acked-by: David S. Miller <davem@davemloft.net >
Acked-by: Ingo Molnar <mingo@elte.hu >
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
fb3a6bbc91
locking: Convert raw_rwlock to arch_rwlock
...
Not strictly necessary for -rt as -rt does not have non sleeping
rwlocks, but it's odd to not have a consistent naming convention.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra <peterz@infradead.org >
Acked-by: David S. Miller <davem@davemloft.net >
Acked-by: Ingo Molnar <mingo@elte.hu >
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
0199c4e68d
locking: Convert __raw_spin* functions to arch_spin*
...
Name space cleanup. No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra <peterz@infradead.org >
Acked-by: David S. Miller <davem@davemloft.net >
Acked-by: Ingo Molnar <mingo@elte.hu >
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
445c89514b
locking: Convert raw_spinlock to arch_spinlock
...
The raw_spin* namespace was taken by lockdep for the architecture
specific implementations. raw_spin_* would be the ideal name space for
the spinlocks which are not converted to sleeping locks in preempt-rt.
Linus suggested to convert the raw_ to arch_ locks and cleanup the
name space instead of using an artifical name like core_spin,
atomic_spin or whatever
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra <peterz@infradead.org >
Acked-by: David S. Miller <davem@davemloft.net >
Acked-by: Ingo Molnar <mingo@elte.hu >
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
fe4e719d82
m32r: move include/asm-m32r headers to arch/m32r/include/asm
...
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org >
2009-04-17 10:05:01 +09:00