Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bae86ced authored by Srinivasarao P's avatar Srinivasarao P Committed by alexax66
Browse files

cpufreq: Correct the data reported in all_time_in_state



Commit bd9474e059bbb2bb62f7e93894cfc3d3ba473fb2 (cpufreq_stats:
Adds the fucntionality to load current values for each frequency
for all the cores) introduced a change by which
'cpufreq_allstats_create' gets called at initialization (from
'cpufreq_stats_init' instead of 'cpufreq_stat_notifier_policy').
This causes 'cpufreq_allstate_create' to be called before the
freq_table is allocated from 'create_all_freq_table'. Due to
this, the data for cpu's which are online at boot are not
added to the 'all_freq_table' leading to the incorrect
reporting of data when the below sysfs command is run -
'cat sys/devices/system/cpu/cpufreq/all_time_in_state'.

Correct this behaviour by altering the cpufreq_stats init
sequence by which the memory for 'all_freq_table' is allocated
before the 'cpufreq_allstats_create' function is called.

Change-Id: I2232dacdc0deec4d1987c418e833fe28f74623fc
Signed-off-by: default avatarNirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>

Change-Id: I938f45e92ff6d5371c32c4d0e37274e6de66769c

Used commi: https://github.com/omnirom/android_kernel_lge_msm8992/commit/cac8a70918f8daad0011ba24a032ad9d2012f33a
parent 193a7cc9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment