summaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/timex.h
diff options
context:
space:
mode:
authorhawkes@sgi.com <hawkes@sgi.com>2006-02-14 19:40:17 +0100
committerTony Luck <tony.luck@intel.com>2006-02-15 22:37:04 +0100
commitdefbb2c929cbe89dc92239b303cd33d3c85e9a83 (patch)
tree85dbcfa407d4bfaecbce4f3556a73033b8f70caf /include/asm-ia64/timex.h
parent[IA64-SGI] enforce proper ordering of callouts by XPC (diff)
downloadlinux-defbb2c929cbe89dc92239b303cd33d3c85e9a83.tar.xz
linux-defbb2c929cbe89dc92239b303cd33d3c85e9a83.zip
[IA64] ia64: simplify and fix udelay()
The original ia64 udelay() was simple, but flawed for platforms without synchronized ITCs: a preemption and migration to another CPU during the while-loop likely resulted in too-early termination or very, very lengthy looping. The first fix (now in 2.6.15) broke the delay loop into smaller, non-preemptible chunks, reenabling preemption between the chunks. This fix is flawed in that the total udelay is computed to be the sum of just the non-premptible while-loop pieces, i.e., not counting the time spent in the interim preemptible periods. If an interrupt or a migration occurs during one of these interim periods, then that time is invisible and only serves to lengthen the effective udelay(). This new fix backs out the current flawed fix and returns to a simple udelay(), fully preemptible and interruptible. It implements two simple alternative udelay() routines: one a default generic version that uses ia64_get_itc(), and the other an sn-specific version that uses that platform's RTC. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/timex.h')
-rw-r--r--include/asm-ia64/timex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-ia64/timex.h b/include/asm-ia64/timex.h
index 414aae060440..05a6baf8a472 100644
--- a/include/asm-ia64/timex.h
+++ b/include/asm-ia64/timex.h
@@ -15,6 +15,8 @@
typedef unsigned long cycles_t;
+extern void (*ia64_udelay)(unsigned long usecs);
+
/*
* For performance reasons, we don't want to define CLOCK_TICK_TRATE as
* local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George