Commit d72b4015 authored by Viresh Kumar's avatar Viresh Kumar Committed by Eduardo Valentin

thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device

This shrinks the size of the structure on arm64 by 8 bytes by avoiding
padding of 4 bytes at two places.

Also add missing doc comment for freq_table
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Tested-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent cb1b6318
......@@ -75,17 +75,18 @@ struct time_in_idle {
* struct cpufreq_cooling_device - data for cooling device with cpufreq
* @id: unique integer value corresponding to each cpufreq_cooling_device
* registered.
* @cdev: thermal_cooling_device pointer to keep track of the
* registered cooling device.
* @policy: cpufreq policy.
* @last_load: load measured by the latest call to cpufreq_get_requested_power()
* @cpufreq_state: integer value representing the current state of cpufreq
* cooling devices.
* @clipped_freq: integer value representing the absolute value of the clipped
* frequency.
* @max_level: maximum cooling level. One less than total number of valid
* cpufreq frequencies.
* @freq_table: Freq table in descending order of frequencies
* @cdev: thermal_cooling_device pointer to keep track of the
* registered cooling device.
* @policy: cpufreq policy.
* @node: list_head to link all cpufreq_cooling_device together.
* @last_load: load measured by the latest call to cpufreq_get_requested_power()
* @idle_time: idle time stats
* @plat_get_static_power: callback to calculate the static power
*
......@@ -94,14 +95,14 @@ struct time_in_idle {
*/
struct cpufreq_cooling_device {
int id;
struct thermal_cooling_device *cdev;
struct cpufreq_policy *policy;
u32 last_load;
unsigned int cpufreq_state;
unsigned int clipped_freq;
unsigned int max_level;
struct freq_table *freq_table; /* In descending order */
struct thermal_cooling_device *cdev;
struct cpufreq_policy *policy;
struct list_head node;
u32 last_load;
struct time_in_idle *idle_time;
get_static_t plat_get_static_power;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment