Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips/alchemy Convert to use merged mips cpu_sysc...



details:   https://anonhg.NetBSD.org/src/rev/24ae576a8522
branches:  trunk
changeset: 534870:24ae576a8522
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Aug 05 01:33:36 2002 +0000

description:
Convert to use merged mips cpu_sysctl().

diffstat:

 sys/arch/evbmips/alchemy/machdep.c |  40 +++++--------------------------------
 1 files changed, 6 insertions(+), 34 deletions(-)

diffs (82 lines):

diff -r 1c266720cf3f -r 24ae576a8522 sys/arch/evbmips/alchemy/machdep.c
--- a/sys/arch/evbmips/alchemy/machdep.c        Mon Aug 05 01:16:59 2002 +0000
+++ b/sys/arch/evbmips/alchemy/machdep.c        Mon Aug 05 01:33:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.1 2002/07/29 16:22:57 simonb Exp $ */
+/* $NetBSD: machdep.c,v 1.2 2002/08/05 01:33:36 simonb Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1 2002/07/29 16:22:57 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2002/08/05 01:33:36 simonb Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -67,8 +67,6 @@
 
 #include <uvm/uvm_extern.h>
 
-#include <sys/sysctl.h>
-
 #include <dev/cons.h>
 
 #ifdef DDB
@@ -96,9 +94,7 @@
 #endif /* NAUCOM > 0 */
 
 /* The following are used externally (sysctl_hw). */
-char   machine[] = MACHINE;            /* from <machine/param.h> */
-char   machine_arch[] = MACHINE_ARCH;  /* from <machine/param.h> */
-char   cpu_model[64] = "Alchemy Semiconductor Pb1000";
+extern char    cpu_model[];
 
 struct user *proc0paddr;
 
@@ -139,6 +135,9 @@
        kernend = (caddr_t)mips_round_page(end);
        memset(edata, 0, kernend - (caddr_t)edata);
 
+       /* set cpu model info for sysctl_hw */
+       strcpy(cpu_model, "Alchemy Semiconductor Pb1000");
+
        /* save the yamon environment pointer */
        yamon_envp = envp;
 
@@ -415,33 +414,6 @@
                panic("Cannot create board info database");
 }
 
-/*
- * Machine-dependent system variables.
- */
-int
-cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
-    void *newp, size_t newlen, struct proc *p)
-{
-       dev_t consdev;
-
-       /* All sysctl names at this level are terminal. */
-       if (namelen != 1)
-               return (ENOTDIR);               /* overloaded */
-
-       switch (name[0]) {
-       case CPU_CONSDEV:
-               if (cn_tab != NULL)
-                       consdev = cn_tab->cn_dev;
-               else
-                       consdev = NODEV;
-               return (sysctl_rdstruct(oldp, oldlenp, newp, &consdev,
-                   sizeof consdev));
-       default:
-               return (EOPNOTSUPP);
-       }
-       /* NOTREACHED */
-}
-
 void
 cpu_reboot(int howto, char *bootstr)
 {



Home | Main Index | Thread Index | Old Index