aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-12-17 19:01:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 20:15:18 -0500
commit22b361d1df7bc25b558e52f22e779286a3d323e4 (patch)
treea66c2e50d07d87e52dfc74a1e9118b2aff6759fe
parent8ebe34731a0d1a9d89b536430afd98d0fadec99b (diff)
percpu_rw_semaphore: introduce CONFIG_PERCPU_RWSEM
Currently only block_dev and uprobes use percpu_rw_semaphore, add the config option selected by BLOCK || UPROBES. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Anton Arapov <anton@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/Kconfig1
-rw-r--r--block/Kconfig1
-rw-r--r--lib/Kconfig3
-rw-r--r--lib/Makefile3
4 files changed, 7 insertions, 1 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 34884faf98cd..54ffd0f9df21 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -80,6 +80,7 @@ config UPROBES
80 bool "Transparent user-space probes (EXPERIMENTAL)" 80 bool "Transparent user-space probes (EXPERIMENTAL)"
81 depends on UPROBE_EVENT && PERF_EVENTS 81 depends on UPROBE_EVENT && PERF_EVENTS
82 default n 82 default n
83 select PERCPU_RWSEM
83 help 84 help
84 Uprobes is the user-space counterpart to kprobes: they 85 Uprobes is the user-space counterpart to kprobes: they
85 enable instrumentation applications (such as 'perf probe') 86 enable instrumentation applications (such as 'perf probe')
diff --git a/block/Kconfig b/block/Kconfig
index a7e40a7c8214..4a85ccf8d4cf 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -4,6 +4,7 @@
4menuconfig BLOCK 4menuconfig BLOCK
5 bool "Enable the block layer" if EXPERT 5 bool "Enable the block layer" if EXPERT
6 default y 6 default y
7 select PERCPU_RWSEM
7 help 8 help
8 Provide block layer support for the kernel. 9 Provide block layer support for the kernel.
9 10
diff --git a/lib/Kconfig b/lib/Kconfig
index 4b31a46fb307..75cdb77fa49d 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -42,6 +42,9 @@ config GENERIC_IO
42config STMP_DEVICE 42config STMP_DEVICE
43 bool 43 bool
44 44
45config PERCPU_RWSEM
46 boolean
47
45config CRC_CCITT 48config CRC_CCITT
46 tristate "CRC-CCITT functions" 49 tristate "CRC-CCITT functions"
47 help 50 help
diff --git a/lib/Makefile b/lib/Makefile
index e959c20efb24..5558e35170cd 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -9,7 +9,7 @@ endif
9 9
10lib-y := ctype.o string.o vsprintf.o cmdline.o \ 10lib-y := ctype.o string.o vsprintf.o cmdline.o \
11 rbtree.o radix-tree.o dump_stack.o timerqueue.o\ 11 rbtree.o radix-tree.o dump_stack.o timerqueue.o\
12 idr.o int_sqrt.o extable.o percpu-rwsem.o \ 12 idr.o int_sqrt.o extable.o \
13 sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \ 13 sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \
14 proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \ 14 proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \
15 is_single_threaded.o plist.o decompress.o kobject_uevent.o \ 15 is_single_threaded.o plist.o decompress.o kobject_uevent.o \
@@ -40,6 +40,7 @@ obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
40obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o 40obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
41lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o 41lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
42lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o 42lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
43lib-$(CONFIG_PERCPU_RWSEM) += percpu-rwsem.o
43 44
44CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS)) 45CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS))
45obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o 46obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o