diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 17:36:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 17:36:56 -0700 |
commit | c54894cd4672d513e43e0d17d7b0387bf6b2c2c4 (patch) | |
tree | 85a540716d82570f98a92b85c66ea5875f983f46 /include | |
parent | fb09bafda67041b74a668dc9d77735e36bd33d3b (diff) | |
parent | 4d82a1debbffec129cc387aafa8f40b7bbab3297 (diff) |
Merge branch 'for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue changes from Tejun Heo:
"Nothing exciting. Most are updates to debug stuff and related fixes.
Two not-too-critical bugs are fixed - WARN_ON() triggering spurious
during cpu offlining and unlikely lockdep related oops."
* 'for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
lockdep: fix oops in processing workqueue
workqueue: skip nr_running sanity check in worker_enter_idle() if trustee is active
workqueue: Catch more locking problems with flush_work()
workqueue: change BUG_ON() to WARN_ON()
trace: Remove unused workqueue tracer
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lockdep.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index d36619ead3b..00e46376e28 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -157,6 +157,24 @@ struct lockdep_map { #endif }; +static inline void lockdep_copy_map(struct lockdep_map *to, + struct lockdep_map *from) +{ + int i; + + *to = *from; + /* + * Since the class cache can be modified concurrently we could observe + * half pointers (64bit arch using 32bit copy insns). Therefore clear + * the caches and take the performance hit. + * + * XXX it doesn't work well with lockdep_set_class_and_subclass(), since + * that relies on cache abuse. + */ + for (i = 0; i < NR_LOCKDEP_CACHING_CLASSES; i++) + to->class_cache[i] = NULL; +} + /* * Every lock has a list of other locks that were taken after it. * We only grow the list, never remove from it: |