mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar: "A paravirt UP-patching fix, and an I2C MUX driver lockdep warning fix" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() assembly code i2c/mux, locking/core: Annotate the nested rt_mutex usage locking/rtmutex: Allow specifying a subclass for nested locking
This commit is contained in:
commit
fb20c03d37
5 changed files with 36 additions and 8 deletions
|
|
@ -1465,6 +1465,29 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
|
|||
rt_mutex_postunlock(&wake_q);
|
||||
}
|
||||
|
||||
static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int subclass)
|
||||
{
|
||||
might_sleep();
|
||||
|
||||
mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
|
||||
rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, rt_mutex_slowlock);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
/**
|
||||
* rt_mutex_lock_nested - lock a rt_mutex
|
||||
*
|
||||
* @lock: the rt_mutex to be locked
|
||||
* @subclass: the lockdep subclass
|
||||
*/
|
||||
void __sched rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass)
|
||||
{
|
||||
__rt_mutex_lock(lock, subclass);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt_mutex_lock_nested);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DEBUG_LOCK_ALLOC
|
||||
/**
|
||||
* rt_mutex_lock - lock a rt_mutex
|
||||
*
|
||||
|
|
@ -1472,12 +1495,10 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
|
|||
*/
|
||||
void __sched rt_mutex_lock(struct rt_mutex *lock)
|
||||
{
|
||||
might_sleep();
|
||||
|
||||
mutex_acquire(&lock->dep_map, 0, 0, _RET_IP_);
|
||||
rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, rt_mutex_slowlock);
|
||||
__rt_mutex_lock(lock, 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt_mutex_lock);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* rt_mutex_lock_interruptible - lock a rt_mutex interruptible
|
||||
|
|
|
|||
Loading…
Reference in a new issue