Skip to content
Snippets Groups Projects
Commit 837d31c1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ldrp_v2: sched-info: Fix finding number of clusters" into opensource-tools.lnx.1.0

parents bbc7c04d d87ca0cd
No related branches found
No related tags found
No related merge requests found
...@@ -41,19 +41,18 @@ def verify_active_cpus(ramdump): ...@@ -41,19 +41,18 @@ def verify_active_cpus(ramdump):
if (cluster_id_off is None): if (cluster_id_off is None):
print_out_str("\n Invalid cluster topology detected\n") print_out_str("\n Invalid cluster topology detected\n")
clusters = ramdump.read_int(cpu_topology_addr + cluster_id_off + ((nr_cpus - 1) * cpu_topology_size))
clusters += 1
# INFO: from 4.19 onwards, core_sibling mask contains only online cpus, # INFO: from 4.19 onwards, core_sibling mask contains only online cpus,
# find out cluster cpus dynamically. # find out cluster cpus dynamically.
cluster_nrcpus = [0] * (clusters) cluster_nrcpus = [0]
for j in range(0, nr_cpus): for j in range(0, nr_cpus):
c_id = ramdump.read_int(cpu_topology_addr + (j * cpu_topology_size) + cluster_id_off) c_id = ramdump.read_int(cpu_topology_addr + (j * cpu_topology_size) + cluster_id_off)
if len(cluster_nrcpus) <= c_id :
cluster_nrcpus.extend([0])
cluster_nrcpus[c_id] += 1 cluster_nrcpus[c_id] += 1
next_cluster_cpu = 0 next_cluster_cpu = 0
for i in range(0, clusters): for i in range(0, len(cluster_nrcpus)):
cluster_cpus = ramdump.read_word(cpu_topology_addr + cluster_cpus = ramdump.read_word(cpu_topology_addr +
(next_cluster_cpu * cpu_topology_size) + core_sib_off) (next_cluster_cpu * cpu_topology_size) + core_sib_off)
cluster_online_cpus = cpu_online_bits & cluster_cpus cluster_online_cpus = cpu_online_bits & cluster_cpus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment