sched: Fix possible overflow in cpu_cycles_to_freq()
Truncating period to u32 could lead to incorrect results. Make it u64 instead. Change-Id: I5224a943e64bc6d64b6c8e614a01f798a6cdc796 Signed-off-by: Puja Gupta <pujag@codeaurora.org> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
55cc722ec6
commit
6e92713cba
1 changed files with 1 additions and 1 deletions
|
@ -1249,7 +1249,7 @@ static inline int cpu_min_power_cost(int cpu)
|
|||
return cpu_rq(cpu)->cluster->min_power_cost;
|
||||
}
|
||||
|
||||
static inline u32 cpu_cycles_to_freq(u64 cycles, u32 period)
|
||||
static inline u32 cpu_cycles_to_freq(u64 cycles, u64 period)
|
||||
{
|
||||
return div64_u64(cycles, period);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue