From: "Linus Walleij" <linus.ml.walleij@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Shifts for clocksources and clockevents
Date: Tue, 27 May 2008 16:54:12 +0200 [thread overview]
Message-ID: <63386a3d0805270754w7144799dn1de33774d852d6d5@mail.gmail.com> (raw)
In-Reply-To: <63386a3d0804090104h59fd6633x41a981eb8a1919ce@mail.gmail.com>
I asked this on the ARM Linux mailing list a while back, but
it appears noone there really has a clue. (Or they didn't see
it.)
Can someone give me a rationale behind the values assigned to
the .shift field in clock_event_device and clocksource in the current
ARM platforms?
When I read the documentation in Documentation/hrtimers/highres.txt
it points me to the PDF
http://www.linuxsymposium.org/2006/linuxsymposium_procv1.pdf
from which I get the impression that shift shall be assigned so
that
(time in ns for 1 cycle)
-------------------------- = 1
shift
2
So for a timer running cycles at 1MHz shift would be something like
10 so that 1000/1024 ~= 1.
However the current assignments doesn't look like that at all. I get
the impression that .shift for clock_event_device seem to be set
to 32 at all times in order to blow 32bit counters up to 64 bit,
and clocksource .shift is set to something like 18, 20 or 24 for
unclear reasons.
Any hints here?
Yours,
Linus Walleij
next parent reply other threads:[~2008-05-27 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <63386a3d0804090104h59fd6633x41a981eb8a1919ce@mail.gmail.com>
2008-05-27 14:54 ` Linus Walleij [this message]
2008-05-28 1:25 ` john stultz
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=63386a3d0805270754w7144799dn1de33774d852d6d5@mail.gmail.com \
--to=linus.ml.walleij@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®