OSDN Git Service

locking/rwsem: Convert sem->count to 'atomic_long_t'
authorJason Low <jason.low2@hpe.com>
Sat, 4 Jun 2016 05:26:02 +0000 (22:26 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 8 Jun 2016 13:16:42 +0000 (15:16 +0200)
commit8ee62b1870be8e630158701632a533d0378e15b8
tree18f68e695ee974f059703e75957e201695049cb9
parent055ce0fd1b86c204430cbc0887165599d6e15090
locking/rwsem: Convert sem->count to 'atomic_long_t'

Convert the rwsem count variable to an atomic_long_t since we use it
as an atomic variable. This also allows us to remove the
rwsem_atomic_{add,update}() "abstraction" which would now be an unnecesary
level of indirection. In follow up patches, we also remove the
rwsem_atomic_{add,update}() definitions across the various architectures.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jason Low <jason.low2@hpe.com>
[ Build warning fixes on various architectures. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Terry Rudd <terry.rudd@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Waiman Long <Waiman.Long@hpe.com>
Link: http://lkml.kernel.org/r/1465017963-4839-2-git-send-email-jason.low2@hpe.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/alpha/include/asm/rwsem.h
arch/ia64/include/asm/rwsem.h
include/asm-generic/rwsem.h
include/linux/rwsem.h
kernel/locking/rwsem-xadd.c