tools/power/x86/intel-speed-select: Implement base-freq commands on CascadeLake-N
authorPrarit Bhargava <prarit@redhat.com>
Thu, 10 Oct 2019 20:29:45 +0000 (13:29 -0700)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 15 Oct 2019 08:02:30 +0000 (11:02 +0300)
commit1aa7177cdcb38d114e0a80dc27482e645d8068f2
treea3ea6eae0c5e8b946974df4ca19f4e244565b0cc
parent062e4aac92e8acbab2fd135e90b580b903c3724b
tools/power/x86/intel-speed-select: Implement base-freq commands on CascadeLake-N

Add functionality for base-freq info|enable|disable info on CascadeLake-N.

Sample output:
Intel(R) Speed Select Technology
Executing on CPU model:85[0x55]
 package-0
  die-0
    cpu-0
      speed-select-base-freq
        high-priority-base-frequency(MHz):2700000
        high-priority-cpu-mask:00000000,0000e8c0
        high-priority-cpu-list:6,7,11,13,14,15
        low-priority-base-frequency(MHz):2100000
 package-1
  die-0
    cpu-20
      speed-select-base-freq
        high-priority-base-frequency(MHz):2700000
        high-priority-cpu-mask:0000000e,8c000000
        high-priority-cpu-list:26,27,31,33,34,35
        low-priority-base-frequency(MHz):2100000

The enable command always returns success, and the disable command always
returns failed because SST-BF cannot be enabled or disabled from the OS on
CascadeLake-N.

Enable command also have support for --auto|-a option, which sets cpufreq
scaling_min to max, so that the high priority base frequency can be the
required minimum for high priority cores. Disable command with -a/--auto
option reset the setting back to the min frequency.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
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