#include <linux/slab.h>
#include "cpufreq_governor.h"
struct cs_policy_dbs_info { … };
static inline struct cs_policy_dbs_info *to_dbs_info(struct policy_dbs_info *policy_dbs)
{ … }
struct cs_dbs_tuners { … };
#define DEF_FREQUENCY_UP_THRESHOLD …
#define DEF_FREQUENCY_DOWN_THRESHOLD …
#define DEF_FREQUENCY_STEP …
#define DEF_SAMPLING_DOWN_FACTOR …
#define MAX_SAMPLING_DOWN_FACTOR …
static inline unsigned int get_freq_step(struct cs_dbs_tuners *cs_tuners,
struct cpufreq_policy *policy)
{ … }
static unsigned int cs_dbs_update(struct cpufreq_policy *policy)
{ … }
static ssize_t sampling_down_factor_store(struct gov_attr_set *attr_set,
const char *buf, size_t count)
{ … }
static ssize_t up_threshold_store(struct gov_attr_set *attr_set,
const char *buf, size_t count)
{ … }
static ssize_t down_threshold_store(struct gov_attr_set *attr_set,
const char *buf, size_t count)
{ … }
static ssize_t ignore_nice_load_store(struct gov_attr_set *attr_set,
const char *buf, size_t count)
{ … }
static ssize_t freq_step_store(struct gov_attr_set *attr_set, const char *buf,
size_t count)
{ … }
gov_show_one_common(sampling_rate);
gov_show_one_common(sampling_down_factor);
gov_show_one_common(up_threshold);
gov_show_one_common(ignore_nice_load);
gov_show_one(cs, down_threshold);
gov_show_one(cs, freq_step);
gov_attr_rw(…);
gov_attr_rw(…);
gov_attr_rw(…);
gov_attr_rw(…);
gov_attr_rw(…);
gov_attr_rw(…);
static struct attribute *cs_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static struct policy_dbs_info *cs_alloc(void)
{ … }
static void cs_free(struct policy_dbs_info *policy_dbs)
{ … }
static int cs_init(struct dbs_data *dbs_data)
{ … }
static void cs_exit(struct dbs_data *dbs_data)
{ … }
static void cs_start(struct cpufreq_policy *policy)
{ … }
static struct dbs_governor cs_governor = …;
#define CPU_FREQ_GOV_CONSERVATIVE …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
struct cpufreq_governor *cpufreq_default_governor(void)
{
return &CPU_FREQ_GOV_CONSERVATIVE;
}
#endif
cpufreq_governor_init(CPU_FREQ_GOV_CONSERVATIVE);
cpufreq_governor_exit(CPU_FREQ_GOV_CONSERVATIVE);