misc_stub and emul have been the same thing for a looong time now,

so just move the few remaining routines in misc_stub to emul.
This commit is contained in:
pooka 2009-11-04 19:21:51 +00:00
parent c03306bc0d
commit d502da58ec
3 changed files with 46 additions and 90 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.rumpkern,v 1.61 2009/11/04 19:17:53 pooka Exp $
# $NetBSD: Makefile.rumpkern,v 1.62 2009/11/04 19:21:51 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@ -21,7 +21,7 @@ SRCS= rump.c rumpcopy.c emul.c intr.c locks.c ltsleep.c \
# stubs
#
SRCS+= misc_stub.c pmap_stub.c
SRCS+= pmap_stub.c
# autogenerated
#

View File

@ -1,4 +1,4 @@
/* $NetBSD: emul.c,v 1.108 2009/11/04 19:17:53 pooka Exp $ */
/* $NetBSD: emul.c,v 1.109 2009/11/04 19:21:51 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.108 2009/11/04 19:17:53 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.109 2009/11/04 19:21:51 pooka Exp $");
#include <sys/param.h>
#include <sys/null.h>
@ -51,6 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.108 2009/11/04 19:17:53 pooka Exp $");
#include <sys/module.h>
#include <sys/tty.h>
#include <sys/reboot.h>
#include <sys/syscallvar.h>
#include <sys/xcall.h>
#include <dev/cons.h>
@ -113,6 +115,11 @@ int booted_partition;
kmutex_t tty_lock;
/* sparc doesn't sport constant page size */
#ifdef __sparc__
int nbpg = 4096;
#endif
devclass_t
device_class(device_t dev)
{
@ -465,3 +472,38 @@ pmf_device_deregister(struct device *dev)
/* nada */
}
int
syscall_establish(const struct emul *em, const struct syscall_package *sp)
{
extern struct sysent rump_sysent[];
int i;
KASSERT(em == NULL || em == &emul_netbsd);
for (i = 0; sp[i].sp_call; i++)
rump_sysent[sp[i].sp_code].sy_call = sp[i].sp_call;
return 0;
}
int
syscall_disestablish(const struct emul *em, const struct syscall_package *sp)
{
return 0;
}
/* crosscalls not done, no other hardware CPUs */
uint64_t
xc_broadcast(u_int flags, xcfunc_t func, void *arg1, void *arg2)
{
return -1;
}
void
xc_wait(uint64_t where)
{
}

View File

@ -1,86 +0,0 @@
/* $NetBSD: misc_stub.c,v 1.25 2009/11/04 18:11:11 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
*
* Development of this software was supported by Google Summer of Code.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: misc_stub.c,v 1.25 2009/11/04 18:11:11 pooka Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
#include <sys/evcnt.h>
#include <sys/event.h>
#include <sys/kauth.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/syscallvar.h>
#include <sys/xcall.h>
#ifdef __sparc__
/*
* XXX Least common denominator - smallest sparc pagesize.
* Could just be declared, pooka says rump doesn't use ioctl.
*/
int nbpg = 4096;
#endif
int
syscall_establish(const struct emul *em, const struct syscall_package *sp)
{
extern struct sysent rump_sysent[];
int i;
KASSERT(em == NULL || em == &emul_netbsd);
for (i = 0; sp[i].sp_call; i++)
rump_sysent[sp[i].sp_code].sy_call = sp[i].sp_call;
return 0;
}
int
syscall_disestablish(const struct emul *em, const struct syscall_package *sp)
{
return 0;
}
/* crosscalls not done, no other hardware CPUs */
uint64_t
xc_broadcast(u_int flags, xcfunc_t func, void *arg1, void *arg2)
{
return -1;
}
void
xc_wait(uint64_t where)
{
}