Merge 5.4-rc1-prerelease into android-mainline
To make the 5.4-rc1 merge easier, merge at a prerelease point in time before the final release happens. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I052c6a28528e10cdda89b6a20d320ac7562266b8
This commit is contained in:
11
kernel/cpu.c
11
kernel/cpu.c
@@ -392,8 +392,7 @@ enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED;
|
||||
|
||||
void __init cpu_smt_disable(bool force)
|
||||
{
|
||||
if (cpu_smt_control == CPU_SMT_FORCE_DISABLED ||
|
||||
cpu_smt_control == CPU_SMT_NOT_SUPPORTED)
|
||||
if (!cpu_smt_possible())
|
||||
return;
|
||||
|
||||
if (force) {
|
||||
@@ -438,6 +437,14 @@ static inline bool cpu_smt_allowed(unsigned int cpu)
|
||||
*/
|
||||
return !cpumask_test_cpu(cpu, &cpus_booted_once_mask);
|
||||
}
|
||||
|
||||
/* Returns true if SMT is not supported of forcefully (irreversibly) disabled */
|
||||
bool cpu_smt_possible(void)
|
||||
{
|
||||
return cpu_smt_control != CPU_SMT_FORCE_DISABLED &&
|
||||
cpu_smt_control != CPU_SMT_NOT_SUPPORTED;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpu_smt_possible);
|
||||
#else
|
||||
static inline bool cpu_smt_allowed(unsigned int cpu) { return true; }
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user