aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Poynor2012-12-21 17:32:21 -0600
committerArve Hjønnevåg2013-02-19 19:56:12 -0600
commit8168cb014bf4c26ce24fba10cf6fcf360f196eaf (patch)
tree1e5aa20b2dc6fbd9c0743a11314d53cb01dc180d
parentcbdc46c07ce9dc9a4a3736051bd1c0187efedb59 (diff)
downloadkernel-common-8168cb014bf4c26ce24fba10cf6fcf360f196eaf.tar.gz
kernel-common-8168cb014bf4c26ce24fba10cf6fcf360f196eaf.tar.xz
kernel-common-8168cb014bf4c26ce24fba10cf6fcf360f196eaf.zip
cpufreq: interactive: init default values at compile time
Change-Id: Ia4966e949a6c24c34fdbd4a6e522cd7c37e4108e Signed-off-by: Todd Poynor <toddpoynor@google.com>
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 7ad6c003ac0..6b20d0024cc 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -66,7 +66,7 @@ static unsigned int hispeed_freq;
66 66
67/* Go to hi speed when CPU load at or above this value. */ 67/* Go to hi speed when CPU load at or above this value. */
68#define DEFAULT_GO_HISPEED_LOAD 99 68#define DEFAULT_GO_HISPEED_LOAD 99
69static unsigned long go_hispeed_load; 69static unsigned long go_hispeed_load = DEFAULT_GO_HISPEED_LOAD;
70 70
71/* Target load. Lower values result in higher CPU speeds. */ 71/* Target load. Lower values result in higher CPU speeds. */
72#define DEFAULT_TARGET_LOAD 90 72#define DEFAULT_TARGET_LOAD 90
@@ -79,20 +79,20 @@ static int ntarget_loads = ARRAY_SIZE(default_target_loads);
79 * The minimum amount of time to spend at a frequency before we can ramp down. 79 * The minimum amount of time to spend at a frequency before we can ramp down.
80 */ 80 */
81#define DEFAULT_MIN_SAMPLE_TIME (80 * USEC_PER_MSEC) 81#define DEFAULT_MIN_SAMPLE_TIME (80 * USEC_PER_MSEC)
82static unsigned long min_sample_time; 82static unsigned long min_sample_time = DEFAULT_MIN_SAMPLE_TIME;
83 83
84/* 84/*
85 * The sample rate of the timer used to increase frequency 85 * The sample rate of the timer used to increase frequency
86 */ 86 */
87#define DEFAULT_TIMER_RATE (20 * USEC_PER_MSEC) 87#define DEFAULT_TIMER_RATE (20 * USEC_PER_MSEC)
88static unsigned long timer_rate; 88static unsigned long timer_rate = DEFAULT_TIMER_RATE;
89 89
90/* 90/*
91 * Wait this long before raising speed above hispeed, by default a single 91 * Wait this long before raising speed above hispeed, by default a single
92 * timer interval. 92 * timer interval.
93 */ 93 */
94#define DEFAULT_ABOVE_HISPEED_DELAY DEFAULT_TIMER_RATE 94#define DEFAULT_ABOVE_HISPEED_DELAY DEFAULT_TIMER_RATE
95static unsigned long above_hispeed_delay_val; 95static unsigned long above_hispeed_delay_val = DEFAULT_ABOVE_HISPEED_DELAY;
96 96
97/* Non-zero means indefinite speed boost active */ 97/* Non-zero means indefinite speed boost active */
98static int boost_val; 98static int boost_val;
@@ -991,11 +991,6 @@ static int __init cpufreq_interactive_init(void)
991 struct cpufreq_interactive_cpuinfo *pcpu; 991 struct cpufreq_interactive_cpuinfo *pcpu;
992 struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; 992 struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
993 993
994 go_hispeed_load = DEFAULT_GO_HISPEED_LOAD;
995 min_sample_time = DEFAULT_MIN_SAMPLE_TIME;
996 above_hispeed_delay_val = DEFAULT_ABOVE_HISPEED_DELAY;
997 timer_rate = DEFAULT_TIMER_RATE;
998
999 /* Initalize per-cpu timers */ 994 /* Initalize per-cpu timers */
1000 for_each_possible_cpu(i) { 995 for_each_possible_cpu(i) {
1001 pcpu = &per_cpu(cpuinfo, i); 996 pcpu = &per_cpu(cpuinfo, i);