diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2007-04-02 02:49:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-02 13:06:08 -0400 |
commit | 10fa1155a2c3282f421a74fedfad1957e8bdc86c (patch) | |
tree | 21ec69d27c0d5e239f9c0eed531dbcdc0f602af2 /arch | |
parent | 05565b65a5309e3e5c86db1975b57f75661bee8f (diff) |
[PATCH] uml: fix unreasonably long udelay
Currently we have a confused udelay implementation.
* __const_udelay does not accept usecs but xloops in i386 and x86_64
* our implementation requires usecs as arg
* it gets a xloops count when called by asm/arch/delay.h
Bugs related to this (extremely long shutdown times) where reported by some
x86_64 users, especially using Device Mapper.
To hit this bug, a compile-time constant time parameter must be passed -
that's why UML seems to work most times. Fix this with a simple udelay
implementation.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/sys-i386/delay.c | 11 | ||||
-rw-r--r-- | arch/um/sys-x86_64/delay.c | 11 |
2 files changed, 0 insertions, 22 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); | ||