Commit 91d9733c authored by Linus Torvalds's avatar Linus Torvalds

Annotate the trivial unconditional lock/unlock functions on SMP.

This does _not_ handle the conditional ones (lock_kernel and the
trylock variants), so there will be a fair number of context
error warnings with this. However, the warnings are disabled by
default in sparse - you have to use "-Wcontext" to see them.
parent 37add8db
...@@ -42,33 +42,39 @@ ...@@ -42,33 +42,39 @@
int __lockfunc _spin_trylock(spinlock_t *lock); int __lockfunc _spin_trylock(spinlock_t *lock);
int __lockfunc _write_trylock(rwlock_t *lock); int __lockfunc _write_trylock(rwlock_t *lock);
void __lockfunc _spin_lock(spinlock_t *lock);
void __lockfunc _write_lock(rwlock_t *lock); void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t);
void __lockfunc _spin_lock(spinlock_t *lock); void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _read_lock(rwlock_t *lock); void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _spin_unlock(spinlock_t *lock);
void __lockfunc _write_unlock(rwlock_t *lock); void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t);
void __lockfunc _read_unlock(rwlock_t *lock); void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t);
unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock); void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t);
unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock);
unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock); unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) __acquires(spinlock_t);
void __lockfunc _spin_lock_irq(spinlock_t *lock); unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _spin_lock_bh(spinlock_t *lock); unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _read_lock_irq(rwlock_t *lock);
void __lockfunc _read_lock_bh(rwlock_t *lock); void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t);
void __lockfunc _write_lock_irq(rwlock_t *lock); void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t);
void __lockfunc _write_lock_bh(rwlock_t *lock); void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags); void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _spin_unlock_irq(spinlock_t *lock); void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _spin_unlock_bh(spinlock_t *lock); void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags);
void __lockfunc _read_unlock_irq(rwlock_t *lock); void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) __releases(spinlock_t);
void __lockfunc _read_unlock_bh(rwlock_t *lock); void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t);
void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags); void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t);
void __lockfunc _write_unlock_irq(rwlock_t *lock); void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) __releases(rwlock_t);
void __lockfunc _write_unlock_bh(rwlock_t *lock); void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) __releases(rwlock_t);
void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
int __lockfunc _spin_trylock_bh(spinlock_t *lock); int __lockfunc _spin_trylock_bh(spinlock_t *lock);
int in_lock_functions(unsigned long addr); int in_lock_functions(unsigned long addr);
#else #else
#define in_lock_functions(ADDR) 0 #define in_lock_functions(ADDR) 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment