Commit 390a0c62 authored by Waiman Long's avatar Waiman Long Committed by Ingo Molnar
Browse files

locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs



Currently, we have two different implementation of rwsem:

 1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c)
 2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c)

As we are going to use a single generic implementation for rwsem-xadd.c
and no architecture-specific code will be needed, there is no point
in keeping two different implementations of rwsem. In most cases, the
performance of rwsem-spinlock.c will be worse. It also doesn't get all
the performance tuning and optimizations that had been implemented in
rwsem-xadd.c over the years.

For simplication, we are going to remove rwsem-spinlock.c and make all
architectures use a single implementation of rwsem - rwsem-xadd.c.

All references to RWSEM_GENERIC_SPINLOCK and RWSEM_XCHGADD_ALGORITHM
in the code are removed.

Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-riscv@lists.infradead.org
Cc: linux-um@lists.infradead.org
Cc: linux-xtensa@linux-xtensa.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: nios2-dev@lists.rocketboards.org
Cc: openrisc@lists.librecores.org
Cc: uclinux-h8-devel@lists.sourceforge.jp
Link: https://lkml.kernel.org/r/20190322143008.21313-3-longman@redhat.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 46ad0840
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -49,13 +49,6 @@ config MMU
	bool
	default y

config RWSEM_GENERIC_SPINLOCK
	bool

config RWSEM_XCHGADD_ALGORITHM
	bool
	default y

config ARCH_HAS_ILOG2_U32
	bool
	default n
+0 −3
Original line number Diff line number Diff line
@@ -63,9 +63,6 @@ config SCHED_OMIT_FRAME_POINTER
config GENERIC_CSUM
	def_bool y

config RWSEM_GENERIC_SPINLOCK
	def_bool y

config ARCH_DISCONTIGMEM_ENABLE
	def_bool n

+0 −4
Original line number Diff line number Diff line
@@ -178,10 +178,6 @@ config TRACE_IRQFLAGS_SUPPORT
	bool
	default !CPU_V7M

config RWSEM_XCHGADD_ALGORITHM
	bool
	default y

config ARCH_HAS_ILOG2_U32
	bool

+0 −3
Original line number Diff line number Diff line
@@ -237,9 +237,6 @@ config LOCKDEP_SUPPORT
config TRACE_IRQFLAGS_SUPPORT
	def_bool y

config RWSEM_XCHGADD_ALGORITHM
	def_bool y

config GENERIC_BUG
	def_bool y
	depends on BUG
+0 −3
Original line number Diff line number Diff line
@@ -27,9 +27,6 @@ config MMU
config FPU
	def_bool n

config RWSEM_GENERIC_SPINLOCK
	def_bool y

config GENERIC_CALIBRATE_DELAY
	def_bool y

Loading