mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 05:54:23 +08:00
5dec94d492
Now we only have one implementation of rwsem. Even though we still use xadd to handle reader locking, we use cmpxchg for writer instead. So the filename rwsem-xadd.c is not strictly correct. Also no one outside of the rwsem code need to know the internal implementation other than function prototypes for two internal functions that are called directly from percpu-rwsem.c. So the rwsem-xadd.c and rwsem.h files are now merged into rwsem.c in the following order: <upper part of rwsem.h> <rwsem-xadd.c> <lower part of rwsem.h> <rwsem.c> The rwsem.h file now contains only 2 function declarations for __up_read() and __down_read(). This is a code relocation patch with no code change at all except making __up_read() and __down_read() non-static functions so they can be used by percpu-rwsem.c. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Will Deacon <will.deacon@arm.com> Cc: huang ying <huang.ying.caritas@gmail.com> Link: https://lkml.kernel.org/r/20190520205918.22251-5-longman@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
32 lines
1.1 KiB
Makefile
32 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Any varying coverage in these files is non-deterministic
|
|
# and is generally not a function of system call inputs.
|
|
KCOV_INSTRUMENT := n
|
|
|
|
obj-y += mutex.o semaphore.o rwsem.o percpu-rwsem.o
|
|
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
CFLAGS_REMOVE_lockdep.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_lockdep_proc.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_mutex-debug.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_rtmutex-debug.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
|
|
obj-$(CONFIG_LOCKDEP) += lockdep.o
|
|
ifeq ($(CONFIG_PROC_FS),y)
|
|
obj-$(CONFIG_LOCKDEP) += lockdep_proc.o
|
|
endif
|
|
obj-$(CONFIG_SMP) += spinlock.o
|
|
obj-$(CONFIG_LOCK_SPIN_ON_OWNER) += osq_lock.o
|
|
obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
|
|
obj-$(CONFIG_QUEUED_SPINLOCKS) += qspinlock.o
|
|
obj-$(CONFIG_RT_MUTEXES) += rtmutex.o
|
|
obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o
|
|
obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
|
|
obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
|
|
obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o
|
|
obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o
|
|
obj-$(CONFIG_WW_MUTEX_SELFTEST) += test-ww_mutex.o
|
|
obj-$(CONFIG_LOCK_EVENT_COUNTS) += lock_events.o
|