diff options
author | Bodo Stroesser <bstroesser@fujitsu-siemens.com> | 2005-05-05 19:15:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-05 19:36:38 -0400 |
commit | 5fd861b682785f650114f4df53060d1be7fedecd (patch) | |
tree | eaa02425c2be79ac21ecc684a5b2a31d9f3320c2 /arch/um/sys-i386 | |
parent | 7d37c6d52fce13008f20344790a81a6a5a0003b3 (diff) |
[PATCH] uml: s390 preparation, delay moved to arch
s390 has fast read access to realtime clock (nanosecond resolution). So it
makes sense to have an arch-specific implementation not only of __delay, but
__udelay also.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/sys-i386')
-rw-r--r-- | arch/um/sys-i386/delay.c | 18 | ||||
-rw-r--r-- | arch/um/sys-i386/ksyms.c | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/um/sys-i386/delay.c b/arch/um/sys-i386/delay.c index 20d37dbbaf08..e9892eef51ce 100644 --- a/arch/um/sys-i386/delay.c +++ b/arch/um/sys-i386/delay.c | |||
@@ -1,3 +1,6 @@ | |||
1 | #include "linux/delay.h" | ||
2 | #include "asm/param.h" | ||
3 | |||
1 | void __delay(unsigned long time) | 4 | void __delay(unsigned long time) |
2 | { | 5 | { |
3 | /* Stolen from the i386 __loop_delay */ | 6 | /* Stolen from the i386 __loop_delay */ |
@@ -12,3 +15,18 @@ void __delay(unsigned long time) | |||
12 | :"0" (time)); | 15 | :"0" (time)); |
13 | } | 16 | } |
14 | 17 | ||
18 | void __udelay(unsigned long usecs) | ||
19 | { | ||
20 | int i, n; | ||
21 | |||
22 | n = (loops_per_jiffy * HZ * usecs) / MILLION; | ||
23 | for(i=0;i<n;i++) ; | ||
24 | } | ||
25 | |||
26 | void __const_udelay(unsigned long usecs) | ||
27 | { | ||
28 | int i, n; | ||
29 | |||
30 | n = (loops_per_jiffy * HZ * usecs) / MILLION; | ||
31 | for(i=0;i<n;i++) ; | ||
32 | } | ||
diff --git a/arch/um/sys-i386/ksyms.c b/arch/um/sys-i386/ksyms.c index b10bfdd26cd6..db524ab3f743 100644 --- a/arch/um/sys-i386/ksyms.c +++ b/arch/um/sys-i386/ksyms.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include "linux/in6.h" | 2 | #include "linux/in6.h" |
3 | #include "linux/rwsem.h" | 3 | #include "linux/rwsem.h" |
4 | #include "asm/byteorder.h" | 4 | #include "asm/byteorder.h" |
5 | #include "asm/delay.h" | ||
5 | #include "asm/semaphore.h" | 6 | #include "asm/semaphore.h" |
6 | #include "asm/uaccess.h" | 7 | #include "asm/uaccess.h" |
7 | #include "asm/checksum.h" | 8 | #include "asm/checksum.h" |
@@ -14,3 +15,7 @@ EXPORT_SYMBOL(__up_wakeup); | |||
14 | 15 | ||
15 | /* Networking helper routines. */ | 16 | /* Networking helper routines. */ |
16 | EXPORT_SYMBOL(csum_partial); | 17 | EXPORT_SYMBOL(csum_partial); |
18 | |||
19 | /* delay core functions */ | ||
20 | EXPORT_SYMBOL(__const_udelay); | ||
21 | EXPORT_SYMBOL(__udelay); | ||