summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-20 12:02:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-20 12:02:24 -0700
commitda6b5aae84beb0917ecb0c9fbc71169d145397ff (patch)
tree20d39405eb2d710a2beae5a51ff9d4c92009a554 /tools
parentb69e478512080f9bb03ed3e812b759bb73e2837b (diff)
parent344bf523d441d44c75c429ea6cdcfa8f12efde4d (diff)
Merge tag 'platform-drivers-x86-v7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Ilpo Järvinen: "asus-wmi: - Retain battery charge threshold during boot which avoids unsolicited change to 100%. Return -ENODATA when the limit is not yet known - Improve screenpad power/brightness handling consistency - Fix screenpad brightness range barco-p50-gpio: - Normalize gpio_get return values bitland-mifs-wmi: - Add driver for Bitland laptops (supports platform profile, hwmon, kbd backlight, gpu mode, hotkeys, and fan boost) dell_rbu: - Fix using uninitialized value in sysfs write function dell-wmi-sysman: - Respect destination length when constructing enum strings hp-wmi: - Propagate fan setting apply failures and log an error - Fix sysfs write vs work handler cancel_delayed_work_sync() deadlock - Correct keepalive schedule_delayed_work() to mod_delayed_work() - Fix u8 underflows in GPU delta calculation - Use mutex to protect fan pwm/mode - Ignore kbd backlight and FnLock key events that are handled by FW - Fix fan table parsing (use correct field) - Add support for Omen 14-fb0xxx, 16-n0xxx, 16-wf1xxx, and Omen MAX 16-ak0xxxx input: trackpoint & thinkpad_acpi: - Enable doubletap by default and add sysfs enable/disable int3472: - Add support for GPIO type 0x02 (IR flood LED) intel-speed-select: (updated to v1.26) - Avoid using current base frequency as maximum - Fix CPU extended family ID decoding - Fix exit code - Improve error reporting intel/vsec: - Refactor to support ACPI-enumerated PMT endpoints. pcengines-apuv2: - Attach software node to the gpiochip uniwill: - Refactor hwmon to smaller parts to accomodate HW diversity - Support USB-C power/performance priority switch through sysfs - Add another XMG Fusion 15 (L19) DMI vendor - Enable fine-grained features to device lineup mapping wmi: - Perform output size check within WMI core to allow simpler WMI drivers misc: - acpi_driver -> platform driver conversions (a large number of changes from Rafael J. Wysocki) - cleanups / refactoring / improvements" * tag 'platform-drivers-x86-v7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (106 commits) platform/x86: hp-wmi: Add support for Omen 16-wf1xxx (8C77) platform/x86: hp-wmi: Add support for Omen 16-n0xxx (8A44) platform/x86: hp-wmi: Add support for OMEN MAX 16-ak0xxx (8D87) platform/x86: hp-wmi: fix fan table parsing platform/x86: hp-wmi: add Omen 14-fb0xxx (board 8C58) support platform/wmi: Replace .no_notify_data with .min_event_size platform/wmi: Extend wmidev_query_block() to reject undersized data platform/wmi: Extend wmidev_invoke_method() to reject undersized data platform/wmi: Prepare to reject undersized unmarshalling results platform/wmi: Convert drivers to use wmidev_invoke_procedure() platform/wmi: Add wmidev_invoke_procedure() platform/x86: int3472: Add support for GPIO type 0x02 (IR flood LED) platform/x86: int3472: Parameterize LED con_id in registration platform/x86: int3472: Rename pled to led in LED registration code platform/x86: int3472: Use local variable for LED struct access platform/x86: thinkpad_acpi: remove obsolete TODO comment platform/x86: dell-wmi-sysman: bound enumeration string aggregation platform/x86: hp-wmi: Ignore backlight and FnLock events platform/x86: uniwill-laptop: Fix signedness bug platform/x86: dell_rbu: avoid uninit value usage in packet_size_write() ...
Diffstat (limited to 'tools')
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c41
1 files changed, 24 insertions, 17 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index dd9056ddb016..2faff1aead52 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -16,7 +16,7 @@ struct process_cmd_struct {
int arg;
};
-static const char *version_str = "v1.25";
+static const char *version_str = "v1.26";
static const int supported_api_ver = 3;
static struct isst_if_platform_info isst_platform_info;
@@ -26,7 +26,7 @@ static FILE *outf;
static int cpu_model;
static int cpu_stepping;
-static int extended_family;
+static int cpu_family;
#define MAX_CPUS_IN_ONE_REQ 512
static short max_target_cpus;
@@ -82,6 +82,11 @@ struct cpu_topology {
static int read_only;
+static void print_version(void)
+{
+ fprintf(outf, "Version %s\n", version_str);
+}
+
static void check_privilege(void)
{
if (!read_only)
@@ -158,7 +163,7 @@ int is_icx_platform(void)
static int is_dmr_plus_platform(void)
{
- if (extended_family == 0x04)
+ if (cpu_family == 19)
return 1;
return 0;
@@ -167,13 +172,14 @@ static int is_dmr_plus_platform(void)
static int update_cpu_model(void)
{
unsigned int ebx, ecx, edx;
- unsigned int fms, family;
+ unsigned int fms;
__cpuid(1, fms, ebx, ecx, edx);
- family = (fms >> 8) & 0xf;
- extended_family = (fms >> 20) & 0x0f;
+ cpu_family = (fms >> 8) & 0xf;
+ if (cpu_family == 0xf)
+ cpu_family += (fms >> 20) & 0xff;
cpu_model = (fms >> 4) & 0xf;
- if (family == 6 || family == 0xf)
+ if (cpu_family == 6 || cpu_family == 0xf)
cpu_model += ((fms >> 16) & 0xf) << 4;
cpu_stepping = fms & 0xf;
@@ -1137,8 +1143,9 @@ static int isst_fill_platform_info(void)
close(fd);
if (isst_platform_info.api_version > supported_api_ver) {
+ print_version();
printf("Incompatible API versions; Upgrade of tool is required\n");
- return -1;
+ exit(1);
}
set_platform_ops:
@@ -1744,6 +1751,9 @@ static int no_turbo(void)
return parse_int_file(0, "/sys/devices/system/cpu/intel_pstate/no_turbo");
}
+#define U32_MAX ((unsigned int)~0U)
+#define S32_MAX ((int)(U32_MAX >> 1))
+
static void adjust_scaling_max_from_base_freq(int cpu)
{
int base_freq, scaling_max_freq;
@@ -1751,7 +1761,7 @@ static void adjust_scaling_max_from_base_freq(int cpu)
scaling_max_freq = parse_int_file(0, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", cpu);
base_freq = get_cpufreq_base_freq(cpu);
if (scaling_max_freq < base_freq || no_turbo())
- set_cpufreq_scaling_min_max(cpu, 1, base_freq);
+ set_cpufreq_scaling_min_max(cpu, 1, S32_MAX);
}
static void adjust_scaling_min_from_base_freq(int cpu)
@@ -3191,12 +3201,6 @@ static void usage(void)
printf("\tTo get full turbo-freq information dump:\n");
printf("\t\tintel-speed-select turbo-freq info -l 0\n");
}
- exit(1);
-}
-
-static void print_version(void)
-{
- fprintf(outf, "Version %s\n", version_str);
exit(0);
}
@@ -3246,8 +3250,10 @@ static void cmdline(int argc, char **argv)
}
ret = update_cpu_model();
- if (ret)
- err(-1, "Invalid CPU model (%d)\n", cpu_model);
+ if (ret) {
+ fprintf(stderr, "Invalid CPU model (%d)\n", cpu_model);
+ exit(1);
+ }
printf("Intel(R) Speed Select Technology\n");
printf("Executing on CPU model:%d[0x%x]\n", cpu_model, cpu_model);
@@ -3311,6 +3317,7 @@ static void cmdline(int argc, char **argv)
break;
case 'v':
print_version();
+ exit(0);
break;
case 'b':
oob_mode = 1;