From nobody Thu Mar 31 16:07:50 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 100531A3DEB5; Thu, 31 Mar 2022 16:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KTp9f6c7Zz4Ymb; Thu, 31 Mar 2022 16:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648742871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H2sKtGpeqTwYKekFFSUBuigGvBqPRKOnqRWhhg99lS0=; b=bf+yFNjNTtDp0krHf+9jDZZhuCQg3QWTF4BHzNDpQS1XHwfPo9JWmYe6KjR7LLz2iFNCHA HEaqM+z5mHuNI3o4MhCvPJ43vizbWVzLwvzW15bz4rDUh/DXNPr+T3rb+BtVPcRT4AvWEb 6vWodMkiR9cmSpphZnIjw2HKsfPZWlAmWuRROFB3VRI0uk8uoHYo5Weq2N0AN0wO++Pitk tHOYKlnQgfyqW5L1aaaEC6mbtojYkRMTLmG1ehivVFymBRdUan58mQD+zX0j/8kNfdwFvi fJ3R0sBMrPUf7JQTRw5YM7VeLbFaeEvMfNVd9/dsZMPz9/H8qFi1R4oebPxIrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF4772A951; Thu, 31 Mar 2022 16:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22VG7oXP095151; Thu, 31 Mar 2022 16:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22VG7oPV095150; Thu, 31 Mar 2022 16:07:50 GMT (envelope-from git) Date: Thu, 31 Mar 2022 16:07:50 GMT Message-Id: <202203311607.22VG7oPV095150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ae95c02d02c2 - stable/13 - amd64: Call clock_init() after finishidentcpu() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ae95c02d02c29ddbb3767ca13731325be0688a28 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648742871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H2sKtGpeqTwYKekFFSUBuigGvBqPRKOnqRWhhg99lS0=; b=m0Mapfia7i+LplacPcdHCLuT39kTpUCCJ3GDiwJ5gXafH675Qsfi3qrAH0VFf4asltGfAo 8pYylMwqrzerYJF0cKqiVNHveVX+YYErq3THzzrtgLcXQvFNQFeklVkeIEMOpFoya5/xoc Zhwl3j124MqOv7MH20FfmYEqSR7+4hVaTPoEbS2XcR/OxuMEp1+qNOg6POoTVE3UIXUEOU JigdBceS3h6w6LsymbMrQD6PLeIUFy3Aaevo9j2dgi9r1pNHj2ViY5+9vHw6u/lNCA90Rr gFBub59qJhElA4zJ5hGAdXXsur7myOF9oJwmWo/F2FnFRRM9zBNluidoWzaNRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648742871; a=rsa-sha256; cv=none; b=OTp8gfMbjH4oomRTxABEDN6vMZz6OzVQ8JOZzl683fmpUUkI2hDEfGIPx2yx+o6YmlJr/V ai24ctS+xSimuhyQABNENqrhNz0S6TODmhhwFZabaAxIzvV21adN/0e/OKZwhRSGEEl06J 8MbSLCOw16fPv6i/kQ9T8ALu8TPgOMX0d1mOeLqIbvSjc+lr/BniWGoi74gQ+QCgmEtGq8 t2oHrZPPqQk7SIVuLFKyMrDBbfmeL78xNV8Ba9D/nwJywCQIhRE+SinA5k+Rm6KNeotWlr 801wTC54ibsah/xHo/2yhfgot8xYlMFh/9iaeku9Blq9JFZSb94IuwOcEw7wBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ae95c02d02c29ddbb3767ca13731325be0688a28 commit ae95c02d02c29ddbb3767ca13731325be0688a28 Author: Mark Johnston AuthorDate: 2022-03-05 00:32:39 +0000 Commit: Mark Johnston CommitDate: 2022-03-31 16:05:44 +0000 amd64: Call clock_init() after finishidentcpu() As in commit c3d830cf7c71, we should finalize CPU identification before probing the TSC frequency. Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier") Reported by: khng (cherry picked from commit f7a6dccf426676bdd8c6be25491e57dca830de25) --- sys/amd64/amd64/machdep.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 870b113359ae..8fb65917f700 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1467,12 +1467,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) r_idt.rd_base = (long) idt; lidt(&r_idt); - /* - * Initialize the clock before the console so that console - * initialization can use DELAY(). - */ - clock_init(); - /* * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) * transition). @@ -1500,6 +1494,13 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) &x86_rngds_mitg_enable); finishidentcpu(); /* Final stage of CPU initialization */ + + /* + * Initialize the clock before the console so that console + * initialization can use DELAY(). + */ + clock_init(); + initializecpu(); /* Initialize CPU registers */ amd64_bsp_ist_init(pc);