diff options
author | Jan Kiszka <[email protected]> | 2016-07-08 20:42:04 +0200 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2016-07-11 15:12:30 +0200 |
commit | 5fc8f707a2aa40c767c3a338738b9b6fcd151ac1 (patch) | |
tree | ca8a826907dbe6681ac47a8146bce898ba7b48db | |
parent | 825773609c8ae34a19d4b593555493ae2754eff7 (diff) |
intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate()
If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address some
MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.
Found while running over the Jailhouse hypervisor which became upset
about this strange MSR index.
Signed-off-by: Jan Kiszka <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Cc: 4.4+ <[email protected]> # 4.4+
Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index f6dd07275862..25bfdec4e74e 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -945,7 +945,7 @@ static int core_get_max_pstate(void) if (err) goto skip_tar; - tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl; + tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl & 0x3); err = rdmsrl_safe(tdp_msr, &tdp_ratio); if (err) goto skip_tar; |