summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/kthread-Do-not-use-TIMER_IRQSAFE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/kthread-Do-not-use-TIMER_IRQSAFE.patch')
-rw-r--r--debian/patches-rt/kthread-Do-not-use-TIMER_IRQSAFE.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/debian/patches-rt/kthread-Do-not-use-TIMER_IRQSAFE.patch b/debian/patches-rt/kthread-Do-not-use-TIMER_IRQSAFE.patch
deleted file mode 100644
index be11fca87..000000000
--- a/debian/patches-rt/kthread-Do-not-use-TIMER_IRQSAFE.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Tue, 12 Feb 2019 12:57:45 +0100
-Subject: [PATCH] kthread: Do not use TIMER_IRQSAFE
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz
-
-The TIMER_IRQSAFE was introduced in commit
-
- 22597dc3d97b1 ("kthread: initial support for delayed kthread work")
-
-which modelled the delayed kthread code after workqueue's code. The
-workqueue code requires the flag TIMER_IRQSAFE for synchronisation
-purpose. This is not true for kthread's delay timer since all
-operations occur under a lock.
-
-Remove TIMER_IRQSAFE from the timer initialisation.
-Use timer_setup() for initialisation purpose which is the official
-function.
-
-Cc: Petr Mladek <pmladek@suse.com>
-Cc: Ingo Molnar <mingo@kernel.org>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- include/linux/kthread.h | 5 ++---
- kernel/kthread.c | 5 +++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
---- a/include/linux/kthread.h
-+++ b/include/linux/kthread.h
-@@ -164,9 +164,8 @@ extern void __kthread_init_worker(struct
- #define kthread_init_delayed_work(dwork, fn) \
- do { \
- kthread_init_work(&(dwork)->work, (fn)); \
-- __init_timer(&(dwork)->timer, \
-- kthread_delayed_work_timer_fn, \
-- TIMER_IRQSAFE); \
-+ timer_setup(&(dwork)->timer, \
-+ kthread_delayed_work_timer_fn, 0); \
- } while (0)
-
- int kthread_worker_fn(void *worker_ptr);
---- a/kernel/kthread.c
-+++ b/kernel/kthread.c
-@@ -835,6 +835,7 @@ void kthread_delayed_work_timer_fn(struc
- struct kthread_delayed_work *dwork = from_timer(dwork, t, timer);
- struct kthread_work *work = &dwork->work;
- struct kthread_worker *worker = work->worker;
-+ unsigned long flags;
-
- /*
- * This might happen when a pending work is reinitialized.
-@@ -843,7 +844,7 @@ void kthread_delayed_work_timer_fn(struc
- if (WARN_ON_ONCE(!worker))
- return;
-
-- raw_spin_lock(&worker->lock);
-+ raw_spin_lock_irqsave(&worker->lock, flags);
- /* Work must not be used with >1 worker, see kthread_queue_work(). */
- WARN_ON_ONCE(work->worker != worker);
-
-@@ -852,7 +853,7 @@ void kthread_delayed_work_timer_fn(struc
- list_del_init(&work->node);
- kthread_insert_work(worker, work, &worker->work_list);
-
-- raw_spin_unlock(&worker->lock);
-+ raw_spin_unlock_irqrestore(&worker->lock, flags);
- }
- EXPORT_SYMBOL(kthread_delayed_work_timer_fn);
-