Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern cleanup some old garbage
details: https://anonhg.NetBSD.org/src/rev/e002e2ef2778
branches: trunk
changeset: 758844:e002e2ef2778
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Nov 17 19:54:09 2010 +0000
description:
cleanup some old garbage
diffstat:
sys/rump/librump/rumpkern/lwproc.c | 6 +++---
sys/rump/librump/rumpkern/rump.c | 8 ++++----
sys/rump/librump/rumpkern/rump_private.h | 11 +----------
sys/rump/librump/rumpkern/rumpcopy.c | 14 +++++++-------
sys/rump/librump/rumpkern/vm.c | 10 +++++-----
5 files changed, 20 insertions(+), 29 deletions(-)
diffs (210 lines):
diff -r 78483009560d -r e002e2ef2778 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c Wed Nov 17 19:36:54 2010 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c Wed Nov 17 19:54:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwproc.c,v 1.4 2010/11/15 20:37:22 pooka Exp $ */
+/* $NetBSD: lwproc.c,v 1.5 2010/11/17 19:54:09 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.4 2010/11/15 20:37:22 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.5 2010/11/17 19:54:09 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -108,7 +108,7 @@
p->p_stats = pstatscopy(parent->p_stats);
/* not based on parent */
- p->p_vmspace = &vmspace0;
+ p->p_vmspace = vmspace_kernel();
p->p_emul = &emul_netbsd;
p->p_fd = fd_init(NULL);
lim_addref(parent->p_limit);
diff -r 78483009560d -r e002e2ef2778 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Wed Nov 17 19:36:54 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Wed Nov 17 19:54:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.197 2010/11/15 20:24:09 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.197 2010/11/15 20:24:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -484,7 +484,7 @@
uio->uio_offset = offset;
uio->uio_resid = bufsize;
uio->uio_rw = uiorw;
- uio->uio_vmspace = UIO_VMSPACE_SYS;
+ UIO_SETUP_SYSSPACE(uio);
return uio;
}
@@ -650,7 +650,7 @@
curproc->p_vmspace = &sp_vmspace;
rv = sy_call(callp, l, (void *)arg, retval);
if (iamtheserver)
- curproc->p_vmspace = &vmspace0;
+ curproc->p_vmspace = vmspace_kernel();
return rv;
}
diff -r 78483009560d -r e002e2ef2778 sys/rump/librump/rumpkern/rump_private.h
--- a/sys/rump/librump/rumpkern/rump_private.h Wed Nov 17 19:36:54 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump_private.h Wed Nov 17 19:54:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_private.h,v 1.61 2010/11/04 20:54:07 pooka Exp $ */
+/* $NetBSD: rump_private.h,v 1.62 2010/11/17 19:54:09 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -47,19 +47,13 @@
#include "rumpkern_if_priv.h"
-extern kauth_cred_t rump_cred;
-
extern struct rumpuser_mtx *rump_giantlock;
-#define UIO_VMSPACE_SYS (&vmspace0)
-
extern int rump_threads;
extern struct device rump_rootdev;
extern struct sysent rump_sysent[];
-extern struct vmspace vmspace0;
-
enum rump_component_type {
RUMP_COMPONENT_DEV,
RUMP_COMPONENT_NET, RUMP_COMPONENT_NET_ROUTE, RUMP_COMPONENT_NET_IF,
@@ -93,9 +87,6 @@
void rump_component_init(enum rump_component_type);
int rump_component_count(enum rump_component_type);
-void rump_gettime(struct timespec *);
-void rump_getuptime(struct timespec *);
-
void rump_set_vmspace(struct vmspace *);
typedef void (*rump_proc_vfs_init_fn)(struct proc *);
diff -r 78483009560d -r e002e2ef2778 sys/rump/librump/rumpkern/rumpcopy.c
--- a/sys/rump/librump/rumpkern/rumpcopy.c Wed Nov 17 19:36:54 2010 +0000
+++ b/sys/rump/librump/rumpkern/rumpcopy.c Wed Nov 17 19:54:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpcopy.c,v 1.9 2010/11/09 20:55:14 pooka Exp $ */
+/* $NetBSD: rumpcopy.c,v 1.10 2010/11/17 19:54:09 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.9 2010/11/09 20:55:14 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.10 2010/11/17 19:54:09 pooka Exp $");
#include <sys/param.h>
#include <sys/lwp.h>
@@ -44,7 +44,7 @@
return EFAULT;
}
- if (curproc->p_vmspace == &vmspace0) {
+ if (curproc->p_vmspace == vmspace_kernel()) {
memcpy(kaddr, uaddr, len);
} else {
rumpuser_sp_copyin(uaddr, kaddr, len);
@@ -60,7 +60,7 @@
return EFAULT;
}
- if (curproc->p_vmspace == &vmspace0) {
+ if (curproc->p_vmspace == vmspace_kernel()) {
memcpy(uaddr, kaddr, len);
} else {
rumpuser_sp_copyout(kaddr, uaddr, len);
@@ -72,7 +72,7 @@
subyte(void *uaddr, int byte)
{
- if (curproc->p_vmspace == &vmspace0)
+ if (curproc->p_vmspace == vmspace_kernel())
*(char *)uaddr = byte;
else
rumpuser_sp_copyout(&byte, uaddr, 1);
@@ -106,7 +106,7 @@
if (len == 0)
return 0;
- if (curproc->p_vmspace == &vmspace0)
+ if (curproc->p_vmspace == vmspace_kernel())
return copystr(uaddr, kaddr, len, done);
if ((rv = rumpuser_sp_copyin(uaddr, kaddr, len)) != 0)
@@ -133,7 +133,7 @@
{
size_t slen;
- if (curproc->p_vmspace == &vmspace0)
+ if (curproc->p_vmspace == vmspace_kernel())
return copystr(kaddr, uaddr, len, done);
slen = strlen(kaddr)+1;
diff -r 78483009560d -r e002e2ef2778 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c Wed Nov 17 19:36:54 2010 +0000
+++ b/sys/rump/librump/rumpkern/vm.c Wed Nov 17 19:54:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm.c,v 1.100 2010/11/16 01:12:57 uebayasi Exp $ */
+/* $NetBSD: vm.c,v 1.101 2010/11/17 19:54:09 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.100 2010/11/16 01:12:57 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.101 2010/11/17 19:54:09 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -345,7 +345,7 @@
if (*addr != 0)
panic("uvm_mmap() variant unsupported");
- if (curproc->p_vmspace == &vmspace0) {
+ if (curproc->p_vmspace == vmspace_kernel()) {
uaddr = rumpuser_anonmmap(NULL, size, 0, 0, &error);
} else {
error = rumpuser_sp_anonmmap(size, &uaddr);
@@ -708,7 +708,7 @@
uvm_vslock(struct vmspace *vs, void *addr, size_t len, vm_prot_t access)
{
- KASSERT(vs == &vmspace0);
+ KASSERT(vs == vmspace_kernel());
return 0;
}
@@ -716,7 +716,7 @@
uvm_vsunlock(struct vmspace *vs, void *addr, size_t len)
{
- KASSERT(vs == &vmspace0);
+ KASSERT(vs == vmspace_kernel());
}
void
Home |
Main Index |
Thread Index |
Old Index