[CPUFREQ] Misc cleanups in ondemand.
Misc cleanups in ondemand. Should have zero functional impact. Also adding Alexey as author. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
committed by
Dave Jones
parent
2f8a835c70
commit
ffac80e925
@@ -12,22 +12,11 @@
|
|||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/smp.h>
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
#include <linux/cpufreq.h>
|
#include <linux/cpufreq.h>
|
||||||
#include <linux/sysctl.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/sysfs.h>
|
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/kmod.h>
|
|
||||||
#include <linux/workqueue.h>
|
|
||||||
#include <linux/jiffies.h>
|
#include <linux/jiffies.h>
|
||||||
#include <linux/kernel_stat.h>
|
#include <linux/kernel_stat.h>
|
||||||
#include <linux/percpu.h>
|
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -80,7 +69,6 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */
|
|||||||
* is recursive for the same process. -Venki
|
* is recursive for the same process. -Venki
|
||||||
*/
|
*/
|
||||||
static DEFINE_MUTEX(dbs_mutex);
|
static DEFINE_MUTEX(dbs_mutex);
|
||||||
static DECLARE_WORK (dbs_work, do_dbs_timer, NULL);
|
|
||||||
|
|
||||||
static struct workqueue_struct *kondemand_wq;
|
static struct workqueue_struct *kondemand_wq;
|
||||||
|
|
||||||
@@ -349,8 +337,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
|
|||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case CPUFREQ_GOV_START:
|
case CPUFREQ_GOV_START:
|
||||||
if ((!cpu_online(cpu)) ||
|
if ((!cpu_online(cpu)) || (!policy->cur))
|
||||||
(!policy->cur))
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (policy->cpuinfo.transition_latency >
|
if (policy->cpuinfo.transition_latency >
|
||||||
@@ -424,13 +411,13 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
|
|||||||
lock_cpu_hotplug();
|
lock_cpu_hotplug();
|
||||||
mutex_lock(&dbs_mutex);
|
mutex_lock(&dbs_mutex);
|
||||||
if (policy->max < this_dbs_info->cur_policy->cur)
|
if (policy->max < this_dbs_info->cur_policy->cur)
|
||||||
__cpufreq_driver_target(
|
__cpufreq_driver_target(this_dbs_info->cur_policy,
|
||||||
this_dbs_info->cur_policy,
|
policy->max,
|
||||||
policy->max, CPUFREQ_RELATION_H);
|
CPUFREQ_RELATION_H);
|
||||||
else if (policy->min > this_dbs_info->cur_policy->cur)
|
else if (policy->min > this_dbs_info->cur_policy->cur)
|
||||||
__cpufreq_driver_target(
|
__cpufreq_driver_target(this_dbs_info->cur_policy,
|
||||||
this_dbs_info->cur_policy,
|
policy->min,
|
||||||
policy->min, CPUFREQ_RELATION_L);
|
CPUFREQ_RELATION_L);
|
||||||
mutex_unlock(&dbs_mutex);
|
mutex_unlock(&dbs_mutex);
|
||||||
unlock_cpu_hotplug();
|
unlock_cpu_hotplug();
|
||||||
break;
|
break;
|
||||||
@@ -456,6 +443,7 @@ static void __exit cpufreq_gov_dbs_exit(void)
|
|||||||
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>");
|
MODULE_AUTHOR("Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>");
|
||||||
|
MODULE_AUTHOR("Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>");
|
||||||
MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
|
MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
|
||||||
"Low Latency Frequency Transition capable processors");
|
"Low Latency Frequency Transition capable processors");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
Reference in New Issue
Block a user