From de147b26ed88e6c0133396cce2982066033bf45e Mon Sep 17 00:00:00 2001 From: Sai Harshini Nimmala Date: Tue, 18 Oct 2022 14:48:00 -0700 Subject: [PATCH] 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 --- kernel/sched/walt/walt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/walt/walt.c b/kernel/sched/walt/walt.c index 88373f0d8bf2..a316d003ed34 100644 --- a/kernel/sched/walt/walt.c +++ b/kernel/sched/walt/walt.c @@ -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); }