diff options
Diffstat (limited to 'kernel/cpu.c')
| -rw-r--r-- | kernel/cpu.c | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index e82920b8bee1..3c7f3b4c453c 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2055,6 +2055,12 @@ static void cpuhp_online_cpu_device(unsigned int cpu)  	kobject_uevent(&dev->kobj, KOBJ_ONLINE);  } +/* + * Architectures that need SMT-specific errata handling during SMT hotplug + * should override this. + */ +void __weak arch_smt_update(void) { }; +  static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)  {  	int cpu, ret = 0; @@ -2081,8 +2087,10 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)  		 */  		cpuhp_offline_cpu_device(cpu);  	} -	if (!ret) +	if (!ret) {  		cpu_smt_control = ctrlval; +		arch_smt_update(); +	}  	cpu_maps_update_done();  	return ret;  } @@ -2093,6 +2101,7 @@ static int cpuhp_smt_enable(void)  	cpu_maps_update_begin();  	cpu_smt_control = CPU_SMT_ENABLED; +	arch_smt_update();  	for_each_present_cpu(cpu) {  		/* Skip online CPUs and CPUs on offline nodes */  		if (cpu_online(cpu) || !node_online(cpu_to_node(cpu)))  |