Skip to content

Commit

Permalink
Set ASYM_PACKING Flag on Zhaoxin KH-40000 platform
Browse files Browse the repository at this point in the history
zhaoxin inclusion
category: feature

--------------------

Set ASYM_PACKING Flag on Zhaoxin KH-40000 platform

Signed-off-by: leoliu-oc <[email protected]>
  • Loading branch information
leoliu-oc committed Jun 14, 2024
1 parent e28f977 commit 1f5a036
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kernel/sched/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2469,6 +2469,17 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att
}
}

#if IS_ENABLED(CONFIG_X86)
if ((boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR ||
boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN) &&
(boot_cpu_data.x86 == 7 && boot_cpu_data.x86_model == 0x5b)) {
for_each_cpu(i, cpu_map) {
for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent)
sd->flags |= SD_ASYM_PACKING;
}
}
#endif

/* Calculate CPU capacity for physical packages and nodes */
for (i = nr_cpumask_bits-1; i >= 0; i--) {
if (!cpumask_test_cpu(i, cpu_map))
Expand Down

0 comments on commit 1f5a036

Please sign in to comment.