Source-Changes-HG archive

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

[src/trunk]: src/sys Merge the nathanw_sa branch.



details:   https://anonhg.NetBSD.org/src/rev/50ddeac0236a
branches:  trunk
changeset: 541738:50ddeac0236a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jan 18 06:55:21 2003 +0000

description:
Merge the nathanw_sa branch.

diffstat:

 sys/arch/sparc64/include/Makefile            |    4 +-
 sys/arch/sparc64/include/cpu.h               |   17 +-
 sys/arch/sparc64/include/mcontext.h          |    3 +
 sys/arch/sparc64/include/netbsd32_machdep.h  |    4 +-
 sys/arch/sparc64/include/pmap.h              |    4 +-
 sys/arch/sparc64/include/proc.h              |   16 +-
 sys/arch/sparc64/include/svr4_32_machdep.h   |    4 +-
 sys/arch/sparc64/include/svr4_machdep.h      |    4 +-
 sys/arch/sparc64/sparc64/clock.c             |    6 +-
 sys/arch/sparc64/sparc64/compat_13_machdep.c |   18 +-
 sys/arch/sparc64/sparc64/db_interface.c      |   86 ++++--
 sys/arch/sparc64/sparc64/db_trace.c          |   22 +-
 sys/arch/sparc64/sparc64/emul.c              |   44 +-
 sys/arch/sparc64/sparc64/genassym.c          |   19 +-
 sys/arch/sparc64/sparc64/genassym.cf         |   25 +-
 sys/arch/sparc64/sparc64/kgdb_stub.c         |    6 +-
 sys/arch/sparc64/sparc64/locore.s            |  318 ++++++++++++++---------
 sys/arch/sparc64/sparc64/machdep.c           |  278 +++++++++++++++++++-
 sys/arch/sparc64/sparc64/mem.c               |    4 +-
 sys/arch/sparc64/sparc64/netbsd32_machdep.c  |  311 ++++++++++++++++++++---
 sys/arch/sparc64/sparc64/pmap.c              |   18 +-
 sys/arch/sparc64/sparc64/process_machdep.c   |   56 ++--
 sys/arch/sparc64/sparc64/sunos32_machdep.c   |   40 +-
 sys/arch/sparc64/sparc64/sunos_machdep.c     |   23 +-
 sys/arch/sparc64/sparc64/svr4_32_machdep.c   |   59 ++--
 sys/arch/sparc64/sparc64/svr4_machdep.c      |   63 ++--
 sys/arch/sparc64/sparc64/sys_machdep.c       |    7 +-
 sys/arch/sparc64/sparc64/trap.c              |  352 +++++++++++++++++---------
 sys/arch/sparc64/sparc64/vm_machdep.c        |  190 ++++++++------
 sys/arch/sun2/include/Makefile               |    4 +-
 sys/arch/sun2/include/mcontext.h             |    3 +
 sys/arch/sun2/sun2/genassym.cf               |   35 +-
 sys/arch/sun2/sun2/locore.s                  |  207 +---------------
 sys/arch/sun2/sun2/locore2.c                 |   14 +-
 sys/arch/sun2/sun2/machdep.c                 |   15 +-
 sys/arch/sun2/sun2/pmap.c                    |   26 +-
 sys/arch/sun2/sun2/sys_machdep.c             |    7 +-
 sys/arch/sun2/sun2/trap.c                    |   69 ++--
 sys/arch/sun3/include/Makefile               |    4 +-
 sys/arch/sun3/include/cpu.h                  |    7 +-
 sys/arch/sun3/include/mcontext.h             |    3 +
 sys/arch/sun3/sun3/genassym.cf               |   33 +-
 sys/arch/sun3/sun3/locore.s                  |  250 +------------------
 sys/arch/sun3/sun3/locore2.c                 |   14 +-
 sys/arch/sun3/sun3/machdep.c                 |   20 +-
 sys/arch/sun3/sun3/pmap.c                    |   26 +-
 sys/arch/sun3/sun3/sys_machdep.c             |    7 +-
 sys/arch/sun3/sun3/trap.c                    |   77 +++--
 sys/arch/sun3/sun3x/genassym.cf              |   33 +-
 sys/arch/sun3/sun3x/locore.s                 |  255 +------------------
 sys/arch/sun3/sun3x/locore2.c                |   14 +-
 sys/arch/sun3/sun3x/machdep.c                |   20 +-
 sys/arch/sun3/sun3x/pmap.c                   |   24 +-
 sys/arch/sun68k/include/cpu.h                |    6 +-
 sys/arch/vax/include/Makefile                |    4 +-
 sys/arch/vax/include/cpu.h                   |    8 +-
 sys/arch/vax/include/ibcs2_machdep.h         |    4 +-
 sys/arch/vax/include/macros.h                |   16 +-
 sys/arch/vax/include/mcontext.h              |   75 +++++
 sys/arch/vax/include/proc.h                  |   21 +-
 sys/arch/vax/include/signal.h                |   26 +-
 sys/arch/vax/vax/db_machdep.c                |   17 +-
 sys/arch/vax/vax/disksubr.c                  |   11 +-
 sys/arch/vax/vax/genassym.cf                 |   18 +-
 sys/arch/vax/vax/ibcs2_machdep.c             |    8 +-
 sys/arch/vax/vax/ka820.c                     |    6 +-
 sys/arch/vax/vax/locore.c                    |    9 +-
 sys/arch/vax/vax/machdep.c                   |  166 ++++++++++--
 sys/arch/vax/vax/pmap.c                      |   84 +++---
 sys/arch/vax/vax/subr.S                      |   81 ++++-
 sys/arch/vax/vax/trap.c                      |  107 +++++--
 sys/arch/vax/vax/vm_machdep.c                |   63 +++-
 sys/arch/vax/vsa/vsbus.c                     |   12 +-
 sys/arch/x68k/include/Makefile               |    6 +-
 sys/arch/x68k/include/cpu.h                  |    7 +-
 sys/arch/x68k/include/mcontext.h             |    3 +
 sys/arch/x68k/include/param.h                |    4 +-
 sys/arch/x68k/x68k/genassym.cf               |   36 +-
 sys/arch/x68k/x68k/locore.s                  |  303 +----------------------
 sys/arch/x68k/x68k/machdep.c                 |   22 +-
 sys/arch/x68k/x68k/trap.c                    |   82 +++--
 sys/compat/aout/aout_misc.c                  |  230 ++++++++++-------
 sys/compat/aout/syscalls.master              |    5 +-
 83 files changed, 2428 insertions(+), 2180 deletions(-)

