]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: get P1 from TAR when available
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 14 Oct 2015 23:11:59 +0000 (16:11 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Oct 2015 23:53:18 +0000 (01:53 +0200)
commit5df90d3fb459afddc6677da9fac4cb393215ca6d
treefa4883706d74d69fd6759a68b9502245ade2ba1a
parent53482b9a8f4041248d51c5c4f1abf1811631ad46
cpufreq: intel_pstate: get P1 from TAR when available

After Ivybridge, the max non turbo ratio obtained from platform info msr
is not always guaranteed P1 on client platforms. The max non turbo
activation ratio (TAR), determines the max for the current level of TDP.
The ratio in platform info is physical max. The TAR MSR can be locked,
so updating this value is not possible on all platforms.
This change gets this ratio from MSR TURBO_ACTIVATION_RATIO if
available,
but also do some sanity checking to make sure that this value is
correct.
The sanity check involves reading the TDP ratio for the current tdp
control value when platform has configurable TDP present and matching
TAC
with this.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/include/asm/msr-index.h
drivers/cpufreq/intel_pstate.c