Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern PR/49104: Jarle Greipsland: Don't use cpu_counter32...
details: https://anonhg.NetBSD.org/src/rev/c82ec1f997b8
branches: trunk
changeset: 805621:c82ec1f997b8
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 08 16:13:07 2015 +0000
description:
PR/49104: Jarle Greipsland: Don't use cpu_counter32() unconditionally.
XXX: pullup-7
diffstat:
sys/kern/kern_rndq.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 9c490d3ae326 -r c82ec1f997b8 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c Thu Jan 08 14:44:43 2015 +0000
+++ b/sys/kern/kern_rndq.c Thu Jan 08 16:13:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rndq.c,v 1.28 2014/10/26 18:22:32 tls Exp $ */
+/* $NetBSD: kern_rndq.c,v 1.29 2015/01/08 16:13:07 christos Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.28 2014/10/26 18:22:32 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.29 2015/01/08 16:13:07 christos Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -222,7 +222,8 @@
uint32_t ret;
#if defined(__HAVE_CPU_COUNTER)
- return (cpu_counter32());
+ if (cpu_hascounter())
+ return cpu_counter32();
#endif
if (rnd_ready) {
nanouptime(&ts);
Home |
Main Index |
Thread Index |
Old Index