Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269196
b: refs/heads/master
c: 4f37a68
h: refs/heads/master
v: v3
  • Loading branch information
Martin Schwidefsky authored and Thomas Gleixner committed Sep 8, 2011
1 parent 666bbd6 commit 61a5af6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 65516f8a7c2028381f0dae4c16ddb621c96158cc
refs/heads/master: 4f37a68cdaf6dea833cfdded2a3e0c47c0f006da
13 changes: 9 additions & 4 deletions trunk/arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ static void fixup_clock_comparator(unsigned long long delta)
set_clock_comparator(S390_lowcore.clock_comparator);
}

static int s390_next_event(unsigned long delta,
static int s390_next_ktime(ktime_t expires,
struct clock_event_device *evt)
{
S390_lowcore.clock_comparator = get_clock() + delta;
s64 nsecs;

nsecs = ktime_to_ns(ktime_sub(expires, ktime_get_monotonic_offset()));
do_div(nsecs, 125);
S390_lowcore.clock_comparator = TOD_UNIX_EPOCH + (nsecs << 9);
set_clock_comparator(S390_lowcore.clock_comparator);
return 0;
}
Expand All @@ -137,14 +141,15 @@ void init_cpu_timer(void)
cpu = smp_processor_id();
cd = &per_cpu(comparators, cpu);
cd->name = "comparator";
cd->features = CLOCK_EVT_FEAT_ONESHOT;
cd->features = CLOCK_EVT_FEAT_ONESHOT |
CLOCK_EVT_FEAT_KTIME;
cd->mult = 16777;
cd->shift = 12;
cd->min_delta_ns = 1;
cd->max_delta_ns = LONG_MAX;
cd->rating = 400;
cd->cpumask = cpumask_of(cpu);
cd->set_next_event = s390_next_event;
cd->set_next_ktime = s390_next_ktime;
cd->set_mode = s390_set_mode;

clockevents_register_device(cd);
Expand Down

0 comments on commit 61a5af6

Please sign in to comment.