aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2007-02-16 04:27:26 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 11:13:56 -0500
commitf4304ab21513b834c8fe3403927c60c2b81a72d7 (patch)
tree212c8fa327d9cf3f29cccf172f0707a3eb6524f8 /kernel/hrtimer.c
parent771ee3b04eaac6184312825eb600b4c598f027a5 (diff)
[PATCH] HZ free ntp
Distangle the NTP update from HZ. This is necessary for dynamic tick enabled kernels. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index f44e499e8fca..80666f6cd4f9 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -128,15 +128,20 @@ EXPORT_SYMBOL_GPL(ktime_get_ts);
128static void hrtimer_get_softirq_time(struct hrtimer_base *base) 128static void hrtimer_get_softirq_time(struct hrtimer_base *base)
129{ 129{
130 ktime_t xtim, tomono; 130 ktime_t xtim, tomono;
131 struct timespec xts;
131 unsigned long seq; 132 unsigned long seq;
132 133
133 do { 134 do {
134 seq = read_seqbegin(&xtime_lock); 135 seq = read_seqbegin(&xtime_lock);
135 xtim = timespec_to_ktime(xtime); 136#ifdef CONFIG_NO_HZ
136 tomono = timespec_to_ktime(wall_to_monotonic); 137 getnstimeofday(&xts);
137 138#else
139 xts = xtime;
140#endif
138 } while (read_seqretry(&xtime_lock, seq)); 141 } while (read_seqretry(&xtime_lock, seq));
139 142
143 xtim = timespec_to_ktime(xts);
144 tomono = timespec_to_ktime(wall_to_monotonic);
140 base[CLOCK_REALTIME].softirq_time = xtim; 145 base[CLOCK_REALTIME].softirq_time = xtim;
141 base[CLOCK_MONOTONIC].softirq_time = ktime_add(xtim, tomono); 146 base[CLOCK_MONOTONIC].softirq_time = ktime_add(xtim, tomono);
142} 147}