summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0270-sched-core-Drop-a-preempt_disable_rt-statement.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0270-sched-core-Drop-a-preempt_disable_rt-statement.patch')
-rw-r--r--debian/patches-rt/0270-sched-core-Drop-a-preempt_disable_rt-statement.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches-rt/0270-sched-core-Drop-a-preempt_disable_rt-statement.patch b/debian/patches-rt/0270-sched-core-Drop-a-preempt_disable_rt-statement.patch
new file mode 100644
index 000000000..c1c54692c
--- /dev/null
+++ b/debian/patches-rt/0270-sched-core-Drop-a-preempt_disable_rt-statement.patch
@@ -0,0 +1,50 @@
+From 3b0ab176baa325b6e2d909c3d2ce7860873c1726 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Mon, 24 Jun 2019 19:33:16 +0200
+Subject: [PATCH 270/347] sched/core: Drop a preempt_disable_rt() statement
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+[ Upstream commit 761126efdcbe3fa3e99c9079fa0ad6eca2f251f2 ]
+
+The caller holds a lock which already disables preemption.
+Drop the preempt_disable_rt() statement in get_nohz_timer_target().
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+---
+ kernel/sched/core.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index feaf4d5683af..3b0f62be3ece 100644
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -558,14 +558,11 @@ void resched_cpu(int cpu)
+ */
+ int get_nohz_timer_target(void)
+ {
+- int i, cpu;
++ int i, cpu = smp_processor_id();
+ struct sched_domain *sd;
+
+- preempt_disable_rt();
+- cpu = smp_processor_id();
+-
+ if (!idle_cpu(cpu) && housekeeping_cpu(cpu, HK_FLAG_TIMER))
+- goto preempt_en_rt;
++ return cpu;
+
+ rcu_read_lock();
+ for_each_domain(cpu, sd) {
+@@ -584,8 +581,6 @@ int get_nohz_timer_target(void)
+ cpu = housekeeping_any_cpu(HK_FLAG_TIMER);
+ unlock:
+ rcu_read_unlock();
+-preempt_en_rt:
+- preempt_enable_rt();
+ return cpu;
+ }
+
+--
+2.36.1
+