[PATCH 2/4] mark lockdep functions as noinline_for_stack

From: Eric Sandeen
Date: Tue Apr 22 2008 - 11:55:04 EST


Use the self-documenting noinline_for_stack attribute
in lockdep functions.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

Index: linux-2.6.25/kernel/lockdep.c
===================================================================
--- linux-2.6.25.orig/kernel/lockdep.c 2008-04-22 10:31:08.158469196 -0500
+++ linux-2.6.25/kernel/lockdep.c 2008-04-22 10:51:17.107410380 -0500
@@ -878,7 +878,7 @@ static struct held_lock *check_source, *
* Print a dependency chain entry (this is only done when a deadlock
* has been detected):
*/
-static noinline int
+static noinline_for_stack int
print_circular_bug_entry(struct lock_list *target, unsigned int depth)
{
if (debug_locks_silent)
@@ -895,7 +895,7 @@ print_circular_bug_entry(struct lock_lis
* When a circular dependency is detected, print the
* header first:
*/
-static noinline int
+static noinline_for_stack int
print_circular_bug_header(struct lock_list *entry, unsigned int depth)
{
struct task_struct *curr = current;
@@ -920,7 +920,7 @@ print_circular_bug_header(struct lock_li
return 0;
}

-static noinline int print_circular_bug_tail(void)
+static noinline_for_stack int print_circular_bug_tail(void)
{
struct task_struct *curr = current;
struct lock_list this;
@@ -945,7 +945,7 @@ static noinline int print_circular_bug_t

#define RECURSION_LIMIT 40

-static int noinline print_infinite_recursion_bug(void)
+static int noinline_for_stack print_infinite_recursion_bug(void)
{
if (!debug_locks_off_graph_unlock())
return 0;
@@ -959,7 +959,7 @@ static int noinline print_infinite_recur
* Prove that the dependency graph starting at <entry> can not
* lead to <target>. Print an error and return 0 if it does.
*/
-static noinline int
+static noinline_for_stack int
check_noncircular(struct lock_class *source, unsigned int depth)
{
struct lock_list *entry;
@@ -1001,7 +1001,7 @@ static struct lock_class *forwards_match
* Return 1 otherwise and keep <forwards_match> unchanged.
* Return 0 on error.
*/
-static noinline int
+static noinline_for_stack int
find_usage_forwards(struct lock_class *source, unsigned int depth)
{
struct lock_list *entry;
@@ -1040,7 +1040,7 @@ find_usage_forwards(struct lock_class *s
* Return 1 otherwise and keep <backwards_match> unchanged.
* Return 0 on error.
*/
-static noinline int
+static noinline_for_stack int
find_usage_backwards(struct lock_class *source, unsigned int depth)
{
struct lock_list *entry;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/