Commit cad1b17a authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

[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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3bcb84ab
...@@ -1492,7 +1492,10 @@ void time_interpolator_reset(void) ...@@ -1492,7 +1492,10 @@ void time_interpolator_reset(void)
unsigned long time_interpolator_resolution(void) unsigned long time_interpolator_resolution(void)
{ {
if (time_interpolator->frequency < NSEC_PER_SEC)
return NSEC_PER_SEC / time_interpolator->frequency; 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) #define GET_TI_NSECS(count,i) ((((count) - i->last_counter) * i->nsec_per_cyc) >> i->shift)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment