From: linus.ml.walleij@gmail.com (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/RFT 1/3] iop: clocksource support
Date: Tue, 1 Sep 2009 23:48:57 +0200 [thread overview]
Message-ID: <63386a3d0909011448k6f221118k81cc7d993c65ac20@mail.gmail.com> (raw)
In-Reply-To: <19101.33037.189854.375398@pilspetsen.it.uu.se>
2009/9/1 Mikael Pettersson <mikpe@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
ask him.
Linus Walleij
next prev parent reply other threads:[~2009-09-01 21:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-22 12:04 [RFC/RFT 1/3] iop: clocksource support Mikael Pettersson
2009-08-24 23:07 ` Linus Walleij
2009-09-01 20:16 ` Mikael Pettersson
2009-09-01 21:48 ` Linus Walleij [this message]
2009-09-02 15:15 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63386a3d0909011448k6f221118k81cc7d993c65ac20@mail.gmail.com \
--to=linus.ml.walleij@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).