2
* Precise Delay Loops for i386
4
* Copyright (C) 1993 Linus Torvalds
5
* Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
7
* The __delay function must _NOT_ be inlined as its execution time
8
* depends wildly on alignment on many x86 processors. The additional
9
* jump magic is needed to get the timing stable on all the CPU's
10
* we have to worry about.
13
#include <xeno/config.h>
14
#include <xeno/delay.h>
16
#include <asm/processor.h>
18
void __udelay(unsigned long usecs)
20
unsigned long ticks = usecs * ticks_per_usec;
28
} while ((e-s) < ticks);