diffs (truncated from 9733 to 300 lines):

diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/Makefile
--- a/sys/arch/sparc64/include/Makefile Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/Makefile Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2002/11/26 23:30:23 lukem Exp $
+#      $NetBSD: Makefile,v 1.18 2003/01/18 06:55:21 thorpej Exp $
 
 INCSDIR= /usr/include/sparc64
 
@@ -12,7 +12,7 @@
        int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
        kbd.h kbio.h kcore.h \
        limits.h lock.h \
-       math.h \
+       math.h mcontext.h \
        oldmon.h openpromio.h \
        param.h pcb.h pmap.h pmc.h proc.h profile.h psl.h pte.h ptrace.h \
        reg.h reloc.h remote-sl.h \
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/cpu.h
--- a/sys/arch/sparc64/include/cpu.h    Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/cpu.h    Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.33 2002/11/27 18:00:28 pk Exp $ */
+/*     $NetBSD: cpu.h,v 1.34 2003/01/18 06:55:21 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -98,11 +98,11 @@
 
 struct cpu_info {
        /* Most important fields first */
-       struct proc             *ci_curproc;
+       struct lwp              *ci_curlwp;
        struct pcb              *ci_cpcb;
        struct cpu_info         *ci_next;
 
-       struct proc             *ci_fpproc;
+       struct lwp              *ci_fplwp;
        int                     ci_number;
        int                     ci_upaid;
        struct schedstate_percpu ci_schedstate;
@@ -139,6 +139,9 @@
 #define        cpu_number()    (curcpu()->ci_number)
 #endif
 
+/* This really should be somewhere else. */
+#define        cpu_proc_fork(p1, p2)   /* nothing */
+
 /*
  * Arguments to hardclock, softclock and gatherstats encapsulate the
  * previous machine state in an opaque clockframe.  The ipl is here
@@ -232,7 +235,7 @@
  *
  * XXX this must be per-cpu (eventually)
  */
-struct proc *fpproc;           /* FPU owner */
+struct lwp *fplwp;             /* FPU owner */
 
 /*
  * Interrupt handler chains.  Interrupt handlers should return 0 for
@@ -296,8 +299,8 @@
 /* locore2.c */
 void   remrq __P((struct proc *));
 /* trap.c */
