cpufreq: governor: Pass policy as argument to ->gov_dbs_timer()
Pass 'policy' as argument to ->gov_dbs_timer() instead of cdbs and dbs_data. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
e68fe18c5b
commit
affde5d06a
@@ -115,13 +115,13 @@ static void cs_check_cpu(int cpu, unsigned int load)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int cs_dbs_timer(struct cpu_dbs_info *cdbs,
|
static unsigned int cs_dbs_timer(struct cpufreq_policy *policy, bool modify_all)
|
||||||
struct dbs_data *dbs_data, bool modify_all)
|
|
||||||
{
|
{
|
||||||
|
struct dbs_data *dbs_data = policy->governor_data;
|
||||||
struct cs_dbs_tuners *cs_tuners = dbs_data->tuners;
|
struct cs_dbs_tuners *cs_tuners = dbs_data->tuners;
|
||||||
|
|
||||||
if (modify_all)
|
if (modify_all)
|
||||||
dbs_check_cpu(dbs_data, cdbs->shared->policy->cpu);
|
dbs_check_cpu(dbs_data, policy->cpu);
|
||||||
|
|
||||||
return delay_for_sampling_rate(cs_tuners->sampling_rate);
|
return delay_for_sampling_rate(cs_tuners->sampling_rate);
|
||||||
}
|
}
|
||||||
|
@@ -253,7 +253,7 @@ static void dbs_timer(struct work_struct *work)
|
|||||||
if (!need_load_eval(cdbs->shared, sampling_rate))
|
if (!need_load_eval(cdbs->shared, sampling_rate))
|
||||||
modify_all = false;
|
modify_all = false;
|
||||||
|
|
||||||
delay = dbs_data->cdata->gov_dbs_timer(cdbs, dbs_data, modify_all);
|
delay = dbs_data->cdata->gov_dbs_timer(policy, modify_all);
|
||||||
gov_queue_work(dbs_data, policy, delay, modify_all);
|
gov_queue_work(dbs_data, policy, delay, modify_all);
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
|
@@ -209,8 +209,7 @@ struct common_dbs_data {
|
|||||||
|
|
||||||
struct cpu_dbs_info *(*get_cpu_cdbs)(int cpu);
|
struct cpu_dbs_info *(*get_cpu_cdbs)(int cpu);
|
||||||
void *(*get_cpu_dbs_info_s)(int cpu);
|
void *(*get_cpu_dbs_info_s)(int cpu);
|
||||||
unsigned int (*gov_dbs_timer)(struct cpu_dbs_info *cdbs,
|
unsigned int (*gov_dbs_timer)(struct cpufreq_policy *policy,
|
||||||
struct dbs_data *dbs_data,
|
|
||||||
bool modify_all);
|
bool modify_all);
|
||||||
void (*gov_check_cpu)(int cpu, unsigned int load);
|
void (*gov_check_cpu)(int cpu, unsigned int load);
|
||||||
int (*init)(struct dbs_data *dbs_data, bool notify);
|
int (*init)(struct dbs_data *dbs_data, bool notify);
|
||||||
|
@@ -191,10 +191,9 @@ static void od_check_cpu(int cpu, unsigned int load)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int od_dbs_timer(struct cpu_dbs_info *cdbs,
|
static unsigned int od_dbs_timer(struct cpufreq_policy *policy, bool modify_all)
|
||||||
struct dbs_data *dbs_data, bool modify_all)
|
|
||||||
{
|
{
|
||||||
struct cpufreq_policy *policy = cdbs->shared->policy;
|
struct dbs_data *dbs_data = policy->governor_data;
|
||||||
unsigned int cpu = policy->cpu;
|
unsigned int cpu = policy->cpu;
|
||||||
struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info,
|
struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info,
|
||||||
cpu);
|
cpu);
|
||||||
|
Reference in New Issue
Block a user