Provide the default_mapaddr method in default rump emul (since some

kernel callers want to use it).
This commit is contained in:
pooka 2009-12-04 16:47:33 +00:00
parent 5f333ecef0
commit 04ec7e76db
2 changed files with 15 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump.c,v 1.144 2009/12/03 12:35:34 pooka Exp $ */
/* $NetBSD: rump.c,v 1.145 2009/12/04 16:47:33 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.144 2009/12/03 12:35:34 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.145 2009/12/04 16:47:33 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -123,7 +123,9 @@ rump_aiodone_worker(struct work *wk, void *dummy)
}
static int rump_inited;
static struct emul emul_rump;
static struct emul emul_rump = {
.e_vm_default_addr = uvm_default_mapaddr,
};
int rump__unavailable(void);
int rump__unavailable() {return EOPNOTSUPP;}
@ -455,6 +457,7 @@ rump_lwp_alloc(pid_t pid, lwpid_t lid)
p->p_limit = &rump_limits;
p->p_pid = pid;
p->p_vmspace = &rump_vmspace;
p->p_emul = &emul_rump;
p->p_fd = fd_init(NULL);
p->p_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
l->l_cred = rump_cred_suserget();

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm.c,v 1.67 2009/11/04 18:25:36 pooka Exp $ */
/* $NetBSD: vm.c,v 1.68 2009/12/04 16:47:33 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.67 2009/11/04 18:25:36 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.68 2009/12/04 16:47:33 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -251,7 +251,6 @@ rumpvm_init(void)
}
void
uvm_pagewire(struct vm_page *pg)
{
@ -502,6 +501,13 @@ uvm_object_printit(struct uvm_object *uobj, bool full,
/* nada for now */
}
vaddr_t
uvm_default_mapaddr(struct proc *p, vaddr_t base, vsize_t sz)
{
return 0;
}
/*
* UVM km
*/