projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cpufreq: CPPC: Avoid overflow when calculating desired_perf
[cascardo/linux.git]
/
drivers
/
cpufreq
/
cppc_cpufreq.c
diff --git
a/drivers/cpufreq/cppc_cpufreq.c
b/drivers/cpufreq/cppc_cpufreq.c
index
6debc18
..
99db422
100644
(file)
--- a/
drivers/cpufreq/cppc_cpufreq.c
+++ b/
drivers/cpufreq/cppc_cpufreq.c
@@
-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;