hc
2023-11-07 f45e756958099c35d6afb746df1d40a1c6302cfc
kernel/lib/smp_processor_id.c
....@@ -22,7 +22,12 @@
2222 * Kernel threads bound to a single CPU can safely use
2323 * smp_processor_id():
2424 */
25
- if (cpumask_equal(&current->cpus_allowed, cpumask_of(this_cpu)))
25
+#if defined(CONFIG_PREEMPT_RT_BASE) && (defined(CONFIG_SMP) || defined(CONFIG_SCHED_DEBUG))
26
+ if (current->migrate_disable)
27
+ goto out;
28
+#endif
29
+
30
+ if (current->nr_cpus_allowed == 1)
2631 goto out;
2732
2833 /*