From fc4009dad8ee14e7dbf8ba93478af698e38db786 Mon Sep 17 00:00:00 2001 From: cheloha Date: Wed, 11 Jan 2023 02:49:34 +0000 Subject: [PATCH] i386/machdep.c: revert revisions 1.659 and 1.660 "put it back" kettenis@ --- sys/arch/i386/i386/machdep.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 43ab1828d48..b911a9734be 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.661 2023/01/10 01:09:14 dv Exp $ */ +/* $OpenBSD: machdep.c,v 1.662 2023/01/11 02:49:34 cheloha Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1862,8 +1862,19 @@ identifycpu(struct cpu_info *ci) } break; } - if (CPU_IS_PRIMARY(ci)) - calibrate_cyclecounter(); /* set cpuspeed */ + 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) -- 2.20.1