diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2014-02-26 15:50:05 +0100 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:44:12 +0900 |
commit | 7258248e69990769afc8e849d44557899e175585 (patch) | |
tree | d2aa947a11c4d45022dd58677270467d0b16e159 | |
parent | a8cc31c82c6a80fca0491b809c3cdecb0865c67d (diff) | |
download | linux-3.10-7258248e69990769afc8e849d44557899e175585.tar.gz linux-3.10-7258248e69990769afc8e849d44557899e175585.tar.bz2 linux-3.10-7258248e69990769afc8e849d44557899e175585.zip |
cpufreq:LAB:cpufreq_governor: Remove redundant LAB code from cpufreq_governor.[h|c]
Since the Ondemand code has been reused for LAB, it is now possible to remove
code specially defined for LAB governor at the cpufreq_governor.[h|c] code.
Change-Id: I9c48eade8ffe6a94efd0145b7d48afb405961155
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 24 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.h | 16 |
2 files changed, 5 insertions, 35 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index a393e2adb31..c1704fa8027 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -85,7 +85,6 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu) struct cpu_dbs_common_info *cdbs = dbs_data->cdata->get_cpu_cdbs(cpu); struct od_dbs_tuners *od_tuners = dbs_data->tuners; struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; - struct lb_dbs_tuners *lb_tuners = dbs_data->tuners; struct cpufreq_policy *policy; unsigned int max_load = 0; unsigned int ignore_nice; @@ -93,8 +92,6 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu) if (dbs_data->cdata->governor == GOV_ONDEMAND) ignore_nice = od_tuners->ignore_nice_load; - else if (dbs_data->cdata->governor == GOV_LAB) - ignore_nice = lb_tuners->ignore_nice; else ignore_nice = cs_tuners->ignore_nice_load; @@ -155,10 +152,10 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu) load = 100 * (wall_time - idle_time) / wall_time; if (dbs_data->cdata->governor == GOV_LAB) { - struct lb_cpu_dbs_info_s *lb_dbs_info = + struct od_cpu_dbs_info_s *od_dbs_info = dbs_data->cdata->get_cpu_dbs_info_s(j); - lb_dbs_info->idle_time = (100 * idle_time) / wall_time; + od_dbs_info->idle_time = (100 * idle_time) / wall_time; } if (load > max_load) @@ -228,9 +225,6 @@ static void set_sampling_rate(struct dbs_data *dbs_data, if (dbs_data->cdata->governor == GOV_CONSERVATIVE) { struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; cs_tuners->sampling_rate = sampling_rate; - } else if(dbs_data->cdata->governor == GOV_LAB) { - struct lb_dbs_tuners *lb_tuners = dbs_data->tuners; - lb_tuners->sampling_rate = sampling_rate; } else { struct od_dbs_tuners *od_tuners = dbs_data->tuners; od_tuners->sampling_rate = sampling_rate; @@ -243,13 +237,12 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, struct dbs_data *dbs_data; struct od_cpu_dbs_info_s *od_dbs_info = NULL; struct cs_cpu_dbs_info_s *cs_dbs_info = NULL; - struct lb_cpu_dbs_info_s *lb_dbs_info = NULL; struct od_ops *od_ops = NULL; struct od_dbs_tuners *od_tuners = NULL; struct cs_dbs_tuners *cs_tuners = NULL; - struct lb_dbs_tuners *lb_tuners = NULL; struct cpu_dbs_common_info *cpu_cdbs; - unsigned int sampling_rate = 0, ignore_nice = 0, latency, j, cpu = policy->cpu; + unsigned int sampling_rate = 0, ignore_nice = 0; + unsigned int latency, j, cpu = policy->cpu; int io_busy = 0; int rc; int governor = cdata->governor; @@ -362,7 +355,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, sampling_rate = cs_tuners->sampling_rate; ignore_nice = cs_tuners->ignore_nice_load; cs_dbs_info->enable = 1; - } else if (governor == GOV_ONDEMAND) { + } else { od_tuners = dbs_data->tuners; od_dbs_info = dbs_data->cdata->get_cpu_dbs_info_s(cpu); od_dbs_info->rate_mult = 1; @@ -372,14 +365,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, od_ops = dbs_data->cdata->gov_ops; io_busy = od_tuners->io_is_busy; od_ops->powersave_bias_init_cpu(cpu); - } else { - lb_tuners = dbs_data->tuners; - lb_dbs_info = dbs_data->cdata->get_cpu_dbs_info_s(cpu); - lb_dbs_info->rate_mult = 1; - sampling_rate = lb_tuners->sampling_rate; - ignore_nice = lb_tuners->ignore_nice; } - mutex_lock(&dbs_data->mutex); for_each_cpu(j, policy->cpus) { diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h index 256c50d4197..6732ea6837e 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h @@ -164,14 +164,6 @@ struct cs_cpu_dbs_info_s { unsigned int enable:1; }; -struct lb_cpu_dbs_info_s { - struct cpu_dbs_common_info cdbs; - u64 prev_cpu_iowait; - struct cpufreq_frequency_table *freq_table; - unsigned int rate_mult; - unsigned int idle_time; -}; - /* Per policy Governers sysfs tunables */ struct od_dbs_tuners { unsigned int ignore_nice_load; @@ -191,14 +183,6 @@ struct cs_dbs_tuners { unsigned int freq_step; }; -struct lb_dbs_tuners { - unsigned int ignore_nice; - unsigned int sampling_rate; - unsigned int sampling_down_factor; - unsigned int up_threshold; - unsigned int adj_up_threshold; -}; - /* Common Governer data across policies */ struct dbs_data; struct common_dbs_data { |