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 misc_stub and emul have been the s...



details:   https://anonhg.NetBSD.org/src/rev/1739ab6c1667
branches:  trunk
changeset: 748760:1739ab6c1667
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Nov 04 19:21:51 2009 +0000

description:
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.

diffstat:

 sys/rump/librump/rumpkern/Makefile.rumpkern |   4 +-
 sys/rump/librump/rumpkern/emul.c            |  46 ++++++++++++++-
 sys/rump/librump/rumpkern/misc_stub.c       |  86 -----------------------------
 3 files changed, 46 insertions(+), 90 deletions(-)

diffs (186 lines):

diff -r 8758a8e7f70f -r 1739ab6c1667 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern       Wed Nov 04 19:17:53 2009 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern       Wed Nov 04 19:21:51 2009 +0000
@@ -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 @@
 
 # stubs
 #
-SRCS+= misc_stub.c pmap_stub.c
+SRCS+= pmap_stub.c
 
 # autogenerated
 #
diff -r 8758a8e7f70f -r 1739ab6c1667 sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c  Wed Nov 04 19:17:53 2009 +0000
+++ b/sys/rump/librump/rumpkern/emul.c  Wed Nov 04 19:21:51 2009 +0000
@@ -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 @@
 #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 @@
 
 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 @@
 
        /* 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)
+{
+
+}
diff -r 8758a8e7f70f -r 1739ab6c1667 sys/rump/librump/rumpkern/misc_stub.c
--- a/sys/rump/librump/rumpkern/misc_stub.c     Wed Nov 04 19:17:53 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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)
-{
-
-}
-



Home | Main Index | Thread Index | Old Index