Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq / intel_pstate: Fix calculation of current frequency

Use the correct pstate value to calculate the effective frequency.

References: https://bugzilla.redhat.com/show_bug.cgi?id=923942
Reported-by: Satish Balay <balay@fastmail.fm>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Dirk Brandewie and committed by
Rafael J. Wysocki
e6f3eb29 b563b4e3

+1 -1
+1 -1
drivers/cpufreq/intel_pstate.c
··· 454 454 sample->idletime_us * 100, 455 455 sample->duration_us); 456 456 core_pct = div64_u64(sample->aperf * 100, sample->mperf); 457 - sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000; 457 + sample->freq = cpu->pstate.max_pstate * core_pct * 1000; 458 458 459 459 sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct), 460 460 100);