diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-02-28 12:39:56 +0000 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-02-28 12:40:01 +0000 |
| commit | 4d8cfec692e988b844dcaeaeb76b5780b7ef9d28 (patch) | |
| tree | 67d43adab2afd18a74d08f347e3676ae1a64193f /arch/s390/kernel/time.c | |
| parent | a3a3c4664184f86ef964323d106c62158e2b3f25 (diff) | |
| parent | 1d8c38c3d1b48eeb9cfaa42a8be13a1423569eb2 (diff) | |
Merge branch 'cleanup-3.4' of git://github.com/hzhuang1/linux into next/cleanup
* 'cleanup-3.4' of git://github.com/hzhuang1/linux: (2 commits)
rtc: sa1100: remove verification code of alarm
rtc: sa1100: remove periodic code
(update to v3.3-rc5)
Diffstat (limited to 'arch/s390/kernel/time.c')
| -rw-r--r-- | arch/s390/kernel/time.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index fa02f443f5f6..14da278febbf 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -113,11 +113,14 @@ static void fixup_clock_comparator(unsigned long long delta) static int s390_next_ktime(ktime_t expires, struct clock_event_device *evt) { + struct timespec ts; u64 nsecs; - nsecs = ktime_to_ns(ktime_sub(expires, ktime_get_monotonic_offset())); + ts.tv_sec = ts.tv_nsec = 0; + monotonic_to_bootbased(&ts); + nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); do_div(nsecs, 125); - S390_lowcore.clock_comparator = TOD_UNIX_EPOCH + (nsecs << 9); + S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); set_clock_comparator(S390_lowcore.clock_comparator); return 0; } |
