* [PATCH RT] Move RECURSION_LIMIT define up for more global use (take 2)
@ 2007-08-01 3:26 Steven Rostedt
2007-08-01 6:06 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2007-08-01 3:26 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, LKML, linux-rt-users
OK, I sent this out once before but it must have slipped under the radar.
http://lkml.org/lkml/2007/6/28/325
My config fails miserably with lockdep:
kernel/lockdep.c: In function 'find_usage_forwards':
kernel/lockdep.c:814: error: 'RECURSION_LIMIT' undeclared (first use in
this function)
kernel/lockdep.c:814: error: (Each undeclared identifier is reported only
once
kernel/lockdep.c:814: error: for each function it appears in.)
kernel/lockdep.c:815: warning: implicit declaration of function
'print_infinite_recursion_bug'
kernel/lockdep.c: In function 'find_usage_backwards':
kernel/lockdep.c:856: error: 'RECURSION_LIMIT' undeclared (first use in
this function)
make[1]: *** [kernel/lockdep.o] Error 1
But this patch fixes it nicely.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Index: linux-2.6.22.1-rt9/kernel/lockdep.c
===================================================================
--- linux-2.6.22.1-rt9.orig/kernel/lockdep.c 2007-07-31 23:14:12.000000000 -0400
+++ linux-2.6.22.1-rt9/kernel/lockdep.c 2007-07-31 23:25:04.000000000 -0400
@@ -683,6 +683,21 @@ static void print_kernel_version(void)
init_utsname()->version);
}
+#if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_TRACE_IRQFLAGS)
+
+#define RECURSION_LIMIT 40
+
+static int noinline print_infinite_recursion_bug(void)
+{
+ if (!debug_locks_off_graph_unlock())
+ return 0;
+
+ WARN_ON(1);
+
+ return 0;
+}
+#endif /* CONFIG_PROVE_LOCKING || CONFIG_TRACE_IRQFLAGS */
+
#ifdef CONFIG_PROVE_LOCKING
/*
* When a circular dependency is detected, print the
@@ -736,18 +751,6 @@ static noinline int print_circular_bug_t
return 0;
}
-#define RECURSION_LIMIT 40
-
-static int noinline print_infinite_recursion_bug(void)
-{
- if (!debug_locks_off_graph_unlock())
- return 0;
-
- WARN_ON(1);
-
- return 0;
-}
-
/*
* Prove that the dependency graph starting at <entry> can not
* lead to <target>. Print an error and return 0 if it does.
@@ -874,6 +877,7 @@ find_usage_backwards(struct lock_class *
return 1;
}
+#ifdef CONFIG_PROVE_LOCKING
static int
print_bad_irq_dependency(struct task_struct *curr,
struct held_lock *prev,
@@ -956,6 +960,7 @@ check_usage(struct task_struct *curr, st
return print_bad_irq_dependency(curr, prev, next,
bit_backwards, bit_forwards, irqclass);
}
+#endif /* CONFIG_PROVE_LOCKING */
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RT] Move RECURSION_LIMIT define up for more global use (take 2)
2007-08-01 3:26 [PATCH RT] Move RECURSION_LIMIT define up for more global use (take 2) Steven Rostedt
@ 2007-08-01 6:06 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2007-08-01 6:06 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Thomas Gleixner, LKML, linux-rt-users
* Steven Rostedt <rostedt@goodmis.org> wrote:
> OK, I sent this out once before but it must have slipped under the
> radar. http://lkml.org/lkml/2007/6/28/325
thanks - applied.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-01 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-01 3:26 [PATCH RT] Move RECURSION_LIMIT define up for more global use (take 2) Steven Rostedt
2007-08-01 6:06 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®