[RFC/RFT 1/3] iop: clocksource support
linus.ml.walleij at gmail.com
Tue Sep 1 17:48:57 EDT 2009
2009/9/1 Mikael Pettersson <mikpe at it.uu.se>:
> > Calculate this using the algorithm in arch/mips/kernel/time.c
> > they have a dynamically changing clocksource...
> The algorithm always computes the largest shift/mult pair that
> solves the equation:
> // 0 <= shift && shift <= 32
> u64 mult = ((u64)1E9 << shift) / hz;
> (mult >> 32) == 0
> Can I assume that this is to minimize precision loss?
So I think, I asked the question of how to calculate div but noone
answered IIRC, then I found the MIPS code and it contained this
clue. Ralf Baechle from the MIPS camp wrote this code so lets
More information about the linux-arm-kernel