Commit 4ff773bb authored by Jarek Poplawski's avatar Jarek Poplawski Committed by Linus Torvalds

lockdep: removed unused ip argument in mark_lock & mark_held_locks

It looks like a remainder from designing...
Signed-off-by: default avatarJarek Poplawski <jarkao@o2.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0bb5e19d
...@@ -1574,7 +1574,7 @@ valid_state(struct task_struct *curr, struct held_lock *this, ...@@ -1574,7 +1574,7 @@ valid_state(struct task_struct *curr, struct held_lock *this,
* Mark a lock with a usage bit, and validate the state transition: * Mark a lock with a usage bit, and validate the state transition:
*/ */
static int mark_lock(struct task_struct *curr, struct held_lock *this, static int mark_lock(struct task_struct *curr, struct held_lock *this,
enum lock_usage_bit new_bit, unsigned long ip) enum lock_usage_bit new_bit)
{ {
unsigned int new_mask = 1 << new_bit, ret = 1; unsigned int new_mask = 1 << new_bit, ret = 1;
...@@ -1597,14 +1597,6 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, ...@@ -1597,14 +1597,6 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
this->class->usage_mask |= new_mask; this->class->usage_mask |= new_mask;
#ifdef CONFIG_TRACE_IRQFLAGS
if (new_bit == LOCK_ENABLED_HARDIRQS ||
new_bit == LOCK_ENABLED_HARDIRQS_READ)
ip = curr->hardirq_enable_ip;
else if (new_bit == LOCK_ENABLED_SOFTIRQS ||
new_bit == LOCK_ENABLED_SOFTIRQS_READ)
ip = curr->softirq_enable_ip;
#endif
if (!save_trace(this->class->usage_traces + new_bit)) if (!save_trace(this->class->usage_traces + new_bit))
return 0; return 0;
...@@ -1803,7 +1795,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, ...@@ -1803,7 +1795,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
* Mark all held locks with a usage bit: * Mark all held locks with a usage bit:
*/ */
static int static int
mark_held_locks(struct task_struct *curr, int hardirq, unsigned long ip) mark_held_locks(struct task_struct *curr, int hardirq)
{ {
enum lock_usage_bit usage_bit; enum lock_usage_bit usage_bit;
struct held_lock *hlock; struct held_lock *hlock;
...@@ -1823,7 +1815,7 @@ mark_held_locks(struct task_struct *curr, int hardirq, unsigned long ip) ...@@ -1823,7 +1815,7 @@ mark_held_locks(struct task_struct *curr, int hardirq, unsigned long ip)
else else
usage_bit = LOCK_ENABLED_SOFTIRQS; usage_bit = LOCK_ENABLED_SOFTIRQS;
} }
if (!mark_lock(curr, hlock, usage_bit, ip)) if (!mark_lock(curr, hlock, usage_bit))
return 0; return 0;
} }
...@@ -1876,7 +1868,7 @@ void trace_hardirqs_on(void) ...@@ -1876,7 +1868,7 @@ void trace_hardirqs_on(void)
* We are going to turn hardirqs on, so set the * We are going to turn hardirqs on, so set the
* usage bit for all held locks: * usage bit for all held locks:
*/ */
if (!mark_held_locks(curr, 1, ip)) if (!mark_held_locks(curr, 1))
return; return;
/* /*
* If we have softirqs enabled, then set the usage * If we have softirqs enabled, then set the usage
...@@ -1884,7 +1876,7 @@ void trace_hardirqs_on(void) ...@@ -1884,7 +1876,7 @@ void trace_hardirqs_on(void)
* this bit from being set before) * this bit from being set before)
*/ */
if (curr->softirqs_enabled) if (curr->softirqs_enabled)
if (!mark_held_locks(curr, 0, ip)) if (!mark_held_locks(curr, 0))
return; return;
curr->hardirq_enable_ip = ip; curr->hardirq_enable_ip = ip;
...@@ -1952,7 +1944,7 @@ void trace_softirqs_on(unsigned long ip) ...@@ -1952,7 +1944,7 @@ void trace_softirqs_on(unsigned long ip)
* enabled too: * enabled too:
*/ */
if (curr->hardirqs_enabled) if (curr->hardirqs_enabled)
mark_held_locks(curr, 0, ip); mark_held_locks(curr, 0);
} }
/* /*
...@@ -2090,43 +2082,43 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, ...@@ -2090,43 +2082,43 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
if (read) { if (read) {
if (curr->hardirq_context) if (curr->hardirq_context)
if (!mark_lock(curr, hlock, if (!mark_lock(curr, hlock,
LOCK_USED_IN_HARDIRQ_READ, ip)) LOCK_USED_IN_HARDIRQ_READ))
return 0; return 0;
if (curr->softirq_context) if (curr->softirq_context)
if (!mark_lock(curr, hlock, if (!mark_lock(curr, hlock,
LOCK_USED_IN_SOFTIRQ_READ, ip)) LOCK_USED_IN_SOFTIRQ_READ))
return 0; return 0;
} else { } else {
if (curr->hardirq_context) if (curr->hardirq_context)
if (!mark_lock(curr, hlock, LOCK_USED_IN_HARDIRQ, ip)) if (!mark_lock(curr, hlock, LOCK_USED_IN_HARDIRQ))
return 0; return 0;
if (curr->softirq_context) if (curr->softirq_context)
if (!mark_lock(curr, hlock, LOCK_USED_IN_SOFTIRQ, ip)) if (!mark_lock(curr, hlock, LOCK_USED_IN_SOFTIRQ))
return 0; return 0;
} }
} }
if (!hardirqs_off) { if (!hardirqs_off) {
if (read) { if (read) {
if (!mark_lock(curr, hlock, if (!mark_lock(curr, hlock,
LOCK_ENABLED_HARDIRQS_READ, ip)) LOCK_ENABLED_HARDIRQS_READ))
return 0; return 0;
if (curr->softirqs_enabled) if (curr->softirqs_enabled)
if (!mark_lock(curr, hlock, if (!mark_lock(curr, hlock,
LOCK_ENABLED_SOFTIRQS_READ, ip)) LOCK_ENABLED_SOFTIRQS_READ))
return 0; return 0;
} else { } else {
if (!mark_lock(curr, hlock, if (!mark_lock(curr, hlock,
LOCK_ENABLED_HARDIRQS, ip)) LOCK_ENABLED_HARDIRQS))
return 0; return 0;
if (curr->softirqs_enabled) if (curr->softirqs_enabled)
if (!mark_lock(curr, hlock, if (!mark_lock(curr, hlock,
LOCK_ENABLED_SOFTIRQS, ip)) LOCK_ENABLED_SOFTIRQS))
return 0; return 0;
} }
} }
#endif #endif
/* mark it as used: */ /* mark it as used: */
if (!mark_lock(curr, hlock, LOCK_USED, ip)) if (!mark_lock(curr, hlock, LOCK_USED))
return 0; return 0;
out_calc_hash: out_calc_hash:
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment