diff options
Diffstat (limited to 'debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch')
-rw-r--r-- | debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch b/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch index 2d4031d6b..3a5a37c04 100644 --- a/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch +++ b/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch @@ -2,20 +2,20 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 16:36:39 +0200 Subject: rtmutex: export lockdep-less version of rt_mutex's lock, trylock and unlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz Required for lock implementation ontop of rtmutex. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/locking/rtmutex.c | 67 +++++++++++++++++++++++++--------------- - kernel/locking/rtmutex_common.h | 3 + - 2 files changed, 46 insertions(+), 24 deletions(-) + kernel/locking/rtmutex.c | 59 ++++++++++++++++++++++++++-------------- + kernel/locking/rtmutex_common.h | 3 ++ + 2 files changed, 42 insertions(+), 20 deletions(-) --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -1470,12 +1470,33 @@ rt_mutex_fastunlock(struct rt_mutex *loc +@@ -1493,12 +1493,33 @@ rt_mutex_fastunlock(struct rt_mutex *loc rt_mutex_postunlock(&wake_q); } @@ -51,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } #ifdef CONFIG_DEBUG_LOCK_ALLOC -@@ -1516,16 +1537,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); +@@ -1539,16 +1560,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); */ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock) { @@ -69,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); -@@ -1551,13 +1563,10 @@ int __sched __rt_mutex_futex_trylock(str +@@ -1574,13 +1586,10 @@ int __sched __rt_mutex_futex_trylock(str * Returns: * 0 on success * -EINTR when interrupted by a signal @@ -84,17 +84,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(rt_mutex_lock_killable); -@@ -1592,6 +1601,18 @@ rt_mutex_timed_lock(struct rt_mutex *loc +@@ -1615,6 +1624,14 @@ rt_mutex_timed_lock(struct rt_mutex *loc } EXPORT_SYMBOL_GPL(rt_mutex_timed_lock); +int __sched __rt_mutex_trylock(struct rt_mutex *lock) +{ -+#ifdef CONFIG_PREEMPT_RT_FULL -+ if (WARN_ON_ONCE(in_irq() || in_nmi())) -+#else + if (WARN_ON_ONCE(in_irq() || in_nmi() || in_serving_softirq())) -+#endif + return 0; + + return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); @@ -103,15 +99,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * rt_mutex_trylock - try to lock a rt_mutex * -@@ -1607,14 +1628,7 @@ int __sched rt_mutex_trylock(struct rt_m +@@ -1630,10 +1647,7 @@ int __sched rt_mutex_trylock(struct rt_m { int ret; --#ifdef CONFIG_PREEMPT_RT_FULL -- if (WARN_ON_ONCE(in_irq() || in_nmi())) --#else - if (WARN_ON_ONCE(in_irq() || in_nmi() || in_serving_softirq())) --#endif - return 0; - - ret = rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); @@ -119,7 +111,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (ret) mutex_acquire(&lock->dep_map, 0, 1, _RET_IP_); -@@ -1622,6 +1636,11 @@ int __sched rt_mutex_trylock(struct rt_m +@@ -1641,6 +1655,11 @@ int __sched rt_mutex_trylock(struct rt_m } EXPORT_SYMBOL_GPL(rt_mutex_trylock); @@ -133,7 +125,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> * --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h -@@ -159,6 +159,9 @@ extern bool __rt_mutex_futex_unlock(stru +@@ -162,6 +162,9 @@ extern bool __rt_mutex_futex_unlock(stru extern void rt_mutex_postunlock(struct wake_q_head *wake_q); /* RW semaphore special interface */ |