vserver 1.9.5.x5
[linux-2.6.git] / arch / i386 / kernel / timers / timer_tsc.c
index a1e3f6f..a685994 100644 (file)
@@ -28,7 +28,7 @@
 #ifdef CONFIG_HPET_TIMER
 static unsigned long hpet_usec_quotient;
 static unsigned long hpet_last;
-struct timer_opts timer_tsc;
+static struct timer_opts timer_tsc;
 #endif
 
 static inline void cpufreq_delayed_get(void);
@@ -265,7 +265,8 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
 {
        struct cpufreq_freqs *freq = data;
 
-       write_seqlock_irq(&xtime_lock);
+       if (val != CPUFREQ_RESUMECHANGE)
+               write_seqlock_irq(&xtime_lock);
        if (!ref_freq) {
                ref_freq = freq->old;
                loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy;
@@ -291,7 +292,9 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
                }
 #endif
        }
-       write_sequnlock_irq(&xtime_lock);
+
+       if (val != CPUFREQ_RESUMECHANGE)
+               write_sequnlock_irq(&xtime_lock);
 
        return 0;
 }
@@ -543,11 +546,15 @@ __setup("notsc", tsc_setup);
 /************************************************************/
 
 /* tsc timer_opts struct */
-struct timer_opts timer_tsc = {
-       .name =         "tsc",
-       .init =         init_tsc,
-       .mark_offset =  mark_offset_tsc, 
-       .get_offset =   get_offset_tsc,
-       .monotonic_clock =      monotonic_clock_tsc,
+static struct timer_opts timer_tsc = {
+       .name = "tsc",
+       .mark_offset = mark_offset_tsc, 
+       .get_offset = get_offset_tsc,
+       .monotonic_clock = monotonic_clock_tsc,
        .delay = delay_tsc,
 };
+
+struct init_timer_opts __initdata timer_tsc_init = {
+       .init = init_tsc,
+       .opts = &timer_tsc,
+};