Messages in this thread Patch in this message | | | Date | Tue, 29 May 2007 14:52:49 +0200 | From | Peter Zijlstra <> | Subject | [PATCH 1/5] fix raw_spinlock_t vs lockdep |
| |
raw_spinlock_t should not use lockdep (and doesn't) since lockdep itself relies on it.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Ingo Molnar <mingo@elte.hu> --- include/linux/spinlock_types.h | 4 ++-- include/linux/spinlock_types_up.h | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-)
Index: linux-2.6-git/include/linux/spinlock_types_up.h =================================================================== --- linux-2.6-git.orig/include/linux/spinlock_types_up.h +++ linux-2.6-git/include/linux/spinlock_types_up.h @@ -12,14 +12,10 @@ * Released under the General Public License (GPL). */ -#if defined(CONFIG_DEBUG_SPINLOCK) || \ - defined(CONFIG_DEBUG_LOCK_ALLOC) +#ifdef CONFIG_DEBUG_SPINLOCK typedef struct { volatile unsigned int slock; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } raw_spinlock_t; #define __RAW_SPIN_LOCK_UNLOCKED { 1 } @@ -34,9 +30,6 @@ typedef struct { } raw_spinlock_t; typedef struct { /* no debug version on UP */ -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } raw_rwlock_t; #define __RAW_RW_LOCK_UNLOCKED { } Index: linux-2.6-git/include/linux/spinlock_types.h =================================================================== --- linux-2.6-git.orig/include/linux/spinlock_types.h +++ linux-2.6-git/include/linux/spinlock_types.h @@ -9,14 +9,14 @@ * Released under the General Public License (GPL). */ -#include <linux/lockdep.h> - #if defined(CONFIG_SMP) # include <asm/spinlock_types.h> #else # include <linux/spinlock_types_up.h> #endif +#include <linux/lockdep.h> + typedef struct { raw_spinlock_t raw_lock; #if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) --
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |