]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
tools/power/x86/intel-speed-select: Fix avx options for turbo-freq feature
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 5 Mar 2020 22:45:34 +0000 (14:45 -0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 20 Mar 2020 12:46:22 +0000 (14:46 +0200)
Specifying "avx2" and "avx512" option for display filter doesn't work
with short option "-r", only works with --try-type. Also compare full
6 characters for "avx512" string.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
tools/power/x86/intel-speed-select/isst-config.c

index a44ec2f76f529e9858a174fcf647ffe3b9e0bb39..2a81fb881f04ba3864500ccaf33689958716260b 100644 (file)
@@ -2329,7 +2329,7 @@ static void parse_cmd_args(int argc, int start, char **argv)
        option_index = start;
 
        optind = start + 1;
-       while ((opt = getopt_long(argc, argv, "b:l:t:c:d:e:n:m:p:w:hoa",
+       while ((opt = getopt_long(argc, argv, "b:l:t:c:d:e:n:m:p:w:r:hoa",
                                  long_options, &option_index)) != -1) {
                switch (opt) {
                case 'a':
@@ -2355,7 +2355,7 @@ static void parse_cmd_args(int argc, int start, char **argv)
                                fact_avx = 0x01;
                        } else if (!strncmp(optarg, "avx2", 4)) {
                                fact_avx = 0x02;
-                       } else if (!strncmp(optarg, "avx512", 4)) {
+                       } else if (!strncmp(optarg, "avx512", 6)) {
                                fact_avx = 0x04;
                        } else {
                                fprintf(outf, "Invalid sse,avx options\n");