提交 5f97899d 编写于 作者: K Kristen Carlson Accardi 提交者: Rafael J. Wysocki

intel_pstate: remove MSR test

x86_match_cpu will not match our cpuid unless APERF/MPERF flag is
set, so there is no need to do the manual check for this MSR.
Signed-off-by: NKristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 4492d1a2
...@@ -1024,25 +1024,11 @@ static unsigned int force_load; ...@@ -1024,25 +1024,11 @@ static unsigned int force_load;
static int intel_pstate_msrs_not_valid(void) static int intel_pstate_msrs_not_valid(void)
{ {
/* Check that all the msr's we are using are valid. */
u64 aperf, mperf, tmp;
rdmsrl(MSR_IA32_APERF, aperf);
rdmsrl(MSR_IA32_MPERF, mperf);
if (!pstate_funcs.get_max() || if (!pstate_funcs.get_max() ||
!pstate_funcs.get_min() || !pstate_funcs.get_min() ||
!pstate_funcs.get_turbo()) !pstate_funcs.get_turbo())
return -ENODEV; return -ENODEV;
rdmsrl(MSR_IA32_APERF, tmp);
if (!(tmp - aperf))
return -ENODEV;
rdmsrl(MSR_IA32_MPERF, tmp);
if (!(tmp - mperf))
return -ENODEV;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册