lockdep: sanitize reclaim bit names

s/HELD_OVER/ENABLED/g

so that its similar to the hard and soft-irq names.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra 2009-01-22 13:13:11 +01:00 committed by Ingo Molnar
parent 4fc95e867f
commit a652d7081b
2 changed files with 23 additions and 23 deletions

View file

@ -30,13 +30,13 @@ enum lock_usage_bit
LOCK_USED_IN_RECLAIM_FS, LOCK_USED_IN_RECLAIM_FS,
LOCK_ENABLED_SOFTIRQ, LOCK_ENABLED_SOFTIRQ,
LOCK_ENABLED_HARDIRQ, LOCK_ENABLED_HARDIRQ,
LOCK_HELD_OVER_RECLAIM_FS, LOCK_ENABLED_RECLAIM_FS,
LOCK_USED_IN_HARDIRQ_READ, LOCK_USED_IN_HARDIRQ_READ,
LOCK_USED_IN_SOFTIRQ_READ, LOCK_USED_IN_SOFTIRQ_READ,
LOCK_USED_IN_RECLAIM_FS_READ, LOCK_USED_IN_RECLAIM_FS_READ,
LOCK_ENABLED_SOFTIRQ_READ, LOCK_ENABLED_SOFTIRQ_READ,
LOCK_ENABLED_HARDIRQ_READ, LOCK_ENABLED_HARDIRQ_READ,
LOCK_HELD_OVER_RECLAIM_FS_READ, LOCK_ENABLED_RECLAIM_FS_READ,
LOCK_USAGE_STATES LOCK_USAGE_STATES
}; };
@ -49,7 +49,7 @@ enum lock_usage_bit
#define LOCKF_USED_IN_RECLAIM_FS (1 << LOCK_USED_IN_RECLAIM_FS) #define LOCKF_USED_IN_RECLAIM_FS (1 << LOCK_USED_IN_RECLAIM_FS)
#define LOCKF_ENABLED_HARDIRQ (1 << LOCK_ENABLED_HARDIRQ) #define LOCKF_ENABLED_HARDIRQ (1 << LOCK_ENABLED_HARDIRQ)
#define LOCKF_ENABLED_SOFTIRQ (1 << LOCK_ENABLED_SOFTIRQ) #define LOCKF_ENABLED_SOFTIRQ (1 << LOCK_ENABLED_SOFTIRQ)
#define LOCKF_HELD_OVER_RECLAIM_FS (1 << LOCK_HELD_OVER_RECLAIM_FS) #define LOCKF_ENABLED_RECLAIM_FS (1 << LOCK_ENABLED_RECLAIM_FS)
#define LOCKF_ENABLED_IRQ (LOCKF_ENABLED_HARDIRQ | LOCKF_ENABLED_SOFTIRQ) #define LOCKF_ENABLED_IRQ (LOCKF_ENABLED_HARDIRQ | LOCKF_ENABLED_SOFTIRQ)
#define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ) #define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ)
@ -59,7 +59,7 @@ enum lock_usage_bit
#define LOCKF_USED_IN_RECLAIM_FS_READ (1 << LOCK_USED_IN_RECLAIM_FS_READ) #define LOCKF_USED_IN_RECLAIM_FS_READ (1 << LOCK_USED_IN_RECLAIM_FS_READ)
#define LOCKF_ENABLED_HARDIRQ_READ (1 << LOCK_ENABLED_HARDIRQ_READ) #define LOCKF_ENABLED_HARDIRQ_READ (1 << LOCK_ENABLED_HARDIRQ_READ)
#define LOCKF_ENABLED_SOFTIRQ_READ (1 << LOCK_ENABLED_SOFTIRQ_READ) #define LOCKF_ENABLED_SOFTIRQ_READ (1 << LOCK_ENABLED_SOFTIRQ_READ)
#define LOCKF_HELD_OVER_RECLAIM_FS_READ (1 << LOCK_HELD_OVER_RECLAIM_FS_READ) #define LOCKF_ENABLED_RECLAIM_FS_READ (1 << LOCK_ENABLED_RECLAIM_FS_READ)
#define LOCKF_ENABLED_IRQ_READ \ #define LOCKF_ENABLED_IRQ_READ \
(LOCKF_ENABLED_HARDIRQ_READ | LOCKF_ENABLED_SOFTIRQ_READ) (LOCKF_ENABLED_HARDIRQ_READ | LOCKF_ENABLED_SOFTIRQ_READ)

