Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Retire struct user, remove sys/user.h inclusions. Note ...
details: https://anonhg.NetBSD.org/src/rev/44690ffc2e8e
branches: trunk
changeset: 760834:44690ffc2e8e
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Jan 14 02:06:22 2011 +0000
description:
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.
Various #include fixes and review by matt@.
diffstat:
sys/arch/acorn26/acorn26/fpu.c | 18 +----------
sys/arch/acorn26/acorn26/fpuvar.h | 4 +-
sys/arch/algor/algor/machdep.c | 5 +-
sys/arch/alpha/include/proc.h | 4 +-
sys/arch/amd64/include/proc.h | 11 +++---
sys/arch/amiga/amiga/genassym.cf | 4 +-
sys/arch/amiga/amiga/trap.c | 6 +-
sys/arch/arm/arm32/cpuswitch.S | 8 ++--
sys/arch/arm/arm32/genassym.cf | 4 +-
sys/arch/arm/arm32/vm_machdep.c | 6 +-
sys/arch/arm/fpe-arm/armfpe.h | 4 +-
sys/arch/arm/imx/imxuart.c | 5 +-
sys/arch/arm/include/arm32/param.h | 10 +++---
sys/arch/arm/include/proc.h | 4 +-
sys/arch/atari/atari/genassym.cf | 4 +-
sys/arch/cesfic/cesfic/genassym.cf | 4 +-
sys/arch/cesfic/include/vmparam.h | 5 +--
sys/arch/evbmips/rmixl/machdep.c | 6 +--
sys/arch/evbppc/explora/machdep.c | 5 +-
sys/arch/evbppc/obs405/obs600_locore.S | 10 +-----
sys/arch/evbppc/walnut/machdep.c | 5 +-
sys/arch/hp300/hp300/genassym.cf | 4 +-
sys/arch/hp700/hp700/genassym.cf | 3 +-
sys/arch/hppa/hppa/fpu.c | 5 +-
sys/arch/hppa/hppa/hppa_machdep.c | 5 +-
sys/arch/hppa/hppa/pmap.c | 5 +-
sys/arch/hppa/hppa/process_machdep.c | 5 +-
sys/arch/hppa/hppa/sig_machdep.c | 5 +-
sys/arch/hppa/include/db_machdep.h | 3 +-
sys/arch/hppa/include/proc.h | 4 +-
sys/arch/i386/include/proc.h | 13 ++++---
sys/arch/ia64/include/proc.h | 3 +-
sys/arch/luna68k/luna68k/genassym.cf | 4 +-
sys/arch/m68k/include/db_machdep.h | 3 +-
sys/arch/m68k/include/pcb.h | 3 +-
sys/arch/m68k/include/proc.h | 3 +-
sys/arch/m68k/m68k/pmap_motorola.c | 7 ++-
sys/arch/m68k/m68k/process_machdep.c | 8 +++-
sys/arch/m68k/m68k/sig_machdep.c | 8 ++--
sys/arch/m68k/m68k/switch_subr.s | 4 +-
sys/arch/m68k/m68k/vm_machdep.c | 8 ++--
sys/arch/mac68k/mac68k/genassym.cf | 4 +-
sys/arch/mips/include/db_machdep.h | 5 +-
sys/arch/mips/include/proc.h | 3 +-
sys/arch/mips/mips/compat_13_machdep.c | 5 +-
sys/arch/mips/mips/compat_16_machdep.c | 5 +-
sys/arch/mips/mips/core_machdep.c | 7 ++-
sys/arch/mips/mips/genassym.cf | 5 +-
sys/arch/mips/mips/mips_emul.c | 7 ++-
sys/arch/mips/mips/mips_machdep.c | 5 +-
sys/arch/mips/mips/netbsd32_machdep.c | 9 ++---
sys/arch/mips/mips/process_machdep.c | 7 ++-
sys/arch/mips/mips/vm_machdep.c | 7 ++-
sys/arch/mvme68k/mvme68k/genassym.cf | 4 +-
sys/arch/mvme68k/mvme68k/machdep.c | 6 +-
sys/arch/news68k/news68k/genassym.cf | 4 +-
sys/arch/next68k/next68k/genassym.cf | 4 +-
sys/arch/powerpc/ibm4xx/pmap.c | 6 +-
sys/arch/powerpc/include/proc.h | 5 +-
sys/arch/powerpc/oea/altivec.c | 5 +-
sys/arch/powerpc/oea/oea_machdep.c | 5 +-
sys/arch/powerpc/powerpc/compat_16_machdep.c | 7 ++-
sys/arch/powerpc/powerpc/db_trace.c | 6 ++-
sys/arch/powerpc/powerpc/fpu.c | 5 +-
sys/arch/powerpc/powerpc/powerpc_machdep.c | 6 ++-
sys/arch/powerpc/powerpc/sig_machdep.c | 5 +-
sys/arch/powerpc/powerpc/syscall.c | 11 +++---
sys/arch/sh3/include/db_machdep.h | 3 +-
sys/arch/sh3/include/proc.h | 3 +-
sys/arch/sh3/sh3/exception.c | 5 +-
sys/arch/sh3/sh3/genassym.cf | 3 +-
sys/arch/sh3/sh3/sh3_machdep.c | 5 +-
sys/arch/sh3/sh3/vm_machdep.c | 8 ++--
sys/arch/sparc/dev/vme_machdep.c | 11 +++---
sys/arch/sparc/include/db_machdep.h | 3 +-
sys/arch/sparc/include/proc.h | 4 +-
sys/arch/sparc/sparc/autoconf.c | 5 +-
sys/arch/sparc/sparc/core_machdep.c | 5 +-
sys/arch/sparc/sparc/genassym.cf | 3 +-
sys/arch/sparc/sparc/machdep.c | 5 +-
sys/arch/sparc/sparc/trap.c | 5 +-
sys/arch/sparc/sparc/vm_machdep.c | 5 +-
sys/arch/sparc64/include/db_machdep.h | 3 +-
sys/arch/sparc64/include/proc.h | 4 +-
sys/arch/sparc64/sparc64/core_machdep.c | 5 +-
sys/arch/sparc64/sparc64/db_interface.c | 11 +-----
sys/arch/sparc64/sparc64/genassym.cf | 3 +-
sys/arch/sparc64/sparc64/machdep.c | 5 +-
sys/arch/sparc64/sparc64/netbsd32_machdep.c | 5 +-
sys/arch/sparc64/sparc64/trap.c | 5 +-
sys/arch/sparc64/sparc64/vm_machdep.c | 5 +-
sys/arch/vax/include/proc.h | 4 +-
sys/arch/x68k/x68k/genassym.cf | 4 +-
sys/compat/irix/irix_signal.c | 5 +-
sys/compat/linux/arch/powerpc/linux_machdep.c | 6 +-
sys/ddb/db_lwp.c | 6 ++-
sys/kern/core_netbsd.c | 16 +---------
sys/kern/kern_lwp.c | 6 ++-
sys/sys/lwp.h | 24 +++++----------
sys/sys/proc.h | 41 +++++++++++---------------
sys/sys/signalvar.h | 4 +-
sys/sys/types.h | 3 +-
sys/sys/user.h | 13 +++-----
sys/uvm/uvm_glue.c | 14 ++++----
104 files changed, 315 insertions(+), 333 deletions(-)
diffs (truncated from 2669 to 300 lines):
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/acorn26/acorn26/fpu.c
--- a/sys/arch/acorn26/acorn26/fpu.c Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/acorn26/acorn26/fpu.c Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.11 2009/11/21 20:32:17 rmind Exp $ */
+/* $NetBSD: fpu.c,v 1.12 2011/01/14 02:06:22 rmind Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -32,7 +32,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.11 2009/11/21 20:32:17 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.12 2011/01/14 02:06:22 rmind Exp $");
#include <sys/device.h>
#include <sys/proc.h>
@@ -128,17 +128,3 @@
remove_coproc_handler(uh);
return fpsr & FPSR_SYSID_MASK;
}
-
-void
-fpu_swapout(struct proc *p)
-{
- struct pcb *pcb;
-
- pcb = &p->p_addr->u_pcb;
- if (pcb->pcb_flags & PCB_OWNFPU) {
- the_fpu->sc_ctxsave(&pcb->pcb_ff);
- the_fpu->sc_disable();
- the_fpu->sc_owner = NULL;
- pcb->pcb_flags &= ~PCB_OWNFPU;
- }
-}
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/acorn26/acorn26/fpuvar.h
--- a/sys/arch/acorn26/acorn26/fpuvar.h Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/acorn26/acorn26/fpuvar.h Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpuvar.h,v 1.2 2002/03/24 23:37:42 bjh21 Exp $ */
+/* $NetBSD: fpuvar.h,v 1.3 2011/01/14 02:06:22 rmind Exp $ */
/*-
* Copyright (c) 2001 Ben Harris
@@ -48,8 +48,6 @@
#ifdef _KERNEL
extern struct fpu_softc *the_fpu;
-extern void fpu_swapout(struct proc *);
-
void fpctx_save_fpa(struct fpframe *);
void fpctx_load_fpa(struct fpframe *);
void fpu_enable_fpa(void);
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/algor/algor/machdep.c Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.46 2010/11/15 06:08:32 uebayasi Exp $ */
+/* $NetBSD: machdep.c,v 1.47 2011/01/14 02:06:22 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.46 2010/11/15 06:08:32 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.47 2011/01/14 02:06:22 rmind Exp $");
#include "opt_algor_p4032.h"
#include "opt_algor_p5064.h"
@@ -146,6 +146,7 @@
#include <machine/bus.h>
#include <machine/autoconf.h>
#include <machine/pmon.h>
+#include <machine/pcb.h>
#include <algor/pci/vtpbcvar.h>
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/alpha/include/proc.h
--- a/sys/arch/alpha/include/proc.h Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/alpha/include/proc.h Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.18 2009/11/21 05:35:41 rmind Exp $ */
+/* $NetBSD: proc.h,v 1.19 2011/01/14 02:06:22 rmind Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -30,8 +30,8 @@
#ifndef _ALPHA_PROC_H
#define _ALPHA_PROC_H
-#include <sys/user.h> /* for sizeof(struct user) */
#include <machine/frame.h>
+#include <machine/pcb.h>
/*
* Machine-dependent part of the lwp struct for the Alpha.
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/amd64/include/proc.h
--- a/sys/arch/amd64/include/proc.h Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/amd64/include/proc.h Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.12 2009/03/14 14:45:54 dsl Exp $ */
+/* $NetBSD: proc.h,v 1.13 2011/01/14 02:06:22 rmind Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@@ -36,8 +36,8 @@
#ifdef __x86_64__
-#include <sys/user.h> /* for sizeof(struct user) */
#include <machine/frame.h>
+#include <machine/pcb.h>
/*
* Machine-dependent part of the lwp structure for amd64.
@@ -66,9 +66,10 @@
#define MDP_USEDMTRR 0x0008 /* has set volatile MTRRs */
#define MDP_IRET 0x0010 /* return via iret, not sysret */
-#define UAREA_USER_OFFSET (USPACE - ALIGN(sizeof(struct user)))
-#define KSTACK_LOWEST_ADDR(l) ((void *)USER_TO_UAREA((l)->l_addr))
-#define KSTACK_SIZE UAREA_USER_OFFSET
+#define UAREA_PCB_OFFSET (USPACE - ALIGN(sizeof(struct pcb)))
+#define KSTACK_LOWEST_ADDR(l) \
+ ((void *)((vaddr_t)(l)->l_addr - UAREA_PCB_OFFSET))
+#define KSTACK_SIZE UAREA_PCB_OFFSET
#else /* __x86_64__ */
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/amiga/amiga/genassym.cf
--- a/sys/arch/amiga/amiga/genassym.cf Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/amiga/amiga/genassym.cf Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.29 2010/12/20 00:25:25 matt Exp $
+# $NetBSD: genassym.cf,v 1.30 2011/01/14 02:06:23 rmind Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -51,7 +51,7 @@
endif
include <machine/psl.h>
-include <machine/reg.h>
+include <machine/pcb.h>
include <machine/pte.h>
include <amiga/amiga/cia.h>
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/amiga/amiga/trap.c
--- a/sys/arch/amiga/amiga/trap.c Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/amiga/amiga/trap.c Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.131 2010/12/20 00:25:25 matt Exp $ */
+/* $NetBSD: trap.c,v 1.132 2011/01/14 02:06:23 rmind Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -84,7 +84,7 @@
#include "opt_m68k_arch.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.131 2010/12/20 00:25:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.132 2011/01/14 02:06:23 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,7 +105,7 @@
#include <machine/psl.h>
#include <machine/trap.h>
#include <machine/cpu.h>
-#include <machine/reg.h>
+#include <machine/pcb.h>
#include <machine/pte.h>
#include <m68k/fpe/fpu_emulate.h>
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/arm/arm32/cpuswitch.S
--- a/sys/arch/arm/arm32/cpuswitch.S Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/arm/arm32/cpuswitch.S Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuswitch.S,v 1.60 2009/12/10 05:10:01 rmind Exp $ */
+/* $NetBSD: cpuswitch.S,v 1.61 2011/01/14 02:06:23 rmind Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -90,7 +90,7 @@
#include <machine/asm.h>
#include <machine/cpu.h>
- RCSID("$NetBSD: cpuswitch.S,v 1.60 2009/12/10 05:10:01 rmind Exp $")
+ RCSID("$NetBSD: cpuswitch.S,v 1.61 2011/01/14 02:06:23 rmind Exp $")
/* LINTSTUB: include <sys/param.h> */
@@ -296,8 +296,8 @@
bl _C_LABEL(vfp_loadcontext)
#endif
#ifdef ARMFPE
- add r0, r7, #(USER_SIZE) & 0x00ff
- add r0, r0, #(USER_SIZE) & 0xff00
+ add r0, r7, #(PCB_SIZE) & 0x00ff
+ add r0, r0, #(PCB_SIZE) & 0xff00
bl _C_LABEL(arm_fpe_core_changecontext)
#endif
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/arm/arm32/genassym.cf
--- a/sys/arch/arm/arm32/genassym.cf Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/arm/arm32/genassym.cf Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.43 2010/12/20 00:25:27 matt Exp $
+# $NetBSD: genassym.cf,v 1.44 2011/01/14 02:06:23 rmind Exp $
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -107,7 +107,7 @@
define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
define PCB_NOALIGNFLT PCB_NOALIGNFLT
-define USER_SIZE sizeof(struct user)
+define PCB_SIZE sizeof(struct pcb)
define VM_MAP offsetof(struct vmspace, vm_map)
define VM_PMAP offsetof(struct vmspace, vm_map.pmap)
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/arm/arm32/vm_machdep.c
--- a/sys/arch/arm/arm32/vm_machdep.c Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/arm/arm32/vm_machdep.c Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.53 2009/11/29 04:15:42 rmind Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.54 2011/01/14 02:06:23 rmind Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.53 2009/11/29 04:15:42 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.54 2011/01/14 02:06:23 rmind Exp $");
#include "opt_armfpe.h"
#include "opt_pmap_debug.h"
@@ -238,7 +238,7 @@
u_char *ptr;
int loop;
- ptr = ((u_char *)p2->p_addr) + USPACE_SVC_STACK_BOTTOM;
+ ptr = (u_char *)pcb + USPACE_SVC_STACK_BOTTOM;
for (loop = 0; loop < (USPACE_SVC_STACK_TOP - USPACE_SVC_STACK_BOTTOM)
&& *ptr == 0xdd; ++loop, ++ptr) ;
log(LOG_INFO, "%d bytes of svc stack fill pattern\n", loop);
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/arm/fpe-arm/armfpe.h
--- a/sys/arch/arm/fpe-arm/armfpe.h Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/arm/fpe-arm/armfpe.h Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: armfpe.h,v 1.5 2009/03/14 14:45:55 dsl Exp $ */
+/* $NetBSD: armfpe.h,v 1.6 2011/01/14 02:06:23 rmind Exp $ */
/*
* Copyright (c) 1995 Neil A Carson.
@@ -105,7 +105,7 @@
/* macro to return the FP context for a process */
-#define FP_CONTEXT(p) ((u_int)(((u_char *)(p)->p_addr) + sizeof(struct user)))
+#define FP_CONTEXT(p) ((u_int)(((u_char *)(p)->p_addr) + sizeof(struct pcb)))
/* Prototypes */
diff -r 66a283486d3f -r 44690ffc2e8e sys/arch/arm/imx/imxuart.c
--- a/sys/arch/arm/imx/imxuart.c Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/arm/imx/imxuart.c Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imxuart.c,v 1.6 2010/11/27 13:37:27 bsh Exp $ */
+/* $NetBSD: imxuart.c,v 1.7 2011/01/14 02:06:23 rmind Exp $ */
/*
* Copyright (c) 2009, 2010 Genetec Corporation. All rights reserved.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.6 2010/11/27 13:37:27 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.7 2011/01/14 02:06:23 rmind Exp $");
#include "opt_imxuart.h"
#include "opt_ddb.h"
@@ -143,7 +143,6 @@
#include <sys/poll.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 66a283486d3f -r 44690ffc2e8e sys/arch/arm/include/arm32/param.h
--- a/sys/arch/arm/include/arm32/param.h Fri Jan 14 00:59:14 2011 +0000
+++ b/sys/arch/arm/include/arm32/param.h Fri Jan 14 02:06:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.15 2010/02/08 19:02:26 joerg Exp $ */
Home |
Main Index |
Thread Index |
Old Index