diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 8c48658e8642..6d7e7881813c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2843,6 +2843,9 @@ EXPORT_SYMBOL_GPL(wake_up_if_idle); bool cpus_share_cache(int this_cpu, int that_cpu) { + if (this_cpu == that_cpu) + return true; + return per_cpu(sd_llc_id, this_cpu) == per_cpu(sd_llc_id, that_cpu); }