Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54564
b: refs/heads/master
c: c761c84
h: refs/heads/master
v: v3
  • Loading branch information
Robert P. J. Day authored and Linus Torvalds committed May 8, 2007
1 parent e52e7b6 commit edf2d6e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f87367a6b1e3ec1fd440158e5eb357fbd5c2288e
refs/heads/master: c761c84154dcd952182e4867d841298c9eb0b14b
8 changes: 0 additions & 8 deletions trunk/arch/alpha/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ config DEBUG_RWLOCK
too many attempts. If you suspect a rwlock problem or a kernel
hacker asks for this option then say Y. Otherwise say N.

config DEBUG_SEMAPHORE
bool "Semaphore debugging"
depends on DEBUG_KERNEL
help
If you say Y here then semaphore processing will issue lots of
verbose debugging messages. If you suspect a semaphore problem or a
kernel hacker asks for this option then say Y. Otherwise say N.

config ALPHA_LEGACY_START_ADDRESS
bool "Legacy kernel start address"
depends on ALPHA_GENERIC
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/frv/kernel/semaphore.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct sem_waiter {
struct task_struct *task;
};

#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
void semtrace(struct semaphore *sem, const char *str)
{
if (sem->debug)
Expand Down
14 changes: 6 additions & 8 deletions trunk/include/asm-frv/semaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <linux/spinlock.h>
#include <linux/rwsem.h>

#define SEMAPHORE_DEBUG 0

/*
* the semaphore definition
* - if counter is >0 then there are tokens available on the semaphore for down to collect
Expand All @@ -32,12 +30,12 @@ struct semaphore {
unsigned counter;
spinlock_t wait_lock;
struct list_head wait_list;
#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
unsigned __magic;
#endif
};

#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic
#else
# define __SEM_DEBUG_INIT(name)
Expand Down Expand Up @@ -76,7 +74,7 @@ static inline void down(struct semaphore *sem)
{
unsigned long flags;

#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
CHECK_MAGIC(sem->__magic);
#endif

Expand All @@ -95,7 +93,7 @@ static inline int down_interruptible(struct semaphore *sem)
unsigned long flags;
int ret = 0;

#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
CHECK_MAGIC(sem->__magic);
#endif

Expand All @@ -119,7 +117,7 @@ static inline int down_trylock(struct semaphore *sem)
unsigned long flags;
int success = 0;

#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
CHECK_MAGIC(sem->__magic);
#endif

Expand All @@ -136,7 +134,7 @@ static inline void up(struct semaphore *sem)
{
unsigned long flags;

#if SEMAPHORE_DEBUG
#ifdef CONFIG_DEBUG_SEMAPHORE
CHECK_MAGIC(sem->__magic);
#endif

Expand Down
10 changes: 10 additions & 0 deletions trunk/lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@ config DEBUG_MUTEXES
This feature allows mutex semantics violations to be detected and
reported.

config DEBUG_SEMAPHORE
bool "Semaphore debugging"
depends on DEBUG_KERNEL
depends on ALPHA || FRV
default n
help
If you say Y here then semaphore processing will issue lots of
verbose debugging messages. If you suspect a semaphore problem or a
kernel hacker asks for this option then say Y. Otherwise say N.

config DEBUG_LOCK_ALLOC
bool "Lock debugging: detect incorrect freeing of live locks"
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
Expand Down

0 comments on commit edf2d6e

Please sign in to comment.