diff options
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r-- | include/linux/lockdep.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index f270ce1582ff..b49bfa8e4a5c 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -190,6 +190,9 @@ struct lock_chain { | |||
190 | u64 chain_key; | 190 | u64 chain_key; |
191 | }; | 191 | }; |
192 | 192 | ||
193 | #define MAX_LOCKDEP_KEYS_BITS 11 | ||
194 | #define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) | ||
195 | |||
193 | struct held_lock { | 196 | struct held_lock { |
194 | /* | 197 | /* |
195 | * One-way hash of the dependency chain up to this point. We | 198 | * One-way hash of the dependency chain up to this point. We |
@@ -206,14 +209,13 @@ struct held_lock { | |||
206 | * with zero), here we store the previous hash value: | 209 | * with zero), here we store the previous hash value: |
207 | */ | 210 | */ |
208 | u64 prev_chain_key; | 211 | u64 prev_chain_key; |
209 | struct lock_class *class; | ||
210 | unsigned long acquire_ip; | 212 | unsigned long acquire_ip; |
211 | struct lockdep_map *instance; | 213 | struct lockdep_map *instance; |
212 | |||
213 | #ifdef CONFIG_LOCK_STAT | 214 | #ifdef CONFIG_LOCK_STAT |
214 | u64 waittime_stamp; | 215 | u64 waittime_stamp; |
215 | u64 holdtime_stamp; | 216 | u64 holdtime_stamp; |
216 | #endif | 217 | #endif |
218 | unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS; | ||
217 | /* | 219 | /* |
218 | * The lock-stack is unified in that the lock chains of interrupt | 220 | * The lock-stack is unified in that the lock chains of interrupt |
219 | * contexts nest ontop of process context chains, but we 'separate' | 221 | * contexts nest ontop of process context chains, but we 'separate' |
@@ -227,11 +229,11 @@ struct held_lock { | |||
227 | * The following field is used to detect when we cross into an | 229 | * The following field is used to detect when we cross into an |
228 | * interrupt context: | 230 | * interrupt context: |
229 | */ | 231 | */ |
230 | int irq_context; | 232 | unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */ |
231 | int trylock; | 233 | unsigned int trylock:1; |
232 | int read; | 234 | unsigned int read:2; /* see lock_acquire() comment */ |
233 | int check; | 235 | unsigned int check:2; /* see lock_acquire() comment */ |
234 | int hardirqs_off; | 236 | unsigned int hardirqs_off:1; |
235 | }; | 237 | }; |
236 | 238 | ||
237 | /* | 239 | /* |