git: b01d706cca59 - stable/13 - i386: Call clock_init() after finishidentcpu()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 15 Mar 2022 16:26:43 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=b01d706cca597cd1fbf9178974a246d4896d544e

commit b01d706cca597cd1fbf9178974a246d4896d544e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-03-01 14:00:05 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-03-15 15:41:02 +0000

    i386: Call clock_init() after finishidentcpu()
    
    In a subsequent commit clock_init() will attempt to determine the TSC
    frequency, and this requires that CPU identification is finalized.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit c3d830cf7c71614d21f57c24039de219e4a90538)
---
 sys/i386/i386/machdep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index e1224e2f8ae8..447bbf969e6f 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -1488,13 +1488,14 @@ init386(int first)
 	r_idt.rd_base = (int) idt;
 	lidt(&r_idt);
 
+	finishidentcpu();	/* Final stage of CPU initialization */
+
 	/*
 	 * Initialize the clock before the console so that console
 	 * initialization can use DELAY().
 	 */
 	clock_init();
 
-	finishidentcpu();	/* Final stage of CPU initialization */
 	i386_setidt2();
 	pmap_set_nx();
 	initializecpu();	/* Initialize CPU registers */