Source-Changes-HG archive

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

[src/trunk]: src/sys/arch - Use uvm_lwp_setuarea() instead of directly settin...



details:   https://anonhg.NetBSD.org/src/rev/6cff630404be
branches:  trunk
changeset: 749339:6cff630404be
user:      rmind <rmind%NetBSD.org@localhost>
date:      Fri Nov 27 03:23:03 2009 +0000

description:
- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.

diffstat:

 sys/arch/acorn26/acorn26/genassym.cf             |    3 +-
 sys/arch/acorn26/acorn26/locore.S                |    8 +-
 sys/arch/acorn26/acorn26/start.c                 |   14 +-
 sys/arch/acorn26/acorn26/vm_machdep.c            |   11 +-
 sys/arch/acorn32/acorn32/rpc_machdep.c           |    6 +-
 sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c   |    6 +-
 sys/arch/acorn32/podulebus/amps.c                |    5 +-
 sys/arch/algor/algor/machdep.c                   |   29 ++--
 sys/arch/algor/dev/com_mainbus.c                 |    5 +-
 sys/arch/algor/dev/lpt_mainbus.c                 |    5 +-
 sys/arch/alpha/alpha/genassym.cf                 |   12 +-
 sys/arch/alpha/alpha/locore.s                    |  130 +++++++++++-----------
 sys/arch/alpha/alpha/machdep.c                   |   28 ++--
 sys/arch/amd64/amd64/copy.S                      |    4 +-
 sys/arch/amd64/amd64/genassym.cf                 |    4 +-
 sys/arch/amd64/amd64/locore.S                    |   12 +-
 sys/arch/amd64/amd64/mptramp.S                   |    4 +-
 sys/arch/amd64/amd64/spl.S                       |    8 +-
 sys/arch/arc/arc/arcbios.c                       |    5 +-
 sys/arch/arc/arc/cpu.c                           |    5 +-
 sys/arch/arc/arc/locore_machdep.S                |   10 +-
 sys/arch/arc/arc/machdep.c                       |   18 +-
 sys/arch/arc/arc/minidebug.c                     |    5 +-
 sys/arch/arc/dti/btl.c                           |    5 +-
 sys/arch/arc/isa/isabus.c                        |    5 +-
 sys/arch/arm/arm/undefined.c                     |    7 +-
 sys/arch/arm/arm32/arm32_machdep.c               |    5 +-
 sys/arch/arm/at91/at91bus.c                      |    6 +-
 sys/arch/atari/atari/atari_init.c                |   18 +-
 sys/arch/bebox/bebox/machdep.c                   |    5 +-
 sys/arch/cats/cats/cats_machdep.c                |    7 +-
 sys/arch/cobalt/cobalt/machdep.c                 |   23 ++-
 sys/arch/cobalt/dev/gt.c                         |    5 +-
 sys/arch/dreamcast/dreamcast/machdep.c           |    5 +-
 sys/arch/evbarm/adi_brh/brh_machdep.c            |    6 +-
 sys/arch/evbarm/armadillo/armadillo9_machdep.c   |    6 +-
 sys/arch/evbarm/beagle/beagle_machdep.c          |    6 +-
 sys/arch/evbarm/evbarm/initarm_common.c          |    8 +-
 sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c        |    4 +-
 sys/arch/evbarm/gemini/gemini_machdep.c          |    6 +-
 sys/arch/evbarm/gumstix/gumstix_machdep.c        |    4 +-
 sys/arch/evbarm/hdl_g/hdlg_machdep.c             |    6 +-
 sys/arch/evbarm/imx31/imx31lk_machdep.c          |    6 +-
 sys/arch/evbarm/integrator/integrator_machdep.c  |    6 +-
 sys/arch/evbarm/iq80310/iq80310_machdep.c        |    6 +-
 sys/arch/evbarm/iq80321/iq80321_machdep.c        |    6 +-
 sys/arch/evbarm/ixdp425/ixdp425_machdep.c        |    6 +-
 sys/arch/evbarm/ixm1200/ixm1200_machdep.c        |    6 +-
 sys/arch/evbarm/lubbock/lubbock_machdep.c        |    6 +-
 sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c        |    6 +-
 sys/arch/evbarm/nslu2/nslu2_machdep.c            |    6 +-
 sys/arch/evbarm/osk5912/osk5912_machdep.c        |    6 +-
 sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c      |    6 +-
 sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c      |    6 +-
 sys/arch/evbarm/tisdp24xx/sdp24xx_machdep.c      |    6 +-
 sys/arch/evbarm/tsarm/tsarm_machdep.c            |    6 +-
 sys/arch/evbarm/viper/viper_machdep.c            |    6 +-
 sys/arch/evbmips/adm5120/machdep.c               |   18 +-
 sys/arch/evbmips/alchemy/machdep.c               |   24 ++-
 sys/arch/evbmips/atheros/machdep.c               |   26 ++--
 sys/arch/evbmips/gdium/machdep.c                 |   27 ++--
 sys/arch/evbmips/malta/machdep.c                 |   27 ++--
 sys/arch/evbppc/explora/machdep.c                |    9 +-
 sys/arch/evbppc/virtex/machdep.c                 |    9 +-
 sys/arch/evbppc/walnut/machdep.c                 |    9 +-
 sys/arch/evbsh3/evbsh3/machdep.c                 |    5 +-
 sys/arch/ews4800mips/ews4800mips/machdep.c       |   22 ++-
 sys/arch/hp300/hp300/pmap_bootstrap.c            |    6 +-
 sys/arch/hp700/hp700/locore.S                    |    6 +-
 sys/arch/hp700/hp700/machdep.c                   |    5 +-
 sys/arch/hpcarm/hpcarm/hpc_machdep.c             |    6 +-
 sys/arch/hpcmips/hpcmips/machdep.c               |   20 +-
 sys/arch/hpcsh/hpcsh/machdep.c                   |    5 +-
 sys/arch/hppa/hppa/pmap.c                        |   16 +-
 sys/arch/hppa/hppa/trap.c                        |   14 +-
 sys/arch/i386/i386/copy.S                        |   12 +-
 sys/arch/i386/i386/genassym.cf                   |    4 +-
 sys/arch/i386/i386/locore.S                      |   16 +-
 sys/arch/i386/i386/machdep.c                     |   10 +-
 sys/arch/i386/i386/mptramp.S                     |    6 +-
 sys/arch/i386/i386/spl.S                         |   10 +-
 sys/arch/ia64/ia64/context.S                     |    8 +-
 sys/arch/ia64/ia64/genassym.cf                   |    6 +-
 sys/arch/ia64/ia64/machdep.c                     |   37 ++---
 sys/arch/ia64/ia64/support.S                     |   32 ++--
 sys/arch/ibmnws/ibmnws/machdep.c                 |    5 +-
 sys/arch/iyonix/iyonix/iyonix_machdep.c          |    6 +-
 sys/arch/landisk/landisk/machdep.c               |    5 +-
 sys/arch/mac68k/mac68k/pmap_bootstrap.c          |    6 +-
 sys/arch/macppc/dev/esp.c                        |    5 +-
 sys/arch/macppc/macppc/cpu.c                     |    5 +-
 sys/arch/macppc/macppc/machdep.c                 |    5 +-
 sys/arch/mips/include/cpu.h                      |    6 +-
 sys/arch/mips/mips/copy.S                        |   78 ++++++------
 sys/arch/mips/mips/fp.S                          |   74 ++++++------
 sys/arch/mips/mips/genassym.cf                   |   10 +-
 sys/arch/mips/mips/locore.S                      |   80 +++++++-------
 sys/arch/mips/mips/locore_mips3.S                |    8 +-
 sys/arch/mips/mips/mips_machdep.c                |    7 +-
 sys/arch/mipsco/mipsco/machdep.c                 |   23 ++-
 sys/arch/mmeye/mmeye/machdep.c                   |    5 +-
 sys/arch/mvmeppc/mvmeppc/machdep.c               |    5 +-
 sys/arch/netwinder/netwinder/netwinder_machdep.c |    6 +-
 sys/arch/newsmips/newsmips/machdep.c             |   23 ++-
 sys/arch/playstation2/playstation2/machdep.c     |   25 ++-
 sys/arch/pmax/pmax/machdep.c                     |   20 +-
 sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c         |    8 +-
 sys/arch/powerpc/include/frame.h                 |    4 +-
 sys/arch/powerpc/oea/oea_machdep.c               |    8 +-
 sys/arch/powerpc/powerpc/compat_13_machdep.c     |    9 +-
 sys/arch/powerpc/powerpc/compat_16_machdep.c     |    6 +-
 sys/arch/powerpc/powerpc/fpu.c                   |    6 +-
 sys/arch/powerpc/powerpc/sig_machdep.c           |    6 +-
 sys/arch/prep/prep/machdep.c                     |    5 +-
 sys/arch/rs6000/rs6000/machdep.c                 |    5 +-
 sys/arch/sandpoint/sandpoint/machdep.c           |    5 +-
 sys/arch/sbmips/sbmips/machdep.c                 |   25 ++-
 sys/arch/sgimips/sgimips/machdep.c               |   25 ++--
 sys/arch/sh3/sh3/locore_c.c                      |    6 +-
 sys/arch/sh3/sh3/sh3_machdep.c                   |   11 +-
 sys/arch/shark/ofw/ofw.c                         |    9 +-
 sys/arch/shark/shark/profile.c                   |    5 +-
 sys/arch/shark/shark/scr.c                       |    5 +-
 sys/arch/sparc/sparc/autoconf.c                  |   16 +-
 sys/arch/sparc64/sparc64/pmap.c                  |    6 +-
 sys/arch/sun2/sun2/locore2.c                     |   12 +-
 sys/arch/sun3/sun3/locore2.c                     |   12 +-
 sys/arch/sun3/sun3x/locore2.c                    |   11 +-
 sys/arch/sun68k/sun68k/vme_sun68k.c              |    5 +-
 sys/arch/usermode/dev/clock.c                    |    5 +-
 sys/arch/usermode/dev/cpu.c                      |    5 +-
 sys/arch/usermode/dev/mainbus.c                  |    5 +-
 sys/arch/usermode/dev/ttycons.c                  |    5 +-
 sys/arch/vax/vax/locore.c                        |   20 ++-
 sys/arch/vax/vax/pmap.c                          |    9 +-
 sys/arch/x68k/x68k/kgdb_stub.c                   |    8 +-
 sys/arch/xen/x86/autoconf.c                      |    5 +-
 sys/arch/xen/x86/cpu.c                           |    5 +-
 sys/arch/zaurus/zaurus/machdep.c                 |    6 +-
 139 files changed, 824 insertions(+), 825 deletions(-)

