percpu_rw_semaphore: introduce CONFIG_PERCPU_RWSEM
authorOleg Nesterov <oleg@redhat.com>
Tue, 18 Dec 2012 00:01:39 +0000 (16:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 01:15:18 +0000 (17:15 -0800)
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>
arch/Kconfig
block/Kconfig
lib/Kconfig
lib/Makefile

index 34884faf98cd26f3f24c6483dd98b10855387232..54ffd0f9df21b7d9f28789104dd48e5bdcf5a965 100644 (file)
@@ -80,6 +80,7 @@ config UPROBES
        bool "Transparent user-space probes (EXPERIMENTAL)"
        depends on UPROBE_EVENT && PERF_EVENTS
        default n
+       select PERCPU_RWSEM
        help
          Uprobes is the user-space counterpart to kprobes: they
          enable instrumentation applications (such as 'perf probe')
index a7e40a7c821427cd27f6c7019411030ea00e33e8..4a85ccf8d4cfca02daab96709e35cc14a92a35b5 100644 (file)
@@ -4,6 +4,7 @@
 menuconfig BLOCK
        bool "Enable the block layer" if EXPERT
        default y
+       select PERCPU_RWSEM
        help
         Provide block layer support for the kernel.
 
index 4b31a46fb307bcd33bbc58d8141abfd9ad9ad220..75cdb77fa49d2cc84459360ad939a76be2596f7e 100644 (file)
@@ -42,6 +42,9 @@ config GENERIC_IO
 config STMP_DEVICE
        bool
 
+config PERCPU_RWSEM
+       boolean
+
 config CRC_CCITT
        tristate "CRC-CCITT functions"
        help
index e959c20efb241c592e24b5b1c0d3662deb4e96f3..5558e35170cd7af27a17f974979f97237f93a22a 100644 (file)
@@ -9,7 +9,7 @@ endif
 
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
         rbtree.o radix-tree.o dump_stack.o timerqueue.o\
-        idr.o int_sqrt.o extable.o percpu-rwsem.o \
+        idr.o int_sqrt.o extable.o \
         sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \
         proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \
         is_single_threaded.o plist.o decompress.o kobject_uevent.o \
@@ -40,6 +40,7 @@ obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
 lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
+lib-$(CONFIG_PERCPU_RWSEM) += percpu-rwsem.o
 
 CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS))
 obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o