]> git.hungrycats.org Git - linux/commitdiff
[PATCH] time interpolator fixes
authorChristoph Lameter <clameter@sgi.com>
Wed, 13 Oct 2004 14:25:49 +0000 (07:25 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:25:49 +0000 (07:25 -0700)
- Remove the setting of CLOCK_REALTIME and CLOCK_MONOTONIC resolution
  according to the interpolator resolution since this causes periodic timer
  signals to fail.  The clocks will still be high-resolution but the
  "resolution" reported reflects the timer intervals possible via
  timer_settime (also more conformant to what the Single Unix Specification
  says).

- Make the IA64 clock_gettime fastcall fall back on negative clock
  numbers instead of returning CLOCK_REALTIME.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ia64/kernel/fsys.S
kernel/posix-timers.c

index 0af6f4b4a289f5ec27b0af8ab6708ae272ff0b6d..4895559ee8071d77cf28e2bfc8645eb784fa3352 100644 (file)
@@ -234,7 +234,7 @@ ENTRY(fsys_gettimeofday)
        cmp.eq p9,p0 = 1,r8     // MMIO64 ?
        extr r2 = r21,24,8      // time_interpolator->jitter
        cmp.eq p10,p0 = 2,r8    // MMIO32 ?
-       cmp.lt p11,p0 = 2,r8    // function?
+       cmp.ltu p11,p0 = 2,r8   // function or other clock
 (p11)  br.cond.spnt.many fsys_fallback_syscall
        ;;
        setf.sig f7 = r3        // Setup for scaling of counter
@@ -338,7 +338,7 @@ ENTRY(fsys_clock_gettime)
        .prologue
        .altrp b6
        .body
-       cmp4.lt p6, p0 = CLOCK_MONOTONIC, r32
+       cmp4.ltu p6, p0 = CLOCK_MONOTONIC, r32
        // Fallback if this is not CLOCK_REALTIME or CLOCK_MONOTONIC
 (p6)   br.spnt.few fsys_fallback_syscall
        mov r31 = r33
index ef5c421017488932b864b60a6d66ba44002e7cb8..7ba8941b834b1f4234ebf4892d4bbb2dc113ce7d 100644 (file)
@@ -219,11 +219,6 @@ static __init int init_posix_timers(void)
                .clock_set = do_posix_clock_monotonic_settime
        };
 
-#ifdef CONFIG_TIME_INTERPOLATION
-       /* Clocks are more accurate with time interpolators */
-       clock_realtime.res = clock_monotonic.res = time_interpolator_resolution();
-#endif
-
        register_posix_clock(CLOCK_REALTIME, &clock_realtime);
        register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic);