From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] [ARM] Translate delay.S into (mostly) C
Date: Thu, 07 Oct 2010 17:11:06 -0700 [thread overview]
Message-ID: <4CAE619A.2050302@codeaurora.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1010061553350.3107@xanadu.home>
On 10/06/2010 01:05 PM, Nicolas Pitre wrote:
> You could use the noinline qualifier from <linux/compiler.h> with those
> functions you don't want inlined.
>
That won't help me for the interleaving behavior though.
>> Is it possible to do all this in assembly ? Can't you have the default
>> implementation using this assembly with different function names, then
>> just set the assembly function names in C code someplace?
> That weould be my preference too. Being in assembly means that this
> code is unlikely to change with different optimization levels and/or gcc
> versions which would otherwise require different calibration values.
> Relying on stable calibration is necessary for the lpj kernel cmdline
> parameter to have some meaning.
Why doesn't any other architecture use assembly for their lpj code? They
may use headers with assembly in them or C code with assembly in them,
but they don't write all of the delay code in assembly and rely on
function interleaving. This leads me to believe other arches aren't
concerned about compiler optimizations breaking lpj cmdline parameters,
so why should ARM be concerned?
I tested the theory out and scaled down the CPU frequency to 19.2 MHz
and then called calibrate_delay(). Before and after applying this series
I got the same results.
Calibrating delay loop... 12.67 BogoMIPS (lpj=63360)
Jumping up to 1.2 GHz and calling calibrate_delay() gives me the same
before and after
Calibrating delay loop... 792.98 BogoMIPS (lpj=3964928)
I don't have access to a machine capable of running slower than 19.2
MHz. Maybe machines running in the KHz range would experience differences?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2010-10-08 0:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 3:33 [PATCH 0/3] Fixing udelay() on SMP (and non-SMP too) Stephen Boyd
2010-09-28 3:33 ` [PATCH 1/3] [ARM] Translate delay.S into (mostly) C Stephen Boyd
2010-10-05 17:22 ` Daniel Walker
2010-10-06 3:36 ` Stephen Boyd
2010-10-06 13:38 ` Daniel Walker
2010-10-06 14:26 ` Nicolas Pitre
2010-10-06 18:30 ` Stephen Boyd
2010-10-06 19:35 ` Daniel Walker
2010-10-06 20:05 ` Nicolas Pitre
2010-10-08 0:11 ` Stephen Boyd [this message]
2010-10-08 1:12 ` Nicolas Pitre
2010-10-06 20:24 ` Stephen Boyd
2010-09-28 3:33 ` [PATCH 2/3] [ARM] Allow machines to override __delay() Stephen Boyd
2010-10-05 17:29 ` Daniel Walker
2010-10-06 3:36 ` Stephen Boyd
2010-09-28 3:33 ` [PATCH 3/3] [ARM] Implement a timer based __delay() loop Stephen Boyd
2010-10-05 17:38 ` Daniel Walker
2010-10-06 3:36 ` Stephen Boyd
2010-10-06 13:44 ` Daniel Walker
-- strict thread matches above, loose matches on Subject: below --
2010-09-07 18:23 [PATCH 0/3] Fixing udelay() on SMP (and non-SMP too) Stephen Boyd
2010-09-07 18:23 ` [PATCH 1/3] [ARM] Translate delay.S into (mostly) C Stephen Boyd
2010-08-19 2:24 [PATCH 0/3] Fixing udelay() on SMP (and non-SMP too) Stephen Boyd
2010-08-19 2:24 ` [PATCH 1/3] [ARM] Translate delay.S into (mostly) C 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=4CAE619A.2050302@codeaurora.org \
--to=sboyd@codeaurora.org \
--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).