{
struct sd_dbs_tuners *sd_tuners = g_sd_tuners;
- int cpus = 0;
- int i = 0;
if (sd_tuners->cpu_num_limit <= max_core) {
sd_tuners->cpu_num_limit = max_core;
{0,1,1,2,3,3}
};
-static int cpu_evaluate_score(int cpu, struct sd_dbs_tuners *sd_tunners , unsigned int load)
+static __maybe_unused
+int cpu_evaluate_score(int cpu, struct sd_dbs_tuners *sd_tunners,
+ unsigned int load)
{
int score = 0;
static int rate[4] = {1};
return cur_window_size;
}
-static unsigned int sd_unplug_avg_load(int cpu, struct sd_dbs_tuners *sd_tunners , unsigned int load)
+static __maybe_unused
+unsigned int sd_unplug_avg_load(int cpu, struct sd_dbs_tuners *sd_tunners,
+ unsigned int load)
{
int sum_idx_lo = 0;
unsigned int sum_idx_hi = 0;
}
-static unsigned int sd_unplug_avg_load1(int cpu, struct sd_dbs_tuners *sd_tunners , unsigned int load)
+static __maybe_unused
+unsigned int sd_unplug_avg_load1(int cpu, struct sd_dbs_tuners *sd_tunners,
+ unsigned int load)
{
int avg_load = 0;
int cur_window_pos = 0;
}
-static unsigned int sd_unplug_avg_load11(int cpu, struct sd_dbs_tuners *sd_tunners , unsigned int load)
+static __maybe_unused
+unsigned int sd_unplug_avg_load11(int cpu, struct sd_dbs_tuners *sd_tunners,
+ unsigned int load)
{
int avg_load = 0;
int cur_window_pos = 0;
int cur_window_pos_tail = 0;
- int idx = 0;
+
/*
initialize the window size for the first time
cur_window_cnt[cpu] will be cleared when the core is unpluged
size_t count)
{
struct sd_dbs_tuners *sd_tuners = dbs_data->tuners;
- unsigned int input, cpu;
+ unsigned int input;
int ret;
ret = sscanf(buf, "%u", &input);
{
struct sd_dbs_tuners *tuners;
u64 idle_time;
- int cpu, i;
+ int cpu;
tuners = kzalloc(sizeof(struct sd_dbs_tuners), GFP_KERNEL);
INIT_WORK(&plugin_all_work, sprd_plugin_all_cpu);
INIT_WORK(&unplug_all_work, sprd_unplug_all_cpu);
-#if 0
- for_each_possible_cpu(i) {
- puwi = &per_cpu(uwi, i);
- puwi->cpuid = i;
- puwi->dbs_data = dbs_data;
- INIT_DELAYED_WORK(&puwi->unplug_work, sprd_unplug_one_cpu);
- }
-#endif
-
return 0;
}
static void dbs_input_event(struct input_handle *handle, unsigned int type,
unsigned int code, int value)
{
- int i;
- bool ret;
-
if (time_before(jiffies, boot_done))
return;
{ },
};
-void sprd_tb_thread(void)
+int sprd_tb_thread(void *data)
{
while (1) {
down(&tb_sem);
if (num_online_cpus() < 3)
schedule_delayed_work_on(0, &plugin_work, 0);
}
+
+ return 0;
}
struct input_handler dbs_input_handler = {
static struct task_struct *ksprd_tb;
static int __init cpufreq_gov_dbs_init(void)
{
- int i = 0;
boot_done = jiffies + GOVERNOR_BOOT_TIME;
#if !(defined(CONFIG_MACH_SP9838AEA_5MOD) || defined(CONFIG_MACH_SP9838AEA_4CORE) || defined(CONFIG_MACH_SP9838AEA_8CORE_LIGHT_SLEEP) || defined(CONFIG_MACH_SS_SHARKLT8))
register_pm_notifier(&sprdemand_gov_pm_notifier);