/* * governor.c - governor support * * (C) 2006-2007 Venkatesh Pallipadi <[email protected]> * Shaohua Li <[email protected]> * Adam Belay <[email protected]> * * This code is licenced under the GPL. */ #include <linux/cpu.h> #include <linux/cpuidle.h> #include <linux/mutex.h> #include <linux/module.h> #include <linux/pm_qos.h> #include "cpuidle.h" char param_governor[CPUIDLE_NAME_LEN]; LIST_HEAD(…); struct cpuidle_governor *cpuidle_curr_governor; struct cpuidle_governor *cpuidle_prev_governor; /** * cpuidle_find_governor - finds a governor of the specified name * @str: the name * * Must be called with cpuidle_lock acquired. */ struct cpuidle_governor *cpuidle_find_governor(const char *str) { … } /** * cpuidle_switch_governor - changes the governor * @gov: the new target governor * Must be called with cpuidle_lock acquired. */ int cpuidle_switch_governor(struct cpuidle_governor *gov) { … } /** * cpuidle_register_governor - registers a governor * @gov: the governor */ int cpuidle_register_governor(struct cpuidle_governor *gov) { … } /** * cpuidle_governor_latency_req - Compute a latency constraint for CPU * @cpu: Target CPU */ s64 cpuidle_governor_latency_req(unsigned int cpu) { … }