aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-05-08 03:25:02 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:00 -0400
commitc761c84154dcd952182e4867d841298c9eb0b14b (patch)
tree2020ee5b1b681dac2daa84037160094e682617be /include
parentf87367a6b1e3ec1fd440158e5eb357fbd5c2288e (diff)
kconfig: centralize the selection of semaphore debugging in lib/Kconfig.debug
Remove the Kconfig selection of semaphore debugging from the ALPHA and FRV Kconfig files, and centralize it in lib/Kconfig.debug. There doesn't seem to be much point in letting individual architectures independently define the same Kconfig option when it can just as easily be put in a single Kconfig file and made dependent on a subset of architectures. that way, at least the option shows up in the same relative location in the menu each time. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: David Howells <dhowells@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-frv/semaphore.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h
index 907c5c3643cc..09586528e007 100644
--- a/include/asm-frv/semaphore.h
+++ b/include/asm-frv/semaphore.h
@@ -20,8 +20,6 @@
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/rwsem.h> 21#include <linux/rwsem.h>
22 22
23#define SEMAPHORE_DEBUG 0
24
25/* 23/*
26 * the semaphore definition 24 * the semaphore definition
27 * - if counter is >0 then there are tokens available on the semaphore for down to collect 25 * - if counter is >0 then there are tokens available on the semaphore for down to collect
@@ -32,12 +30,12 @@ struct semaphore {
32 unsigned counter; 30 unsigned counter;
33 spinlock_t wait_lock; 31 spinlock_t wait_lock;
34 struct list_head wait_list; 32 struct list_head wait_list;
35#if SEMAPHORE_DEBUG 33#ifdef CONFIG_DEBUG_SEMAPHORE
36 unsigned __magic; 34 unsigned __magic;
37#endif 35#endif
38}; 36};
39 37
40#if SEMAPHORE_DEBUG 38#ifdef CONFIG_DEBUG_SEMAPHORE
41# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic 39# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic
42#else 40#else
43# define __SEM_DEBUG_INIT(name) 41# define __SEM_DEBUG_INIT(name)
@@ -76,7 +74,7 @@ static inline void down(struct semaphore *sem)
76{ 74{
77 unsigned long flags; 75 unsigned long flags;
78 76
79#if SEMAPHORE_DEBUG 77#ifdef CONFIG_DEBUG_SEMAPHORE
80 CHECK_MAGIC(sem->__magic); 78 CHECK_MAGIC(sem->__magic);
81#endif 79#endif
82 80
@@ -95,7 +93,7 @@ static inline int down_interruptible(struct semaphore *sem)
95 unsigned long flags; 93 unsigned long flags;
96 int ret = 0; 94 int ret = 0;
97 95
98#if SEMAPHORE_DEBUG 96#ifdef CONFIG_DEBUG_SEMAPHORE
99 CHECK_MAGIC(sem->__magic); 97 CHECK_MAGIC(sem->__magic);
100#endif 98#endif
101 99
@@ -119,7 +117,7 @@ static inline int down_trylock(struct semaphore *sem)
119 unsigned long flags; 117 unsigned long flags;
120 int success = 0; 118 int success = 0;
121 119
122#if SEMAPHORE_DEBUG 120#ifdef CONFIG_DEBUG_SEMAPHORE
123 CHECK_MAGIC(sem->__magic); 121 CHECK_MAGIC(sem->__magic);
124#endif 122#endif
125 123
@@ -136,7 +134,7 @@ static inline void up(struct semaphore *sem)
136{ 134{
137 unsigned long flags; 135 unsigned long flags;
138 136
139#if SEMAPHORE_DEBUG 137#ifdef CONFIG_DEBUG_SEMAPHORE
140 CHECK_MAGIC(sem->__magic); 138 CHECK_MAGIC(sem->__magic);
141#endif 139#endif
142 140