udelay() broken for SMP cores?

Jamie Lokier jamie at shareable.org
Wed Apr 21 06:00:08 EDT 2010


Russell King - ARM Linux wrote:
> Well, the assumption is that the CPUs will be running at their fastest
> speed at boot time, and therefore loops_per_jiffy will be calibrated
> such that we guarantee _at least_ the asked-for delay - which is the
> only guarantee udelay has.

That's an interesting and not altogether reliable assumption.

On a device I'm working with, we just read a fixed-speed clock
register in a loop.  It's slower than the CPU register loop, but given
udelay counts in great big slow _microsecond_ delays (how quaint! ;-)
that's fine.

-- Jamie



More information about the linux-arm-kernel mailing list