Thread (5 messages) 5 messages, 3 authors, 2009-09-02

[RFC/RFT 1/3] iop: clocksource support

flat view

From: Linus Walleij <hidden>
Date: 2009-09-01 21:48:57

2009/9/1 Mikael Pettersson [off-list ref]:
?> 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
ask him.

Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help