aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockdep_types.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-12-09 16:06:21 +0100
committerPeter Zijlstra <peterz@infradead.org>2021-01-14 11:20:17 +0100
commitdfd5e3f5fe27bda91d5cc028c86ffbb7a0614489 (patch)
tree6c35b4446fad60c64be61e7808ca1d710e6022da /include/linux/lockdep_types.h
parentlocking/selftests: More granular debug_locks_verbose (diff)
downloadlinux-dev-dfd5e3f5fe27bda91d5cc028c86ffbb7a0614489.tar.xz
linux-dev-dfd5e3f5fe27bda91d5cc028c86ffbb7a0614489.zip
locking/lockdep: Mark local_lock_t
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>
Diffstat (limited to 'include/linux/lockdep_types.h')
-rw-r--r--include/linux/lockdep_types.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/lockdep_types.h b/include/linux/lockdep_types.h
index 9a1fd49df17f..2ec9ff5a7fff 100644
--- a/include/linux/lockdep_types.h
+++ b/include/linux/lockdep_types.h
@@ -30,6 +30,12 @@ enum lockdep_wait_type {
LD_WAIT_MAX, /* must be last */
};
+enum lockdep_lock_type {
+ LD_LOCK_NORMAL = 0, /* normal, catch all */
+ LD_LOCK_PERCPU, /* percpu */
+ LD_LOCK_MAX,
+};
+
#ifdef CONFIG_LOCKDEP
/*
@@ -119,8 +125,10 @@ struct lock_class {
int name_version;
const char *name;
- short wait_type_inner;
- short wait_type_outer;
+ u8 wait_type_inner;
+ u8 wait_type_outer;
+ u8 lock_type;
+ /* u8 hole; */
#ifdef CONFIG_LOCK_STAT
unsigned long contention_point[LOCKSTAT_POINTS];
@@ -169,8 +177,10 @@ struct lockdep_map {
struct lock_class_key *key;
struct lock_class *class_cache[NR_LOCKDEP_CACHING_CLASSES];
const char *name;
- short wait_type_outer; /* can be taken in this context */
- short wait_type_inner; /* presents this context */
+ u8 wait_type_outer; /* can be taken in this context */
+ u8 wait_type_inner; /* presents this context */
+ u8 lock_type;
+ /* u8 hole; */
#ifdef CONFIG_LOCK_STAT
int cpu;
unsigned long ip;