Unverified Commit 2e196c2f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7416 cpu/SMT: Make SMT control more robust against enumeration failures

parents 90ab3fcc 7f3c44cd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -432,6 +432,14 @@ static inline bool cpu_smt_allowed(unsigned int cpu)
	if (cpu_smt_control == CPU_SMT_ENABLED)
		return true;

	/* All CPUs are bootable if controls are not configured */
	if (cpu_smt_control == CPU_SMT_NOT_IMPLEMENTED)
		return true;

	/* All CPUs are bootable if CPU is not SMT capable */
	if (cpu_smt_control == CPU_SMT_NOT_SUPPORTED)
		return true;

	if (topology_is_primary_thread(cpu))
		return true;