I thought that we already fall back to the functions that spin while
having interrupts disabled if lockdep is on?
One issue: The BREAKLOCK value needs to be 1 in the fallback case
otherwise we needlessly run atomic ops.
---
kernel/spinlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/spinlock.c
===================================================================
--- linux-2.6.orig/kernel/spinlock.c 2008-05-07 16:00:06.000000000 -0700
+++ linux-2.6/kernel/spinlock.c 2008-05-07 16:00:29.000000000 -0700
@@ -218,7 +218,7 @@ do { \
#else
-#define BREAKLOCK(lock) 0
+#define BREAKLOCK(lock) 1
#define BREAKLOCK_ENABLE(lock) do { } while (0)
#define BREAKLOCK_DISABLE(lock) do { } while (0)
--