if (j == cpu) continue;  
static void dbs_check_cpu(int cpu){	unsigned int idle_ticks, up_idle_ticks, down_idle_ticks;	unsigned int total_idle_ticks;	unsigned int freq_step;	unsigned int freq_down_sampling_rate;	static int down_skip[NR_CPUS];	static int requested_freq[NR_CPUS];	static unsigned short init_flag = 0;	struct cpu_dbs_info_s *this_dbs_info;	struct cpu_dbs_info_s *dbs_info;	struct cpufreq_policy *policy;	unsigned int j;	this_dbs_info = &per_cpu(cpu_dbs_info, cpu);	if (!this_dbs_info->enable)		return;	policy = this_dbs_info->cur_policy;	if ( init_flag == 0 ) {		for ( /* NULL */; init_flag < NR_CPUS; init_flag++ ) {			dbs_info = &per_cpu(cpu_dbs_info, init_flag);			requested_freq[cpu] = dbs_info->cur_policy->cur;		}		init_flag = 1;	}		/* 	 * The default safe range is 20% to 80% 	 * Every sampling_rate, we check	 * 	- If current idle time is less than 20%, then we try to 	 * 	  increase frequency	 * Every sampling_rate*sampling_down_factor, we check	 * 	- If current idle time is more than 80%, then we try to	 * 	  decrease frequency	 *	 * Any frequency increase takes it to the maximum frequency. 	 * Frequency reduction happens at minimum steps of 	 * 5% (default) of max_frequency 	 */	/* Check for frequency increase */	total_idle_ticks = get_cpu_idle_time(cpu);	idle_ticks = total_idle_ticks -		this_dbs_info->prev_cpu_idle_up;	this_dbs_info->prev_cpu_idle_up = total_idle_ticks;		for_each_cpu_mask(j, policy->cpus) {		unsigned int tmp_idle_ticks;		struct cpu_dbs_info_s *j_dbs_info;		if (j == cpu)			continue;		j_dbs_info = &per_cpu(cpu_dbs_info, j);		/* Check for frequency increase */		total_idle_ticks = get_cpu_idle_time(j);		tmp_idle_ticks = total_idle_ticks -			j_dbs_info->prev_cpu_idle_up;		j_dbs_info->prev_cpu_idle_up = total_idle_ticks;		if (tmp_idle_ticks < idle_ticks)			idle_ticks = tmp_idle_ticks;	}	/* Scale idle ticks by 100 and compare with up and down ticks */	idle_ticks *= 100;	up_idle_ticks = (100 - dbs_tuners_ins.up_threshold) *		usecs_to_jiffies(dbs_tuners_ins.sampling_rate);	if (idle_ticks < up_idle_ticks) {		down_skip[cpu] = 0;		for_each_cpu_mask(j, policy->cpus) {			struct cpu_dbs_info_s *j_dbs_info;			j_dbs_info = &per_cpu(cpu_dbs_info, j);			j_dbs_info->prev_cpu_idle_down = 					j_dbs_info->prev_cpu_idle_up;		}		/* if we are already at full speed then break out early */		if (requested_freq[cpu] == policy->max)			return;				freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100;		/* max freq cannot be less than 100. But who knows.... */		if (unlikely(freq_step == 0))			freq_step = 5;				requested_freq[cpu] += freq_step;		if (requested_freq[cpu] > policy->max)			requested_freq[cpu] = policy->max;		__cpufreq_driver_target(policy, requested_freq[cpu], 			CPUFREQ_RELATION_H);		return;	}	/* Check for frequency decrease */	down_skip[cpu]++;	if (down_skip[cpu] < dbs_tuners_ins.sampling_down_factor)		return;	total_idle_ticks = this_dbs_info->prev_cpu_idle_up;	idle_ticks = total_idle_ticks -		this_dbs_info->prev_cpu_idle_down;	this_dbs_info->prev_cpu_idle_down = total_idle_ticks;	for_each_cpu_mask(j, policy->cpus) {		unsigned int tmp_idle_ticks;		struct cpu_dbs_info_s *j_dbs_info;		if (j == cpu)			continue;		j_dbs_info = &per_cpu(cpu_dbs_info, j);		/* Check for frequency increase */		total_idle_ticks = j_dbs_info->prev_cpu_idle_up;		tmp_idle_ticks = total_idle_ticks -			j_dbs_info->prev_cpu_idle_down;		j_dbs_info->prev_cpu_idle_down = total_idle_ticks;		if (tmp_idle_ticks < idle_ticks)			idle_ticks = tmp_idle_ticks;	}	/* Scale idle ticks by 100 and compare with up and down ticks */	idle_ticks *= 100;	down_skip[cpu] = 0;	freq_down_sampling_rate = dbs_tuners_ins.sampling_rate *		dbs_tuners_ins.sampling_down_factor;	down_idle_ticks = (100 - dbs_tuners_ins.down_threshold) *			usecs_to_jiffies(freq_down_sampling_rate);	if (idle_ticks > down_idle_ticks ) {		/* if we are already at the lowest speed then break out early		 * or if we 'cannot' reduce the speed as the user might want		 * freq_step to be zero */		if (requested_freq[cpu] == policy->min				|| dbs_tuners_ins.freq_step == 0)			return;		freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100;		/* max freq cannot be less than 100. But who knows.... */		if (unlikely(freq_step == 0))			freq_step = 5;		requested_freq[cpu] -= freq_step;		if (requested_freq[cpu] < policy->min)			requested_freq[cpu] = policy->min;		__cpufreq_driver_target(policy,			requested_freq[cpu],			CPUFREQ_RELATION_H);		return;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/9c7d269b9b05440dd0fe92d96f4e5d7e73dd7238/cpufreq_conservative.c/clean/drivers/cpufreq/cpufreq_conservative.c