2020-04-21 20:13:52 +00:00
|
|
|
From feb825b2c5296319abdfa796acf01d481332b6a1 Mon Sep 17 00:00:00 2001
|
2020-02-21 18:07:43 +00:00
|
|
|
From: Daniel Wagner <dwagner@suse.de>
|
|
|
|
Date: Mon, 16 Dec 2019 16:15:57 +0100
|
2020-04-21 20:13:52 +00:00
|
|
|
Subject: [PATCH 314/325] lib/smp_processor_id: Adjust
|
2020-02-21 18:07:43 +00:00
|
|
|
check_preemption_disabled()
|
2020-04-21 20:13:52 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.115-rt48.tar.xz
|
2020-02-21 18:07:43 +00:00
|
|
|
|
|
|
|
[ Upstream commit af3c1c5fdf177870fb5e6e16b24e374696ab28f5 ]
|
|
|
|
|
|
|
|
The current->migrate_disable counter is not always defined leading to
|
|
|
|
build failures with DEBUG_PREEMPT && !PREEMPT_RT_BASE.
|
|
|
|
|
|
|
|
Restrict the access to ->migrate_disable to same set where
|
|
|
|
->migrate_disable is modified.
|
|
|
|
|
|
|
|
Signed-off-by: Daniel Wagner <dwagner@suse.de>
|
|
|
|
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
|
|
|
[bigeasy: adjust condition + description]
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
|
|
|
lib/smp_processor_id.c | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
|
|
|
|
index 0c80992aa337..2e7398534b66 100644
|
|
|
|
--- a/lib/smp_processor_id.c
|
|
|
|
+++ b/lib/smp_processor_id.c
|
|
|
|
@@ -22,8 +22,10 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
|
|
|
|
* Kernel threads bound to a single CPU can safely use
|
|
|
|
* smp_processor_id():
|
|
|
|
*/
|
|
|
|
+#if defined(CONFIG_PREEMPT_RT_BASE) && (defined(CONFIG_SMP) || defined(CONFIG_SCHED_DEBUG))
|
|
|
|
if (current->migrate_disable)
|
|
|
|
goto out;
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
if (current->nr_cpus_allowed == 1)
|
|
|
|
goto out;
|
|
|
|
--
|
2020-04-09 19:44:24 +00:00
|
|
|
2.25.1
|
2020-02-21 18:07:43 +00:00
|
|
|
|