Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use lwp_getpcb() on sparc{64} and sun2/3 MD code, c...
details: https://anonhg.NetBSD.org/src/rev/4afa979fa0c7
branches: trunk
changeset: 749191:4afa979fa0c7
user: rmind <rmind%NetBSD.org@localhost>
date: Sat Nov 21 04:16:51 2009 +0000
description:
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
diffstat:
sys/arch/sparc/dev/com_obio.c | 5 +--
sys/arch/sparc/dev/tctrl.c | 5 +--
sys/arch/sparc/dev/vme_machdep.c | 7 ++---
sys/arch/sparc/fpu/fpu.c | 7 +++--
sys/arch/sparc/include/pmap.h | 3 +-
sys/arch/sparc/sparc/compat_13_machdep.c | 5 +--
sys/arch/sparc/sparc/compat_16_machdep.c | 5 +--
sys/arch/sparc/sparc/core_machdep.c | 5 +--
sys/arch/sparc/sparc/cpu.c | 6 ++--
sys/arch/sparc/sparc/db_interface.c | 7 ++---
sys/arch/sparc/sparc/db_trace.c | 13 ++++-----
sys/arch/sparc/sparc/genassym.cf | 3 +-
sys/arch/sparc/sparc/machdep.c | 16 ++++++------
sys/arch/sparc/sparc/process_machdep.c | 5 +--
sys/arch/sparc/sparc/sunos_machdep.c | 5 +--
sys/arch/sparc/sparc/svr4_machdep.c | 5 +--
sys/arch/sparc/sparc/trap.c | 29 +++++++++++++---------
sys/arch/sparc/sparc/vm_machdep.c | 11 +++----
sys/arch/sparc64/sparc64/compat_13_machdep.c | 5 +--
sys/arch/sparc64/sparc64/compat_16_machdep.c | 5 +--
sys/arch/sparc64/sparc64/core_machdep.c | 5 +--
sys/arch/sparc64/sparc64/cpu.c | 6 ++--
sys/arch/sparc64/sparc64/db_interface.c | 13 +++++----
sys/arch/sparc64/sparc64/db_trace.c | 11 +++----
sys/arch/sparc64/sparc64/machdep.c | 5 +--
sys/arch/sparc64/sparc64/netbsd32_machdep.c | 5 +--
sys/arch/sparc64/sparc64/process_machdep.c | 5 +--
sys/arch/sparc64/sparc64/sunos32_machdep.c | 5 +--
sys/arch/sparc64/sparc64/sunos_machdep.c | 5 +--
sys/arch/sparc64/sparc64/svr4_32_machdep.c | 5 +--
sys/arch/sparc64/sparc64/svr4_machdep.c | 5 +--
sys/arch/sparc64/sparc64/syscall.c | 5 +--
sys/arch/sparc64/sparc64/trap.c | 36 ++++++++++++++++-----------
sys/arch/sparc64/sparc64/vm_machdep.c | 11 +++----
sys/arch/sun2/dev/sc_mbmem.c | 5 +--
sys/arch/sun2/sun2/machdep.c | 8 +++---
sys/arch/sun2/sun2/pmap.c | 5 +--
sys/arch/sun2/sun2/trap.c | 26 +++++++++----------
sys/arch/sun3/dev/si.c | 5 +--
sys/arch/sun3/dev/si_obio.c | 5 +--
sys/arch/sun3/dev/si_sebuf.c | 5 +--
sys/arch/sun3/dev/si_vme.c | 5 +--
sys/arch/sun3/sun3/cache.c | 5 +--
sys/arch/sun3/sun3/dvma.c | 5 +--
sys/arch/sun3/sun3/machdep.c | 10 +++---
sys/arch/sun3/sun3/pmap.c | 5 +--
sys/arch/sun3/sun3/trap.c | 32 +++++++++++-------------
sys/arch/sun3/sun3x/dvma.c | 5 +--
sys/arch/sun3/sun3x/locore2.c | 5 +--
sys/arch/sun3/sun3x/machdep.c | 10 +++---
sys/arch/sun3/sun3x/pmap.c | 5 +--
51 files changed, 195 insertions(+), 225 deletions(-)
diffs (truncated from 1892 to 300 lines):
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/dev/com_obio.c
--- a/sys/arch/sparc/dev/com_obio.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/dev/com_obio.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com_obio.c,v 1.22 2008/04/28 20:23:35 martin Exp $ */
+/* $NetBSD: com_obio.c,v 1.23 2009/11/21 04:16:51 rmind Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_obio.c,v 1.22 2008/04/28 20:23:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_obio.c,v 1.23 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,7 +69,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 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/dev/tctrl.c
--- a/sys/arch/sparc/dev/tctrl.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/dev/tctrl.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tctrl.c,v 1.49 2008/07/17 14:43:38 cegger Exp $ */
+/* $NetBSD: tctrl.c,v 1.50 2009/11/21 04:16:51 rmind Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.49 2008/07/17 14:43:38 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.50 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -38,7 +38,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 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/dev/vme_machdep.c
--- a/sys/arch/sparc/dev/vme_machdep.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/dev/vme_machdep.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vme_machdep.c,v 1.60 2009/09/20 16:18:21 tsutsui Exp $ */
+/* $NetBSD: vme_machdep.c,v 1.61 2009/11/21 04:16:51 rmind Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.60 2009/09/20 16:18:21 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.61 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/extent.h>
@@ -40,7 +40,6 @@
#include <sys/errno.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/syslog.h>
#include <uvm/uvm_extern.h>
@@ -680,7 +679,7 @@
s = splhigh();
- xpcb = &curlwp->l_addr->u_pcb;
+ xpcb = lwp_getpcb(curlwp);
saveonfault = (u_long)xpcb->pcb_onfault;
vec = fkbyte(addr, xpcb);
xpcb->pcb_onfault = (void *)saveonfault;
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/fpu/fpu.c
--- a/sys/arch/sparc/fpu/fpu.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/fpu/fpu.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.25 2005/11/16 23:24:44 uwe Exp $ */
+/* $NetBSD: fpu.c,v 1.26 2009/11/21 04:16:51 rmind Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.25 2005/11/16 23:24:44 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.26 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -255,11 +255,12 @@
fetch instr from pc
decode
if (integer instr) {
+ struct pcb *pcb = lwp_getpcb(l);
/*
* We do this here, rather than earlier, to avoid
* losing even more badly than usual.
*/
- if (l->l_addr->u_pcb.pcb_uw) {
+ if (pcb->pcb_uw) {
write_user_windows();
if (rwindow_save(l))
sigexit(l, SIGILL);
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/include/pmap.h
--- a/sys/arch/sparc/include/pmap.h Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/include/pmap.h Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.87 2009/11/07 07:27:46 cegger Exp $ */
+/* $NetBSD: pmap.h,v 1.88 2009/11/21 04:16:51 rmind Exp $ */
/*
* Copyright (c) 1996
@@ -267,7 +267,6 @@
#endif
void pmap_redzone(void);
void kvm_uncache(char *, int);
-struct user;
int mmu_pagein(struct pmap *pm, vaddr_t, int);
void pmap_writetext(unsigned char *, int);
void pmap_globalize_boot_cpuinfo(struct cpu_info *);
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/sparc/compat_13_machdep.c
--- a/sys/arch/sparc/sparc/compat_13_machdep.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/sparc/compat_13_machdep.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_13_machdep.c,v 1.11 2008/11/22 15:32:59 he Exp $ */
+/* $NetBSD: compat_13_machdep.c,v 1.12 2009/11/21 04:16:51 rmind Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.11 2008/11/22 15:32:59 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.12 2009/11/21 04:16:51 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -40,7 +40,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/kernel.h>
#include <sys/mount.h>
#include <sys/signal.h>
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/sparc/compat_16_machdep.c
--- a/sys/arch/sparc/sparc/compat_16_machdep.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/sparc/compat_16_machdep.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_16_machdep.c,v 1.3 2008/11/28 09:01:00 he Exp $ */
+/* $NetBSD: compat_16_machdep.c,v 1.4 2009/11/21 04:16:51 rmind Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -71,13 +71,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.3 2008/11/28 09:01:00 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.4 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/signal.h>
#include <sys/signalvar.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/syscallargs.h>
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/sparc/core_machdep.c
--- a/sys/arch/sparc/sparc/core_machdep.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/sparc/core_machdep.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core_machdep.c,v 1.3 2009/08/15 23:45:00 matt Exp $ */
+/* $NetBSD: core_machdep.c,v 1.4 2009/11/21 04:16:51 rmind Exp $ */
/*
* Copyright (c) 1996
@@ -49,12 +49,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.3 2009/08/15 23:45:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.4 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/core.h>
#include <sys/malloc.h>
#include <sys/buf.h>
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/sparc/cpu.c
--- a/sys/arch/sparc/sparc/cpu.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/sparc/cpu.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.218 2009/06/11 14:42:47 tsutsui Exp $ */
+/* $NetBSD: cpu.c,v 1.219 2009/11/21 04:16:51 rmind Exp $ */
/*
* Copyright (c) 1996
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.218 2009/06/11 14:42:47 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.219 2009/11/21 04:16:51 rmind Exp $");
#include "opt_multiprocessor.h"
#include "opt_lockdebug.h"
@@ -428,7 +428,7 @@
* The %wim register will be initialized in cpu_hatch().
*/
cpi->ci_curlwp = cpi->ci_data.cpu_idlelwp;
- cpi->curpcb = (struct pcb *)cpi->ci_curlwp->l_addr;
+ cpi->curpcb = lwp_getpcb(cpi->ci_curlwp);
cpi->curpcb->pcb_wim = 1;
/* for now use the fixed virtual addresses setup in autoconf.c */
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/sparc/db_interface.c
--- a/sys/arch/sparc/sparc/db_interface.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/sparc/db_interface.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.84 2009/05/18 01:36:11 mrg Exp $ */
+/* $NetBSD: db_interface.c,v 1.85 2009/11/21 04:16:51 rmind Exp $ */
/*
* Mach Operating System
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.84 2009/05/18 01:36:11 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.85 2009/11/21 04:16:51 rmind Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -41,7 +41,6 @@
#include <sys/param.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <sys/reboot.h>
#include <sys/systm.h>
#include <sys/simplelock.h>
@@ -380,7 +379,7 @@
db_printf("profile timer: %lld sec %ld nsec\n",
p->p_stats->p_timer[ITIMER_PROF].it_value.tv_sec,
p->p_stats->p_timer[ITIMER_PROF].it_value.tv_nsec);
- db_printf("pcb: %p\n", &l->l_addr->u_pcb);
+ db_printf("pcb: %p\n", lwp_getpcb(l));
return;
}
diff -r 4ae926fa755f -r 4afa979fa0c7 sys/arch/sparc/sparc/db_trace.c
--- a/sys/arch/sparc/sparc/db_trace.c Sat Nov 21 04:04:07 2009 +0000
+++ b/sys/arch/sparc/sparc/db_trace.c Sat Nov 21 04:16:51 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.31 2009/10/21 21:12:02 rmind Exp $ */
+/* $NetBSD: db_trace.c,v 1.32 2009/11/21 04:16:51 rmind Exp $ */
/*
* Mach Operating System
@@ -27,11 +27,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.31 2009/10/21 21:12:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.32 2009/11/21 04:16:51 rmind Exp $");
#include <sys/param.h>
#include <sys/proc.h>
-#include <sys/user.h>
#include <machine/db_machdep.h>
#include <ddb/db_access.h>
@@ -78,7 +77,7 @@
} else {
if (trace_thread) {
struct proc *p;
- struct user *u;
+ struct pcb *pcb;
struct lwp *l;
Home |
Main Index |
Thread Index |
Old Index