diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 06:29:37 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 06:29:37 +0200 |
commit | 5f8371cec93b94a24a55ba1de642ce6eade6d62c (patch) | |
tree | 61b6d2acb10226b3c0f2d31bda3a49288e540eba /kernel/time | |
parent | video: stop sh_mobile_lcdcfb only if started (diff) | |
parent | sh: irq: Provide an arch_probe_nr_irqs() that wraps the machvec def. (diff) | |
download | linux-5f8371cec93b94a24a55ba1de642ce6eade6d62c.tar.xz linux-5f8371cec93b94a24a55ba1de642ce6eade6d62c.zip |
Merge branches 'sh/stable-updates' and 'sh/sparseirq'
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/clocksource.c | 3 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index ecfd7b5187e0..80189f6f1c5a 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -402,9 +402,6 @@ int clocksource_register(struct clocksource *c) unsigned long flags; int ret; - /* save mult_orig on registration */ - c->mult_orig = c->mult; - spin_lock_irqsave(&clocksource_lock, flags); ret = clocksource_enqueue(c); if (!ret) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 687dff49f6e7..e97c50f8458b 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -77,6 +77,10 @@ static void clocksource_forward_now(void) clock->cycle_last = cycle_now; nsec = cyc2ns(clock, cycle_delta); + + /* If arch requires, add in gettimeoffset() */ + nsec += arch_gettimeoffset(); + timespec_add_ns(&xtime, nsec); nsec = ((s64)cycle_delta * clock->mult_orig) >> clock->shift; @@ -111,6 +115,9 @@ void getnstimeofday(struct timespec *ts) /* convert to nanoseconds: */ nsecs = cyc2ns(clock, cycle_delta); + /* If arch requires, add in gettimeoffset() */ + nsecs += arch_gettimeoffset(); + } while (read_seqretry(&xtime_lock, seq)); timespec_add_ns(ts, nsecs); |