Commit 211bd3be authored by leoliu-oc's avatar leoliu-oc Committed by LeoLiu-oc
Browse files

Set ASYM_PACKING Flag on Zhaoxin KH-40000 platform

zhaoxin inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8WZDQ


CVE: NA

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

Set ASYM_PACKING Flag on Zhaoxin KH-40000 platform.

Signed-off-by: default avatarleoliu-oc <leoliu-oc@zhaoxin.com>
parent a5456c60
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -2704,6 +2704,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 */
	/* Calculate CPU capacity for physical packages and nodes */
	for (i = nr_cpumask_bits-1; i >= 0; i--) {
	for (i = nr_cpumask_bits-1; i >= 0; i--) {
		if (!cpumask_test_cpu(i, cpu_map))
		if (!cpumask_test_cpu(i, cpu_map))