lkml.org 
[lkml]   [2017]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2017-10-31 17:45    [W:0.120 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site