Thread (38 messages) 38 messages, 5 authors, 2012-07-24
STALE5062d

[PATCH v2 2/2] ARM: delay: allow timer-based delay implementation to be selected

From: Shilimkar, Santosh <hidden>
Date: 2012-07-13 10:48:25

Wiil,

On Fri, Jul 13, 2012 at 2:27 PM, Will Deacon [off-list ref] wrote:
On Fri, Jul 13, 2012 at 03:16:41AM +0100, Shinya Kuribayashi wrote:
quoted
On 7/13/2012 1:40 AM, Stephen Boyd wrote:
quoted
quoted
quoted
quoted
As a result, actual udelay()s may be toooo long than expected, in
particular udelay()s used between init_current_timer_delay() and
calibrate_delay().  It's unlikely be short, as the frequency of a
counter for read_current_timer is typically slower than CPU frequency.
Surely using udelay before calibrate_delay_loop has been called is a
fundamental error?
Got it.  I'm just not confident about disallowing early use of udelay().
I don't think it's an error. Instead you get a very large delay, similar
to what would happen if you called udelay() before calibrate_delay()
anyway (see the comment in init/main.c above loops_per_jiffy).
Interesting, I didn't notice it was initialised to 4k, so yes I suppose you
could make use of some sort of delay. I don't think it's necessarily `very
large' though -- anything ticking at over ~400KHz with HZ=100 would give you
a smaller delay.
quoted
Thanks, so I'd set up loops_per_jiffy early, along with lpj_fine in
init_current_timer_delay().
That should work, providing you can get a sensible initial estimate for
loops_per_jiffy.
Do you have an updated version of the patch ?

Regards,
Santosh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help