mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <[email protected]>
This commit is contained in:
parent
65f27f3844
commit
c4028958b6
282 changed files with 1771 additions and 1450 deletions
|
|
@ -59,7 +59,7 @@ static unsigned int def_sampling_rate;
|
|||
#define MAX_SAMPLING_DOWN_FACTOR (10)
|
||||
#define TRANSITION_LATENCY_LIMIT (10 * 1000)
|
||||
|
||||
static void do_dbs_timer(void *data);
|
||||
static void do_dbs_timer(struct work_struct *work);
|
||||
|
||||
struct cpu_dbs_info_s {
|
||||
struct cpufreq_policy *cur_policy;
|
||||
|
|
@ -82,7 +82,7 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */
|
|||
* is recursive for the same process. -Venki
|
||||
*/
|
||||
static DEFINE_MUTEX (dbs_mutex);
|
||||
static DECLARE_WORK (dbs_work, do_dbs_timer, NULL);
|
||||
static DECLARE_DELAYED_WORK(dbs_work, do_dbs_timer);
|
||||
|
||||
struct dbs_tuners {
|
||||
unsigned int sampling_rate;
|
||||
|
|
@ -420,7 +420,7 @@ static void dbs_check_cpu(int cpu)
|
|||
}
|
||||
}
|
||||
|
||||
static void do_dbs_timer(void *data)
|
||||
static void do_dbs_timer(struct work_struct *work)
|
||||
{
|
||||
int i;
|
||||
lock_cpu_hotplug();
|
||||
|
|
@ -435,7 +435,6 @@ static void do_dbs_timer(void *data)
|
|||
|
||||
static inline void dbs_timer_init(void)
|
||||
{
|
||||
INIT_WORK(&dbs_work, do_dbs_timer, NULL);
|
||||
schedule_delayed_work(&dbs_work,
|
||||
usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -47,13 +47,17 @@ static unsigned int def_sampling_rate;
|
|||
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
|
||||
#define TRANSITION_LATENCY_LIMIT (10 * 1000)
|
||||
|
||||
static void do_dbs_timer(void *data);
|
||||
static void do_dbs_timer(struct work_struct *work);
|
||||
|
||||
/* Sampling types */
|
||||
enum dbs_sample {DBS_NORMAL_SAMPLE, DBS_SUB_SAMPLE};
|
||||
|
||||
struct cpu_dbs_info_s {
|
||||
cputime64_t prev_cpu_idle;
|
||||
cputime64_t prev_cpu_wall;
|
||||
struct cpufreq_policy *cur_policy;
|
||||
struct work_struct work;
|
||||
struct delayed_work work;
|
||||
enum dbs_sample sample_type;
|
||||
unsigned int enable;
|
||||
struct cpufreq_frequency_table *freq_table;
|
||||
unsigned int freq_lo;
|
||||
|
|
@ -407,30 +411,31 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
|
|||
}
|
||||
}
|
||||
|
||||
/* Sampling types */
|
||||
enum {DBS_NORMAL_SAMPLE, DBS_SUB_SAMPLE};
|
||||
|
||||
static void do_dbs_timer(void *data)
|
||||
static void do_dbs_timer(struct work_struct *work)
|
||||
{
|
||||
unsigned int cpu = smp_processor_id();
|
||||
struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu);
|
||||
enum dbs_sample sample_type = dbs_info->sample_type;
|
||||
/* We want all CPUs to do sampling nearly on same jiffy */
|
||||
int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
|
||||
|
||||
/* Permit rescheduling of this work item */
|
||||
work_release(work);
|
||||
|
||||
delay -= jiffies % delay;
|
||||
|
||||
if (!dbs_info->enable)
|
||||
return;
|
||||
/* Common NORMAL_SAMPLE setup */
|
||||
INIT_WORK(&dbs_info->work, do_dbs_timer, (void *)DBS_NORMAL_SAMPLE);
|
||||
dbs_info->sample_type = DBS_NORMAL_SAMPLE;
|
||||
if (!dbs_tuners_ins.powersave_bias ||
|
||||
(unsigned long) data == DBS_NORMAL_SAMPLE) {
|
||||
sample_type == DBS_NORMAL_SAMPLE) {
|
||||
lock_cpu_hotplug();
|
||||
dbs_check_cpu(dbs_info);
|
||||
unlock_cpu_hotplug();
|
||||
if (dbs_info->freq_lo) {
|
||||
/* Setup timer for SUB_SAMPLE */
|
||||
INIT_WORK(&dbs_info->work, do_dbs_timer,
|
||||
(void *)DBS_SUB_SAMPLE);
|
||||
dbs_info->sample_type = DBS_SUB_SAMPLE;
|
||||
delay = dbs_info->freq_hi_jiffies;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -449,7 +454,8 @@ static inline void dbs_timer_init(unsigned int cpu)
|
|||
delay -= jiffies % delay;
|
||||
|
||||
ondemand_powersave_bias_init();
|
||||
INIT_WORK(&dbs_info->work, do_dbs_timer, NULL);
|
||||
INIT_DELAYED_WORK_NAR(&dbs_info->work, do_dbs_timer);
|
||||
dbs_info->sample_type = DBS_NORMAL_SAMPLE;
|
||||
queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue