diff options
-rw-r--r-- | arch/x86/lib/delay_32.c | 2 | ||||
-rw-r--r-- | arch/x86/lib/delay_64.c | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c index bf6de05445ba..0b659a320b1e 100644 --- a/arch/x86/lib/delay_32.c +++ b/arch/x86/lib/delay_32.c | |||
@@ -114,7 +114,7 @@ inline void __const_udelay(unsigned long xloops) | |||
114 | int d0; | 114 | int d0; |
115 | 115 | ||
116 | xloops *= 4; | 116 | xloops *= 4; |
117 | __asm__("mull %0" | 117 | __asm__("mull %%edx" |
118 | :"=d" (xloops), "=&a" (d0) | 118 | :"=d" (xloops), "=&a" (d0) |
119 | :"1" (xloops), "0" | 119 | :"1" (xloops), "0" |
120 | (cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4))); | 120 | (cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4))); |
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c index d0326d07c845..ff3dfecdb6f9 100644 --- a/arch/x86/lib/delay_64.c +++ b/arch/x86/lib/delay_64.c | |||
@@ -103,9 +103,16 @@ EXPORT_SYMBOL(__delay); | |||
103 | 103 | ||
104 | inline void __const_udelay(unsigned long xloops) | 104 | inline void __const_udelay(unsigned long xloops) |
105 | { | 105 | { |
106 | __delay(((xloops * HZ * | 106 | int d0; |
107 | cpu_data(raw_smp_processor_id()).loops_per_jiffy) >> 32) + 1); | 107 | xloops *= 4; |
108 | __asm__("mull %%edx" | ||
109 | :"=d" (xloops), "=&a" (d0) | ||
110 | :"1" (xloops), "0" | ||
111 | (cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4))); | ||
112 | |||
113 | __delay(++xloops); | ||
108 | } | 114 | } |
115 | |||
109 | EXPORT_SYMBOL(__const_udelay); | 116 | EXPORT_SYMBOL(__const_udelay); |
110 | 117 | ||
111 | void __udelay(unsigned long usecs) | 118 | void __udelay(unsigned long usecs) |