-void   kill_user_windows __P((struct proc *));
-int    rwindow_save __P((struct proc *));
+void   kill_user_windows __P((struct lwp *));
+int    rwindow_save __P((struct lwp *));
 /* amd7930intr.s */
 void   amd7930_trap __P((void));
 /* cons.c */
@@ -316,7 +319,7 @@
 void kgdb_panic __P((void));
 #endif
 /* emul.c */
-int    fixalign __P((struct proc *, struct trapframe64 *));
+int    fixalign __P((struct lwp *, struct trapframe64 *));
 int    emulinstr __P((vaddr_t, struct trapframe64 *));
 
 /*
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/mcontext.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sparc64/include/mcontext.h       Sat Jan 18 06:55:21 2003 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: mcontext.h,v 1.2 2003/01/18 06:55:21 thorpej Exp $     */
+
+#include <sparc/mcontext.h>
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/netbsd32_machdep.h
--- a/sys/arch/sparc64/include/netbsd32_machdep.h       Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/netbsd32_machdep.h       Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.h,v 1.10 2002/10/23 13:16:38 scw Exp $        */
+/*     $NetBSD: netbsd32_machdep.h,v 1.11 2003/01/18 06:55:21 thorpej Exp $    */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -72,7 +72,7 @@
 };
 
 struct exec_package;
-void netbsd32_setregs (struct proc *p, struct exec_package *pack, u_long stack);
+void netbsd32_setregs (struct lwp *l, struct exec_package *pack, u_long stack);
 int netbsd32_sigreturn (struct proc *p, void *v, register_t *retval);
 void netbsd32_sendsig (int sig, sigset_t *mask, u_long code);
 
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/pmap.h
--- a/sys/arch/sparc64/include/pmap.h   Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/pmap.h   Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.23 2002/09/22 07:19:45 chs Exp $    */
+/*     $NetBSD: pmap.h,v 1.24 2003/01/18 06:55:21 thorpej Exp $        */
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -191,7 +191,7 @@
                                  daddr_t));
 int            pmap_pa_exists __P((paddr_t));
 struct proc;
-void           switchexit __P((struct proc *));
+void           switchexit __P((struct lwp *, int));
 
 /* SPARC64 specific */
 int    ctx_alloc __P((struct pmap *));
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/proc.h
--- a/sys/arch/sparc64/include/proc.h   Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/proc.h   Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.2 1999/11/06 20:13:50 eeh Exp $ */
+/*     $NetBSD: proc.h,v 1.3 2003/01/18 06:55:22 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -44,14 +44,22 @@
  *     @(#)proc.h      8.1 (Berkeley) 6/11/93
  */
 
+#ifndef _SPARC64_PROC_H
+#define _SPARC64_PROC_H
+
+struct mdlwp {
+       struct  trapframe64 *md_tf;     /* trap/syscall registers */
+       struct  fpstate64 *md_fpstate;  /* fpu state, if any; always resident */
+       struct pcb *md_pcbpaddr;        /* phys addr of the pcb */
+       u_long  md_flags;
+};
 /*
  * Machine-dependent part of the proc structure for SPARC.
  */
 struct mdproc {
-       struct  trapframe64 *md_tf;     /* trap/syscall registers */
-       struct  fpstate64 *md_fpstate;  /* fpu state, if any; always resident */
-       u_long  md_flags;
 };
 
 /* md_flags */
 #define        MDP_FIXALIGN    0x1             /* Fix unaligned memory accesses */
