OSDN Git Service

tools/power/x86/intel-speed-select: Fix result display for turbo-freq auto mode
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 14 Jan 2020 19:22:15 +0000 (11:22 -0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Jan 2020 09:39:31 +0000 (11:39 +0200)
commit78e77b7dfd9abdf0bb003b679e0afbde78d98f47
tree112ea8267335fde4fcb325739ea68702820ab6d1
parent645feeb2f571acfc36a7205a6302e8c7e442d617
tools/power/x86/intel-speed-select: Fix result display for turbo-freq auto mode

The turbo-freq enable with auto mode, prints result for the last possible
CPU, which is not correct when either CPU is not present or user wants
command to be limited to a single die/package. For example, in the
below command user wants to limit to die/package 0, but the
"turbo-freq --auto" result is displayed using the other package.

$ sudo intel-speed-select -c 0 turbo-freq enable -a
Intel(R) Speed Select Technology
 package-0
  die-0
    cpu-0
      turbo-freq
        enable:success
 package--1
  die-0
    cpu-31
      turbo-freq --auto
        enable:success

Since we do have to traverse all CPUs, don't display CPU info for
"turbo-freq --auto", as we already displayed the result for
turbo-freq enable with the CPU information.

With the fix, the same command results in:

$ sudo intel-speed-select -c 0 turbo-freq enable -a
Intel(R) Speed Select Technology
package-0
  die-0
    cpu-0
      turbo-freq
        enable:success
      turbo-freq --auto
        enable:success

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
tools/power/x86/intel-speed-select/isst-display.c