Re: [PATCH RT] Move RECURSION_LIMIT define up for global use.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: LKML <linux-kernel@...>
Cc: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>
Date: Thursday, June 28, 2007 - 7:38 pm

On Thu, 28 Jun 2007, Steven Rostedt wrote:

Arg, this wasn't good enough.

Here's a better patch (drop the previous one please).

I also added a ifdef that removes a warning of unused static function.

Thanks,

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Index: linux-2.6.21.5-rt18/kernel/lockdep.c
===================================================================
--- linux-2.6.21.5-rt18.orig/kernel/lockdep.c	2007-06-28 18:36:32.000000000 -0400
+++ linux-2.6.21.5-rt18/kernel/lockdep.c	2007-06-28 19:30:43.000000000 -0400
@@ -687,6 +687,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
@@ -740,18 +755,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.
@@ -878,6 +881,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,
@@ -960,6 +964,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

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RT] Move RECURSION_LIMIT define up for global use., Steven Rostedt, (Thu Jun 28, 6:49 pm)
Re: [PATCH RT] Move RECURSION_LIMIT define up for global use., Steven Rostedt, (Thu Jun 28, 7:38 pm)