提交 f89f4147 编写于 作者: H Hoan Tran 提交者: Rafael J. Wysocki

cpufreq: CPPC: Avoid overflow when calculating desired_perf

This patch fixes overflow issue when calculating the desired_perf.

Fixes: ad38677d (cpufreq: CPPC: Force reporting values in KHz to fix user space interface)
Signed-off-by: NHoan Tran <hotran@apm.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 e01072d2
......@@ -84,7 +84,7 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
cpu = all_cpu_data[policy->cpu];
cpu->perf_ctrls.desired_perf = target_freq * policy->max / cppc_dmi_max_khz;
cpu->perf_ctrls.desired_perf = (u64)target_freq * policy->max / cppc_dmi_max_khz;
freqs.old = policy->cur;
freqs.new = target_freq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册