Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 31 Oct 2017 09:44:20 -0700 | Subject | Re: [RFC] Improving udelay/ndelay on platforms where that is possible |
| |
On Tue, Oct 31, 2017 at 9:15 AM, Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote: > > On arm32, it is possible to set up udelay() to be clock-based.
I'm not sure why this is discussed as some kind of generic problem.
Just do what x86-64 already does. We use the TSC, and ndelay() does the right thing too.
I've not checked precision, but it should be close to the TSC update frequency. So we're talking tens of megahertz.
Does it work on all PC's? No. It's only half-way reliable on the ones where the TSC frequency doesn't change. So there are no *guarantees*.
Linus
| |