diff options
| author | Christoph Lameter <clameter@sgi.com> | 2004-09-16 22:15:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-16 22:15:53 -0700 |
| commit | cad1b17a6dd4b6acf01c11be5524798e43140132 (patch) | |
| tree | 6c06bfadc528c3d5f3854fa58ad3a6df12e97a8b /kernel | |
| parent | 3bcb84ab38e1676fb86dc7e181326474db87307d (diff) | |
[PATCH] time interpolators logic fix
Report the resolution of the time source correctly for time interpolators
with a frequency over 1 Ghz.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/timer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 7f71bb07c750..36e40d8b182d 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1492,7 +1492,10 @@ void time_interpolator_reset(void) unsigned long time_interpolator_resolution(void) { - return NSEC_PER_SEC / time_interpolator->frequency; + if (time_interpolator->frequency < NSEC_PER_SEC) + return NSEC_PER_SEC / time_interpolator->frequency; + else + return 1; } #define GET_TI_NSECS(count,i) ((((count) - i->last_counter) * i->nsec_per_cyc) >> i->shift) |
