From: mpeg.blue@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: Delays, clocks, timers, hrtimers, etc
Date: Mon, 09 Feb 2015 14:31:50 -0800 [thread overview]
Message-ID: <54D93556.9050008@free.fr> (raw)
In-Reply-To: <54D903F6.3050608@codeaurora.org>
Stephen Boyd wrote:
> Mason wrote:
>
>> config HAVE_ARM_TWD
>> bool
>> depends on SMP
>> select CLKSRC_OF if OF
>> help
>> This options enables support for the ARM timer and watchdog unit
>>
>> One problem I see is that HAVE_ARM_TWD depends on SMP...
>>
>> One of the systems I want to support is UP (single-core Cortex A9).
>> Does that mean I should use an SMP kernel even for that system?
>> Or is there a different subsystem for UP systems?
>
> I don't see any problem with the TWD dropping the dependency on SMP. The
> code should work the same on a UP configuration and if that's the only
> timer you have that can deliver interrupts to your processor then it
> would be required. You'd still need a clocksource though, which the TWD
> doesn't provide.
I want to use as much mainlined code as possible. Thus, this means
(if my reasoning is not flawed) that I should use standard ARM
"services" (can't think of a better term) for which code is already
available in the kernel.
As for clock events, IIUC, I can choose either TWD or the global
timer (with a slight advantage to TWD). Are there other options?
(I probably have some platform-specific infrastructure available,
but I'm asking about standard support.)
My platform provides a 32-bit counter, ticking at a constant 27 MHz.
Reading this counter has a latency of roughly 70 ns (it has to go
over the system memory bus). I think this is good enough for both
the clock source and sched_clock, is it not?
So the plan would be:
- clocksource and sched_clock : 27 MHz, 32-bit counter, platform
- clockevents : TWD, standard
Regards.
For my own reference
http://elinux.org/Kernel_Timer_Systems
http://thread.gmane.org/gmane.linux.kernel/1062438 (not merged)
Message-ID: <20150206191419.GA8656@n2100.arm.linux.org.uk>
next prev parent reply other threads:[~2015-02-09 22:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 13:16 Delays, clocks, timers, hrtimers, etc Mason
2015-01-29 13:57 ` Mason
2015-02-03 12:09 ` Russell King - ARM Linux
2015-02-06 18:37 ` Mason
2015-02-06 19:14 ` Russell King - ARM Linux
2015-02-06 21:03 ` Mason
2015-02-07 10:42 ` Russell King - ARM Linux
2015-02-09 7:45 ` Michal Simek
2015-02-09 16:10 ` Sören Brinkmann
2015-02-09 23:27 ` Mason
2015-02-06 20:25 ` Stefan Agner
2015-02-06 21:17 ` Mason
2015-02-06 21:31 ` Stefan Agner
2015-02-07 2:21 ` Mason
2015-02-07 9:51 ` Russell King - ARM Linux
2015-02-09 19:01 ` Stephen Boyd
2015-02-09 22:31 ` Mason [this message]
2015-02-09 23:17 ` Stephen Boyd
2015-02-09 23:50 ` Mason
2015-02-11 17:43 ` Mason
2015-02-11 18:45 ` Stephen Boyd
2015-02-11 21:58 ` Mason
2015-02-11 23:26 ` Stephen Boyd
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=54D93556.9050008@free.fr \
--to=mpeg.blue@free.fr \
--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).