From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
Date: Mon, 25 Mar 2013 16:28:10 -0500 [thread overview]
Message-ID: <5150C16A.3040208@gmail.com> (raw)
In-Reply-To: <20130325172633.GP30923@n2100.arm.linux.org.uk>
On 03/25/2013 12:26 PM, Russell King - ARM Linux wrote:
> On Thu, Mar 21, 2013 at 11:06:47AM +0000, Mark Rutland wrote:
>> On TC2 this series leads to using the vexpress 24MHz clock as the sched clock
>> in preference to the architected timer:
>>
>> Architected local timer running at 24.00MHz (virt).
>> Switching to timer-based delay loop
>> Registered arch_counter_get_cntvct+0x0/0x14 as sched_clock source
>> sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
>> Registered versatile_read_sched_clock+0x0/0x28 as sched_clock source
>>
>> As they both have the same frequency, neither overrides the other, and
>> whichever gets registered last is used as the sched_clock. As accesses
>> to the architected timer are going to have a much lower overhead, this
>> isn't very nice (and it could be better to use it even if it had a lower
>> frequency).
>
> I'll remind people that sched_clock() is supposed to be functional at
> the point in the boot sequence where the call to sched_init() is called.
> That is after setup_arch() and *before* time_init() is called.
I count integrator-cp, realview, versatile and non-DT VExpress that do
this (not surprisingly) and 25 platforms or timer implementations plus
arm64 that do sched_clock setup in time_init. What's broken by not
moving these earlier?
We could probably fix arch timers relatively easily, but supporting the
numerous memory-mapped timers will be harder. Most timers are also
dependent on the clocks being initialized. That's really an orthogonal
issue to what this patch series solves. This series is about selecting
the best sched_clock when multiple timers are present. Perhaps one that
is setup in init_early should be preferred over one setup in init_time.
I'm not sure how to detect that.
Rob
next prev parent reply other threads:[~2013-03-25 21:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 22:34 [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init Rob Herring
2013-03-21 11:06 ` Mark Rutland
2013-03-21 11:35 ` Marc Zyngier
2013-03-21 12:52 ` Rob Herring
2013-03-25 17:26 ` Russell King - ARM Linux
2013-03-25 21:28 ` Rob Herring [this message]
2013-03-25 22:36 ` Arnd Bergmann
2013-03-25 22:53 ` John Stultz
2013-03-26 2:19 ` Rob Herring
2013-03-26 9:56 ` Arnd Bergmann
2013-03-25 23:07 ` Catalin Marinas
2013-04-23 21:23 ` [PATCH] ARM: OMAP: remove unused variable Arnd Bergmann
2013-04-23 21:26 ` Tony Lindgren
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=5150C16A.3040208@gmail.com \
--to=robherring2@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).