Commit 191e5edf96dc4939f5db0605cc65de9f4d88d155
Committed by
Rafael J. Wysocki
1 parent
c88883cd54
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
cpufreq / intel_pstate: Fix 32 bit build
Fixes 32 bit build. on i386: drivers/built-in.o: In function `intel_pstate_timer_func': intel_pstate.c:(.text+0x4ce97e): undefined reference to `__udivdi3' drivers/built-in.o: In function `intel_pstate_cpu_init': intel_pstate.c:(.cpuinit.text+0x974): undefined reference to `__udivdi3' Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
drivers/cpufreq/intel_pstate.c
... | ... | @@ -456,7 +456,8 @@ |
456 | 456 | core_pct = div64_u64(sample->aperf * 100, sample->mperf); |
457 | 457 | sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000; |
458 | 458 | |
459 | - sample->core_pct_busy = sample->pstate_pct_busy * core_pct / 100; | |
459 | + sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct), | |
460 | + 100); | |
460 | 461 | } |
461 | 462 | |
462 | 463 | static inline void intel_pstate_sample(struct cpudata *cpu) |