diff options
-rw-r--r-- | arch/um/sys-i386/delay.c | 11 | ||||
-rw-r--r-- | arch/um/sys-x86_64/delay.c | 11 | ||||
-rw-r--r-- | include/asm-um/delay.h | 17 |
3 files changed, 14 insertions, 25 deletions
diff --git a/arch/um/sys-i386/delay.c b/arch/um/sys-i386/delay.c index 2c11b9770e8b..d623e074f41d 100644 --- a/arch/um/sys-i386/delay.c +++ b/arch/um/sys-i386/delay.c | |||
@@ -27,14 +27,3 @@ void __udelay(unsigned long usecs) | |||
27 | } | 27 | } |
28 | 28 | ||
29 | EXPORT_SYMBOL(__udelay); | 29 | EXPORT_SYMBOL(__udelay); |
30 | |||
31 | void __const_udelay(unsigned long usecs) | ||
32 | { | ||
33 | int i, n; | ||
34 | |||
35 | n = (loops_per_jiffy * HZ * usecs) / MILLION; | ||
36 | for(i=0;i<n;i++) | ||
37 | cpu_relax(); | ||
38 | } | ||
39 | |||
40 | EXPORT_SYMBOL(__const_udelay); | ||
diff --git a/arch/um/sys-x86_64/delay.c b/arch/um/sys-x86_64/delay.c index 137f4446b439..dee5be66da82 100644 --- a/arch/um/sys-x86_64/delay.c +++ b/arch/um/sys-x86_64/delay.c | |||
@@ -28,14 +28,3 @@ void __udelay(unsigned long usecs) | |||
28 | } | 28 | } |
29 | 29 | ||
30 | EXPORT_SYMBOL(__udelay); | 30 | EXPORT_SYMBOL(__udelay); |
31 | |||
32 | void __const_udelay(unsigned long usecs) | ||
33 | { | ||
34 | unsigned long i, n; | ||
35 | |||
36 | n = (loops_per_jiffy * HZ * usecs) / MILLION; | ||
37 | for(i=0;i<n;i++) | ||
38 | cpu_relax(); | ||
39 | } | ||
40 | |||
41 | EXPORT_SYMBOL(__const_udelay); | ||
diff --git a/include/asm-um/delay.h b/include/asm-um/delay.h index 0985bda66750..c71e32b6741e 100644 --- a/include/asm-um/delay.h +++ b/include/asm-um/delay.h | |||
@@ -1,9 +1,20 @@ | |||
1 | #ifndef __UM_DELAY_H | 1 | #ifndef __UM_DELAY_H |
2 | #define __UM_DELAY_H | 2 | #define __UM_DELAY_H |
3 | 3 | ||
4 | #include "asm/arch/delay.h" | ||
5 | #include "asm/archparam.h" | ||
6 | |||
7 | #define MILLION 1000000 | 4 | #define MILLION 1000000 |
8 | 5 | ||
6 | /* Undefined on purpose */ | ||
7 | extern void __bad_udelay(void); | ||
8 | |||
9 | extern void __udelay(unsigned long usecs); | ||
10 | extern void __delay(unsigned long loops); | ||
11 | |||
12 | #define udelay(n) ((__builtin_constant_p(n) && (n) > 20000) ? \ | ||
13 | __bad_udelay() : __udelay(n)) | ||
14 | |||
15 | /* It appears that ndelay is not used at all for UML, and has never been | ||
16 | * implemented. */ | ||
17 | extern void __unimplemented_ndelay(void); | ||
18 | #define ndelay(n) __unimplemented_ndelay() | ||
19 | |||
9 | #endif | 20 | #endif |