Patch from Stephen Hemminger <shemminger@osdl.org>

The CPU frequency change detection code can change the values used to compute
time of day with TSC; but there was no locking around it.



 25-akpm/arch/i386/kernel/timers/timer_tsc.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN arch/i386/kernel/timers/timer_tsc.c~cpufreq-xtime-locking arch/i386/kernel/timers/timer_tsc.c
--- 25/arch/i386/kernel/timers/timer_tsc.c~cpufreq-xtime-locking	Tue Mar 18 16:01:29 2003
+++ 25-akpm/arch/i386/kernel/timers/timer_tsc.c	Tue Mar 18 16:01:29 2003
@@ -213,6 +213,7 @@ time_cpufreq_notifier(struct notifier_bl
 {
 	struct cpufreq_freqs *freq = data;
 
+	write_seqlock(&xtime_lock);
 	if (!ref_freq) {
 		ref_freq = freq->old;
 		loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy;
@@ -232,6 +233,7 @@ time_cpufreq_notifier(struct notifier_bl
 		}
 #endif
 	}
+	write_sequnlock(&xtime_lock);
 
 	return 0;
 }

_