aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2007-05-01 02:53:01 -0400
committerWim Van Sebroeck <wim@iguana.be>2007-05-01 02:53:01 -0400
commit48a7afe314bfc4d7f50e1608632f503dbba7e013 (patch)
tree4a80e6b96321a71affd1bacea817de93be08894b /kernel/hrtimer.c
parentfb8f7ba077b5c665432082ab205bcd2cb01f6a3c (diff)
parentdc87c3985e9b442c60994308a96f887579addc39 (diff)
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 6a7938a0d513..1b3033105b40 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -59,6 +59,7 @@ ktime_t ktime_get(void)
59 59
60 return timespec_to_ktime(now); 60 return timespec_to_ktime(now);
61} 61}
62EXPORT_SYMBOL_GPL(ktime_get);
62 63
63/** 64/**
64 * ktime_get_real - get the real (wall-) time in ktime_t format 65 * 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)
278 279
279 return ktime_add(kt, tmp); 280 return ktime_add(kt, tmp);
280} 281}
282
283EXPORT_SYMBOL_GPL(ktime_add_ns);
281# endif /* !CONFIG_KTIME_SCALAR */ 284# endif /* !CONFIG_KTIME_SCALAR */
282 285
283/* 286/*
@@ -459,6 +462,18 @@ void clock_was_set(void)
459} 462}
460 463
461/* 464/*
465 * During resume we might have to reprogram the high resolution timer
466 * interrupt (on the local CPU):
467 */
468void hres_timers_resume(void)
469{
470 WARN_ON_ONCE(num_online_cpus() > 1);
471
472 /* Retrigger the CPU local events: */
473 retrigger_next_event(NULL);
474}
475
476/*
462 * Check, whether the timer is on the callback pending list 477 * Check, whether the timer is on the callback pending list
463 */ 478 */
464static inline int hrtimer_cb_pending(const struct hrtimer *timer) 479static inline int hrtimer_cb_pending(const struct hrtimer *timer)
@@ -814,7 +829,12 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)
814 829
815 timer_stats_hrtimer_set_start_info(timer); 830 timer_stats_hrtimer_set_start_info(timer);
816 831
817 enqueue_hrtimer(timer, new_base, base == new_base); 832 /*
833 * Only allow reprogramming if the new base is on this CPU.
834 * (it might still be on another CPU if the timer was pending)
835 */
836 enqueue_hrtimer(timer, new_base,
837 new_base->cpu_base == &__get_cpu_var(hrtimer_bases));
818 838
819 unlock_hrtimer_base(timer, &flags); 839 unlock_hrtimer_base(timer, &flags);
820 840