sysctl: add proc_do_large_bitmap
[safe/jmp/linux-2.6] / kernel / time / clocksource.c
index 1370083..1f5dde6 100644 (file)
@@ -453,6 +453,18 @@ static inline int clocksource_watchdog_kthread(void *data) { return 0; }
 #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */
 
 /**
+ * clocksource_suspend - suspend the clocksource(s)
+ */
+void clocksource_suspend(void)
+{
+       struct clocksource *cs;
+
+       list_for_each_entry_reverse(cs, &clocksource_list, list)
+               if (cs->suspend)
+                       cs->suspend(cs);
+}
+
+/**
  * clocksource_resume - resume the clocksource(s)
  */
 void clocksource_resume(void)
@@ -461,7 +473,7 @@ void clocksource_resume(void)
 
        list_for_each_entry(cs, &clocksource_list, list)
                if (cs->resume)
-                       cs->resume();
+                       cs->resume(cs);
 
        clocksource_resume_watchdog();
 }
@@ -580,6 +592,10 @@ static inline void clocksource_select(void) { }
  */
 static int __init clocksource_done_booting(void)
 {
+       mutex_lock(&clocksource_mutex);
+       curr_clocksource = clocksource_default_clock();
+       mutex_unlock(&clocksource_mutex);
+
        finished_booting = 1;
 
        /*