Merge branch 'for_linus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[linux-drm-fsl-dcu.git] / kernel / hrtimer.c
index 067ba2c0532805f8e9e3e753eba456d6a7cbf1b9..23c03f43e1962d6f0dfa4cb8a716080cf671a48c 100644 (file)
@@ -59,6 +59,7 @@ ktime_t ktime_get(void)
 
        return timespec_to_ktime(now);
 }
+EXPORT_SYMBOL_GPL(ktime_get);
 
 /**
  * ktime_get_real - get the real (wall-) time in ktime_t format
@@ -278,6 +279,8 @@ ktime_t ktime_add_ns(const ktime_t kt, u64 nsec)
 
        return ktime_add(kt, tmp);
 }
+
+EXPORT_SYMBOL_GPL(ktime_add_ns);
 # endif /* !CONFIG_KTIME_SCALAR */
 
 /*
@@ -458,6 +461,18 @@ void clock_was_set(void)
        on_each_cpu(retrigger_next_event, NULL, 0, 1);
 }
 
+/*
+ * During resume we might have to reprogram the high resolution timer
+ * interrupt (on the local CPU):
+ */
+void hres_timers_resume(void)
+{
+       WARN_ON_ONCE(num_online_cpus() > 1);
+
+       /* Retrigger the CPU local events: */
+       retrigger_next_event(NULL);
+}
+
 /*
  * Check, whether the timer is on the callback pending list
  */
@@ -654,6 +669,7 @@ hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
 
        return orun;
 }
+EXPORT_SYMBOL_GPL(hrtimer_forward);
 
 /*
  * enqueue_hrtimer - internal function to (re)start a timer
@@ -1395,11 +1411,13 @@ static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self,
        switch (action) {
 
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                init_hrtimers_cpu(cpu);
                break;
 
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                clockevents_notify(CLOCK_EVT_NOTIFY_CPU_DEAD, &cpu);
                migrate_hrtimers(cpu);
                break;