From: Srinivas Pandruvada Date: Sat, 7 Jan 2023 01:48:07 +0000 (-0800) Subject: tools/power/x86/intel-speed-select: turbo-freq auto mode with SMT off X-Git-Tag: v6.6.17~5511^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ed9e363157cb858bdbb8c595f04839d3f245414;p=platform%2Fkernel%2Flinux-rpi.git tools/power/x86/intel-speed-select: turbo-freq auto mode with SMT off When SMT is disabled from kernel command line, sibling CPUs still appears in the sysfs as offline CPUs. This is a problem when turbo-freq is enabled in auto mode. They are still assigned to CLOS value of 3 as they are still in the present CPU list. But they are not in the sibling list of a CPU. When the CPU is a high priority CPU, because of sibling it will be still set to CLOS to 3 as CLOS is assigned at core level not at CPU level. So, avoid setting CLOS 3 to offline CPU. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede --- diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 2a737bf..5f5349f 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -2066,6 +2066,9 @@ static void set_fact_enable(int arg) if (!CPU_ISSET_S(i, present_cpumask_size, present_cpumask)) continue; + if (is_cpu_online(i) != 1) + continue; + set_isst_id(&id, i); ret = set_clos_param(&id, 0, 0, 0, 0, 0xff); if (ret)