summaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2023-07-28 17:53:13 +0200
committerThomas Gleixner <tglx@linutronix.de>2023-07-31 17:32:44 +0200
commit52b38b7ad589c89a8c69272497bed20034f8e322 (patch)
tree7b96d172aee8985e254fa0bcaadac30a30110a2a /kernel/cpu.c
parentcpu/SMT: Allow enabling partial SMT states via sysfs (diff)
downloadlinux-52b38b7ad589c89a8c69272497bed20034f8e322.tar.xz
linux-52b38b7ad589c89a8c69272497bed20034f8e322.zip
cpu/SMT: Fix cpu_smt_possible() comment
Commit e1572f1d08be ("cpu/SMT: create and export cpu_smt_possible()") introduces cpu_smt_possible() to represent if SMT is theoretically possible. It returns true when SMT is supported and not forcefully disabled ('nosmt=force'). But the comment of it says "Returns true if SMT is not supported of forcefully (irreversibly) disabled", which is wrong. Fix that comment accordingly. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Link: https://lore.kernel.org/r/20230728155313.44170-1-rui.zhang@intel.com
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 7e8f1b044772..f6811c857102 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -676,7 +676,7 @@ 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 */
+/* Returns true if SMT is supported and not forcefully (irreversibly) disabled */
bool cpu_smt_possible(void)
{
return cpu_smt_control != CPU_SMT_FORCE_DISABLED &&