]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/cpufreq/cpufreq_ondemand.c
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[karo-tx-linux.git] / drivers / cpufreq / cpufreq_ondemand.c
index 3a1f49f5f4c68ae4d360e686773cafc2d49b8745..4a017e8952962c5f8f20a4c924905b7e618da157 100644 (file)
@@ -25,7 +25,7 @@
 #define MAX_SAMPLING_DOWN_FACTOR               (100000)
 #define MICRO_FREQUENCY_UP_THRESHOLD           (95)
 #define MICRO_FREQUENCY_MIN_SAMPLE_RATE                (10000)
-#define MIN_FREQUENCY_UP_THRESHOLD             (11)
+#define MIN_FREQUENCY_UP_THRESHOLD             (1)
 #define MAX_FREQUENCY_UP_THRESHOLD             (100)
 
 static struct od_ops od_ops;
@@ -169,7 +169,7 @@ static void od_update(struct cpufreq_policy *policy)
        }
 }
 
-static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
+static unsigned int od_dbs_update(struct cpufreq_policy *policy)
 {
        struct policy_dbs_info *policy_dbs = policy->governor_data;
        struct dbs_data *dbs_data = policy_dbs->dbs_data;
@@ -191,7 +191,7 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
        od_update(policy);
 
        if (dbs_info->freq_lo) {
-               /* Setup timer for SUB_SAMPLE */
+               /* Setup SUB_SAMPLE */
                dbs_info->sample_type = OD_SUB_SAMPLE;
                return dbs_info->freq_hi_delay_us;
        }
@@ -255,11 +255,11 @@ static ssize_t store_sampling_down_factor(struct gov_attr_set *attr_set,
        list_for_each_entry(policy_dbs, &attr_set->policy_list, list) {
                /*
                 * Doing this without locking might lead to using different
-                * rate_mult values in od_update() and od_dbs_timer().
+                * rate_mult values in od_update() and od_dbs_update().
                 */
-               mutex_lock(&policy_dbs->timer_mutex);
+               mutex_lock(&policy_dbs->update_mutex);
                policy_dbs->rate_mult = 1;
-               mutex_unlock(&policy_dbs->timer_mutex);
+               mutex_unlock(&policy_dbs->update_mutex);
        }
 
        return count;
@@ -374,8 +374,7 @@ static int od_init(struct dbs_data *dbs_data)
                dbs_data->up_threshold = MICRO_FREQUENCY_UP_THRESHOLD;
                /*
                 * In nohz/micro accounting case we set the minimum frequency
-                * not depending on HZ, but fixed (very low). The deferred
-                * timer might skip some samples if idle/sleeping as needed.
+                * not depending on HZ, but fixed (very low).
                */
                dbs_data->min_sampling_rate = MICRO_FREQUENCY_MIN_SAMPLE_RATE;
        } else {
@@ -415,7 +414,7 @@ static struct od_ops od_ops = {
 static struct dbs_governor od_dbs_gov = {
        .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("ondemand"),
        .kobj_type = { .default_attrs = od_attributes },
-       .gov_dbs_timer = od_dbs_timer,
+       .gov_dbs_update = od_dbs_update,
        .alloc = od_alloc,
        .free = od_free,
        .init = od_init,