time_adjust = 0;                /* stop active adjtime() */ time_status |= STA_UNSYNC; time_maxerror = NTP_PHASE_LIMIT; time_esterror = NTP_PHASE_LIMIT; 
ntp_clear(); 
int do_settimeofday(struct timespec *tv){	time_t wtm_sec, new_sec = tv->tv_sec;	long wtm_nsec, new_nsec = tv->tv_nsec;	unsigned long flags;	unsigned long delta_xsec;	long int tb_delta;	unsigned long new_xsec;	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)		return -EINVAL;	write_seqlock_irqsave(&xtime_lock, flags);	/* Updating the RTC is not the job of this code. If the time is	 * stepped under NTP, the RTC will be update after STA_UNSYNC	 * is cleared. Tool like clock/hwclock either copy the RTC	 * to the system time, in which case there is no point in writing	 * to the RTC again, or write to the RTC but then they don't call	 * settimeofday to perform this operation.	 */#ifdef CONFIG_PPC_ISERIES	if ( first_settimeofday ) {		iSeries_tb_recal();		first_settimeofday = 0;	}#endif	tb_delta = tb_ticks_since(tb_last_stamp);	tb_delta += (jiffies - wall_jiffies) * tb_ticks_per_jiffy;	new_nsec -= tb_delta / tb_ticks_per_usec / 1000;	wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - new_sec);	wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - new_nsec); 	set_normalized_timespec(&xtime, new_sec, new_nsec);	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);	/* In case of a large backwards jump in time with NTP, we want the 	 * clock to be updated as soon as the PLL is again in lock.	 */	last_rtc_update = new_sec - 658;	time_adjust = 0;                /* stop active adjtime() */	time_status |= STA_UNSYNC;	time_maxerror = NTP_PHASE_LIMIT;	time_esterror = NTP_PHASE_LIMIT;	delta_xsec = mulhdu( (tb_last_stamp-do_gtod.varp->tb_orig_stamp),			     do_gtod.varp->tb_to_xs );	new_xsec = (new_nsec * XSEC_PER_SEC) / NSEC_PER_SEC;	new_xsec += new_sec * XSEC_PER_SEC;	if ( new_xsec > delta_xsec ) {		do_gtod.varp->stamp_xsec = new_xsec - delta_xsec;		systemcfg->stamp_xsec = new_xsec - delta_xsec;	}	else {		/* This is only for the case where the user is setting the time		 * way back to a time such that the boot time would have been		 * before 1970 ... eg. we booted ten days ago, and we are setting		 * the time to Jan 5, 1970 */		do_gtod.varp->stamp_xsec = new_xsec;		do_gtod.varp->tb_orig_stamp = tb_last_stamp;		systemcfg->stamp_xsec = new_xsec;		systemcfg->tb_orig_stamp = tb_last_stamp;	}	systemcfg->tz_minuteswest = sys_tz.tz_minuteswest;	systemcfg->tz_dsttime = sys_tz.tz_dsttime;	write_sequnlock_irqrestore(&xtime_lock, flags);	clock_was_set();	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b149ee2233edf08fb59b11e879a2c5941929bcb8/time.c/clean/arch/ppc64/kernel/time.c