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;	int tb_delta;	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. Note also that	 * we don't touch the decrementer since:	 * a) it would lose timer interrupt synchronization on SMP	 * (if it is working one day)	 * b) it could make one jiffy spuriously shorter or longer	 * which would introduce another source of uncertainty potentially	 * harmful to relatively short timers.	 */	/* This works perfectly on SMP only if the tb are in sync but	 * guarantees an error < 1 jiffy even if they are off by eons,	 * still reasonable when gettimeofday resolution is 1 jiffy.	 */	tb_delta = tb_ticks_since(last_jiffy_stamp(smp_processor_id()));	tb_delta += (jiffies - wall_jiffies) * tb_ticks_per_jiffy;	new_nsec -= 1000 * mulhwu(tb_to_us, tb_delta);	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;	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/buggy/arch/ppc/kernel/time.c