public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Bill Huey <billh@gnuppy.monkey.org>,
	Jason Baron <jbaron@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Christoph Hellwig <hch@infradead.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 1/7] fix raw_spinlock_t vs lockdep
Date: Wed, 23 May 2007 11:57:17 +0200	[thread overview]
Message-ID: <20070523095807.212984885@chello.nl> (raw)
In-Reply-To: 20070523072618.129001605@chello.nl

[-- Attachment #1: raw_spinlock_fix.patch --]
[-- Type: text/plain, Size: 1826 bytes --]

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)

-- 


  reply	other threads:[~2007-05-23 10:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23  9:57 [PATCH 0/7] lock contention tracking -v2 Peter Zijlstra
2007-05-23  9:57 ` Peter Zijlstra [this message]
2007-05-23  9:57 ` [PATCH 2/7] lockdep: isolate lock graph walking Peter Zijlstra
2007-05-23  9:57 ` [PATCH 3/7] lockdep: lock contention tracking Peter Zijlstra
2007-05-23 14:40   ` Jason Baron
2007-05-23 15:07     ` Peter Zijlstra
2007-05-23 16:11       ` Jason Baron
2007-05-23 17:23         ` Peter Zijlstra
2007-05-23 17:24           ` Jason Baron
2007-05-23  9:57 ` [PATCH 4/7] lockdep: add waittime to the lock statistics Peter Zijlstra
2007-05-23  9:57 ` [PATCH 5/7] lockdep: add holdtime " Peter Zijlstra
2007-05-23  9:57 ` [PATCH 6/7] lockdep: runtime configure prove_locking and lock_stat Peter Zijlstra
2007-05-23  9:57 ` [PATCH 7/7] lockdep: scalable statistics Peter Zijlstra
2007-05-23 10:33 ` [PATCH 0/7] lock contention tracking -v2 Ingo Molnar
2007-05-23 21:57   ` Bill Huey
2007-05-23 15:10 ` [PATCH 8/7] new output format Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070523095807.212984885@chello.nl \
    --to=a.p.zijlstra@chello.nl \
    --cc=billh@gnuppy.monkey.org \
    --cc=hch@infradead.org \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox