The patch titled cpufreq: ondemand: refactor frequency increase code has been added to the -mm tree. Its filename is cpufreq-ondemand-refactor-frequency-increase-code.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: cpufreq: ondemand: refactor frequency increase code From: Mike Chan <mike@xxxxxxxxxxx> Make simpler to read and call. Signed-off-by: Mike Chan <mike@xxxxxxxxxxx> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@xxxxxxxxx> Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx> Cc: Thomas Renninger <trenn@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/cpufreq/cpufreq_ondemand.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff -puN drivers/cpufreq/cpufreq_ondemand.c~cpufreq-ondemand-refactor-frequency-increase-code drivers/cpufreq/cpufreq_ondemand.c --- a/drivers/cpufreq/cpufreq_ondemand.c~cpufreq-ondemand-refactor-frequency-increase-code +++ a/drivers/cpufreq/cpufreq_ondemand.c @@ -443,6 +443,17 @@ static struct attribute_group dbs_attr_g /************************** sysfs end ************************/ +static int dbs_freq_increase(struct cpufreq_policy *p, unsigned int target_freq) +{ + if (dbs_tuners_ins.powersave_bias) + target_freq = powersave_bias_target(p, target_freq, + CPUFREQ_RELATION_H); + + __cpufreq_driver_target(p, target_freq, + dbs_tuners_ins.powersave_bias ? + CPUFREQ_RELATION_L : CPUFREQ_RELATION_H); +} + static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) { unsigned int max_load_freq; @@ -520,19 +531,8 @@ static void dbs_check_cpu(struct cpu_dbs /* Check for frequency increase */ if (max_load_freq > dbs_tuners_ins.up_threshold * policy->cur) { - /* if we are already at full speed then break out early */ - if (!dbs_tuners_ins.powersave_bias) { - if (policy->cur == policy->max) - return; - - __cpufreq_driver_target(policy, policy->max, - CPUFREQ_RELATION_H); - } else { - int freq = powersave_bias_target(policy, policy->max, - CPUFREQ_RELATION_H); - __cpufreq_driver_target(policy, freq, - CPUFREQ_RELATION_L); - } + if (policy->cur != policy->max) + dbs_freq_increase(policy, policy->max); return; } _ Patches currently in -mm which might be from mike@xxxxxxxxxxx are linux-next.patch cpufreq-ondemand-dont-synchronize-sample-rate-unless-mulitple-cpus-present.patch cpufreq-ondemand-dont-synchronize-sample-rate-unless-mulitple-cpus-present-checkpatch-fixes.patch cpufreq-ondemand-refactor-frequency-increase-code.patch cpufreq-ondemand-independent-max-speed-for-nice-threads-with-nice_max_freq.patch cpufreq-ondemand-independent-max-speed-for-nice-threads-with-nice_max_freq-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html