diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bc8ff11e6024..e456cce772a3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2650,6 +2650,9 @@ out: 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); }