Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax - Use lwp_getpcb() on VAX, clean from struct us...
details: https://anonhg.NetBSD.org/src/rev/2b1eaf3c5ce3
branches: trunk
changeset: 749192:2b1eaf3c5ce3
user: rmind <rmind%NetBSD.org@localhost>
date: Sat Nov 21 04:45:39 2009 +0000
description:
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .
diffstat:
sys/arch/vax/include/param.h | 4 +-
sys/arch/vax/include/proc.h | 4 ++-
sys/arch/vax/uba/qv.c | 5 +--
sys/arch/vax/vax/cfl.c | 5 +--
sys/arch/vax/vax/compat_13_machdep.c | 8 ++--
sys/arch/vax/vax/compat_16_machdep.c | 8 ++--
sys/arch/vax/vax/core_machdep.c | 9 +++--
sys/arch/vax/vax/crl.c | 5 +--
sys/arch/vax/vax/db_machdep.c | 53 ++++++++++++++---------------------
sys/arch/vax/vax/disksubr.c | 5 +--
sys/arch/vax/vax/ibcs2_machdep.c | 5 +--
sys/arch/vax/vax/ka6400.c | 9 ++---
sys/arch/vax/vax/ka820.c | 9 ++---
sys/arch/vax/vax/ka88.c | 9 ++---
sys/arch/vax/vax/machdep.c | 32 ++++++++++++--------
sys/arch/vax/vax/multicpu.c | 5 +--
sys/arch/vax/vax/pmap.c | 8 ++--
sys/arch/vax/vax/sig_machdep.c | 8 ++--
sys/arch/vax/vax/syscall.c | 15 +++++----
sys/arch/vax/vax/trap.c | 31 ++++++++++++--------
sys/arch/vax/vax/vm_machdep.c | 41 ++++++++++++++-------------
sys/arch/vax/vsa/asc_vsbus.c | 5 +--
sys/arch/vax/vsa/hdc9224.c | 5 +--
sys/arch/vax/vsa/ncr.c | 5 +--
sys/arch/vax/vsa/vsbus.c | 5 +--
25 files changed, 147 insertions(+), 151 deletions(-)
diffs (truncated from 1118 to 300 lines):
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/include/param.h
--- a/sys/arch/vax/include/param.h Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/include/param.h Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.56 2008/07/02 17:28:57 ad Exp $ */
+/* $NetBSD: param.h,v 1.57 2009/11/21 04:45:39 rmind Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -82,7 +82,7 @@
#define UPAGES 2 /* pages of u-area */
#define USPACE (NBPG*UPAGES)
-#define REDZONEADDR (VAX_NBPG*3) /* Must be > sizeof(struct user) */
+#define REDZONEADDR (VAX_NBPG*3) /* Must be > sizeof(struct pcb) */
#ifndef MSGBUFSIZE
#define MSGBUFSIZE NBPG /* default message buffer size */
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/include/proc.h
--- a/sys/arch/vax/include/proc.h Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/include/proc.h Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.12 2007/12/22 08:29:40 tsutsui Exp $ */
+/* $NetBSD: proc.h,v 1.13 2009/11/21 04:45:39 rmind Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@@ -34,6 +34,8 @@
#ifndef _VAX_PROC_H_
#define _VAX_PROC_H_
+#include <sys/user.h> /* for sizeof(struct user) */
+
/*
* Machine-dependent lwp struct for vax,
*/
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/uba/qv.c
--- a/sys/arch/vax/uba/qv.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/uba/qv.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qv.c,v 1.26 2009/10/26 19:16:58 cegger Exp $ */
+/* $NetBSD: qv.c,v 1.27 2009/11/21 04:45:39 rmind Exp $ */
/*-
* Copyright (c) 1988
@@ -123,7 +123,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qv.c,v 1.26 2009/10/26 19:16:58 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qv.c,v 1.27 2009/11/21 04:45:39 rmind Exp $");
#include "qv.h"
#if NQV > 0
@@ -132,7 +132,6 @@
#include "sys/param.h"
#include "sys/conf.h"
-#include "sys/user.h"
#include "qvioctl.h"
#include "sys/tty.h"
#include "sys/buf.h"
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/vax/cfl.c
--- a/sys/arch/vax/vax/cfl.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/vax/cfl.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfl.c,v 1.18 2008/03/11 05:34:03 matt Exp $ */
+/* $NetBSD: cfl.c,v 1.19 2009/11/21 04:45:39 rmind Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -71,13 +71,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cfl.c,v 1.18 2008/03/11 05:34:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfl.c,v 1.19 2009/11/21 04:45:39 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/buf.h>
#include <machine/cpu.h>
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/vax/compat_13_machdep.c
--- a/sys/arch/vax/vax/compat_13_machdep.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/vax/compat_13_machdep.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_13_machdep.c,v 1.1 2009/01/13 23:56:13 mjf Exp $ */
+/* $NetBSD: compat_13_machdep.c,v 1.2 2009/11/21 04:45:39 rmind Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.1 2009/01/13 23:56:13 mjf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.2 2009/11/21 04:45:39 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -97,7 +97,6 @@
#include <sys/systm.h>
#include <sys/extent.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <sys/kernel.h>
@@ -144,12 +143,13 @@
syscallarg(struct sigcontext13 *) sigcntxp;
} */
struct proc *p = l->l_proc;
+ struct pcb *pcb = lwp_getpcb(l);
struct trapframe *scf;
struct sigcontext13 *ucntx;
struct sigcontext13 ksc;
sigset_t mask;
- scf = l->l_addr->u_pcb.framep;
+ scf = pcb->framep;
ucntx = SCARG(uap, sigcntxp);
if (copyin((void *)ucntx, (void *)&ksc, sizeof(struct sigcontext)))
return EINVAL;
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/vax/compat_16_machdep.c
--- a/sys/arch/vax/vax/compat_16_machdep.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/vax/compat_16_machdep.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_16_machdep.c,v 1.1 2009/01/13 23:56:13 mjf Exp $ */
+/* $NetBSD: compat_16_machdep.c,v 1.2 2009/11/21 04:45:39 rmind Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.1 2009/01/13 23:56:13 mjf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.2 2009/11/21 04:45:39 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -98,7 +98,6 @@
#include <sys/systm.h>
#include <sys/extent.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <sys/kernel.h>
@@ -142,11 +141,12 @@
syscallarg(struct sigcontext *) sigcntxp;
} */
struct proc *p = l->l_proc;
+ struct pcb *pcb = lwp_getpcb(l);
struct trapframe *scf;
struct sigcontext *ucntx;
struct sigcontext ksc;
- scf = l->l_addr->u_pcb.framep;
+ scf = pcb->framep;
ucntx = SCARG(uap, sigcntxp);
if (copyin((void *)ucntx, (void *)&ksc, sizeof(struct sigcontext)))
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/vax/core_machdep.c
--- a/sys/arch/vax/vax/core_machdep.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/vax/core_machdep.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core_machdep.c,v 1.2 2009/08/15 23:45:01 matt Exp $ */
+/* $NetBSD: core_machdep.c,v 1.3 2009/11/21 04:45:39 rmind Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -31,13 +31,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.2 2009/08/15 23:45:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.3 2009/11/21 04:45:39 rmind Exp $");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/exec.h>
#include <sys/vnode.h>
#include <sys/core.h>
@@ -69,6 +68,7 @@
{
struct md_coredump md_core;
struct coreseg cseg;
+ struct pcb *pcb;
int error;
if (iocookie == NULL) {
@@ -80,7 +80,8 @@
return 0;
}
- md_core.md_tf = *(struct trapframe *)l->l_addr->u_pcb.framep; /*XXX*/
+ pcb = lwp_getpcb(l);
+ md_core.md_tf = *(struct trapframe *)pcb->framep; /*XXX*/
CORE_SETMAGIC(cseg, CORESEGMAGIC, MID_MACHINE, CORE_CPU);
cseg.c_addr = 0;
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/vax/crl.c
--- a/sys/arch/vax/vax/crl.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/vax/crl.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crl.c,v 1.26 2008/12/16 22:35:27 christos Exp $ */
+/* $NetBSD: crl.c,v 1.27 2009/11/21 04:45:39 rmind Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -36,13 +36,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crl.c,v 1.26 2008/12/16 22:35:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crl.c,v 1.27 2009/11/21 04:45:39 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/buf.h>
#include <machine/cpu.h>
diff -r 4afa979fa0c7 -r 2b1eaf3c5ce3 sys/arch/vax/vax/db_machdep.c
--- a/sys/arch/vax/vax/db_machdep.c Sat Nov 21 04:16:51 2009 +0000
+++ b/sys/arch/vax/vax/db_machdep.c Sat Nov 21 04:45:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.52 2009/10/26 19:16:58 cegger Exp $ */
+/* $NetBSD: db_machdep.c,v 1.53 2009/11/21 04:45:39 rmind Exp $ */
/*
* :set tabs=4
@@ -39,14 +39,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.52 2009/10/26 19:16:58 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.53 2009/11/21 04:45:39 rmind Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
#include <sys/param.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/reboot.h>
#include <sys/systm.h> /* just for boothowto --eichin */
@@ -408,10 +407,9 @@
const char *modif, /* pointer to flag modifier 't' */
void (*pr)(const char *, ...)) /* Print function */
{
- extern struct user *proc0paddr;
struct lwp *l = curlwp;
struct proc *p = l->l_proc;
- struct user *uarea;
+ struct pcb *pcb;
int trace_proc;
pid_t curpid;
const char *s;
@@ -484,38 +482,36 @@
#endif
}
if (p == NULL) {
- uarea = proc0paddr;
+ pcb = lwp_getpcb(&lwp0);
curpid = 0;
} else {
- uarea = l->l_addr;
+ pcb = lwp_getpcb(l);
curpid = p->p_pid;
}
(*pr)("Process %d.%d\n", curpid, l->l_lid);
(*pr)(" PCB contents:\n");
- (*pr)(" KSP = 0x%x\n", (unsigned int)(uarea->u_pcb.KSP));
- (*pr)(" ESP = 0x%x\n", (unsigned int)(uarea->u_pcb.ESP));
- (*pr)(" SSP = 0x%x\n", (unsigned int)(uarea->u_pcb.SSP));
- (*pr)(" USP = 0x%x\n", (unsigned int)(uarea->u_pcb.USP));
+ (*pr)(" KSP = 0x%x\n", (unsigned int)(pcb->KSP));
+ (*pr)(" ESP = 0x%x\n", (unsigned int)(pcb->ESP));
+ (*pr)(" SSP = 0x%x\n", (unsigned int)(pcb->SSP));
+ (*pr)(" USP = 0x%x\n", (unsigned int)(pcb->USP));
(*pr)(" R[00] = 0x%08x R[06] = 0x%08x\n",
- (unsigned int)(uarea->u_pcb.R[0]), (unsigned int)(uarea->u_pcb.R[6]));
+ (unsigned int)(pcb->R[0]), (unsigned int)(pcb->R[6]));
(*pr)(" R[01] = 0x%08x R[07] = 0x%08x\n",
- (unsigned int)(uarea->u_pcb.R[1]), (unsigned int)(uarea->u_pcb.R[7]));
+ (unsigned int)(pcb->R[1]), (unsigned int)(pcb->R[7]));
(*pr)(" R[02] = 0x%08x R[08] = 0x%08x\n",
- (unsigned int)(uarea->u_pcb.R[2]), (unsigned int)(uarea->u_pcb.R[8]));
Home |
Main Index |
Thread Index |
Old Index