Skip to content

Commit 34d66ca

Browse files
Zhenzhong DuanKAGA-KOKO
authored andcommitted
x86/speculation: Remove redundant arch_smt_update() invocation
With commit a74cfff ("x86/speculation: Rework SMT state change"), arch_smt_update() is invoked from each individual CPU hotplug function. Therefore the extra arch_smt_update() call in the sysfs SMT control is redundant. Fixes: a74cfff ("x86/speculation: Rework SMT state change") Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: <konrad.wilk@oracle.com> Cc: <dwmw@amazon.co.uk> Cc: <bp@suse.de> Cc: <srinivas.eeda@oracle.com> Cc: <peterz@infradead.org> Cc: <hpa@zytor.com> Link: https://lkml.kernel.org/r/e2e064f2-e8ef-42ca-bf4f-76b612964752@default
1 parent 4aa9fc2 commit 34d66ca

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/cpu.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,10 +2090,8 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)
20902090
*/
20912091
cpuhp_offline_cpu_device(cpu);
20922092
}
2093-
if (!ret) {
2093+
if (!ret)
20942094
cpu_smt_control = ctrlval;
2095-
arch_smt_update();
2096-
}
20972095
cpu_maps_update_done();
20982096
return ret;
20992097
}
@@ -2104,7 +2102,6 @@ static int cpuhp_smt_enable(void)
21042102

21052103
cpu_maps_update_begin();
21062104
cpu_smt_control = CPU_SMT_ENABLED;
2107-
arch_smt_update();
21082105
for_each_present_cpu(cpu) {
21092106
/* Skip online CPUs and CPUs on offline nodes */
21102107
if (cpu_online(cpu) || !node_online(cpu_to_node(cpu)))

0 commit comments

Comments
 (0)