Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Make curcpu_available() always true.



details:   https://anonhg.NetBSD.org/src/rev/6d7b8fa919ba
branches:  trunk
changeset: 971902:6d7b8fa919ba
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri May 08 00:53:25 2020 +0000

description:
Make curcpu_available() always true.

This should work now that x86 runs cpu_init_rng just after curcpu()
and curlwp are initialized, and no other architecture needs it to
work that early.

diffstat:

 sys/kern/kern_entropy.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 3a1978c11048 -r 6d7b8fa919ba sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c   Fri May 08 00:52:29 2020 +0000
+++ b/sys/kern/kern_entropy.c   Fri May 08 00:53:25 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_entropy.c,v 1.14 2020/05/07 19:07:29 riastradh Exp $      */
+/*     $NetBSD: kern_entropy.c,v 1.15 2020/05/08 00:53:25 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.14 2020/05/07 19:07:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.15 2020/05/08 00:53:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -264,7 +264,7 @@
 curcpu_available(void)
 {
 
-       return __predict_true(!cold);
+       return true;
 }
 
 /*



Home | Main Index | Thread Index | Old Index