sched/walt:Do not use package id while setting up clusters

Currently, setting up WALT clusters requires using the physical package
id assigned to each core to identify which cluster the CPU belongs to.
However, due to upstream changes to the way clusters are parsed in the
devicetree, physical package id does not represent cluster information
anymore.
Switch to using cluster id from cpu topology to fix this.

Change-Id: I2254ff83bbe161587778cd0dd989c5d6131d8bb5
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
This commit is contained in:
Sai Harshini Nimmala 2022-10-18 14:48:00 -07:00
parent 392f42735d
commit de147b26ed

View File

@ -2641,13 +2641,13 @@ static void walt_get_possible_siblings(int cpuid, struct cpumask *cluster_cpus)
int cpu;
struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
if (cpuid_topo->package_id == -1)
if (cpuid_topo->cluster_id == -1)
return;
for_each_possible_cpu(cpu) {
cpu_topo = &cpu_topology[cpu];
if (cpuid_topo->package_id != cpu_topo->package_id)
if (cpuid_topo->cluster_id != cpu_topo->cluster_id)
continue;
cpumask_set_cpu(cpu, cluster_cpus);
}