The patch titled Make spinlock/rwlock annotations more accurate by using parameters, not types has been added to the -mm tree. Its filename is make-spinlock-rwlock-annotations-more-accurate-by-using.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Make spinlock/rwlock annotations more accurate by using parameters, not types From: Josh Triplett <josht@xxxxxxxxxx> The lock annotations used on spinlocks and rwlocks currently use __{acquires,releases}(spinlock_t) and __{acquires,releases}(rwlock_t), respectively. This loses the information of which lock actually got acquired or released, and assumes a different type for the parameter of __acquires and __releases than the rest of the kernel. While the current implementations of __acquires and __releases throw away their argument, this will not always remain the case. Change this to use the lock parameter instead, to preserve this information and increase consistency in usage of __acquires and __releases. Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/spinlock_api_smp.h | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff -puN include/linux/spinlock_api_smp.h~make-spinlock-rwlock-annotations-more-accurate-by-using include/linux/spinlock_api_smp.h --- a/include/linux/spinlock_api_smp.h~make-spinlock-rwlock-annotations-more-accurate-by-using +++ a/include/linux/spinlock_api_smp.h @@ -19,41 +19,41 @@ int in_lock_functions(unsigned long addr #define assert_spin_locked(x) BUG_ON(!spin_is_locked(x)) -void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t); +void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) - __acquires(spinlock_t); -void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t); -void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t); -void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t); -void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t); -void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t); -void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t); -void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t); -void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t); + __acquires(lock); +void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); +void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); +void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); +void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(lock); +void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(lock); +void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(lock); +void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(lock); +void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock); unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) - __acquires(spinlock_t); + __acquires(lock); unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) - __acquires(rwlock_t); + __acquires(lock); unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) - __acquires(rwlock_t); + __acquires(lock); int __lockfunc _spin_trylock(spinlock_t *lock); int __lockfunc _read_trylock(rwlock_t *lock); int __lockfunc _write_trylock(rwlock_t *lock); int __lockfunc _spin_trylock_bh(spinlock_t *lock); -void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t); -void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t); -void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t); -void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t); -void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t); -void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t); -void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t); -void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t); -void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t); +void __lockfunc _spin_unlock(spinlock_t *lock) __releases(lock); +void __lockfunc _read_unlock(rwlock_t *lock) __releases(lock); +void __lockfunc _write_unlock(rwlock_t *lock) __releases(lock); +void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(lock); +void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(lock); +void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(lock); +void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(lock); +void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(lock); +void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(lock); void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) - __releases(spinlock_t); + __releases(lock); void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) - __releases(rwlock_t); + __releases(lock); void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) - __releases(rwlock_t); + __releases(lock); #endif /* __LINUX_SPINLOCK_API_SMP_H */ _ Patches currently in -mm which might be from josht@xxxxxxxxxx are xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail.patch mtrr-add-lock-annotations-for-prepare_set-and.patch efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog.patch mbcache-add-lock-annotation-for-__mb_cache_entry_release_unlock.patch afs-add-lock-annotations-to-afs_proc_cell_servers_startstop.patch fuse-add-lock-annotations-to-request_end-and-fuse_read_interrupt.patch hugetlbfs-add-lock-annotation-to-hugetlbfs_forget_inode.patch jbd-add-lock-annotation-to-jbd_sync_bh.patch fs-add-lock-annotation-to-grab_super.patch rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock.patch timer-add-lock-annotation-to-lock_timer_base.patch make-spinlock-rwlock-annotations-more-accurate-by-using.patch nfsd-add-lock-annotations-to-e_start-and-e_stop.patch srcu-3-rcu-variant-permitting-read-side-blocking-srcu-add-lock-annotations.patch rcu-add-module_author-to-rcutorture-module.patch rcu-fix-incorrect-description-of-default-for-rcutorture.patch rcu-mention-rcu_bh-in-description-of-rcutortures.patch rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture.patch rcu-fix-sign-bug-making-rcu_random-always-return-the-same.patch rcu-add-fake-writers-to-rcutorture.patch rcu-add-fake-writers-to-rcutorture-tidy.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html