CVS commit: src/sys/rump/kern/lib/libsys_linux
Module Name:src Committed By: njoly Date: Fri Apr 4 18:24:12 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_linux: sys_linux_component.c syscalls.master Log Message: Add support for timing syscalls. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c cvs rdiff -u -r1.13 -r1.14 src/sys/rump/kern/lib/libsys_linux/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c diff -u src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.1 src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.2 --- src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.1 Thu Mar 13 02:03:47 2014 +++ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c Fri Apr 4 18:24:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_linux_component.c,v 1.1 2014/03/13 02:03:47 pooka Exp $ */ +/* $NetBSD: sys_linux_component.c,v 1.2 2014/04/04 18:24:12 njoly Exp $ */ #include #include @@ -58,14 +58,6 @@ linux_fakedev(dev_t in, int raw) void rumplinux__stub(void); void rumplinux__stub(void) {panic("unavailable");} -/* timing */ -__weak_alias(clock_gettime1,rumplinux__stub); -__weak_alias(clock_settime1,rumplinux__stub); -__weak_alias(clock_getres1,rumplinux__stub); -__weak_alias(compat_50_sys_gettimeofday,rumplinux__stub); -__weak_alias(compat_50_sys_settimeofday,rumplinux__stub); -__weak_alias(nanosleep1,rumplinux__stub); - /* vm-related */ __weak_alias(sys_mmap,rumplinux__stub); __weak_alias(vm_map_unlock,rumplinux__stub); Index: src/sys/rump/kern/lib/libsys_linux/syscalls.master diff -u src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.13 src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.14 --- src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.13 Sat Jan 25 10:30:22 2014 +++ src/sys/rump/kern/lib/libsys_linux/syscalls.master Fri Apr 4 18:24:12 2014 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.13 2014/01/25 10:30:22 njoly Exp $ + $NetBSD: syscalls.master,v 1.14 2014/04/04 18:24:12 njoly Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -540,11 +540,13 @@ 414 UNIMPL pset_assign 415 UNIMPL _pset_bind 416 UNIMPL fadvise -417 NOARGS { int|linux_sys||select(int nd, \ +417 NOARGS { int|linux_sys||select(int nd, \ fd_set *in, fd_set *ou, fd_set *ex, \ struct timeval50 *tv); } -418 UNIMPL gettimeofday -419 UNIMPL settimeofday +418 NOARGS { int|linux_sys||gettimeofday(struct timeval50 *tp, \ + struct timezone *tzp); } +419 NOARGS { int|linux_sys||settimeofday(struct timeval50 *tp, \ + struct timezone *tzp); } 420 NOARGS { int|linux_sys||utimes(const char *path, \ struct linux_timeval *tv); } 421 UNIMPL adjtime @@ -555,10 +557,15 @@ const struct timeval *tptr); } 425 UNIMPL setitimer 426 UNIMPL getitimer -427 UNIMPL clock_gettime -428 UNIMPL clock_settime -429 UNIMPL clock_getres -430 UNIMPL nanosleep +427 NOARGS { int|linux_sys||clock_gettime(clockid_t which, \ + struct linux_timespec *tp); } +428 NOARGS { int|linux_sys||clock_settime(clockid_t which, \ + struct linux_timespec *tp); } +429 NOARGS { int|linux_sys||clock_getres(clockid_t which, \ + struct linux_timespec *tp); } +430 NOARGS { int|linux_sys||nanosleep( \ + const struct linux_timespec *rqtp, \ + struct linux_timespec *rmtp); } 431 UNIMPL __sigtimedwait 432 UNIMPL mq_timedsend 433 UNIMPL mq_timedreceive @@ -626,3 +633,6 @@ 474 UNIMPL posix_spawn 475 UNIMPL recvmmsg 476 UNIMPL sendmmsg +477 NOARGS { int|linux_sys||clock_nanosleep(clockid_t which, \ + int flags, struct linux_timespec *rqtp, \ + struct linux_timespec *rmtp); }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: njoly Date: Fri Apr 4 18:20:28 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern Log Message: Add compat 50 time syscalls, needed by rump sys_linux. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/rump/librump/rumpkern/Makefile.rumpkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.142 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.143 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.142 Wed Apr 2 19:37:17 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Fri Apr 4 18:20:28 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.142 2014/04/02 19:37:17 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.143 2014/04/04 18:20:28 njoly Exp $ # .include "${RUMPTOP}/Makefile.rump" @@ -153,6 +153,7 @@ SRCS+= rijndael.c # compat SRCS+= kern_select_50.c +SRCS+= kern_time_50.c # Set RUMP_UNREAL_ALLOCATORS to "yes" to use memory allocation hypercalls # directly instead of the kmem/pool allocators backed by hypercalls.
CVS commit: src/sys/rump/dev/lib/libpci_if_wm
Module Name:src Committed By: pooka Date: Fri Apr 4 14:49:09 UTC 2014 Added Files: src/sys/rump/dev/lib/libpci_if_wm: Makefile PCI_IF_WM.ioconf shlib_version wm_at_pci.c Log Message: Add a rump kernel component that can attach if_wm @ pci To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libpci_if_wm/Makefile \ src/sys/rump/dev/lib/libpci_if_wm/PCI_IF_WM.ioconf \ src/sys/rump/dev/lib/libpci_if_wm/shlib_version \ src/sys/rump/dev/lib/libpci_if_wm/wm_at_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/dev/lib/libpci_if_wm/Makefile diff -u /dev/null src/sys/rump/dev/lib/libpci_if_wm/Makefile:1.1 --- /dev/null Fri Apr 4 14:49:09 2014 +++ src/sys/rump/dev/lib/libpci_if_wm/Makefile Fri Apr 4 14:49:09 2014 @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1 2014/04/04 14:49:09 pooka Exp $ +# + +RUMPTOP=${TOPRUMP} + +.PATH: ${RUMPTOP}/../dev/pci + +LIB= rumpdev_pci_if_wm +IOCONF= PCI_IF_WM.ioconf + +SRCS= wm_at_pci.c + +SRCS+= if_wm.c + +CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern + +.include "${RUMPTOP}/Makefile.rump" +.include +.include Index: src/sys/rump/dev/lib/libpci_if_wm/PCI_IF_WM.ioconf diff -u /dev/null src/sys/rump/dev/lib/libpci_if_wm/PCI_IF_WM.ioconf:1.1 --- /dev/null Fri Apr 4 14:49:09 2014 +++ src/sys/rump/dev/lib/libpci_if_wm/PCI_IF_WM.ioconf Fri Apr 4 14:49:09 2014 @@ -0,0 +1,12 @@ +# $NetBSD: PCI_IF_WM.ioconf,v 1.1 2014/04/04 14:49:09 pooka Exp $ +# + +ioconf pci_if_wm + +include "conf/files" +include "dev/pci/files.pci" +include "rump/dev/files.rump" + +pseudo-root pci* + +wm* at pci? dev ? function ?# Intel gigabit Index: src/sys/rump/dev/lib/libpci_if_wm/shlib_version diff -u /dev/null src/sys/rump/dev/lib/libpci_if_wm/shlib_version:1.1 --- /dev/null Fri Apr 4 14:49:09 2014 +++ src/sys/rump/dev/lib/libpci_if_wm/shlib_version Fri Apr 4 14:49:09 2014 @@ -0,0 +1,2 @@ +major=0 +minor=0 Index: src/sys/rump/dev/lib/libpci_if_wm/wm_at_pci.c diff -u /dev/null src/sys/rump/dev/lib/libpci_if_wm/wm_at_pci.c:1.1 --- /dev/null Fri Apr 4 14:49:09 2014 +++ src/sys/rump/dev/lib/libpci_if_wm/wm_at_pci.c Fri Apr 4 14:49:09 2014 @@ -0,0 +1,45 @@ +/* $NetBSD: wm_at_pci.c,v 1.1 2014/04/04 14:49:09 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: wm_at_pci.c,v 1.1 2014/04/04 14:49:09 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" + +#include "ioconf.c" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + + config_init_component(cfdriver_ioconf_pci_if_wm, + cfattach_ioconf_pci_if_wm, cfdata_ioconf_pci_if_wm); +}
CVS commit: src/sys/rump/dev
Module Name:src Committed By: pooka Date: Fri Apr 4 14:49:41 UTC 2014 Modified Files: src/sys/rump/dev: Makefile.rumpdevcomp Log Message: Add PCI components, commented out from the default build for now. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/dev/Makefile.rumpdevcomp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/Makefile.rumpdevcomp diff -u src/sys/rump/dev/Makefile.rumpdevcomp:1.7 src/sys/rump/dev/Makefile.rumpdevcomp:1.8 --- src/sys/rump/dev/Makefile.rumpdevcomp:1.7 Tue Jan 14 17:17:52 2014 +++ src/sys/rump/dev/Makefile.rumpdevcomp Fri Apr 4 14:49:40 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpdevcomp,v 1.7 2014/01/14 17:17:52 pgoyette Exp $ +# $NetBSD: Makefile.rumpdevcomp,v 1.8 2014/04/04 14:49:40 pooka Exp $ # RUMPDEVCOMP= audio bpf cgd disk dm drvctl fss md netsmb pad pud \ @@ -7,6 +7,10 @@ RUMPDEVCOMP= audio bpf cgd disk dm drvct RUMPUSBDEVS= ubt ucom ugenhc ulpt umass usb +RUMPPCIDEVS= pci pci_if_wm +# Not really a PCI device, but +RUMPPCIDEVS= miiphy + .for var in ${RUMPDEVCOMP} RUMPDEVLIBS+=lib${var} RUMPDEVLDADD+=-lrumpdev_${var} @@ -15,3 +19,8 @@ RUMPDEVLDADD+=-lrumpdev_${var} .for var in ${RUMPUSBDEVS} RUMPDEVLIBS+=lib${var} .endfor + +# Currently no NetBSD host support. +#.for var in ${RUMPPCIDEVS} +#RUMPDEVLIBS+=lib${var} +#.endfor
CVS commit: src/sys/rump/dev/lib/libmiiphy
Module Name:src Committed By: pooka Date: Fri Apr 4 14:18:19 UTC 2014 Added Files: src/sys/rump/dev/lib/libmiiphy: MIIPHY.ioconf Makefile phy_at_mii.c shlib_version src/sys/rump/dev/lib/libmiiphy/opt: opt_mii.h Log Message: Add a rump kernel component for mii support and phy drivers. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libmiiphy/MIIPHY.ioconf \ src/sys/rump/dev/lib/libmiiphy/Makefile \ src/sys/rump/dev/lib/libmiiphy/phy_at_mii.c \ src/sys/rump/dev/lib/libmiiphy/shlib_version cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libmiiphy/opt/opt_mii.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/dev/lib/libmiiphy/MIIPHY.ioconf diff -u /dev/null src/sys/rump/dev/lib/libmiiphy/MIIPHY.ioconf:1.1 --- /dev/null Fri Apr 4 14:18:19 2014 +++ src/sys/rump/dev/lib/libmiiphy/MIIPHY.ioconf Fri Apr 4 14:18:19 2014 @@ -0,0 +1,41 @@ +# $NetBSD: MIIPHY.ioconf,v 1.1 2014/04/04 14:18:19 pooka Exp $ +# + +ioconf phy + +include "conf/files" + +pseudo-root mii* + +acphy* at mii? phy ? # Altima AC101 and AMD Am79c874 PHYs +amhphy* at mii? phy ? # AMD 79c901 Ethernet PHYs +atphy* at mii? phy ? # Attansic/Atheros PHYs +bmtphy* at mii? phy ? # Broadcom BCM5201 and BCM5202 PHYs +brgphy* at mii? phy ? # Broadcom BCM5400-family PHYs +ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs +dmphy* at mii? phy ? # Davicom DM9101 PHYs +etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs +exphy* at mii? phy ? # 3Com internal PHYs +gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs +glxtphy* at mii? phy ? # Level One LXT-1000 PHYs +gphyter* at mii? phy ? # NS83861 Gig-E PHY +icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x +igphy* at mii? phy ? # Intel IGP01E1000 +ihphy* at mii? phy ? # Intel 82577 PHYs +ikphy* at mii? phy ? # Intel 82563 PHYs +inphy* at mii? phy ? # Intel 82555 PHYs +iophy* at mii? phy ? # Intel 82553 PHYs +lxtphy* at mii? phy ? # Level One LXT-970 PHYs +makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs +nsphy* at mii? phy ? # NS83840 PHYs +nsphyter* at mii? phy ? # NS83843 PHYs +pnaphy* at mii? phy ? # generic HomePNA PHYs +qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs +rdcphy* at mii? phy ? # RDC R6040 10/100 PHY +rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs +rlphy* at mii? phy ? # Realtek 8139/8201L PHYs +sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs +tlphy* at mii? phy ? # ThunderLAN PHYs +tqphy* at mii? phy ? # TDK Semiconductor PHYs +ukphy* at mii? phy ? # generic unknown PHYs +urlphy* at mii? phy ? # Realtek RTL8150L internal PHYs Index: src/sys/rump/dev/lib/libmiiphy/Makefile diff -u /dev/null src/sys/rump/dev/lib/libmiiphy/Makefile:1.1 --- /dev/null Fri Apr 4 14:18:19 2014 +++ src/sys/rump/dev/lib/libmiiphy/Makefile Fri Apr 4 14:18:19 2014 @@ -0,0 +1,23 @@ +# $NetBSD: Makefile,v 1.1 2014/04/04 14:18:19 pooka Exp $ +# + +RUMPTOP=${TOPRUMP} + +.PATH: ${RUMPTOP}/../dev/pci ${RUMPTOP}/../dev/mii + +LIB= rumpdev_miiphy +IOCONF= MIIPHY.ioconf + +SRCS= phy_at_mii.c + +SRCS+= mii.c mii_ethersubr.c mii_physubr.c ukphy.c ukphy_subr.c +SRCS+= acphy.c amhphy.c atphy.c bmtphy.c brgphy.c ciphy.c dmphy.c etphy.c \ +exphy.c gentbi.c glxtphy.c gphyter.c icsphy.c igphy.c ihphy.c ikphy.c \ +inphy.c iophy.c lxtphy.c makphy.c mvphy.c nsphy.c nsphyter.c pnaphy.c \ +qsphy.c rdcphy.c rgephy.c rlphy.c sqphy.c tlphy.c tqphy.c urlphy.c + +CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${.CURDIR}/opt + +.include "${RUMPTOP}/Makefile.rump" +.include +.include Index: src/sys/rump/dev/lib/libmiiphy/phy_at_mii.c diff -u /dev/null src/sys/rump/dev/lib/libmiiphy/phy_at_mii.c:1.1 --- /dev/null Fri Apr 4 14:18:19 2014 +++ src/sys/rump/dev/lib/libmiiphy/phy_at_mii.c Fri Apr 4 14:18:19 2014 @@ -0,0 +1,45 @@ +/* $NetBSD: phy_at_mii.c,v 1.1 2014/04/04 14:18:19 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 + *
CVS commit: src/sys/rump/net/lib/libnpf
Module Name:src Committed By: njoly Date: Fri Apr 4 13:57:33 UTC 2014 Modified Files: src/sys/rump/net/lib/libnpf: Makefile Log Message: No lint for rumpnet npf library. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/net/lib/libnpf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnpf/Makefile diff -u src/sys/rump/net/lib/libnpf/Makefile:1.12 src/sys/rump/net/lib/libnpf/Makefile:1.13 --- src/sys/rump/net/lib/libnpf/Makefile:1.12 Thu Mar 13 02:07:24 2014 +++ src/sys/rump/net/lib/libnpf/Makefile Fri Apr 4 13:57:33 2014 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.12 2014/03/13 02:07:24 pooka Exp $ +# $NetBSD: Makefile,v 1.13 2014/04/04 13:57:33 njoly Exp $ # # Public Domain. # +NOLINT= # defined + .PATH: ${.CURDIR}/../../../../net/npf LIB= rumpnet_npf
CVS commit: src/sys/rump/dev/lib/libpci
Module Name:src Committed By: pooka Date: Fri Apr 4 12:53:59 UTC 2014 Added Files: src/sys/rump/dev/lib/libpci: Makefile PCI.ioconf pci_at_mainbus.c pci_user.h rumpdev_bus_dma.c rumpdev_bus_space.c rumpdev_pci.c shlib_version src/sys/rump/dev/lib/libpci/opt: opt_pci.h Log Message: Add a rump kernel component for the PCI bus. It works both in Xen DomU (via Xen's PCI passthrough) and Linux userspace (via uio_pci_generic). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libpci/Makefile \ src/sys/rump/dev/lib/libpci/PCI.ioconf \ src/sys/rump/dev/lib/libpci/pci_at_mainbus.c \ src/sys/rump/dev/lib/libpci/pci_user.h \ src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c \ src/sys/rump/dev/lib/libpci/rumpdev_bus_space.c \ src/sys/rump/dev/lib/libpci/rumpdev_pci.c \ src/sys/rump/dev/lib/libpci/shlib_version cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libpci/opt/opt_pci.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/dev/lib/libpci/Makefile diff -u /dev/null src/sys/rump/dev/lib/libpci/Makefile:1.1 --- /dev/null Fri Apr 4 12:53:59 2014 +++ src/sys/rump/dev/lib/libpci/Makefile Fri Apr 4 12:53:59 2014 @@ -0,0 +1,29 @@ +# $NetBSD: Makefile,v 1.1 2014/04/04 12:53:59 pooka Exp $ +# + +RUMPTOP= ${TOPRUMP} + +.PATH: ${RUMPTOP}/../dev/pci + +LIB= rumpdev_pci +IOCONF= PCI.ioconf + +SRCS+= pci.c pci_map.c pci_quirks.c pci_subr.c pci_stub.c pci_usrreq.c +SRCS+= pcibusprint.c + +SRCS+= rumpdev_pci.c + +# ok, these don't _really_ belong here, but it's the only +# place they're currently useful, so let it slide +SRCS+= rumpdev_bus_space.c +SRCS+= rumpdev_bus_dma.c + +SRCS+= pci_at_mainbus.c + +CPPFLAGS+= -I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpkern + +#RUMPCOMP_USER_SRCS= pci_user.c + +.include "${RUMPTOP}/Makefile.rump" +.include +.include Index: src/sys/rump/dev/lib/libpci/PCI.ioconf diff -u /dev/null src/sys/rump/dev/lib/libpci/PCI.ioconf:1.1 --- /dev/null Fri Apr 4 12:53:59 2014 +++ src/sys/rump/dev/lib/libpci/PCI.ioconf Fri Apr 4 12:53:59 2014 @@ -0,0 +1,12 @@ +# $NetBSD: PCI.ioconf,v 1.1 2014/04/04 12:53:59 pooka Exp $ +# + +ioconf pci + +include "conf/files" +include "dev/pci/files.pci" +include "rump/dev/files.rump" + +pseudo-root mainbus* + +pci*at mainbus? bus ? Index: src/sys/rump/dev/lib/libpci/pci_at_mainbus.c diff -u /dev/null src/sys/rump/dev/lib/libpci/pci_at_mainbus.c:1.1 --- /dev/null Fri Apr 4 12:53:59 2014 +++ src/sys/rump/dev/lib/libpci/pci_at_mainbus.c Fri Apr 4 12:53:59 2014 @@ -0,0 +1,75 @@ +/* $NetBSD: pci_at_mainbus.c,v 1.1 2014/04/04 12:53:59 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: pci_at_mainbus.c,v 1.1 2014/04/04 12:53:59 pooka Exp $"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + + config_init_component(cfdriver_ioconf_pci, + cfattach_ioconf_pci, cfdata_ioconf_pci); +} + +RUMP_COMPONENT(RUMP_COMPONENT_DEV_AFTERMAINBUS) +{ + struct pcibus_attach_args pba; + device_t mainbus; + + /* XXX: attach args should come from elsewhere */ + memset(&pba, 0, sizeof(pba)); + pba.pba_iot = (bus_space_tag_t)0; + pba.pba_memt = (bus_space_tag_t)1; + pba.pba_dmat = (void *)0x20; +#ifdef _LP64 + pba.pba_dmat64 = (void *)0x40; +#endif + pba.pba_flags = PCI_FLAGS_MEM_OKAY | + PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;; +#if 0 + pba.pba_flags |= PCI_FLAGS_IO_OKAY; +#endif + + mainbu
CVS commit: src/sys/rump/include/sys
Module Name:src Committed By: pooka Date: Fri Apr 4 12:25:45 UTC 2014 Modified Files: src/sys/rump/include/sys: bus.h Log Message: make tags and handles long To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/sys/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/sys/bus.h diff -u src/sys/rump/include/sys/bus.h:1.3 src/sys/rump/include/sys/bus.h:1.4 --- src/sys/rump/include/sys/bus.h:1.3 Mon Sep 23 17:57:59 2013 +++ src/sys/rump/include/sys/bus.h Fri Apr 4 12:25:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.3 2013/09/23 17:57:59 pooka Exp $ */ +/* $NetBSD: bus.h,v 1.4 2014/04/04 12:25:45 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -37,8 +37,8 @@ /* bus space defs */ typedef unsigned long bus_addr_t; typedef unsigned long bus_size_t; -typedef int bus_space_tag_t; -typedef int bus_space_handle_t; +typedef unsigned long bus_space_tag_t; +typedef unsigned long bus_space_handle_t; /* bus dma defs */ typedef void *bus_dma_tag_t;
CVS commit: src/sys/rump/librump/rumpdev
Module Name:src Committed By: christos Date: Fri Apr 4 01:35:11 UTC 2014 Modified Files: src/sys/rump/librump/rumpdev: rump_dev.c Log Message: provide cpu_bootconf() To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/rump/librump/rumpdev/rump_dev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpdev/rump_dev.c diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.24 src/sys/rump/librump/rumpdev/rump_dev.c:1.25 --- src/sys/rump/librump/rumpdev/rump_dev.c:1.24 Fri Sep 20 12:49:00 2013 +++ src/sys/rump/librump/rumpdev/rump_dev.c Thu Apr 3 21:35:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev.c,v 1.24 2013/09/20 16:49:00 pooka Exp $ */ +/* $NetBSD: rump_dev.c,v 1.25 2014/04/04 01:35:11 christos Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.24 2013/09/20 16:49:00 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.25 2014/04/04 01:35:11 christos Exp $"); #include #include @@ -82,6 +82,11 @@ cpu_rootconf(void) } void +cpu_bootconf(void) +{ +} + +void device_register(device_t dev, void *v) {
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Wed Apr 2 19:44:15 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c Log Message: use if_initname() instead of homegrown sprintf To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.46 src/sys/rump/net/lib/libvirtif/if_virt.c:1.47 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.46 Thu Mar 20 20:42:08 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Wed Apr 2 19:44:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.46 2014/03/20 20:42:08 christos Exp $ */ +/* $NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.46 2014/03/20 20:42:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $"); #include #include @@ -109,7 +109,8 @@ virtif_clone(struct if_clone *ifc, int n sc = kmem_zalloc(sizeof(*sc), KM_SLEEP); sc->sc_num = num; ifp = &sc->sc_ec.ec_if; - snprintf(ifp->if_xname, sizeof(ifp->if_xname), "%s%d", VIF_NAME, num); + + if_initname(ifp, VIF_NAME, num); ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Apr 2 19:37:17 UTC 2014 Modified Files: src/sys/rump/kern: Makefile.rumpkerncomp src/sys/rump/kern/lib: Makefile src/sys/rump/kern/lib/libtime: Makefile time_component.c src/sys/rump/librump/rumpkern: Makefile.rumpkern rump.c Log Message: Put nanosleep() and folks in librump instead of maintaining them in the separate rumpkern_time component. Keeping time-related routines elsewhere lead to some illogical behavior if you didn't think of linking in rumpkern_time (hands up everyone who checks the return value of nanosleep()). Add warnings if rumpkern_time is linked or used. I'll remove it in a month or two instead of now since it was part of a buildrump.sh snapshot and it's nicer if trying to use it gives a warning instead of an error in the next snapshot. "everything should be as modular as possible, but no more modular than that" To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/rump/kern/Makefile.rumpkerncomp cvs rdiff -u -r1.4 -r1.5 src/sys/rump/kern/lib/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libtime/Makefile \ src/sys/rump/kern/lib/libtime/time_component.c cvs rdiff -u -r1.141 -r1.142 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.291 -r1.292 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/Makefile.rumpkerncomp diff -u src/sys/rump/kern/Makefile.rumpkerncomp:1.9 src/sys/rump/kern/Makefile.rumpkerncomp:1.10 --- src/sys/rump/kern/Makefile.rumpkerncomp:1.9 Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/Makefile.rumpkerncomp Wed Apr 2 19:37:17 2014 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.rumpkerncomp,v 1.9 2014/03/14 01:02:34 pooka Exp $ +# $NetBSD: Makefile.rumpkerncomp,v 1.10 2014/04/02 19:37:17 pooka Exp $ # .include -RUMPKERNCOMPS= crypto time tty z +RUMPKERNCOMPS= crypto tty z .if ${MKSLJIT} != "no" RUMPKERNCOMPS+= sljit Index: src/sys/rump/kern/lib/Makefile diff -u src/sys/rump/kern/lib/Makefile:1.4 src/sys/rump/kern/lib/Makefile:1.5 --- src/sys/rump/kern/lib/Makefile:1.4 Sun Dec 5 16:27:42 2010 +++ src/sys/rump/kern/lib/Makefile Wed Apr 2 19:37:17 2014 @@ -1,8 +1,11 @@ -# $NetBSD: Makefile,v 1.4 2010/12/05 16:27:42 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2014/04/02 19:37:17 pooka Exp $ # .include "${.CURDIR}/../Makefile.rumpkerncomp" SUBDIR+= ${RUMPKERNLIBS} +# obsolete and going away soon +SUBDIR+= libtime + .include Index: src/sys/rump/kern/lib/libtime/Makefile diff -u src/sys/rump/kern/lib/libtime/Makefile:1.1 src/sys/rump/kern/lib/libtime/Makefile:1.2 --- src/sys/rump/kern/lib/libtime/Makefile:1.1 Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/Makefile Wed Apr 2 19:37:17 2014 @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2014/03/14 01:02:34 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/04/02 19:37:17 pooka Exp $ # .PATH: ${.CURDIR}/../../../../kern LIB= rumpkern_time -SRCS+= kern_time.c SRCS+= time_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern Index: src/sys/rump/kern/lib/libtime/time_component.c diff -u src/sys/rump/kern/lib/libtime/time_component.c:1.1 src/sys/rump/kern/lib/libtime/time_component.c:1.2 --- src/sys/rump/kern/lib/libtime/time_component.c:1.1 Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/time_component.c Wed Apr 2 19:37:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $ */ +/* $NetBSD: time_component.c,v 1.2 2014/04/02 19:37:17 pooka Exp $ */ /* * Copyright (c) 2014 Antti Kantee. All Rights Reserved. @@ -26,16 +26,17 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: time_component.c,v 1.2 2014/04/02 19:37:17 pooka Exp $"); #include #include #include "rump_private.h" +void rumpkern_time_is_obsolete(void); + RUMP_COMPONENT(RUMP_COMPONENT_KERN) { - time_init(); - time_init2(); + rumpkern_time_is_obsolete(); } Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.141 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.142 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.141 Sat Mar 15 15:22:42 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Apr 2 19:37:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.141 2014/03/15 15:22:42 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.142 2014/04/02 19:37:17 pooka Exp $ # .include "${RUMPTOP}/Makefile.rump" @@ -92,6 +92,7 @@ SRCS+= init_sysctl_base.c \ kern_syscall.c \ kern_sysctl.c \ kern_tc.c \ + kern_time.c \ kern_timeout.c \ kern_uidinfo.c \ kern_xxx.c \ Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.291 src/sys/rump/librump/rumpkern/rump.c:1.292 --- src/sys/rump/librump/rumpkern/rump
CVS commit: src/sys/rump
Module Name:src Committed By: christos Date: Thu Mar 20 20:42:08 UTC 2014 Modified Files: src/sys/rump/dev/lib/libugenhc: ugenhc.c src/sys/rump/librump/rumpkern: rump.c src/sys/rump/librump/rumpvfs: devnodes.c src/sys/rump/net/lib/libshmif: if_shmem.c src/sys/rump/net/lib/libvirtif: if_virt.c Log Message: kill sprintf To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/rump/dev/lib/libugenhc/ugenhc.c cvs rdiff -u -r1.290 -r1.291 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpvfs/devnodes.c cvs rdiff -u -r1.59 -r1.60 src/sys/rump/net/lib/libshmif/if_shmem.c cvs rdiff -u -r1.45 -r1.46 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.17 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.18 --- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.17 Wed Mar 12 21:38:11 2014 +++ src/sys/rump/dev/lib/libugenhc/ugenhc.c Thu Mar 20 16:42:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ugenhc.c,v 1.17 2014/03/13 01:38:11 pooka Exp $ */ +/* $NetBSD: ugenhc.c,v 1.18 2014/03/20 20:42:08 christos Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.17 2014/03/13 01:38:11 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.18 2014/03/20 20:42:08 christos Exp $"); #include #include @@ -120,11 +120,11 @@ struct rusb_xfer { #define UGENDEV_BASESTR "/dev/ugen" #define UGENDEV_BUFSIZE 32 static void -makeugendevstr(int devnum, int endpoint, char *buf) +makeugendevstr(int devnum, int endpoint, char *buf, size_t len) { CTASSERT(UGENDEV_BUFSIZE > sizeof(UGENDEV_BASESTR)+sizeof("0.00")+1); - sprintf(buf, "%s%d.%02d", UGENDEV_BASESTR, devnum, endpoint); + snprintf(buf, len, "%s%d.%02d", UGENDEV_BASESTR, devnum, endpoint); } /* @@ -596,7 +596,7 @@ rhscintr(void *arg) usbd_xfer_handle xfer; int fd, error; - makeugendevstr(sc->sc_devnum, 0, buf); + makeugendevstr(sc->sc_devnum, 0, buf, sizeof(buf)); for (;;) { /* @@ -969,7 +969,7 @@ ugenhc_open(struct usbd_pipe *pipe) oflags = O_RDWR; } - makeugendevstr(sc->sc_devnum, endpt, buf); + makeugendevstr(sc->sc_devnum, endpt, buf, sizeof(buf)); /* XXX: theoretically should convert oflags */ error = rumpuser_open(buf, oflags, &fd); if (error != 0) { @@ -1057,7 +1057,7 @@ ugenhc_probe(device_t parent, cfdata_t m { char buf[UGENDEV_BUFSIZE]; - makeugendevstr(match->cf_unit, 0, buf); + makeugendevstr(match->cf_unit, 0, buf, sizeof(buf)); if (rumpuser_getfileinfo(buf, NULL, NULL) != 0) return 0; Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.290 src/sys/rump/librump/rumpkern/rump.c:1.291 --- src/sys/rump/librump/rumpkern/rump.c:1.290 Sat Mar 15 11:15:27 2014 +++ src/sys/rump/librump/rumpkern/rump.c Thu Mar 20 16:42:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.290 2014/03/15 15:15:27 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.291 2014/03/20 20:42:08 christos Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.290 2014/03/15 15:15:27 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.291 2014/03/20 20:42:08 christos Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -512,7 +512,8 @@ rump_init(void) #undef CPFX #undef CPFXLEN } else { - sprintf(buf, "rumpns_sys_%s", syscallnames[i]); + snprintf(buf, sizeof(buf), "rumpns_sys_%s", + syscallnames[i]); } if ((sym = rumpuser_dl_globalsym(buf)) != NULL && sym != rump_sysent[i].sy_call) { Index: src/sys/rump/librump/rumpvfs/devnodes.c diff -u src/sys/rump/librump/rumpvfs/devnodes.c:1.8 src/sys/rump/librump/rumpvfs/devnodes.c:1.9 --- src/sys/rump/librump/rumpvfs/devnodes.c:1.8 Thu Mar 7 17:12:34 2013 +++ src/sys/rump/librump/rumpvfs/devnodes.c Thu Mar 20 16:42:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: devnodes.c,v 1.8 2013/03/07 22:12:34 pooka Exp $ */ +/* $NetBSD: devnodes.c,v 1.9 2014/03/20 20:42:08 christos Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.8 2013/03/07 22:12:34 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.9 2014/03/20 20:42:08 christos Exp $"); #include #include @@ -110,8 +110,8 @@ doesitexist(const char *path, bool isblk } static void -makeonenode(char *buf, devmajor_t blk, devmajor_t chr, devminor_t dmin, - const char *base, int c1, int c2) +makeonenode(char *buf, size_t len, devmajor_t blk, devmajor_t chr, +devminor_t dmin, const char *base, int c1, int c2) { char cstr1[2] = {0,0}, cstr2[2] = {0,0}; register_t rv; @@ -129,7 +129,7 @@ makeonenode
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Tue Mar 18 18:10:09 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c Log Message: Trim alignment out of packet length before passing it up. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.44 src/sys/rump/net/lib/libvirtif/if_virt.c:1.45 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.44 Thu Mar 13 21:11:12 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Tue Mar 18 18:10:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.44 2014/03/13 21:11:12 pooka Exp $ */ +/* $NetBSD: if_virt.c,v 1.45 2014/03/18 18:10:08 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.44 2014/03/13 21:11:12 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.45 2014/03/18 18:10:08 pooka Exp $"); #include #include @@ -353,8 +353,10 @@ VIF_DELIVERPKT(struct virtif_sc *sc, str return; } } - m->m_data += align; + m->m_pkthdr.len -= align; + m->m_len -= align; + eth = mtod(m, struct ether_header *); if (memcmp(eth->ether_dhost, CLLADDR(ifp->if_sadl), ETHER_ADDR_LEN) == 0) {
CVS commit: src/sys/rump/dev/lib/libmd
Module Name:src Committed By: pooka Date: Mon Mar 17 11:30:40 UTC 2014 Modified Files: src/sys/rump/dev/lib/libmd: Makefile Added Files: src/sys/rump/dev/lib/libmd: md_component.c Removed Files: src/sys/rump/dev/lib/libmd: component.c Log Message: rename component.c -> md_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libmd/Makefile cvs rdiff -u -r1.3 -r0 src/sys/rump/dev/lib/libmd/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libmd/md_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libmd/Makefile diff -u src/sys/rump/dev/lib/libmd/Makefile:1.1 src/sys/rump/dev/lib/libmd/Makefile:1.2 --- src/sys/rump/dev/lib/libmd/Makefile:1.1 Mon Nov 22 21:20:32 2010 +++ src/sys/rump/dev/lib/libmd/Makefile Mon Mar 17 11:30:40 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/11/22 21:20:32 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/17 11:30:40 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev @@ -7,7 +7,7 @@ LIB= rumpdev_md IOCONF= MD.ioconf SRCS= md.c -SRCS+= component.c +SRCS+= md_component.c CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libmd/md_component.c diff -u /dev/null src/sys/rump/dev/lib/libmd/md_component.c:1.1 --- /dev/null Mon Mar 17 11:30:41 2014 +++ src/sys/rump/dev/lib/libmd/md_component.c Mon Mar 17 11:30:40 2014 @@ -0,0 +1,68 @@ +/* $NetBSD: md_component.c,v 1.1 2014/03/17 11:30:40 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: md_component.c,v 1.1 2014/03/17 11:30:40 pooka Exp $"); + +#include +#include +#include +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +extern void mdattach(int); /* XXX */ + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ +extern const struct bdevsw md_bdevsw; +extern const struct cdevsw md_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + config_init_component(cfdriver_ioconf_md, + cfattach_ioconf_md, cfdata_ioconf_md); + + bmaj = cmaj = NODEVMAJOR; + if ((error = devsw_attach("md", &md_bdevsw, &bmaj, + &md_cdevsw, &cmaj)) != 0) + panic("md devsw attach failed: %d", error); + +if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/md0", 'a', +bmaj, 0, 7)) != 0) +panic("cannot create cooked md dev nodes: %d", error); +if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rmd0", 'a', +cmaj, 0, 7)) != 0) +panic("cannot create raw md dev nodes: %d", error); + + rump_pdev_add(mdattach, 0); +}
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Mar 16 15:31:03 UTC 2014 Modified Files: src/sys/rump: Makefile.rump README.compileopts Log Message: Introduce RUMP_CURLWP compile option to select curlwp scheme. Default is still "hypercall". To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/rump/Makefile.rump cvs rdiff -u -r1.2 -r1.3 src/sys/rump/README.compileopts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.93 src/sys/rump/Makefile.rump:1.94 --- src/sys/rump/Makefile.rump:1.93 Sun Mar 16 14:02:06 2014 +++ src/sys/rump/Makefile.rump Sun Mar 16 15:31:03 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.93 2014/03/16 14:02:06 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.94 2014/03/16 15:31:03 pooka Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -53,6 +53,18 @@ LDFLAGS+= -Wl,-T,${RUMPTOP}/ldscript.rum .endif .endif +.if defined(RUMP_CURLWP) +.if ${RUMP_CURLWP} == "hypercall" +CPPFLAGS+= -DRUMP_CURLWP=RUMP_CURLWP_HYPERCALL +.elif ${RUMP_CURLWP} == "__thread" +CPPFLAGS+= -DRUMP_CURLWP=RUMP_CURLWP___THREAD +.elif ${RUMP_CURLWP} == "register" +CPPFLAGS+= -DRUMP_CURLWP=RUMP_CURLWP_REGISTER +.else +.error Unsupported curlwp scheme: ${RUMP_CURLWP} +.endif +.endif + RUMP_DIAGNOSTIC?=yes .if ${RUMP_DIAGNOSTIC} == "yes" CPPFLAGS+= -DDIAGNOSTIC Index: src/sys/rump/README.compileopts diff -u src/sys/rump/README.compileopts:1.2 src/sys/rump/README.compileopts:1.3 --- src/sys/rump/README.compileopts:1.2 Sun Mar 16 14:47:47 2014 +++ src/sys/rump/README.compileopts Sun Mar 16 15:31:03 2014 @@ -1,4 +1,4 @@ - $NetBSD: README.compileopts,v 1.2 2014/03/16 14:47:47 pooka Exp $ + $NetBSD: README.compileopts,v 1.3 2014/03/16 15:31:03 pooka Exp $ This file describes compile-time options for rump kernels. Additionally, NetBSD build options will have an effect. See src/share/mk/bsd.README @@ -61,6 +61,20 @@ effect: Iff "yes", build the virt(4) net e.g. musl libc based Linux. +RUMP_CURLWP + +values: hypercall/__thread/register or +defval: +effect: Control how curlwp is obtained in a rump kernel. This is + a very frequently accessed thread-local variable, and optimizing + access has a significant performance impact. Note that all + options are not available on hosts/machine architectures. + - use default implementation (currently "hypercall") + hypercall - use a hypercall to fetch the value + __thread- use the __thread feature to fetch value via TLS + register- use a dedicated register (implies -ffixed) + +
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Mar 16 15:30:05 UTC 2014 Modified Files: src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpkern: lwproc.c rump_curlwp.h rump_curlwp___thread.h rump_curlwp_hypercall.h Log Message: remove unnecesary verbosity: s/RUMP_CURLWP_MODEL/RUMP_CURLWP/ To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/rump_curlwp.h \ src/sys/rump/librump/rumpkern/rump_curlwp___thread.h \ src/sys/rump/librump/rumpkern/rump_curlwp_hypercall.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.109 src/sys/rump/include/rump/rumpuser.h:1.110 --- src/sys/rump/include/rump/rumpuser.h:1.109 Sat Mar 15 15:15:26 2014 +++ src/sys/rump/include/rump/rumpuser.h Sun Mar 16 15:30:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.109 2014/03/15 15:15:26 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.110 2014/03/16 15:30:05 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -175,14 +175,14 @@ int rumpuser_thread_create(void *(*f)(v void rumpuser_thread_exit(void) __dead; int rumpuser_thread_join(void *); -#if defined(LIBRUMPUSER) || defined(RUMP_CURLWP_PRIVATE) +#if defined(LIBRUMPUSER) || defined(RUMP__CURLWP_PRIVATE) enum rumplwpop { RUMPUSER_LWP_CREATE, RUMPUSER_LWP_DESTROY, RUMPUSER_LWP_SET, RUMPUSER_LWP_CLEAR }; void rumpuser_curlwpop(int, struct lwp *); struct lwp *rumpuser_curlwp(void); -#endif /* LIBRUMPUSER || RUMP_CURLWP_PRIVATE */ +#endif /* LIBRUMPUSER || RUMP__CURLWP_PRIVATE */ struct rumpuser_mtx; #define RUMPUSER_MTX_SPIN 0x01 Index: src/sys/rump/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.27 src/sys/rump/librump/rumpkern/lwproc.c:1.28 --- src/sys/rump/librump/rumpkern/lwproc.c:1.27 Sat Mar 15 15:15:27 2014 +++ src/sys/rump/librump/rumpkern/lwproc.c Sun Mar 16 15:30:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.27 2014/03/15 15:15:27 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.28 2014/03/16 15:30:05 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -25,10 +25,10 @@ * SUCH DAMAGE. */ -#define RUMP_CURLWP_PRIVATE +#define RUMP__CURLWP_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.27 2014/03/15 15:15:27 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.28 2014/03/16 15:30:05 pooka Exp $"); #include #include Index: src/sys/rump/librump/rumpkern/rump_curlwp.h diff -u src/sys/rump/librump/rumpkern/rump_curlwp.h:1.1 src/sys/rump/librump/rumpkern/rump_curlwp.h:1.2 --- src/sys/rump/librump/rumpkern/rump_curlwp.h:1.1 Sat Mar 15 15:15:27 2014 +++ src/sys/rump/librump/rumpkern/rump_curlwp.h Sun Mar 16 15:30:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_curlwp.h,v 1.1 2014/03/15 15:15:27 pooka Exp $ */ +/* $NetBSD: rump_curlwp.h,v 1.2 2014/03/16 15:30:05 pooka Exp $ */ /*- * Copyright (c) 2014 Antti Kantee. All Rights Reserved. @@ -31,22 +31,22 @@ struct lwp *rump_lwproc_curlwp_hypercall(void); /* hattrick numbers to avoid someone accidentally using "1" as the value */ -#define RUMP_CURLWP_MODEL_HYPERCALL 10501 -#define RUMP_CURLWP_MODEL___THREAD 20502 -#define RUMP_CURLWP_MODEL_REGISTER 30503 -#define RUMP_CURLWP_MODEL_DEFAULT RUMP_CURLWP_MODEL_HYPERCALL +#define RUMP_CURLWP_HYPERCALL 10501 +#define RUMP_CURLWP___THREAD 20502 +#define RUMP_CURLWP_REGISTER 30503 +#define RUMP_CURLWP_DEFAULT RUMP_CURLWP_HYPERCALL -#ifndef RUMP_CURLWP_MODEL -#define RUMP_CURLWP_MODEL RUMP_CURLWP_MODEL_DEFAULT +#ifndef RUMP_CURLWP +#define RUMP_CURLWP RUMP_CURLWP_DEFAULT #endif /* provides rump_curlwp_fast() */ -#if RUMP_CURLWP_MODEL == RUMP_CURLWP_MODEL_HYPERCALL +#if RUMP_CURLWP == RUMP_CURLWP_HYPERCALL #include "rump_curlwp_hypercall.h" -#elif RUMP_CURLWP_MODEL == RUMP_CURLWP_MODEL___THREAD +#elif RUMP_CURLWP == RUMP_CURLWP___THREAD #include "rump_curlwp___thread.h" -#elif RUMP_CURLWP_MODEL == RUMP_CURLWP_MODEL_REGISTER -#error "RUMP_CURLWP_MODEL_REGISTER not yet implemented" +#elif RUMP_CURLWP == RUMP_CURLWP_REGISTER +#error "RUMP_CURLWP_REGISTER not yet implemented" #else #error "unknown RUMP_CURLWP" #endif Index: src/sys/rump/librump/rumpkern/rump_curlwp___thread.h diff -u src/sys/rump/librump/rumpkern/rump_curlwp___thread.h:1.1 src/sys/rump/librump/rumpkern/rump_curlwp___thread.h:1.2 --- src/sys/rump/librump/rumpkern/rump_curlwp___thread.h:1.1 Sat Mar 15 15:15:27 2014 +++ src/sys/rump/librump/rumpkern/rump_curlwp___thread.h Sun Mar 16 15:30:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_curlwp___thread.h,v 1.1 2014/03/15 15:15:27 pooka Exp $ */ +/* $NetBSD: rump_curlwp___thread.h,v 1.2 2014
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Mar 16 14:47:47 UTC 2014 Modified Files: src/sys/rump: README.compileopts Log Message: note that it's a good idea to do a clean build if an option is changed To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/README.compileopts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/README.compileopts diff -u src/sys/rump/README.compileopts:1.1 src/sys/rump/README.compileopts:1.2 --- src/sys/rump/README.compileopts:1.1 Sun Mar 16 14:33:22 2014 +++ src/sys/rump/README.compileopts Sun Mar 16 14:47:47 2014 @@ -1,9 +1,11 @@ - $NetBSD: README.compileopts,v 1.1 2014/03/16 14:33:22 pooka Exp $ + $NetBSD: README.compileopts,v 1.2 2014/03/16 14:47:47 pooka Exp $ This file describes compile-time options for rump kernels. Additionally, NetBSD build options will have an effect. See src/share/mk/bsd.README for a desciption of NetBSD build options. +Note: after changing an option, do a clean build. + RUMP_DIAGNOSTIC
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Mar 16 14:33:22 UTC 2014 Added Files: src/sys/rump: README.compileopts Log Message: document compile-time options for rump kernels To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/README.compileopts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/README.compileopts diff -u /dev/null src/sys/rump/README.compileopts:1.1 --- /dev/null Sun Mar 16 14:33:22 2014 +++ src/sys/rump/README.compileopts Sun Mar 16 14:33:22 2014 @@ -0,0 +1,87 @@ + $NetBSD: README.compileopts,v 1.1 2014/03/16 14:33:22 pooka Exp $ + +This file describes compile-time options for rump kernels. Additionally, +NetBSD build options will have an effect. See src/share/mk/bsd.README +for a desciption of NetBSD build options. + + +RUMP_DIAGNOSTIC + +values: yes|no +defval: yes +effect: Iff "yes", build with -DDIAGNOSTIC. + + +RUMP_DEBUG + +values: defined / not defined +effect: Iff defined, build with -DDEBUG. + + +RUMP_LOCKDEBUG + +values: defined / not defined +effect: Iff defined, build with -DLOCKDEBUG. + + +RUMP_KTRACE + +values: yes|no +defval: yes +effect: Iff "yes", build with -DKTRACE. + + +RUMP_LOCKS_UP + +values: yes|no +defval: no +effect: If "yes", build rump kernel with uniprocess-optimized locking. + An implication of this is that RUMP_NCPU==1 is required at + runtime. If "no", build with multiprocessor-capable locking. + + +RUMP_UNREAL_ALLOCATORS + +values: yes|no +defval: no +effect: If "yes", build version of kmem_alloc, pool and pool_cache + that directly relegate allocation to a hypercall. If "no", + build the regular NetBSD memory allocators which use + page-sized memory allocation hypercalls. + + +RUMP_VIRTIF + +values: yes|no +defval: yes +effect: Iff "yes", build the virt(4) network interface. Turning this + off may be necessary on systems that lack the necessary headers, + e.g. musl libc based Linux. + + + + + +The rest of the options described in this file are not intended to be +set by users, but by the package building rump kernels. + + +RUMP_KERNEL_IS_LIBC + +values: defined / not defined +effect: Iff defined, export normal system call symbols from libc. + For example, without this option rump_sys_open() is exported. + With this option, both open() and rump_sys_open() are exported. + This option is meant for building systems where a rump kernel + is the only operating system like component. + + +RUMP_LDSCRIPT + +values: no/GNU/sun +defval: GNU +effect: Select the linker script to be used for linking rump kernel shared + library components. + no - do not use a linker script + GNU - use a linker script for GNU ld 2.18 and later + sun - use a linker script for the Solaris linker
CVS commit: src/sys/rump/kern/lib/libsys_sunos
Module Name:src Committed By: pooka Date: Sun Mar 16 14:14:40 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_sunos: Makefile Log Message: fix tyop To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsys_sunos/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_sunos/Makefile diff -u src/sys/rump/kern/lib/libsys_sunos/Makefile:1.2 src/sys/rump/kern/lib/libsys_sunos/Makefile:1.3 --- src/sys/rump/kern/lib/libsys_sunos/Makefile:1.2 Thu Mar 13 02:04:14 2014 +++ src/sys/rump/kern/lib/libsys_sunos/Makefile Sun Mar 16 14:14:40 2014 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2014/03/13 02:04:14 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2014/03/16 14:14:40 pooka Exp $ # LIB= rumpkern_sys_sunos SRCS= rump_sunos_compat.c rump_sunos_sysent.c -SRCS+ sys_sunos_component.c +SRCS+= sys_sunos_component.c # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Mar 16 14:02:06 UTC 2014 Modified Files: src/sys/rump: Makefile.rump Log Message: Allow RUMP_LDSCRIPT itself to be used to specify which ldscript to use. HAVE_SUN_LD will be deprecated in the future. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/rump/Makefile.rump Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.92 src/sys/rump/Makefile.rump:1.93 --- src/sys/rump/Makefile.rump:1.92 Sat Mar 15 15:15:26 2014 +++ src/sys/rump/Makefile.rump Sun Mar 16 14:02:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.92 2014/03/15 15:15:26 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.93 2014/03/16 14:02:06 pooka Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -39,15 +39,17 @@ CPPFLAGS+= -I${RUMPTOP}/../arch CPPFLAGS+= -I${RUMPTOP}/.. .endif -RUMP_LDSCRIPT?=yes +RUMP_LDSCRIPT?= GNU .if ${RUMP_LDSCRIPT} != "no" # my ld or yours? -.ifdef HAVE_SUN_LD +.if ${RUMP_LDSCRIPT} == "sun" || defined(HAVE_SUN_LD) LDFLAGS+= -Wl,-M ${RUMPTOP}/ldscript_sun.rump SRCS+= linksyms_sun.c .PATH: ${RUMPTOP} -.else +.elif ${RUMP_LDSCRIPT} == "GNU" LDFLAGS+= -Wl,-T,${RUMPTOP}/ldscript.rump +.else +.error Unknown ldscript ${RUMP_LDSCRIPT} .endif .endif
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: njoly Date: Sun Mar 16 10:16:15 UTC 2014 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: When trying to extend a file, don't wait until the underlying memory allocation succeed. Return ENOSPC upon failure. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.125 src/sys/rump/librump/rumpvfs/rumpfs.c:1.126 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.125 Mon Feb 24 11:43:33 2014 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Sun Mar 16 10:16:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.125 2014/02/24 11:43:33 pooka Exp $ */ +/* $NetBSD: rumpfs.c,v 1.126 2014/03/16 10:16:15 njoly Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.125 2014/02/24 11:43:33 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.126 2014/03/16 10:16:15 njoly Exp $"); #include #include @@ -971,7 +971,9 @@ rump_vop_setattr(void *v) size_t copylen, newlen; newlen = vap->va_size; - newdata = rump_hypermalloc(newlen, 0, true, "rumpfs"); + newdata = rump_hypermalloc(newlen, 0, false, "rumpfs"); + if (newdata == NULL) + return ENOSPC; copylen = MIN(rn->rn_dlen, newlen); memset(newdata, 0, newlen); @@ -1465,7 +1467,9 @@ rump_vop_write(void *v) oldlen = rn->rn_dlen; olddata = rn->rn_data; - rn->rn_data = rump_hypermalloc(newlen, 0, true, "rumpfs"); + rn->rn_data = rump_hypermalloc(newlen, 0, false, "rumpfs"); + if (rn->rn_data == NULL) + return ENOSPC; rn->rn_dlen = newlen; memset(rn->rn_data, 0, newlen); memcpy(rn->rn_data, olddata, oldlen);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Sat Mar 15 15:22:42 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern Log Message: Use uniprocessor-optimized locking in RUMP_LOCKS_UP=yes (default: no) To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/sys/rump/librump/rumpkern/Makefile.rumpkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.140 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.141 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.140 Thu Mar 13 01:34:06 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Sat Mar 15 15:22:42 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.140 2014/03/13 01:34:06 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.141 2014/03/15 15:22:42 pooka Exp $ # .include "${RUMPTOP}/Makefile.rump" @@ -38,8 +38,11 @@ CPPFLAGS+= -DRUMP_KERNEL_IS_LIBC # Multiprocessor or uniprocessor locking. TODO: select right # locking at runtime. +.if ${RUMP_LOCKS_UP:Uno} == "yes" +SRCS+= locks_up.c +.else SRCS+= locks.c -#SRCS+= locks_up.c +.endif MKREPRO?=no
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sat Mar 15 15:15:27 UTC 2014 Modified Files: src/sys/rump: Makefile.rump src/sys/rump/include/machine: cpu.h src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpkern: lwproc.c rump.c rump_private.h scheduler.c threads.c src/sys/rump/librump/rumpkern/arch/x86: rump_x86_cpu.c Added Files: src/sys/rump/librump/rumpkern: rump_curlwp.h rump_curlwp___thread.h rump_curlwp_hypercall.h Log Message: Allow compile-time optimizations to curlwp. This can have a pretty staggering impact on performance. When running sendto() in a loop, the improvement is 200k more calls per second with an inlined __thread curlwp as opposed to the default. In other words, it shaves off hundreds of CPU cycles per call (~20%). Even just eliminating the x86_curlwp() call in favor of an inline gives an improvement of 60k calls per second. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/rump/Makefile.rump cvs rdiff -u -r1.19 -r1.20 src/sys/rump/include/machine/cpu.h cvs rdiff -u -r1.108 -r1.109 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.26 -r1.27 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.289 -r1.290 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/rump_curlwp.h \ src/sys/rump/librump/rumpkern/rump_curlwp___thread.h \ src/sys/rump/librump/rumpkern/rump_curlwp_hypercall.h cvs rdiff -u -r1.79 -r1.80 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.35 -r1.36 src/sys/rump/librump/rumpkern/scheduler.c cvs rdiff -u -r1.21 -r1.22 src/sys/rump/librump/rumpkern/threads.c cvs rdiff -u -r1.1 -r1.2 \ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.91 src/sys/rump/Makefile.rump:1.92 --- src/sys/rump/Makefile.rump:1.91 Thu Mar 13 01:34:06 2014 +++ src/sys/rump/Makefile.rump Sat Mar 15 15:15:26 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.91 2014/03/13 01:34:06 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.92 2014/03/15 15:15:26 pooka Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -8,14 +8,13 @@ NOLINT= # kernel code # Use NetBSD kernel ABI by default on x86 archs. Performance-related # compile-time options may override this at a later date. -.if ${MACHINE_ARCH} == "i386" || \ -${MACHINE_ARCH} == "x86_64" +.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") _RUMP_NATIVEABI= yes CPPFLAGS+= -D_RUMP_NATIVE_ABI .else _RUMP_NATIVEABI= no CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS} -CPPFLAGS+= -D_RUMPKERNEL +CPPFLAGS+= -D_RUMPKERNEL -I${RUMPTOP}/librump/rumpkern .endif CPPFLAGS+= -DMAXUSERS=32 Index: src/sys/rump/include/machine/cpu.h diff -u src/sys/rump/include/machine/cpu.h:1.19 src/sys/rump/include/machine/cpu.h:1.20 --- src/sys/rump/include/machine/cpu.h:1.19 Mon Mar 10 23:02:07 2014 +++ src/sys/rump/include/machine/cpu.h Sat Mar 15 15:15:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.19 2014/03/10 23:02:07 pooka Exp $ */ +/* $NetBSD: cpu.h,v 1.20 2014/03/15 15:15:26 pooka Exp $ */ /* * Copyright (c) 2008-2011 Antti Kantee. All Rights Reserved. @@ -38,6 +38,8 @@ #include #include +#include "rump_curlwp.h" + struct cpu_info { struct cpu_data ci_data; cpuid_t ci_cpuid; @@ -73,8 +75,7 @@ static __inline void cpu_handle_ipi(void void __syncicache(void *, size_t); #endif /* __powerpc__ */ -struct lwp *rumpuser_curlwp(void); -#define curlwp rumpuser_curlwp() +#define curlwp rump_curlwp_fast() #define curcpu() (curlwp->l_cpu) #define cpu_number() (cpu_index(curcpu)) Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.108 src/sys/rump/include/rump/rumpuser.h:1.109 --- src/sys/rump/include/rump/rumpuser.h:1.108 Wed May 15 16:00:04 2013 +++ src/sys/rump/include/rump/rumpuser.h Sat Mar 15 15:15:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.108 2013/05/15 16:00:04 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.109 2014/03/15 15:15:26 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -175,12 +175,14 @@ int rumpuser_thread_create(void *(*f)(v void rumpuser_thread_exit(void) __dead; int rumpuser_thread_join(void *); +#if defined(LIBRUMPUSER) || defined(RUMP_CURLWP_PRIVATE) enum rumplwpop { RUMPUSER_LWP_CREATE, RUMPUSER_LWP_DESTROY, RUMPUSER_LWP_SET, RUMPUSER_LWP_CLEAR }; void rumpuser_curlwpop(int, struct lwp *); struct lwp *rumpuser_curlwp(void); +#endif /* LIBRUMPUSER || RUMP_CURLWP_PRIVATE */ struct rumpuser_mtx; #define RUMPUSER_MTX_SPIN 0x01 Index: src/sys/rump/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.26 src/sys/rump/librump/rumpkern/lwproc.c:1.27 --- src/sys/rump/librump/rumpkern/lwproc.c:1
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Fri Mar 14 10:06:22 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: virtif_user.c virtif_user.h Log Message: Remember to bump revision for the "int my time VIF_DYING" change yesterday. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libvirtif/virtif_user.c \ src/sys/rump/net/lib/libvirtif/virtif_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/virtif_user.c diff -u src/sys/rump/net/lib/libvirtif/virtif_user.c:1.2 src/sys/rump/net/lib/libvirtif/virtif_user.c:1.3 --- src/sys/rump/net/lib/libvirtif/virtif_user.c:1.2 Thu Mar 13 20:55:26 2014 +++ src/sys/rump/net/lib/libvirtif/virtif_user.c Fri Mar 14 10:06:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: virtif_user.c,v 1.2 2014/03/13 20:55:26 pooka Exp $ */ +/* $NetBSD: virtif_user.c,v 1.3 2014/03/14 10:06:22 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -51,7 +51,7 @@ #include "if_virt.h" #include "virtif_user.h" -#if VIFHYPER_REVISION != 20140302 +#if VIFHYPER_REVISION != 20140313 #error VIFHYPER_REVISION mismatch #endif Index: src/sys/rump/net/lib/libvirtif/virtif_user.h diff -u src/sys/rump/net/lib/libvirtif/virtif_user.h:1.2 src/sys/rump/net/lib/libvirtif/virtif_user.h:1.3 --- src/sys/rump/net/lib/libvirtif/virtif_user.h:1.2 Thu Mar 13 20:55:26 2014 +++ src/sys/rump/net/lib/libvirtif/virtif_user.h Fri Mar 14 10:06:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: virtif_user.h,v 1.2 2014/03/13 20:55:26 pooka Exp $ */ +/* $NetBSD: virtif_user.h,v 1.3 2014/03/14 10:06:22 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ struct virtif_user; -#define VIFHYPER_REVISION 20140302 +#define VIFHYPER_REVISION 20140313 int VIFHYPER_CREATE(const char *, struct virtif_sc *, uint8_t *, struct virtif_user **);
CVS commit: src/sys/rump/kern
Module Name:src Committed By: pooka Date: Fri Mar 14 01:02:34 UTC 2014 Modified Files: src/sys/rump/kern: Makefile.rumpkerncomp Added Files: src/sys/rump/kern/lib/libtime: Makefile shlib_version time_component.c Log Message: Add rumpkern_time for nanosleep, clock_gettime, setitimer, etc. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/kern/Makefile.rumpkerncomp cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libtime/Makefile \ src/sys/rump/kern/lib/libtime/shlib_version \ src/sys/rump/kern/lib/libtime/time_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/Makefile.rumpkerncomp diff -u src/sys/rump/kern/Makefile.rumpkerncomp:1.8 src/sys/rump/kern/Makefile.rumpkerncomp:1.9 --- src/sys/rump/kern/Makefile.rumpkerncomp:1.8 Sat Nov 16 13:01:38 2013 +++ src/sys/rump/kern/Makefile.rumpkerncomp Fri Mar 14 01:02:34 2014 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.rumpkerncomp,v 1.8 2013/11/16 13:01:38 alnsn Exp $ +# $NetBSD: Makefile.rumpkerncomp,v 1.9 2014/03/14 01:02:34 pooka Exp $ # .include -RUMPKERNCOMPS= crypto tty z +RUMPKERNCOMPS= crypto time tty z .if ${MKSLJIT} != "no" RUMPKERNCOMPS+= sljit Added files: Index: src/sys/rump/kern/lib/libtime/Makefile diff -u /dev/null src/sys/rump/kern/lib/libtime/Makefile:1.1 --- /dev/null Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/Makefile Fri Mar 14 01:02:34 2014 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2014/03/14 01:02:34 pooka Exp $ +# + +.PATH: ${.CURDIR}/../../../../kern + +LIB= rumpkern_time + +SRCS+= kern_time.c +SRCS+= time_component.c + +CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern + +.include +.include Index: src/sys/rump/kern/lib/libtime/shlib_version diff -u /dev/null src/sys/rump/kern/lib/libtime/shlib_version:1.1 --- /dev/null Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/shlib_version Fri Mar 14 01:02:34 2014 @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2014/03/14 01:02:34 pooka Exp $ +# +major=0 +minor=0 Index: src/sys/rump/kern/lib/libtime/time_component.c diff -u /dev/null src/sys/rump/kern/lib/libtime/time_component.c:1.1 --- /dev/null Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/time_component.c Fri Mar 14 01:02:34 2014 @@ -0,0 +1,41 @@ +/* $NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $ */ + +/* + * Copyright (c) 2014 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $"); + +#include +#include + +#include "rump_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + + time_init(); + time_init2(); +}
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Thu Mar 13 21:11:12 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: Makefile.virtif if_virt.c Removed Files: src/sys/rump/net/lib/libvirtif: virtif_component.c Log Message: No reason to attach if_virt as a RUMP_COMPONENT(), simply use MODULE(). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libvirtif/Makefile.virtif cvs rdiff -u -r1.43 -r1.44 src/sys/rump/net/lib/libvirtif/if_virt.c cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libvirtif/virtif_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/Makefile.virtif diff -u src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.3 src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.4 --- src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.3 Thu Mar 13 20:59:12 2014 +++ src/sys/rump/net/lib/libvirtif/Makefile.virtif Thu Mar 13 21:11:12 2014 @@ -1,16 +1,14 @@ -# $NetBSD: Makefile.virtif,v 1.3 2014/03/13 20:59:12 pooka Exp $ +# $NetBSD: Makefile.virtif,v 1.4 2014/03/13 21:11:12 pooka Exp $ # .if !defined(VIRTIF) .error Define VIRTIF when including ${.PARSEFILE} .endif -SRCS= if_virt.c virtif_component.c +SRCS= if_virt.c VIRTIFDIR:= ${.PARSEDIR} .PATH: ${VIRTIFDIR} -CPPFLAGS+= -I${VIRTIFDIR}/../../../librump/rumpkern - CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} -I${VIRTIFDIR} RUMPCOMP_USER_CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} -I${VIRTIFDIR} Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.43 src/sys/rump/net/lib/libvirtif/if_virt.c:1.44 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.43 Thu Mar 13 20:59:12 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Thu Mar 13 21:11:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.43 2014/03/13 20:59:12 pooka Exp $ */ +/* $NetBSD: if_virt.c,v 1.44 2014/03/13 21:11:12 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,12 +26,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.43 2014/03/13 20:59:12 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.44 2014/03/13 21:11:12 pooka Exp $"); #include #include #include #include +#include #include #include @@ -378,3 +379,31 @@ VIF_DELIVERPKT(struct virtif_sc *sc, str } m = NULL; } + +MODULE(MODULE_CLASS_DRIVER, if_virt, NULL); + +static int +if_virt_modcmd(modcmd_t cmd, void *opaque) +{ + int error = 0; + + switch (cmd) { + case MODULE_CMD_INIT: + if_clone_attach(&VIF_CLONER); + break; + case MODULE_CMD_FINI: + /* + * not sure if interfaces are refcounted + * and properly protected + */ +#if 0 + if_clone_detach(&VIF_CLONER); +#else + error = ENOTTY; +#endif + break; + default: + error = ENOTTY; + } + return error; +}
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Thu Mar 13 20:59:12 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: Makefile.virtif if_virt.c Log Message: remove unnecessary header inclusions To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libvirtif/Makefile.virtif cvs rdiff -u -r1.42 -r1.43 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/Makefile.virtif diff -u src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.2 src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.3 --- src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.2 Wed Mar 12 23:42:33 2014 +++ src/sys/rump/net/lib/libvirtif/Makefile.virtif Thu Mar 13 20:59:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.virtif,v 1.2 2014/03/12 23:42:33 pooka Exp $ +# $NetBSD: Makefile.virtif,v 1.3 2014/03/13 20:59:12 pooka Exp $ # .if !defined(VIRTIF) @@ -10,7 +10,7 @@ SRCS= if_virt.c virtif_component.c VIRTIFDIR:= ${.PARSEDIR} .PATH: ${VIRTIFDIR} -CPPFLAGS+= -I${VIRTIFDIR}/../../../librump/rumpkern -I${VIRTIFDIR} -CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} +CPPFLAGS+= -I${VIRTIFDIR}/../../../librump/rumpkern +CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} -I${VIRTIFDIR} RUMPCOMP_USER_CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} -I${VIRTIFDIR} Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.42 src/sys/rump/net/lib/libvirtif/if_virt.c:1.43 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.42 Thu Mar 13 20:55:26 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Thu Mar 13 20:59:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.42 2014/03/13 20:55:26 pooka Exp $ */ +/* $NetBSD: if_virt.c,v 1.43 2014/03/13 20:59:12 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.42 2014/03/13 20:55:26 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.43 2014/03/13 20:59:12 pooka Exp $"); #include #include @@ -41,11 +41,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_virt.c,v #include #include -#include - -#include "rump_private.h" -#include "rump_net_private.h" - #include "if_virt.h" #include "virtif_user.h"
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Thu Mar 13 20:55:26 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c virtif_user.c virtif_user.h Log Message: allow VIF_DYING() implementation to protest To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/rump/net/lib/libvirtif/if_virt.c cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libvirtif/virtif_user.c \ src/sys/rump/net/lib/libvirtif/virtif_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.41 src/sys/rump/net/lib/libvirtif/if_virt.c:1.42 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.41 Thu Mar 13 18:14:13 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Thu Mar 13 20:55:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.41 2014/03/13 18:14:13 pooka Exp $ */ +/* $NetBSD: if_virt.c,v 1.42 2014/03/13 20:55:26 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.41 2014/03/13 18:14:13 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.42 2014/03/13 20:55:26 pooka Exp $"); #include #include @@ -151,11 +151,13 @@ static int virtif_unclone(struct ifnet *ifp) { struct virtif_sc *sc = ifp->if_softc; + int rv; if (ifp->if_flags & IFF_UP) return EBUSY; - VIFHYPER_DYING(sc->sc_viu); + if ((rv = VIFHYPER_DYING(sc->sc_viu)) != 0) + return rv; virtif_stop(ifp, 1); if_down(ifp); Index: src/sys/rump/net/lib/libvirtif/virtif_user.c diff -u src/sys/rump/net/lib/libvirtif/virtif_user.c:1.1 src/sys/rump/net/lib/libvirtif/virtif_user.c:1.2 --- src/sys/rump/net/lib/libvirtif/virtif_user.c:1.1 Thu Mar 13 18:14:13 2014 +++ src/sys/rump/net/lib/libvirtif/virtif_user.c Thu Mar 13 20:55:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: virtif_user.c,v 1.1 2014/03/13 18:14:13 pooka Exp $ */ +/* $NetBSD: virtif_user.c,v 1.2 2014/03/13 20:55:26 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -251,7 +251,7 @@ VIFHYPER_SEND(struct virtif_user *viu, rumpuser_component_schedule(cookie); } -void +int VIFHYPER_DYING(struct virtif_user *viu) { void *cookie = rumpuser_component_unschedule(); @@ -259,11 +259,17 @@ VIFHYPER_DYING(struct virtif_user *viu) viu->viu_dying = 1; if (write(viu->viu_pipe[1], &viu->viu_dying, sizeof(viu->viu_dying)) == -1) { + /* + * this is here mostly to avoid a compiler warning + * about ignoring the return value of write() + */ fprintf(stderr, "%s: failed to signal thread\n", VIF_STRING(VIFHYPER_DYING)); } rumpuser_component_schedule(cookie); + + return 0; } void Index: src/sys/rump/net/lib/libvirtif/virtif_user.h diff -u src/sys/rump/net/lib/libvirtif/virtif_user.h:1.1 src/sys/rump/net/lib/libvirtif/virtif_user.h:1.2 --- src/sys/rump/net/lib/libvirtif/virtif_user.h:1.1 Thu Mar 13 18:14:13 2014 +++ src/sys/rump/net/lib/libvirtif/virtif_user.h Thu Mar 13 20:55:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: virtif_user.h,v 1.1 2014/03/13 18:14:13 pooka Exp $ */ +/* $NetBSD: virtif_user.h,v 1.2 2014/03/13 20:55:26 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -31,7 +31,7 @@ struct virtif_user; int VIFHYPER_CREATE(const char *, struct virtif_sc *, uint8_t *, struct virtif_user **); -void VIFHYPER_DYING(struct virtif_user *); +int VIFHYPER_DYING(struct virtif_user *); void VIFHYPER_DESTROY(struct virtif_user *); void VIFHYPER_SEND(struct virtif_user *, struct iovec *, size_t);
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Thu Mar 13 18:14:13 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: Makefile if_virt.c Added Files: src/sys/rump/net/lib/libvirtif: virtif_user.c virtif_user.h Removed Files: src/sys/rump/net/lib/libvirtif: rumpcomp_user.c rumpcomp_user.h Log Message: Rename rumpcomp_user.c -> virtif_user.c Convert to new-style RUMPCOMP_USER_SRCS in Makefile. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/net/lib/libvirtif/Makefile cvs rdiff -u -r1.40 -r1.41 src/sys/rump/net/lib/libvirtif/if_virt.c cvs rdiff -u -r1.12 -r0 src/sys/rump/net/lib/libvirtif/rumpcomp_user.c cvs rdiff -u -r1.6 -r0 src/sys/rump/net/lib/libvirtif/rumpcomp_user.h cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libvirtif/virtif_user.c \ src/sys/rump/net/lib/libvirtif/virtif_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/Makefile diff -u src/sys/rump/net/lib/libvirtif/Makefile:1.8 src/sys/rump/net/lib/libvirtif/Makefile:1.9 --- src/sys/rump/net/lib/libvirtif/Makefile:1.8 Wed Mar 12 23:40:58 2014 +++ src/sys/rump/net/lib/libvirtif/Makefile Thu Mar 13 18:14:13 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2014/03/12 23:40:58 pooka Exp $ +# $NetBSD: Makefile,v 1.9 2014/03/13 18:14:13 pooka Exp $ # LIB= rumpnet_virtif @@ -6,7 +6,7 @@ VIRTIF= virt .include "${.CURDIR}/Makefile.virtif" -RUMPCOMP_USER= #defined +RUMPCOMP_USER_SRCS= virtif_user.c .include .include Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.40 src/sys/rump/net/lib/libvirtif/if_virt.c:1.41 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.40 Wed Mar 12 17:49:13 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Thu Mar 13 18:14:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.40 2014/03/12 17:49:13 pooka Exp $ */ +/* $NetBSD: if_virt.c,v 1.41 2014/03/13 18:14:13 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.40 2014/03/12 17:49:13 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.41 2014/03/13 18:14:13 pooka Exp $"); #include #include @@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_virt.c,v #include "rump_net_private.h" #include "if_virt.h" -#include "rumpcomp_user.h" +#include "virtif_user.h" /* * Virtual interface. Uses hypercalls to shovel packets back Added files: Index: src/sys/rump/net/lib/libvirtif/virtif_user.c diff -u /dev/null src/sys/rump/net/lib/libvirtif/virtif_user.c:1.1 --- /dev/null Thu Mar 13 18:14:13 2014 +++ src/sys/rump/net/lib/libvirtif/virtif_user.c Thu Mar 13 18:14:13 2014 @@ -0,0 +1,282 @@ +/* $NetBSD: virtif_user.c,v 1.1 2014/03/13 18:14:13 pooka Exp $ */ + +/* + * Copyright (c) 2013 Antti Kantee. All Rights Reserved. + * + * 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. + */ + +#ifndef _KERNEL +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __linux__ +#include +#include +#endif + +#include + +#include "if_virt.h" +#include "virtif_user.h" + +#if VIFHYPER_REVISION != 20140302 +#error VIFHYPER_REVISION mismatch +#endif + +struct virtif_user { + struct virtif_sc *viu_virtifsc; + int viu_devnum; + + int viu_fd; + int viu_pipe[2]; + pthread_t viu_rcvthr; + + int viu_dying; + + char viu_rcvbuf[9018]; /* jumbo frame max len */ +}; + +static int +opentapdev(int devnum) +{ + int fd = -1; + +#if defined(__NetBSD__) || defined(__DragonFly__) + char tapdev[64]; + + snprintf(tapdev, sizeof(tapdev), "/de
CVS commit: src/sys/rump/net/lib/libbridge
Module Name:src Committed By: pooka Date: Thu Mar 13 02:08:24 UTC 2014 Modified Files: src/sys/rump/net/lib/libbridge: Makefile Added Files: src/sys/rump/net/lib/libbridge: bridge_component.c Removed Files: src/sys/rump/net/lib/libbridge: component.c Log Message: rename component.c -> bridge_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libbridge/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libbridge/bridge_component.c cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libbridge/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libbridge/Makefile diff -u src/sys/rump/net/lib/libbridge/Makefile:1.1 src/sys/rump/net/lib/libbridge/Makefile:1.2 --- src/sys/rump/net/lib/libbridge/Makefile:1.1 Wed Dec 8 18:06:43 2010 +++ src/sys/rump/net/lib/libbridge/Makefile Thu Mar 13 02:08:24 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/12/08 18:06:43 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:08:24 pooka Exp $ # .PATH: ${.CURDIR}/../../../../net @@ -7,7 +7,7 @@ LIB= rumpnet_bridge SRCS= if_bridge.c bridgestp.c -SRCS+= component.c +SRCS+= bridge_component.c CPPFLAGS+= -I${.CURDIR}/../libnet/opt Added files: Index: src/sys/rump/net/lib/libbridge/bridge_component.c diff -u /dev/null src/sys/rump/net/lib/libbridge/bridge_component.c:1.1 --- /dev/null Thu Mar 13 02:08:24 2014 +++ src/sys/rump/net/lib/libbridge/bridge_component.c Thu Mar 13 02:08:24 2014 @@ -0,0 +1,42 @@ +/* $NetBSD: bridge_component.c,v 1.1 2014/03/13 02:08:24 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: bridge_component.c,v 1.1 2014/03/13 02:08:24 pooka Exp $"); + +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +int bridgeattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) +{ + + bridgeattach(0); +}
CVS commit: src/sys/rump/net/lib/libnetinet6
Module Name:src Committed By: pooka Date: Thu Mar 13 02:08:44 UTC 2014 Modified Files: src/sys/rump/net/lib/libnetinet6: Makefile Added Files: src/sys/rump/net/lib/libnetinet6: netinet6_component.c Removed Files: src/sys/rump/net/lib/libnetinet6: component.c Log Message: rename component.c -> netinet6_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnetinet6/Makefile cvs rdiff -u -r1.4 -r0 src/sys/rump/net/lib/libnetinet6/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnetinet6/netinet6_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnetinet6/Makefile diff -u src/sys/rump/net/lib/libnetinet6/Makefile:1.1 src/sys/rump/net/lib/libnetinet6/Makefile:1.2 --- src/sys/rump/net/lib/libnetinet6/Makefile:1.1 Wed Aug 14 09:31:42 2013 +++ src/sys/rump/net/lib/libnetinet6/Makefile Thu Mar 13 02:08:44 2014 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.1 2013/08/14 09:31:42 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:08:44 pooka Exp $ # LIB= rumpnet_netinet6 -SRCS= component.c +SRCS= netinet6_component.c .include .include Added files: Index: src/sys/rump/net/lib/libnetinet6/netinet6_component.c diff -u /dev/null src/sys/rump/net/lib/libnetinet6/netinet6_component.c:1.1 --- /dev/null Thu Mar 13 02:08:44 2014 +++ src/sys/rump/net/lib/libnetinet6/netinet6_component.c Thu Mar 13 02:08:44 2014 @@ -0,0 +1,60 @@ +/* $NetBSD: netinet6_component.c,v 1.1 2014/03/13 02:08:44 pooka Exp $ */ + +/* + * Copyright (c) 2013 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: netinet6_component.c,v 1.1 2014/03/13 02:08:44 pooka Exp $"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + extern struct domain inet6domain; + + DOMAINADD(inet6domain); + + rump_netisr_register(NETISR_IPV6, ip6intr); +} + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG) +{ + + if_up(lo0ifp); +}
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Thu Mar 13 02:08:04 UTC 2014 Modified Files: src/sys/rump/net/lib/libshmif: Makefile Added Files: src/sys/rump/net/lib/libshmif: shmif_component.c Removed Files: src/sys/rump/net/lib/libshmif: component.c Log Message: rename component.c -> shmif_component.c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/net/lib/libshmif/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/net/lib/libshmif/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libshmif/shmif_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libshmif/Makefile diff -u src/sys/rump/net/lib/libshmif/Makefile:1.5 src/sys/rump/net/lib/libshmif/Makefile:1.6 --- src/sys/rump/net/lib/libshmif/Makefile:1.5 Thu Mar 13 01:42:59 2014 +++ src/sys/rump/net/lib/libshmif/Makefile Thu Mar 13 02:08:04 2014 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.5 2014/03/13 01:42:59 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2014/03/13 02:08:04 pooka Exp $ # LIB= rumpnet_shmif SRCS= if_shmem.c shmif_busops.c -SRCS+= component.c +SRCS+= shmif_component.c CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpkern Added files: Index: src/sys/rump/net/lib/libshmif/shmif_component.c diff -u /dev/null src/sys/rump/net/lib/libshmif/shmif_component.c:1.1 --- /dev/null Thu Mar 13 02:08:04 2014 +++ src/sys/rump/net/lib/libshmif/shmif_component.c Thu Mar 13 02:08:04 2014 @@ -0,0 +1,50 @@ +/* $NetBSD: shmif_component.c,v 1.1 2014/03/13 02:08:04 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: shmif_component.c,v 1.1 2014/03/13 02:08:04 pooka Exp $"); + +#include +#include + +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) +{ + extern struct if_clone shmif_cloner; /* XXX */ + extern vmem_t *shmif_units; /* XXX */ + + shmif_units = vmem_create("shmif", 1, 1<<15, 1, NULL, NULL, NULL, 1, + VM_SLEEP, IPL_NONE); + if (shmif_units == NULL) + panic("shmif vmem_create failed"); + + if_clone_attach(&shmif_cloner); +}
CVS commit: src/sys/rump/net/lib/libnetinet
Module Name:src Committed By: pooka Date: Thu Mar 13 02:07:42 UTC 2014 Modified Files: src/sys/rump/net/lib/libnetinet: Makefile Added Files: src/sys/rump/net/lib/libnetinet: netinet_component.c Removed Files: src/sys/rump/net/lib/libnetinet: component.c Log Message: rename component.c -> netinet_component.c To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/rump/net/lib/libnetinet/Makefile cvs rdiff -u -r1.10 -r0 src/sys/rump/net/lib/libnetinet/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnetinet/netinet_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnetinet/Makefile diff -u src/sys/rump/net/lib/libnetinet/Makefile:1.4 src/sys/rump/net/lib/libnetinet/Makefile:1.5 --- src/sys/rump/net/lib/libnetinet/Makefile:1.4 Fri Dec 11 16:34:50 2009 +++ src/sys/rump/net/lib/libnetinet/Makefile Thu Mar 13 02:07:42 2014 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.4 2009/12/11 16:34:50 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2014/03/13 02:07:42 pooka Exp $ # LIB= rumpnet_netinet -SRCS= component.c +SRCS= netinet_component.c .include .include Added files: Index: src/sys/rump/net/lib/libnetinet/netinet_component.c diff -u /dev/null src/sys/rump/net/lib/libnetinet/netinet_component.c:1.1 --- /dev/null Thu Mar 13 02:07:42 2014 +++ src/sys/rump/net/lib/libnetinet/netinet_component.c Thu Mar 13 02:07:42 2014 @@ -0,0 +1,94 @@ +/* $NetBSD: netinet_component.c,v 1.1 2014/03/13 02:07:42 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: netinet_component.c,v 1.1 2014/03/13 02:07:42 pooka Exp $"); + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +int carpattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + extern struct domain arpdomain, inetdomain; + + DOMAINADD(arpdomain); + DOMAINADD(inetdomain); + + carpattach(1); + + rump_netisr_register(NETISR_IP, ipintr); + rump_netisr_register(NETISR_ARP, arpintr); +} + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG) +{ + struct ifaliasreq ia; + struct sockaddr_in *sin; + struct socket *so; + int error; + + if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, curlwp, NULL)) != 0) + panic("lo0 config: cannot create socket"); + + /* configure 127.0.0.1 for lo0 */ + memset(&ia, 0, sizeof(ia)); + strcpy(ia.ifra_name, "lo0"); + sin = (struct sockaddr_in *)&ia.ifra_addr; + sin->sin_family = AF_INET; + sin->sin_len = sizeof(struct sockaddr_in); + sin->sin_addr.s_addr = inet_addr("127.0.0.1"); + + sin = (struct sockaddr_in *)&ia.ifra_mask; + sin->sin_family = AF_INET; + sin->sin_len = sizeof(struct sockaddr_in); + sin->sin_addr.s_addr = inet_addr("255.0.0.0"); + + sin = (struct sockaddr_in *)&ia.ifra_broadaddr; + sin->sin_family = AF_INET; + sin->sin_len = sizeof(struct sockaddr_in); + sin->sin_addr.s_addr = inet_addr("127.255.255.255"); + + in_control(so, SIOCAIFADDR, &ia, lo0ifp, curlwp); + if_up(lo0ifp); + soclose(so); +}
CVS commit: src/sys/rump/net/lib/libnpf
Module Name:src Committed By: pooka Date: Thu Mar 13 02:07:24 UTC 2014 Modified Files: src/sys/rump/net/lib/libnpf: Makefile Added Files: src/sys/rump/net/lib/libnpf: npf_component.c Removed Files: src/sys/rump/net/lib/libnpf: component.c Log Message: rename component.c -> npf_component.c To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/rump/net/lib/libnpf/Makefile cvs rdiff -u -r1.3 -r0 src/sys/rump/net/lib/libnpf/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnpf/npf_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnpf/Makefile diff -u src/sys/rump/net/lib/libnpf/Makefile:1.11 src/sys/rump/net/lib/libnpf/Makefile:1.12 --- src/sys/rump/net/lib/libnpf/Makefile:1.11 Mon Mar 3 19:09:52 2014 +++ src/sys/rump/net/lib/libnpf/Makefile Thu Mar 13 02:07:24 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2014/03/03 19:09:52 pooka Exp $ +# $NetBSD: Makefile,v 1.12 2014/03/13 02:07:24 pooka Exp $ # # Public Domain. # @@ -17,7 +17,7 @@ SRCS+= npf_alg_icmp.c SRCS+= npf_ext_log.c npf_ext_normalize.c npf_ext_rndblock.c -SRCS+= component.c +SRCS+= npf_component.c .include Added files: Index: src/sys/rump/net/lib/libnpf/npf_component.c diff -u /dev/null src/sys/rump/net/lib/libnpf/npf_component.c:1.1 --- /dev/null Thu Mar 13 02:07:24 2014 +++ src/sys/rump/net/lib/libnpf/npf_component.c Thu Mar 13 02:07:24 2014 @@ -0,0 +1,35 @@ +/* $NetBSD: npf_component.c,v 1.1 2014/03/13 02:07:24 pooka Exp $ */ + +/* + * Public Domain. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: npf_component.c,v 1.1 2014/03/13 02:07:24 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +extern const struct cdevsw npf_cdevsw; + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR; + int error; + + error = devsw_attach("npf", NULL, &bmajor, &npf_cdevsw, &cmajor); + if (error) { + panic("npf attach failed: %d", error); + } + + error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/npf", cmajor, 0); + if (error) { + panic("npf device node creation failed: %d", error); + } + devsw_detach(NULL, &npf_cdevsw); +}
CVS commit: src/sys/rump/net/lib/libnet
Module Name:src Committed By: pooka Date: Thu Mar 13 02:06:33 UTC 2014 Modified Files: src/sys/rump/net/lib/libnet: Makefile Added Files: src/sys/rump/net/lib/libnet: net_component.c Removed Files: src/sys/rump/net/lib/libnet: component.c Log Message: rename component.c -> net_component.c To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/rump/net/lib/libnet/Makefile cvs rdiff -u -r1.10 -r0 src/sys/rump/net/lib/libnet/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnet/net_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnet/Makefile diff -u src/sys/rump/net/lib/libnet/Makefile:1.19 src/sys/rump/net/lib/libnet/Makefile:1.20 --- src/sys/rump/net/lib/libnet/Makefile:1.19 Wed Aug 14 09:31:42 2013 +++ src/sys/rump/net/lib/libnet/Makefile Thu Mar 13 02:06:32 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2013/08/14 09:31:42 pooka Exp $ +# $NetBSD: Makefile,v 1.20 2014/03/13 02:06:32 pooka Exp $ # .PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../compat/common @@ -9,7 +9,7 @@ LIB= rumpnet_net SRCS= if.c if_loop.c route.c rtsock.c rtsock_50.c raw_usrreq.c \ raw_cb.c if_media.c link_proto.c net_stats.c if_ethersubr.c SRCS+= if_43.c pfil.c uipc_syscalls_50.c -SRCS+= component.c +SRCS+= net_component.c CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt CPPFLAGS+= -DCOMPAT_OIFREQ -DCOMPAT_OIFDATA Added files: Index: src/sys/rump/net/lib/libnet/net_component.c diff -u /dev/null src/sys/rump/net/lib/libnet/net_component.c:1.1 --- /dev/null Thu Mar 13 02:06:33 2014 +++ src/sys/rump/net/lib/libnet/net_component.c Thu Mar 13 02:06:32 2014 @@ -0,0 +1,63 @@ +/* $NetBSD: net_component.c,v 1.1 2014/03/13 02:06:32 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.1 2014/03/13 02:06:32 pooka Exp $"); + +#include +#include +#include + +#include +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + + ifinit1(); + ifinit(); +} + +RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE) +{ + extern struct domain routedomain, compat_50_routedomain, linkdomain; + + DOMAINADD(linkdomain); + DOMAINADD(routedomain); + DOMAINADD(compat_50_routedomain); +} + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) +{ + + loopattach(1); +}
CVS commit: src/sys/rump/net/lib/libagr
Module Name:src Committed By: pooka Date: Thu Mar 13 02:07:03 UTC 2014 Modified Files: src/sys/rump/net/lib/libagr: Makefile Added Files: src/sys/rump/net/lib/libagr: agr_component.c Removed Files: src/sys/rump/net/lib/libagr: component.c Log Message: rename component.c -> agr_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libagr/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libagr/agr_component.c cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libagr/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libagr/Makefile diff -u src/sys/rump/net/lib/libagr/Makefile:1.1 src/sys/rump/net/lib/libagr/Makefile:1.2 --- src/sys/rump/net/lib/libagr/Makefile:1.1 Wed Dec 8 20:20:17 2010 +++ src/sys/rump/net/lib/libagr/Makefile Thu Mar 13 02:07:03 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/12/08 20:20:17 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:07:03 pooka Exp $ # .PATH: ${.CURDIR}/../../../../net/agr @@ -12,7 +12,7 @@ SRCS= if_agr.c if_agrsoftc.c if_agrsubr. ieee8023ad_lacp_sm_ptx.c ieee8023ad_lacp_sm_tx.c \ ieee8023ad_lacp_debug.c ieee8023_tlv.c -SRCS+= component.c +SRCS+= agr_component.c .include .include Added files: Index: src/sys/rump/net/lib/libagr/agr_component.c diff -u /dev/null src/sys/rump/net/lib/libagr/agr_component.c:1.1 --- /dev/null Thu Mar 13 02:07:03 2014 +++ src/sys/rump/net/lib/libagr/agr_component.c Thu Mar 13 02:07:03 2014 @@ -0,0 +1,42 @@ +/* $NetBSD: agr_component.c,v 1.1 2014/03/13 02:07:03 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: agr_component.c,v 1.1 2014/03/13 02:07:03 pooka Exp $"); + +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +int agrattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) +{ + + agrattach(0); +}
CVS commit: src/sys/rump/net/lib/libnetbt
Module Name:src Committed By: pooka Date: Thu Mar 13 02:06:16 UTC 2014 Modified Files: src/sys/rump/net/lib/libnetbt: Makefile Added Files: src/sys/rump/net/lib/libnetbt: netbt_component.c Removed Files: src/sys/rump/net/lib/libnetbt: component.c Log Message: rename component.c -> netbt_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libnetbt/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libnetbt/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnetbt/netbt_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnetbt/Makefile diff -u src/sys/rump/net/lib/libnetbt/Makefile:1.3 src/sys/rump/net/lib/libnetbt/Makefile:1.4 --- src/sys/rump/net/lib/libnetbt/Makefile:1.3 Mon Nov 11 00:56:20 2013 +++ src/sys/rump/net/lib/libnetbt/Makefile Thu Mar 13 02:06:16 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/11/11 00:56:20 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 02:06:16 pooka Exp $ # .include @@ -20,7 +20,7 @@ SRCS= bt_proto.c bt_sysctl.c \ COPTS.l2cap_signal.c= -O0 .endif .endif -SRCS+= component.c +SRCS+= netbt_component.c .include .include Added files: Index: src/sys/rump/net/lib/libnetbt/netbt_component.c diff -u /dev/null src/sys/rump/net/lib/libnetbt/netbt_component.c:1.1 --- /dev/null Thu Mar 13 02:06:16 2014 +++ src/sys/rump/net/lib/libnetbt/netbt_component.c Thu Mar 13 02:06:16 2014 @@ -0,0 +1,43 @@ +/* $NetBSD: netbt_component.c,v 1.1 2014/03/13 02:06:16 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: netbt_component.c,v 1.1 2014/03/13 02:06:16 pooka Exp $"); + +#include +#include +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + extern struct domain btdomain; + + DOMAINADD(btdomain); +}
CVS commit: src/sys/rump/net/lib/libsockin
Module Name:src Committed By: pooka Date: Thu Mar 13 02:05:50 UTC 2014 Modified Files: src/sys/rump/net/lib/libsockin: Makefile Added Files: src/sys/rump/net/lib/libsockin: sockin_component.c Removed Files: src/sys/rump/net/lib/libsockin: component.c Log Message: rename component.c -> sockin_component.c To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/net/lib/libsockin/Makefile cvs rdiff -u -r1.3 -r0 src/sys/rump/net/lib/libsockin/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libsockin/sockin_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libsockin/Makefile diff -u src/sys/rump/net/lib/libsockin/Makefile:1.7 src/sys/rump/net/lib/libsockin/Makefile:1.8 --- src/sys/rump/net/lib/libsockin/Makefile:1.7 Thu Mar 13 01:40:30 2014 +++ src/sys/rump/net/lib/libsockin/Makefile Thu Mar 13 02:05:49 2014 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.7 2014/03/13 01:40:30 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2014/03/13 02:05:49 pooka Exp $ # LIB= rumpnet_sockin SRCS= sockin.c -SRCS+= component.c +SRCS+= sockin_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern Added files: Index: src/sys/rump/net/lib/libsockin/sockin_component.c diff -u /dev/null src/sys/rump/net/lib/libsockin/sockin_component.c:1.1 --- /dev/null Thu Mar 13 02:05:50 2014 +++ src/sys/rump/net/lib/libsockin/sockin_component.c Thu Mar 13 02:05:49 2014 @@ -0,0 +1,47 @@ +/* $NetBSD: sockin_component.c,v 1.1 2014/03/13 02:05:49 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: sockin_component.c,v 1.1 2014/03/13 02:05:49 pooka Exp $"); + +#include +#include +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + extern struct domain sockindomain; + extern struct domain sockin6domain; + + DOMAINADD(sockindomain); + DOMAINADD(sockin6domain); +}
CVS commit: src/sys/rump/net/lib/libnetmpls
Module Name:src Committed By: pooka Date: Thu Mar 13 02:05:29 UTC 2014 Modified Files: src/sys/rump/net/lib/libnetmpls: Makefile Added Files: src/sys/rump/net/lib/libnetmpls: netmpls_component.c Removed Files: src/sys/rump/net/lib/libnetmpls: component.c Log Message: rename component.c -> netmpls_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnetmpls/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/net/lib/libnetmpls/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnetmpls/netmpls_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnetmpls/Makefile diff -u src/sys/rump/net/lib/libnetmpls/Makefile:1.1 src/sys/rump/net/lib/libnetmpls/Makefile:1.2 --- src/sys/rump/net/lib/libnetmpls/Makefile:1.1 Thu Jul 18 15:59:28 2013 +++ src/sys/rump/net/lib/libnetmpls/Makefile Thu Mar 13 02:05:29 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/07/18 15:59:28 kefren Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:05:29 pooka Exp $ # .PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../netmpls @@ -6,7 +6,7 @@ LIB= rumpnet_netmpls SRCS= mpls_ttl.c if_mpls.c -SRCS+= component.c +SRCS+= netmpls_component.c CPPFLAGS+= -I${.CURDIR}/../libnet/opt Added files: Index: src/sys/rump/net/lib/libnetmpls/netmpls_component.c diff -u /dev/null src/sys/rump/net/lib/libnetmpls/netmpls_component.c:1.1 --- /dev/null Thu Mar 13 02:05:29 2014 +++ src/sys/rump/net/lib/libnetmpls/netmpls_component.c Thu Mar 13 02:05:29 2014 @@ -0,0 +1,64 @@ +/* $NetBSD: netmpls_component.c,v 1.1 2014/03/13 02:05:29 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: netmpls_component.c,v 1.1 2014/03/13 02:05:29 pooka Exp $"); + +#include +#include +#include + +#include +#include +#include + +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +void ifmplsattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + extern struct domain mplsdomain; + + DOMAINADD(mplsdomain); + + rump_netisr_register(NETISR_MPLS, mplsintr); +} + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) +{ + + ifmplsattach(0); +}
CVS commit: src/sys/rump/net/lib/liblocal
Module Name:src Committed By: pooka Date: Thu Mar 13 02:04:59 UTC 2014 Modified Files: src/sys/rump/net/lib/liblocal: Makefile Added Files: src/sys/rump/net/lib/liblocal: local_component.c Removed Files: src/sys/rump/net/lib/liblocal: component.c Log Message: rename component.c -> local_component.c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/net/lib/liblocal/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/net/lib/liblocal/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/liblocal/local_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/liblocal/Makefile diff -u src/sys/rump/net/lib/liblocal/Makefile:1.5 src/sys/rump/net/lib/liblocal/Makefile:1.6 --- src/sys/rump/net/lib/liblocal/Makefile:1.5 Tue Feb 16 20:42:47 2010 +++ src/sys/rump/net/lib/liblocal/Makefile Thu Mar 13 02:04:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2010/02/16 20:42:47 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2014/03/13 02:04:59 pooka Exp $ # .PATH: ${.CURDIR}/../../../../kern @@ -6,7 +6,7 @@ LIB= rumpnet_local SRCS= uipc_proto.c uipc_usrreq.c -SRCS+= component.c +SRCS+= local_component.c .include .include Added files: Index: src/sys/rump/net/lib/liblocal/local_component.c diff -u /dev/null src/sys/rump/net/lib/liblocal/local_component.c:1.1 --- /dev/null Thu Mar 13 02:04:59 2014 +++ src/sys/rump/net/lib/liblocal/local_component.c Thu Mar 13 02:04:59 2014 @@ -0,0 +1,45 @@ +/* $NetBSD: local_component.c,v 1.1 2014/03/13 02:04:59 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: local_component.c,v 1.1 2014/03/13 02:04:59 pooka Exp $"); + +#include +#include +#include + +#include "rump_private.h" +#include "rump_net_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ + extern struct domain unixdomain; + + DOMAINADD(unixdomain); +}
CVS commit: src/sys/rump/kern/lib/libsys_sunos
Module Name:src Committed By: pooka Date: Thu Mar 13 02:04:14 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_sunos: Makefile Added Files: src/sys/rump/kern/lib/libsys_sunos: sys_sunos_component.c Removed Files: src/sys/rump/kern/lib/libsys_sunos: component.c Log Message: rename component.c -> sys_sunos_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_sunos/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/kern/lib/libsys_sunos/component.c cvs rdiff -u -r0 -r1.1 \ src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_sunos/Makefile diff -u src/sys/rump/kern/lib/libsys_sunos/Makefile:1.1 src/sys/rump/kern/lib/libsys_sunos/Makefile:1.2 --- src/sys/rump/kern/lib/libsys_sunos/Makefile:1.1 Tue Apr 9 13:08:33 2013 +++ src/sys/rump/kern/lib/libsys_sunos/Makefile Thu Mar 13 02:04:14 2014 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2013/04/09 13:08:33 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:04:14 pooka Exp $ # LIB= rumpkern_sys_sunos -SRCS= rump_sunos_compat.c rump_sunos_sysent.c component.c +SRCS= rump_sunos_compat.c rump_sunos_sysent.c +SRCS+ sys_sunos_component.c # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern Added files: Index: src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c diff -u /dev/null src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c:1.1 --- /dev/null Thu Mar 13 02:04:14 2014 +++ src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c Thu Mar 13 02:04:14 2014 @@ -0,0 +1,31 @@ +/* $NetBSD: sys_sunos_component.c,v 1.1 2014/03/13 02:04:14 pooka Exp $ */ + +#include +#include + +#include + +#include "rump_private.h" + +#include "rump_sunos_syscall.h" + +extern struct sysent rump_sunos_sysent[]; + +struct emul emul_rump_sys_sunos = { + .e_name = "sunos-rump", + .e_sysent = rump_sunos_sysent, +#ifndef __HAVE_MINIMAL_EMUL + .e_nsysent = RUMP_SUNOS_SYS_NSYSENT, +#endif + .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = syscall_intern, +#endif +}; + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + extern struct emul *emul_default; + + emul_default = &emul_rump_sys_sunos; +}
CVS commit: src/sys/rump/kern/lib/libsys_cygwin
Module Name:src Committed By: pooka Date: Thu Mar 13 02:03:16 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_cygwin: Makefile Added Files: src/sys/rump/kern/lib/libsys_cygwin: sys_cygwin_component.c Removed Files: src/sys/rump/kern/lib/libsys_cygwin: component.c Log Message: rename component.c -> sys_cygwin_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_cygwin/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/kern/lib/libsys_cygwin/component.c cvs rdiff -u -r0 -r1.1 \ src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_cygwin/Makefile diff -u src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.1 src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.2 --- src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.1 Wed Apr 10 16:44:54 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/Makefile Thu Mar 13 02:03:16 2014 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2013/04/10 16:44:54 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:03:16 pooka Exp $ # LIB= rumpkern_sys_cygwin -SRCS= rump_cygwin_compat.c rump_cygwin_sysent.c component.c +SRCS= rump_cygwin_compat.c rump_cygwin_sysent.c +SRCS+= sys_cygwin_component.c # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern Added files: Index: src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c:1.1 --- /dev/null Thu Mar 13 02:03:16 2014 +++ src/sys/rump/kern/lib/libsys_cygwin/sys_cygwin_component.c Thu Mar 13 02:03:16 2014 @@ -0,0 +1,31 @@ +/* $NetBSD: sys_cygwin_component.c,v 1.1 2014/03/13 02:03:16 pooka Exp $ */ + +#include +#include + +#include + +#include "rump_private.h" + +#include "rump_cygwin_syscall.h" + +extern struct sysent rump_cygwin_sysent[]; + +struct emul emul_rump_sys_cygwin = { + .e_name = "cygwin-rump", + .e_sysent = rump_cygwin_sysent, +#ifndef __HAVE_MINIMAL_EMUL + .e_nsysent = RUMP_CYGWIN_SYS_NSYSENT, +#endif + .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = syscall_intern, +#endif +}; + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + extern struct emul *emul_default; + + emul_default = &emul_rump_sys_cygwin; +}
CVS commit: src/sys/rump/kern/lib/libsys_linux
Module Name:src Committed By: pooka Date: Thu Mar 13 02:03:47 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_linux: Makefile Added Files: src/sys/rump/kern/lib/libsys_linux: sys_linux_component.c Removed Files: src/sys/rump/kern/lib/libsys_linux: component.c Log Message: rename component.c -> sys_linux_component.c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/kern/lib/libsys_linux/Makefile cvs rdiff -u -r1.11 -r0 src/sys/rump/kern/lib/libsys_linux/component.c cvs rdiff -u -r0 -r1.1 \ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_linux/Makefile diff -u src/sys/rump/kern/lib/libsys_linux/Makefile:1.5 src/sys/rump/kern/lib/libsys_linux/Makefile:1.6 --- src/sys/rump/kern/lib/libsys_linux/Makefile:1.5 Tue Jan 28 10:54:45 2014 +++ src/sys/rump/kern/lib/libsys_linux/Makefile Thu Mar 13 02:03:47 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2014/01/28 10:54:45 njoly Exp $ +# $NetBSD: Makefile,v 1.6 2014/03/13 02:03:47 pooka Exp $ # .PATH: ${.CURDIR}/../../../../compat/linux/common @@ -11,7 +11,8 @@ SRCS= linux_blkio.c linux_cdrom.c linux_ linux_sysctl.c linux_termios.c linux_time.c linux_file64.c \ linux_pipe.c -SRCS+= rump_linux_sysent.c component.c linux_rump.c +SRCS+= rump_linux_sysent.c linux_rump.c +SRCS+= sys_linux_component.c # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern Added files: Index: src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c diff -u /dev/null src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c:1.1 --- /dev/null Thu Mar 13 02:03:47 2014 +++ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c Thu Mar 13 02:03:47 2014 @@ -0,0 +1,105 @@ +/* $NetBSD: sys_linux_component.c,v 1.1 2014/03/13 02:03:47 pooka Exp $ */ + +#include +#include + +#include + +#include + +#include "rump_private.h" + +#include "rump_linux_syscall.h" + +extern struct sysent rump_linux_sysent[]; + +#ifdef __HAVE_SYSCALL_INTERN +static void +rumplinux_syscall_intern(struct proc *p) +{ + + p->p_emuldata = __UNCONST(native_to_linux_errno); +} +#endif + +struct emul emul_rump_sys_linux = { + .e_name = "linux-rump", + .e_sysent = rump_linux_sysent, +#ifndef __HAVE_MINIMAL_EMUL + .e_nsysent = RUMP_LINUX_SYS_NSYSENT, + .e_errno = native_to_linux_errno, +#endif + .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = rumplinux_syscall_intern, +#endif +}; + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + extern struct emul *emul_default; + + emul_default = &emul_rump_sys_linux; +} + +#include + +dev_t +linux_fakedev(dev_t in, int raw) +{ + + /* I don't really think it matters what we return here */ + return in; +} + +/* + * XXX: the linux emulation code is not split into factions + */ +void rumplinux__stub(void); +void rumplinux__stub(void) {panic("unavailable");} + +/* timing */ +__weak_alias(clock_gettime1,rumplinux__stub); +__weak_alias(clock_settime1,rumplinux__stub); +__weak_alias(clock_getres1,rumplinux__stub); +__weak_alias(compat_50_sys_gettimeofday,rumplinux__stub); +__weak_alias(compat_50_sys_settimeofday,rumplinux__stub); +__weak_alias(nanosleep1,rumplinux__stub); + +/* vm-related */ +__weak_alias(sys_mmap,rumplinux__stub); +__weak_alias(vm_map_unlock,rumplinux__stub); +__weak_alias(uvm_map_lookup_entry,rumplinux__stub); +__weak_alias(sys_obreak,rumplinux__stub); +__weak_alias(vm_map_lock,rumplinux__stub); +__weak_alias(uvm_mremap,rumplinux__stub); + +/* signal.c */ +__weak_alias(sigaction1,rumplinux__stub); +__weak_alias(kpsignal2,rumplinux__stub); +__weak_alias(sys_kill,rumplinux__stub); +__weak_alias(sigsuspend1,rumplinux__stub); +__weak_alias(sigtimedwait1,rumplinux__stub); +__weak_alias(lwp_find,rumplinux__stub); + +/* misc */ +__weak_alias(linux_machdepioctl,rumplinux__stub); +__weak_alias(linux_ioctl_sg,rumplinux__stub); +__weak_alias(oss_ioctl_mixer,rumplinux__stub); +__weak_alias(oss_ioctl_sequencer,rumplinux__stub); +__weak_alias(oss_ioctl_audio,rumplinux__stub); +__weak_alias(rusage_to_rusage50,rumplinux__stub); +__weak_alias(do_sys_wait,rumplinux__stub); + +/* arch-specific */ +__weak_alias(compat_offseterr,rumplinux__stub); +__weak_alias(linux_sys_ptrace_arch,rumplinux__stub); + +#ifdef __i386__ +const char * +linux_get_uname_arch(void) +{ + + return MACHINE_ARCH; +} +#endif /* __i386__ */
CVS commit: src/sys/rump/kern/lib/libtty
Module Name:src Committed By: pooka Date: Thu Mar 13 02:02:30 UTC 2014 Modified Files: src/sys/rump/kern/lib/libtty: Makefile Added Files: src/sys/rump/kern/lib/libtty: tty_component.c Removed Files: src/sys/rump/kern/lib/libtty: component.c Log Message: rename component.c -> tty_component.c To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libtty/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/kern/lib/libtty/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libtty/tty_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libtty/Makefile diff -u src/sys/rump/kern/lib/libtty/Makefile:1.2 src/sys/rump/kern/lib/libtty/Makefile:1.3 --- src/sys/rump/kern/lib/libtty/Makefile:1.2 Tue Jul 16 19:07:55 2013 +++ src/sys/rump/kern/lib/libtty/Makefile Thu Mar 13 02:02:30 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/07/16 19:07:55 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2014/03/13 02:02:30 pooka Exp $ # .PATH: ${.CURDIR}/../../../../kern \ @@ -9,7 +9,7 @@ LIB= rumpkern_tty SRCS= tty.c tty_bsdpty.c tty_conf.c tty_ptm.c tty_pty.c tty_tty.c tty_subr.c SRCS+= tty_60.c -SRCS+= component.c +SRCS+= tty_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/kern/lib/libtty/tty_component.c diff -u /dev/null src/sys/rump/kern/lib/libtty/tty_component.c:1.1 --- /dev/null Thu Mar 13 02:02:30 2014 +++ src/sys/rump/kern/lib/libtty/tty_component.c Thu Mar 13 02:02:30 2014 @@ -0,0 +1,73 @@ +/* $NetBSD: tty_component.c,v 1.1 2014/03/13 02:02:30 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: tty_component.c,v 1.1 2014/03/13 02:02:30 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +void ptyattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS) +{ + extern const struct cdevsw ctty_cdevsw, ptc_cdevsw, pts_cdevsw; + extern const struct cdevsw ptm_cdevsw; + devmajor_t cmaj, bmaj; + + cmaj = bmaj = -1; + FLAWLESSCALL(devsw_attach("ctty", NULL, &bmaj, &ctty_cdevsw, &cmaj)); + FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/tty", cmaj, 0)); + + /* create only 10 nodes. should be enough for everyone ... */ + cmaj = bmaj = -1; + FLAWLESSCALL(devsw_attach("ptc", NULL, &bmaj, &ptc_cdevsw, &cmaj)); + FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/ptyp", '0', + cmaj, 0, 9)); + + cmaj = bmaj = -1; + FLAWLESSCALL(devsw_attach("pts", NULL, &bmaj, &pts_cdevsw, &cmaj)); + FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/ttyp", '0', + cmaj, 0, 9)); + + cmaj = bmaj = -1; + FLAWLESSCALL(devsw_attach("ptm", NULL, &bmaj, &ptm_cdevsw, &cmaj)); + FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/ptmx", cmaj, 0)); + FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/ptm", cmaj, 1)); + + tty_init(); + ttyldisc_init(); + + ptyattach(1); + + rump_ttycomponent = true; +}
CVS commit: src/sys/rump/dev/lib/libbpf
Module Name:src Committed By: pooka Date: Thu Mar 13 02:01:04 UTC 2014 Modified Files: src/sys/rump/dev/lib/libbpf: Makefile Added Files: src/sys/rump/dev/lib/libbpf: bpf_component.c Removed Files: src/sys/rump/dev/lib/libbpf: component.c Log Message: rename component.c -> bpf_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libbpf/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libbpf/bpf_component.c cvs rdiff -u -r1.4 -r0 src/sys/rump/dev/lib/libbpf/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libbpf/Makefile diff -u src/sys/rump/dev/lib/libbpf/Makefile:1.1 src/sys/rump/dev/lib/libbpf/Makefile:1.2 --- src/sys/rump/dev/lib/libbpf/Makefile:1.1 Tue Jan 19 22:38:21 2010 +++ src/sys/rump/dev/lib/libbpf/Makefile Thu Mar 13 02:01:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/01/19 22:38:21 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:01:04 pooka Exp $ # .PATH: ${.CURDIR}/../../../../net @@ -6,7 +6,7 @@ LIB= rumpdev_bpf SRCS= bpf.c bpf_filter.c -SRCS+= component.c +SRCS+= bpf_component.c CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libbpf/bpf_component.c diff -u /dev/null src/sys/rump/dev/lib/libbpf/bpf_component.c:1.1 --- /dev/null Thu Mar 13 02:01:04 2014 +++ src/sys/rump/dev/lib/libbpf/bpf_component.c Thu Mar 13 02:01:04 2014 @@ -0,0 +1,53 @@ +/* $NetBSD: bpf_component.c,v 1.1 2014/03/13 02:01:04 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: bpf_component.c,v 1.1 2014/03/13 02:01:04 pooka Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET) +{ +extern const struct cdevsw bpf_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + bmaj = cmaj = NODEVMAJOR; + if ((error = devsw_attach("bpf", NULL, &bmaj, &bpf_cdevsw, &cmaj)) != 0) + panic("bpf devsw attach failed: %d", error); + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/bpf", cmaj, 0)) !=0) + panic("cannot create bpf device nodes: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libscsitest
Module Name:src Committed By: pooka Date: Thu Mar 13 01:58:46 UTC 2014 Modified Files: src/sys/rump/dev/lib/libscsitest: Makefile Added Files: src/sys/rump/dev/lib/libscsitest: scsitest_component.c Removed Files: src/sys/rump/dev/lib/libscsitest: component.c Log Message: rename component.c -> scsitest_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libscsitest/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libscsitest/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libscsitest/scsitest_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libscsitest/Makefile diff -u src/sys/rump/dev/lib/libscsitest/Makefile:1.1 src/sys/rump/dev/lib/libscsitest/Makefile:1.2 --- src/sys/rump/dev/lib/libscsitest/Makefile:1.1 Tue Aug 24 11:23:35 2010 +++ src/sys/rump/dev/lib/libscsitest/Makefile Thu Mar 13 01:58:46 2014 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2010/08/24 11:23:35 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 01:58:46 pooka Exp $ # LIB= rumpdev_scsitest IOCONF= SCSITEST.ioconf SRCS= scsitest.c -SRCS+= component.c +SRCS+= scsitest_component.c .include .include Added files: Index: src/sys/rump/dev/lib/libscsitest/scsitest_component.c diff -u /dev/null src/sys/rump/dev/lib/libscsitest/scsitest_component.c:1.1 --- /dev/null Thu Mar 13 01:58:46 2014 +++ src/sys/rump/dev/lib/libscsitest/scsitest_component.c Thu Mar 13 01:58:46 2014 @@ -0,0 +1,46 @@ +/* $NetBSD: scsitest_component.c,v 1.1 2014/03/13 01:58:46 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: scsitest_component.c,v 1.1 2014/03/13 01:58:46 pooka Exp $"); + +#include +#include +#include +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + + config_init_component(cfdriver_ioconf_scsitest, + cfattach_ioconf_scsitest, cfdata_ioconf_scsitest); +}
CVS commit: src/sys/rump/dev/lib/libscsipi
Module Name:src Committed By: pooka Date: Thu Mar 13 01:58:20 UTC 2014 Modified Files: src/sys/rump/dev/lib/libscsipi: Makefile Added Files: src/sys/rump/dev/lib/libscsipi: scsipi_component.c Removed Files: src/sys/rump/dev/lib/libscsipi: component.c Log Message: rename component.c -> scsipi_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libscsipi/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libscsipi/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libscsipi/scsipi_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libscsipi/Makefile diff -u src/sys/rump/dev/lib/libscsipi/Makefile:1.1 src/sys/rump/dev/lib/libscsipi/Makefile:1.2 --- src/sys/rump/dev/lib/libscsipi/Makefile:1.1 Mon Aug 23 20:49:53 2010 +++ src/sys/rump/dev/lib/libscsipi/Makefile Thu Mar 13 01:58:20 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/08/23 20:49:53 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 01:58:20 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/scsipi @@ -14,7 +14,7 @@ SRCS+= cd.c sd.c SRCS+= scsipi_verbose.c .endif -SRCS+= component.c +SRCS+= scsipi_component.c CPPFLAGS+= -I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libscsipi/scsipi_component.c diff -u /dev/null src/sys/rump/dev/lib/libscsipi/scsipi_component.c:1.1 --- /dev/null Thu Mar 13 01:58:20 2014 +++ src/sys/rump/dev/lib/libscsipi/scsipi_component.c Thu Mar 13 01:58:20 2014 @@ -0,0 +1,39 @@ +/* $NetBSD: scsipi_component.c,v 1.1 2014/03/13 01:58:20 pooka Exp $ */ + +#include +#include +#include +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern struct bdevsw sd_bdevsw, cd_bdevsw; + extern struct cdevsw sd_cdevsw, cd_cdevsw; + devmajor_t bmaj, cmaj; + + config_init_component(cfdriver_ioconf_scsipi, + cfattach_ioconf_scsipi, cfdata_ioconf_scsipi); + + bmaj = cmaj = -1; + FLAWLESSCALL(devsw_attach("sd", &sd_bdevsw, &bmaj, &sd_cdevsw, &cmaj)); + + FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/sd0", 'a', + bmaj, 0, 8)); + FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rsd0", 'a', + cmaj, 0, 8)); + + bmaj = cmaj = -1; + FLAWLESSCALL(devsw_attach("cd", &cd_bdevsw, &bmaj, &cd_cdevsw, &cmaj)); + + FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/cd0", 'a', + bmaj, 0, 8)); + FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rcd0", 'a', + cmaj, 0, 8)); +}
CVS commit: src/sys/rump/dev/lib/libfss
Module Name:src Committed By: pooka Date: Thu Mar 13 01:59:06 UTC 2014 Modified Files: src/sys/rump/dev/lib/libfss: Makefile Added Files: src/sys/rump/dev/lib/libfss: fss_component.c Removed Files: src/sys/rump/dev/lib/libfss: component.c Log Message: rename component.c -> fss_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libfss/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libfss/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libfss/fss_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libfss/Makefile diff -u src/sys/rump/dev/lib/libfss/Makefile:1.1 src/sys/rump/dev/lib/libfss/Makefile:1.2 --- src/sys/rump/dev/lib/libfss/Makefile:1.1 Mon Apr 12 22:31:48 2010 +++ src/sys/rump/dev/lib/libfss/Makefile Thu Mar 13 01:59:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/04/12 22:31:48 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 01:59:05 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev @@ -7,7 +7,7 @@ LIB= rumpdev_fss SRCS= fss.c -SRCS+= component.c +SRCS+= fss_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libfss/fss_component.c diff -u /dev/null src/sys/rump/dev/lib/libfss/fss_component.c:1.1 --- /dev/null Thu Mar 13 01:59:06 2014 +++ src/sys/rump/dev/lib/libfss/fss_component.c Thu Mar 13 01:59:05 2014 @@ -0,0 +1,59 @@ +/* $NetBSD: fss_component.c,v 1.1 2014/03/13 01:59:05 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.1 2014/03/13 01:59:05 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct bdevsw fss_bdevsw; + extern const struct cdevsw fss_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + bmaj = bdevsw_lookup_major(&fss_bdevsw); + cmaj = cdevsw_lookup_major(&fss_cdevsw); + + if ((error = devsw_attach("fss", &fss_bdevsw, &bmaj, + &fss_cdevsw, &cmaj)) != 0) + panic("cannot attach fss: %d", error); + + if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/fss", '0', + bmaj, 0, 4)) != 0) + panic("cannot create cooked fss dev nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rfss", '0', + cmaj, 0, 4)) != 0) + panic("cannot create raw fss dev nodes: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libaudio
Module Name:src Committed By: pooka Date: Thu Mar 13 01:57:52 UTC 2014 Modified Files: src/sys/rump/dev/lib/libaudio: Makefile Added Files: src/sys/rump/dev/lib/libaudio: audio_component.c Removed Files: src/sys/rump/dev/lib/libaudio: component.c Log Message: rename component.c -> audio_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libaudio/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libaudio/audio_component.c cvs rdiff -u -r1.2 -r0 src/sys/rump/dev/lib/libaudio/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libaudio/Makefile diff -u src/sys/rump/dev/lib/libaudio/Makefile:1.1 src/sys/rump/dev/lib/libaudio/Makefile:1.2 --- src/sys/rump/dev/lib/libaudio/Makefile:1.1 Sat May 1 23:19:56 2010 +++ src/sys/rump/dev/lib/libaudio/Makefile Thu Mar 13 01:57:52 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/05/01 23:19:56 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 01:57:52 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev @@ -7,7 +7,7 @@ LIB= rumpdev_audio IOCONF= AUDIO.ioconf SRCS= audio.c auconv.c aurateconv.c mulaw.c -SRCS+= component.c +SRCS+= audio_component.c CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libaudio/audio_component.c diff -u /dev/null src/sys/rump/dev/lib/libaudio/audio_component.c:1.1 --- /dev/null Thu Mar 13 01:57:52 2014 +++ src/sys/rump/dev/lib/libaudio/audio_component.c Thu Mar 13 01:57:52 2014 @@ -0,0 +1,69 @@ +/* $NetBSD: audio_component.c,v 1.1 2014/03/13 01:57:52 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: audio_component.c,v 1.1 2014/03/13 01:57:52 pooka Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include "ioconf.c" + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ +extern const struct cdevsw audio_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + config_init_component(cfdriver_ioconf_audio, + cfattach_ioconf_audio, cfdata_ioconf_audio); + + bmaj = cmaj = NODEVMAJOR; + if ((error = devsw_attach("audio", NULL, &bmaj, + &audio_cdevsw, &cmaj)) != 0) + panic("audio devsw attach failed: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/audio", '0', + cmaj, AUDIO_DEVICE, 4)) !=0) + panic("cannot create audio device nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/sound", '0', + cmaj, SOUND_DEVICE, 4)) !=0) + panic("cannot create sound device nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/audioctl", '0', + cmaj, AUDIOCTL_DEVICE, 4)) !=0) + panic("cannot create audioctl device nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/mixer", '0', + cmaj, MIXER_DEVICE, 4)) !=0) + panic("cannot create mixer device nodes: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libnetsmb
Module Name:src Committed By: pooka Date: Thu Mar 13 01:57:29 UTC 2014 Modified Files: src/sys/rump/dev/lib/libnetsmb: Makefile Added Files: src/sys/rump/dev/lib/libnetsmb: netsmb_component.c Removed Files: src/sys/rump/dev/lib/libnetsmb: component.c Log Message: rename component.c -> netsmb_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libnetsmb/Makefile cvs rdiff -u -r1.4 -r0 src/sys/rump/dev/lib/libnetsmb/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libnetsmb/netsmb_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libnetsmb/Makefile diff -u src/sys/rump/dev/lib/libnetsmb/Makefile:1.3 src/sys/rump/dev/lib/libnetsmb/Makefile:1.4 --- src/sys/rump/dev/lib/libnetsmb/Makefile:1.3 Tue Feb 16 20:42:45 2010 +++ src/sys/rump/dev/lib/libnetsmb/Makefile Thu Mar 13 01:57:29 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/02/16 20:42:45 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 01:57:29 pooka Exp $ # .PATH: ${.CURDIR}/../../../../netsmb @@ -8,7 +8,7 @@ LIB= rumpdev_netsmb SRCS= iconv.c smb_conn.c smb_crypt.c smb_dev.c smb_iod.c smb_rq.c \ smb_smb.c smb_subr.c smb_trantcp.c smb_usr.c subr_mchain.c -SRCS+= component.c +SRCS+= netsmb_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs #CPPFLAGS+= -DSMB_SOCKET_DEBUG -DSMB_IOD_DEBUG Added files: Index: src/sys/rump/dev/lib/libnetsmb/netsmb_component.c diff -u /dev/null src/sys/rump/dev/lib/libnetsmb/netsmb_component.c:1.1 --- /dev/null Thu Mar 13 01:57:29 2014 +++ src/sys/rump/dev/lib/libnetsmb/netsmb_component.c Thu Mar 13 01:57:29 2014 @@ -0,0 +1,58 @@ +/* $NetBSD: netsmb_component.c,v 1.1 2014/03/13 01:57:29 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: netsmb_component.c,v 1.1 2014/03/13 01:57:29 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +void nsmbattach(int); /* XXX */ + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct cdevsw nsmb_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + bmaj = cmaj = NODEVMAJOR; + if ((error = devsw_attach("nsmb", NULL, &bmaj, &nsmb_cdevsw, &cmaj))!=0) + panic("nsmb devsw attach failed: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/nsmb", '0', + cmaj, 0, 4)) != 0) + panic("cannot create nsmb device nodes: %d", error); + + rump_pdev_add(nsmbattach, 4); +}
CVS commit: src/sys/rump/dev/lib/libdrvctl
Module Name:src Committed By: pooka Date: Thu Mar 13 01:56:56 UTC 2014 Modified Files: src/sys/rump/dev/lib/libdrvctl: Makefile Added Files: src/sys/rump/dev/lib/libdrvctl: drvctl_component.c Removed Files: src/sys/rump/dev/lib/libdrvctl: component.c Log Message: rename component.c -> drvctl_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libdrvctl/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/dev/lib/libdrvctl/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libdrvctl/drvctl_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libdrvctl/Makefile diff -u src/sys/rump/dev/lib/libdrvctl/Makefile:1.1 src/sys/rump/dev/lib/libdrvctl/Makefile:1.2 --- src/sys/rump/dev/lib/libdrvctl/Makefile:1.1 Tue Dec 7 21:38:07 2010 +++ src/sys/rump/dev/lib/libdrvctl/Makefile Thu Mar 13 01:56:55 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/12/07 21:38:07 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 01:56:55 pooka Exp $ # .PATH: ${.CURDIR}/../../../../kern @@ -7,7 +7,7 @@ LIB= rumpdev_drvctl IOCONF= DRVCTL.ioconf SRCS= kern_drvctl.c -SRCS+= component.c +SRCS+= drvctl_component.c .include .include Added files: Index: src/sys/rump/dev/lib/libdrvctl/drvctl_component.c diff -u /dev/null src/sys/rump/dev/lib/libdrvctl/drvctl_component.c:1.1 --- /dev/null Thu Mar 13 01:56:56 2014 +++ src/sys/rump/dev/lib/libdrvctl/drvctl_component.c Thu Mar 13 01:56:55 2014 @@ -0,0 +1,55 @@ +/* $NetBSD: drvctl_component.c,v 1.1 2014/03/13 01:56:55 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: drvctl_component.c,v 1.1 2014/03/13 01:56:55 pooka Exp $"); + +#include +#include +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ +extern const struct cdevsw drvctl_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + drvctl_init(); + + config_init_component(cfdriver_ioconf_drvctl, + cfattach_ioconf_drvctl, cfdata_ioconf_drvctl); + + bmaj = cmaj = NODEVMAJOR; + if ((error = devsw_attach("drvctl", NULL, &bmaj, + &drvctl_cdevsw, &cmaj)) != 0) + panic("drvctl devsw attach failed: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libumass
Module Name:src Committed By: pooka Date: Thu Mar 13 01:54:59 UTC 2014 Modified Files: src/sys/rump/dev/lib/libumass: Makefile Added Files: src/sys/rump/dev/lib/libumass: umass_component.c Removed Files: src/sys/rump/dev/lib/libumass: component.c Log Message: rename component.c -> umass_component.c To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/libumass/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libumass/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libumass/umass_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libumass/Makefile diff -u src/sys/rump/dev/lib/libumass/Makefile:1.6 src/sys/rump/dev/lib/libumass/Makefile:1.7 --- src/sys/rump/dev/lib/libumass/Makefile:1.6 Mon Aug 23 20:49:53 2010 +++ src/sys/rump/dev/lib/libumass/Makefile Thu Mar 13 01:54:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2010/08/23 20:49:53 pooka Exp $ +# $NetBSD: Makefile,v 1.7 2014/03/13 01:54:59 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/usb @@ -9,7 +9,7 @@ IOCONF= UMASS.ioconf .if ${MACHINE} == "i386" SRCS= umass.c umass_isdata.c umass_quirks.c umass_scsipi.c -SRCS+= component.c +SRCS+= umass_component.c .else SRCS= dummy.c .endif Added files: Index: src/sys/rump/dev/lib/libumass/umass_component.c diff -u /dev/null src/sys/rump/dev/lib/libumass/umass_component.c:1.1 --- /dev/null Thu Mar 13 01:54:59 2014 +++ src/sys/rump/dev/lib/libumass/umass_component.c Thu Mar 13 01:54:59 2014 @@ -0,0 +1,19 @@ +/* $NetBSD: umass_component.c,v 1.1 2014/03/13 01:54:59 pooka Exp $ */ + +#include +#include +#include +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" +#include "rump_dev_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + + config_init_component(cfdriver_ioconf_umass, + cfattach_ioconf_umass, cfdata_ioconf_umass); +}
CVS commit: src/sys/rump/dev/lib/libdm
Module Name:src Committed By: pooka Date: Thu Mar 13 01:54:22 UTC 2014 Modified Files: src/sys/rump/dev/lib/libdm: Makefile Added Files: src/sys/rump/dev/lib/libdm: dm_component.c Removed Files: src/sys/rump/dev/lib/libdm: component.c Log Message: rename component.c -> dm_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libdm/Makefile cvs rdiff -u -r1.3 -r0 src/sys/rump/dev/lib/libdm/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libdm/dm_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libdm/Makefile diff -u src/sys/rump/dev/lib/libdm/Makefile:1.3 src/sys/rump/dev/lib/libdm/Makefile:1.4 --- src/sys/rump/dev/lib/libdm/Makefile:1.3 Mon Jun 7 13:57:20 2010 +++ src/sys/rump/dev/lib/libdm/Makefile Thu Mar 13 01:54:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/06/07 13:57:20 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 01:54:22 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/dm @@ -8,7 +8,7 @@ LIB= rumpdev_dm SRCS= device-mapper.c dm_dev.c dm_ioctl.c dm_pdev.c dm_table.c dm_target.c \ dm_target_linear.c dm_target_stripe.c -SRCS+= component.c +SRCS+= dm_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libdm/dm_component.c diff -u /dev/null src/sys/rump/dev/lib/libdm/dm_component.c:1.1 --- /dev/null Thu Mar 13 01:54:22 2014 +++ src/sys/rump/dev/lib/libdm/dm_component.c Thu Mar 13 01:54:22 2014 @@ -0,0 +1,64 @@ +/* $NetBSD: dm_component.c,v 1.1 2014/03/13 01:54:22 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: dm_component.c,v 1.1 2014/03/13 01:54:22 pooka Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct bdevsw dm_bdevsw; + extern const struct cdevsw dm_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + /* go, mydevfs */ + bmaj = cmaj = -1; + + if ((error = devsw_attach("dm", &dm_bdevsw, &bmaj, + &dm_cdevsw, &cmaj)) != 0) + panic("cannot attach dm: %d", error); + + do_sys_mkdir("/dev/mapper", 0770, UIO_SYSSPACE); + + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/mapper/control", 0, + cmaj, 0, 1)) != 0) { + panic("cannot create device-mapper control device: %d", error); + + } +}
CVS commit: src/sys/rump/dev/lib/libputter
Module Name:src Committed By: pooka Date: Thu Mar 13 01:53:48 UTC 2014 Modified Files: src/sys/rump/dev/lib/libputter: Makefile Added Files: src/sys/rump/dev/lib/libputter: putter_component.c Removed Files: src/sys/rump/dev/lib/libputter: component.c Log Message: rename component.c -> putter_component.c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/lib/libputter/Makefile cvs rdiff -u -r1.3 -r0 src/sys/rump/dev/lib/libputter/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libputter/putter_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libputter/Makefile diff -u src/sys/rump/dev/lib/libputter/Makefile:1.5 src/sys/rump/dev/lib/libputter/Makefile:1.6 --- src/sys/rump/dev/lib/libputter/Makefile:1.5 Thu Apr 4 01:48:19 2013 +++ src/sys/rump/dev/lib/libputter/Makefile Thu Mar 13 01:53:48 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2013/04/04 01:48:19 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2014/03/13 01:53:48 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/putter @@ -6,7 +6,7 @@ LIB= rumpdev_putter SRCS= putter.c -SRCS+= component.c +SRCS+= putter_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libputter/putter_component.c diff -u /dev/null src/sys/rump/dev/lib/libputter/putter_component.c:1.1 --- /dev/null Thu Mar 13 01:53:48 2014 +++ src/sys/rump/dev/lib/libputter/putter_component.c Thu Mar 13 01:53:48 2014 @@ -0,0 +1,46 @@ +/* $NetBSD: putter_component.c,v 1.1 2014/03/13 01:53:48 pooka Exp $ */ + +/*- + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: putter_component.c,v 1.1 2014/03/13 01:53:48 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + int error; + + if ((error = rump_vfs_makeonedevnode(S_IFCHR, + "/dev/putter", 178, 0)) != 0) + panic("cannot create /dev/putter: %d", error); +}
CVS commit: src/sys/rump/dev/lib/librnd
Module Name:src Committed By: pooka Date: Thu Mar 13 01:52:37 UTC 2014 Modified Files: src/sys/rump/dev/lib/librnd: Makefile Added Files: src/sys/rump/dev/lib/librnd: rnd_component.c Removed Files: src/sys/rump/dev/lib/librnd: component.c Log Message: rename component.c -> rnd_component.c To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/librnd/Makefile cvs rdiff -u -r1.4 -r0 src/sys/rump/dev/lib/librnd/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/librnd/rnd_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/librnd/Makefile diff -u src/sys/rump/dev/lib/librnd/Makefile:1.6 src/sys/rump/dev/lib/librnd/Makefile:1.7 --- src/sys/rump/dev/lib/librnd/Makefile:1.6 Thu Feb 2 19:43:08 2012 +++ src/sys/rump/dev/lib/librnd/Makefile Thu Mar 13 01:52:37 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2012/02/02 19:43:08 tls Exp $ +# $NetBSD: Makefile,v 1.7 2014/03/13 01:52:37 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev @@ -7,7 +7,7 @@ LIB= rumpdev_rnd SRCS= rndpseudo.c -SRCS+= component.c +SRCS+= rnd_component.c # sys/rump/Makefile.rump sets CPPFLAGS+= -DCOMPAT_50=1, # so we need rndpseudo_50.c from the compat/common directory. Added files: Index: src/sys/rump/dev/lib/librnd/rnd_component.c diff -u /dev/null src/sys/rump/dev/lib/librnd/rnd_component.c:1.1 --- /dev/null Thu Mar 13 01:52:37 2014 +++ src/sys/rump/dev/lib/librnd/rnd_component.c Thu Mar 13 01:52:37 2014 @@ -0,0 +1,65 @@ +/* $NetBSD: rnd_component.c,v 1.1 2014/03/13 01:52:37 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: rnd_component.c,v 1.1 2014/03/13 01:52:37 pooka Exp $"); + +#include +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +void rndattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct cdevsw rnd_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + /* go, mydevfs */ + bmaj = cmaj = -1; + + if ((error = devsw_attach("random", NULL, &bmaj, + &rnd_cdevsw, &cmaj)) != 0) + panic("cannot attach rnd: %d", error); + + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/random", + cmaj, RND_DEV_RANDOM)) != 0) + panic("cannot create /dev/random: %d", error); + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/urandom", + cmaj, RND_DEV_URANDOM)) != 0) + panic("cannot create /dev/urandom: %d", error); + + rump_pdev_add(rndattach, 4); + rnd_init(); +}
CVS commit: src/sys/rump/dev/lib/libpud
Module Name:src Committed By: pooka Date: Thu Mar 13 01:53:04 UTC 2014 Modified Files: src/sys/rump/dev/lib/libpud: Makefile Added Files: src/sys/rump/dev/lib/libpud: pud_component.c Removed Files: src/sys/rump/dev/lib/libpud: component.c Log Message: rename component.c -> pud_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libpud/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/dev/lib/libpud/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libpud/pud_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libpud/Makefile diff -u src/sys/rump/dev/lib/libpud/Makefile:1.1 src/sys/rump/dev/lib/libpud/Makefile:1.2 --- src/sys/rump/dev/lib/libpud/Makefile:1.1 Thu Mar 31 08:36:25 2011 +++ src/sys/rump/dev/lib/libpud/Makefile Thu Mar 13 01:53:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/03/31 08:36:25 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 01:53:04 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/pud @@ -7,7 +7,7 @@ LIB= rumpdev_pud SRCS= pud.c pud_dev.c -SRCS+= component.c +SRCS+= pud_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libpud/pud_component.c diff -u /dev/null src/sys/rump/dev/lib/libpud/pud_component.c:1.1 --- /dev/null Thu Mar 13 01:53:04 2014 +++ src/sys/rump/dev/lib/libpud/pud_component.c Thu Mar 13 01:53:04 2014 @@ -0,0 +1,45 @@ +/* $NetBSD: pud_component.c,v 1.1 2014/03/13 01:53:04 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: pud_component.c,v 1.1 2014/03/13 01:53:04 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + int error; + + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/pud", 178, 1)) != 0) + panic("cannot create /dev/pud: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libpad
Module Name:src Committed By: pooka Date: Thu Mar 13 01:52:04 UTC 2014 Modified Files: src/sys/rump/dev/lib/libpad: Makefile Added Files: src/sys/rump/dev/lib/libpad: pad_component.c Removed Files: src/sys/rump/dev/lib/libpad: component.c Log Message: rename component.c -> pad_component.c To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/lib/libpad/Makefile cvs rdiff -u -r1.2 -r0 src/sys/rump/dev/lib/libpad/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libpad/pad_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libpad/Makefile diff -u src/sys/rump/dev/lib/libpad/Makefile:1.2 src/sys/rump/dev/lib/libpad/Makefile:1.3 --- src/sys/rump/dev/lib/libpad/Makefile:1.2 Thu Apr 4 01:41:51 2013 +++ src/sys/rump/dev/lib/libpad/Makefile Thu Mar 13 01:52:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/04/04 01:41:51 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2014/03/13 01:52:04 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/pad @@ -6,7 +6,7 @@ LIB= rumpdev_pad SRCS= pad.c padvol.c -SRCS+= component.c +SRCS+= pad_component.c CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libpad/pad_component.c diff -u /dev/null src/sys/rump/dev/lib/libpad/pad_component.c:1.1 --- /dev/null Thu Mar 13 01:52:04 2014 +++ src/sys/rump/dev/lib/libpad/pad_component.c Thu Mar 13 01:52:04 2014 @@ -0,0 +1,46 @@ +/* $NetBSD: pad_component.c,v 1.1 2014/03/13 01:52:04 pooka Exp $ */ + +/*- + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: pad_component.c,v 1.1 2014/03/13 01:52:04 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + int error; + +if ((error = rump_vfs_makedevnodes(S_IFCHR, + "/dev/pad", '0', 189, 0, 4)) != 0) + panic("cannot create pad device: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libopencrypto
Module Name:src Committed By: pooka Date: Thu Mar 13 01:51:30 UTC 2014 Modified Files: src/sys/rump/dev/lib/libopencrypto: Makefile Added Files: src/sys/rump/dev/lib/libopencrypto: opencrypto_component.c Removed Files: src/sys/rump/dev/lib/libopencrypto: component.c Log Message: rename component.c -> opencrypto_component.c To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/libopencrypto/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libopencrypto/component.c cvs rdiff -u -r0 -r1.1 \ src/sys/rump/dev/lib/libopencrypto/opencrypto_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libopencrypto/Makefile diff -u src/sys/rump/dev/lib/libopencrypto/Makefile:1.6 src/sys/rump/dev/lib/libopencrypto/Makefile:1.7 --- src/sys/rump/dev/lib/libopencrypto/Makefile:1.6 Mon Feb 3 23:11:40 2014 +++ src/sys/rump/dev/lib/libopencrypto/Makefile Thu Mar 13 01:51:30 2014 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.6 2014/02/03 23:11:40 pgoyette Exp $ +# $NetBSD: Makefile,v 1.7 2014/03/13 01:51:30 pooka Exp $ # .PATH: ${.CURDIR}/../../../../opencrypto LIB= rumpdev_opencrypto -SRCS= component.c +SRCS= opencrypto_component.c # Sources for crypto framework Added files: Index: src/sys/rump/dev/lib/libopencrypto/opencrypto_component.c diff -u /dev/null src/sys/rump/dev/lib/libopencrypto/opencrypto_component.c:1.1 --- /dev/null Thu Mar 13 01:51:30 2014 +++ src/sys/rump/dev/lib/libopencrypto/opencrypto_component.c Thu Mar 13 01:51:30 2014 @@ -0,0 +1,69 @@ +/* $NetBSD: opencrypto_component.c,v 1.1 2014/03/13 01:51:30 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: opencrypto_component.c,v 1.1 2014/03/13 01:51:30 pooka Exp $"); + +#include +#include +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +void cryptoattach(int); +void swcryptoattach(int); +void crypto_init(void); + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct cdevsw crypto_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + /* go, mydevfs */ + bmaj = cmaj = -1; + + if ((error = devsw_attach("crypto", NULL, &bmaj, + &crypto_cdevsw, &cmaj)) != 0) + panic("cannot attach crypto: %d", error); + + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/crypto", + cmaj, 0)) != 0) + panic("cannot create /dev/crypto: %d", error); + + /* + * Initialize OpenCrypto and its pseudo-devices here + */ + crypto_init(); + rump_pdev_add(cryptoattach, 1); + rump_pdev_add(swcryptoattach, 0); +}
CVS commit: src/sys/rump/dev/lib/libcgd
Module Name:src Committed By: pooka Date: Thu Mar 13 01:50:51 UTC 2014 Modified Files: src/sys/rump/dev/lib/libcgd: Makefile Added Files: src/sys/rump/dev/lib/libcgd: cgd_component.c Removed Files: src/sys/rump/dev/lib/libcgd: component.c Log Message: rename component.c -> cgd_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libcgd/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libcgd/cgd_component.c cvs rdiff -u -r1.7 -r0 src/sys/rump/dev/lib/libcgd/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libcgd/Makefile diff -u src/sys/rump/dev/lib/libcgd/Makefile:1.3 src/sys/rump/dev/lib/libcgd/Makefile:1.4 --- src/sys/rump/dev/lib/libcgd/Makefile:1.3 Tue Feb 16 20:42:44 2010 +++ src/sys/rump/dev/lib/libcgd/Makefile Thu Mar 13 01:50:51 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/02/16 20:42:44 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 01:50:51 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev @@ -7,7 +7,7 @@ LIB= rumpdev_cgd SRCS= cgd.c cgd_crypto.c -SRCS+= component.c +SRCS+= cgd_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libcgd/cgd_component.c diff -u /dev/null src/sys/rump/dev/lib/libcgd/cgd_component.c:1.1 --- /dev/null Thu Mar 13 01:50:51 2014 +++ src/sys/rump/dev/lib/libcgd/cgd_component.c Thu Mar 13 01:50:51 2014 @@ -0,0 +1,59 @@ +/* $NetBSD: cgd_component.c,v 1.1 2014/03/13 01:50:51 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: cgd_component.c,v 1.1 2014/03/13 01:50:51 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct bdevsw cgd_bdevsw; + extern const struct cdevsw cgd_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + /* go, mydevfs */ + bmaj = cmaj = -1; + + if ((error = devsw_attach("/dev/cgd0", &cgd_bdevsw, &bmaj, + &cgd_cdevsw, &cmaj)) != 0) + panic("cannot attach cgd: %d", error); + + if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/cgd0", 'a', + bmaj, 0, 7)) != 0) + panic("cannot create cooked cgd dev nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rcgd0", 'a', + cmaj, 0, 7)) != 0) + panic("cannot create raw cgd dev nodes: %d", error); +}
CVS commit: src/sys/rump/dev/lib/libraidframe
Module Name:src Committed By: pooka Date: Thu Mar 13 01:49:59 UTC 2014 Modified Files: src/sys/rump/dev/lib/libraidframe: Makefile Added Files: src/sys/rump/dev/lib/libraidframe: raidframe_component.c Removed Files: src/sys/rump/dev/lib/libraidframe: component.c Log Message: rename component.c -> raidframe_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libraidframe/Makefile cvs rdiff -u -r1.5 -r0 src/sys/rump/dev/lib/libraidframe/component.c cvs rdiff -u -r0 -r1.1 \ src/sys/rump/dev/lib/libraidframe/raidframe_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libraidframe/Makefile diff -u src/sys/rump/dev/lib/libraidframe/Makefile:1.3 src/sys/rump/dev/lib/libraidframe/Makefile:1.4 --- src/sys/rump/dev/lib/libraidframe/Makefile:1.3 Mon Nov 23 12:23:20 2009 +++ src/sys/rump/dev/lib/libraidframe/Makefile Thu Mar 13 01:49:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2009/11/23 12:23:20 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 01:49:59 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/raidframe @@ -21,7 +21,7 @@ SRCS= rf_acctrace.c rf_alloclist.c rf_ rf_shutdown.c rf_sstf.c rf_states.c rf_stripelocks.c \ rf_strutils.c rf_utils.c rf_compat50.c rf_paritymap.c -SRCS+= component.c +SRCS+= raidframe_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs Added files: Index: src/sys/rump/dev/lib/libraidframe/raidframe_component.c diff -u /dev/null src/sys/rump/dev/lib/libraidframe/raidframe_component.c:1.1 --- /dev/null Thu Mar 13 01:49:59 2014 +++ src/sys/rump/dev/lib/libraidframe/raidframe_component.c Thu Mar 13 01:49:59 2014 @@ -0,0 +1,66 @@ +/* $NetBSD: raidframe_component.c,v 1.1 2014/03/13 01:49:59 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: raidframe_component.c,v 1.1 2014/03/13 01:49:59 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +CFDRIVER_DECL(raid, DV_DISK, NULL); + +void raidattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct bdevsw raid_bdevsw; + extern const struct cdevsw raid_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + config_cfdriver_attach(&raid_cd); + + bmaj = cmaj = -1; + if ((error = devsw_attach("raid", &raid_bdevsw, &bmaj, + &raid_cdevsw, &cmaj)) != 0) + panic("raid devsw attach failed: %d", error); + + if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/raid0", 'a', + bmaj, 0, 7)) != 0) + panic("cannot create cooked raid dev nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rraid0", 'a', + cmaj, 0, 7)) != 0) + panic("cannot create raw raid dev nodes: %d", error); + + rump_pdev_add(raidattach, 4); +}
CVS commit: src/sys/rump/dev/lib/libwscons
Module Name:src Committed By: pooka Date: Thu Mar 13 01:48:08 UTC 2014 Modified Files: src/sys/rump/dev/lib/libwscons: Makefile Added Files: src/sys/rump/dev/lib/libwscons: wscons_component.c Removed Files: src/sys/rump/dev/lib/libwscons: component.c Log Message: rename component.c -> wscons_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libwscons/Makefile cvs rdiff -u -r1.5 -r0 src/sys/rump/dev/lib/libwscons/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libwscons/wscons_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libwscons/Makefile diff -u src/sys/rump/dev/lib/libwscons/Makefile:1.3 src/sys/rump/dev/lib/libwscons/Makefile:1.4 --- src/sys/rump/dev/lib/libwscons/Makefile:1.3 Mon Mar 8 10:54:21 2010 +++ src/sys/rump/dev/lib/libwscons/Makefile Thu Mar 13 01:48:08 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/03/08 10:54:21 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 01:48:08 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/wscons @@ -8,7 +8,7 @@ IOCONF= WSCONS.ioconf SRCS= wsevent.c wskbd.c wskbdutil.c wsmouse.c -SRCS+= component.c +SRCS+= wscons_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs -I${.CURDIR}/opt Added files: Index: src/sys/rump/dev/lib/libwscons/wscons_component.c diff -u /dev/null src/sys/rump/dev/lib/libwscons/wscons_component.c:1.1 --- /dev/null Thu Mar 13 01:48:08 2014 +++ src/sys/rump/dev/lib/libwscons/wscons_component.c Thu Mar 13 01:48:08 2014 @@ -0,0 +1,31 @@ +/* $NetBSD: wscons_component.c,v 1.1 2014/03/13 01:48:08 pooka Exp $ */ + +#include +#include +#include +#include +#include + +#include "ioconf.c" + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern struct cdevsw wskbd_cdevsw, wsmouse_cdevsw; + devmajor_t bmaj, cmaj; + + config_init_component(cfdriver_ioconf_wscons, + cfattach_ioconf_wscons, cfdata_ioconf_wscons); + + bmaj = cmaj = -1; + FLAWLESSCALL(devsw_attach("wskbd", NULL, &bmaj, &wskbd_cdevsw, &cmaj)); + FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/wskbd", cmaj, 0)); + + bmaj = cmaj = -1; + FLAWLESSCALL(devsw_attach("wsmouse", NULL, &bmaj, + &wsmouse_cdevsw, &cmaj)); + FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/wsmouse", cmaj, 0)); +}
CVS commit: src/sys/rump/dev/lib/libsysmon
Module Name:src Committed By: pooka Date: Thu Mar 13 01:47:07 UTC 2014 Modified Files: src/sys/rump/dev/lib/libsysmon: Makefile Added Files: src/sys/rump/dev/lib/libsysmon: sysmon_component.c Removed Files: src/sys/rump/dev/lib/libsysmon: component.c Log Message: rename component.c -> sysmon_component.c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/lib/libsysmon/Makefile cvs rdiff -u -r1.6 -r0 src/sys/rump/dev/lib/libsysmon/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libsysmon/sysmon_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libsysmon/Makefile diff -u src/sys/rump/dev/lib/libsysmon/Makefile:1.5 src/sys/rump/dev/lib/libsysmon/Makefile:1.6 --- src/sys/rump/dev/lib/libsysmon/Makefile:1.5 Sun Dec 5 16:50:09 2010 +++ src/sys/rump/dev/lib/libsysmon/Makefile Thu Mar 13 01:47:07 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2010/12/05 16:50:09 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2014/03/13 01:47:07 pooka Exp $ # .PATH: ${.CURDIR}/../../../../dev/sysmon @@ -10,7 +10,7 @@ SRCS= sysmon_taskq.c sysmon_power.c sysm sysmon_envsys_tables.c sysmon_envsys_util.c sysmon_wdog.c sysmon.c \ swsensor.c swwdog.c -SRCS+= component.c +SRCS+= sysmon_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs -I${.CURDIR}/opt Added files: Index: src/sys/rump/dev/lib/libsysmon/sysmon_component.c diff -u /dev/null src/sys/rump/dev/lib/libsysmon/sysmon_component.c:1.1 --- /dev/null Thu Mar 13 01:47:07 2014 +++ src/sys/rump/dev/lib/libsysmon/sysmon_component.c Thu Mar 13 01:47:07 2014 @@ -0,0 +1,82 @@ +/* $NetBSD: sysmon_component.c,v 1.1 2014/03/13 01:47:07 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: sysmon_component.c,v 1.1 2014/03/13 01:47:07 pooka Exp $"); + +#include +#include +#include +#include + +#include +#include + +#include "rump_private.h" +#include "rump_dev_private.h" +#include "rump_vfs_private.h" + +#include "ioconf.c" + +void swwdogattach(int); +void swsensorattach(int); + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct cdevsw sysmon_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + if ((error = config_init_component(cfdriver_ioconf_swwdog, + cfattach_ioconf_swwdog, cfdata_ioconf_swwdog)) != 0) { + printf("cannot attach swwdog: %d\n", error); + return; + } + + bmaj = cmaj = -1; + if ((error = devsw_attach("sysmon", NULL, &bmaj, + &sysmon_cdevsw, &cmaj)) != 0) + panic("sysmon devsw attach failed: %d", error); + + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/sysmon", + cmaj, SYSMON_MINOR_ENVSYS)) != 0) + panic("cannot create /dev/sysmon: %d", error); + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/watchdog", + cmaj, SYSMON_MINOR_WDOG)) != 0) + panic("cannot create /dev/watchdog: %d", error); + if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/power", + cmaj, SYSMON_MINOR_POWER)) != 0) + panic("cannot create /dev/power: %d", error); + + sysmon_task_queue_preinit(); + sysmon_task_queue_init(); + sysmon_envsys_init(); + sysmon_power_init(); + sysmon_wdog_init(); + + rump_pdev_add(swwdogattach, 0); +}
CVS commit: src/sys/rump/fs/lib/libsyspuffs
Module Name:src Committed By: pooka Date: Thu Mar 13 01:45:33 UTC 2014 Modified Files: src/sys/rump/fs/lib/libsyspuffs: Makefile Added Files: src/sys/rump/fs/lib/libsyspuffs: syspuffs_component.c Removed Files: src/sys/rump/fs/lib/libsyspuffs: component.c Log Message: rename component.c -> syspuffs_component.c To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/fs/lib/libsyspuffs/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/fs/lib/libsyspuffs/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/fs/lib/libsyspuffs/syspuffs_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/fs/lib/libsyspuffs/Makefile diff -u src/sys/rump/fs/lib/libsyspuffs/Makefile:1.7 src/sys/rump/fs/lib/libsyspuffs/Makefile:1.8 --- src/sys/rump/fs/lib/libsyspuffs/Makefile:1.7 Tue Jul 6 16:13:57 2010 +++ src/sys/rump/fs/lib/libsyspuffs/Makefile Thu Mar 13 01:45:33 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2010/07/06 16:13:57 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2014/03/13 01:45:33 pooka Exp $ # .PATH: ${.CURDIR}/../../../../fs/puffs @@ -9,7 +9,8 @@ SRCS= puffs_msgif.c puffs_node.c puffs_s SRCS+= puffs_compat.c SRCS+= puffs_rumpglue.c -SRCS+= component.c + +SRCS+= syspuffs_component.c CPPFLAGS+= -DPUFFSDEBUG -I${RUMPTOP}/librump/rumpvfs CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern Added files: Index: src/sys/rump/fs/lib/libsyspuffs/syspuffs_component.c diff -u /dev/null src/sys/rump/fs/lib/libsyspuffs/syspuffs_component.c:1.1 --- /dev/null Thu Mar 13 01:45:33 2014 +++ src/sys/rump/fs/lib/libsyspuffs/syspuffs_component.c Thu Mar 13 01:45:33 2014 @@ -0,0 +1,44 @@ +/* $NetBSD: syspuffs_component.c,v 1.1 2014/03/13 01:45:33 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: syspuffs_component.c,v 1.1 2014/03/13 01:45:33 pooka Exp $"); + +#include +#include +#include +#include +#include +#include + +#include "rump_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_VFS) +{ + + FLAWLESSCALL(do_sys_symlink("putter", "/dev/puffs", UIO_SYSSPACE)); +}
CVS commit: src/sys/rump/fs/lib/libzfs
Module Name:src Committed By: pooka Date: Thu Mar 13 01:46:10 UTC 2014 Modified Files: src/sys/rump/fs/lib/libzfs: Makefile Added Files: src/sys/rump/fs/lib/libzfs: zfs_component.c Removed Files: src/sys/rump/fs/lib/libzfs: component.c Log Message: rename component.c -> zfs_component.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/fs/lib/libzfs/Makefile cvs rdiff -u -r1.6 -r0 src/sys/rump/fs/lib/libzfs/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/fs/lib/libzfs/zfs_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/fs/lib/libzfs/Makefile diff -u src/sys/rump/fs/lib/libzfs/Makefile:1.3 src/sys/rump/fs/lib/libzfs/Makefile:1.4 --- src/sys/rump/fs/lib/libzfs/Makefile:1.3 Thu Mar 10 19:24:37 2011 +++ src/sys/rump/fs/lib/libzfs/Makefile Thu Mar 13 01:46:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2011/03/10 19:24:37 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/13 01:46:10 pooka Exp $ # S!= cd ${.PARSEDIR}/../../../../;pwd @@ -11,7 +11,7 @@ LIB= rumpfs_zfs CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs\ -I${RUMPTOP}/librump/rumpdev -SRCS+= component.c +SRCS+= zfs_component.c .include .include Added files: Index: src/sys/rump/fs/lib/libzfs/zfs_component.c diff -u /dev/null src/sys/rump/fs/lib/libzfs/zfs_component.c:1.1 --- /dev/null Thu Mar 13 01:46:10 2014 +++ src/sys/rump/fs/lib/libzfs/zfs_component.c Thu Mar 13 01:46:10 2014 @@ -0,0 +1,57 @@ +/* $NetBSD: zfs_component.c,v 1.1 2014/03/13 01:46:10 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: zfs_component.c,v 1.1 2014/03/13 01:46:10 pooka Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_VFS) +{ + extern const struct bdevsw zfs_bdevsw; + extern const struct cdevsw zfs_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + /* go, mydevfs */ + bmaj = cmaj = -1; + + if ((error = devsw_attach("zfs", &zfs_bdevsw, &bmaj, + &zfs_cdevsw, &cmaj)) != 0 && error != EEXIST) + panic("cannot attach zfs: %d", error); + + if ((error = rump_vfs_makeonedevnode(S_IFCHR, + "/dev/zfs", cmaj, 0)) != 0) + panic("cannot create zfs dev nodes: %d", error); + devsw_detach(&zfs_bdevsw, &zfs_cdevsw); +}
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Thu Mar 13 01:42:59 UTC 2014 Modified Files: src/sys/rump/net/lib/libshmif: Makefile if_shmem.c Added Files: src/sys/rump/net/lib/libshmif: shmif_user.c shmif_user.h Removed Files: src/sys/rump/net/lib/libshmif: rumpcomp_user.c rumpcomp_user.h Log Message: rename rumpcomp_user.* -> shmif_user.* To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/rump/net/lib/libshmif/Makefile cvs rdiff -u -r1.58 -r1.59 src/sys/rump/net/lib/libshmif/if_shmem.c cvs rdiff -u -r1.14 -r0 src/sys/rump/net/lib/libshmif/rumpcomp_user.c cvs rdiff -u -r1.4 -r0 src/sys/rump/net/lib/libshmif/rumpcomp_user.h cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libshmif/shmif_user.c \ src/sys/rump/net/lib/libshmif/shmif_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libshmif/Makefile diff -u src/sys/rump/net/lib/libshmif/Makefile:1.4 src/sys/rump/net/lib/libshmif/Makefile:1.5 --- src/sys/rump/net/lib/libshmif/Makefile:1.4 Sun Apr 28 10:43:45 2013 +++ src/sys/rump/net/lib/libshmif/Makefile Thu Mar 13 01:42:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2013/04/28 10:43:45 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2014/03/13 01:42:59 pooka Exp $ # LIB= rumpnet_shmif @@ -8,7 +8,7 @@ SRCS+= component.c CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpkern -RUMPCOMP_USER= # filewatch +RUMPCOMP_USER_SRCS= shmif_user.c .include .include Index: src/sys/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.58 src/sys/rump/net/lib/libshmif/if_shmem.c:1.59 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.58 Fri Sep 13 20:38:04 2013 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Thu Mar 13 01:42:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.58 2013/09/13 20:38:04 joerg Exp $ */ +/* $NetBSD: if_shmem.c,v 1.59 2014/03/13 01:42:59 pooka Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.58 2013/09/13 20:38:04 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.59 2014/03/13 01:42:59 pooka Exp $"); #include #include @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v #include "rump_private.h" #include "rump_net_private.h" -#include "rumpcomp_user.h" +#include "shmif_user.h" static int shmif_clone(struct if_clone *, int); static int shmif_unclone(struct ifnet *); Added files: Index: src/sys/rump/net/lib/libshmif/shmif_user.c diff -u /dev/null src/sys/rump/net/lib/libshmif/shmif_user.c:1.1 --- /dev/null Thu Mar 13 01:42:59 2014 +++ src/sys/rump/net/lib/libshmif/shmif_user.c Thu Mar 13 01:42:59 2014 @@ -0,0 +1,230 @@ +/* $NetBSD: shmif_user.c,v 1.1 2014/03/13 01:42:59 pooka Exp $ */ + +/*- + * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. + * + * 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. + */ +#ifndef _KERNEL +#include +#include + +#include + +#include + +#include "shmif_user.h" + +#define seterr(_v_) if ((_v_) == -1) *error = errno; else *error = 0; + +/* + * On BSD we use kqueue, on Linux we use inotify. The underlying + * interface requirements aren't quite the same, but we have a very + * good chance of doing the fd->path mapping on Linux thanks to dcache, + * so just keep the existing interfaces for now. + */ +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) \ +|| defined(__OpenBSD__) +#include + +#include + +int +rumpcomp_shmif_watchsetup(int *kqp, int fd) +{ + struct kevent kev; + int rv, kq; + + kq = *kqp; + if (kq == -1) { + kq = kqueue(); + if (kq == -1) { + rv = errno; + goto
CVS commit: src/sys/rump/net/lib/libsockin
Module Name:src Committed By: pooka Date: Thu Mar 13 01:40:30 UTC 2014 Modified Files: src/sys/rump/net/lib/libsockin: Makefile sockin.c Added Files: src/sys/rump/net/lib/libsockin: sockin_user.c sockin_user.h Removed Files: src/sys/rump/net/lib/libsockin: rumpcomp_user.c rumpcomp_user.h Log Message: rename rumpcomp_user.* -> sockin_user.* To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/rump/net/lib/libsockin/Makefile cvs rdiff -u -r1.8 -r0 src/sys/rump/net/lib/libsockin/rumpcomp_user.c cvs rdiff -u -r1.3 -r0 src/sys/rump/net/lib/libsockin/rumpcomp_user.h cvs rdiff -u -r1.35 -r1.36 src/sys/rump/net/lib/libsockin/sockin.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libsockin/sockin_user.c \ src/sys/rump/net/lib/libsockin/sockin_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libsockin/Makefile diff -u src/sys/rump/net/lib/libsockin/Makefile:1.6 src/sys/rump/net/lib/libsockin/Makefile:1.7 --- src/sys/rump/net/lib/libsockin/Makefile:1.6 Mon Mar 18 13:14:11 2013 +++ src/sys/rump/net/lib/libsockin/Makefile Thu Mar 13 01:40:30 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2013/03/18 13:14:11 pooka Exp $ +# $NetBSD: Makefile,v 1.7 2014/03/13 01:40:30 pooka Exp $ # LIB= rumpnet_sockin @@ -8,7 +8,7 @@ SRCS+= component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -RUMPCOMP_USER= #defined +RUMPCOMP_USER_SRCS= sockin_user.c .include .include Index: src/sys/rump/net/lib/libsockin/sockin.c diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.35 src/sys/rump/net/lib/libsockin/sockin.c:1.36 --- src/sys/rump/net/lib/libsockin/sockin.c:1.35 Thu Aug 29 17:49:21 2013 +++ src/sys/rump/net/lib/libsockin/sockin.c Thu Mar 13 01:40:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sockin.c,v 1.35 2013/08/29 17:49:21 rmind Exp $ */ +/* $NetBSD: sockin.c,v 1.36 2014/03/13 01:40:30 pooka Exp $ */ /* * Copyright (c) 2008, 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.35 2013/08/29 17:49:21 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.36 2014/03/13 01:40:30 pooka Exp $"); #include #include @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1 #include #include "rump_private.h" -#include "rumpcomp_user.h" +#include "sockin_user.h" /* * An inet communication domain which uses the socket interface. Added files: Index: src/sys/rump/net/lib/libsockin/sockin_user.c diff -u /dev/null src/sys/rump/net/lib/libsockin/sockin_user.c:1.1 --- /dev/null Thu Mar 13 01:40:30 2014 +++ src/sys/rump/net/lib/libsockin/sockin_user.c Thu Mar 13 01:40:30 2014 @@ -0,0 +1,587 @@ +/* $NetBSD: sockin_user.c,v 1.1 2014/03/13 01:40:30 pooka Exp $ */ + +/* + * Copyright (c) 2008 Antti Kantee. All Rights Reserved. + * + * 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. + */ + +/* for struct msghdr content visibility */ +#define _XOPEN_SOURCE 4 +#define _XOPEN_SOURCE_EXTENDED 1 + +#ifndef _KERNEL +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "sockin_user.h" + +#define seterror(_v_) if ((_v_) == -1) rv = errno; else rv = 0; + +#ifndef __arraycount +#define __arraycount(a) (sizeof(a) / sizeof(*a)) +#endif + +#ifndef __UNCONST +#define __UNCONST(a) ((void*)(const void*)a) +#endif + +#include +#include +#include + + +static int translate_so_sockopt(int); +static int translate_ip_sockopt(int); +static int translate_tcp_sockopt(int); +static int translate_domain(int); + +#define translate(_a_) case RUMP_##_a_: return _a_ +static int +translate_so_sockopt(int lopt) +{ + + switch (lopt) { + translate(S
CVS commit: src/sys/rump/dev/lib/libugenhc
Module Name:src Committed By: pooka Date: Thu Mar 13 01:38:11 UTC 2014 Modified Files: src/sys/rump/dev/lib/libugenhc: Makefile ugenhc.c Added Files: src/sys/rump/dev/lib/libugenhc: ugenhc_user.c ugenhc_user.h Removed Files: src/sys/rump/dev/lib/libugenhc: rumpcomp_user.c rumpcomp_user.h Log Message: rename rumpcomp_user.* -> ugenhc_user.* To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/dev/lib/libugenhc/Makefile cvs rdiff -u -r1.6 -r0 src/sys/rump/dev/lib/libugenhc/rumpcomp_user.c cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libugenhc/rumpcomp_user.h cvs rdiff -u -r1.16 -r1.17 src/sys/rump/dev/lib/libugenhc/ugenhc.c cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libugenhc/ugenhc_user.c \ src/sys/rump/dev/lib/libugenhc/ugenhc_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libugenhc/Makefile diff -u src/sys/rump/dev/lib/libugenhc/Makefile:1.7 src/sys/rump/dev/lib/libugenhc/Makefile:1.8 --- src/sys/rump/dev/lib/libugenhc/Makefile:1.7 Thu Sep 19 17:55:22 2013 +++ src/sys/rump/dev/lib/libugenhc/Makefile Thu Mar 13 01:38:11 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2013/09/19 17:55:22 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2014/03/13 01:38:11 pooka Exp $ # LIB= rumpdev_ugenhc @@ -8,7 +8,7 @@ SRCS= ugenhc.c ugenhc_at_mainbus.c ugenh CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -RUMPCOMP_USER= #ioctl +RUMPCOMP_USER_SRCS= ugenhc_user.c .include .include Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.16 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.17 --- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.16 Fri Sep 13 20:38:39 2013 +++ src/sys/rump/dev/lib/libugenhc/ugenhc.c Thu Mar 13 01:38:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ugenhc.c,v 1.16 2013/09/13 20:38:39 joerg Exp $ */ +/* $NetBSD: ugenhc.c,v 1.17 2014/03/13 01:38:11 pooka Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.16 2013/09/13 20:38:39 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.17 2014/03/13 01:38:11 pooka Exp $"); #include #include @@ -81,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1 #include -#include "rumpcomp_user.h" +#include "ugenhc_user.h" #include "rump_private.h" #include "rump_dev_private.h" Added files: Index: src/sys/rump/dev/lib/libugenhc/ugenhc_user.c diff -u /dev/null src/sys/rump/dev/lib/libugenhc/ugenhc_user.c:1.1 --- /dev/null Thu Mar 13 01:38:11 2014 +++ src/sys/rump/dev/lib/libugenhc/ugenhc_user.c Thu Mar 13 01:38:11 2014 @@ -0,0 +1,54 @@ +/* $NetBSD: ugenhc_user.c,v 1.1 2014/03/13 01:38:11 pooka Exp $ */ + +/* + * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. + * + * 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. + */ +#ifndef _KERNEL +#include +#include + +#include +#include + +#include + +#include "ugenhc_user.h" + +int +rumpcomp_ugenhc_ioctl(int fd, u_long cmd, void *data, int *ioctlrv) +{ + void *cookie; + int rv; + + cookie = rumpuser_component_unschedule(); + *ioctlrv = ioctl(fd, cmd, data); + if (*ioctlrv == -1) + rv = errno; + else + rv = 0; + rumpuser_component_schedule(cookie); + + return rumpuser_component_errtrans(rv); +} +#endif Index: src/sys/rump/dev/lib/libugenhc/ugenhc_user.h diff -u /dev/null src/sys/rump/dev/lib/libugenhc/ugenhc_user.h:1.1 --- /dev/null Thu Mar 13 01:38:11 2014 +++ src/sys/rump/dev/lib/libugenhc/ugenhc_user.h Thu Mar 13 01:38:11 2014 @@ -0,0 +1,28 @@ +/* $NetBSD: ugenhc_user.h,v 1.1 2014/03/13 01:38:11 pooka Exp $ */ + +/* + * Copyright (c) 2007-2010 Antti Kantee. All Rights Re
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Thu Mar 13 01:34:06 UTC 2014 Modified Files: src/sys/rump: Makefile.rump src/sys/rump/librump/rumpkern: Makefile.rumpkern Log Message: Allow multiple "rumpcomp_user" source modules to be specified by introducing RUMPCOMP_USER_SRCS. Make RUMPCOMP_USER issue a deprecation warning, but for compat make it set RUMPCOMP_USER_SRCS=rumpcomp_user.c for now. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/rump/Makefile.rump cvs rdiff -u -r1.139 -r1.140 src/sys/rump/librump/rumpkern/Makefile.rumpkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.90 src/sys/rump/Makefile.rump:1.91 --- src/sys/rump/Makefile.rump:1.90 Mon Mar 10 22:38:53 2014 +++ src/sys/rump/Makefile.rump Thu Mar 13 01:34:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.90 2014/03/10 22:38:53 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.91 2014/03/13 01:34:06 pooka Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -96,30 +96,36 @@ DPSRCS+= ${RUMPTOP}/Makefile.rump # XXX: Warning flags are not in CWARNFLAGS. Manually add a few important ones. -.ifdef RUMPCOMP_USER && !defined(RUMPKERN_ONLY) +.ifdef RUMPCOMP_USER +.warning RUMPCOMP_USER is deprecated. Use RUMPCOMP_USER_SRCS +RUMPCOMP_USER_SRCS= rumpcomp_user.c +.endif +.ifdef RUMPCOMP_USER_SRCS && !defined(RUMPKERN_ONLY) .if empty(DESTDIR) DESTDIR=/ .endif BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR} RUMPCOMP_USER_WERROR = ${${_NOWERROR} == "no" :?-Werror:} -rumpcomp_user.d: rumpcomp_user.c +.for rcusrc in ${RUMPCOMP_USER_SRCS:R} +${rcusrc}.d: ${rcusrc}.c ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:u:M*rumpcomp_user.c} + ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:u:M*${rcusrc}.c} -rumpcomp_user.o: rumpcomp_user.c +${rcusrc}.o: ${rcusrc}.c ${_MKTARGET_COMPILE} - ${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*rumpcomp_user.c} + ${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} -rumpcomp_user.pico: rumpcomp_user.c +${rcusrc}.pico: ${rcusrc}.c ${_MKTARGET_COMPILE} - ${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*rumpcomp_user.c} + ${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} -rumpcomp_user.po: rumpcomp_user.c +${rcusrc}.po: ${rcusrc}.c ${_MKTARGET_COMPILE} - ${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*rumpcomp_user.c} + ${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} -RUMPOBJ_NORENAME+=rumpcomp_user.*o -SRCS+=rumpcomp_user.c +RUMPOBJ_NORENAME+=${rcusrc}.o ${rcusrc}.pico ${rcusrc}.po +SRCS+=${rcusrc}.c +.endfor .endif # @@ -182,14 +188,14 @@ __archivebuild: .USE ${_MKTARGET_BUILD} rm -f ${.TARGET} .endif - for obj in ${RUMP_SYMREN:U${.ALLSRC:N${RUMPOBJ_NORENAME}}}; do \ - ${NM} -go $${obj} | ${TOOL_AWK} ' \ + for renameobj in ${RUMP_SYMREN:U${.ALLSRC:C/(${RUMPOBJ_NORENAME:ts|})//g}}; do \ + ${NM} -go $${renameobj} | ${TOOL_AWK} ' \ $$NF!~/^'${_PQ}'(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \ {s=$$NF;sub(/^'${_PQ}'/, "&rumpns_", s); print $$NF, s}'\ - | sort | uniq > renametab.$${obj}; \ + | sort | uniq > renametab.$${renameobj}; \ ${OBJCOPY} --preserve-dates --redefine-syms \ - renametab.$${obj} $${obj}; \ - rm -f renametab.$${obj}; \ + renametab.$${renameobj} $${renameobj}; \ + rm -f renametab.$${renameobj}; \ done .if !defined(RUMP_SYMREN) ${AR} ${_ARFL} ${.TARGET} \ Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.139 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.140 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.139 Mon Mar 10 22:38:53 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Thu Mar 13 01:34:06
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Wed Mar 12 23:42:33 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: Makefile.virtif Added Files: src/sys/rump/net/lib/libvirtif: virtif_component.c Removed Files: src/sys/rump/net/lib/libvirtif: component.c Log Message: component.c -> virtif_component.c, just to decrease risk of conflicts. No runtime change. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libvirtif/Makefile.virtif cvs rdiff -u -r1.4 -r0 src/sys/rump/net/lib/libvirtif/component.c cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libvirtif/virtif_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/Makefile.virtif diff -u src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.1 src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.2 --- src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.1 Wed Mar 12 23:40:58 2014 +++ src/sys/rump/net/lib/libvirtif/Makefile.virtif Wed Mar 12 23:42:33 2014 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.virtif,v 1.1 2014/03/12 23:40:58 pooka Exp $ +# $NetBSD: Makefile.virtif,v 1.2 2014/03/12 23:42:33 pooka Exp $ # .if !defined(VIRTIF) .error Define VIRTIF when including ${.PARSEFILE} .endif -SRCS= if_virt.c component.c +SRCS= if_virt.c virtif_component.c VIRTIFDIR:= ${.PARSEDIR} .PATH: ${VIRTIFDIR} Added files: Index: src/sys/rump/net/lib/libvirtif/virtif_component.c diff -u /dev/null src/sys/rump/net/lib/libvirtif/virtif_component.c:1.1 --- /dev/null Wed Mar 12 23:42:33 2014 +++ src/sys/rump/net/lib/libvirtif/virtif_component.c Wed Mar 12 23:42:33 2014 @@ -0,0 +1,47 @@ +/* $NetBSD: virtif_component.c,v 1.1 2014/03/12 23:42:33 pooka Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Development of this software was supported by The Nokia Foundation + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: virtif_component.c,v 1.1 2014/03/12 23:42:33 pooka Exp $"); + +#include +#include +#include + +#include + +#include "rump_private.h" +#include "if_virt.h" + +RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) +{ + extern struct if_clone VIF_CLONER; /* XXX */ + + if_clone_attach(&VIF_CLONER); +}
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Wed Mar 12 23:40:58 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: Makefile Added Files: src/sys/rump/net/lib/libvirtif: Makefile.virtif Log Message: Separate common bits for all interfaces implementing virtif hypercalls from Makefile to Makefile.virtif. The latter is meant to be .included. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/net/lib/libvirtif/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libvirtif/Makefile.virtif Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/Makefile diff -u src/sys/rump/net/lib/libvirtif/Makefile:1.7 src/sys/rump/net/lib/libvirtif/Makefile:1.8 --- src/sys/rump/net/lib/libvirtif/Makefile:1.7 Thu Jul 4 11:46:51 2013 +++ src/sys/rump/net/lib/libvirtif/Makefile Wed Mar 12 23:40:58 2014 @@ -1,16 +1,12 @@ -# $NetBSD: Makefile,v 1.7 2013/07/04 11:46:51 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2014/03/12 23:40:58 pooka Exp $ # LIB= rumpnet_virtif +VIRTIF= virt -SRCS= if_virt.c -SRCS+= component.c - -CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpkern -I${.CURDIR} -CPPFLAGS+= -DVIRTIF_BASE=virt +.include "${.CURDIR}/Makefile.virtif" RUMPCOMP_USER= #defined -RUMPCOMP_USER_CPPFLAGS+= -DVIRTIF_BASE=virt .include .include Added files: Index: src/sys/rump/net/lib/libvirtif/Makefile.virtif diff -u /dev/null src/sys/rump/net/lib/libvirtif/Makefile.virtif:1.1 --- /dev/null Wed Mar 12 23:40:58 2014 +++ src/sys/rump/net/lib/libvirtif/Makefile.virtif Wed Mar 12 23:40:58 2014 @@ -0,0 +1,16 @@ +# $NetBSD: Makefile.virtif,v 1.1 2014/03/12 23:40:58 pooka Exp $ +# + +.if !defined(VIRTIF) +.error Define VIRTIF when including ${.PARSEFILE} +.endif + +SRCS= if_virt.c component.c + +VIRTIFDIR:= ${.PARSEDIR} +.PATH: ${VIRTIFDIR} + +CPPFLAGS+= -I${VIRTIFDIR}/../../../librump/rumpkern -I${VIRTIFDIR} +CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} + +RUMPCOMP_USER_CPPFLAGS+= -DVIRTIF_BASE=${VIRTIF} -I${VIRTIFDIR}
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Wed Mar 12 17:49:13 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c Log Message: When sending, only load mbufs which have a length. This is especially useful for fragmented datagrams where the tail of the first packet is full of nothing. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.39 src/sys/rump/net/lib/libvirtif/if_virt.c:1.40 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.39 Mon Mar 3 13:56:40 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Wed Mar 12 17:49:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.39 2014/03/03 13:56:40 pooka Exp $ */ +/* $NetBSD: if_virt.c,v 1.40 2014/03/12 17:49:13 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.39 2014/03/03 13:56:40 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.40 2014/03/12 17:49:13 pooka Exp $"); #include #include @@ -296,12 +296,15 @@ virtif_start(struct ifnet *ifp) } m = m0; - for (i = 0; i < LB_SH && m; i++) { - io[i].iov_base = mtod(m, void *); - io[i].iov_len = m->m_len; + for (i = 0; i < LB_SH && m; ) { + if (m->m_len) { +io[i].iov_base = mtod(m, void *); +io[i].iov_len = m->m_len; +i++; + } m = m->m_next; } - if (i == LB_SH) + if (i == LB_SH && m) panic("lazy bum"); bpf_mtap(ifp, m0);
CVS commit: src/sys/rump/include/machine
Module Name:src Committed By: pooka Date: Tue Mar 11 20:25:05 UTC 2014 Added Files: src/sys/rump/include/machine: cpu_counter.h Log Message: Reinstance cpu_counter.h so that we don't have to work around the MD implications everywhere else. To generate a diff of this commit: cvs rdiff -u -r0 -r1.3 src/sys/rump/include/machine/cpu_counter.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/include/machine/cpu_counter.h diff -u /dev/null src/sys/rump/include/machine/cpu_counter.h:1.3 --- /dev/null Tue Mar 11 20:25:05 2014 +++ src/sys/rump/include/machine/cpu_counter.h Tue Mar 11 20:25:05 2014 @@ -0,0 +1,43 @@ +/* $NetBSD: cpu_counter.h,v 1.3 2014/03/11 20:25:05 pooka Exp $ */ + +/*- + * Copyright (c) 2014 Antti Kantee. All Rights Reserved. + * + * 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. + */ + +#ifndef _SYS_RUMP_CPU_COUNTER_H_ +#define _SYS_RUMP_CPU_COUNTER_H_ + +#include + +#ifdef __HAVE_CPU_COUNTER +/* + * A very simple MI cpu "counter". Could start filling in MD ones ... + */ +#define cpu_hascounter() 0 +#define cpu_counter() 0 +#define cpu_counter32() 0 +#define cpu_frequency(a) 0 +#endif /* __HAVE_CPU_COUNTER */ + +#endif /* _SYS_RUMP_CPU_COUNTER_H_ */
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Tue Mar 11 00:59:38 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: emul.c locks.c Log Message: Put the syncobjs in emul.c instead of locks.c so that they are present for both locks.c and locks_up.c alike. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.67 -r1.68 src/sys/rump/librump/rumpkern/locks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.163 src/sys/rump/librump/rumpkern/emul.c:1.164 --- src/sys/rump/librump/rumpkern/emul.c:1.163 Thu Feb 20 01:01:10 2014 +++ src/sys/rump/librump/rumpkern/emul.c Tue Mar 11 00:59:38 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.163 2014/02/20 01:01:10 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.164 2014/03/11 00:59:38 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.163 2014/02/20 01:01:10 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.164 2014/03/11 00:59:38 pooka Exp $"); #include #include @@ -148,6 +148,9 @@ u_int nprocs = 1; cprng_strong_t *kern_cprng; +/* not used, but need the symbols for pointer comparisons */ +syncobj_t mutex_syncobj, rw_syncobj; + int kpause(const char *wmesg, bool intr, int timeo, kmutex_t *mtx) { Index: src/sys/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.67 src/sys/rump/librump/rumpkern/locks.c:1.68 --- src/sys/rump/librump/rumpkern/locks.c:1.67 Mon Dec 9 17:03:41 2013 +++ src/sys/rump/librump/rumpkern/locks.c Tue Mar 11 00:59:38 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.67 2013/12/09 17:03:41 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.68 2014/03/11 00:59:38 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.67 2013/12/09 17:03:41 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.68 2014/03/11 00:59:38 pooka Exp $"); #include #include @@ -73,9 +73,6 @@ static lockops_t rw_lockops = { #define UNLOCKED(a, b) #endif -/* not used, but need the symbols for pointer comparisons */ -syncobj_t mutex_syncobj, rw_syncobj; - /* * We map locks to pthread routines. The difference between kernel * and rumpuser routines is that while the kernel uses static
CVS commit: src/sys/rump/include/machine
Module Name:src Committed By: pooka Date: Mon Mar 10 23:02:07 UTC 2014 Modified Files: src/sys/rump/include/machine: cpu.h Log Message: update comments To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/rump/include/machine/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/machine/cpu.h diff -u src/sys/rump/include/machine/cpu.h:1.18 src/sys/rump/include/machine/cpu.h:1.19 --- src/sys/rump/include/machine/cpu.h:1.18 Wed Jan 22 23:38:21 2014 +++ src/sys/rump/include/machine/cpu.h Mon Mar 10 23:02:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.18 2014/01/22 23:38:21 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.19 2014/03/10 23:02:07 pooka Exp $ */ /* * Copyright (c) 2008-2011 Antti Kantee. All Rights Reserved. @@ -25,6 +25,11 @@ * SUCH DAMAGE. */ +/* + * CPU defitions for a generic arch. Unfortunately there are some + * MD #ifdefs here. They are required because of MD inlines and macros. + */ + #ifndef _SYS_RUMP_CPU_H_ #define _SYS_RUMP_CPU_H_ @@ -44,20 +49,12 @@ struct cpu_info { uint64_t ci_pcc_freq; #endif -/* - * XXX: horrible workaround for vax lock.h. - * I eventually want to nuke rump include/machine, so don't waste - * energy fighting with this. - */ #ifdef __vax__ int ci_ipimsgs; #define IPI_SEND_CNCHAR 0 #define IPI_DDB 0 #endif /* __vax__ */ -/* - * More stinky hacks, this time for powerpc. Will go away eventually. - */ #ifdef __powerpc__ struct cache_info { int dcache_size; @@ -68,14 +65,13 @@ struct cpu_info { #endif /* __powerpc */ }; -/* more dirty rotten vax kludges */ #ifdef __vax__ static __inline void cpu_handle_ipi(void) {} #endif /* __vax__ */ #ifdef __powerpc__ void __syncicache(void *, size_t); -#endif +#endif /* __powerpc__ */ struct lwp *rumpuser_curlwp(void); #define curlwp rumpuser_curlwp()
CVS commit: src/sys/rump/include/rump
Module Name:src Committed By: pooka Date: Mon Mar 10 22:48:29 UTC 2014 Modified Files: src/sys/rump/include/rump: rump.h Log Message: add a compat prototype for rump_getversion() To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/rump/include/rump/rump.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.60 src/sys/rump/include/rump/rump.h:1.61 --- src/sys/rump/include/rump/rump.h:1.60 Mon Mar 10 22:44:10 2014 +++ src/sys/rump/include/rump/rump.h Mon Mar 10 22:48:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.60 2014/03/10 22:44:10 pooka Exp $ */ +/* $NetBSD: rump.h,v 1.61 2014/03/10 22:48:29 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -101,6 +101,7 @@ _BEGIN_DECLS #endif int rump_getversion(void); +int rump_pub_getversion(void); /* compat */ int rump_nativeabi_p(void); int rump_boot_gethowto(void);
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Mon Mar 10 22:44:11 UTC 2014 Modified Files: src/sys/rump/include/rump: rump.h rumpkern_if_pub.h src/sys/rump/librump/rumpkern: rump.c rumpkern.ifspec rumpkern_if_priv.h rumpkern_if_wrappers.c Log Message: rump_getversion() does not require a thread context, so make it a straight call instead of being wrapped around rump_pub_getversion(). To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/rump/include/rump/rump.h cvs rdiff -u -r1.14 -r1.15 src/sys/rump/include/rump/rumpkern_if_pub.h cvs rdiff -u -r1.288 -r1.289 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.11 -r1.12 src/sys/rump/librump/rumpkern/rumpkern.ifspec cvs rdiff -u -r1.13 -r1.14 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.59 src/sys/rump/include/rump/rump.h:1.60 --- src/sys/rump/include/rump/rump.h:1.59 Mon Mar 10 22:38:53 2014 +++ src/sys/rump/include/rump/rump.h Mon Mar 10 22:44:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.59 2014/03/10 22:38:53 pooka Exp $ */ +/* $NetBSD: rump.h,v 1.60 2014/03/10 22:44:10 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -100,6 +100,7 @@ enum rump_etfs_type { _BEGIN_DECLS #endif +int rump_getversion(void); int rump_nativeabi_p(void); int rump_boot_gethowto(void); Index: src/sys/rump/include/rump/rumpkern_if_pub.h diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.14 src/sys/rump/include/rump/rumpkern_if_pub.h:1.15 --- src/sys/rump/include/rump/rumpkern_if_pub.h:1.14 Thu Mar 7 18:51:02 2013 +++ src/sys/rump/include/rump/rumpkern_if_pub.h Mon Mar 10 22:44:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpkern_if_pub.h,v 1.14 2013/03/07 18:51:02 pooka Exp $ */ +/* $NetBSD: rumpkern_if_pub.h,v 1.15 2014/03/10 22:44:10 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. @@ -6,7 +6,6 @@ * by: NetBSD: makerumpif.sh,v 1.6 2013/02/14 10:54:54 pooka Exp */ -int rump_pub_getversion(void); int rump_pub_module_init(const struct modinfo * const *, size_t); int rump_pub_module_fini(const struct modinfo *); int rump_pub_kernelfsym_load(void *, uint64_t, char *, uint64_t); Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.288 src/sys/rump/librump/rumpkern/rump.c:1.289 --- src/sys/rump/librump/rumpkern/rump.c:1.288 Mon Mar 10 22:38:53 2014 +++ src/sys/rump/librump/rumpkern/rump.c Mon Mar 10 22:44:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.288 2014/03/10 22:38:53 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.289 2014/03/10 22:44:11 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.288 2014/03/10 22:38:53 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.289 2014/03/10 22:44:11 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -942,6 +942,8 @@ rump_getversion(void) return __NetBSD_Version__; } +/* compat */ +__strong_alias(rump_pub_getversion,rump_getversion); int rump_nativeabi_p(void) Index: src/sys/rump/librump/rumpkern/rumpkern.ifspec diff -u src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.11 src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.12 --- src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.11 Thu Mar 7 18:49:13 2013 +++ src/sys/rump/librump/rumpkern/rumpkern.ifspec Mon Mar 10 22:44:11 2014 @@ -1,4 +1,4 @@ -; $NetBSD: rumpkern.ifspec,v 1.11 2013/03/07 18:49:13 pooka Exp $ +; $NetBSD: rumpkern.ifspec,v 1.12 2014/03/10 22:44:11 pooka Exp $ NAME|kern PUBHDR|include/rump/rumpkern_if_pub.h @@ -8,8 +8,6 @@ WRAPPERS|librump/rumpkern/rumpkern_if_wr ; type | name | args ; -int |getversion |void - int |module_init |const struct modinfo * const *, size_t int |module_fini |const struct modinfo * int |kernelfsym_load|void *, uint64_t, char *, uint64_t Index: src/sys/rump/librump/rumpkern/rumpkern_if_priv.h diff -u src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.13 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.14 --- src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.13 Thu Mar 7 18:50:17 2013 +++ src/sys/rump/librump/rumpkern/rumpkern_if_priv.h Mon Mar 10 22:44:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpkern_if_priv.h,v 1.13 2013/03/07 18:50:17 pooka Exp $ */ +/* $NetBSD: rumpkern_if_priv.h,v 1.14 2014/03/10 22:44:11 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. @@ -6,7 +6,6 @@ * by: NetBSD: makerumpif.sh,v 1.6 2013/02/14 10:54:54 pooka Exp */ -int rump_getversion(void); int rump_module_init(const struct modinfo * const *, size_t); int rump_module_fini(const struct modinfo *); int rump_kernelfsym_load(void *, uint64_t, char *, uint64_t); Index: src/sys/r
CVS commit: src/sys/rump/librump/rumpkern/arch/powerpc
Module Name:src Committed By: matt Date: Fri Mar 7 05:49:05 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern/arch/powerpc: Makefile.inc Log Message: Be a little more careful checking MLIBDIR To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc diff -u src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.4 src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.5 --- src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.4 Fri Mar 7 04:10:43 2014 +++ src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc Fri Mar 7 05:49:05 2014 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.4 2014/03/07 04:10:43 matt Exp $ +# $NetBSD: Makefile.inc,v 1.5 2014/03/07 05:49:05 matt Exp $ -.if ${MACHINE_ARCH} == "powerpc" || ${MLIBDIR} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" \ +|| (defined(MLIBDIR) && "${MLIBDIR}" == "powerpc") CPPFLAGS+= -DARCH_ELFSIZE=32 .else CPPFLAGS+= -DARCH_ELFSIZE=64
CVS commit: src/sys/rump/librump/rumpkern/arch/powerpc
Module Name:src Committed By: matt Date: Fri Mar 7 04:10:43 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern/arch/powerpc: Makefile.inc Log Message: Use ARCH_ELFSIZE=32 is MLIBDIR == "powerpc" To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc diff -u src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.3 src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.4 --- src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.3 Wed Feb 12 22:28:43 2014 +++ src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc Fri Mar 7 04:10:43 2014 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.3 2014/02/12 22:28:43 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.4 2014/03/07 04:10:43 matt Exp $ -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MLIBDIR} == "powerpc" CPPFLAGS+= -DARCH_ELFSIZE=32 .else CPPFLAGS+= -DARCH_ELFSIZE=64
CVS commit: src/sys/rump/net/lib/libnpf
Module Name:src Committed By: pooka Date: Mon Mar 3 19:09:52 UTC 2014 Modified Files: src/sys/rump/net/lib/libnpf: Makefile Log Message: also include bsd.own.mk, so value for RUMP_NPF_TESTING can come from mk.conf To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/rump/net/lib/libnpf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnpf/Makefile diff -u src/sys/rump/net/lib/libnpf/Makefile:1.10 src/sys/rump/net/lib/libnpf/Makefile:1.11 --- src/sys/rump/net/lib/libnpf/Makefile:1.10 Mon Mar 3 14:01:30 2014 +++ src/sys/rump/net/lib/libnpf/Makefile Mon Mar 3 19:09:52 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2014/03/03 14:01:30 pooka Exp $ +# $NetBSD: Makefile,v 1.11 2014/03/03 19:09:52 pooka Exp $ # # Public Domain. # @@ -19,6 +19,8 @@ SRCS+= npf_ext_log.c npf_ext_normalize.c SRCS+= component.c +.include + .if ${RUMP_NPF_TESTING:Uyes} == "yes" CPPFLAGS+= -D_NPF_TESTING .endif
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Mon Mar 3 16:50:28 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: Fix the memory limiter to work for non-pagedaemon threads again reported by njoly To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.149 src/sys/rump/librump/rumpkern/vm.c:1.150 --- src/sys/rump/librump/rumpkern/vm.c:1.149 Tue Feb 18 06:18:13 2014 +++ src/sys/rump/librump/rumpkern/vm.c Mon Mar 3 16:50:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.149 2014/02/18 06:18:13 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.150 2014/03/03 16:50:28 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.149 2014/02/18 06:18:13 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.150 2014/03/03 16:50:28 pooka Exp $"); #include #include @@ -1158,6 +1158,8 @@ uvm_kick_pdaemon() void * rump_hypermalloc(size_t howmuch, int alignment, bool waitok, const char *wmsg) { + const unsigned long thelimit = + curlwp == uvm.pagedaemon_lwp ? pdlimit : rump_physmemlimit; unsigned long newmem; void *rv; int error; @@ -1166,10 +1168,9 @@ rump_hypermalloc(size_t howmuch, int ali /* first we must be within the limit */ limitagain: - if (rump_physmemlimit != RUMPMEM_UNLIMITED) { + if (thelimit != RUMPMEM_UNLIMITED) { newmem = atomic_add_long_nv(&curphysmem, howmuch); - if ((newmem > rump_physmemlimit) && - !(curlwp == uvm.pagedaemon_lwp || newmem > pdlimit)) { + if (newmem > thelimit) { newmem = atomic_add_long_nv(&curphysmem, -howmuch); if (!waitok) { return NULL;
CVS commit: src/sys/rump/net/lib/libnpf
Module Name:src Committed By: pooka Date: Mon Mar 3 14:01:30 UTC 2014 Modified Files: src/sys/rump/net/lib/libnpf: Makefile Log Message: For now, make it possible to not specify -D_NPF_TESTING by compiling with RUMP_NPF_TESTING_=no. This in turn makes it possible to use npf in a rump kernel for real packet filtering instead of just testing. no change to default To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/rump/net/lib/libnpf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnpf/Makefile diff -u src/sys/rump/net/lib/libnpf/Makefile:1.9 src/sys/rump/net/lib/libnpf/Makefile:1.10 --- src/sys/rump/net/lib/libnpf/Makefile:1.9 Fri Nov 8 00:38:27 2013 +++ src/sys/rump/net/lib/libnpf/Makefile Mon Mar 3 14:01:30 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2013/11/08 00:38:27 rmind Exp $ +# $NetBSD: Makefile,v 1.10 2014/03/03 14:01:30 pooka Exp $ # # Public Domain. # @@ -19,7 +19,9 @@ SRCS+= npf_ext_log.c npf_ext_normalize.c SRCS+= component.c +.if ${RUMP_NPF_TESTING:Uyes} == "yes" CPPFLAGS+= -D_NPF_TESTING +.endif CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs .include
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Mon Mar 3 13:56:41 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c if_virt.h rumpcomp_user.c rumpcomp_user.h Log Message: Pull in the changes from the dpdk, netmap and snabb switch repos. There are two major changes: 1) All thread context policy is pushed down to the hypercalls. This is meant to help performance-mongering implementations be able to control packet scheduling better (e.g. pin down packet reception to certain physical cores). 2) Generalize linkstr, meaning that the interface can now take an arbitrary string which is passed to the create() hypercall. This can be used to map backend device characteristics to the rump kernel interface instance. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/rump/net/lib/libvirtif/if_virt.c cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libvirtif/if_virt.h cvs rdiff -u -r1.11 -r1.12 src/sys/rump/net/lib/libvirtif/rumpcomp_user.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/net/lib/libvirtif/rumpcomp_user.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.38 src/sys/rump/net/lib/libvirtif/if_virt.c:1.39 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.38 Fri Feb 21 08:33:51 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Mon Mar 3 13:56:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.38 2014/02/21 08:33:51 skrll Exp $ */ +/* $NetBSD: if_virt.c,v 1.39 2014/03/03 13:56:40 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,24 +26,17 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.38 2014/02/21 08:33:51 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.39 2014/03/03 13:56:40 pooka Exp $"); #include -#include -#include #include #include -#include -#include -#include -#include -#include #include #include #include +#include #include -#include #include #include @@ -70,14 +63,11 @@ static void virtif_stop(struct ifnet *, struct virtif_sc { struct ethercom sc_ec; struct virtif_user *sc_viu; - bool sc_dying; - struct lwp *sc_l_snd, *sc_l_rcv; - kmutex_t sc_mtx; - kcondvar_t sc_cv; + + int sc_num; + char *sc_linkstr; }; -static void virtif_receiver(void *); -static void virtif_sender(void *); static int virtif_clone(struct if_clone *, int); static int virtif_unclone(struct ifnet *); @@ -85,60 +75,74 @@ struct if_clone VIF_CLONER = IF_CLONE_INITIALIZER(VIF_NAME, virtif_clone, virtif_unclone); static int -virtif_clone(struct if_clone *ifc, int num) +virtif_create(struct ifnet *ifp) { - struct virtif_sc *sc; - struct virtif_user *viu; - struct ifnet *ifp; uint8_t enaddr[ETHER_ADDR_LEN] = { 0xb2, 0x0a, 0x00, 0x0b, 0x0e, 0x01 }; - int error = 0; + char enaddrstr[3*ETHER_ADDR_LEN]; + struct virtif_sc *sc = ifp->if_softc; + int error; - if (num >= 0x100) - return E2BIG; + if (sc->sc_viu) + panic("%s: already created", ifp->if_xname); - if ((error = VIFHYPER_CREATE(num, &viu)) != 0) + enaddr[2] = cprng_fast32() & 0xff; + enaddr[5] = sc->sc_num & 0xff; + + if ((error = VIFHYPER_CREATE(sc->sc_linkstr, + sc, enaddr, &sc->sc_viu)) != 0) { + printf("VIFHYPER_CREATE failed: %d\n", error); return error; + } - enaddr[2] = cprng_fast32() & 0xff; - enaddr[5] = num; + ether_ifattach(ifp, enaddr); + ether_snprintf(enaddrstr, sizeof(enaddrstr), enaddr); + aprint_normal_ifnet(ifp, "Ethernet address %s\n", enaddrstr); - sc = kmem_zalloc(sizeof(*sc), KM_SLEEP); - sc->sc_dying = false; - sc->sc_viu = viu; + IFQ_SET_READY(&ifp->if_snd); - mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_NONE); - cv_init(&sc->sc_cv, VIF_NAME "snd"); + return 0; +} + +static int +virtif_clone(struct if_clone *ifc, int num) +{ + struct virtif_sc *sc; + struct ifnet *ifp; + int error = 0; + + sc = kmem_zalloc(sizeof(*sc), KM_SLEEP); + sc->sc_num = num; ifp = &sc->sc_ec.ec_if; sprintf(ifp->if_xname, "%s%d", VIF_NAME, num); ifp->if_softc = sc; - if (rump_threads) { - if ((error = kthread_create(PRI_NONE, KTHREAD_MUSTJOIN, NULL, - virtif_receiver, ifp, &sc->sc_l_rcv, VIF_NAME "ifr")) != 0) - goto out; - - if ((error = kthread_create(PRI_NONE, - KTHREAD_MUSTJOIN | KTHREAD_MPSAFE, NULL, - virtif_sender, ifp, &sc->sc_l_snd, VIF_NAME "ifs")) != 0) - goto out; - } else { - printf("WARNING: threads not enabled, receive NOT working\n"); - } - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = virtif_init; ifp->if_ioctl = virtif_ioctl; ifp->if_start = virtif_start; ifp->if_stop = virtif_stop; - IFQ_SET_READY(&ifp->if_snd); + ifp->if_mtu = ETHERMTU; + ifp->if_dlt = DLT_EN10MB; if_attach(ifp); - ether_ifattach(ifp, enaddr); - out: +#ifndef RUMP_VIF_LINKSTR + /* + * if the underlying interface does not expect link
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: matt Date: Fri Feb 28 14:19:25 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern Log Message: Use the new FEAT_LDREX to replace ARMV6/ARMV7 To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/rump/librump/rumpkern/Makefile.rumpkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.137 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.138 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.137 Tue Feb 18 06:18:13 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Fri Feb 28 14:19:25 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.137 2014/02/18 06:18:13 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.138 2014/02/28 14:19:25 matt Exp $ # .include "${RUMPTOP}/Makefile.rump" @@ -220,7 +220,7 @@ KERNMISCCPPFLAGS+= -D_RUMPKERNEL # compare-and-swap. This is because the kernel version is using # instructions or routines unavailable to us in userspace. # -.if (${MACHINE_CPU} == "arm" && empty(ARMV6) && empty(ARMV7)) \ +.if (${MACHINE_CPU} == "arm" && "${FEAT_LDREX}" != "yes") \ || ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "hppa" \ || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \ || ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "m68000"
CVS commit: src/sys/rump/net/lib/libnpf
Module Name:src Committed By: pooka Date: Wed Feb 26 02:39:29 UTC 2014 Modified Files: src/sys/rump/net/lib/libnpf: component.c Log Message: Run constructor as part of network faction bootstrap, not device (rumpdev no longer necessary) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libnpf/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnpf/component.c diff -u src/sys/rump/net/lib/libnpf/component.c:1.2 src/sys/rump/net/lib/libnpf/component.c:1.3 --- src/sys/rump/net/lib/libnpf/component.c:1.2 Sun Mar 10 21:01:19 2013 +++ src/sys/rump/net/lib/libnpf/component.c Wed Feb 26 02:39:29 2014 @@ -1,11 +1,11 @@ -/* $NetBSD: component.c,v 1.2 2013/03/10 21:01:19 christos Exp $ */ +/* $NetBSD: component.c,v 1.3 2014/02/26 02:39:29 pooka Exp $ */ /* * Public Domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.2 2013/03/10 21:01:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.3 2014/02/26 02:39:29 pooka Exp $"); #include #include @@ -17,7 +17,7 @@ __KERNEL_RCSID(0, "$NetBSD: component.c, extern const struct cdevsw npf_cdevsw; -RUMP_COMPONENT(RUMP_COMPONENT_DEV) +RUMP_COMPONENT(RUMP_COMPONENT_NET) { devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR; int error;
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: pooka Date: Tue Feb 25 22:40:53 UTC 2014 Modified Files: src/sys/rump/librump/rumpnet: netisr.c Log Message: Schedule only those netisr's that have registered handlers. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpnet/netisr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpnet/netisr.c diff -u src/sys/rump/librump/rumpnet/netisr.c:1.7 src/sys/rump/librump/rumpnet/netisr.c:1.8 --- src/sys/rump/librump/rumpnet/netisr.c:1.7 Fri Feb 14 01:43:13 2014 +++ src/sys/rump/librump/rumpnet/netisr.c Tue Feb 25 22:40:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $ */ +/* $NetBSD: netisr.c,v 1.8 2014/02/25 22:40:53 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.8 2014/02/25 22:40:53 pooka Exp $"); #include #include @@ -42,7 +42,14 @@ void schednetisr(int isr) { - softint_schedule(netisrs[isr]); + /* + * Do not schedule a softint that is not registered. + * This might cause the inq to fill, but the one calling us + * should start dropping packets once the inq is full, + * so no big harm done. + */ + if (__predict_true(netisrs[isr])) + softint_schedule(netisrs[isr]); } void
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Mon Feb 24 19:22:14 UTC 2014 Modified Files: src/sys/rump: listsrcdirs Log Message: +rump_wmd To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/listsrcdirs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/listsrcdirs diff -u src/sys/rump/listsrcdirs:1.12 src/sys/rump/listsrcdirs:1.13 --- src/sys/rump/listsrcdirs:1.12 Fri Dec 20 10:13:24 2013 +++ src/sys/rump/listsrcdirs Mon Feb 24 19:22:14 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: listsrcdirs,v 1.12 2013/12/20 10:13:24 pooka Exp $ +# $NetBSD: listsrcdirs,v 1.13 2014/02/24 19:22:14 pooka Exp $ # # @@ -32,7 +32,8 @@ precho src/external/cddl/ osnet precho src/external/historical/ nawk precho src/usr.bin/ make xinstall config mktemp sed tsort precho src/usr.bin/ lorder join cksum m4 mkdep Makefile.inc -precho src/usr.bin/ rump_server rump_allserver shmif_dumpbus +precho src/usr.bin/ rump_server rump_allserver rump_wmd +precho src/usr.bin/ shmif_dumpbus precho src/usr.sbin/ mtree # If -c is given, use CVS syntax to exclude large subdirectories
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Mon Feb 24 11:43:33 UTC 2014 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: truncate is not a defined operation for host files To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.124 src/sys/rump/librump/rumpvfs/rumpfs.c:1.125 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.124 Fri Feb 7 15:29:23 2014 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Mon Feb 24 11:43:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.124 2014/02/07 15:29:23 hannken Exp $ */ +/* $NetBSD: rumpfs.c,v 1.125 2014/02/24 11:43:33 pooka Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.124 2014/02/07 15:29:23 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.125 2014/02/24 11:43:33 pooka Exp $"); #include #include @@ -965,7 +965,8 @@ rump_vop_setattr(void *v) if (vp->v_type == VREG && vap->va_size != VSIZENOTSET && - vap->va_size != rn->rn_dlen) { + vap->va_size != rn->rn_dlen && + (rn->rn_flags & RUMPNODE_ET_PHONE_HOST) == 0) { void *newdata; size_t copylen, newlen;
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: skrll Date: Fri Feb 21 08:33:51 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c Log Message: Fix typo in fix for PR/48606 To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.37 src/sys/rump/net/lib/libvirtif/if_virt.c:1.38 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.37 Fri Feb 21 02:10:40 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Fri Feb 21 08:33:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.37 2014/02/21 02:10:40 christos Exp $ */ +/* $NetBSD: if_virt.c,v 1.38 2014/02/21 08:33:51 skrll Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.37 2014/02/21 02:10:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.38 2014/02/21 08:33:51 skrll Exp $"); #include #include @@ -278,7 +278,7 @@ virtif_receiver(void *arg) m->m_len = m->m_pkthdr.len = n; m->m_pkthdr.rcvif = ifp; bpf_mtap(ifp, m); - (*ipf->if_input)(ifp, m); + (*ifp->if_input)(ifp, m); } kthread_exit(0);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Feb 20 01:01:10 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: emul.c Log Message: + resettodr To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/rump/librump/rumpkern/emul.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.162 src/sys/rump/librump/rumpkern/emul.c:1.163 --- src/sys/rump/librump/rumpkern/emul.c:1.162 Wed Jan 29 18:42:14 2014 +++ src/sys/rump/librump/rumpkern/emul.c Thu Feb 20 01:01:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.163 2014/02/20 01:01:10 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.163 2014/02/20 01:01:10 pooka Exp $"); #include #include @@ -280,6 +280,13 @@ cnflush(void) /* done */ } +void +resettodr(void) +{ + + /* setting clocks is not in the jurisdiction of rump kernels */ +} + #ifdef __HAVE_SYSCALL_INTERN void syscall_intern(struct proc *p)
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Thu Feb 20 00:41:05 UTC 2014 Modified Files: src/sys/rump/include/rump: rump.h src/sys/rump/librump/rumpkern: signals.c Log Message: Remove the "host" signal model. I'm not sure it ever made any sense. I'm also quite sure nobody ever really wanted to use it. Change the "raise" sigmodel to include the rump kernel PID in the call to rumpuser_kill(). The purpose is to provide some hint for non-POSIX platforms which don't sport signals and multiplex many clients in a single address space. While this is technically an ABI change, see above. Also, since rumpuser_kill() was not documented, I'll just claim I'm fixing a bug in the implementation (and will be sure to document the interface correctly very soon). To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/rump/include/rump/rump.h cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/signals.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.57 src/sys/rump/include/rump/rump.h:1.58 --- src/sys/rump/include/rump/rump.h:1.57 Tue Jul 16 20:17:06 2013 +++ src/sys/rump/include/rump/rump.h Thu Feb 20 00:41:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.57 2013/07/16 20:17:06 pooka Exp $ */ +/* $NetBSD: rump.h,v 1.58 2014/02/20 00:41:05 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -71,7 +71,7 @@ enum rump_uiorw { RUMPUIO_READ, RUMPUIO_ enum rump_sigmodel { RUMP_SIGMODEL_PANIC, RUMP_SIGMODEL_IGNORE, - RUMP_SIGMODEL_HOST, + RUMP_SIGMODEL__HOST_NOTANYMORE, RUMP_SIGMODEL_RAISE, RUMP_SIGMODEL_RECORD }; Index: src/sys/rump/librump/rumpkern/signals.c diff -u src/sys/rump/librump/rumpkern/signals.c:1.12 src/sys/rump/librump/rumpkern/signals.c:1.13 --- src/sys/rump/librump/rumpkern/signals.c:1.12 Fri Nov 22 21:56:24 2013 +++ src/sys/rump/librump/rumpkern/signals.c Thu Feb 20 00:41:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: signals.c,v 1.12 2013/11/22 21:56:24 christos Exp $ */ +/* $NetBSD: signals.c,v 1.13 2014/02/20 00:41:05 pooka Exp $ */ /*- * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.12 2013/11/22 21:56:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.13 2014/02/20 00:41:05 pooka Exp $"); #include #include @@ -84,15 +84,6 @@ rumpsig_ignore(struct proc *p, int signo return; } -/* RUMP_SIGMODEL_HOST */ - -static void -rumpsig_host(struct proc *p, int signo) -{ - - rumpuser_kill(p->p_pid, signo); -} - /* RUMP_SIGMODEL_RAISE */ static void @@ -100,7 +91,7 @@ rumpsig_raise(struct proc *p, int signo) { if (RUMP_LOCALPROC_P(p)) { - rumpuser_kill(RUMPUSER_PID_SELF, signo); + rumpuser_kill(p->p_pid, signo); } else { rumpuser_sp_raise(p->p_vmspace->vm_map.pmap, signo); } @@ -139,15 +130,17 @@ rump_boot_setsigmodel(enum rump_sigmodel case RUMP_SIGMODEL_IGNORE: rumpsig = rumpsig_ignore; break; - case RUMP_SIGMODEL_HOST: - rumpsig = rumpsig_host; - break; case RUMP_SIGMODEL_RAISE: rumpsig = rumpsig_raise; break; case RUMP_SIGMODEL_RECORD: rumpsig = rumpsig_record; break; + + /* for compat, though I doubt anyone is using it */ + case RUMP_SIGMODEL__HOST_NOTANYMORE: + rumpsig = rumpsig_raise; + break; } }
CVS commit: src/sys/rump/kern/lib/libsys_linux
Module Name:src Committed By: pooka Date: Tue Feb 18 06:20:46 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_linux: component.c Log Message: remove stub now provided by rump kernel base To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/rump/kern/lib/libsys_linux/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_linux/component.c diff -u src/sys/rump/kern/lib/libsys_linux/component.c:1.10 src/sys/rump/kern/lib/libsys_linux/component.c:1.11 --- src/sys/rump/kern/lib/libsys_linux/component.c:1.10 Tue Dec 17 14:30:18 2013 +++ src/sys/rump/kern/lib/libsys_linux/component.c Tue Feb 18 06:20:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: component.c,v 1.10 2013/12/17 14:30:18 pooka Exp $ */ +/* $NetBSD: component.c,v 1.11 2014/02/18 06:20:46 pooka Exp $ */ #include #include @@ -71,7 +71,6 @@ __weak_alias(sys_mmap,rumplinux__stub); __weak_alias(vm_map_unlock,rumplinux__stub); __weak_alias(uvm_map_lookup_entry,rumplinux__stub); __weak_alias(sys_obreak,rumplinux__stub); -__weak_alias(sys_swapctl,rumplinux__stub); __weak_alias(vm_map_lock,rumplinux__stub); __weak_alias(uvm_mremap,rumplinux__stub);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Mon Feb 17 19:43:52 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: simply issue a warning if <1MB RAM configured. it might work, but not going to start enumerating when and where it might. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.147 src/sys/rump/librump/rumpkern/vm.c:1.148 --- src/sys/rump/librump/rumpkern/vm.c:1.147 Mon Feb 17 19:33:05 2014 +++ src/sys/rump/librump/rumpkern/vm.c Mon Feb 17 19:43:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.147 2014/02/17 19:33:05 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.148 2014/02/17 19:43:52 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.147 2014/02/17 19:33:05 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.148 2014/02/17 19:43:52 pooka Exp $"); #include #include @@ -306,9 +306,9 @@ uvm_init(void) if (rump_physmemlimit / mult != tmp) panic("uvm_init: RUMP_MEMLIMIT overflow: %s", buf); /* it's not like we'd get far with, say, 1 byte, but ... */ - if (rump_physmemlimit < 2*MAXPHYS) - panic("uvm_init: no memory, need at least %d bytes", - 2*MAXPHYS); + if (rump_physmemlimit < 1024*1024) + printf("uvm_init: WARNING: <1MB RAM limit, " + "hope you know what you're doing\n"); /* reserve some memory for the pager */ pdlimit = rump_physmemlimit;
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Mon Feb 17 19:33:05 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: reserve a small amount of memory for the pagedaemon To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.146 src/sys/rump/librump/rumpkern/vm.c:1.147 --- src/sys/rump/librump/rumpkern/vm.c:1.146 Sat Nov 23 22:24:31 2013 +++ src/sys/rump/librump/rumpkern/vm.c Mon Feb 17 19:33:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.146 2013/11/23 22:24:31 christos Exp $ */ +/* $NetBSD: vm.c,v 1.147 2014/02/17 19:33:05 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.146 2013/11/23 22:24:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.147 2014/02/17 19:33:05 pooka Exp $"); #include #include @@ -94,6 +94,7 @@ static kmutex_t pdaemonmtx; static kcondvar_t pdaemoncv, oomwait; unsigned long rump_physmemlimit = RUMPMEM_UNLIMITED; +static unsigned long pdlimit = RUMPMEM_UNLIMITED; /* page daemon memlimit */ static unsigned long curphysmem; static unsigned long dddlim; /* 90% of memory limit used */ #define NEED_PAGEDAEMON() \ @@ -305,8 +306,13 @@ uvm_init(void) if (rump_physmemlimit / mult != tmp) panic("uvm_init: RUMP_MEMLIMIT overflow: %s", buf); /* it's not like we'd get far with, say, 1 byte, but ... */ - if (rump_physmemlimit == 0) - panic("uvm_init: no memory"); + if (rump_physmemlimit < 2*MAXPHYS) + panic("uvm_init: no memory, need at least %d bytes", + 2*MAXPHYS); + + /* reserve some memory for the pager */ + pdlimit = rump_physmemlimit; + rump_physmemlimit -= 2*MAXPHYS; #define HUMANIZE_BYTES 9 CTASSERT(sizeof(buf) >= HUMANIZE_BYTES); @@ -919,11 +925,15 @@ void uvm_wait(const char *msg) { - if (__predict_false(curlwp == uvm.pagedaemon_lwp)) - panic("pagedaemon out of memory"); if (__predict_false(rump_threads == 0)) panic("pagedaemon missing (RUMP_THREADS = 0)"); + if (curlwp == uvm.pagedaemon_lwp) { + /* is it possible for us to later get memory? */ + if (!uvmexp.paging) + panic("pagedaemon out of memory"); + } + mutex_enter(&pdaemonmtx); pdaemon_waiters++; cv_signal(&pdaemoncv); @@ -1158,7 +1168,8 @@ rump_hypermalloc(size_t howmuch, int ali limitagain: if (rump_physmemlimit != RUMPMEM_UNLIMITED) { newmem = atomic_add_long_nv(&curphysmem, howmuch); - if (newmem > rump_physmemlimit) { + if ((newmem > rump_physmemlimit) && + !(curlwp == uvm.pagedaemon_lwp || newmem > pdlimit)) { newmem = atomic_add_long_nv(&curphysmem, -howmuch); if (!waitok) { return NULL;
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Fri Feb 14 01:43:13 UTC 2014 Modified Files: src/sys/rump/librump/rumpnet: netisr.c rump_net.c rump_net_private.h src/sys/rump/net/lib/libnetinet: component.c src/sys/rump/net/lib/libnetinet6: component.c src/sys/rump/net/lib/libnetmpls: component.c Log Message: Register netisr's from component constructors instead of via a hardcoded global list. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpnet/netisr.c cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpnet/rump_net.c cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpnet/rump_net_private.h cvs rdiff -u -r1.9 -r1.10 src/sys/rump/net/lib/libnetinet/component.c cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libnetinet6/component.c cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnetmpls/component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpnet/netisr.c diff -u src/sys/rump/librump/rumpnet/netisr.c:1.6 src/sys/rump/librump/rumpnet/netisr.c:1.7 --- src/sys/rump/librump/rumpnet/netisr.c:1.6 Thu Jul 18 15:59:27 2013 +++ src/sys/rump/librump/rumpnet/netisr.c Fri Feb 14 01:43:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netisr.c,v 1.6 2013/07/18 15:59:27 kefren Exp $ */ +/* $NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,17 +26,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.6 2013/07/18 15:59:27 kefren Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $"); #include #include -#include -#include -#include -#include -#include -#include #include #include @@ -51,48 +45,10 @@ schednetisr(int isr) softint_schedule(netisrs[isr]); } -/* - * Aliases are needed only for static linking (dlsym() is not supported). - */ -void __netisr_stub(void); -void -__netisr_stub(void) -{ - - panic("netisr called but networking stack missing"); -} -__weak_alias(ipintr,__netisr_stub); -__weak_alias(arpintr,__netisr_stub); -__weak_alias(ip6intr,__netisr_stub); -__weak_alias(mplsintr,__netisr_stub); - void -rump_netisr_init(void) +rump_netisr_register(int level, void (*handler)(void)) { - void *iphand, *arphand, *ip6hand, *mplshand, *sym; - iphand = ipintr; - if ((sym = rumpuser_dl_globalsym("rumpns_ipintr")) != NULL) - iphand = sym; - - arphand = arpintr; - if ((sym = rumpuser_dl_globalsym("rumpns_arpintr")) != NULL) - arphand = sym; - - ip6hand = ip6intr; - if ((sym = rumpuser_dl_globalsym("rumpns_ip6intr")) != NULL) - ip6hand = sym; - - mplshand = mplsintr; - if ((sym = rumpuser_dl_globalsym("rumpns_mplsintr")) != NULL) - mplshand = sym; - - netisrs[NETISR_IP] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, - (void (*)(void *))iphand, NULL); - netisrs[NETISR_ARP] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, - (void (*)(void *))arphand, NULL); - netisrs[NETISR_IPV6] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, - (void (*)(void *))ip6hand, NULL); - netisrs[NETISR_MPLS] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, - (void (*)(void *))mplshand, NULL); + netisrs[level] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, + (void (*)(void *))handler, NULL); } Index: src/sys/rump/librump/rumpnet/rump_net.c diff -u src/sys/rump/librump/rumpnet/rump_net.c:1.16 src/sys/rump/librump/rumpnet/rump_net.c:1.17 --- src/sys/rump/librump/rumpnet/rump_net.c:1.16 Mon Jan 14 16:50:54 2013 +++ src/sys/rump/librump/rumpnet/rump_net.c Fri Feb 14 01:43:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_net.c,v 1.16 2013/01/14 16:50:54 pooka Exp $ */ +/* $NetBSD: rump_net.c,v 1.17 2014/02/14 01:43:13 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_net.c,v 1.16 2013/01/14 16:50:54 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_net.c,v 1.17 2014/02/14 01:43:13 pooka Exp $"); #include @@ -50,7 +50,6 @@ RUMP_COMPONENT(RUMP__FACTION_NET) soinit(); domaininit(false); - rump_netisr_init(); rump_component_init(RUMP_COMPONENT_NET); rump_component_init(RUMP_COMPONENT_NET_ROUTE); Index: src/sys/rump/librump/rumpnet/rump_net_private.h diff -u src/sys/rump/librump/rumpnet/rump_net_private.h:1.8 src/sys/rump/librump/rumpnet/rump_net_private.h:1.9 --- src/sys/rump/librump/rumpnet/rump_net_private.h:1.8 Fri Feb 14 01:27:48 2014 +++ src/sys/rump/librump/rumpnet/rump_net_private.h Fri Feb 14 01:43:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_net_private.h,v 1.8 2014/02/14 01:27:48 pooka Exp $ */ +/* $NetBSD: rump_net_private.h,v 1.9 2014/02/14 01:43:13 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #ifndef _SYS_RUMP_NET_PRIVATE_H_ #define _SYS_RUMP_NET_PRIVATE_H_ -void rump_netisr_init(void); +void rump_netisr_register(int, vo
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: pooka Date: Fri Feb 14 01:27:48 UTC 2014 Modified Files: src/sys/rump/librump/rumpnet: rump_net_private.h Log Message: g/c prototype of imaginary routine To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpnet/rump_net_private.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpnet/rump_net_private.h diff -u src/sys/rump/librump/rumpnet/rump_net_private.h:1.7 src/sys/rump/librump/rumpnet/rump_net_private.h:1.8 --- src/sys/rump/librump/rumpnet/rump_net_private.h:1.7 Wed Jul 3 15:08:01 2013 +++ src/sys/rump/librump/rumpnet/rump_net_private.h Fri Feb 14 01:27:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_net_private.h,v 1.7 2013/07/03 15:08:01 pooka Exp $ */ +/* $NetBSD: rump_net_private.h,v 1.8 2014/02/14 01:27:48 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -37,8 +37,6 @@ do { \ }\ } while (/*CONSTCOND*/0) -void rump_net_components(void); - #include "rumpnet_if_priv.h" #endif /* _SYS_RUMP_NET_PRIVATE_H_ */
CVS commit: src/sys/rump/librump/rumpkern/arch/generic
Module Name:src Committed By: pooka Date: Wed Feb 12 22:30:45 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern/arch/generic: rump_generic_pmap.c Log Message: Minor comment massage, zero functionality massage. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c diff -u src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.1 src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.2 --- src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.1 Wed Feb 12 22:28:43 2014 +++ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c Wed Feb 12 22:30:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_generic_pmap.c,v 1.1 2014/02/12 22:28:43 pooka Exp $ */ +/* $NetBSD: rump_generic_pmap.c,v 1.2 2014/02/12 22:30:45 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -26,17 +26,15 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.1 2014/02/12 22:28:43 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.2 2014/02/12 22:30:45 pooka Exp $"); #include #include /* - * This is the MI pmap implementation for rump. It's used only by - * architectures which do not conform to the kernel ABI. The kernel - * ABI conformant architectures provide their own pmap under librump/arch - * (due to various messiness with macros in the pmap "interface"). + * This is the MI pmap implementation for rump kernels. It's used only by + * architectures which do not conform to the kernel ABI. */ struct pmap *const kernel_pmap_ptr = (struct pmap *const)-1;
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Feb 12 22:28:44 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern src/sys/rump/librump/rumpkern/arch/alpha: Makefile.inc src/sys/rump/librump/rumpkern/arch/arm: Makefile.inc src/sys/rump/librump/rumpkern/arch/i386: Makefile.inc src/sys/rump/librump/rumpkern/arch/mips: Makefile.inc src/sys/rump/librump/rumpkern/arch/powerpc: Makefile.inc src/sys/rump/librump/rumpkern/arch/x86_64: Makefile.inc Added Files: src/sys/rump/librump/rumpkern/arch/generic: Makefile.inc rump_generic_cpu.c rump_generic_kobj.c rump_generic_pmap.c src/sys/rump/librump/rumpkern/arch/x86: Makefile.inc rump_x86_cpu.c rump_x86_cpu_counter.c rump_x86_pmap.c rump_x86_spinlock.c rump_x86_spl.c Removed Files: src/sys/rump/librump/rumpkern: kobj_stubs.c pmap_stub.c rumpcpu_generic.c src/sys/rump/librump/rumpkern/arch/i386: cpu_counter.c pmap_x86.c rumpcpu.c rumpspl.c spinlock.c Log Message: Rototill a bit, and attempt to disguise it as non-gratuitous. Add arch/generic and move non-x86 files from rumpkern/ there. Also, move files from arch/i386 to arch/x86, and make both i386 and x86_64 use those. This clarifies the situation with what is MD vs. MI code. renames: rumpcpu_generic,kobj_stubs,pmap_stubs => arch/generic/rump_generic_$x arch/i386/* => arch/x86/rump_x86_$x (for those who forget, x86 requires MD code because rump kernels use the same ABI as kernel modules) To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.2 -r0 src/sys/rump/librump/rumpkern/kobj_stubs.c cvs rdiff -u -r1.25 -r0 src/sys/rump/librump/rumpkern/pmap_stub.c cvs rdiff -u -r1.4 -r0 src/sys/rump/librump/rumpkern/rumpcpu_generic.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc cvs rdiff -u -r0 -r1.1 \ src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc \ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c \ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_kobj.c \ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/arch/i386/Makefile.inc cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rumpkern/arch/i386/cpu_counter.c cvs rdiff -u -r1.3 -r0 src/sys/rump/librump/rumpkern/arch/i386/pmap_x86.c cvs rdiff -u -r1.11 -r0 src/sys/rump/librump/rumpkern/arch/i386/rumpcpu.c cvs rdiff -u -r1.2 -r0 src/sys/rump/librump/rumpkern/arch/i386/rumpspl.c \ src/sys/rump/librump/rumpkern/arch/i386/spinlock.c cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc \ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c \ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu_counter.c \ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c \ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_spinlock.c \ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_spl.c cvs rdiff -u -r1.7 -r1.8 \ src/sys/rump/librump/rumpkern/arch/x86_64/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.135 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.136 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.135 Fri Jan 17 01:32:53 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Feb 12 22:28:43 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.135 2014/01/17 01:32:53 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.136 2014/02/12 22:28:43 pooka Exp $ # .include "${RUMPTOP}/Makefile.rump" @@ -8,6 +8,7 @@ LIB= rump .PATH: ${RUMPTOP}/librump/rumpkern\ + ${RUMPTOP}/librump/rumpkern/arch/generic \ ${RUMPTOP}/../kern \ ${RUMPTOP}/../uvm \ ${RUMPTOP}/../conf \ @@ -55,11 +56,6 @@ vers.c: ${RUMPTOP}/../conf/newvers.sh ${ SRCS+= vers.c CLEANFILES+= vers.c version -# use MI pmap for archs not conforming to kernel ABI -.ifndef RUMPKMOD -SRCS+= pmap_stub.c -.endif - # autogenerated # SRCS+= rump_syscalls.c rumpkern_if_wrappers.c @@ -202,12 +198,12 @@ ARCHDIR= ${RUMPTOP}/librump/rumpkern/arc .else ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} .endif -.if exists(${ARCHDIR}) +.if !exists(${ARCHDIR}) +ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/generic +.endif + .include "${ARCHDIR}/Makefile.inc" .PATH: ${ARCHDIR} -.else -SRCS+= kobj_stubs.c rumpcpu_generic.c -.endif .if ${MACHINE} == "sun3" CPPFLAGS+= -Dsun3 Index: src/sys/rump/librum
CVS commit: src/sys/rump/dev/lib/libopencrypto
Module Name:src Committed By: pgoyette Date: Fri Jan 31 18:13:01 UTC 2014 Modified Files: src/sys/rump/dev/lib/libopencrypto: Makefile Added Files: src/sys/rump/dev/lib/libopencrypto: CRYPTO.ioconf Log Message: Use ioconf file to generate config data structures To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libopencrypto/CRYPTO.ioconf cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libopencrypto/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/lib/libopencrypto/Makefile diff -u src/sys/rump/dev/lib/libopencrypto/Makefile:1.4 src/sys/rump/dev/lib/libopencrypto/Makefile:1.5 --- src/sys/rump/dev/lib/libopencrypto/Makefile:1.4 Thu Jan 16 14:12:09 2014 +++ src/sys/rump/dev/lib/libopencrypto/Makefile Fri Jan 31 18:13:01 2014 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.4 2014/01/16 14:12:09 pgoyette Exp $ +# $NetBSD: Makefile,v 1.5 2014/01/31 18:13:01 pgoyette Exp $ # .PATH: ${.CURDIR}/../../../../opencrypto LIB= rumpdev_opencrypto +IOCONF= CRYPTO.ioconf SRCS= component.c Added files: Index: src/sys/rump/dev/lib/libopencrypto/CRYPTO.ioconf diff -u /dev/null src/sys/rump/dev/lib/libopencrypto/CRYPTO.ioconf:1.1 --- /dev/null Fri Jan 31 18:13:01 2014 +++ src/sys/rump/dev/lib/libopencrypto/CRYPTO.ioconf Fri Jan 31 18:13:01 2014 @@ -0,0 +1,8 @@ +# $NetBSD: CRYPTO.ioconf,v 1.1 2014/01/31 18:13:01 pgoyette Exp $ +# + +ioconf crypto + +include "conf/files" + +pseudo-device crypto
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Jan 29 18:42:14 UTC 2014 Modified Files: src/sys/rump/librump/rumpkern: emul.c rump.c Log Message: lwp0 needs l_proc set for panic->cpu_reboot to dump core the right way To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.283 -r1.284 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.161 src/sys/rump/librump/rumpkern/emul.c:1.162 --- src/sys/rump/librump/rumpkern/emul.c:1.161 Fri Jan 17 01:32:53 2014 +++ src/sys/rump/librump/rumpkern/emul.c Wed Jan 29 18:42:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.161 2014/01/17 01:32:53 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.161 2014/01/17 01:32:53 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $"); #include #include @@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.1 #include #include #include +#include #include #include #include @@ -73,7 +74,11 @@ int physmem = PHYSMEM; int nkmempages = PHYSMEM/2; /* from le chapeau */ #undef PHYSMEM -struct lwp lwp0; +struct lwp lwp0 = { + .l_lid = 1, + .l_proc = &proc0, + .l_fd = &filedesc0, +}; struct vnode *rootvp; dev_t rootdev = NODEV; Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.283 src/sys/rump/librump/rumpkern/rump.c:1.284 --- src/sys/rump/librump/rumpkern/rump.c:1.283 Fri Jan 17 02:05:54 2014 +++ src/sys/rump/librump/rumpkern/rump.c Wed Jan 29 18:42:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.283 2014/01/17 02:05:54 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.284 2014/01/29 18:42:14 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.283 2014/01/17 02:05:54 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.284 2014/01/29 18:42:14 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -271,9 +271,7 @@ rump_init(void) /* init minimal lwp/cpu context */ l = &lwp0; - l->l_lid = 1; l->l_cpu = l->l_target_cpu = rump_cpu; - l->l_fd = &filedesc0; /* lwp0 isn't created like other threads, so notify hypervisor here */ rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);
CVS commit: src/sys/rump/kern/lib/libsys_linux
Module Name:src Committed By: njoly Date: Tue Jan 28 10:54:45 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_linux: Makefile Log Message: Build with IPv6 support. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/rump/kern/lib/libsys_linux/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_linux/Makefile diff -u src/sys/rump/kern/lib/libsys_linux/Makefile:1.4 src/sys/rump/kern/lib/libsys_linux/Makefile:1.5 --- src/sys/rump/kern/lib/libsys_linux/Makefile:1.4 Sat Jan 25 10:40:40 2014 +++ src/sys/rump/kern/lib/libsys_linux/Makefile Tue Jan 28 10:54:45 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2014/01/25 10:40:40 njoly Exp $ +# $NetBSD: Makefile,v 1.5 2014/01/28 10:54:45 njoly Exp $ # .PATH: ${.CURDIR}/../../../../compat/linux/common @@ -15,6 +15,7 @@ SRCS+= rump_linux_sysent.c component.c l # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern +CPPFLAGS+= -DINET6 .include .include