Module Name: src
Committed By: matt
Date: Mon Feb 1 04:17:51 UTC 2010
Modified Files:
src/sys/arch/arc/arc [matt-nb5-mips64]: machdep.c
src/sys/arch/cobalt/cobalt [matt-nb5-mips64]: machdep.c
src/sys/arch/evbmips/adm5120 [matt-nb5-mips64]: machdep.c
src/sys/arch/evbmips/alchemy [matt-nb5-mips64]: machdep.c
src/sys/arch/evbmips/atheros [matt-nb5-mips64]: machdep.c
src/sys/arch/evbmips/malta [matt-nb5-mips64]: machdep.c
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c
src/sys/arch/ews4800mips/ews4800mips [matt-nb5-mips64]: machdep.c
Log Message:
fix fallout from frame/trapframe merger.
To generate a diff of this commit:
cvs rdiff -u -r1.112.10.2 -r1.112.10.3 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.98.10.1 -r1.98.10.2 src/sys/arch/cobalt/cobalt/machdep.c
cvs rdiff -u -r1.6.10.3 -r1.6.10.4 src/sys/arch/evbmips/adm5120/machdep.c
cvs rdiff -u -r1.37.10.3 -r1.37.10.4 src/sys/arch/evbmips/alchemy/machdep.c
cvs rdiff -u -r1.13.10.4 -r1.13.10.5 src/sys/arch/evbmips/atheros/machdep.c
cvs rdiff -u -r1.28.10.3 -r1.28.10.4 src/sys/arch/evbmips/malta/machdep.c
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/arch/evbmips/rmixl/machdep.c
cvs rdiff -u -r1.14.10.2 -r1.14.10.3 \
src/sys/arch/ews4800mips/ews4800mips/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arc/arc/machdep.c
diff -u src/sys/arch/arc/arc/machdep.c:1.112.10.2 src/sys/arch/arc/arc/machdep.c:1.112.10.3
--- src/sys/arch/arc/arc/machdep.c:1.112.10.2 Wed Jan 20 09:04:32 2010
+++ src/sys/arch/arc/arc/machdep.c Mon Feb 1 04:17:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.112.10.2 2010/01/20 09:04:32 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.112.10.3 2010/02/01 04:17:50 matt Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@@ -78,7 +78,7 @@
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.112.10.2 2010/01/20 09:04:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.112.10.3 2010/02/01 04:17:50 matt Exp $");
#include "fs_mfs.h"
#include "opt_ddb.h"
@@ -232,7 +232,6 @@
int i;
paddr_t kernstartpfn, kernendpfn, first, last;
char *kernend;
- vaddr_t v;
#if NKSYMS > 0 || defined(DDB) || defined(LKM)
char *ssym = NULL;
char *esym = NULL;
@@ -497,11 +496,7 @@
/*
* Allocate space for proc0's USPACE.
*/
- v = uvm_pageboot_alloc(USPACE);
- lwp0.l_addr = proc0paddr = (struct user *)v;
- lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
- lwp0.l_addr->u_pcb.pcb_context.val[_L_SR] =
- MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+ mips_init_lwp0_uarea();
}
void
@@ -630,8 +625,7 @@
{
/* take a snap shot before clobbering any registers */
- if (curlwp)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
#ifdef DEBUG
if (panicstr)
Index: src/sys/arch/cobalt/cobalt/machdep.c
diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.1 src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.2
--- src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.1 Mon Sep 7 23:46:45 2009
+++ src/sys/arch/cobalt/cobalt/machdep.c Mon Feb 1 04:17:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.98.10.1 2009/09/07 23:46:45 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.98.10.2 2010/02/01 04:17:50 matt Exp $ */
/*-
* Copyright (c) 2006 Izumi Tsutsui. All rights reserved.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98.10.1 2009/09/07 23:46:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98.10.2 2010/02/01 04:17:50 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -147,7 +147,7 @@
void
mach_init(unsigned int memsize, u_int bim, char *bip)
{
- char *kernend, *v;
+ char *kernend;
u_long first, last;
extern char edata[], end[];
const char *bi_msg;
@@ -317,17 +317,7 @@
/*
* Allocate space for proc0's USPACE.
*/
- v = (char *)uvm_pageboot_alloc(USPACE);
- lwp0.l_addr = proc0paddr = (struct user *)v;
- lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
-#ifdef _LP64
- lwp0.l_md.md_regs->f_regs[_R_SR] = MIPS_SR_KX;
-#endif
- lwp0.l_addr->u_pcb.pcb_context.val[_L_SR] =
-#ifdef _LP64
- MIPS_SR_KX |
-#endif
- MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+ mips_init_lwp0_uarea();
}
/*
@@ -371,8 +361,7 @@
{
/* Take a snapshot before clobbering any registers. */
- if (curlwp)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
if (cold) {
howto |= RB_HALT;
Index: src/sys/arch/evbmips/adm5120/machdep.c
diff -u src/sys/arch/evbmips/adm5120/machdep.c:1.6.10.3 src/sys/arch/evbmips/adm5120/machdep.c:1.6.10.4
--- src/sys/arch/evbmips/adm5120/machdep.c:1.6.10.3 Sun Jan 10 02:48:45 2010
+++ src/sys/arch/evbmips/adm5120/machdep.c Mon Feb 1 04:17:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.6.10.3 2010/01/10 02:48:45 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.6.10.4 2010/02/01 04:17:50 matt Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6.10.3 2010/01/10 02:48:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6.10.4 2010/02/01 04:17:50 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -506,8 +506,7 @@
static int waittime = -1;
/* Take a snapshot before clobbering any registers. */
- if (curproc)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
/* If "always halt" was specified as a boot flag, obey. */
if (boothowto & RB_HALT)
Index: src/sys/arch/evbmips/alchemy/machdep.c
diff -u src/sys/arch/evbmips/alchemy/machdep.c:1.37.10.3 src/sys/arch/evbmips/alchemy/machdep.c:1.37.10.4
--- src/sys/arch/evbmips/alchemy/machdep.c:1.37.10.3 Sun Jan 10 02:48:45 2010
+++ src/sys/arch/evbmips/alchemy/machdep.c Mon Feb 1 04:17:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.37.10.3 2010/01/10 02:48:45 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.37.10.4 2010/02/01 04:17:50 matt Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.37.10.3 2010/01/10 02:48:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.37.10.4 2010/02/01 04:17:50 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -426,8 +426,7 @@
const struct alchemy_board *board;
/* Take a snapshot before clobbering any registers. */
- if (curproc)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
board = board_info();
KASSERT(board != NULL);
Index: src/sys/arch/evbmips/atheros/machdep.c
diff -u src/sys/arch/evbmips/atheros/machdep.c:1.13.10.4 src/sys/arch/evbmips/atheros/machdep.c:1.13.10.5
--- src/sys/arch/evbmips/atheros/machdep.c:1.13.10.4 Wed Jan 20 09:04:33 2010
+++ src/sys/arch/evbmips/atheros/machdep.c Mon Feb 1 04:17:51 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.13.10.4 2010/01/20 09:04:33 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.13.10.5 2010/02/01 04:17:51 matt Exp $ */
/*
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -147,7 +147,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13.10.4 2010/01/20 09:04:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13.10.5 2010/02/01 04:17:51 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -393,8 +393,7 @@
static int waittime = -1;
/* Take a snapshot before clobbering any registers. */
- if (curproc)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
/* If "always halt" was specified as a boot flag, obey. */
if (boothowto & RB_HALT)
Index: src/sys/arch/evbmips/malta/machdep.c
diff -u src/sys/arch/evbmips/malta/machdep.c:1.28.10.3 src/sys/arch/evbmips/malta/machdep.c:1.28.10.4
--- src/sys/arch/evbmips/malta/machdep.c:1.28.10.3 Thu Dec 31 00:54:09 2009
+++ src/sys/arch/evbmips/malta/machdep.c Mon Feb 1 04:17:51 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.28.10.3 2009/12/31 00:54:09 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.28.10.4 2010/02/01 04:17:51 matt Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28.10.3 2009/12/31 00:54:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28.10.4 2010/02/01 04:17:51 matt Exp $");
#include "opt_ddb.h"
#include "opt_execfmt.h"
@@ -388,8 +388,7 @@
{
/* Take a snapshot before clobbering any registers. */
- if (curproc)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
if (cold) {
howto |= RB_HALT;
Index: src/sys/arch/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.18 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.19
--- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.18 Fri Jan 29 00:22:27 2010
+++ src/sys/arch/evbmips/rmixl/machdep.c Mon Feb 1 04:17:51 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.1.2.18 2010/01/29 00:22:27 cliff Exp $ */
+/* $NetBSD: machdep.c,v 1.1.2.19 2010/02/01 04:17:51 matt Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.18 2010/01/29 00:22:27 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.19 2010/02/01 04:17:51 matt Exp $");
#include "opt_ddb.h"
#include "opt_com.h"
@@ -980,8 +980,7 @@
{
/* Take a snapshot before clobbering any registers. */
- if (curproc)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
if (cold) {
howto |= RB_HALT;
Index: src/sys/arch/ews4800mips/ews4800mips/machdep.c
diff -u src/sys/arch/ews4800mips/ews4800mips/machdep.c:1.14.10.2 src/sys/arch/ews4800mips/ews4800mips/machdep.c:1.14.10.3
--- src/sys/arch/ews4800mips/ews4800mips/machdep.c:1.14.10.2 Wed Jan 20 09:04:33 2010
+++ src/sys/arch/ews4800mips/ews4800mips/machdep.c Mon Feb 1 04:17:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.14.10.2 2010/01/20 09:04:33 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.14.10.3 2010/02/01 04:17:50 matt Exp $ */
/*-
* Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14.10.2 2010/01/20 09:04:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14.10.3 2010/02/01 04:17:50 matt Exp $");
#include "opt_ddb.h"
@@ -92,7 +92,6 @@
mach_init(int argc, char *argv[], struct bootinfo *bi)
{
extern char kernel_text[], edata[], end[];
- extern struct user *proc0paddr;
void *v;
int i;
@@ -171,11 +170,7 @@
pmap_bootstrap();
- v = (void *)uvm_pageboot_alloc(USPACE); /* proc0 USPACE */
- lwp0.l_addr = proc0paddr = (struct user *) v;
- lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
- lwp0.l_addr->u_pcb.pcb_context.val[_L_SR] =
- MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+ mips_init_lwp0_uarea();
}
void
@@ -263,8 +258,7 @@
static int waittime = -1;
/* Take a snapshot before clobbering any registers. */
- if (curlwp)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
if (cold) {
howto |= RB_HALT;