Module Name: src
Committed By: riastradh
Date: Fri May 8 00:52:29 UTC 2020
Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/i386/i386: machdep.c
Log Message:
Move cpu_rng_init a little later, just after cpu_init_msrs, on x86.
This way curcpu() and curlwp are available, so that we no longer need
any annoying conditionalization in kern_entropy.c.
To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.354 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.829 -r1.830 src/sys/arch/i386/i386/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.353 src/sys/arch/amd64/amd64/machdep.c:1.354
--- src/sys/arch/amd64/amd64/machdep.c:1.353 Fri May 8 00:49:42 2020
+++ src/sys/arch/amd64/amd64/machdep.c Fri May 8 00:52:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.353 2020/05/08 00:49:42 riastradh Exp $ */
+/* $NetBSD: machdep.c,v 1.354 2020/05/08 00:52:29 riastradh Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.353 2020/05/08 00:49:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.354 2020/05/08 00:52:29 riastradh Exp $");
#include "opt_modular.h"
#include "opt_user_ldt.h"
@@ -1702,11 +1702,11 @@ init_x86_64(paddr_t first_avail)
uvm_lwp_setuarea(&lwp0, lwp0uarea);
cpu_probe(&cpu_info_primary);
- cpu_rng_init();
#ifdef SVS
svs_init();
#endif
cpu_init_msrs(&cpu_info_primary, true);
+ cpu_rng_init();
#ifndef XENPV
cpu_speculation_init(&cpu_info_primary);
#endif
Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.829 src/sys/arch/i386/i386/machdep.c:1.830
--- src/sys/arch/i386/i386/machdep.c:1.829 Sat May 2 16:44:35 2020
+++ src/sys/arch/i386/i386/machdep.c Fri May 8 00:52:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.829 2020/05/02 16:44:35 bouyer Exp $ */
+/* $NetBSD: machdep.c,v 1.830 2020/05/08 00:52:29 riastradh Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.829 2020/05/02 16:44:35 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.830 2020/05/08 00:52:29 riastradh Exp $");
#include "opt_beep.h"
#include "opt_compat_freebsd.h"
@@ -1150,8 +1150,8 @@ init386(paddr_t first_avail)
uvm_lwp_setuarea(&lwp0, lwp0uarea);
cpu_probe(&cpu_info_primary);
- cpu_rng_init();
cpu_init_msrs(&cpu_info_primary, true);
+ cpu_rng_init();
#ifndef XENPV
cpu_speculation_init(&cpu_info_primary);
#endif