aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyfluxi <linflux@arcor.de>2014-07-20 19:01:43 +0200
committermyfluxi <linflux@arcor.de>2015-04-26 14:30:52 +0200
commit0e5985ce7fb2589863e2164a47fa68f884026e37 (patch)
treeee7cf40bd101bd2c95a7c60878326dfc8747e17a
parent6b5e78420abe19823a04324b67a457a63dbe5187 (diff)
cpufreq: interactive: Consider changed min limit a frequency boost
A changed policy->min can safely be considered a frequency boost. Process this change analogous to the cpufreq_interactive_boost() routine. Change-Id: Ie4ca2be2dad0f5bd541c2b79afee3bad3a349d80
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 31cbbba1412..fc05bf96f25 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -1124,6 +1124,7 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
struct cpufreq_interactive_cpuinfo *pcpu;
struct cpufreq_frequency_table *freq_table;
unsigned long flags;
+ unsigned int anyboost;
switch (event) {
case CPUFREQ_GOV_START:
@@ -1220,10 +1221,12 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
}
spin_lock_irqsave(&pcpu->target_freq_lock, flags);
- if (policy->max < pcpu->target_freq)
+ if (policy->max < pcpu->target_freq) {
pcpu->target_freq = policy->max;
- else if (policy->min > pcpu->target_freq)
+ } else if (policy->min >= pcpu->target_freq) {
pcpu->target_freq = policy->min;
+ anyboost = 1;
+ }
spin_unlock_irqrestore(&pcpu->target_freq_lock, flags);
up_read(&pcpu->enable_sem);
@@ -1240,10 +1243,20 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
del_timer_sync(&pcpu->cpu_slack_timer);
cpufreq_interactive_timer_start(j);
up_write(&pcpu->enable_sem);
+ } else if (anyboost) {
+ u64 now = ktime_to_us(ktime_get());
+
+ cpumask_set_cpu(j, &speedchange_cpumask);
+ pcpu->hispeed_validate_time = now;
+ pcpu->floor_freq = policy->min;
+ pcpu->floor_validate_time = now;
}
pcpu->max_freq = policy->max;
}
+ if (anyboost)
+ wake_up_process(speedchange_task);
+
break;
}
return 0;