diff options
author | John Hawkes <hawkes@sgi.com> | 2005-12-16 18:00:24 (GMT) |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-12-16 18:00:24 (GMT) |
commit | f5899b5d4fa806403f547dc41312d017d94ec273 (patch) | |
tree | 4cbc38474b5ab6dfe8591f0b490686315a6aaa26 /include/asm-ia64/delay.h | |
parent | 7b6666530e2736f190a2629c8abe34275054449f (diff) | |
download | linux-fsl-qoriq-f5899b5d4fa806403f547dc41312d017d94ec273.tar.xz |
[IA64] disable preemption in udelay()
The udelay() inline for ia64 uses the ITC. If CONFIG_PREEMPT is enabled
and the platform has unsynchronized ITCs and the calling task migrates
to another CPU while doing the udelay loop, then the effective delay may
be too short or very, very long.
This patch disables preemption around 100 usec chunks of the overall
desired udelay time. This minimizes preemption-holdoffs.
udelay() is now too big to be inline, move it out of line and export it.
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/delay.h')
-rw-r--r-- | include/asm-ia64/delay.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/include/asm-ia64/delay.h b/include/asm-ia64/delay.h index 57182d6..bba7020 100644 --- a/include/asm-ia64/delay.h +++ b/include/asm-ia64/delay.h @@ -84,14 +84,6 @@ __delay (unsigned long loops) ia64_delay_loop (loops - 1); } -static __inline__ void -udelay (unsigned long usecs) -{ - unsigned long start = ia64_get_itc(); - unsigned long cycles = usecs*local_cpu_data->cyc_per_usec; - - while (ia64_get_itc() - start < cycles) - cpu_relax(); -} +extern void udelay (unsigned long usecs); #endif /* _ASM_IA64_DELAY_H */ |