kernel_CpufreqMinMax: fix for Intel P-state cpufreq driver

Intel P-state driver implements an internal governer which selects
the currect P-state automatically. Any value between cpuinfo_min_freq
and cpuinfo_max_freq is allowed for scaling_max_freq and scaling_min_freq.
Setting them is equivalent to setting max_perf_pct and min_perf_pct under
/sys/devices/system/cpu/intel_pstate/.

scaling_available_frequencies no longer exists when Intel P-state driver
is enabled, so we test a few frequencies in the range [min, max].
See intel_pstate_set_policy() in intel_pstate.c for more info.

BUG=chromium:397567
TEST=kernel_CpufreqMinMax passes with CONFIG_X86_INTEL_PSTATE=y

Change-Id: Ie79ee41d8d7d8f3145e25d42a219b8d5ad24e215
Signed-off-by: Ben Zhang <benzh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210551
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
1 file changed