aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2007-02-16 01:27:26 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 08:13:56 -0800
commitf4304ab21513b834c8fe3403927c60c2b81a72d7 (patch)
tree212c8fa327d9cf3f29cccf172f0707a3eb6524f8 /kernel/hrtimer.c
parent771ee3b04eaac6184312825eb600b4c598f027a5 (diff)
downloadkernel_samsung_espresso10-f4304ab21513b834c8fe3403927c60c2b81a72d7.tar.gz
kernel_samsung_espresso10-f4304ab21513b834c8fe3403927c60c2b81a72d7.tar.bz2
kernel_samsung_espresso10-f4304ab21513b834c8fe3403927c60c2b81a72d7.zip
[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 f44e499e8fc..80666f6cd4f 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -128,15 +128,20 @@ EXPORT_SYMBOL_GPL(ktime_get_ts);
static void hrtimer_get_softirq_time(struct hrtimer_base *base)
{
ktime_t xtim, tomono;
+ struct timespec xts;
unsigned long seq;
do {
seq = read_seqbegin(&xtime_lock);
- xtim = timespec_to_ktime(xtime);
- tomono = timespec_to_ktime(wall_to_monotonic);
-
+#ifdef CONFIG_NO_HZ
+ getnstimeofday(&xts);
+#else
+ xts = xtime;
+#endif
} while (read_seqretry(&xtime_lock, seq));
+ xtim = timespec_to_ktime(xts);
+ tomono = timespec_to_ktime(wall_to_monotonic);
base[CLOCK_REALTIME].softirq_time = xtim;
base[CLOCK_MONOTONIC].softirq_time = ktime_add(xtim, tomono);
}