Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use cpu_startup_common()
details: https://anonhg.NetBSD.org/src/rev/bad283134b2c
branches: trunk
changeset: 339149:bad283134b2c
user: matt <matt%NetBSD.org@localhost>
date: Tue Jun 30 02:39:03 2015 +0000
description:
Use cpu_startup_common()
diffstat:
sys/arch/algor/algor/machdep.c | 64 ++++-----------------------
sys/arch/arc/arc/machdep.c | 42 +-----------------
sys/arch/evbmips/ingenic/machdep.c | 40 +----------------
sys/arch/evbmips/rmixl/machdep.c | 31 +-----------
sys/arch/hpcmips/hpcmips/machdep.c | 60 +++++---------------------
sys/arch/newsmips/newsmips/machdep.c | 38 +---------------
sys/arch/playstation2/playstation2/machdep.c | 31 +------------
sys/arch/pmax/pmax/machdep.c | 41 +----------------
8 files changed, 42 insertions(+), 305 deletions(-)
diffs (truncated from 541 to 300 lines):
diff -r 575ecaebecf9 -r bad283134b2c sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c Mon Jun 29 17:52:53 2015 +0000
+++ b/sys/arch/algor/algor/machdep.c Tue Jun 30 02:39:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.53 2014/03/24 20:06:31 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.54 2015/06/30 02:39:03 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2014/03/24 20:06:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2015/06/30 02:39:03 matt Exp $");
#include "opt_algor_p4032.h"
#include "opt_algor_p5064.h"
@@ -511,66 +511,24 @@
void
cpu_startup(void)
{
- vaddr_t minaddr, maxaddr;
- char pbuf[9];
-#ifdef DEBUG
- extern int pmapdebug;
- int opmapdebug = pmapdebug;
-
- pmapdebug = 0; /* Shut up pmap debug during bootstrap */
-#endif
-
- /*
- * Good {morning,afternoon,evening,night}.
- */
- printf("%s%s", copyright, version);
- printf("%s\n", cpu_getmodel());
- format_bytes(pbuf, sizeof(pbuf), ptoa(physmem));
- printf("total memory = %s\n", pbuf);
-
/*
* Virtual memory is bootstrapped -- notify the bus spaces
* that memory allocation is now safe.
*/
#if defined(ALGOR_P4032)
- {
- struct p4032_config *acp = &p4032_configuration;
-
- acp->ac_mallocsafe = 1;
- }
-#elif defined(ALGOR_P5064)
- {
- struct p5064_config *acp = &p5064_configuration;
+ struct p4032_config * const acp = &p4032_configuration;
- acp->ac_mallocsafe = 1;
- }
-#elif defined(ALGOR_P6032)
- {
- struct p6032_config *acp = &p6032_configuration;
-
- acp->ac_mallocsafe = 1;
- }
-#endif
+ acp->ac_mallocsafe = 1;
+#elif defined(ALGOR_P5064)
+ struct p5064_config * const acp = &p5064_configuration;
- minaddr = 0;
-
- /*
- * Allocate a submap for physio.
- */
- phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_PHYS_SIZE, 0, false, NULL);
+ acp->ac_mallocsafe = 1;
+#elif defined(ALGOR_P6032)
+ struct p6032_config * const acp = &p6032_configuration;
- /*
- * No need to allocate an mbuf cluster submap. Mbuf clusters
- * are allocate via the pool allocator, and we use KSEG0 to
- * map those pages.
- */
-
-#ifdef DEBUG
- pmapdebug = opmapdebug;
+ acp->ac_mallocsafe = 1;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
- printf("avail memory = %s\n", pbuf);
+ cpu_startup_common();
}
int waittime = -1;
diff -r 575ecaebecf9 -r bad283134b2c sys/arch/arc/arc/machdep.c
--- a/sys/arch/arc/arc/machdep.c Mon Jun 29 17:52:53 2015 +0000
+++ b/sys/arch/arc/arc/machdep.c Tue Jun 30 02:39:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.128 2014/03/24 20:06:31 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.129 2015/06/30 02:39:03 matt Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.128 2014/03/24 20:06:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.129 2015/06/30 02:39:03 matt Exp $");
#include "opt_ddb.h"
#include "opt_ddbparam.h"
@@ -489,48 +489,12 @@
void
cpu_startup(void)
{
- vaddr_t minaddr, maxaddr;
- char pbuf[9];
-#ifdef DEBUG
- extern int pmapdebug;
- int opmapdebug = pmapdebug;
-
- pmapdebug = 0; /* Shut up pmap debug during bootstrap */
-
-#endif
-
#ifdef BOOTINFO_DEBUG
if (bootinfo_msg)
printf(bootinfo_msg);
#endif
- /*
- * Good {morning,afternoon,evening,night}.
- */
- printf("%s%s", copyright, version);
- printf("%s\n", cpu_getmodel());
- format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
- printf("total memory = %s\n", pbuf);
-
- minaddr = 0;
-
- /*
- * Allocate a submap for physio
- */
- phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_PHYS_SIZE, 0, false, NULL);
-
- /*
- * No need to allocate an mbuf cluster submap. Mbuf clusters
- * are allocated via the pool allocator, and we use KSEG to
- * map those pages.
- */
-
-#ifdef DEBUG
- pmapdebug = opmapdebug;
-#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
- printf("avail memory = %s\n", pbuf);
+ cpu_startup_common();
arc_bus_space_malloc_set_safe();
}
diff -r 575ecaebecf9 -r bad283134b2c sys/arch/evbmips/ingenic/machdep.c
--- a/sys/arch/evbmips/ingenic/machdep.c Mon Jun 29 17:52:53 2015 +0000
+++ b/sys/arch/evbmips/ingenic/machdep.c Tue Jun 30 02:39:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.7 2015/06/11 15:38:18 macallan Exp $ */
+/* $NetBSD: machdep.c,v 1.8 2015/06/30 02:39:03 matt Exp $ */
/*-
* Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2015/06/11 15:38:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2015/06/30 02:39:03 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -248,41 +248,7 @@
void
cpu_startup(void)
{
- char pbuf[9];
- vaddr_t minaddr, maxaddr;
-#ifdef DEBUG
- extern int pmapdebug; /* XXX */
- int opmapdebug = pmapdebug;
-
- pmapdebug = 0; /* Shut up pmap debug during bootstrap */
-#endif
-
- /*
- * Good {morning,afternoon,evening,night}.
- */
- printf("%s%s", copyright, version);
- printf("%s\n", cpu_getmodel());
- format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
- printf("total memory = %s\n", pbuf);
-
- minaddr = 0;
- /*
- * Allocate a submap for physio
- */
- phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_PHYS_SIZE, 0, FALSE, NULL);
-
- /*
- * No need to allocate an mbuf cluster submap. Mbuf clusters
- * are allocated via the pool allocator, and we use KSEG to
- * map those pages.
- */
-
-#ifdef DEBUG
- pmapdebug = opmapdebug;
-#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
- printf("avail memory = %s\n", pbuf);
+ cpu_startup_common();
}
void
diff -r 575ecaebecf9 -r bad283134b2c sys/arch/evbmips/rmixl/machdep.c
--- a/sys/arch/evbmips/rmixl/machdep.c Mon Jun 29 17:52:53 2015 +0000
+++ b/sys/arch/evbmips/rmixl/machdep.c Tue Jun 30 02:39:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.16 2015/06/10 22:32:32 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.17 2015/06/30 02:39:03 matt Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2015/06/10 22:32:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2015/06/30 02:39:03 matt Exp $");
#define __INTR_PRIVATE
@@ -978,37 +978,14 @@
void
cpu_startup(void)
{
- vaddr_t minaddr, maxaddr;
- char pbuf[9];
-
- /*
- * Good {morning,afternoon,evening,night}.
- */
- printf("%s%s", copyright, version);
- format_bytes(pbuf, sizeof(pbuf), ctob((uint64_t)physmem));
- printf("total memory = %s\n", pbuf);
-
/*
* Virtual memory is bootstrapped -- notify the bus spaces
* that memory allocation is now safe.
*/
rmixl_configuration.rc_mallocsafe = 1;
- minaddr = 0;
- /*
- * Allocate a submap for physio.
- */
- phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_PHYS_SIZE, 0, FALSE, NULL);
-
- /*
- * (No need to allocate an mbuf cluster submap. Mbuf clusters
- * are allocated via the pool allocator, and we use XKSEG to
- * map those pages.)
- */
-
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
- printf("avail memory = %s\n", pbuf);
+ /* Do the usual stuff */
+ cpu_startup_common();
}
int waittime = -1;
diff -r 575ecaebecf9 -r bad283134b2c sys/arch/hpcmips/hpcmips/machdep.c
--- a/sys/arch/hpcmips/hpcmips/machdep.c Mon Jun 29 17:52:53 2015 +0000
+++ b/sys/arch/hpcmips/hpcmips/machdep.c Tue Jun 30 02:39:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.119 2014/03/26 17:53:36 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.120 2015/06/30 02:39:03 matt Exp $ */
/*-
* Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2014/03/26 17:53:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.120 2015/06/30 02:39:03 matt Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@@ -478,55 +478,19 @@
Home |
Main Index |
Thread Index |
Old Index