Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Replace machine/rnd.h with more appropriate name to shar...
details: https://anonhg.NetBSD.org/src/rev/a49b7f7b3e0d
branches: trunk
changeset: 542739:a49b7f7b3e0d
user: nakayama <nakayama%NetBSD.org@localhost>
date: Wed Feb 05 13:57:50 2003 +0000
description:
Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
diffstat:
sys/arch/algor/include/cpu_counter.h | 3 +
sys/arch/algor/include/rnd.h | 3 -
sys/arch/alpha/include/rnd.h | 67 ------------------------
sys/arch/amigappc/include/cpu_counter.h | 3 +
sys/arch/amigappc/include/rnd.h | 3 -
sys/arch/arc/include/cpu_counter.h | 3 +
sys/arch/arc/include/rnd.h | 3 -
sys/arch/bebox/include/cpu_counter.h | 3 +
sys/arch/bebox/include/rnd.h | 3 -
sys/arch/cobalt/include/cpu_counter.h | 3 +
sys/arch/cobalt/include/rnd.h | 3 -
sys/arch/evbmips/include/cpu_counter.h | 3 +
sys/arch/evbmips/include/rnd.h | 3 -
sys/arch/evbppc/include/cpu_counter.h | 3 +
sys/arch/evbppc/include/rnd.h | 3 -
sys/arch/hpcmips/include/cpu_counter.h | 3 +
sys/arch/hpcmips/include/rnd.h | 3 -
sys/arch/i386/include/rnd.h | 78 -----------------------------
sys/arch/macppc/include/cpu_counter.h | 3 +
sys/arch/macppc/include/rnd.h | 3 -
sys/arch/mips/include/cpu_counter.h | 70 ++++++++++++++++++++++++++
sys/arch/mips/include/rnd.h | 59 ---------------------
sys/arch/mvmeppc/include/cpu_counter.h | 3 +
sys/arch/mvmeppc/include/rnd.h | 3 -
sys/arch/newsmips/include/cpu_counter.h | 3 +
sys/arch/newsmips/include/rnd.h | 3 -
sys/arch/ofppc/include/cpu_counter.h | 3 +
sys/arch/ofppc/include/rnd.h | 3 -
sys/arch/playstation2/include/cpu_counter.h | 3 +
sys/arch/playstation2/include/rnd.h | 3 -
sys/arch/pmax/include/cpu_counter.h | 3 +
sys/arch/pmax/include/rnd.h | 3 -
sys/arch/pmppc/include/cpu_counter.h | 3 +
sys/arch/pmppc/include/rnd.h | 3 -
sys/arch/powerpc/include/cpu_counter.h | 78 +++++++++++++++++++++++++++++
sys/arch/powerpc/include/rnd.h | 71 --------------------------
sys/arch/prep/include/cpu_counter.h | 3 +
sys/arch/prep/include/rnd.h | 3 -
sys/arch/sandpoint/include/cpu_counter.h | 3 +
sys/arch/sandpoint/include/rnd.h | 3 -
sys/arch/sbmips/include/cpu_counter.h | 3 +
sys/arch/sbmips/include/rnd.h | 3 -
sys/arch/sgimips/include/cpu_counter.h | 3 +
sys/arch/sgimips/include/rnd.h | 3 -
sys/arch/sparc64/include/rnd.h | 55 --------------------
sys/arch/x86_64/include/cpu_counter.h | 75 +++++++++++++++++++++++++++
sys/arch/x86_64/include/rnd.h | 60 ----------------------
sys/dev/rnd.c | 10 +-
48 files changed, 285 insertions(+), 452 deletions(-)
diffs (truncated from 959 to 300 lines):
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/algor/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/algor/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:51 nakayama Exp $ */
+
+#include <mips/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/algor/include/rnd.h
--- a/sys/arch/algor/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2001/05/28 16:22:20 thorpej Exp $ */
-
-#include <mips/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/alpha/include/rnd.h
--- a/sys/arch/alpha/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/08 02:19:20 thorpej Exp $ */
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _ALPHA_RND_H_
-#define _ALPHA_RND_H_
-
-/*
- * Machine-specific support for rnd(4)
- */
-
-#ifdef _KERNEL
-
-#include <machine/alpha_cpu.h>
-
-/* Process Cycle Counter is always available. */
-#define cpu_hascounter() (1)
-
-static __inline u_int32_t
-cpu_counter(void)
-{
-
- /*
- * Only the lower 32 bits of the PCC are an actual cycle
- * counter. Thankfully, the rnd(4) code only wants a
- * 32-bit value anyway.
- */
- return (alpha_rpcc() & 0xffffffffU);
-}
-
-#endif /* _KERNEL */
-
-#endif /* !_ALPHA_RND_H_ */
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/amigappc/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amigappc/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:51 nakayama Exp $ */
+
+#include <powerpc/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/amigappc/include/rnd.h
--- a/sys/arch/amigappc/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/11 16:32:42 tsubai Exp $ */
-
-#include <powerpc/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/arc/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arc/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:52 nakayama Exp $ */
+
+#include <mips/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/arc/include/rnd.h
--- a/sys/arch/arc/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/06 02:24:00 soren Exp $ */
-
-#include <mips/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/bebox/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/bebox/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:52 nakayama Exp $ */
+
+#include <powerpc/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/bebox/include/rnd.h
--- a/sys/arch/bebox/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/11 16:32:43 tsubai Exp $ */
-
-#include <powerpc/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/cobalt/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:52 nakayama Exp $ */
+
+#include <mips/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/cobalt/include/rnd.h
--- a/sys/arch/cobalt/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/06 02:24:01 soren Exp $ */
-
-#include <mips/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/evbmips/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbmips/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:52 nakayama Exp $ */
+
+#include <mips/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/evbmips/include/rnd.h
--- a/sys/arch/evbmips/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2002/03/07 14:44:02 simonb Exp $ */
-
-#include <mips/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/evbppc/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbppc/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:53 nakayama Exp $ */
+
+#include <powerpc/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/evbppc/include/rnd.h
--- a/sys/arch/evbppc/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2002/12/09 12:16:15 scw Exp $ */
-
-#include <powerpc/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/hpcmips/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:53 nakayama Exp $ */
+
+#include <mips/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/hpcmips/include/rnd.h
--- a/sys/arch/hpcmips/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/06 02:24:01 soren Exp $ */
-
-#include <mips/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/i386/include/rnd.h
--- a/sys/arch/i386/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/* $NetBSD: rnd.h,v 1.4 2001/12/06 01:56:19 sommerfeld Exp $ */
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Bill Sommerfeld.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _I386_RND_H_
-#define _I386_RND_H_
-
-/*
- * Machine-specific support for rnd(4)
- */
-
-#include <machine/cpufunc.h>
-#include <machine/specialreg.h>
-
-#include "opt_cputype.h"
-
-#ifdef _KERNEL
-
-static __inline int
-cpu_hascounter(void)
-{
-#if defined(I586_CPU) || defined(I686_CPU)
- /*
- * Note that:
- * 1) Intel documentation is very specific that code *must* test
- * the CPU feature flag, even if you "know" that a particular
- * rev of the hardware supports it.
- * 2) We know that the TSC is busted on some Cyrix CPU's..
- */
- return (cpu_feature & CPUID_TSC) != 0;
-#else
- return 0;
-#endif
-}
-
-static __inline u_int64_t
-cpu_counter(void)
-{
- return rdtsc();
-}
-
-#endif /* _KERNEL */
-
-#endif /* !_I386_RND_H_ */
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/macppc/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/macppc/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:53 nakayama Exp $ */
+
+#include <powerpc/cpu_counter.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/macppc/include/rnd.h
--- a/sys/arch/macppc/include/rnd.h Wed Feb 05 12:42:01 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: rnd.h,v 1.1 2000/06/11 16:32:43 tsubai Exp $ */
-
-#include <powerpc/rnd.h>
diff -r 24893abe4abd -r a49b7f7b3e0d sys/arch/mips/include/cpu_counter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/mips/include/cpu_counter.h Wed Feb 05 13:57:50 2003 +0000
@@ -0,0 +1,70 @@
+/* $NetBSD: cpu_counter.h,v 1.1 2003/02/05 13:57:54 nakayama Exp $ */
+
+/*
+ * Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Home |
Main Index |
Thread Index |
Old Index