From c761c84154dcd952182e4867d841298c9eb0b14b Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 8 May 2007 00:25:02 -0700 Subject: 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 Cc: David Howells Cc: Ivan Kokshaysky Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-frv/semaphore.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'include') 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 @@ #include #include -#define SEMAPHORE_DEBUG 0 - /* * the semaphore definition * - if counter is >0 then there are tokens available on the semaphore for down to collect @@ -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) @@ -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 @@ -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 @@ -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 @@ -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 -- cgit v1.2.3