Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287756
b: refs/heads/master
c: cf1eb40
h: refs/heads/master
v: v3
  • Loading branch information
Martin Schwidefsky committed Feb 17, 2012
1 parent 0cbaa39 commit 3b747dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 656d9125376006cf696b0836f1c6723a892629ca
refs/heads/master: cf1eb40f8f5ea12c9e569e7282161fc7f194fd62
7 changes: 5 additions & 2 deletions trunk/arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b747dd

Please sign in to comment.