lkml.org 
[lkml]   [2010]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] Convert alpha to use clocksource
On Mon, 22 Mar 2010, Johannes Weiner wrote:
> > Though, even after a glance over the clocksource code, I've not
> > gotten yet to how one could estimate the "shift" value...
> > Any hints?
>
> I had the same problem with xtensa and added a comment about what I
> did in there, maybe it helps:
>
> arch/xtensa/kernel/time.c
>
> I took the upper bound of the multiplicator (nsecs per counter unit)
> and subtracted its logarithm from my available 32 bits. The result
> is the highest possible shift value that works for the clocksource.

clocks_calc_mult_shift() is what you are looking for.

Thanks,

tglx


\
 
 \ /
  Last update: 2010-03-22 15:25    [W:0.021 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site