From e3e12f52b214121840b44c91de5b3e5af5d3eb84 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 06 Nov 2023 03:04:41 +0000 Subject: [PATCH] rk3568 rt init --- kernel/lib/smp_processor_id.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kernel/lib/smp_processor_id.c b/kernel/lib/smp_processor_id.c index 85925aa..2e73985 100644 --- a/kernel/lib/smp_processor_id.c +++ b/kernel/lib/smp_processor_id.c @@ -22,7 +22,12 @@ * Kernel threads bound to a single CPU can safely use * smp_processor_id(): */ - if (cpumask_equal(¤t->cpus_allowed, cpumask_of(this_cpu))) +#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; /* -- Gitblit v1.6.2