Conversation
commit 885d1c2a30b73e50d0bbc098ddd717e22ccff266 upstream. SST-TF revision 2 supports a higher number of cores per bucket, as the current limit of 256 cores may be insufficient. To accommodate this, a new offset, "SST_TF_INFO-8," is introduced, allowing for a higher core count. Utilize this offset instead of the current "SST_TF_INFO-1" offset, based on SST-TF revision 2 or higher, and if there is a non-zero core count in any bucket. Intel-SIG: commit 885d1c2a30b7 platform/x86: ISST: Support SST-TF revision 2 Backport SST support for DMR Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20250506163531.1061185-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit d6644d737bec473a38dbd44a71553cacd636a920 upstream. SST PP revision 2 added fabric 1 P0, P1 and Pm frequencies. Export them by using a new IOCTL ISST_IF_GET_PERF_LEVEL_FABRIC_INFO. This IOCTL requires platforms with SST PP revision 2 or higher. To accommodate potential future increases in fabric count and avoid ABI changes, support is extended for up to 8 fabrics. Intel-SIG: commit d6644d737bec platform/x86: ISST: Support SST-PP revision 2 Backport SST support for DMR Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20250506163531.1061185-3-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit c9a20142d3420a5113f560e7dea711d2f9693117 upstream. Update SST minor version after supporting SST-PP and SST-TF version 2. Intel-SIG: commit c9a20142d342 platform/x86: ISST: Update minor version Backport SST support for DMR Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20250506163531.1061185-4-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit e1415b9418eb22b4a7a1ef4b4aec9dd0a49e3fa7 upstream.
Based on feature revision, number of buckets can be less than the
TRL_MAX_BUCKETS. In that case core counts in the remaining buckets
can be set to some invalid values.
Hence reset core count to 0 for all buckets before assigning correct
values.
Intel-SIG: commit e1415b9418eb platform/x86: ISST: Reset core count to 0
Backport SST support for DMR
Fixes: 885d1c2a30b7 ("platform/x86: ISST: Support SST-TF revision 2")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260325192638.3417281-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[ Zhang Rui: amend commit log ]
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 61f3d86 upstream. If the command takes some integer arguments, make sure the command contains only digits. Same for Hex arguments. Otherwise return error. Intel-SIG: commit 61f3d86 tools/power/x86/intel-speed-select: Sanitize integer arguments Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 3076db3 upstream. TRL (turbo ratio limit) argument is passed in hex string. Clarify that in the help. Intel-SIG: commit 3076db3 tools/power/x86/intel-speed-select: Update help for TRL Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 7b00d10 upstream. The command for turbo-mode enable and disable is swapped. Fix that. Previously turbo-mode enable was actually disabling and disable was enabling. Intel-SIG: commit 7b00d10 tools/power/x86/intel-speed-select: turbo-mode enable disable swapped Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 2fe8d2d upstream. Don't call to set or get TRL for domains in which there are no CPUs. Intel-SIG: commit 2fe8d2d tools/power/x86/intel-speed-select: No TRL for non compute domains Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit da4c1b9 upstream. When core-power is getting enabled, if the feaure is not supported, display error. Intel-SIG: commit da4c1b9 tools/power/x86/intel-speed-select: Display error for core-power support Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit bc5370c upstream. With the increase in the CPU count, this count needs to be updated. Increase max CPU count to 512. Intel-SIG: commit bc5370c tools/power/x86/intel-speed-select: Increase max CPUs in one request Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 3bc0f20 upstream. From kernel version 6.5, CPU 0 hotplug capability is deprecated. If some SST profile doesn't have CPU 0, then it is no longer possible to offline CPU 0. This means that user space threads will still run on CPU 0. To workaround this issue, use cgroup v2 isolation feature. Whenever there /sys/devices/system/cpu/cpu0/online file is absent or open fails, isolate CPU 0 via CPU cgroup v2 isolation. Also add a command line option to force even if the /sys/devices/system/cpu/cpu0/online is present. The previous commit "01bcb56f059e ("tools/power/x86/intel-speed-select: Prevent CPU 0 offline") was just warning about this issue based on the kernel version 6.5 and above. With this new approach, instead of warning take action to mitigate the issue. Intel-SIG: commit 3bc0f20 tools/power/x86/intel-speed-select: Use cgroup isolate for CPU 0 Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit a590ed6 upstream. This version addresses issues with: - When CPU 0 hotplug is not possible, try cgroup v2 isolation without any user input - Fix turbo mode enable/disable swapped - Sanitize command line integer and hex arguments - Add more error messages - Increase CPU count in one request Intel-SIG: commit a590ed6 tools/power/x86/intel-speed-select: v1.18 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 9ea48bd upstream. TPMI platform information supports up to 16 compute dies. So increase the range. Intel-SIG: commit 9ea48bd tools/power/x86/intel-speed-select: Increase die count Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit f926447 upstream. When the die id is same as punit compute die ID, treat them same. In this case, when for_each_online_power_domain_in_set() is called, then don't loop for each punit in a die. Just loop for all punits in a package. Intel-SIG: commit f926447 tools/power/x86/intel-speed-select: Support multiple dies Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 55d5639 upstream. During call to "intel-speed-select turbo-freq info" some junk values are reported for unsupported levels. Initialize the structure fact_info with 0s, so that isst_fact_display_information() will skip "0" values in the frequency. Intel-SIG: commit 55d5639 tools/power/x86/intel-speed-select: Fix display for unsupported levels Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…freq commit 38fa152 upstream. For turbo-freq feature, only 3 levels of frequencies are displayed even if platform support more. Present all levels based on the CPU model. Intel-SIG: commit 38fa152 tools/power/x86/intel-speed-select: Present all TRL levels for turbo-freq Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 80a513e upstream. Currently max 128 CPUs can be displayed in the enable CPU list. Double the range. Since the size is big for stack allocation, change to static. Here changing to static is fine as these functions are called in serial. Intel-SIG: commit 80a513e tools/power/x86/intel-speed-select: Increase number of CPUs displayed Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 1fcf670 upstream. SST BF and TF can be enabled/disabled per level. So check the current level support from the mask of supported levels. This change from a single level to mask for info.sst_tf_support and info.sst_tf_support is indicated by API version change. Use as mask for API version above 2. In this way there is no change in behavior when running on older kernel with API version 2. Since the tool can support now API version 3, update the supported API version. Intel-SIG: commit 1fcf670 tools/power/x86/intel-speed-select: SST BF/TF support per level Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 8ebc39a upstream. When there is no CPU in a power domain, display "None" instead of -1. Intel-SIG: commit 8ebc39a tools/power/x86/intel-speed-select: Display CPU as None for -1 Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 5cfac5a upstream. This version addresses issues with: - Support of SST BF/TF support per level - Increase number of CPUs displayed - Present all TRL levels for turbo-freq - Fix display for unsupported levels - Support multiple dies - Increase die count - Change CPU display for non compute domain Intel-SIG: commit 5cfac5a tools/power/x86/intel-speed-select: v1.19 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit fd77d7f upstream. When SST-TF is disabled in auto mode, the performance is getting limited. This is caused by wrong programming of Turbo Ratio Limit (TRL) MSR. This MSR always accepts the frequency ratio in 100 MHz unit. When the TPMI is sending TRL in 1 MHz unit, change to 100 MHz, before updating TRL MSR. Intel-SIG: commit fd77d7f tools/power/x86/intel-speed-select: Set TRL MSR in 100 MHz units Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit d8d4f57 upstream. This version addresses one issue: - Fix updating TRL MSR after SST-TF is disabled in auto mode. Intel-SIG: commit d8d4f57 tools/power/x86/intel-speed-select: v1.20 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 991c8aacfb6e3088027b8c776ad31d2c093905b8 upstream. When SST-TF is disabled, the TRL (Turbo Ratio Limit) of config level 0 is getting restored. But the TRL of current level should be restored which may not be config level 0. This is caused by a bug in treating config level as TRL level. So arguments needs to be swapped. Intel-SIG: commit 991c8aacfb6e tools/power/x86/intel-speed-select: Fix TRL restore after SST-TF disable Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 600c8f24319cebe671a70722df99b8006daebe21 upstream. This version has one fix: - Fix restoring TRL after SST-TF disable Intel-SIG: commit 600c8f24319c tools/power/x86/intel-speed-select: v1.21 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…CKAGE commit d74e6e29d2b29919253f625f0c560f4ca2606900 upstream. In the function for_each_online_power_domain_in_set() to pick one CPU from each power domain a three-dimensional array is used, which assumes that a package contains multiple dies, that means the die_id from /sys/devices/system/cpu/cpu0/topology/die_id is only local to package. If it is not unique, still there will be no functional issues in the current generation of products, but the MAX_DIE_PER_PACKAGE will need to be increased for future products with many packages. After kernel version 6.9 die ID is unique system wide not per package. Even if the CPU topology has no dies, the ID will still increment across package. In this case the die_id in package 0 will be 0 and die_id in package 1 will be 1 in a 2-package system. Since the die count must be same for packages, just count the number of dies in package 0 and calculate die index from /sys/devices/system/cpu/cpu0/topology/die_id which is only unique within a package. In this way the array size "int cpus[MAX_PACKAGE_COUNT][MAX_DIE_PER_PACKAGE][MAX_PUNIT_PER_DIE]" doesn't have to increase with increasing package count. No functional change is expected. Intel-SIG: commit d74e6e29d2b2 tools/power/x86/intel-speed-select: Prevent increasing MAX_DIE_PER_PACKAGE Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…die system commit c49e805db30674293d6a595db52549addd9d611f upstream. Even when there is no die exported by CPUID leaf 0x1F, the kernel version after 6.9 will show non zero die_id in the sysfs. In that case maximum die_id can still match maximum power domain ID. So the condition to check if the power domain ID is same a die_id to prevent duplicate display doesn't hold true. The better condition is to check if the maximum die_id is more than the maximum package_id. If the die_id is exposed by CPUID leaf 0x1F, the maximum die_id will be more than maximum package_id. With this change tracking of max_punit_id is not used, so remove storing max_punit_id. Intel-SIG: commit c49e805db306 tools/power/x86/intel-speed-select: Fix the condition to check multi die system Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 7ad93737ddf355d57cbdd2e769fc6a0802019b46 upstream. Instead of displaying "-1" for IO dies, display "IO". Intel-SIG: commit 7ad93737ddf3 tools/power/x86/intel-speed-select: Die ID for IO dies Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…sroot commit 8d9cfb6d712b829b40bc4d9831673aa05ebfeb0e upstream. This helps when using a cross-compiler for building intel-speed-select, currently, its hardcoded to pick libnl3 headers from build host which may not be same as build target when cross compiling. cc -print-sysroot will print nothing if compiler is configured without a sysroot and result in same string as it is now. Fixes errors with gcc configured with host include poisoning e.g. cc1: error: include location "/usr/include/libnl3" is unsafe for cross-compilation [-Werror=poison-system-directories] Signed-off-by: Khem Raj <raj.khem@gmail.com> [ srinivas: Changelog edits for checkpatch warning ] Intel-SIG: commit 8d9cfb6d712b tools/power/x86/intel-speed-select: Prefix header search path with sysroot Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 7dd556365b0ccba1f3c581f4c4747ad88497f496 upstream. This version has fix for: - Display of die ID and optimize array size for multi package systems. - Fix build warning with cross compiler Intel-SIG: commit 7dd556365b0c tools/power/x86/intel-speed-select: v1.22 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 5aa63cab70d3f9c1ff714977ecad09c62ccef731 upstream. Display fields added by SST PP revision 2. They include: uncore P0 (max frequency), P1 (base frequency) and Pm (min frequency) for uncore fabric 1. Intel-SIG: commit 5aa63cab70d3 tools/power/x86/intel-speed-select: Support SST PP revision 2 fields Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 51272ca7c3670d37cd4c573ed0f2f54e24095a01 upstream. On SST PP level switch, skip adjusting the uncore frequency limit and allow the hardware to handle this on newer platforms. As newer generations of CPUs have changed the extended family identifier, use this identifier to exclude the update. Intel-SIG: commit 51272ca7c367 tools/power/x86/intel-speed-select: Skip uncore frequency update Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 6dfe26cb1c290fa4b62e6fb8c05209fe5f7adb76 upstream. This version includes the following changes: - Displays SST-PP2 revision fields. - Skips updating uncore frequency limits on newer generations of CPUs. Intel-SIG: commit 6dfe26cb1c29 tools/power/x86/intel-speed-select: v1.23 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 6dc93d689068a2e41cca3c8977f2d3efd47146ee upstream. After change of enable/disable status of SST-CP, SST-TF and SST-BF check if the hardware status change was successful. If not successful even after retries, return failure. Intel-SIG: commit 6dc93d689068 tools/power/x86/intel-speed-select: Check feature status Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…valid buckets commit 3bd486e2d990194bf696423f9a639b3674d8c4e5 upstream. With SST-TF version 2 only 3 buckets are present. The information in others buckets can be junk. So initialize the info structure of type isst_turbo_freq_info, before issing ioctl to get bucket information. Intel-SIG: commit 3bd486e2d990 tools/power/x86/intel-speed-select: Reset isst_turbo_freq_info for invalid buckets Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit ad374eb9b33fc4738f21e57658073a04f77d493d upstream. This version includes the following changes: - Check feature status to check if the feature enablement was successful - Reset SST-TF bucket structure to display valid bucket info Intel-SIG: commit ad374eb9b33f tools/power/x86/intel-speed-select: v1.24 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 6588b8845e7387438d4b91ea86e7cb6d838b3108 upstream. When permitted by the file /dev/isst_interface, allow to issue commands for non root users. When user id is non root, check if "/dev/isst_interface" can still be opened. If this file can be opened, allow all read only commands. Intel-SIG: commit 6588b8845e73 tools/power/x86/intel-speed-select: Allow non root users Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…ction commit 21adcd5ec99f342489a49e9d237a987b1bd9fab5 upstream. Replace hardcoded libnl3 include path with pkg-config detection to improve portability across different distributions and build environments. The previous implementation used a fixed path constructed from the compiler's sysroot, which could fail on systems with non-standard library installations. Now the build system: - Attempts to detect libnl-3.0 include paths using pkg-config - Falls back to /usr/include/libnl3 if pkg-config is unavailable - Maintains backward compatibility with existing build configurations This ensures the tool builds correctly on a wider range of systems while preserving existing behavior when pkg-config is not present. Closes:https://bugzilla.kernel.org/show_bug.cgi?id=220819 Intel-SIG: commit 21adcd5ec99f tools/power/x86/intel-speed-select: Use pkg-config for libnl-3.0 detection Sync intel-speed-select to v1.26 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…te_cpus() commit 56c17ee151c6e1a73d77e15b82a8e2130cd8dd16 upstream. The file descriptor opened in isolate_cpus() when (!level) is true was not being closed before returning, causing a file descriptor leak in both the error path and the success path. When write() fails at line 950, the function returns at line 953 without closing the file descriptor. Similarly, on success, the function returns at line 956 without closing the file descriptor. Add close(fd) calls before both return statements to fix the resource leak. This follows the same pattern used elsewhere in the same function where file descriptors are properly closed before returning (see lines 1005 and 1027). Intel-SIG: commit 56c17ee151c6 tools/power/x86/intel-speed-select: Fix file descriptor leak in isolate_cpus() Sync intel-speed-select to v1.26 Fixes: 997074d ("tools/power/x86/intel-speed-select: Use cgroup v2 isolation") Signed-off-by: Malaya Kumar Rout <mrout@redhat.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 6142b726e6e64870ab0c7ffb158bffa141f83bb6 upstream. This version includes the following changes: - Allow read only commands for non root users when permitted - Fix file descriptor leak in isolate_cpus() - Replace hardcoded libnl3 include path Intel-SIG: commit 6142b726e6e6 tools/power/x86/intel-speed-select: v1.25 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit ae67f582398611b9f67c06961e292e3a2612346d upstream. SST-PP level change results in online/offline of CPUs with -o option. The Linux intel-pstate driver internally stores the current HWP_REQ MSR value during offline and restores them during online. It is possible that during SST-PP level change, the new HWP_CAP limits can be updated. So, when a CPU is online, the HWP_REQ MSR should be updated to new values based on HWP_CAP values. This is particularly problematic when either turbo is disabled or the current HWP_REQ value (stored before online) is less than the base frequency from the updated HWP_CAP MSR guaranteed value. If the HWP_REQ MSR is not updated, then the performance will be limited to the value before perf level change. Hence the tool updates cpufreq scaling_max_freq to the newer base_frequency value in this case. This step is not required when HWP interrupts are enabled, as the perf level change should result in a new interrupt with HWP_GUARANTEED_PERF_CHANGE_STATUS and the intel_pstate driver will update to new limits. But the tool needs to handle the case when HWP interrupts are not enabled but there is no way for the tool to know that HWP interrupts are enabled or not. So, it has to still update the scaling_max_freq. With the QOS changes in the kernel, user space writes to scaling_max_freq are treated as hard limits. So, when base frequency is increased with SST-BF enabled, the cpufreq subsystem will still not allow setting to the SST-BF high priority core frequency. So, the HWP_REQ MSR will still be capped to the user-set scaling_max_freq after SST-PP level change. To address this, instead of setting scaling_max_freq to the current HWP_CAP highest frequency, set it to the maximum integer value to set the QOS limit as unconstrained. In this case, the actual HWP_REQ maximum frequency will still be capped to HWP_CAP highest performance by the intel-pstate driver. So, it will not result in invalid HWP_REQ values. Intel-SIG: commit ae67f5823986 tools/power/x86/intel-speed-select: Avoid current base freq as maximum Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit df4a83543117c7fc27077fd7f4ffe870556b257b upstream. When decode and use CPU extended family ID in intel-speed-select, there are several potential issues, 1. Mask with 0x0f to get CPU extended family ID is bogus because CPU extended family ID takes 8 bits (bit 27:20). 2. Use CPU extended family ID fields without checking CPU family ID is risky. Because Intel SDM says, "The Extended Family ID needs to be examined only when the Family ID is 0FH." 3. Saving cpu family ID and cpu extended family ID separately doesn't align with Linux kernel. And it may bring extra complexity when making family specific changes in the future. Intel-SIG: commit df4a83543117 tools/power/x86/intel-speed-select: Fix cpu extended family ID decoding Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit 3e244dd513e26728577f1e4deca6fdf749b6f244 upstream. When running the "intel-speed-select -h" command, it returns 1. 0 when using a version that is API incompatible. 2. 1 when using a version that is API compatible. And this is confusing. Fix the program to return 0 for "-h" parameter, and return 1 whenever "Incompatible API versions" is detected. Intel-SIG: commit 3e244dd513e2 tools/power/x86/intel-speed-select: Fix some program return value Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…ble API version is detected commit 93f5b44b416c7419a76a5e1311fb750fca585638 upstream. When running an old version intel-speed-select tool on newer platforms, even with "intel-speed-select -v", the tool only complains about "Incompatible API version", without giving the current version info. Print Version info whenever Incompatible API version is detected. Intel-SIG: commit 93f5b44b416c tools/power/x86/intel-speed-select: Print Version info when Incompatible API version is detected Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
…orted CLX platforms commit 1b25f03f3daf7c26c37050a7b2b5858ad5f99cfc upstream. When running intel-speed-select on unsupported CLX platforms, it prints intel-speed-select: Invalid CPU model (85) : Success Because this is not a system error and errno is not set. Replace err() with exit(). Intel-SIG: commit 1b25f03f3daf tools/power/x86/intel-speed-select: Fix output when running on unsupported CLX platforms Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
commit ee69d9e32bdb0044b9444f1ae12107ff8b5ff95f upstream. This version includes the following changes: - Setting current base frequency as maximum for SST-BF with kernel QOS changes - Harmonize extended family decoded with the rest of the kernel - Minor changes for error codes and messages Intel-SIG: commit ee69d9e32bdb tools/power/x86/intel-speed-select: v1.26 release Sync intel-speed-select to v1.26 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Zhang Rui: amend commit log ] Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test