[PATCH] ipw2100: small cleanups
[linux-2.6/zen-sources.git] / arch / um / sys-x86_64 / delay.c
blob137f4446b4390cfe49b7036de853b1fff05d350a
1 /*
2 * Copyright 2003 PathScale, Inc.
3 * Copied from arch/x86_64
5 * Licensed under the GPL
6 */
8 #include <linux/module.h>
9 #include <linux/delay.h>
10 #include <asm/processor.h>
11 #include <asm/param.h>
13 void __delay(unsigned long loops)
15 unsigned long i;
17 for(i = 0; i < loops; i++)
18 cpu_relax();
21 void __udelay(unsigned long usecs)
23 unsigned long i, n;
25 n = (loops_per_jiffy * HZ * usecs) / MILLION;
26 for(i=0;i<n;i++)
27 cpu_relax();
30 EXPORT_SYMBOL(__udelay);
32 void __const_udelay(unsigned long usecs)
34 unsigned long i, n;
36 n = (loops_per_jiffy * HZ * usecs) / MILLION;
37 for(i=0;i<n;i++)
38 cpu_relax();
41 EXPORT_SYMBOL(__const_udelay);