diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 00:29:37 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 00:29:37 -0400 |
| commit | 5f8371cec93b94a24a55ba1de642ce6eade6d62c (patch) | |
| tree | 61b6d2acb10226b3c0f2d31bda3a49288e540eba /kernel/time | |
| parent | 8e9bb19ef97d6594e735bee64b6d72103e350854 (diff) | |
| parent | d8586ba6e1415150e1bab89f0a05447bb6f2d6d5 (diff) | |
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) | |||
| 402 | unsigned long flags; | 402 | unsigned long flags; |
| 403 | int ret; | 403 | int ret; |
| 404 | 404 | ||
| 405 | /* save mult_orig on registration */ | ||
| 406 | c->mult_orig = c->mult; | ||
| 407 | |||
| 408 | spin_lock_irqsave(&clocksource_lock, flags); | 405 | spin_lock_irqsave(&clocksource_lock, flags); |
| 409 | ret = clocksource_enqueue(c); | 406 | ret = clocksource_enqueue(c); |
| 410 | if (!ret) | 407 | 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) | |||
| 77 | clock->cycle_last = cycle_now; | 77 | clock->cycle_last = cycle_now; |
| 78 | 78 | ||
| 79 | nsec = cyc2ns(clock, cycle_delta); | 79 | nsec = cyc2ns(clock, cycle_delta); |
| 80 | |||
| 81 | /* If arch requires, add in gettimeoffset() */ | ||
| 82 | nsec += arch_gettimeoffset(); | ||
| 83 | |||
| 80 | timespec_add_ns(&xtime, nsec); | 84 | timespec_add_ns(&xtime, nsec); |
| 81 | 85 | ||
| 82 | nsec = ((s64)cycle_delta * clock->mult_orig) >> clock->shift; | 86 | nsec = ((s64)cycle_delta * clock->mult_orig) >> clock->shift; |
| @@ -111,6 +115,9 @@ void getnstimeofday(struct timespec *ts) | |||
| 111 | /* convert to nanoseconds: */ | 115 | /* convert to nanoseconds: */ |
| 112 | nsecs = cyc2ns(clock, cycle_delta); | 116 | nsecs = cyc2ns(clock, cycle_delta); |
| 113 | 117 | ||
| 118 | /* If arch requires, add in gettimeoffset() */ | ||
| 119 | nsecs += arch_gettimeoffset(); | ||
| 120 | |||
| 114 | } while (read_seqretry(&xtime_lock, seq)); | 121 | } while (read_seqretry(&xtime_lock, seq)); |
| 115 | 122 | ||
| 116 | timespec_add_ns(ts, nsecs); | 123 | timespec_add_ns(ts, nsecs); |