+
+#endif /* _SPARC64_PROC_H */
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/svr4_32_machdep.h
--- a/sys/arch/sparc64/include/svr4_32_machdep.h        Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/svr4_32_machdep.h        Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_32_machdep.h,v 1.3 2001/05/11 17:37:14 kleink Exp $        */
+/*     $NetBSD: svr4_32_machdep.h,v 1.4 2003/01/18 06:55:22 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -91,6 +91,6 @@
 
 struct svr4_32_ucontext;
 
-int svr4_32_trap __P((int, struct proc *));
+int svr4_32_trap __P((int, struct lwp *));
 
 #endif /* !_SPARC_SVR4_32_MACHDEP_H_ */
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/include/svr4_machdep.h
--- a/sys/arch/sparc64/include/svr4_machdep.h   Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/include/svr4_machdep.h   Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_machdep.h,v 1.7 2001/02/22 22:08:06 eeh Exp $      */
+/*     $NetBSD: svr4_machdep.h,v 1.8 2003/01/18 06:55:22 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -144,6 +144,6 @@
 
 struct svr4_ucontext;
 
-int svr4_trap __P((int, struct proc *));
+int svr4_trap __P((int, struct lwp *));
 
 #endif /* !_SPARC_SVR4_MACHDEP_H_ */
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c  Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c  Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.53 2002/10/02 16:02:21 thorpej Exp $ */
+/*     $NetBSD: clock.c,v 1.54 2003/01/18 06:55:22 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -869,8 +869,8 @@
 schedintr(arg)
        void *arg;
 {
-       if (curproc)
-               schedclock(curproc);
+       if (curlwp)
+               schedclock(curlwp);
        return (1);
 }
 
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/sparc64/compat_13_machdep.c
--- a/sys/arch/sparc64/sparc64/compat_13_machdep.c      Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/sparc64/compat_13_machdep.c      Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_13_machdep.c,v 1.12 2000/12/29 17:09:49 eeh Exp $       */
+/*     $NetBSD: compat_13_machdep.c,v 1.13 2003/01/18 06:55:23 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -48,6 +48,7 @@
 #include <sys/signal.h>
 #include <sys/signalvar.h>
 
+#include <sys/sa.h>
 #include <sys/syscallargs.h>
 #include <sparc64/sparc64/sigdebug.h>
 
@@ -62,28 +63,29 @@
  */
 /* ARGSUSED */
 int
-compat_13_sys_sigreturn(p, v, retval)
-       struct proc *p;
+compat_13_sys_sigreturn(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
        struct compat_13_sys_sigreturn_args /* {
                syscallarg(struct sigcontext13 *) sigcntxp;
        } */ *uap = v;
+       struct proc *p = l->l_proc;
        struct sigcontext13 sc, *scp;
+       struct trapframe64 *tf;
        sigset_t mask;
-       struct trapframe64 *tf;
 
        /* First ensure consistent stack state (see sendsig). */
        write_user_windows();
-       if (rwindow_save(p)) {
+       if (rwindow_save(l)) {
 #ifdef DEBUG
-               printf("compat_13_sys_sigreturn: rwindow_save(%p) failed, sending SIGILL\n", p);
+               printf("compat_13_sys_sigreturn: rwindow_save(%p) failed, sending SIGILL\n", l);
 #ifdef DDB
                Debugger();
 #endif
 #endif
-               sigexit(p, SIGILL);
+               sigexit(l, SIGILL);
        }
 #ifdef DEBUG
        if (sigdebug & SDB_FOLLOW) {
@@ -111,7 +113,7 @@
 
        scp = &sc;
 
-       tf = p->p_md.md_tf;
+       tf = l->l_md.md_tf;
        /*
         * Only the icc bits in the psr are used, so it need not be
         * verified.  pc and npc must be multiples of 4.  This is all
diff -r 16918fee5fc0 -r 50ddeac0236a sys/arch/sparc64/sparc64/db_interface.c
--- a/sys/arch/sparc64/sparc64/db_interface.c   Sat Jan 18 06:44:56 2003 +0000
+++ b/sys/arch/sparc64/sparc64/db_interface.c   Sat Jan 18 06:55:21 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.66 2002/12/25 22:24:56 petrov Exp $ */
+/*     $NetBSD: db_interface.c,v 1.67 2003/01/18 06:55:23 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -224,6 +224,7 @@
 
 void kdb_kbd_trap __P((struct trapframe64 *));
 void db_prom_cmd __P((db_expr_t, int, db_expr_t, char *));
+void db_lwp_cmd __P((db_expr_t, int, db_expr_t, char *));
 void db_proc_cmd __P((db_expr_t, int, db_expr_t, char *));
 void db_ctx_cmd __P((db_expr_t, int, db_expr_t, char *));
 void db_dump_window __P((db_expr_t, int, db_expr_t, char *));
@@ -307,10 +308,10 @@
        write_all_windows();
 
        ddb_regs.ddb_tf = *tf;
-       if (fpproc) {
-               savefpstate(fpproc->p_md.md_fpstate);
-               ddb_regs.ddb_fpstate = *fpproc->p_md.md_fpstate;
-               loadfpstate(fpproc->p_md.md_fpstate);
+       if (fplwp) {



Home | Main Index | Thread Index | Old Index