i386: identifycpu(): don't print cpuspeed after calibrate_cyclecounter()
authorcheloha <cheloha@openbsd.org>
Tue, 10 Jan 2023 00:49:45 +0000 (00:49 +0000)
committercheloha <cheloha@openbsd.org>
Tue, 10 Jan 2023 00:49:45 +0000 (00:49 +0000)
The cpuspeed set during calibrate_cyclecounter() is a bogomips measurement.
It isn't an authoritative (nominal) frequency, so we shouldn't print it out
when identifying each CPU.  As an added bonus, this also removes some noise
when diffing i386 dmesgs.

ok deraadt@

sys/arch/i386/i386/machdep.c

index 310208a..bbf2147 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.658 2022/11/08 14:49:20 cheloha Exp $   */
+/*     $OpenBSD: machdep.c,v 1.659 2023/01/10 00:49:45 cheloha Exp $   */
 /*     $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $    */
 
 /*-
@@ -1862,18 +1862,6 @@ identifycpu(struct cpu_info *ci)
                        break;
                }
                calibrate_cyclecounter();
-               if (cpuspeed > 994) {
-                       int ghz, fr;
-
-                       ghz = (cpuspeed + 9) / 1000;
-                       fr = ((cpuspeed + 9) / 10 ) % 100;
-                       if (fr)
-                               printf(" %d.%02d GHz", ghz, fr);
-                       else
-                               printf(" %d GHz", ghz);
-               } else {
-                       printf(" %d MHz", cpuspeed);
-               }
        }
 
        if (cpuid_level != -1)