j_dbs_info->prev_cpu_idle_up = kstat_cpu(j).cpustat.idle + kstat_cpu(j).cpustat.iowait + ( !dbs_tuners_ins.ignore_nice ? kstat_cpu(j).cpustat.nice : 0 ); 
j_dbs_info->prev_cpu_idle_up = get_cpu_idle_time(j); 
static int cpufreq_governor_dbs(struct cpufreq_policy *policy,				   unsigned int event){	unsigned int cpu = policy->cpu;	struct cpu_dbs_info_s *this_dbs_info;	unsigned int j;	this_dbs_info = &per_cpu(cpu_dbs_info, cpu);	switch (event) {	case CPUFREQ_GOV_START:		if ((!cpu_online(cpu)) || 		    (!policy->cur))			return -EINVAL;		if (policy->cpuinfo.transition_latency >				(TRANSITION_LATENCY_LIMIT * 1000))			return -EINVAL;		if (this_dbs_info->enable) /* Already enabled */			break;		 		down(&dbs_sem);		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->cur_policy = policy;					j_dbs_info->prev_cpu_idle_up = 				kstat_cpu(j).cpustat.idle +				kstat_cpu(j).cpustat.iowait +				( !dbs_tuners_ins.ignore_nice				  ? kstat_cpu(j).cpustat.nice : 0 );			j_dbs_info->prev_cpu_idle_down				= j_dbs_info->prev_cpu_idle_up;		}		this_dbs_info->enable = 1;		sysfs_create_group(&policy->kobj, &dbs_attr_group);		dbs_enable++;		/*		 * Start the timerschedule work, when this governor		 * is used for first time		 */		if (dbs_enable == 1) {			unsigned int latency;			/* policy latency is in nS. Convert it to uS first */			latency = policy->cpuinfo.transition_latency;			if (latency < 1000)				latency = 1000;			def_sampling_rate = (latency / 1000) *					DEF_SAMPLING_RATE_LATENCY_MULTIPLIER;			dbs_tuners_ins.sampling_rate = def_sampling_rate;			dbs_tuners_ins.ignore_nice = 0;			dbs_tuners_ins.freq_step = 5;			dbs_timer_init();		}				up(&dbs_sem);		break;	case CPUFREQ_GOV_STOP:		down(&dbs_sem);		this_dbs_info->enable = 0;		sysfs_remove_group(&policy->kobj, &dbs_attr_group);		dbs_enable--;		/*		 * Stop the timerschedule work, when this governor		 * is used for first time		 */		if (dbs_enable == 0) 			dbs_timer_exit();				up(&dbs_sem);		break;	case CPUFREQ_GOV_LIMITS:		down(&dbs_sem);		if (policy->max < this_dbs_info->cur_policy->cur)			__cpufreq_driver_target(					this_dbs_info->cur_policy,				       	policy->max, CPUFREQ_RELATION_H);		else if (policy->min > this_dbs_info->cur_policy->cur)			__cpufreq_driver_target(					this_dbs_info->cur_policy,				       	policy->min, CPUFREQ_RELATION_L);		up(&dbs_sem);		break;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/dac1c1a56279b4545a822ec7bc770003c233e546/cpufreq_conservative.c/clean/drivers/cpufreq/cpufreq_conservative.c