Module Name: src
Committed By: matt
Date: Mon Feb 1 04:18:32 UTC 2010
Modified Files:
src/sys/arch/hpcmips/hpcmips [matt-nb5-mips64]: machdep.c
src/sys/arch/hpcmips/tx [matt-nb5-mips64]: tx39.c
src/sys/arch/mipsco/mipsco [matt-nb5-mips64]: machdep.c mips_3x30.c
src/sys/arch/newsmips/newsmips [matt-nb5-mips64]: machdep.c news3400.c
src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: machdep.c
src/sys/arch/sgimips/sgimips [matt-nb5-mips64]: cpu.c machdep.c
Log Message:
fix fallout from frame/trapframe merger.
To generate a diff of this commit:
cvs rdiff -u -r1.96.10.3 -r1.96.10.4 src/sys/arch/hpcmips/hpcmips/machdep.c
cvs rdiff -u -r1.39 -r1.39.18.1 src/sys/arch/hpcmips/tx/tx39.c
cvs rdiff -u -r1.58.10.1 -r1.58.10.2 src/sys/arch/mipsco/mipsco/machdep.c
cvs rdiff -u -r1.10 -r1.10.18.1 src/sys/arch/mipsco/mipsco/mips_3x30.c
cvs rdiff -u -r1.98.10.2 -r1.98.10.3 src/sys/arch/newsmips/newsmips/machdep.c
cvs rdiff -u -r1.19 -r1.19.36.1 src/sys/arch/newsmips/newsmips/news3400.c
cvs rdiff -u -r1.38.10.5 -r1.38.10.6 src/sys/arch/sbmips/sbmips/machdep.c
cvs rdiff -u -r1.21.36.1 -r1.21.36.2 src/sys/arch/sgimips/sgimips/cpu.c
cvs rdiff -u -r1.121.8.3 -r1.121.8.4 src/sys/arch/sgimips/sgimips/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/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.3 src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.4
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.3 Thu Jan 14 00:50:01 2010
+++ src/sys/arch/hpcmips/hpcmips/machdep.c Mon Feb 1 04:18:30 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.96.10.3 2010/01/14 00:50:01 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.96.10.4 2010/02/01 04:18:30 matt Exp $ */
/*-
* Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -108,7 +108,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96.10.3 2010/01/14 00:50:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96.10.4 2010/02/01 04:18:30 matt Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@@ -577,8 +577,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/hpcmips/tx/tx39.c
diff -u src/sys/arch/hpcmips/tx/tx39.c:1.39 src/sys/arch/hpcmips/tx/tx39.c:1.39.18.1
--- src/sys/arch/hpcmips/tx/tx39.c:1.39 Mon Apr 28 20:23:21 2008
+++ src/sys/arch/hpcmips/tx/tx39.c Mon Feb 1 04:18:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tx39.c,v 1.39 2008/04/28 20:23:21 martin Exp $ */
+/* $NetBSD: tx39.c,v 1.39.18.1 2010/02/01 04:18:31 matt Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.39 2008/04/28 20:23:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.39.18.1 2010/02/01 04:18:31 matt Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@@ -44,7 +44,6 @@
#include <mips/cache.h>
-#include <machine/locore.h> /* cpu_id */
#include <machine/bootinfo.h> /* bootinfo */
#include <machine/sysconf.h> /* platform */
@@ -114,7 +113,7 @@
platform.reboot = tx_reboot;
- model = MIPS_PRID_REV(cpu_id);
+ model = MIPS_PRID_REV(mips_options.mips_cpu_id);
switch (model) {
default:
Index: src/sys/arch/mipsco/mipsco/machdep.c
diff -u src/sys/arch/mipsco/mipsco/machdep.c:1.58.10.1 src/sys/arch/mipsco/mipsco/machdep.c:1.58.10.2
--- src/sys/arch/mipsco/mipsco/machdep.c:1.58.10.1 Mon Sep 7 23:46:46 2009
+++ src/sys/arch/mipsco/mipsco/machdep.c Mon Feb 1 04:18:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.58.10.1 2009/09/07 23:46:46 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.58.10.2 2010/02/01 04:18:31 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58.10.1 2009/09/07 23:46:46 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58.10.2 2010/02/01 04:18:31 matt Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@@ -234,7 +234,7 @@
char *bip;
{
u_long first, last;
- char *kernend, *v;
+ char *kernend;
char *cp;
int i, howto;
extern char edata[], end[];
@@ -373,11 +373,7 @@
/*
* Allocate space for proc0's USPACE.
*/
- v = (void *)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();
/*
* Set up interrupt handling and I/O addresses.
@@ -477,8 +473,7 @@
char *bootstr;
{
/* 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/mipsco/mipsco/mips_3x30.c
diff -u src/sys/arch/mipsco/mipsco/mips_3x30.c:1.10 src/sys/arch/mipsco/mipsco/mips_3x30.c:1.10.18.1
--- src/sys/arch/mipsco/mipsco/mips_3x30.c:1.10 Mon Apr 28 20:23:28 2008
+++ src/sys/arch/mipsco/mipsco/mips_3x30.c Mon Feb 1 04:18:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_3x30.c,v 1.10 2008/04/28 20:23:28 martin Exp $ */
+/* $NetBSD: mips_3x30.c,v 1.10.18.1 2010/02/01 04:18:31 matt Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_3x30.c,v 1.10 2008/04/28 20:23:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_3x30.c,v 1.10.18.1 2010/02/01 04:18:31 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,7 +45,7 @@
#include <machine/mainboard.h>
#include <machine/sysconf.h>
-extern void MachFPInterrupt (u_int, u_int, u_int, struct frame *);
+void MachFPInterrupt (u_int, u_int, vaddr_t, struct trapframe *);
/* Local functions */
void pizazz_init (void);
@@ -113,15 +113,15 @@
_splset((status & ~cause & MIPS_HARD_INT_MASK) | MIPS_SR_INT_IE);
+#if !defined(NOFPU)
/* FPU nofiticaition */
if (ipending & INT_MASK_FPU) {
if (!USERMODE(status))
panic("kernel used FPU: PC %x, CR %x, SR %x",
pc, cause, status);
-#if !defined(SOFTFLOAT)
- MachFPInterrupt(status, cause, pc, curlwp->l_md.md_regs);
-#endif
+ MachFPInterrupt(status, cause, pc, curlwp->l_md.md_utf);
}
+#endif
}
/*
Index: src/sys/arch/newsmips/newsmips/machdep.c
diff -u src/sys/arch/newsmips/newsmips/machdep.c:1.98.10.2 src/sys/arch/newsmips/newsmips/machdep.c:1.98.10.3
--- src/sys/arch/newsmips/newsmips/machdep.c:1.98.10.2 Wed Jan 20 09:04:34 2010
+++ src/sys/arch/newsmips/newsmips/machdep.c Mon Feb 1 04:18:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.98.10.2 2010/01/20 09:04:34 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.98.10.3 2010/02/01 04:18:31 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98.10.2 2010/01/20 09:04:34 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98.10.3 2010/02/01 04:18:31 matt Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@@ -218,7 +218,7 @@
mach_init(int x_boothowto, int x_bootdev, int x_bootname, int x_maxmem)
{
u_long first, last;
- char *kernend, *v;
+ char *kernend;
struct btinfo_magic *bi_magic;
struct btinfo_bootarg *bi_arg;
struct btinfo_systype *bi_systype;
@@ -378,11 +378,7 @@
/*
* Allocate space for lwp0'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;
- lwp0.l_addr->u_pcb.pcb_context.val[_L_SR] =
- MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+ mips_init_lwp0_uarea();
/*
* Determine what model of computer we are running on.
@@ -534,8 +530,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/newsmips/newsmips/news3400.c
diff -u src/sys/arch/newsmips/newsmips/news3400.c:1.19 src/sys/arch/newsmips/newsmips/news3400.c:1.19.36.1
--- src/sys/arch/newsmips/newsmips/news3400.c:1.19 Mon Dec 3 15:34:05 2007
+++ src/sys/arch/newsmips/newsmips/news3400.c Mon Feb 1 04:18:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: news3400.c,v 1.19 2007/12/03 15:34:05 ad Exp $ */
+/* $NetBSD: news3400.c,v 1.19.36.1 2010/02/01 04:18:31 matt Exp $ */
/*-
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: news3400.c,v 1.19 2007/12/03 15:34:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: news3400.c,v 1.19.36.1 2010/02/01 04:18:31 matt Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -42,8 +42,8 @@
#include <newsmips/dev/hbvar.h>
-#if !defined(SOFTFLOAT)
-extern void MachFPInterrupt(unsigned, unsigned, unsigned, struct frame *);
+#if !defined(FPEMUL)
+void MachFPInterrupt(unsigned, unsigned, unsigned, struct trapframe *);
#endif
int news3400_badaddr(void *, u_int);
@@ -127,8 +127,8 @@
pc, cause, status);
intrcnt[FPU_INTR]++;
-#if !defined(SOFTFLOAT)
- MachFPInterrupt(status, cause, pc, curlwp->l_md.md_regs);
+#if !defined(FPEMUL)
+ MachFPInterrupt(status, cause, pc, curlwp->l_md.md_utf);
#endif
}
Index: src/sys/arch/sbmips/sbmips/machdep.c
diff -u src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.5 src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.6
--- src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.5 Thu Dec 31 00:54:09 2009
+++ src/sys/arch/sbmips/sbmips/machdep.c Mon Feb 1 04:18:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.38.10.5 2009/12/31 00:54:09 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.38.10.6 2010/02/01 04:18:31 matt Exp $ */
/*
* Copyright 2000, 2001
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38.10.5 2009/12/31 00:54:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38.10.6 2010/02/01 04:18:31 matt Exp $");
#include "opt_ddb.h"
#include "opt_ddbparam.h" /* for SYMTAB_SPACE */
@@ -387,8 +387,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/sgimips/sgimips/cpu.c
diff -u src/sys/arch/sgimips/sgimips/cpu.c:1.21.36.1 src/sys/arch/sgimips/sgimips/cpu.c:1.21.36.2
--- src/sys/arch/sgimips/sgimips/cpu.c:1.21.36.1 Wed Jan 13 21:16:14 2010
+++ src/sys/arch/sgimips/sgimips/cpu.c Mon Feb 1 04:18:32 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.21.36.1 2010/01/13 21:16:14 matt Exp $ */
+/* $NetBSD: cpu.c,v 1.21.36.2 2010/02/01 04:18:32 matt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.21.36.1 2010/01/13 21:16:14 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.21.36.2 2010/02/01 04:18:32 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -59,7 +59,7 @@
void *cpu_intr_establish(int, int, int (*func)(void *), void *);
void mips1_fpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
-extern void MachFPInterrupt(u_int32_t, u_int32_t, u_int32_t, struct frame *);
+void MachFPInterrupt(u_int32_t, u_int32_t, u_int32_t, struct trapframe *);
static struct evcnt mips_int0_evcnt =
EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 0");
@@ -186,7 +186,7 @@
panic("kernel used FPU: PC 0x%08x, CR 0x%08x, SR 0x%08x",
pc, cause, status);
-#if !defined(NOFPU) && !defined(SOFTFLOAT)
- MachFPInterrupt(status, cause, pc, curlwp->l_md.md_regs);
+#if !defined(NOFPU) && !defined(FPEMUL)
+ MachFPInterrupt(status, cause, pc, curlwp->l_md.md_utf);
#endif
}
Index: src/sys/arch/sgimips/sgimips/machdep.c
diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.121.8.3 src/sys/arch/sgimips/sgimips/machdep.c:1.121.8.4
--- src/sys/arch/sgimips/sgimips/machdep.c:1.121.8.3 Wed Jan 20 09:04:32 2010
+++ src/sys/arch/sgimips/sgimips/machdep.c Mon Feb 1 04:18:32 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.121.8.3 2010/01/20 09:04:32 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.121.8.4 2010/02/01 04:18:32 matt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.121.8.3 2010/01/20 09:04:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.121.8.4 2010/02/01 04:18:32 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -243,7 +243,6 @@
{
paddr_t first, last;
int firstpfn, lastpfn;
- void *v;
vsize_t size;
struct arcbios_mem *mem;
const char *cpufreq, *osload;
@@ -689,17 +688,7 @@
/*
* Allocate space for proc0's USPACE.
*/
- v = (void *)uvm_pageboot_alloc(USPACE);
- lwp0.l_addr = proc0paddr = (struct user *)v;
- lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
-#ifdef _LP64
- lwp0.l_md.md_regs->f_regs[_R_SR] = MIPS_SR_KX;
-#endif
- proc0paddr->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();
}
void
@@ -761,8 +750,7 @@
cpu_reboot(int howto, char *bootstr)
{
/* Take a snapshot before clobbering any registers. */
- if (curlwp)
- savectx((struct user *)curpcb);
+ savectx(curlwp->l_addr);
if (cold) {
howto |= RB_HALT;