aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2012-10-01 19:17:04 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2012-10-01 19:17:04 -0400
commit135d68afd05af5d7d7bf08f0c3e6429b17f0df98 (patch)
tree4b28944b5d77094b52bff8e2e26cb5f9b4f810af
parent2f15a80553f18250b074efbc7b61b2320eb64e90 (diff)
Revert performance CPU frequency scaler.HEADodroidx
I'm not sure why the ODROID-X people changes this. My CPUs are all running fine without calls to cpu_up.
-rw-r--r--drivers/cpufreq/cpufreq_performance.c57
1 files changed, 13 insertions, 44 deletions
diff --git a/drivers/cpufreq/cpufreq_performance.c b/drivers/cpufreq/cpufreq_performance.c
index fa39f5aec7f..dd79d1fb43c 100644
--- a/drivers/cpufreq/cpufreq_performance.c
+++ b/drivers/cpufreq/cpufreq_performance.c
@@ -15,55 +15,24 @@
15#include <linux/cpufreq.h> 15#include <linux/cpufreq.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <linux/cpu.h>
19#include <linux/cpumask.h>
20 18
21static void cpu_up_work() 19static int cpufreq_governor_performance(struct cpufreq_policy *policy,
20 unsigned int event)
22{ 21{
23 int cpu; 22 switch (event) {
24 23 case CPUFREQ_GOV_START:
25 for_each_cpu_not(cpu, cpu_online_mask) { 24 case CPUFREQ_GOV_LIMITS:
26 if (cpu == 0) 25 pr_debug("setting to %u kHz because of event %u\n",
27 continue; 26 policy->max, event);
28 cpu_up(cpu); 27 __cpufreq_driver_target(policy, policy->max,
29 } 28 CPUFREQ_RELATION_H);
30} 29 break;
31 30 default:
32static void cpu_down_work() 31 break;
33{
34 int cpu;
35
36 for_each_online_cpu(cpu) {
37 if (cpu == 0)
38 continue;
39 cpu_down(cpu);
40 } 32 }
33 return 0;
41} 34}
42 35
43static DECLARE_WORK(performance_up_work, cpu_up_work);
44static DECLARE_WORK(performance_down_work, cpu_down_work);
45
46 static int cpufreq_governor_performance(struct cpufreq_policy *policy,
47 unsigned int event)
48 {
49 switch (event) {
50 case CPUFREQ_GOV_START:
51 schedule_work_on(0, &performance_up_work);
52 case CPUFREQ_GOV_LIMITS:
53 pr_debug("setting to %u kHz because of event %u\n",
54 policy->max, event);
55 __cpufreq_driver_target(policy, policy->max,
56 CPUFREQ_RELATION_H);
57 break;
58 case CPUFREQ_GOV_STOP:
59 schedule_work_on(0, &performance_down_work);
60 break;
61 default:
62 break;
63 }
64
65};
66
67#ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE_MODULE 36#ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE_MODULE
68static 37static
69#endif 38#endif