Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61634
b: refs/heads/master
c: ca58abc
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Jul 19, 2007
1 parent 5cef39c commit 28ee5c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21f8ca3bf6198bd21e3c4cc820af2ccf753a6ec8
refs/heads/master: ca58abcb4a6d52ee2db1b1130cea3ca2a76677b9
13 changes: 12 additions & 1 deletion trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static int lockdep_initialized;
unsigned long nr_list_entries;
static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];

#ifdef CONFIG_PROVE_LOCKING
/*
* Allocate a lockdep entry. (assumes the graph_lock held, returns
* with NULL on failure)
Expand All @@ -111,6 +112,7 @@ static struct lock_list *alloc_list_entry(void)
}
return list_entries + nr_list_entries++;
}
#endif

/*
* All data structures here are protected by the global debug_lock.
Expand Down Expand Up @@ -140,7 +142,9 @@ LIST_HEAD(all_lock_classes);
static struct list_head classhash_table[CLASSHASH_SIZE];

unsigned long nr_lock_chains;
#ifdef CONFIG_PROVE_LOCKING
static struct lock_chain lock_chains[MAX_LOCKDEP_CHAINS];
#endif

/*
* We put the lock dependency chains into a hash-table as well, to cache
Expand Down Expand Up @@ -482,6 +486,7 @@ static void print_lock_dependencies(struct lock_class *class, int depth)
}
}

#ifdef CONFIG_PROVE_LOCKING
/*
* Add a new dependency to the head of the list:
*/
Expand Down Expand Up @@ -541,6 +546,7 @@ print_circular_bug_entry(struct lock_list *target, unsigned int depth)

return 0;
}
#endif

static void print_kernel_version(void)
{
Expand All @@ -549,6 +555,7 @@ static void print_kernel_version(void)
init_utsname()->version);
}

#ifdef CONFIG_PROVE_LOCKING
/*
* When a circular dependency is detected, print the
* header first:
Expand Down Expand Up @@ -639,6 +646,7 @@ check_noncircular(struct lock_class *source, unsigned int depth)
}
return 1;
}
#endif

static int very_verbose(struct lock_class *class)
{
Expand Down Expand Up @@ -823,6 +831,7 @@ check_usage(struct task_struct *curr, struct held_lock *prev,

#endif

#ifdef CONFIG_PROVE_LOCKING
static int
print_deadlock_bug(struct task_struct *curr, struct held_lock *prev,
struct held_lock *next)
Expand Down Expand Up @@ -1087,7 +1096,7 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)

return 0;
}

#endif

/*
* Is this the address of a static object:
Expand Down Expand Up @@ -1307,6 +1316,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
return class;
}

#ifdef CONFIG_PROVE_LOCKING
/*
* Look up a dependency chain. If the key is not present yet then
* add it and return 1 - in this case the new dependency chain is
Expand Down Expand Up @@ -1381,6 +1391,7 @@ static inline int lookup_chain_cache(u64 chain_key, struct lock_class *class)

return 1;
}
#endif

/*
* We are building curr_chain_key incrementally, so double-check
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
* _raw_spin_lock_flags() code, because lockdep assumes
* that interrupts are not re-enabled during lock-acquire:
*/
#ifdef CONFIG_PROVE_LOCKING
#ifdef CONFIG_LOCKDEP
_raw_spin_lock(lock);
#else
_raw_spin_lock_flags(lock, &flags);
Expand Down Expand Up @@ -305,7 +305,7 @@ unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclas
* _raw_spin_lock_flags() code, because lockdep assumes
* that interrupts are not re-enabled during lock-acquire:
*/
#ifdef CONFIG_PROVE_SPIN_LOCKING
#ifdef CONFIG_LOCKDEP
_raw_spin_lock(lock);
#else
_raw_spin_lock_flags(lock, &flags);
Expand Down

0 comments on commit 28ee5c0

Please sign in to comment.