lkml.org 
[lkml]   [2007]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/7] 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>
    ---
    include/linux/spinlock_types.h | 4 ++--
    include/linux/spinlock_types_up.h | 9 +--------
    2 files changed, 3 insertions(+), 10 deletions(-)

    Index: linux-2.6/include/linux/spinlock_types_up.h
    ===================================================================
    --- linux-2.6.orig/include/linux/spinlock_types_up.h 2007-02-20 13:22:26.000000000 +0100
    +++ linux-2.6/include/linux/spinlock_types_up.h 2007-05-21 14:42:55.000000000 +0200
    @@ -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/include/linux/spinlock_types.h
    ===================================================================
    --- linux-2.6.orig/include/linux/spinlock_types.h 2007-05-21 14:43:19.000000000 +0200
    +++ linux-2.6/include/linux/spinlock_types.h 2007-05-21 14:43:31.000000000 +0200
    @@ -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/

    \
     
     \ /
      Last update: 2007-05-23 12:07    [W:0.028 / U:0.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site