diffs (truncated from 5968 to 300 lines):

diff -r 965747447e02 -r 6cff630404be sys/arch/acorn26/acorn26/genassym.cf
--- a/sys/arch/acorn26/acorn26/genassym.cf      Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn26/acorn26/genassym.cf      Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.10 2008/06/23 17:58:17 matt Exp $
+# $NetBSD: genassym.cf,v 1.11 2009/11/27 03:23:03 rmind Exp $
 #
 # Copyright (c) 1999 Ben Harris
 # All rights reserved.
@@ -46,7 +46,6 @@
 
 define __PROG26        1
 
-define U_PCB           offsetof(struct user, u_pcb)
 define PCB_SF          offsetof(struct pcb, pcb_sf)
 define PCB_ONFAULT     offsetof(struct pcb, pcb_onfault)
 define L_ADDR          offsetof(struct lwp, l_addr)
diff -r 965747447e02 -r 6cff630404be sys/arch/acorn26/acorn26/locore.S
--- a/sys/arch/acorn26/acorn26/locore.S Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn26/acorn26/locore.S Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.20 2009/01/18 15:14:34 bjh21 Exp $ */
+/* $NetBSD: locore.S,v 1.21 2009/11/27 03:23:03 rmind Exp $ */
 /*
  * Copyright (c) 1998, 1999, 2000 Ben Harris
  * Copyright (C) 1994-1997 Mark Brinicombe
@@ -392,7 +392,7 @@
        beq     Lswitch_exited
 
        ldr     r3, [r0, #(L_ADDR)]
-       add     r3, r3, #PCB_SF         /* r3 =  &old->l_addr->u_pcb.pcb_sf */
+       add     r3, r3, #PCB_SF         /* r3 =  oldpcb->pcb_sf */
 
        mov     r2, sp                  /* Temporary stack pointer */
        stmfd   r2!, {r4-r11, r13-r14}  /* Save all relevant registers */
