Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2]: src/sys/arch/i386/i386 Pull up revision 1.20 (requested by re...



details:   https://anonhg.NetBSD.org/src/rev/82ca2e883dd6
branches:  netbsd-2
changeset: 563944:82ca2e883dd6
user:      riz <riz%NetBSD.org@localhost>
date:      Sun Aug 07 15:33:30 2005 +0000

description:
Pull up revision 1.20 (requested by reed in ticket #5551):
move
         microtime_func = cc_microtime;
to a point after the CPU-specific setup routine is called because some of them
"turn off" the TSC because it's broken on those platforms, or not suitable
for use as an interval timer.
One such platform is the Cyrix/NSC Geode processor; when powersave mode is
enabled, the "hlt" instruction stops the TSC too. It continues to be perfectly
reasonable for program profiling as a cycle counter in this mode, but it is
unsuitable for interval time keeping (time doesn't stop just because you're
asleep or napping), and, for now, we don't have a separate flag to make this
distinction - we just test for the presence of TSC to enable cc_microtime().

diffstat:

 sys/arch/i386/i386/identcpu.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r fe39dcd9dcba -r 82ca2e883dd6 sys/arch/i386/i386/identcpu.c
--- a/sys/arch/i386/i386/identcpu.c     Sun Aug 07 15:27:38 2005 +0000
+++ b/sys/arch/i386/i386/identcpu.c     Sun Aug 07 15:33:30 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: identcpu.c,v 1.10.2.2 2004/08/12 03:31:15 jmc Exp $    */
+/*     $NetBSD: identcpu.c,v 1.10.2.2.2.1 2005/08/07 15:33:30 riz Exp $        */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.2.2 2004/08/12 03:31:15 jmc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.2.2.2.1 2005/08/07 15:33:30 riz Exp $");
 
 #include "opt_cputype.h"
 
@@ -1164,9 +1164,6 @@
                last_tsc = rdtsc();
                delay(100000);
                ci->ci_tsc_freq = (rdtsc() - last_tsc) * 10;
-#ifndef NO_TSC_TIME
-               microtime_func = cc_microtime;
-#endif
        }
        /* XXX end XXX */
 #endif



Home | Main Index | Thread Index | Old Index