projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[powerpc.git]
/
drivers
/
cpufreq
/
cpufreq_ondemand.c
diff --git
a/drivers/cpufreq/cpufreq_ondemand.c
b/drivers/cpufreq/cpufreq_ondemand.c
index
e794527
..
d2af20d
100644
(file)
--- a/
drivers/cpufreq/cpufreq_ondemand.c
+++ b/
drivers/cpufreq/cpufreq_ondemand.c
@@
-47,7
+47,7
@@
static unsigned int def_sampling_rate;
(def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
#define MAX_SAMPLING_RATE (500 * def_sampling_rate)
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
(def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
#define MAX_SAMPLING_RATE (500 * def_sampling_rate)
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
-#define TRANSITION_LATENCY_LIMIT (10 * 1000)
+#define TRANSITION_LATENCY_LIMIT (10 * 1000
* 1000
)
static void do_dbs_timer(struct work_struct *work);
static void do_dbs_timer(struct work_struct *work);
@@
-508,12
+508,6
@@
static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
if ((!cpu_online(cpu)) || (!policy->cur))
return -EINVAL;
if ((!cpu_online(cpu)) || (!policy->cur))
return -EINVAL;
- if (policy->cpuinfo.transition_latency >
- (TRANSITION_LATENCY_LIMIT * 1000)) {
- printk(KERN_WARNING "ondemand governor failed to load "
- "due to too long transition latency\n");
- return -EINVAL;
- }
if (this_dbs_info->enable) /* Already enabled */
break;
if (this_dbs_info->enable) /* Already enabled */
break;
@@
-585,11
+579,13
@@
static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
return 0;
}
return 0;
}
-static struct cpufreq_governor cpufreq_gov_dbs = {
- .name = "ondemand",
- .governor = cpufreq_governor_dbs,
- .owner = THIS_MODULE,
+struct cpufreq_governor cpufreq_gov_ondemand = {
+ .name = "ondemand",
+ .governor = cpufreq_governor_dbs,
+ .max_transition_latency = TRANSITION_LATENCY_LIMIT,
+ .owner = THIS_MODULE,
};
};
+EXPORT_SYMBOL(cpufreq_gov_ondemand);
static int __init cpufreq_gov_dbs_init(void)
{
static int __init cpufreq_gov_dbs_init(void)
{
@@
-598,12
+594,12
@@
static int __init cpufreq_gov_dbs_init(void)
printk(KERN_ERR "Creation of kondemand failed\n");
return -EFAULT;
}
printk(KERN_ERR "Creation of kondemand failed\n");
return -EFAULT;
}
- return cpufreq_register_governor(&cpufreq_gov_
dbs
);
+ return cpufreq_register_governor(&cpufreq_gov_
ondemand
);
}
static void __exit cpufreq_gov_dbs_exit(void)
{
}
static void __exit cpufreq_gov_dbs_exit(void)
{
- cpufreq_unregister_governor(&cpufreq_gov_
dbs
);
+ cpufreq_unregister_governor(&cpufreq_gov_
ondemand
);
destroy_workqueue(kondemand_wq);
}
destroy_workqueue(kondemand_wq);
}
@@
-614,6
+610,9
@@
MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
"Low Latency Frequency Transition capable processors");
MODULE_LICENSE("GPL");
"Low Latency Frequency Transition capable processors");
MODULE_LICENSE("GPL");
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
+fs_initcall(cpufreq_gov_dbs_init);
+#else
module_init(cpufreq_gov_dbs_init);
module_init(cpufreq_gov_dbs_init);
+#endif
module_exit(cpufreq_gov_dbs_exit);
module_exit(cpufreq_gov_dbs_exit);
-