@@ -401,7 +401,7 @@
 Lswitch_exited:
 
        ldr     r2, [r1, #(L_ADDR)]
-       ldr     r3, [r2, #(PCB_SF)]     /* r3 = new->l_addr->u_pcb.pcb_sf; */
+       ldr     r3, [r2, #(PCB_SF)]     /* r3 = newpcb->pcb_sf */
 
        ldmfd   r3, {r4-r11, r13-r14}   /* Restore from old switchframe */
        mov     pc, r14                 /* and return */
@@ -452,4 +452,4 @@
        ldmfd   r13!, {pc}
 #endif
 
-RCSID("$NetBSD: locore.S,v 1.20 2009/01/18 15:14:34 bjh21 Exp $")
+RCSID("$NetBSD: locore.S,v 1.21 2009/11/27 03:23:03 rmind Exp $")
diff -r 965747447e02 -r 6cff630404be sys/arch/acorn26/acorn26/start.c
--- a/sys/arch/acorn26/acorn26/start.c  Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn26/acorn26/start.c  Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: start.c,v 1.16 2009/11/26 00:19:11 matt Exp $ */
+/* $NetBSD: start.c,v 1.17 2009/11/27 03:23:03 rmind Exp $ */
 /*-
  * Copyright (c) 1998, 2000 Ben Harris
  * All rights reserved.
@@ -31,7 +31,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.16 2009/11/26 00:19:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.17 2009/11/27 03:23:03 rmind Exp $");
 
 #include "opt_modular.h"
 
@@ -92,6 +92,7 @@
 start(struct bootconfig *initbootconfig)
 {
        int onstack;
+       vaddr_t v;
 
        /*
         * State of the world as of BBBB 0.02:
@@ -185,11 +186,12 @@
        fiq_off();
 
        /*
-        * Locate process 0's user structure, in the bottom of its kernel
-        * stack page.  That's our current stack page too.
+        * Locate lwp0's uarea, in the bottom of its kernel stack page.
+        * That is our current stack page too.
         */
-       lwp0.l_addr = (struct user *)(round_page((vaddr_t)&onstack) - USPACE);
-       memset(lwp0.l_addr, 0, sizeof(*lwp0.l_addr));
+       v = round_page((vaddr_t)&onstack) - USPACE;
+       uvm_lwp_setuarea(&lwp0, v);
+       memset((void *)v, 0, sizeof(struct pcb));
 
        /* TODO: anything else? */
        
diff -r 965747447e02 -r 6cff630404be sys/arch/acorn26/acorn26/vm_machdep.c
--- a/sys/arch/acorn26/acorn26/vm_machdep.c     Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn26/acorn26/vm_machdep.c     Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.24 2009/11/26 00:19:11 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.25 2009/11/27 03:23:03 rmind Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.24 2009/11/26 00:19:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.25 2009/11/27 03:23:03 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -95,11 +95,8 @@
  */
 
 /*
- * Note:
- * 
- * l->l_addr points to a page containing the user structure
- * (see <sys/user.h>) and the kernel stack.  The pcb structure has to be
- * at the start of the area -- we start the kernel stack from the end.
+ * Note: the pcb structure has to be at the start of the uarea -- we start
+ * the kernel stack from the end.
  */
 
 void
diff -r 965747447e02 -r 6cff630404be sys/arch/acorn32/acorn32/rpc_machdep.c
--- a/sys/arch/acorn32/acorn32/rpc_machdep.c    Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn32/acorn32/rpc_machdep.c    Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_machdep.c,v 1.78 2009/11/26 00:19:11 matt Exp $    */
+/*     $NetBSD: rpc_machdep.c,v 1.79 2009/11/27 03:23:03 rmind Exp $   */
 
 /*
  * Copyright (c) 2000-2002 Reinoud Zandijk.
@@ -55,7 +55,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.78 2009/11/26 00:19:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.79 2009/11/27 03:23:03 rmind Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -841,7 +841,7 @@
         * Moved from cpu_startup() as data_abort_handler() references
         * this during uvm init
         */
-       lwp0.l_addr = (struct user *)kernelstack.pv_va;
+       uvm_lwp_setuarea(&lwp0, kernelstack.pv_va);
 
        /* 
         * if there is support for a serial console ...we should now
diff -r 965747447e02 -r 6cff630404be sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c
--- a/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c    Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c    Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eb7500atx_machdep.c,v 1.17 2009/11/26 00:19:11 matt Exp $      */
+/*     $NetBSD: eb7500atx_machdep.c,v 1.18 2009/11/27 03:23:03 rmind Exp $     */
 
 /*
  * Copyright (c) 2000-2002 Reinoud Zandijk.
@@ -55,7 +55,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.17 2009/11/26 00:19:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.18 2009/11/27 03:23:03 rmind Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -781,7 +781,7 @@
         * Moved from cpu_startup() as data_abort_handler() references
         * this during uvm init
         */
-       lwp0.l_addr = (struct user *)kernelstack.pv_va;
+       uvm_lwp_setuarea(&lwp0, kernelstack.pv_va);
 
        /* 
         * if there is support for a serial console ...we should now
diff -r 965747447e02 -r 6cff630404be sys/arch/acorn32/podulebus/amps.c
--- a/sys/arch/acorn32/podulebus/amps.c Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/acorn32/podulebus/amps.c Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amps.c,v 1.16 2009/03/14 21:04:01 dsl Exp $    */
+/*     $NetBSD: amps.c,v 1.17 2009/11/27 03:23:03 rmind Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amps.c,v 1.16 2009/03/14 21:04:01 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amps.c,v 1.17 2009/11/27 03:23:03 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -45,7 +45,6 @@
 #include <sys/select.h>
 #include <sys/tty.h>
 #include <sys/proc.h>
-#include <sys/user.h>
 #include <sys/conf.h>
 #include <sys/file.h>
 #include <sys/uio.h>
diff -r 965747447e02 -r 6cff630404be sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c    Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/algor/algor/machdep.c    Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.42 2009/11/26 00:19:11 matt Exp $        */
+/*     $NetBSD: machdep.c,v 1.43 2009/11/27 03:23:03 rmind Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2009/11/26 00:19:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2009/11/27 03:23:03 rmind Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h" 
@@ -123,8 +123,7 @@
 #include <sys/kernel.h>
 #include <sys/buf.h>
 #include <sys/reboot.h>
-#include <sys/user.h>
-#include <sys/mount.h> 
+#include <sys/mount.h>
 #include <sys/kcore.h>
 #include <sys/boot_flag.h>
 #include <sys/termios.h>
@@ -210,9 +209,10 @@
        vaddr_t kernstart, kernend;
        paddr_t kernstartpfn, kernendpfn, pfn0, pfn1;
        vsize_t size;
+       struct pcb *pcb0;
+       vaddr_t v;
        const char *cp;
        char *cp0;
-       void *v;
        int i;
 
        /* Disable interrupts. */
@@ -560,14 +560,17 @@
        pmap_bootstrap();
 
        /*
-        * Init mapping for u page(s) for lwp0.
+        * Allocate uarea page for lwp0 and set it.
         */
        led_display('u', 's', 'p', 'c');
-       v = (void *) uvm_pageboot_alloc(USPACE);
-       lwp0.l_addr = (struct user *) v;
-       lwp0.l_md.md_regs = (struct frame *)((char*)v + USPACE) - 1;
-       lwp0.l_addr->u_pcb.pcb_context[11] =
-           MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+
+       v = uvm_pageboot_alloc(USPACE);
+       uvm_lwp_setuarea(&lwp0, v);
+
+       pcb0 = lwp_getpcb(&lwp0);
+       pcb0->pcb_context[11] = MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+
+       lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
 
        /*
         * Initialize debuggers, and break into them, if appropriate.
@@ -656,7 +659,7 @@
 }
 
 int    waittime = -1;
-struct user dumppcb;   /* Actually, struct pcb would do. */
+struct pcb dumppcb;
 
 void
 cpu_reboot(int howto, char *bootstr)
@@ -665,7 +668,7 @@
 
        /* Take a snapshot before clobbering any registers. */
        if (curlwp)
-               savectx((struct user *) curpcb);
+               savectx(curpcb);
 
        /* If "always halt" was specified as a boot flag, obey. */
        if (boothowto & RB_HALT)
diff -r 965747447e02 -r 6cff630404be sys/arch/algor/dev/com_mainbus.c
--- a/sys/arch/algor/dev/com_mainbus.c  Fri Nov 27 02:51:15 2009 +0000
+++ b/sys/arch/algor/dev/com_mainbus.c  Fri Nov 27 03:23:03 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $  */
+/*     $NetBSD: com_mainbus.c,v 1.12 2009/11/27 03:23:03 rmind Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 



Home | Main Index | Thread Index | Old Index