locking/lockdep: Mark local_lock_t
[ Upstream commit dfd5e3f5fe27bda91d5cc028c86ffbb7a0614489 ] The local_lock_t's are special, because they cannot form IRQ inversions, make sure we can tell them apart from the rest of the locks. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
22b106df73
commit
d5462a630f
@@ -185,12 +185,19 @@ extern void lockdep_unregister_key(struct lock_class_key *key);
|
||||
* to lockdep:
|
||||
*/
|
||||
|
||||
extern void lockdep_init_map_waits(struct lockdep_map *lock, const char *name,
|
||||
struct lock_class_key *key, int subclass, short inner, short outer);
|
||||
extern void lockdep_init_map_type(struct lockdep_map *lock, const char *name,
|
||||
struct lock_class_key *key, int subclass, u8 inner, u8 outer, u8 lock_type);
|
||||
|
||||
static inline void
|
||||
lockdep_init_map_waits(struct lockdep_map *lock, const char *name,
|
||||
struct lock_class_key *key, int subclass, u8 inner, u8 outer)
|
||||
{
|
||||
lockdep_init_map_type(lock, name, key, subclass, inner, LD_WAIT_INV, LD_LOCK_NORMAL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
lockdep_init_map_wait(struct lockdep_map *lock, const char *name,
|
||||
struct lock_class_key *key, int subclass, short inner)
|
||||
struct lock_class_key *key, int subclass, u8 inner)
|
||||
{
|
||||
lockdep_init_map_waits(lock, name, key, subclass, inner, LD_WAIT_INV);
|
||||
}
|
||||
@@ -340,6 +347,8 @@ static inline void lockdep_set_selftest_task(struct task_struct *task)
|
||||
# define lock_set_class(l, n, k, s, i) do { } while (0)
|
||||
# define lock_set_subclass(l, s, i) do { } while (0)
|
||||
# define lockdep_init() do { } while (0)
|
||||
# define lockdep_init_map_type(lock, name, key, sub, inner, outer, type) \
|
||||
do { (void)(name); (void)(key); } while (0)
|
||||
# define lockdep_init_map_waits(lock, name, key, sub, inner, outer) \
|
||||
do { (void)(name); (void)(key); } while (0)
|
||||
# define lockdep_init_map_wait(lock, name, key, sub, inner) \
|
||||
|
Reference in New Issue
Block a user