View file

@ -458,8 +458,8 @@ static const char *usage_str[] =
[LOCK_ENABLED_HARDIRQ_READ] = "hardirq-on-R", [LOCK_ENABLED_HARDIRQ_READ] = "hardirq-on-R",
[LOCK_USED_IN_RECLAIM_FS] = "in-reclaim-W", [LOCK_USED_IN_RECLAIM_FS] = "in-reclaim-W",
[LOCK_USED_IN_RECLAIM_FS_READ] = "in-reclaim-R", [LOCK_USED_IN_RECLAIM_FS_READ] = "in-reclaim-R",
[LOCK_HELD_OVER_RECLAIM_FS] = "ov-reclaim-W", [LOCK_ENABLED_RECLAIM_FS] = "ov-reclaim-W",
[LOCK_HELD_OVER_RECLAIM_FS_READ] = "ov-reclaim-R", [LOCK_ENABLED_RECLAIM_FS_READ] = "ov-reclaim-R",
}; };
const char * __get_key_name(struct lockdep_subclass_key *key, char *str) const char * __get_key_name(struct lockdep_subclass_key *key, char *str)
@ -504,14 +504,14 @@ get_usage_chars(struct lock_class *class, char *c1, char *c2, char *c3,
if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS) if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS)
*c5 = '+'; *c5 = '+';
else else
if (class->usage_mask & LOCKF_HELD_OVER_RECLAIM_FS) if (class->usage_mask & LOCKF_ENABLED_RECLAIM_FS)
*c5 = '-'; *c5 = '-';
if (class->usage_mask & LOCKF_HELD_OVER_RECLAIM_FS_READ) if (class->usage_mask & LOCKF_ENABLED_RECLAIM_FS_READ)
*c6 = '-'; *c6 = '-';
if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS_READ) { if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS_READ) {
*c6 = '+'; *c6 = '+';
if (class->usage_mask & LOCKF_HELD_OVER_RECLAIM_FS_READ) if (class->usage_mask & LOCKF_ENABLED_RECLAIM_FS_READ)
*c6 = '?'; *c6 = '?';
} }
@ -1335,7 +1335,7 @@ check_prev_add_irq(struct task_struct *curr, struct held_lock *prev,
* forwards-subgraph starting at <next>: * forwards-subgraph starting at <next>:
*/ */
if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS, if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS,
LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs")) LOCK_ENABLED_RECLAIM_FS, "reclaim-fs"))
return 0; return 0;
/* /*
@ -1345,7 +1345,7 @@ check_prev_add_irq(struct task_struct *curr, struct held_lock *prev,
* forwards-subgraph starting at <next>: * forwards-subgraph starting at <next>:
*/ */
if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS_READ, if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS_READ,
LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs-read")) LOCK_ENABLED_RECLAIM_FS, "reclaim-fs-read"))
return 0; return 0;
return 1; return 1;
@ -2058,17 +2058,17 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
ret = 2; ret = 2;
break; break;
case LOCK_USED_IN_RECLAIM_FS: case LOCK_USED_IN_RECLAIM_FS:
if (!valid_state(curr, this, new_bit, LOCK_HELD_OVER_RECLAIM_FS)) if (!valid_state(curr, this, new_bit, LOCK_ENABLED_RECLAIM_FS))
return 0; return 0;
if (!valid_state(curr, this, new_bit, if (!valid_state(curr, this, new_bit,
LOCK_HELD_OVER_RECLAIM_FS_READ)) LOCK_ENABLED_RECLAIM_FS_READ))
return 0; return 0;
/* /*
* just marked it reclaim-fs-safe, check that this lock * just marked it reclaim-fs-safe, check that this lock
* took no reclaim-fs-unsafe lock in the past: * took no reclaim-fs-unsafe lock in the past:
*/ */
if (!check_usage_forwards(curr, this, if (!check_usage_forwards(curr, this,
LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs")) LOCK_ENABLED_RECLAIM_FS, "reclaim-fs"))
return 0; return 0;
#if STRICT_READ_CHECKS #if STRICT_READ_CHECKS
/* /*
@ -2076,7 +2076,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
* took no reclaim-fs-unsafe-read lock in the past: * took no reclaim-fs-unsafe-read lock in the past:
*/ */
if (!check_usage_forwards(curr, this, if (!check_usage_forwards(curr, this,
LOCK_HELD_OVER_RECLAIM_FS_READ, "reclaim-fs-read")) LOCK_ENABLED_RECLAIM_FS_READ, "reclaim-fs-read"))
return 0; return 0;
#endif #endif
if (reclaim_verbose(hlock_class(this))) if (reclaim_verbose(hlock_class(this)))
@ -2109,14 +2109,14 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
ret = 2; ret = 2;
break; break;
case LOCK_USED_IN_RECLAIM_FS_READ: case LOCK_USED_IN_RECLAIM_FS_READ:
if (!valid_state(curr, this, new_bit, LOCK_HELD_OVER_RECLAIM_FS)) if (!valid_state(curr, this, new_bit, LOCK_ENABLED_RECLAIM_FS))
return 0; return 0;
/* /*
* just marked it reclaim-fs-read-safe, check that this lock * just marked it reclaim-fs-read-safe, check that this lock
* took no reclaim-fs-unsafe lock in the past: * took no reclaim-fs-unsafe lock in the past:
*/ */
if (!check_usage_forwards(curr, this, if (!check_usage_forwards(curr, this,
LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs")) LOCK_ENABLED_RECLAIM_FS, "reclaim-fs"))
return 0; return 0;
if (reclaim_verbose(hlock_class(this))) if (reclaim_verbose(hlock_class(this)))
ret = 2; ret = 2;
@ -2173,7 +2173,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
if (softirq_verbose(hlock_class(this))) if (softirq_verbose(hlock_class(this)))
ret = 2; ret = 2;
break; break;
case LOCK_HELD_OVER_RECLAIM_FS: case LOCK_ENABLED_RECLAIM_FS:
if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS)) if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS))
return 0; return 0;
if (!valid_state(curr, this, new_bit, if (!valid_state(curr, this, new_bit,
@ -2229,7 +2229,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
if (softirq_verbose(hlock_class(this))) if (softirq_verbose(hlock_class(this)))
ret = 2; ret = 2;
break; break;
case LOCK_HELD_OVER_RECLAIM_FS_READ: case LOCK_ENABLED_RECLAIM_FS_READ:
if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS)) if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS))
return 0; return 0;
#if STRICT_READ_CHECKS #if STRICT_READ_CHECKS
@ -2288,9 +2288,9 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)
case RECLAIM_FS: case RECLAIM_FS:
if (hlock->read) if (hlock->read)
usage_bit = LOCK_HELD_OVER_RECLAIM_FS_READ; usage_bit = LOCK_ENABLED_RECLAIM_FS_READ;
else else
usage_bit = LOCK_HELD_OVER_RECLAIM_FS; usage_bit = LOCK_ENABLED_RECLAIM_FS;
break; break;
default: default:
@ -2646,8 +2646,8 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
case LOCK_ENABLED_SOFTIRQ_READ: case LOCK_ENABLED_SOFTIRQ_READ:
case LOCK_USED_IN_RECLAIM_FS: case LOCK_USED_IN_RECLAIM_FS:
case LOCK_USED_IN_RECLAIM_FS_READ: case LOCK_USED_IN_RECLAIM_FS_READ:
case LOCK_HELD_OVER_RECLAIM_FS: case LOCK_ENABLED_RECLAIM_FS:
case LOCK_HELD_OVER_RECLAIM_FS_READ: case LOCK_ENABLED_RECLAIM_FS_READ:
ret = mark_lock_irq(curr, this, new_bit); ret = mark_lock_irq(curr, this, new_bit);
if (!ret) if (!ret)
return 0; return 0;