Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Kill proc0paddr. Use lwp0.l_addr instead.
details: https://anonhg.NetBSD.org/src/rev/de9273c71cd3
branches: trunk
changeset: 749301:de9273c71cd3
user: matt <matt%NetBSD.org@localhost>
date: Thu Nov 26 00:19:11 2009 +0000
description:
Kill proc0paddr. Use lwp0.l_addr instead.
diffstat:
sys/arch/acorn26/acorn26/start.c | 10 ++---
sys/arch/acorn26/acorn26/vm_machdep.c | 13 +++---
sys/arch/acorn32/acorn32/rpc_machdep.c | 9 +---
sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c | 9 +---
sys/arch/algor/algor/machdep.c | 10 ++---
sys/arch/alpha/alpha/cpu.c | 8 ++--
sys/arch/alpha/alpha/machdep.c | 23 +++++------
sys/arch/alpha/alpha/pmap.c | 6 +-
sys/arch/alpha/alpha/vm_machdep.c | 12 +++---
sys/arch/amd64/amd64/locore.S | 9 ++--
sys/arch/amd64/amd64/machdep.c | 9 +---
sys/arch/amiga/amiga/amiga_init.c | 19 +++------
sys/arch/amiga/amiga/locore.s | 12 ++----
sys/arch/amigappc/amigappc/locore.S | 4 +-
sys/arch/arc/arc/machdep.c | 11 ++---
sys/arch/arm/arm32/arm32_machdep.c | 6 +--
sys/arch/arm/arm32/vm_machdep.c | 6 +-
sys/arch/arm/at91/at91bus.c | 10 +---
sys/arch/atari/atari/atari_init.c | 20 +++------
sys/arch/atari/atari/locore.s | 13 ++----
sys/arch/bebox/bebox/locore.S | 4 +-
sys/arch/cats/cats/cats_machdep.c | 9 +---
sys/arch/cesfic/cesfic/locore.s | 11 ++---
sys/arch/cesfic/cesfic/pmap_bootstrap.c | 7 +--
sys/arch/cobalt/cobalt/machdep.c | 11 ++---
sys/arch/evbarm/adi_brh/brh_machdep.c | 9 +---
sys/arch/evbarm/armadillo/armadillo9_machdep.c | 9 +---
sys/arch/evbarm/beagle/beagle_machdep.c | 9 +---
sys/arch/evbarm/evbarm/initarm_common.c | 9 +---
sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c | 7 +--
sys/arch/evbarm/gemini/gemini_machdep.c | 9 +---
sys/arch/evbarm/gumstix/gumstix_machdep.c | 7 +--
sys/arch/evbarm/hdl_g/hdlg_machdep.c | 9 +---
sys/arch/evbarm/imx31/imx31lk_machdep.c | 9 +---
sys/arch/evbarm/integrator/integrator_machdep.c | 9 +---
sys/arch/evbarm/iq80310/iq80310_machdep.c | 9 +---
sys/arch/evbarm/iq80321/iq80321_machdep.c | 9 +---
sys/arch/evbarm/ixdp425/ixdp425_machdep.c | 9 +---
sys/arch/evbarm/ixm1200/ixm1200_machdep.c | 9 +---
sys/arch/evbarm/lubbock/lubbock_machdep.c | 9 +---
sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c | 9 +---
sys/arch/evbarm/nslu2/nslu2_machdep.c | 9 +---
sys/arch/evbarm/osk5912/osk5912_machdep.c | 9 +---
sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c | 9 +---
sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c | 9 +---
sys/arch/evbarm/tisdp24xx/sdp24xx_machdep.c | 9 +---
sys/arch/evbarm/tsarm/tsarm_machdep.c | 9 +---
sys/arch/evbarm/viper/viper_machdep.c | 9 +---
sys/arch/evbmips/adm5120/machdep.c | 10 ++---
sys/arch/evbmips/alchemy/machdep.c | 10 ++---
sys/arch/evbmips/atheros/machdep.c | 10 ++---
sys/arch/evbmips/gdium/machdep.c | 10 ++---
sys/arch/evbmips/malta/machdep.c | 10 ++---
sys/arch/evbppc/ev64260/ev64260_locore.S | 4 +-
sys/arch/evbppc/ev64260/machdep.c | 6 +--
sys/arch/evbppc/explora/explora_start.S | 5 +--
sys/arch/evbppc/explora/machdep.c | 9 +---
sys/arch/evbppc/obs405/obs200_locore.S | 8 +---
sys/arch/evbppc/pmppc/pmppc_locore.S | 4 +-
sys/arch/evbppc/virtex/machdep.c | 9 +---
sys/arch/evbppc/virtex/virtex_start.S | 7 +---
sys/arch/evbppc/walnut/machdep.c | 9 +---
sys/arch/evbppc/walnut/walnut_start.S | 8 +---
sys/arch/ews4800mips/ews4800mips/machdep.c | 9 ++--
sys/arch/hp300/hp300/locore.s | 14 ++----
sys/arch/hp300/hp300/pmap_bootstrap.c | 7 +--
sys/arch/hp700/hp700/locore.S | 5 +--
sys/arch/hp700/hp700/machdep.c | 5 +-
sys/arch/hpcarm/hpcarm/hpc_machdep.c | 9 +---
sys/arch/hpcmips/hpcmips/machdep.c | 16 +++----
sys/arch/hppa/hppa/pmap.c | 9 +---
sys/arch/i386/i386/machdep.c | 14 +++----
sys/arch/ia64/ia64/machdep.c | 22 +++++------
sys/arch/ibmnws/ibmnws/locore.S | 4 +-
sys/arch/iyonix/iyonix/iyonix_machdep.c | 9 +---
sys/arch/luna68k/luna68k/locore.s | 13 ++----
sys/arch/luna68k/luna68k/pmap_bootstrap.c | 17 ++++----
sys/arch/mac68k/mac68k/locore.s | 14 ++----
sys/arch/mac68k/mac68k/pmap_bootstrap.c | 22 +++++-----
sys/arch/macppc/macppc/locore.S | 4 +-
sys/arch/mips/include/mcontext.h | 47 +++++++++++++----------
sys/arch/mips/mips/locore.S | 4 +-
sys/arch/mips/mips/mips_machdep.c | 22 ++++++----
sys/arch/mipsco/mipsco/machdep.c | 9 ++--
sys/arch/mvme68k/mvme68k/locore.s | 14 ++----
sys/arch/mvme68k/mvme68k/pmap_bootstrap.c | 20 ++++-----
sys/arch/mvmeppc/mvmeppc/locore.S | 4 +-
sys/arch/netwinder/netwinder/netwinder_machdep.c | 9 +---
sys/arch/news68k/news68k/locore.s | 15 ++-----
sys/arch/news68k/news68k/pmap_bootstrap.c | 18 ++++----
sys/arch/newsmips/newsmips/machdep.c | 9 ++--
sys/arch/next68k/next68k/locore.s | 14 ++----
sys/arch/next68k/next68k/pmap_bootstrap.c | 19 ++++-----
sys/arch/ofppc/ofppc/locore.S | 4 +-
sys/arch/playstation2/playstation2/machdep.c | 11 ++---
sys/arch/pmax/pmax/machdep.c | 9 ++--
sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c | 9 +---
sys/arch/powerpc/ibm4xx/openbios/locore.S | 5 +--
sys/arch/powerpc/include/asm.h | 6 +-
sys/arch/powerpc/oea/oea_machdep.c | 10 +---
sys/arch/prep/prep/locore.S | 4 +-
sys/arch/rs6000/rs6000/locore.S | 4 +-
sys/arch/sandpoint/sandpoint/locore.S | 4 +-
sys/arch/sbmips/sbmips/machdep.c | 9 ++--
sys/arch/sgimips/sgimips/machdep.c | 9 ++--
sys/arch/sh3/sh3/sh3_machdep.c | 11 ++---
sys/arch/shark/ofw/ofw.c | 12 ++----
sys/arch/sparc/sparc/autoconf.c | 16 +++-----
sys/arch/sparc/sparc/locore.s | 6 +--
sys/arch/sparc/sparc/machdep.c | 9 +---
sys/arch/sparc64/sparc64/locore.s | 7 +---
sys/arch/sparc64/sparc64/pmap.c | 8 +--
sys/arch/sun2/sun2/locore.s | 8 ++--
sys/arch/sun2/sun2/locore2.c | 12 ++---
sys/arch/sun3/sun3/locore.s | 8 ++--
sys/arch/sun3/sun3/locore2.c | 12 ++---
sys/arch/sun3/sun3x/locore.s | 8 ++--
sys/arch/sun3/sun3x/locore2.c | 12 ++---
sys/arch/sun3/sun3x/pmap.c | 6 +-
sys/arch/usermode/usermode/machdep.c | 5 +-
sys/arch/vax/vax/db_machdep.c | 14 ++----
sys/arch/vax/vax/locore.c | 15 +++----
sys/arch/vax/vax/multicpu.c | 6 +-
sys/arch/vax/vax/pmap.c | 10 ++---
sys/arch/vax/vax/subr.S | 13 +++---
sys/arch/x68k/x68k/kgdb_stub.c | 10 ++--
sys/arch/x68k/x68k/locore.s | 14 ++----
sys/arch/x68k/x68k/pmap_bootstrap.c | 7 +--
sys/arch/zaurus/zaurus/machdep.c | 9 +---
sys/kern/kern_proc.c | 9 +---
130 files changed, 510 insertions(+), 801 deletions(-)
diffs (truncated from 4840 to 300 lines):
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/acorn26/acorn26/start.c
--- a/sys/arch/acorn26/acorn26/start.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/acorn26/acorn26/start.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: start.c,v 1.15 2009/11/21 20:32:17 rmind Exp $ */
+/* $NetBSD: start.c,v 1.16 2009/11/26 00:19:11 matt 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.15 2009/11/21 20:32:17 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.16 2009/11/26 00:19:11 matt Exp $");
#include "opt_modular.h"
@@ -64,8 +64,6 @@
struct bootconfig bootconfig;
-struct user *proc0paddr;
-
/* in machdep.h */
extern i2c_tag_t acorn26_i2c_tag;
@@ -190,8 +188,8 @@
* Locate process 0's user structure, in the bottom of its kernel
* stack page. That's our current stack page too.
*/
- proc0paddr = (struct user *)(round_page((vaddr_t)&onstack) - USPACE);
- memset(proc0paddr, 0, sizeof(*proc0paddr));
+ lwp0.l_addr = (struct user *)(round_page((vaddr_t)&onstack) - USPACE);
+ memset(lwp0.l_addr, 0, sizeof(*lwp0.l_addr));
/* TODO: anything else? */
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/acorn26/acorn26/vm_machdep.c
--- a/sys/arch/acorn26/acorn26/vm_machdep.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/acorn26/acorn26/vm_machdep.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.23 2009/11/21 20:32:17 rmind Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.24 2009/11/26 00:19:11 matt Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.23 2009/11/21 20:32:17 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.24 2009/11/26 00:19:11 matt Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -82,10 +82,10 @@
#include <machine/machdep.h>
/*
- * Finish a fork operation, with process p2 nearly set up.
+ * Finish a fork operation, with thread l2 nearly set up.
* Copy and update the pcb and trap frame, making the child ready to run.
*
- * p1 is the process being forked; if p1 == &proc0, we are creating
+ * l1 is the thread being forked; if l1 == &lwp0, we are creating
* a kernel thread, and the return path and argument are specified with
* `func' and `arg'.
*
@@ -97,8 +97,9 @@
/*
* Note:
*
- * The pcb structure has to be* at the start of the area -- we start the
- * kernel stack from the end.
+ * 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.
*/
void
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/acorn32/acorn32/rpc_machdep.c
--- a/sys/arch/acorn32/acorn32/rpc_machdep.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/acorn32/acorn32/rpc_machdep.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_machdep.c,v 1.77 2009/08/16 22:06:12 cegger Exp $ */
+/* $NetBSD: rpc_machdep.c,v 1.78 2009/11/26 00:19:11 matt Exp $ */
/*
* Copyright (c) 2000-2002 Reinoud Zandijk.
@@ -55,7 +55,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.77 2009/08/16 22:06:12 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.78 2009/11/26 00:19:11 matt Exp $");
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -181,8 +181,6 @@
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
-struct user *proc0paddr;
-
#ifdef CPU_SA110
#define CPU_SA110_CACHE_CLEAN_SIZE (0x4000 * 2)
static vaddr_t sa110_cc_base;
@@ -843,8 +841,7 @@
* Moved from cpu_startup() as data_abort_handler() references
* this during uvm init
*/
- proc0paddr = (struct user *)kernelstack.pv_va;
- lwp0.l_addr = proc0paddr;
+ lwp0.l_addr = (struct user *)kernelstack.pv_va;
/*
* if there is support for a serial console ...we should now
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c
--- a/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eb7500atx_machdep.c,v 1.16 2009/09/22 14:49:28 tsutsui Exp $ */
+/* $NetBSD: eb7500atx_machdep.c,v 1.17 2009/11/26 00:19:11 matt Exp $ */
/*
* Copyright (c) 2000-2002 Reinoud Zandijk.
@@ -55,7 +55,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.16 2009/09/22 14:49:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.17 2009/11/26 00:19:11 matt Exp $");
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -121,7 +121,6 @@
*/
u_int cpu_reset_address = 0x0; /* XXX 0x3800000 too for rev0 RiscPC 600 */
-
#define VERBOSE_INIT_ARM
@@ -183,7 +182,6 @@
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
-struct user *proc0paddr;
#ifdef CPU_SA110
#define CPU_SA110_CACHE_CLEAN_SIZE (0x4000 * 2)
@@ -783,8 +781,7 @@
* Moved from cpu_startup() as data_abort_handler() references
* this during uvm init
*/
- proc0paddr = (struct user *)kernelstack.pv_va;
- lwp0.l_addr = proc0paddr;
+ lwp0.l_addr = (struct user *)kernelstack.pv_va;
/*
* if there is support for a serial console ...we should now
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/algor/algor/machdep.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.41 2008/11/30 18:21:32 martin Exp $ */
+/* $NetBSD: machdep.c,v 1.42 2009/11/26 00:19:11 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2008/11/30 18:21:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2009/11/26 00:19:11 matt Exp $");
#include "opt_algor_p4032.h"
#include "opt_algor_p5064.h"
@@ -184,8 +184,6 @@
struct p6032_config p6032_configuration;
#endif
-struct user *proc0paddr;
-
/* Our exported CPU info; we can have only one. */
struct cpu_info cpu_info_store;
@@ -566,9 +564,9 @@
*/
led_display('u', 's', 'p', 'c');
v = (void *) uvm_pageboot_alloc(USPACE);
- lwp0.l_addr = proc0paddr = (struct user *) v;
+ lwp0.l_addr = (struct user *) v;
lwp0.l_md.md_regs = (struct frame *)((char*)v + USPACE) - 1;
- proc0paddr->u_pcb.pcb_context[11] =
+ lwp0.l_addr->u_pcb.pcb_context[11] =
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
/*
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/alpha/alpha/cpu.c
--- a/sys/arch/alpha/alpha/cpu.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/alpha/alpha/cpu.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.87 2009/11/21 05:35:40 rmind Exp $ */
+/* $NetBSD: cpu.c,v 1.88 2009/11/26 00:19:11 matt Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.87 2009/11/21 05:35:40 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.88 2009/11/26 00:19:11 matt Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -155,10 +155,10 @@
*
* As we find processors during the autoconfiguration sequence, all
* processors have idle stacks and PCBs created for them, including
- * the primary (although the primary idles on proc0's PCB until its
+ * the primary (although the primary idles on lwp0's PCB until its
* idle PCB is created).
*
- * Right before calling uvm_scheduler(), main() calls, on proc0's
+ * Right before calling uvm_scheduler(), main() calls, on lwp0's
* context, cpu_boot_secondary_processors(). This is our key to
* actually spin up the additional processor's we've found. We
* run through our cpu_info[] array looking for secondary processors
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/alpha/alpha/machdep.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.322 2009/11/21 05:35:40 rmind Exp $ */
+/* $NetBSD: machdep.c,v 1.323 2009/11/26 00:19:11 matt Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.322 2009/11/21 05:35:40 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.323 2009/11/26 00:19:11 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -166,8 +166,6 @@
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
char cpu_model[128];
-struct user *proc0paddr;
-
/* Number of machine cycles per microsecond */
u_int64_t cycles_per_usec;
@@ -638,8 +636,7 @@
/*
* Init mapping for u page(s) for proc 0
*/
- lwp0.l_addr = proc0paddr =
- (struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
+ lwp0.l_addr = (struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
/*
* Initialize the virtual memory system, and set the
@@ -653,19 +650,19 @@
* address.
*/
lwp0.l_md.md_pcbpaddr =
- (struct pcb *)ALPHA_K0SEG_TO_PHYS((vaddr_t)&proc0paddr->u_pcb);
+ (struct pcb *)ALPHA_K0SEG_TO_PHYS((vaddr_t)&lwp0.l_addr->u_pcb);
/*
* Set the kernel sp, reserving space for an (empty) trapframe,
- * and make proc0's trapframe pointer point to it for sanity.
+ * and make lwp0's trapframe pointer point to it for sanity.
*/
- proc0paddr->u_pcb.pcb_hw.apcb_ksp =
- (u_int64_t)proc0paddr + USPACE - sizeof(struct trapframe);
+ lwp0.l_addr->u_pcb.pcb_hw.apcb_ksp =
+ (vaddr_t)lwp0.l_addr + USPACE - sizeof(struct trapframe);
lwp0.l_md.md_tf =
- (struct trapframe *)proc0paddr->u_pcb.pcb_hw.apcb_ksp;
- simple_lock_init(&proc0paddr->u_pcb.pcb_fpcpu_slock);
+ (struct trapframe *)lwp0.l_addr->u_pcb.pcb_hw.apcb_ksp;
+ simple_lock_init(&lwp0.l_addr->u_pcb.pcb_fpcpu_slock);
- /* Indicate that proc0 has a CPU. */
+ /* Indicate that lwp0 has a CPU. */
lwp0.l_cpu = ci;
/*
diff -r 75044a9c85b8 -r de9273c71cd3 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Wed Nov 25 21:10:56 2009 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Thu Nov 26 00:19:11 2009 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index