Commit 8edb0a6e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

intel_pstate: Use sample.core_avg_perf in get_avg_pstate()

Notice that get_avg_pstate() can use sample.core_avg_perf instead of
carrying the same division again, so make it do that.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a1c9787d
...@@ -1218,8 +1218,8 @@ static inline int32_t get_avg_frequency(struct cpudata *cpu) ...@@ -1218,8 +1218,8 @@ static inline int32_t get_avg_frequency(struct cpudata *cpu)
static inline int32_t get_avg_pstate(struct cpudata *cpu) static inline int32_t get_avg_pstate(struct cpudata *cpu)
{ {
return div64_u64(cpu->pstate.max_pstate_physical * cpu->sample.aperf, return mul_ext_fp(cpu->pstate.max_pstate_physical,
cpu->sample.mperf); cpu->sample.core_avg_perf);
} }
static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu) static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment