Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbppc Move common global variables, i.e., phys_map...



details:   https://anonhg.NetBSD.org/src/rev/832e7256eafa
branches:  trunk
changeset: 954141:832e7256eafa
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Mar 30 02:41:14 2021 +0000

description:
Move common global variables, i.e., phys_map, machine, and machine_arch to
evbppc/evbppc_machdep.c (bad naming; used only for 4xx boards).

diffstat:

 sys/arch/evbppc/conf/files.obs405       |   3 +-
 sys/arch/evbppc/evbppc/evbppc_machdep.c |  15 +++++++++-
 sys/arch/evbppc/explora/machdep.c       |   9 +-----
 sys/arch/evbppc/obs405/obs405_machdep.c |  46 ---------------------------------
 sys/arch/evbppc/virtex/machdep.c        |  15 +---------
 sys/arch/evbppc/walnut/machdep.c        |  15 +---------
 6 files changed, 20 insertions(+), 83 deletions(-)

diffs (206 lines):

diff -r 721bb2133dad -r 832e7256eafa sys/arch/evbppc/conf/files.obs405
--- a/sys/arch/evbppc/conf/files.obs405 Tue Mar 30 02:27:00 2021 +0000
+++ b/sys/arch/evbppc/conf/files.obs405 Tue Mar 30 02:41:14 2021 +0000
@@ -1,11 +1,10 @@
-#      $NetBSD: files.obs405,v 1.22 2021/03/29 13:38:31 rin Exp $
+#      $NetBSD: files.obs405,v 1.23 2021/03/30 02:41:14 rin Exp $
 #
 # obs405-specific configuration info
 
 file   arch/powerpc/ibm4xx/ibm4xx_autoconf.c
 file   arch/powerpc/ibm4xx/ibm40x_machdep.c
 file   arch/powerpc/ibm4xx/ibm4xx_machdep.c
-file   arch/evbppc/obs405/obs405_machdep.c
 
 # Memory Disk for install kernel
 file   dev/md_root.c                           memory_disk_hooks
diff -r 721bb2133dad -r 832e7256eafa sys/arch/evbppc/evbppc/evbppc_machdep.c
--- a/sys/arch/evbppc/evbppc/evbppc_machdep.c   Tue Mar 30 02:27:00 2021 +0000
+++ b/sys/arch/evbppc/evbppc/evbppc_machdep.c   Tue Mar 30 02:41:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: evbppc_machdep.c,v 1.13 2011/07/01 20:46:39 dyoung Exp $       */
+/*     $NetBSD: evbppc_machdep.c,v 1.14 2021/03/30 02:41:14 rin Exp $  */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: evbppc_machdep.c,v 1.13 2011/07/01 20:46:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evbppc_machdep.c,v 1.14 2021/03/30 02:41:14 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,6 +81,17 @@
 #include <machine/pmap.h>
 
 /*
+ * Global variables used here and there.
+ */
+struct vm_map *phys_map = NULL;
+
+/*
+ * XXX This should probably be in autoconf.
+ */
+char machine[] = MACHINE;
+char machine_arch[] = MACHINE_ARCH;
+
+/*
  * ibm4xx kernels need to set module_machine to this for modules to work.
  */
 char module_machine_ibm4xx[] = "powerpc-ibm4xx";
diff -r 721bb2133dad -r 832e7256eafa sys/arch/evbppc/explora/machdep.c
--- a/sys/arch/evbppc/explora/machdep.c Tue Mar 30 02:27:00 2021 +0000
+++ b/sys/arch/evbppc/explora/machdep.c Tue Mar 30 02:41:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.47 2021/03/30 01:33:50 rin Exp $ */
+/*     $NetBSD: machdep.c,v 1.48 2021/03/30 02:41:14 rin Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.47 2021/03/30 01:33:50 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48 2021/03/30 02:41:14 rin Exp $");
 
 #include "opt_explora.h"
 #include "opt_modular.h"
@@ -74,13 +74,8 @@
 
 #define TLB_PG_SIZE    (16*1024*1024)
 
-char machine[] = MACHINE;              /* from <machine/param.h> */
-char machine_arch[] = MACHINE_ARCH;    /* from <machine/param.h> */
-
 static const unsigned int cpuspeed = 66000000;
 
-struct vm_map *phys_map = NULL;
-
 void           initppc(vaddr_t, vaddr_t);
 
 void
diff -r 721bb2133dad -r 832e7256eafa sys/arch/evbppc/obs405/obs405_machdep.c
--- a/sys/arch/evbppc/obs405/obs405_machdep.c   Tue Mar 30 02:27:00 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*     $NetBSD: obs405_machdep.c,v 1.6 2011/06/18 06:44:26 matt Exp $  */
-
-/*
- * Copyright (c) 2004 Shigeyuki Fukushima.
- * 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.
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obs405_machdep.c,v 1.6 2011/06/18 06:44:26 matt Exp $");
-
-#include <sys/param.h>
-
-/*
- * Machine-dependent global variables
- *   phys_map:         sys/uvm/uvm_extern.h
- *   machine:          sys/sys/systm.h
- *   machine_arch:     sys/sys/systm.h
- */
-struct vm_map *phys_map = NULL;
-char machine[] = MACHINE;              /* from <machine/param.h> */
-char machine_arch[] = MACHINE_ARCH;    /* from <machine/param.h> */
diff -r 721bb2133dad -r 832e7256eafa sys/arch/evbppc/virtex/machdep.c
--- a/sys/arch/evbppc/virtex/machdep.c  Tue Mar 30 02:27:00 2021 +0000
+++ b/sys/arch/evbppc/virtex/machdep.c  Tue Mar 30 02:41:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.28 2021/03/30 01:33:50 rin Exp $ */
+/*     $NetBSD: machdep.c,v 1.29 2021/03/30 02:41:14 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2021/03/30 01:33:50 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2021/03/30 02:41:14 rin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -88,17 +88,6 @@
 #include <sys/kgdb.h>
 #endif
 
-/*
- * Global variables used here and there
- */
-struct vm_map *phys_map = NULL;
-
-/*
- * This should probably be in autoconf!                                XXX
- */
-char machine[] = MACHINE;              /* from <machine/param.h> */
-char machine_arch[] = MACHINE_ARCH;    /* from <machine/param.h> */
-
 void initppc(vaddr_t, vaddr_t);
 
 /* BSS segment start & end. */
diff -r 721bb2133dad -r 832e7256eafa sys/arch/evbppc/walnut/machdep.c
--- a/sys/arch/evbppc/walnut/machdep.c  Tue Mar 30 02:27:00 2021 +0000
+++ b/sys/arch/evbppc/walnut/machdep.c  Tue Mar 30 02:41:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.65 2021/03/30 02:04:44 rin Exp $ */
+/*     $NetBSD: machdep.c,v 1.66 2021/03/30 02:41:15 rin Exp $ */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.65 2021/03/30 02:04:44 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.66 2021/03/30 02:41:15 rin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -128,17 +128,6 @@
 
 #define TLB_PG_SIZE    (16*1024*1024)
 
-/*
- * Global variables used here and there
- */
-struct vm_map *phys_map = NULL;
-
-/*
- * This should probably be in autoconf!                                XXX
- */
-char machine[] = MACHINE;              /* from <machine/param.h> */
-char machine_arch[] = MACHINE_ARCH;    /* from <machine/param.h> */
-
 void initppc(vaddr_t, vaddr_t, char *, void *);
 
 void



Home | Main Index | Thread Index | Old Index