aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/Kconfig.debug8
-rw-r--r--arch/frv/kernel/semaphore.c2
-rw-r--r--include/asm-frv/semaphore.h14
-rw-r--r--lib/Kconfig.debug10
4 files changed, 17 insertions, 17 deletions
diff --git a/arch/alpha/Kconfig.debug b/arch/alpha/Kconfig.debug
index 36d0106c32eb..f45f28cc10da 100644
--- a/arch/alpha/Kconfig.debug
+++ b/arch/alpha/Kconfig.debug
@@ -16,14 +16,6 @@ config DEBUG_RWLOCK
16 too many attempts. If you suspect a rwlock problem or a kernel 16 too many attempts. If you suspect a rwlock problem or a kernel
17 hacker asks for this option then say Y. Otherwise say N. 17 hacker asks for this option then say Y. Otherwise say N.
18 18
19config DEBUG_SEMAPHORE
20 bool "Semaphore debugging"
21 depends on DEBUG_KERNEL
22 help
23 If you say Y here then semaphore processing will issue lots of
24 verbose debugging messages. If you suspect a semaphore problem or a
25 kernel hacker asks for this option then say Y. Otherwise say N.
26
27config ALPHA_LEGACY_START_ADDRESS 19config ALPHA_LEGACY_START_ADDRESS
28 bool "Legacy kernel start address" 20 bool "Legacy kernel start address"
29 depends on ALPHA_GENERIC 21 depends on ALPHA_GENERIC
diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c
index f278cdf3a72f..8e182ced1a0f 100644
--- a/arch/frv/kernel/semaphore.c
+++ b/arch/frv/kernel/semaphore.c
@@ -19,7 +19,7 @@ struct sem_waiter {
19 struct task_struct *task; 19 struct task_struct *task;
20}; 20};
21 21
22#if SEMAPHORE_DEBUG 22#ifdef CONFIG_DEBUG_SEMAPHORE
23void semtrace(struct semaphore *sem, const char *str) 23void semtrace(struct semaphore *sem, const char *str)
24{ 24{
25 if (sem->debug) 25 if (sem->debug)
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
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 9a287796da8e..9bd002a00484 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -201,6 +201,16 @@ config DEBUG_MUTEXES
201 This feature allows mutex semantics violations to be detected and 201 This feature allows mutex semantics violations to be detected and
202 reported. 202 reported.
203 203
204config DEBUG_SEMAPHORE
205 bool "Semaphore debugging"
206 depends on DEBUG_KERNEL
207 depends on ALPHA || FRV
208 default n
209 help
210 If you say Y here then semaphore processing will issue lots of
211 verbose debugging messages. If you suspect a semaphore problem or a
212 kernel hacker asks for this option then say Y. Otherwise say N.
213
204config DEBUG_LOCK_ALLOC 214config DEBUG_LOCK_ALLOC
205 bool "Lock debugging: detect incorrect freeing of live locks" 215 bool "Lock debugging: detect incorrect freeing of live locks"
206 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 216 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT