summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch')
-rw-r--r--debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch b/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch
new file mode 100644
index 000000000..86110023d
--- /dev/null
+++ b/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch
@@ -0,0 +1,34 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 22 May 2019 12:42:26 +0200
+Subject: [PATCH 2/4] sched/swait: Add swait_event_lock_irq()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz
+
+The swait_event_lock_irq() is inspired by wait_event_lock_irq(). This is
+required by the workqueue code once it switches to swait.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ include/linux/swait.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/include/linux/swait.h
++++ b/include/linux/swait.h
+@@ -297,4 +297,18 @@ do { \
+ __ret; \
+ })
+
++#define __swait_event_lock_irq(wq, condition, lock, cmd) \
++ ___swait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, \
++ raw_spin_unlock_irq(&lock); \
++ cmd; \
++ schedule(); \
++ raw_spin_lock_irq(&lock))
++
++#define swait_event_lock_irq(wq_head, condition, lock) \
++ do { \
++ if (condition) \
++ break; \
++ __swait_event_lock_irq(wq_head, condition, lock, ); \
++ } while (0)
++
+ #endif /* _LINUX_SWAIT_H */