CVS commit: src/lib/csu/arch/arm
Module Name:src Committed By: skrll Date: Mon Apr 29 07:22:00 UTC 2013 Modified Files: src/lib/csu/arch/arm: Makefile.inc Log Message: Simplify. earm is dealt with elsewhere. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/csu/arch/arm/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/lib/csu/arch/arm/Makefile.inc diff -u src/lib/csu/arch/arm/Makefile.inc:1.4 src/lib/csu/arch/arm/Makefile.inc:1.5 --- src/lib/csu/arch/arm/Makefile.inc:1.4 Wed Jan 23 02:14:14 2013 +++ src/lib/csu/arch/arm/Makefile.inc Mon Apr 29 07:21:59 2013 @@ -1,7 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/01/23 02:14:14 matt Exp $ +# $NetBSD: Makefile.inc,v 1.5 2013/04/29 07:21:59 skrll Exp $ CPPFLAGS+= -DELFSIZE=32 -.if ${MACHINE_ARCH} == earm || ${MACHINE_ARCH} == earmeb \ -|| (!empty(CPUFLAGS) ${CPUFLAGS:M-mabi=aapcs*} != ) +.if (!empty(CPUFLAGS) ${CPUFLAGS:M-mabi=aapcs*} != ) CPPFLAGS+= -DHAVE_INITFINI_ARRAY .endif
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: skrll Date: Mon Apr 29 09:32:39 UTC 2013 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/earmeb: config.h src/external/gpl3/binutils/lib/libiberty/arch/earmeb: config.h defs.mk src/external/gpl3/binutils/usr.bin/common/arch/earmeb: config.h src/external/gpl3/binutils/usr.bin/ld/arch/earmeb: config.h Log Message: libc was missing symbols for a while there. Re-run bintuils mknative against a good libc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h \ src/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/binutils/usr.bin/common/arch/earmeb/config.h cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/binutils/usr.bin/ld/arch/earmeb/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h:1.1 src/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h:1.2 --- src/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h:1.1 Fri Apr 26 11:01:28 2013 +++ src/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h Mon Apr 29 09:32:38 2013 @@ -192,7 +192,7 @@ /* #undef HAVE_PXSTATUS_T */ /* Define to 1 if you have the `setitimer' function. */ -/* #undef HAVE_SETITIMER */ +#define HAVE_SETITIMER 1 /* Define to 1 if you have the stddef.h header file. */ #define HAVE_STDDEF_H 1 Index: src/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h diff -u src/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h:1.1 src/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h:1.2 --- src/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h:1.1 Fri Apr 26 11:01:29 2013 +++ src/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h Mon Apr 29 09:32:39 2013 @@ -115,13 +115,13 @@ #define HAVE_GETPAGESIZE 1 /* Define to 1 if you have the `getrusage' function. */ -/* #undef HAVE_GETRUSAGE */ +#define HAVE_GETRUSAGE 1 /* Define to 1 if you have the `getsysinfo' function. */ /* #undef HAVE_GETSYSINFO */ /* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ +#define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the `index' function. */ #define HAVE_INDEX 1 @@ -190,7 +190,7 @@ /* #undef HAVE_PSTAT_GETSTATIC */ /* Define to 1 if you have the `putenv' function. */ -/* #undef HAVE_PUTENV */ +#define HAVE_PUTENV 1 /* Define to 1 if you have the `random' function. */ #define HAVE_RANDOM 1 @@ -295,7 +295,7 @@ /* #undef HAVE_SYSMP */ /* Define if you have the sys_errlist variable. */ -/* #undef HAVE_SYS_ERRLIST */ +#define HAVE_SYS_ERRLIST 1 /* Define to 1 if you have the sys/file.h header file. */ #define HAVE_SYS_FILE_H 1 @@ -304,7 +304,7 @@ #define HAVE_SYS_MMAN_H 1 /* Define if you have the sys_nerr variable. */ -/* #undef HAVE_SYS_NERR */ +#define HAVE_SYS_NERR 1 /* Define to 1 if you have the sys/param.h header file. */ #define HAVE_SYS_PARAM_H 1 @@ -316,7 +316,7 @@ #define HAVE_SYS_RESOURCE_H 1 /* Define if you have the sys_siglist variable. */ -/* #undef HAVE_SYS_SIGLIST */ +#define HAVE_SYS_SIGLIST 1 /* Define to 1 if you have the sys/stat.h header file. */ #define HAVE_SYS_STAT_H 1 @@ -349,7 +349,7 @@ /* #undef HAVE_TABLE */ /* Define to 1 if you have the `times' function. */ -/* #undef HAVE_TIMES */ +#define HAVE_TIMES 1 /* Define to 1 if you have the time.h header file. */ #define HAVE_TIME_H 1 @@ -367,7 +367,7 @@ #define HAVE_VASPRINTF 1 /* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ +#define HAVE_VFORK 1 /* Define to 1 if you have the vfork.h header file. */ /* #undef HAVE_VFORK_H */ @@ -382,10 +382,10 @@ #define HAVE_VSPRINTF 1 /* Define to 1 if you have the `wait3' function. */ -/* #undef HAVE_WAIT3 */ +#define HAVE_WAIT3 1 /* Define to 1 if you have the `wait4' function. */ -/* #undef HAVE_WAIT4 */ +#define HAVE_WAIT4 1 /* Define to 1 if you have the `waitpid' function. */ #define HAVE_WAITPID 1 @@ -394,7 +394,7 @@ #define HAVE_WORKING_FORK 1 /* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ +#define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the `_doprnt' function. */ /* #undef HAVE__DOPRNT */ @@ -492,4 +492,4 @@ /* #undef uintptr_t */ /* Define as `fork' if `vfork' does not work. */ -#define vfork fork +/* #undef vfork */ Index: src/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk diff -u src/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk:1.1 src/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk:1.2 --- src/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk:1.1 Fri Apr
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: kiyohara Date: Mon Apr 29 12:47:14 UTC 2013 Modified Files: src/sys/arch/arm/arm32: genassym.cf Log Message: Add some defines for epoc32. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/arm/arm32/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/genassym.cf diff -u src/sys/arch/arm/arm32/genassym.cf:1.60 src/sys/arch/arm/arm32/genassym.cf:1.61 --- src/sys/arch/arm/arm32/genassym.cf:1.60 Mon Dec 17 17:10:48 2012 +++ src/sys/arch/arm/arm32/genassym.cf Mon Apr 29 12:47:14 2013 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.60 2012/12/17 17:10:48 matt Exp $ +# $NetBSD: genassym.cf,v 1.61 2013/04/29 12:47:14 kiyohara Exp $ # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -106,6 +106,14 @@ define L1_TABLE_SIZE L1_TABLE_SIZE define L1_TYPE_S L1_TYPE_S define L1_S_DOM_KERNEL L1_S_DOM(PMAP_DOMAIN_KERNEL) +define L1_C_PROTO_generic L1_C_PROTO_generic + +define L2_S_PROTO_generic L2_S_PROTO_generic +define L2_S_SHIFT L2_S_SHIFT +define L2_S_SIZE L2_S_SIZE +define L2_C L2_C +define L2_AP_KRW L2_AP(AP_KRW) + ifdef PMAP_INCLUDE_PTE_SYNC define PMAP_INCLUDE_PTE_SYNC 1 endif
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 12:56:04 UTC 2013 Modified Files: src/lib/librumpuser: Makefile rumpuser.c rumpuser_int.h rumpuser_pth.c src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpvfs: rump_vfs.c rumpblk.c Added Files: src/lib/librumpuser: rumpuser_bio.c Log Message: Rework how the bio hypercalls work, part 1/n: Reduce the set of hypercalls to one: do block i/o. This not only eliminates a lot of pseudo-duplicate code, it also gives the hypervisor a lot more freedom on how to optimize the i/o. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/librumpuser/Makefile cvs rdiff -u -r1.37 -r1.38 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_bio.c cvs rdiff -u -r1.5 -r1.6 src/lib/librumpuser/rumpuser_int.h cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/rumpuser_pth.c cvs rdiff -u -r1.88 -r1.89 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.73 -r1.74 src/sys/rump/librump/rumpvfs/rump_vfs.c cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpvfs/rumpblk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/Makefile diff -u src/lib/librumpuser/Makefile:1.9 src/lib/librumpuser/Makefile:1.10 --- src/lib/librumpuser/Makefile:1.9 Mon Mar 18 13:14:10 2013 +++ src/lib/librumpuser/Makefile Mon Apr 29 12:56:04 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2013/03/18 13:14:10 pooka Exp $ +# $NetBSD: Makefile,v 1.10 2013/04/29 12:56:04 pooka Exp $ # WARNS?= 5 @@ -13,7 +13,7 @@ CPPFLAGS+= -DLIBRUMPUSER SRCS= rumpuser.c SRCS+= rumpuser_pth.c -SRCS+= rumpuser_dl.c rumpuser_sp.c rumpuser_daemonize.c +SRCS+= rumpuser_dl.c rumpuser_sp.c rumpuser_daemonize.c rumpuser_bio.c SRCS+= rumpuser_component.c INCSDIR= /usr/include/rump Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.37 src/lib/librumpuser/rumpuser.c:1.38 --- src/lib/librumpuser/rumpuser.c:1.37 Sun Apr 28 13:39:13 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 12:56:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.37 2013/04/28 13:39:13 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.38 2013/04/29 12:56:04 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.37 2013/04/28 13:39:13 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.38 2013/04/29 12:56:04 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -403,22 +403,6 @@ rumpuser_pread(int fd, void *data, size_ return rv; } -void -rumpuser_read_bio(int fd, void *data, size_t size, off_t offset, - rump_biodone_fn biodone, void *biodonecookie) -{ - ssize_t rv; - int error = 0; - - rv = rumpuser_pread(fd, data, size, offset, error); - /* check against 0 instead of ==-1 to get typing below right */ - if (rv 0) - rv = 0; - - /* LINTED: see above */ - biodone(biodonecookie, rv, error); -} - ssize_t rumpuser_write(int fd, const void *data, size_t size, int *error) { @@ -443,22 +427,6 @@ rumpuser_pwrite(int fd, const void *data return rv; } -void -rumpuser_write_bio(int fd, const void *data, size_t size, off_t offset, - rump_biodone_fn biodone, void *biodonecookie) -{ - ssize_t rv; - int error = 0; - - rv = rumpuser_pwrite(fd, data, size, offset, error); - /* check against 0 instead of ==-1 to get typing below right */ - if (rv 0) - rv = 0; - - /* LINTED: see above */ - biodone(biodonecookie, rv, error); -} - ssize_t rumpuser_readv(int fd, const struct rumpuser_iovec *riov, int iovcnt, int *error) Index: src/lib/librumpuser/rumpuser_int.h diff -u src/lib/librumpuser/rumpuser_int.h:1.5 src/lib/librumpuser/rumpuser_int.h:1.6 --- src/lib/librumpuser/rumpuser_int.h:1.5 Sat Apr 27 14:59:08 2013 +++ src/lib/librumpuser/rumpuser_int.h Mon Apr 29 12:56:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_int.h,v 1.5 2013/04/27 14:59:08 pooka Exp $ */ +/* $NetBSD: rumpuser_int.h,v 1.6 2013/04/29 12:56:04 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -68,3 +68,15 @@ do { \ } void rumpuser__thrinit(void); + +#define NOFAIL(a) do {if (!(a)) abort();} while (/*CONSTCOND*/0) + +#define NOFAIL_ERRNO(a) \ +do { \ + int fail_rv = (a); \ + if (fail_rv) { \ + printf(panic: rumpuser fatal failure %d (%s)\n, \ + fail_rv, strerror(fail_rv)); \ + abort(); \ + }\ +} while (/*CONSTCOND*/0) Index: src/lib/librumpuser/rumpuser_pth.c diff -u src/lib/librumpuser/rumpuser_pth.c:1.16 src/lib/librumpuser/rumpuser_pth.c:1.17 --- src/lib/librumpuser/rumpuser_pth.c:1.16 Sun Apr 28 13:37:51 2013 +++ src/lib/librumpuser/rumpuser_pth.c Mon Apr 29 12:56:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_pth.c,v 1.16 2013/04/28 13:37:51 pooka Exp $ */ +/* $NetBSD: rumpuser_pth.c,v 1.17 2013/04/29 12:56:04 pooka Exp $ */
CVS commit: src/external/gpl3/gcc/lib/libgcc/libgcov
Module Name:src Committed By: skrll Date: Mon Apr 29 12:59:56 UTC 2013 Modified Files: src/external/gpl3/gcc/lib/libgcc/libgcov: Makefile Log Message: Remove a hack. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile diff -u src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile:1.3 src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile:1.4 --- src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile:1.3 Sat Dec 8 02:35:06 2012 +++ src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile Mon Apr 29 12:59:55 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2012/12/08 02:35:06 christos Exp $ +# $NetBSD: Makefile,v 1.4 2013/04/29 12:59:55 skrll Exp $ REQUIRETOOLS= yes NOPIC= # defined @@ -11,12 +11,7 @@ LIB= gcov .if ${MKGCC} != no -# XXX: Fix me -.if ${MACHINE_ARCH} == earmeb -.include ${.CURDIR}/arch/earm/defs.mk -.else .include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk -.endif LIBGCOVSRCS= ${G_LIBGCOV:=.c}
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Mon Apr 29 13:07:37 UTC 2013 Modified Files: src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: rework bio hypercalls, part 2: Nuke all the policy hacks (r/w, mmap, directio) from the paravirtualized block driver and let the hypervisor decide how it wants to optimize the I/O. It can prepare for this based on if a file is opened with the RUMPUSER_OPEN_BIO flag. mmap was not faster than r/w except in a niche case (yes, it made a good measurement), and directio was never on by default since it was tricky at best to decide on the kernel side of things if directio will do the right thing. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/rump/librump/rumpvfs/rumpblk.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/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.49 src/sys/rump/librump/rumpvfs/rumpblk.c:1.50 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.49 Mon Apr 29 12:56:03 2013 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 29 13:07:37 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.49 2013/04/29 12:56:03 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.50 2013/04/29 13:07:37 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -34,25 +34,10 @@ * * We provide fault injection. The driver can be made to fail * I/O occasionally. - * - * The driver also provides an optimization for regular files by - * using memory-mapped I/O. This avoids kernel access for every - * I/O operation. It also gives finer-grained control of how to - * flush data. Additionally, in case the rump kernel dumps core, - * we get way less carnage. - * - * However, it is quite costly in writing large amounts of - * file data, since old contents cannot merely be overwritten, but - * must be paged in first before replacing (i.e. r/m/w). Ideally, - * we should use directio. The problem is that directio can fail - * silently causing improper file system semantics (i.e. unflushed - * data). Therefore, default to mmap for now. Even so, directio - * _should_ be safe and can be enabled by compiling this module - * with -DHAS_DIRECTIO. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.49 2013/04/29 12:56:03 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.50 2013/04/29 13:07:37 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -72,68 +57,29 @@ __KERNEL_RCSID(0, $NetBSD: rumpblk.c,v #include rump_private.h #include rump_vfs_private.h -/* - * O_DIRECT is the fastest alternative, but since it falls back to - * non-direct writes silently, I am not sure it will always be 100% safe. - * Use it and play with it, but do that with caution. - */ -#if 0 -#define HAS_ODIRECT -#endif - #if 0 #define DPRINTF(x) printf x #else #define DPRINTF(x) #endif -/* Default: 16 x 1MB windows */ -unsigned memwinsize = (120); -unsigned memwincnt = 16; - -#define STARTWIN(off) ((off) ~((off_t)memwinsize-1)) -#define INWIN(win,off) ((win)-win_off == STARTWIN(off)) -#define WINSIZE(rblk, win) (MIN((rblk-rblk_hostsize-win-win_off), \ - memwinsize)) -#define WINVALID(win) ((win)-win_off != (off_t)-1) -#define WINVALIDATE(win) ((win)-win_off = (off_t)-1) -struct blkwin { - off_t win_off; - void *win_mem; - int win_refcnt; - - TAILQ_ENTRY(blkwin) win_lru; -}; - #define RUMPBLK_SIZE 16 static struct rblkdev { char *rblk_path; int rblk_fd; int rblk_mode; -#ifdef HAS_ODIRECT - int rblk_dfd; -#endif + uint64_t rblk_size; uint64_t rblk_hostoffset; uint64_t rblk_hostsize; int rblk_ftype; - /* for mmap */ - int rblk_mmflags; - kmutex_t rblk_memmtx; - kcondvar_t rblk_memcv; - TAILQ_HEAD(winlru, blkwin) rblk_lruq; - bool rblk_waiting; - struct disklabel rblk_label; } minors[RUMPBLK_SIZE]; static struct evcnt ev_io_total; static struct evcnt ev_io_async; -static struct evcnt ev_memblk_hits; -static struct evcnt ev_memblk_busy; - static struct evcnt ev_bwrite_total; static struct evcnt ev_bwrite_async; static struct evcnt ev_bread_total; @@ -209,105 +155,6 @@ makedefaultlabel(struct disklabel *lp, o lp-d_checksum = 0; /* XXX */ } -static struct blkwin * -getwindow(struct rblkdev *rblk, off_t off, int *wsize, int *error) -{ - struct blkwin *win; - - mutex_enter(rblk-rblk_memmtx); - retry: - /* search for window */ - TAILQ_FOREACH(win, rblk-rblk_lruq, win_lru) { - if (INWIN(win, off) WINVALID(win)) - break; - } - - /* found? return */ - if (win) { - ev_memblk_hits.ev_count++; - TAILQ_REMOVE(rblk-rblk_lruq, win, win_lru); - goto good; - } - - /* - * Else, create new window. If the least recently used is not - * currently in use, reuse that. Otherwise we need to wait. - */ - win = TAILQ_LAST(rblk-rblk_lruq, winlru); - if (win-win_refcnt == 0) { - TAILQ_REMOVE(rblk-rblk_lruq, win, win_lru); - mutex_exit(rblk-rblk_memmtx); - -
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Mon Apr 29 13:17:33 UTC 2013 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c rumpcomp_user.c rumpcomp_user.h Log Message: add a private hypercall to map the bus into memory To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/rump/net/lib/libshmif/if_shmem.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/net/lib/libshmif/rumpcomp_user.c cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libshmif/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/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.50 src/sys/rump/net/lib/libshmif/if_shmem.c:1.51 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.50 Sun Apr 28 13:17:25 2013 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Mon Apr 29 13:17:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.50 2013/04/28 13:17:25 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.51 2013/04/29 13:17:32 pooka Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.50 2013/04/28 13:17:25 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.51 2013/04/29 13:17:32 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -205,9 +205,7 @@ initbackend(struct shmif_sc *sc, int mem volatile uint8_t *p; int error; - sc-sc_busmem = rumpuser_filemmap(memfd, 0, BUSMEM_SIZE, - RUMPUSER_FILEMMAP_TRUNCATE | RUMPUSER_FILEMMAP_SHARED - | RUMPUSER_FILEMMAP_READ | RUMPUSER_FILEMMAP_WRITE, error); + sc-sc_busmem = rumpcomp_shmif_mmap(memfd, BUSMEM_SIZE, error); if (error) return error; Index: src/sys/rump/net/lib/libshmif/rumpcomp_user.c diff -u src/sys/rump/net/lib/libshmif/rumpcomp_user.c:1.5 src/sys/rump/net/lib/libshmif/rumpcomp_user.c:1.6 --- src/sys/rump/net/lib/libshmif/rumpcomp_user.c:1.5 Sun Apr 28 14:11:43 2013 +++ src/sys/rump/net/lib/libshmif/rumpcomp_user.c Mon Apr 29 13:17:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpcomp_user.c,v 1.5 2013/04/28 14:11:43 pooka Exp $ */ +/* $NetBSD: rumpcomp_user.c,v 1.6 2013/04/29 13:17:32 pooka Exp $ */ /*- * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -26,6 +26,7 @@ */ #include sys/types.h +#include sys/mman.h #include errno.h @@ -176,3 +177,26 @@ rumpcomp_shmif_watchwait(int kq, int *er return 0; } #endif + +void * +rumpcomp_shmif_mmap(int fd, size_t len, int *error) +{ + void *rv; + + *error = 0; + if (ftruncate(fd, len) == -1) { + *error = errno; + return NULL; + } + +#if defined(__sun__) !defined(MAP_FILE) +#define MAP_FILE 0 +#endif + + rv = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, 0); + if (rv == MAP_FAILED) { + *error = errno; + } + + return rv; +} Index: src/sys/rump/net/lib/libshmif/rumpcomp_user.h diff -u src/sys/rump/net/lib/libshmif/rumpcomp_user.h:1.2 src/sys/rump/net/lib/libshmif/rumpcomp_user.h:1.3 --- src/sys/rump/net/lib/libshmif/rumpcomp_user.h:1.2 Sun Apr 28 10:53:22 2013 +++ src/sys/rump/net/lib/libshmif/rumpcomp_user.h Mon Apr 29 13:17:33 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpcomp_user.h,v 1.2 2013/04/28 10:53:22 pooka Exp $ */ +/* $NetBSD: rumpcomp_user.h,v 1.3 2013/04/29 13:17:33 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -27,3 +27,4 @@ int rumpcomp_shmif_watchsetup(int, int, int *); int rumpcomp_shmif_watchwait(int, int *); +void *rumpcomp_shmif_mmap(int, size_t, int *);
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 13:19:12 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser.c src/sys/rump/include/rump: rumpuser.h Log Message: changes to bio hypercalls, part 3/n: retire the filemmap/memsync hypercalls, they're no longer used To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.89 -r1.90 src/sys/rump/include/rump/rumpuser.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.38 src/lib/librumpuser/rumpuser.c:1.39 --- src/lib/librumpuser/rumpuser.c:1.38 Mon Apr 29 12:56:04 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 13:19:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.38 2013/04/29 12:56:04 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.39 2013/04/29 13:19:11 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.38 2013/04/29 12:56:04 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.39 2013/04/29 13:19:11 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -282,53 +282,6 @@ rumpuser_unmap(void *addr, size_t len) assert(rv == 0); } -void * -rumpuser_filemmap(int fd, off_t offset, size_t len, int flags, int *error) -{ - void *rv; - int mmflags, prot; - - if (flags RUMPUSER_FILEMMAP_TRUNCATE) { - if (ftruncate(fd, offset + len) == -1) { - seterror(errno); - return NULL; - } - } - -/* it's implicit */ -#if defined(__sun__) !defined(MAP_FILE) -#define MAP_FILE 0 -#endif - - mmflags = MAP_FILE; - if (flags RUMPUSER_FILEMMAP_SHARED) - mmflags |= MAP_SHARED; - else - mmflags |= MAP_PRIVATE; - - prot = 0; - if (flags RUMPUSER_FILEMMAP_READ) - prot |= PROT_READ; - if (flags RUMPUSER_FILEMMAP_WRITE) - prot |= PROT_WRITE; - - rv = mmap(NULL, len, PROT_READ|PROT_WRITE, mmflags, fd, offset); - if (rv == MAP_FAILED) { - seterror(errno); - return NULL; - } - - seterror(0); - return rv; -} - -int -rumpuser_memsync(void *addr, size_t len, int *error) -{ - - DOCALL_KLOCK(int, (msync(addr, len, MS_SYNC))); -} - int rumpuser_open(const char *path, int ruflags, int *error) { Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.89 src/sys/rump/include/rump/rumpuser.h:1.90 --- src/sys/rump/include/rump/rumpuser.h:1.89 Mon Apr 29 12:56:03 2013 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 29 13:19:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.89 2013/04/29 12:56:03 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.90 2013/04/29 13:19:11 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -57,13 +57,7 @@ void *rumpuser_malloc(size_t, int); void rumpuser_free(void *, size_t); void *rumpuser_anonmmap(void *, size_t, int, int, int *); -#define RUMPUSER_FILEMMAP_READ 0x01 -#define RUMPUSER_FILEMMAP_WRITE 0x02 -#define RUMPUSER_FILEMMAP_TRUNCATE 0x04 -#define RUMPUSER_FILEMMAP_SHARED 0x08 -void *rumpuser_filemmap(int fd, off_t, size_t, int, int *); void rumpuser_unmap(void *, size_t); -int rumpuser_memsync(void *, size_t, int *); #define RUMPUSER_OPEN_RDONLY 0x #define RUMPUSER_OPEN_WRONLY 0x0001
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 13:21:03 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser.c src/sys/rump/include/rump: rumpuser.h Log Message: RUMPUSER_OPEN_DIRECT is no longer necessary To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.90 -r1.91 src/sys/rump/include/rump/rumpuser.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.39 src/lib/librumpuser/rumpuser.c:1.40 --- src/lib/librumpuser/rumpuser.c:1.39 Mon Apr 29 13:19:11 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 13:21:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.39 2013/04/29 13:19:11 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.40 2013/04/29 13:21:03 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.39 2013/04/29 13:19:11 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.40 2013/04/29 13:21:03 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -305,14 +305,6 @@ rumpuser_open(const char *path, int rufl #define TESTSET(_ru_, _h_) if (ruflags _ru_) flags |= _h_; TESTSET(RUMPUSER_OPEN_CREATE, O_CREAT); TESTSET(RUMPUSER_OPEN_EXCL, O_EXCL); -#ifdef O_DIRECT - TESTSET(RUMPUSER_OPEN_DIRECT, O_DIRECT); -#else - if (ruflags RUMPUSER_OPEN_DIRECT) { - *error = EOPNOTSUPP; - return -1; - } -#endif #undef TESTSET DOCALL_KLOCK(int, (open(path, flags, 0644))); Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.90 src/sys/rump/include/rump/rumpuser.h:1.91 --- src/sys/rump/include/rump/rumpuser.h:1.90 Mon Apr 29 13:19:11 2013 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 29 13:21:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.90 2013/04/29 13:19:11 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.91 2013/04/29 13:21:03 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -65,8 +65,7 @@ void rumpuser_unmap(void *, size_t); #define RUMPUSER_OPEN_ACCMODE 0x0003 /* yay */ #define RUMPUSER_OPEN_CREATE 0x0004 /* create file if it doesn't exist */ #define RUMPUSER_OPEN_EXCL 0x0008 /* exclusive open */ -#define RUMPUSER_OPEN_DIRECT 0x0010 /* use direct i/o */ -#define RUMPUSER_OPEN_BIO 0x0020 /* open device for block i/o */ +#define RUMPUSER_OPEN_BIO 0x0010 /* open device for block i/o */ int rumpuser_open(const char *, int, int *); int rumpuser_close(int, int *);
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Mon Apr 29 13:28:56 UTC 2013 Modified Files: src/share/man/man4: tps65217pmic.4 Log Message: Add info about LDOs and DCDCs in TPS65217. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/tps65217pmic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tps65217pmic.4 diff -u src/share/man/man4/tps65217pmic.4:1.2 src/share/man/man4/tps65217pmic.4:1.3 --- src/share/man/man4/tps65217pmic.4:1.2 Fri Apr 26 20:57:48 2013 +++ src/share/man/man4/tps65217pmic.4 Mon Apr 29 13:28:55 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: tps65217pmic.4,v 1.2 2013/04/26 20:57:48 wiz Exp $ +.\ $NetBSD: tps65217pmic.4,v 1.3 2013/04/29 13:28:55 rkujawa Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd April 26, 2013 +.Dd April 29, 2013 .Dt TPS65217PMIC 4 .Os .Sh NAME @@ -42,6 +42,25 @@ driver provides minimal support for the regulated voltages through the .Xr envsys 4 API. +.Pp +The TPS65217 consists of low-dropout regulators (LDO) and step-down converters +with integrated switching FETs (DCDC): +.Bl -bullet -compact +.It +LDO1: 1.0V - 3.3V +.It +LDO2: 0.9V - 3.3V +.It +LDO3: 1.5V - 3.3V +.It +LDO4: 1.5V - 3.3V +.It +DCDC1: 0.9V - 1.8V +.It +DCDC2: 0.9V - 3.3V +.It +DCDC1: 0.9V - 1.5V +.El .Sh SEE ALSO .Xr envsys 4 .Sh HISTORY @@ -64,4 +83,4 @@ Modifying voltage regulator parameters w these parameters should only be set at the firmware level. Setting wrong parameters may result in permanent hardware damage. .Sh BUGS -Battery and interrupt support is not implemented. +Battery, interrupt and WLED (backlight) support is not implemented.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: kiyohara Date: Mon Apr 29 13:39:48 UTC 2013 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: Add WS{DISPLAY,KBD}_TYPE_* for epoc32. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/dev/wscons/wsconsio.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/dev/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.107 src/sys/dev/wscons/wsconsio.h:1.108 --- src/sys/dev/wscons/wsconsio.h:1.107 Thu Jan 31 10:57:30 2013 +++ src/sys/dev/wscons/wsconsio.h Mon Apr 29 13:39:47 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.107 2013/01/31 10:57:30 macallan Exp $ */ +/* $NetBSD: wsconsio.h,v 1.108 2013/04/29 13:39:47 kiyohara Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -107,6 +107,7 @@ struct wscons_event { #define WSKBD_TYPE_ZAURUS 22 /* Sharp Zaurus keyboard */ #define WSKBD_TYPE_LUNA 23 /* OMRON SX-9100 LUNA */ #define WSKBD_TYPE_RFB 24 /* Usermode vnc remote keyboard */ +#define WSKBD_TYPE_EPOC 25 /* Psion EPOC machine keyboard */ /* Manipulate the keyboard bell. */ struct wskbd_bell_data { @@ -331,6 +332,8 @@ struct wsmouse_repeat { #define WSDISPLAY_TYPE_IMXIPU 55 /* i.MX ipu */ #define WSDISPLAY_TYPE_VC4 56 /* Broadcom VideoCore 4 */ #define WSDISPLAY_TYPE_OMAP3 57 /* OMAP 3530 */ +#define WSDISPLAY_TYPE_WINDERMERE 58 /* SoC for EPOC32 Series 5mx */ +#define WSDISPLAY_TYPE_CLPS711X 59 /* CL PS-711x */ /* Basic display information. Not applicable to all display types. */ struct wsdisplay_fbinfo {
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Mon Apr 29 13:53:47 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser_bio.c Log Message: unschedule around blocking i/o To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/librumpuser/rumpuser_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_bio.c diff -u src/lib/librumpuser/rumpuser_bio.c:1.1 src/lib/librumpuser/rumpuser_bio.c:1.2 --- src/lib/librumpuser/rumpuser_bio.c:1.1 Mon Apr 29 12:56:04 2013 +++ src/lib/librumpuser/rumpuser_bio.c Mon Apr 29 13:53:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_bio.c,v 1.1 2013/04/29 12:56:04 pooka Exp $ */ +/* $NetBSD: rumpuser_bio.c,v 1.2 2013/04/29 13:53:46 pooka Exp $ */ /*- * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -127,6 +127,9 @@ rumpuser_bio(int fd, int op, void *data, struct rumpuser_bio bio; static int inited = 0; static int usethread = 0; + int nlocks; + + rumpuser__unschedule(0, nlocks, NULL); if (!inited) { pthread_mutex_lock(biomtx); @@ -170,4 +173,6 @@ rumpuser_bio(int fd, int op, void *data, pthread_cond_signal(biocv); pthread_mutex_unlock(biomtx); } + + rumpuser__reschedule(nlocks, NULL); }
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Mon Apr 29 13:57:46 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser_bio.c Log Message: set default bio mode to threaded To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/librumpuser/rumpuser_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_bio.c diff -u src/lib/librumpuser/rumpuser_bio.c:1.2 src/lib/librumpuser/rumpuser_bio.c:1.3 --- src/lib/librumpuser/rumpuser_bio.c:1.2 Mon Apr 29 13:53:46 2013 +++ src/lib/librumpuser/rumpuser_bio.c Mon Apr 29 13:57:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_bio.c,v 1.2 2013/04/29 13:53:46 pooka Exp $ */ +/* $NetBSD: rumpuser_bio.c,v 1.3 2013/04/29 13:57:46 pooka Exp $ */ /*- * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -126,7 +126,7 @@ rumpuser_bio(int fd, int op, void *data, { struct rumpuser_bio bio; static int inited = 0; - static int usethread = 0; + static int usethread = 1; int nlocks; rumpuser__unschedule(0, nlocks, NULL); @@ -145,7 +145,8 @@ rumpuser_bio(int fd, int op, void *data, if (getenv_r(RUMP_THREADS, buf, sizeof(buf)) == 0) usethread = *buf != '0'; - pthread_create(pt, NULL, biothread, NULL); + if (usethread) +pthread_create(pt, NULL, biothread, NULL); inited = 1; } pthread_mutex_unlock(biomtx);
CVS commit: src/sys/rump/include/rump
Module Name:src Committed By: pooka Date: Mon Apr 29 14:07:02 UTC 2013 Modified Files: src/sys/rump/include/rump: rumpuser.h Log Message: regroup calls a bit and sprinkle comments no functional change for a change To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/rump/include/rump/rumpuser.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.91 src/sys/rump/include/rump/rumpuser.h:1.92 --- src/sys/rump/include/rump/rumpuser.h:1.91 Mon Apr 29 13:21:03 2013 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 29 14:07:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.91 2013/04/29 13:21:03 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.92 2013/04/29 14:07:01 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -37,28 +37,28 @@ #error The rump/rumpuser.h interface is not for non-kernel consumers #endif -#define RUMPUSER_VERSION 16 - -int rumpuser_daemonize_begin(void); -int rumpuser_daemonize_done(int); +/* + * init + */ +#define RUMPUSER_VERSION 16 typedef void (*rump_reschedulefn)(int, void *); typedef void (*rump_unschedulefn)(int, int *, void *); int rumpuser_init(int, rump_reschedulefn, rump_unschedulefn); -int rumpuser_getfileinfo(const char *, uint64_t *, int *, int *); -#define RUMPUSER_FT_OTHER 0 -#define RUMPUSER_FT_DIR 1 -#define RUMPUSER_FT_REG 2 -#define RUMPUSER_FT_BLK 3 -#define RUMPUSER_FT_CHR 4 +/* + * memory allocation + */ void *rumpuser_malloc(size_t, int); void rumpuser_free(void *, size_t); - void *rumpuser_anonmmap(void *, size_t, int, int, int *); void rumpuser_unmap(void *, size_t); +/* + * files and I/O + */ + #define RUMPUSER_OPEN_RDONLY 0x #define RUMPUSER_OPEN_WRONLY 0x0001 #define RUMPUSER_OPEN_RDWR 0x0002 @@ -68,6 +68,13 @@ void rumpuser_unmap(void *, size_t); #define RUMPUSER_OPEN_BIO 0x0010 /* open device for block i/o */ int rumpuser_open(const char *, int, int *); +#define RUMPUSER_FT_OTHER 0 +#define RUMPUSER_FT_DIR 1 +#define RUMPUSER_FT_REG 2 +#define RUMPUSER_FT_BLK 3 +#define RUMPUSER_FT_CHR 4 +int rumpuser_getfileinfo(const char *, uint64_t *, int *, int *); + int rumpuser_close(int, int *); int rumpuser_fsync(int, int *); @@ -89,32 +96,56 @@ struct rumpuser_iovec { ssize_t rumpuser_readv(int, const struct rumpuser_iovec *, int, int *); ssize_t rumpuser_writev(int, const struct rumpuser_iovec *, int, int *); +/* + * clock and zzz + */ + enum rumpclock { RUMPUSER_CLOCK_RELWALL, RUMPUSER_CLOCK_ABSMONO }; int rumpuser_clock_gettime(uint64_t *, uint64_t *, enum rumpclock); int rumpuser_clock_sleep(uint64_t, uint64_t, enum rumpclock); -int rumpuser_getenv(const char *, char *, size_t, int *); +/* + * host information retrieval + */ +int rumpuser_getenv(const char *, char *, size_t, int *); +int rumpuser_getnhostcpu(void); int rumpuser_gethostname(char *, size_t, int *); -int rumpuser_putchar(int, int *); +/* + * system call emulation, set errno is TLS + */ + +void rumpuser_seterrno(int); + +/* + * termination + */ #define RUMPUSER_PID_SELF ((int64_t)-1) int rumpuser_kill(int64_t, int, int *); - #define RUMPUSER_PANIC (-1) void rumpuser_exit(int) __dead; -void rumpuser_seterrno(int); +/* + * console output + */ + +int rumpuser_putchar(int, int *); int rumpuser_dprintf(const char *, ...) __printflike(1, 2); -int rumpuser_getnhostcpu(void); +/* + * access to host random pool + */ /* always succeeds unless NOWAIT is given */ #define RUMPUSER_RANDOM_HARD 0x01 #define RUMPUSER_RANDOM_NOWAIT 0x02 size_t rumpuser_getrandom(void *, size_t, int); +/* + * threads, scheduling (host) and synchronization + */ int rumpuser_thread_create(void *(*f)(void *), void *, const char *, int, void **); void rumpuser_thread_exit(void) __dead; @@ -156,7 +187,9 @@ void rumpuser_cv_signal(struct rumpuser_ void rumpuser_cv_broadcast(struct rumpuser_cv *); int rumpuser_cv_has_waiters(struct rumpuser_cv *); -/* rumpuser dynloader */ +/* + * dynloader + */ struct modinfo; struct rump_component; @@ -166,7 +199,16 @@ typedef void (*rump_compload_fn)(const s void rumpuser_dl_bootstrap(rump_modinit_fn, rump_symload_fn, rump_compload_fn); void *rumpuser_dl_globalsym(const char *); -/* syscall proxy routines */ +/* + * misc management + */ + +int rumpuser_daemonize_begin(void); +int rumpuser_daemonize_done(int); + +/* + * syscall proxy + */ struct rumpuser_sp_ops { void (*spop_schedule)(void);
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Mon Apr 29 14:19:49 UTC 2013 Modified Files: src/share/man/man4: tps65217pmic.4 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/tps65217pmic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tps65217pmic.4 diff -u src/share/man/man4/tps65217pmic.4:1.3 src/share/man/man4/tps65217pmic.4:1.4 --- src/share/man/man4/tps65217pmic.4:1.3 Mon Apr 29 13:28:55 2013 +++ src/share/man/man4/tps65217pmic.4 Mon Apr 29 14:19:48 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: tps65217pmic.4,v 1.3 2013/04/29 13:28:55 rkujawa Exp $ +.\ $NetBSD: tps65217pmic.4,v 1.4 2013/04/29 14:19:48 wiz Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -43,7 +43,7 @@ regulated voltages through the .Xr envsys 4 API. .Pp -The TPS65217 consists of low-dropout regulators (LDO) and step-down converters +The TPS65217 consists of low-dropout regulators (LDO) and step-down converters with integrated switching FETs (DCDC): .Bl -bullet -compact .It
CVS commit: src/distrib/hp700/ramdisk
Module Name:src Committed By: skrll Date: Mon Apr 29 14:42:11 UTC 2013 Modified Files: src/distrib/hp700/ramdisk: Makefile Log Message: Fix PR/47123 for hp700 as well To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/hp700/ramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/hp700/ramdisk/Makefile diff -u src/distrib/hp700/ramdisk/Makefile:1.11 src/distrib/hp700/ramdisk/Makefile:1.12 --- src/distrib/hp700/ramdisk/Makefile:1.11 Thu Feb 11 09:06:48 2010 +++ src/distrib/hp700/ramdisk/Makefile Mon Apr 29 14:42:11 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile,v 1.12 2013/04/29 14:42:11 skrll Exp $ .include bsd.own.mk .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib @@ -15,7 +15,7 @@ CRUNCHGEN_FLAGS= -d ${DBG} LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst MTREECONF= ${DISTRIBDIR}/common/mtree.common IMAGEENDIAN= be -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty IMAGEDEPENDS= ${CRUNCHBIN} \ dot.profile \ ${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 14:51:41 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser.c rumpuser_bio.c rumpuser_component.c rumpuser_int.h rumpuser_pth.c rumpuser_sp.c src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpkern: klock.c rump.c Log Message: Make the rump kernel upcalls which were previous available only to the sysproxy module available for the entire hypervisor. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.3 -r1.4 src/lib/librumpuser/rumpuser_bio.c cvs rdiff -u -r1.2 -r1.3 src/lib/librumpuser/rumpuser_component.c cvs rdiff -u -r1.6 -r1.7 src/lib/librumpuser/rumpuser_int.h cvs rdiff -u -r1.17 -r1.18 src/lib/librumpuser/rumpuser_pth.c cvs rdiff -u -r1.55 -r1.56 src/lib/librumpuser/rumpuser_sp.c cvs rdiff -u -r1.92 -r1.93 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/rumpkern/klock.c cvs rdiff -u -r1.262 -r1.263 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/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.40 src/lib/librumpuser/rumpuser.c:1.41 --- src/lib/librumpuser/rumpuser.c:1.40 Mon Apr 29 13:21:03 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 14:51:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.40 2013/04/29 13:21:03 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.41 2013/04/29 14:51:39 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.40 2013/04/29 13:21:03 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.41 2013/04/29 14:51:39 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -64,12 +64,10 @@ __RCSID($NetBSD: rumpuser.c,v 1.40 2013 #include rumpuser_int.h -rump_unschedulefn rumpuser__unschedule; -rump_reschedulefn rumpuser__reschedule; +struct rumpuser_hyperup rumpuser__hyp; int -rumpuser_init(int version, - rump_reschedulefn rumpkern_resched, rump_unschedulefn rumpkern_unsched) +rumpuser_init(int version, const struct rumpuser_hyperup *hyp) { if (version != RUMPUSER_VERSION) { @@ -94,9 +92,7 @@ rumpuser_init(int version, #endif rumpuser__thrinit(); - - rumpuser__unschedule = rumpkern_unsched; - rumpuser__reschedule = rumpkern_resched; + rumpuser__hyp = *hyp; return 0; } @@ -465,7 +461,7 @@ rumpuser_clock_sleep(uint64_t sec, uint6 int nlocks; int rv; - rumpuser__unschedule(0, nlocks, NULL); + rumpkern_unsched(nlocks, NULL); /*LINTED*/ rqt.tv_sec = sec; @@ -513,7 +509,7 @@ rumpuser_clock_sleep(uint64_t sec, uint6 abort(); } - rumpuser__reschedule(nlocks, NULL); + rumpkern_sched(nlocks, NULL); return rv; } Index: src/lib/librumpuser/rumpuser_bio.c diff -u src/lib/librumpuser/rumpuser_bio.c:1.3 src/lib/librumpuser/rumpuser_bio.c:1.4 --- src/lib/librumpuser/rumpuser_bio.c:1.3 Mon Apr 29 13:57:46 2013 +++ src/lib/librumpuser/rumpuser_bio.c Mon Apr 29 14:51:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_bio.c,v 1.3 2013/04/29 13:57:46 pooka Exp $ */ +/* $NetBSD: rumpuser_bio.c,v 1.4 2013/04/29 14:51:39 pooka Exp $ */ /*- * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -88,9 +88,9 @@ dobio(struct rumpuser_bio *biop) #endif } } - rumpuser__reschedule(0, NULL); + rumpkern_sched(0, NULL); biop-bio_done(biop-bio_donearg, (size_t)rv, error); - rumpuser__unschedule(0, dummy, NULL); + rumpkern_unsched(dummy, NULL); /* paranoia */ biop-bio_donearg = NULL; @@ -129,7 +129,7 @@ rumpuser_bio(int fd, int op, void *data, static int usethread = 1; int nlocks; - rumpuser__unschedule(0, nlocks, NULL); + rumpkern_unsched(nlocks, NULL); if (!inited) { pthread_mutex_lock(biomtx); @@ -175,5 +175,5 @@ rumpuser_bio(int fd, int op, void *data, pthread_mutex_unlock(biomtx); } - rumpuser__reschedule(nlocks, NULL); + rumpkern_sched(nlocks, NULL); } Index: src/lib/librumpuser/rumpuser_component.c diff -u src/lib/librumpuser/rumpuser_component.c:1.2 src/lib/librumpuser/rumpuser_component.c:1.3 --- src/lib/librumpuser/rumpuser_component.c:1.2 Sat Apr 27 14:59:08 2013 +++ src/lib/librumpuser/rumpuser_component.c Mon Apr 29 14:51:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_component.c,v 1.2 2013/04/27 14:59:08 pooka Exp $ */ +/* $NetBSD: rumpuser_component.c,v 1.3 2013/04/29 14:51:39 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser_component.c,v 1.2 2013/04/27 14:59:08 pooka Exp $); +__RCSID($NetBSD: rumpuser_component.c,v 1.3 2013/04/29 14:51:39 pooka Exp $); #endif /* !lint */ /* @@ -47,7 +47,7 @@ rumpuser_component_unschedule(void) { int nlocks; - rumpuser__unschedule(0, nlocks, NULL); +
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Mon Apr 29 14:53:33 UTC 2013 Modified Files: src/sys/rump/librump/rumpkern: klock.c Log Message: remove routine not meant to be committed To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/klock.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/klock.c diff -u src/sys/rump/librump/rumpkern/klock.c:1.6 src/sys/rump/librump/rumpkern/klock.c:1.7 --- src/sys/rump/librump/rumpkern/klock.c:1.6 Mon Apr 29 14:51:41 2013 +++ src/sys/rump/librump/rumpkern/klock.c Mon Apr 29 14:53:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: klock.c,v 1.6 2013/04/29 14:51:41 pooka Exp $ */ +/* $NetBSD: klock.c,v 1.7 2013/04/29 14:53:32 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: klock.c,v 1.6 2013/04/29 14:51:41 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: klock.c,v 1.7 2013/04/29 14:53:32 pooka Exp $); #include sys/param.h #include sys/systm.h @@ -166,14 +166,3 @@ rump_user_schedule(int nlocks, void *int if (nlocks) _kernel_lock(nlocks); } - -void -rump_user_kthread(void) -{ - - KASSERT(curlwp == NULL); - rump_schedule(); - if (rump_lwproc_newlwp(0) != 0) - panic(kthread create failed); - rump_unschedule(); -}
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Mon Apr 29 14:54:03 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser_bio.c Log Message: Create a kernel thread context for the bio upcalls. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/librumpuser/rumpuser_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_bio.c diff -u src/lib/librumpuser/rumpuser_bio.c:1.4 src/lib/librumpuser/rumpuser_bio.c:1.5 --- src/lib/librumpuser/rumpuser_bio.c:1.4 Mon Apr 29 14:51:39 2013 +++ src/lib/librumpuser/rumpuser_bio.c Mon Apr 29 14:54:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_bio.c,v 1.4 2013/04/29 14:51:39 pooka Exp $ */ +/* $NetBSD: rumpuser_bio.c,v 1.5 2013/04/29 14:54:03 pooka Exp $ */ /*- * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -100,7 +100,12 @@ static void * biothread(void *arg) { struct rumpuser_bio *biop; + int rv; + rumpuser__hyp.hyp_schedule(); + rv = rumpuser__hyp.hyp_lwproc_newlwp(0); + assert(rv == 0); + rumpuser__hyp.hyp_unschedule(); NOFAIL_ERRNO(pthread_mutex_lock(biomtx)); for (;;) { while (bio_head == bio_tail)
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Mon Apr 29 15:05:36 UTC 2013 Modified Files: src/doc: 3RDPARTY Log Message: gdb-7.6 out. To generate a diff of this commit: cvs rdiff -u -r1.1033 -r1.1034 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1033 src/doc/3RDPARTY:1.1034 --- src/doc/3RDPARTY:1.1033 Thu Apr 11 17:50:23 2013 +++ src/doc/3RDPARTY Mon Apr 29 15:05:35 2013 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1033 2013/04/11 17:50:23 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1034 2013/04/29 15:05:35 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -391,7 +391,7 @@ for GCC 4.5: Package: gdb Version: 6.5/7.3.1 -Current Vers: 7.5 +Current Vers: 7.6 Maintainer: FSF Archive Site: ftp://ftp.gnu.org/gnu/gdb/ Home Page: http://www.gnu.org/software/gdb/
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Mon Apr 29 15:20:05 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser_component.c rumpuser_component.h Log Message: Give private hypercalls the ability to meddle with kthread contexts too. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/librumpuser/rumpuser_component.c cvs rdiff -u -r1.1 -r1.2 src/lib/librumpuser/rumpuser_component.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_component.c diff -u src/lib/librumpuser/rumpuser_component.c:1.3 src/lib/librumpuser/rumpuser_component.c:1.4 --- src/lib/librumpuser/rumpuser_component.c:1.3 Mon Apr 29 14:51:39 2013 +++ src/lib/librumpuser/rumpuser_component.c Mon Apr 29 15:20:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_component.c,v 1.3 2013/04/29 14:51:39 pooka Exp $ */ +/* $NetBSD: rumpuser_component.c,v 1.4 2013/04/29 15:20:05 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser_component.c,v 1.3 2013/04/29 14:51:39 pooka Exp $); +__RCSID($NetBSD: rumpuser_component.c,v 1.4 2013/04/29 15:20:05 pooka Exp $); #endif /* !lint */ /* @@ -58,3 +58,42 @@ rumpuser_component_schedule(void *cookie rumpkern_sched(nlocks, NULL); } + +void +rumpuser_component_kthread(void) +{ + + rumpuser__hyp.hyp_schedule(); + rumpuser__hyp.hyp_lwproc_newlwp(0); + rumpuser__hyp.hyp_unschedule(); +} + +struct lwp * +rumpuser_component_curlwp(void) +{ + struct lwp *l; + + rumpuser__hyp.hyp_schedule(); + l = rumpuser__hyp.hyp_lwproc_curlwp(); + rumpuser__hyp.hyp_unschedule(); + + return l; +} + +void +rumpuser_component_switchlwp(struct lwp *l) +{ + + rumpuser__hyp.hyp_schedule(); + rumpuser__hyp.hyp_lwproc_switch(l); + rumpuser__hyp.hyp_unschedule(); +} + +void +rumpuser_component_kthread_release(void) +{ + + rumpuser__hyp.hyp_schedule(); + rumpuser__hyp.hyp_lwproc_release(); + rumpuser__hyp.hyp_unschedule(); +} Index: src/lib/librumpuser/rumpuser_component.h diff -u src/lib/librumpuser/rumpuser_component.h:1.1 src/lib/librumpuser/rumpuser_component.h:1.2 --- src/lib/librumpuser/rumpuser_component.h:1.1 Fri Mar 1 18:15:36 2013 +++ src/lib/librumpuser/rumpuser_component.h Mon Apr 29 15:20:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_component.h,v 1.1 2013/03/01 18:15:36 pooka Exp $ */ +/* $NetBSD: rumpuser_component.h,v 1.2 2013/04/29 15:20:05 pooka Exp $ */ /* * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -31,4 +31,9 @@ void * rumpuser_component_unschedule(void); void rumpuser_component_schedule(void *); +void rumpuser_component_kthread(void); +struct lwp *rumpuser_component_curlwp(void); +void rumpuser_component_switchlwp(struct lwp *); +void rumpuser_component_kthread_release(void); + #endif /* _RUMP_RUMPUSER_COMPONENT_H_ */
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 15:40:39 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser.c src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: The fsync hypercall is now used only with close, so get rid of it. rumpuser_bio() should do the necessary syncing. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.93 -r1.94 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.50 -r1.51 src/sys/rump/librump/rumpvfs/rumpblk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.41 src/lib/librumpuser/rumpuser.c:1.42 --- src/lib/librumpuser/rumpuser.c:1.41 Mon Apr 29 14:51:39 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 15:40:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.41 2013/04/29 14:51:39 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.42 2013/04/29 15:40:38 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.41 2013/04/29 14:51:39 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.42 2013/04/29 15:40:38 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -309,15 +309,14 @@ rumpuser_open(const char *path, int rufl int rumpuser_close(int fd, int *error) { + int nlocks; - DOCALL(int, close(fd)); -} - -int -rumpuser_fsync(int fd, int *error) -{ + rumpkern_unsched(nlocks, NULL); + fsync(fd); + close(fd); + rumpkern_sched(nlocks, NULL); - DOCALL_KLOCK(int, fsync(fd)); + return 0; } ssize_t Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.93 src/sys/rump/include/rump/rumpuser.h:1.94 --- src/sys/rump/include/rump/rumpuser.h:1.93 Mon Apr 29 14:51:40 2013 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 29 15:40:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.93 2013/04/29 14:51:40 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.94 2013/04/29 15:40:38 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -85,6 +85,7 @@ void rumpuser_unmap(void *, size_t); #define RUMPUSER_OPEN_EXCL 0x0008 /* exclusive open */ #define RUMPUSER_OPEN_BIO 0x0010 /* open device for block i/o */ int rumpuser_open(const char *, int, int *); +int rumpuser_close(int, int *); #define RUMPUSER_FT_OTHER 0 #define RUMPUSER_FT_DIR 1 @@ -93,9 +94,6 @@ int rumpuser_open(const char *, int, int #define RUMPUSER_FT_CHR 4 int rumpuser_getfileinfo(const char *, uint64_t *, int *, int *); -int rumpuser_close(int, int *); -int rumpuser_fsync(int, int *); - #define RUMPUSER_BIO_READ 0x01 #define RUMPUSER_BIO_WRITE 0x02 #define RUMPUSER_BIO_SYNC 0x04 Index: src/sys/rump/librump/rumpvfs/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.50 src/sys/rump/librump/rumpvfs/rumpblk.c:1.51 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.50 Mon Apr 29 13:07:37 2013 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 29 15:40:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.50 2013/04/29 13:07:37 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.51 2013/04/29 15:40:39 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.50 2013/04/29 13:07:37 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.51 2013/04/29 15:40:39 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -347,7 +347,6 @@ backend_close(struct rblkdev *rblk) { int dummy; - rumpuser_fsync(rblk-rblk_fd, dummy); rumpuser_close(rblk-rblk_fd, dummy); rblk-rblk_fd = -1;
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 17:31:05 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser.c src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpkern: rump.c vm.c src/sys/rump/librump/rumpvfs: rump_vfs.c rumpblk.c Log Message: Replace the various get info from hypervisor interfaces with one unified rumpuser_getparam(), and make it return a plist. The contents can come e.g. from the env or a config file. Make identifiers starting with an underscore denote system identifiers which must be implemented by hypervisor. (yea, j/k about the plist bit) To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.94 -r1.95 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.263 -r1.264 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.140 -r1.141 src/sys/rump/librump/rumpkern/vm.c cvs rdiff -u -r1.74 -r1.75 src/sys/rump/librump/rumpvfs/rump_vfs.c cvs rdiff -u -r1.51 -r1.52 src/sys/rump/librump/rumpvfs/rumpblk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.42 src/lib/librumpuser/rumpuser.c:1.43 --- src/lib/librumpuser/rumpuser.c:1.42 Mon Apr 29 15:40:38 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 17:31:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.42 2013/04/29 15:40:38 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.43 2013/04/29 17:31:05 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.42 2013/04/29 15:40:38 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.43 2013/04/29 17:31:05 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -512,27 +512,71 @@ rumpuser_clock_sleep(uint64_t sec, uint6 return rv; } -int -rumpuser_getenv(const char *name, char *buf, size_t blen, int *error) +static int +gethostncpu(void) { + int ncpu = 1; + +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + size_t sz = sizeof(ncpu); + + sysctlbyname(hw.ncpu, ncpu, sz, NULL, 0); +#elif defined(__linux__) || defined(__CYGWIN__) + FILE *fp; + char *line = NULL; + size_t n = 0; - DOCALL(int, getenv_r(name, buf, blen)); + /* If anyone knows a better way, I'm all ears */ + if ((fp = fopen(/proc/cpuinfo, r)) != NULL) { + ncpu = 0; + while (getline(line, n, fp) != -1) { + if (strncmp(line, + processor, sizeof(processor)-1) == 0) + ncpu++; + } + if (ncpu == 0) + ncpu = 1; + free(line); + fclose(fp); + } +#elif __sun__ + /* XXX: this is just a rough estimate ... */ + ncpu = sysconf(_SC_NPROCESSORS_ONLN); +#endif + + return ncpu; } int -rumpuser_gethostname(char *name, size_t namelen, int *error) +rumpuser_getparam(const char *name, void *buf, size_t blen) { - char tmp[MAXHOSTNAMELEN]; - if (gethostname(tmp, sizeof(tmp)) == -1) { - snprintf(name, namelen, rump-%05d.rumpdomain, (int)getpid()); + if (strcmp(name, RUMPUSER_PARAM_NCPU) == 0) { + int ncpu; + + if (getenv_r(RUMP_NCPU, buf, blen) == -1) { + ncpu = gethostncpu(); + snprintf(buf, blen, %d, ncpu); + } + return 0; + } else if (strcmp(name, RUMPUSER_PARAM_HOSTNAME) == 0) { + char tmp[MAXHOSTNAMELEN]; + + if (gethostname(tmp, sizeof(tmp)) == -1) { + snprintf(buf, blen, rump-%05d, (int)getpid()); + } else { + snprintf(buf, blen, rump-%05d.%s, + (int)getpid(), tmp); + } + return 0; + } else if (*name == '_') { + return EINVAL; } else { - snprintf(name, namelen, rump-%05d.%s.rumpdomain, - (int)getpid(), tmp); + if (getenv_r(name, buf, blen) == -1) + return errno; + else + return 0; } - - *error = 0; - return 0; } int @@ -592,41 +636,6 @@ rumpuser_kill(int64_t pid, int sig, int #endif } -int -rumpuser_getnhostcpu(void) -{ - int ncpu = 1; - -#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) - size_t sz = sizeof(ncpu); - - sysctlbyname(hw.ncpu, ncpu, sz, NULL, 0); -#elif defined(__linux__) || defined(__CYGWIN__) - FILE *fp; - char *line = NULL; - size_t n = 0; - - /* If anyone knows a better way, I'm all ears */ - if ((fp = fopen(/proc/cpuinfo, r)) != NULL) { - ncpu = 0; - while (getline(line, n, fp) != -1) { - if (strncmp(line, - processor, sizeof(processor)-1) == 0) - ncpu++; - } - if (ncpu == 0) - ncpu = 1; - free(line); - fclose(fp); - } -#elif __sun__ - /* XXX: this is just a rough estimate ... */ - ncpu = sysconf(_SC_NPROCESSORS_ONLN); -#endif - - return ncpu; -} - size_t rumpuser_getrandom(void *buf, size_t buflen, int flags) { Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.94 src/sys/rump/include/rump/rumpuser.h:1.95 --- src/sys/rump/include/rump/rumpuser.h:1.94 Mon Apr 29 15:40:38 2013 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 29
CVS commit: src/sys/rump/include/rump
Module Name:src Committed By: pooka Date: Mon Apr 29 17:35:04 UTC 2013 Modified Files: src/sys/rump/include/rump: rumpuser.h Log Message: remove accidentally committed bit To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/rump/include/rump/rumpuser.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.95 src/sys/rump/include/rump/rumpuser.h:1.96 --- src/sys/rump/include/rump/rumpuser.h:1.95 Mon Apr 29 17:31:05 2013 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 29 17:35:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.95 2013/04/29 17:31:05 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.96 2013/04/29 17:35:04 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -62,7 +62,6 @@ struct rumpuser_hyperup { void *hyp__extra[8]; }; int rumpuser_init(int, const struct rumpuser_hyperup *); -void rumpuser_fini(void); /* * memory allocation
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: mlelstv Date: Mon Apr 29 17:59:51 UTC 2013 Modified Files: src/crypto/external/bsd/openssh/dist: readconf.c readconf.h ssh.c sshconnect2.c Log Message: Identityfile warnings fixes. https://bugzilla.mindrot.org/show_bug.cgi?id=2084 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssh/dist/readconf.c \ src/crypto/external/bsd/openssh/dist/readconf.h cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/dist/ssh.c cvs rdiff -u -r1.12 -r1.13 src/crypto/external/bsd/openssh/dist/sshconnect2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/readconf.c diff -u src/crypto/external/bsd/openssh/dist/readconf.c:1.8 src/crypto/external/bsd/openssh/dist/readconf.c:1.9 --- src/crypto/external/bsd/openssh/dist/readconf.c:1.8 Wed May 2 02:41:08 2012 +++ src/crypto/external/bsd/openssh/dist/readconf.c Mon Apr 29 17:59:50 2013 @@ -1,5 +1,5 @@ -/* $NetBSD: readconf.c,v 1.8 2012/05/02 02:41:08 christos Exp $ */ -/* $OpenBSD: readconf.c,v 1.194 2011/09/23 07:45:05 markus Exp $ */ +/* $NetBSD: readconf.c,v 1.9 2013/04/29 17:59:50 mlelstv Exp $ */ +/* $OpenBSD: readconf.c,v 1.196 2013/02/22 04:45:08 dtucker Exp $ */ /* * Author: Tatu Ylonen y...@cs.hut.fi * Copyright (c) 1995 Tatu Ylonen y...@cs.hut.fi, Espoo, Finland @@ -14,7 +14,7 @@ */ #include includes.h -__RCSID($NetBSD: readconf.c,v 1.8 2012/05/02 02:41:08 christos Exp $); +__RCSID($NetBSD: readconf.c,v 1.9 2013/04/29 17:59:50 mlelstv Exp $); #include sys/types.h #include sys/stat.h #include sys/socket.h @@ -353,6 +353,26 @@ clear_forwardings(Options *options) options-tun_open = SSH_TUNMODE_NO; } +void +add_identity_file(Options *options, const char *dir, const char *filename, +int userprovided) +{ + char *path; + + if (options-num_identity_files = SSH_MAX_IDENTITY_FILES) + fatal(Too many identity files specified (max %d), + SSH_MAX_IDENTITY_FILES); + + if (dir == NULL) /* no dir, filename is absolute */ + path = xstrdup(filename); + else + (void)xasprintf(path, %.100s%.100s, dir, filename); + + options-identity_file_userprovided[options-num_identity_files] = + userprovided; + options-identity_files[options-num_identity_files++] = path; +} + /* * Returns the number of the token pointed to by cp or oBadOption. */ @@ -380,7 +400,7 @@ parse_token(const char *cp, const char * int process_config_line(Options *options, const char *host, char *line, const char *filename, int linenum, - int *activep) + int *activep, int userconfig) { char *s, **charptr, *endofnumber, *keyword, *arg, *arg2; char **cpptr, fwdarg[256]; @@ -662,9 +682,7 @@ parse_yesnoask: if (*intptr = SSH_MAX_IDENTITY_FILES) fatal(%.200s line %d: Too many identity files specified (max %d)., filename, linenum, SSH_MAX_IDENTITY_FILES); - charptr = options-identity_files[*intptr]; - *charptr = xstrdup(arg); - *intptr = *intptr + 1; + add_identity_file(options, NULL, arg, userconfig); } break; @@ -1161,7 +1179,7 @@ parse_int: int read_config_file(const char *filename, const char *host, Options *options, -int checkperm) +int flags) { FILE *f; char line[1024]; @@ -1171,7 +1189,7 @@ read_config_file(const char *filename, c if ((f = fopen(filename, r)) == NULL) return 0; - if (checkperm) { + if (flags SSHCONF_CHECKPERM) { struct stat sb; if (fstat(fileno(f), sb) == -1) @@ -1192,7 +1210,8 @@ read_config_file(const char *filename, c while (fgets(line, sizeof(line), f)) { /* Update line number counter. */ linenum++; - if (process_config_line(options, host, line, filename, linenum, active) != 0) + if (process_config_line(options, host, line, filename, linenum, + active, flags SSHCONF_USERCONF) != 0) bad_options++; } fclose(f); Index: src/crypto/external/bsd/openssh/dist/readconf.h diff -u src/crypto/external/bsd/openssh/dist/readconf.h:1.8 src/crypto/external/bsd/openssh/dist/readconf.h:1.9 --- src/crypto/external/bsd/openssh/dist/readconf.h:1.8 Wed May 2 02:41:08 2012 +++ src/crypto/external/bsd/openssh/dist/readconf.h Mon Apr 29 17:59:50 2013 @@ -1,5 +1,5 @@ -/* $NetBSD: readconf.h,v 1.8 2012/05/02 02:41:08 christos Exp $ */ -/* $OpenBSD: readconf.h,v 1.91 2011/09/23 07:45:05 markus Exp $ */ +/* $NetBSD: readconf.h,v 1.9 2013/04/29 17:59:50 mlelstv Exp $ */ +/* $OpenBSD: readconf.h,v 1.93 2013/02/22 04:45:09 dtucker Exp $ */ /* * Author: Tatu Ylonen y...@cs.hut.fi @@ -111,6 +111,7 @@ typedef struct { int num_identity_files; /* Number of files for RSA/DSA identities. */ char *identity_files[SSH_MAX_IDENTITY_FILES]; + intidentity_file_userprovided[SSH_MAX_IDENTITY_FILES]; Key*identity_keys[SSH_MAX_IDENTITY_FILES]; /* Local TCP/IP forward requests. */ @@ -166,15 +167,20 @@ typedef struct { #define
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 18:00:20 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser_dl.c src/sys/rump/librump/rumpkern: rump.c Log Message: Make rumpuser_dl_bootstrap() optional for platforms which don't provide dynamic linking. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/librumpuser/rumpuser_dl.c cvs rdiff -u -r1.264 -r1.265 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/lib/librumpuser/rumpuser_dl.c diff -u src/lib/librumpuser/rumpuser_dl.c:1.17 src/lib/librumpuser/rumpuser_dl.c:1.18 --- src/lib/librumpuser/rumpuser_dl.c:1.17 Wed Mar 20 12:59:10 2013 +++ src/lib/librumpuser/rumpuser_dl.c Mon Apr 29 18:00:20 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_dl.c,v 1.17 2013/03/20 12:59:10 pooka Exp $ */ +/* $NetBSD: rumpuser_dl.c,v 1.18 2013/04/29 18:00:20 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -40,7 +40,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser_dl.c,v 1.17 2013/03/20 12:59:10 pooka Exp $); +__RCSID($NetBSD: rumpuser_dl.c,v 1.18 2013/04/29 18:00:20 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -455,22 +455,14 @@ rumpuser_dl_bootstrap(rump_modinit_fn do } #else /* - * default implementation for platforms where we don't support - * dynamic linking. Assumes that all rump kernel components are - * statically linked with the local client. No need to handle modules - * since the module code does that all by itself. + * no dynamic linking supported */ void rumpuser_dl_bootstrap(rump_modinit_fn domodinit, rump_symload_fn symload, rump_compload_fn compload) { - extern void *__start_link_set_rump_components; - extern void *__stop_link_set_rump_components; - void **rc = __start_link_set_rump_components; - void **rc_end = __stop_link_set_rump_components; - for (; rc rc_end; rc++) - compload(*rc); + return; } #endif Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.264 src/sys/rump/librump/rumpkern/rump.c:1.265 --- src/sys/rump/librump/rumpkern/rump.c:1.264 Mon Apr 29 17:31:05 2013 +++ src/sys/rump/librump/rumpkern/rump.c Mon Apr 29 18:00:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.264 2013/04/29 17:31:05 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.265 2013/04/29 18:00:19 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.264 2013/04/29 17:31:05 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.265 2013/04/29 18:00:19 pooka Exp $); #include sys/systm.h #define ELFSIZE ARCH_ELFSIZE @@ -106,6 +106,7 @@ static int rump_hyp_rfork(void *, int, c static void rump_hyp_lwpexit(void); static void rump_hyp_execnotify(const char *); +static void rump_component_addlocal(void); static void rump_component_load(const struct rump_component *); static struct lwp *bootlwp; @@ -219,8 +220,7 @@ rump_daemonize_done(int error) RUMP_COMPONENT(RUMP_COMPONENT_POSTINIT) { - extern void *__start_link_set_rump_components; - extern void *__stop_link_set_rump_components; + __link_set_decl(rump_components, struct rump_component); /* * Trick compiler into generating references so that statically @@ -402,6 +402,7 @@ rump_init(void) rumpuser_dl_bootstrap(add_linkedin_modules, rump_kernelfsym_load, rump_component_load); + rump_component_addlocal(); rump_component_init(RUMP_COMPONENT_KERN); /* initialize factions, if present */ @@ -679,6 +680,20 @@ struct compstore { }; static LIST_HEAD(, compstore) cshead = LIST_HEAD_INITIALIZER(cshead); +/* + * add components which are visible from the current object. + */ +static void +rump_component_addlocal(void) +{ + __link_set_decl(rump_components, struct rump_component); + struct rump_component *const *rc; + + __link_set_foreach(rc, rump_components) { + rump_component_load(*rc); + } +} + static void rump_component_load(const struct rump_component *rc) {
CVS commit: src/sys/rump/dev/lib/libugenhc
Module Name:src Committed By: christos Date: Mon Apr 29 18:06:59 UTC 2013 Modified Files: src/sys/rump/dev/lib/libugenhc: rumpcomp_user.c Log Message: don't compile the for kernel To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/lib/libugenhc/rumpcomp_user.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/rumpcomp_user.c diff -u src/sys/rump/dev/lib/libugenhc/rumpcomp_user.c:1.2 src/sys/rump/dev/lib/libugenhc/rumpcomp_user.c:1.3 --- src/sys/rump/dev/lib/libugenhc/rumpcomp_user.c:1.2 Sun Apr 28 06:23:36 2013 +++ src/sys/rump/dev/lib/libugenhc/rumpcomp_user.c Mon Apr 29 14:06:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpcomp_user.c,v 1.2 2013/04/28 10:23:36 pooka Exp $ */ +/* $NetBSD: rumpcomp_user.c,v 1.3 2013/04/29 18:06:59 christos Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - +#ifndef _KERNEL #include sys/types.h #include sys/ioctl.h @@ -50,3 +50,4 @@ rumpcomp_ugenhc_ioctl(int fd, u_long cmd return rv; } +#endif
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Mon Apr 29 19:52:35 UTC 2013 Modified Files: src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: g/c unused To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpvfs/rumpblk.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/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.52 src/sys/rump/librump/rumpvfs/rumpblk.c:1.53 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.52 Mon Apr 29 17:31:05 2013 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 29 19:52:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.52 2013/04/29 17:31:05 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.53 2013/04/29 19:52:35 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.52 2013/04/29 17:31:05 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.53 2013/04/29 19:52:35 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -161,7 +161,7 @@ rumpblk_init(void) char buf[64]; devmajor_t rumpblkmaj = RUMPBLK_DEVMAJOR; unsigned tmp; - int error, i; + int i; mutex_init(rumpblk_lock, MUTEX_DEFAULT, IPL_NONE);
CVS commit: src
Module Name:src Committed By: pooka Date: Mon Apr 29 20:08:49 UTC 2013 Modified Files: src/lib/librumpuser: rumpuser.c src/sys/rump/dev/lib/libugenhc: ugenhc.c src/sys/rump/fs/lib/libsyspuffs: puffs_rumpglue.c src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpvfs: rumpfs.c src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Reduce hypercalls related to reading to essentially an amalgamation of readv and preadv. ditto for writing. Hypercalls are so seldomly used that it doesn't justify 3x the calls for syntactic sugar. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.13 -r1.14 src/sys/rump/dev/lib/libugenhc/ugenhc.c cvs rdiff -u -r1.11 -r1.12 src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c cvs rdiff -u -r1.96 -r1.97 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.112 -r1.113 src/sys/rump/librump/rumpvfs/rumpfs.c cvs rdiff -u -r1.51 -r1.52 src/sys/rump/net/lib/libshmif/if_shmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.43 src/lib/librumpuser/rumpuser.c:1.44 --- src/lib/librumpuser/rumpuser.c:1.43 Mon Apr 29 17:31:05 2013 +++ src/lib/librumpuser/rumpuser.c Mon Apr 29 20:08:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.43 2013/04/29 17:31:05 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.44 2013/04/29 20:08:48 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.43 2013/04/29 17:31:05 pooka Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.44 2013/04/29 20:08:48 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -319,104 +319,43 @@ rumpuser_close(int fd, int *error) return 0; } +/* + * Assume struct rumpuser_iovec and struct iovec are the same. + * If you encounter POSIX platforms where they aren't, add some + * translation for iovlen 1. + */ ssize_t -rumpuser_read(int fd, void *data, size_t size, int *error) -{ - ssize_t rv; - - KLOCK_WRAP(rv = read(fd, data, size)); - if (rv == -1) - seterror(errno); - - return rv; -} - -ssize_t -rumpuser_pread(int fd, void *data, size_t size, off_t offset, int *error) -{ - ssize_t rv; - - KLOCK_WRAP(rv = pread(fd, data, size, offset)); - if (rv == -1) - seterror(errno); - - return rv; -} - -ssize_t -rumpuser_write(int fd, const void *data, size_t size, int *error) -{ - ssize_t rv; - - KLOCK_WRAP(rv = write(fd, data, size)); - if (rv == -1) - seterror(errno); - - return rv; -} - -ssize_t -rumpuser_pwrite(int fd, const void *data, size_t size, off_t offset, int *error) -{ - ssize_t rv; - - KLOCK_WRAP(rv = pwrite(fd, data, size, offset)); - if (rv == -1) - seterror(errno); - - return rv; -} - -ssize_t -rumpuser_readv(int fd, const struct rumpuser_iovec *riov, int iovcnt, - int *error) +rumpuser_iovread(int fd, struct rumpuser_iovec *ruiov, size_t iovlen, + off_t off, int *error) { - struct iovec *iovp; + struct iovec *iov = (struct iovec *)ruiov; ssize_t rv; - int i; - iovp = malloc(iovcnt * sizeof(struct iovec)); - if (iovp == NULL) { - seterror(ENOMEM); - return -1; - } - for (i = 0; i iovcnt; i++) { - iovp[i].iov_base = riov[i].iov_base; - /*LINTED*/ - iovp[i].iov_len = riov[i].iov_len; - } + if (off == RUMPUSER_IOV_NOSEEK) + KLOCK_WRAP(rv = readv(fd, iov, iovlen)); + else + KLOCK_WRAP(rv = preadv(fd, iov, iovlen, off)); - KLOCK_WRAP(rv = readv(fd, iovp, iovcnt)); if (rv == -1) seterror(errno); - free(iovp); return rv; } ssize_t -rumpuser_writev(int fd, const struct rumpuser_iovec *riov, int iovcnt, - int *error) +rumpuser_iovwrite(int fd, const struct rumpuser_iovec *ruiov, size_t iovlen, + off_t off, int *error) { - struct iovec *iovp; + const struct iovec *iov = (const struct iovec *)ruiov; ssize_t rv; - int i; - iovp = malloc(iovcnt * sizeof(struct iovec)); - if (iovp == NULL) { - seterror(ENOMEM); - return -1; - } - for (i = 0; i iovcnt; i++) { - iovp[i].iov_base = riov[i].iov_base; - /*LINTED*/ - iovp[i].iov_len = riov[i].iov_len; - } + if (off == RUMPUSER_IOV_NOSEEK) + KLOCK_WRAP(rv = writev(fd, iov, iovlen)); + else + KLOCK_WRAP(rv = pwritev(fd, iov, iovlen, off)); - KLOCK_WRAP(rv = writev(fd, iovp, iovcnt)); if (rv == -1) seterror(errno); - free(iovp); return rv; } Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.13 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.14 --- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.13 Sun Apr 28 09:58:11 2013 +++ src/sys/rump/dev/lib/libugenhc/ugenhc.c Mon Apr 29 20:08:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ugenhc.c,v 1.13 2013/04/28 09:58:11 pooka Exp $ */ +/* $NetBSD: ugenhc.c,v 1.14 2013/04/29 20:08:48 pooka Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: christos Date: Mon Apr 29 21:21:11 UTC 2013 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Set the raidid and the softc together in both places where we initialize raidPtr. To generate a diff of this commit: cvs rdiff -u -r1.301 -r1.302 src/sys/dev/raidframe/rf_netbsdkintf.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/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.301 src/sys/dev/raidframe/rf_netbsdkintf.c:1.302 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.301 Sat Apr 27 23:12:37 2013 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Mon Apr 29 17:21:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.301 2013/04/28 03:12:37 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.302 2013/04/29 21:21:10 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.301 2013/04/28 03:12:37 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.302 2013/04/29 21:21:10 christos Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -329,7 +329,6 @@ raidcreate(int unit) { return NULL; } sc-sc_unit = unit; - sc-sc_r.softc = sc; bufq_alloc(sc-buf_queue, BUFQ_DISK_DEFAULT_STRAT, BUFQ_SORT_RAWBLOCK); return sc; } @@ -1168,6 +1167,7 @@ raidioctl(dev_t dev, u_long cmd, void *d * reconfiguration */ memset(raidPtr, 0, sizeof(*raidPtr)); + raidPtr-softc = rs; raidPtr-raidid = unit; retcode = rf_Configure(raidPtr, k_cfg, NULL); @@ -3735,6 +3735,7 @@ rf_auto_config_set(RF_ConfigSet_t *cset) raidPtr = sc-sc_r; /* XXX all this stuff should be done SOMEWHERE ELSE! */ + raidPtr-softc = sc; raidPtr-raidid = raidID; raidPtr-openings = RAIDOUTSTANDING;
CVS commit: [netbsd-6] src/lib/libc/thread-stub
Module Name:src Committed By: riz Date: Mon Apr 29 23:35:31 UTC 2013 Modified Files: src/lib/libc/thread-stub [netbsd-6]: thread-stub.c Log Message: Pull up following revision(s) (requested by joerg in ticket #869): Needed to fix build on alpha: lib/libc/thread-stub/thread-stub.c: revision 1.25 Weak alias directly to the catchall stub and don't strong alias twice. To generate a diff of this commit: cvs rdiff -u -r1.22.4.1 -r1.22.4.2 src/lib/libc/thread-stub/thread-stub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/thread-stub/thread-stub.c diff -u src/lib/libc/thread-stub/thread-stub.c:1.22.4.1 src/lib/libc/thread-stub/thread-stub.c:1.22.4.2 --- src/lib/libc/thread-stub/thread-stub.c:1.22.4.1 Mon Apr 29 01:50:20 2013 +++ src/lib/libc/thread-stub/thread-stub.c Mon Apr 29 23:35:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: thread-stub.c,v 1.22.4.1 2013/04/29 01:50:20 riz Exp $ */ +/* $NetBSD: thread-stub.c,v 1.22.4.2 2013/04/29 23:35:31 riz Exp $ */ /*- * Copyright (c) 2003, 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: thread-stub.c,v 1.22.4.1 2013/04/29 01:50:20 riz Exp $); +__RCSID($NetBSD: thread-stub.c,v 1.22.4.2 2013/04/29 23:35:31 riz Exp $); #endif /* LIBC_SCCS and not lint */ /* @@ -155,13 +155,12 @@ int __libc_cond_catchall_stub(cond_t *); __weak_alias(__libc_cond_init,__libc_cond_init_stub) __weak_alias(__libc_cond_signal,__libc_cond_catchall_stub) __weak_alias(__libc_cond_broadcast,__libc_cond_catchall_stub) -__weak_alias(__libc_cond_wait,__libc_cond_wait_stub) +__weak_alias(__libc_cond_wait,__libc_cond_catchall_stub) __weak_alias(__libc_cond_timedwait,__libc_cond_timedwait_stub) __weak_alias(__libc_cond_destroy,__libc_cond_catchall_stub) __strong_alias(__libc_cond_signal_stub,__libc_cond_catchall_stub) __strong_alias(__libc_cond_broadcast_stub,__libc_cond_catchall_stub) -__strong_alias(__libc_cond_wait_stub,__libc_cond_catchall_stub) __strong_alias(__libc_cond_destroy_stub,__libc_cond_catchall_stub) int
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Mon Apr 29 23:36:10 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: Update ticket 869. To generate a diff of this commit: cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-6.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1 diff -u src/doc/CHANGES-6.1:1.1.2.124 src/doc/CHANGES-6.1:1.1.2.125 --- src/doc/CHANGES-6.1:1.1.2.124 Mon Apr 29 03:32:43 2013 +++ src/doc/CHANGES-6.1 Mon Apr 29 23:36:10 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.124 2013/04/29 03:32:43 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.125 2013/04/29 23:36:10 riz Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -8917,7 +8917,7 @@ lib/libpthread/shlib_version patch [christos, ticket #863] lib/libc/include/reentrant.h 1.16 via patch -lib/libc/thread-stub/thread-stub.c 1.23 via patch +lib/libc/thread-stub/thread-stub.c 1.23,1.25 via patch lib/libpthread/Makefile1.80 via patch lib/libpthread/pthread.c 1.143 via patch lib/libpthread/pthread_cancelstub.c 1.38 via patch
CVS commit: src/sys/rump/net/lib/libsockin
Module Name:src Committed By: pooka Date: Tue Apr 30 00:12:36 UTC 2013 Modified Files: src/sys/rump/net/lib/libsockin: sockin.c Log Message: few more conversions To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/rump/net/lib/libsockin/sockin.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/sockin.c diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.29 src/sys/rump/net/lib/libsockin/sockin.c:1.30 --- src/sys/rump/net/lib/libsockin/sockin.c:1.29 Tue Apr 30 00:03:54 2013 +++ src/sys/rump/net/lib/libsockin/sockin.c Tue Apr 30 00:12:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sockin.c,v 1.29 2013/04/30 00:03:54 pooka Exp $ */ +/* $NetBSD: sockin.c,v 1.30 2013/04/30 00:12:35 pooka Exp $ */ /* * Copyright (c) 2008, 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sockin.c,v 1.29 2013/04/30 00:03:54 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: sockin.c,v 1.30 2013/04/30 00:12:35 pooka Exp $); #include sys/param.h #include sys/condvar.h @@ -173,8 +173,7 @@ sockin_process(struct socket *so) struct iovec io; struct msghdr rmsg; struct mbuf *m; - ssize_t n; - size_t plen; + size_t n, plen; int error; m = m_gethdr(M_WAIT, MT_DATA); @@ -198,8 +197,8 @@ sockin_process(struct socket *so) rmsg.msg_name = (struct sockaddr *)from; rmsg.msg_namelen = sizeof(from); - n = rumpcomp_sockin_recvmsg(SO2S(so), rmsg, 0, error); - if (n = 0) { + error = rumpcomp_sockin_recvmsg(SO2S(so), rmsg, 0, n); + if (error) { m_freem(m); /* Treat a TCP socket a goner */ @@ -371,9 +370,9 @@ sockin_usrreq(struct socket *so, int req break; } - news = rumpcomp_sockin_socket(PF_INET, so-so_proto-pr_type, - 0, error); - if (news == -1) + error = rumpcomp_sockin_socket(PF_INET, so-so_proto-pr_type, + 0, news); + if (error) break; /* for UDP sockets, make sure we can sendrecv max */ @@ -422,7 +421,7 @@ sockin_usrreq(struct socket *so, int req size_t iov_max, i; struct iovec iov_buf[32], *iov; struct mbuf *m2; - size_t tot; + size_t tot, n; int s; bpf_mtap_af(sockin_if, AF_UNSPEC, m); @@ -457,7 +456,7 @@ sockin_usrreq(struct socket *so, int req mhdr.msg_namelen = saddr-sa_len; } - rumpcomp_sockin_sendmsg(s, mhdr, 0, error); + rumpcomp_sockin_sendmsg(s, mhdr, 0, n); if (iov != iov_buf) kmem_free(iov, sizeof(struct iovec) * iov_max);
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: matt Date: Tue Apr 30 00:17:25 UTC 2013 Modified Files: src/sys/arch/arm/omap: omap2_reg.h Log Message: Add TI_AM335x EMIF SDRAM_CONFIG definitions To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/omap/omap2_reg.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/arch/arm/omap/omap2_reg.h diff -u src/sys/arch/arm/omap/omap2_reg.h:1.16 src/sys/arch/arm/omap/omap2_reg.h:1.17 --- src/sys/arch/arm/omap/omap2_reg.h:1.16 Tue Jan 8 19:03:16 2013 +++ src/sys/arch/arm/omap/omap2_reg.h Tue Apr 30 00:17:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_reg.h,v 1.16 2013/01/08 19:03:16 macallan Exp $ */ +/* $NetBSD: omap2_reg.h,v 1.17 2013/04/30 00:17:24 matt Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -98,6 +98,9 @@ #define TI_AM335X_L4_FAST_BASE 0x4A00 #define TI_AM335X_L4_FAST_SIZE 0x0100 /* 16MB */ +#define TI_AM335X_L4_EMIF_BASE 0x4C00 +#define TI_AM335X_L4_EMIF_SIZE 0x0100 /* 16MB */ + /* TI Sitara DM37xx (OMAP like) */ #define TI_DM37XX_L4_CORE_BASE 0x4800 @@ -735,5 +738,15 @@ */ #define OMAP3530_SDMA_BASE 0x48056000 #define OMAP3530_SDMA_SIZE 0x1000 /* 4KB */ + +#ifdef TI_AM335X +#define TI_AM335X_EMIF0_BASE 0x4c00 +#define TI_AM335X_EMIF0_SIZE 0x0010 +#define EMIF_SDRAM_CONFIG 8 +#define SDRAM_CONFIG_WIDTH __BITS(15,14) +#define SDRAM_CONFIG_RSIZE __BITS(9,7) +#define SDRAM_CONFIG_IBANK __BITS(6,4) +#define SDRAM_CONFIG_PAGESIZE __BITS(2,0) +#endif #endif /* _ARM_OMAP_OMAP2_REG_H_ */
CVS commit: src/sys/arch/evbarm/beagle
Module Name:src Committed By: matt Date: Tue Apr 30 00:18:02 UTC 2013 Modified Files: src/sys/arch/evbarm/beagle: beagle.h beagle_machdep.c beagle_start.S Log Message: Map EMIF0 for TIAM335X and use to probe memory size. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/beagle/beagle.h cvs rdiff -u -r1.38 -r1.39 src/sys/arch/evbarm/beagle/beagle_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/beagle/beagle_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/beagle/beagle.h diff -u src/sys/arch/evbarm/beagle/beagle.h:1.9 src/sys/arch/evbarm/beagle/beagle.h:1.10 --- src/sys/arch/evbarm/beagle/beagle.h:1.9 Thu Dec 13 01:16:39 2012 +++ src/sys/arch/evbarm/beagle/beagle.h Tue Apr 30 00:18:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: beagle.h,v 1.9 2012/12/13 01:16:39 matt Exp $ */ +/* $NetBSD: beagle.h,v 1.10 2013/04/30 00:18:01 matt Exp $ */ /* * Copyright (c) 2007 Microsoft * All rights reserved. @@ -80,6 +80,8 @@ #define OMAP_L4_PERIPHERAL_SIZE TI_AM335X_L4_PERIPHERAL_SIZE #define OMAP_L4_FAST_BASE TI_AM335X_L4_FAST_BASE #define OMAP_L4_FAST_SIZE TI_AM335X_L4_FAST_SIZE +#define OMAP_EMIF_BASE TI_AM335X_EMIF0_BASE +#define OMAP_EMIF_SIZE TI_AM335X_EMIF0_SIZE #endif #ifdef TI_DM37XX @@ -112,7 +114,8 @@ #define OMAP_L4_CORE_VBASE OMAP_KERNEL_IO_VBASE #define OMAP_L4_PERIPHERAL_VBASE (OMAP_L4_CORE_VBASE + OMAP_L4_CORE_SIZE) #define OMAP_L4_FAST_VBASE (OMAP_L4_PERIPHERAL_VBASE + OMAP_L4_PERIPHERAL_SIZE) -#define OMAP_KERNEL_IO_VEND (OMAP_L4_FAST_VBASE + OMAP_L4_FAST_SIZE) +#define OMAP_EMIF_VBASE (OMAP_L4_FAST_VBASE + OMAP_L4_FAST_SIZE) +#define OMAP_KERNEL_IO_VEND (OMAP_EMIF_VBASE + OMAP_EMIF_SIZE) #define CONSADDR_VA ((CONSADDR - OMAP_L4_CORE_BASE) + OMAP_L4_CORE_VBASE) #elif defined(TI_DM37XX) #define OMAP_L4_CORE_VBASE OMAP_KERNEL_IO_VBASE Index: src/sys/arch/evbarm/beagle/beagle_machdep.c diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.38 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.39 --- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.38 Mon Apr 15 18:56:38 2013 +++ src/sys/arch/evbarm/beagle/beagle_machdep.c Tue Apr 30 00:18:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: beagle_machdep.c,v 1.38 2013/04/15 18:56:38 bouyer Exp $ */ +/* $NetBSD: beagle_machdep.c,v 1.39 2013/04/30 00:18:01 matt Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.38 2013/04/15 18:56:38 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.39 2013/04/30 00:18:01 matt Exp $); #include opt_machdep.h #include opt_ddb.h @@ -234,6 +234,7 @@ static void omap4_cpu_clk(void); #endif #if defined(TI_AM335X) static void am335x_cpu_clk(void); +static psize_t am335x_memprobe(void); #endif #if defined(OMAP_3430) || defined(OMAP_3530) @@ -316,6 +317,18 @@ static const struct pmap_devmap devmap[] .pd_cache = PTE_NOCACHE }, #endif +#ifdef OMAP_EMIF_BASE + { + /* + * Map all of the L4 EMIF area + */ + .pd_va = _A(OMAP_EMIF_VBASE), + .pd_pa = _A(OMAP_EMIF_BASE), + .pd_size = _S(OMAP_EMIF_SIZE), + .pd_prot = VM_PROT_READ|VM_PROT_WRITE, + .pd_cache = PTE_NOCACHE + }, +#endif #ifdef OMAP_L4_ABE_BASE { /* @@ -461,6 +474,9 @@ initarm(void *arg) #if defined(OMAP_3430) || defined(OMAP_3530) ram_size = omap3530_memprobe(); #endif +#if defined(TI_AM335X) + ram_size = am335x_memprobe(); +#endif /* * If MEMSIZE specified less than what we really have, limit ourselves * to that. @@ -689,6 +705,19 @@ am335x_cpu_clk(void) __func__, curcpu()-ci_data.cpu_cc_freq, sys_clk, m, n, n+1, m2); } + +static psize_t +am335x_memprobe(void) +{ + const vaddr_t emif_base = OMAP_EMIF_VBASE; + const uint32_t sdram_config = *(const volatile uint32_t *)(emif_base + EMIF_SDRAM_CONFIG); + const u_int ibank = __SHIFTOUT(sdram_config, SDRAM_CONFIG_IBANK); + const u_int rsize = 9 + __SHIFTOUT(sdram_config, SDRAM_CONFIG_RSIZE); + const u_int pagesize = 8 + __SHIFTOUT(sdram_config, SDRAM_CONFIG_PAGESIZE); + const u_int width = 2 - __SHIFTOUT(sdram_config, SDRAM_CONFIG_WIDTH); + printf(sdram_config = %#x\n, sdram_config); + return 1L (ibank + rsize + pagesize + width); +} #endif #if defined(OMAP_3430) || defined(OMAP_3530) Index: src/sys/arch/evbarm/beagle/beagle_start.S diff -u src/sys/arch/evbarm/beagle/beagle_start.S:1.12 src/sys/arch/evbarm/beagle/beagle_start.S:1.13 --- src/sys/arch/evbarm/beagle/beagle_start.S:1.12 Thu Dec 13 01:16:39 2012 +++ src/sys/arch/evbarm/beagle/beagle_start.S Tue Apr 30 00:18:02 2013 @@ -98,7 +98,7 @@ #define INIT_MEMSIZE 128 #endif -RCSID($NetBSD: beagle_start.S,v 1.12 2012/12/13 01:16:39 matt Exp $) +RCSID($NetBSD: beagle_start.S,v 1.13 2013/04/30 00:18:02 matt Exp $) #define Invalidate_I_cache(reg) \ mcr p15, 0, reg, c7, c5, 0 /* Invalidate Entire
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: matt Date: Tue Apr 30 00:26:19 UTC 2013 Modified Files: src/sys/arch/evbarm/conf: BEAGLEBONE Log Message: comment out MEMSIZE (now that we probe memory size) Add second sdhc controller for beaglebone black To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/BEAGLEBONE Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/BEAGLEBONE diff -u src/sys/arch/evbarm/conf/BEAGLEBONE:1.11 src/sys/arch/evbarm/conf/BEAGLEBONE:1.12 --- src/sys/arch/evbarm/conf/BEAGLEBONE:1.11 Thu Apr 25 20:56:20 2013 +++ src/sys/arch/evbarm/conf/BEAGLEBONE Tue Apr 30 00:26:19 2013 @@ -1,5 +1,5 @@ # -# $NetBSD: BEAGLEBONE,v 1.11 2013/04/25 20:56:20 rkujawa Exp $ +# $NetBSD: BEAGLEBONE,v 1.12 2013/04/30 00:26:19 matt Exp $ # # BEAGLEBONE -- TI AM335x board Kernel # @@ -169,7 +169,7 @@ mainbus0 at root cpu0 at mainbus? # Specify the memory size in megabytes. -options MEMSIZE=256 +#options MEMSIZE=256 # L3 Interconnect #L3i0 at mainbus? @@ -199,7 +199,7 @@ sitaracm0 at obio0 addr 0x44e1 size # from other omap3. (What about omap4?) Need to adapt the omap sdhc # driver to handle this. sdhc0 at obio0 addr 0x48060100 size 0x0f00 intr 64 -#sdhc1 at obio0 addr 0x481d8100 size 0x0f00 intr 28 +sdhc1 at obio0 addr 0x481d8100 size 0x0f00 intr 28 # BB Black #sdhc2 at obio0 addr 0x47810100 size 0xff00 intr 29 sdmmc* at sdhc? # SD/MMC bus ld* at sdmmc?
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Tue Apr 30 00:29:19 UTC 2013 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: add missing demogorgon To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 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.142 src/sys/rump/librump/rumpkern/vm.c:1.143 --- src/sys/rump/librump/rumpkern/vm.c:1.142 Tue Apr 30 00:03:53 2013 +++ src/sys/rump/librump/rumpkern/vm.c Tue Apr 30 00:29:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.142 2013/04/30 00:03:53 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.143 2013/04/30 00:29:19 pooka Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.142 2013/04/30 00:03:53 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.143 2013/04/30 00:29:19 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -421,7 +421,7 @@ uvm_mmap(struct vm_map *map, vaddr_t *ad panic(uvm_mmap() variant unsupported); if (RUMP_LOCALPROC_P(curproc)) { - error = rumpuser_anonmmap(NULL, size, 0, 0, uaddr); + error = rumpuser_anonmmap(NULL, size, 0, 0, uaddr); } else { error = rumpuser_sp_anonmmap(curproc-p_vmspace-vm_map.pmap, size, uaddr);
CVS commit: src/external/bsd/atf/dist/atf-c++/detail
Module Name:src Committed By: joerg Date: Tue Apr 30 00:31:56 UTC 2013 Modified Files: src/external/bsd/atf/dist/atf-c++/detail: parser.hpp Log Message: It is unclear whether cin is guaranteed to buffer the last input character of a get() for ungetch() to work. Prefer putback() to make it work with current implementations of cin in libc++. Tracked as http://llvm.org/bugs/show_bug.cgi?id=15867 with test case. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/atf/dist/atf-c++/detail/parser.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-c++/detail/parser.hpp diff -u src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.1.1.2 src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.2 --- src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.1.1.2 Mon Jan 16 22:36:46 2012 +++ src/external/bsd/atf/dist/atf-c++/detail/parser.hpp Tue Apr 30 00:31:56 2013 @@ -259,7 +259,7 @@ tokenizer IS ::next(void) t = token(m_lineno, m_text_type, text); quoted = true; } else { -m_is.unget(); +m_is.putback(ch); done = true; } } else { @@ -271,13 +271,13 @@ tokenizer IS ::next(void) t = token(m_lineno, (*idelim).second, std::string() + ch); else -m_is.unget(); +m_is.putback(ch); } else if (ch == '\n') { done = true; if (text.empty()) t = token(m_lineno, m_nl_type, NEWLINE); else -m_is.unget(); +m_is.putback(ch); } else if (m_skipws (ch == ' ' || ch == '\t')) { if (!text.empty()) done = true;
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Tue Apr 30 00:33:16 UTC 2013 Modified Files: src/sys/rump/net/lib/libshmif: rumpcomp_user.c Log Message: fix non-NetBSD implementation To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/net/lib/libshmif/rumpcomp_user.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/rumpcomp_user.c diff -u src/sys/rump/net/lib/libshmif/rumpcomp_user.c:1.8 src/sys/rump/net/lib/libshmif/rumpcomp_user.c:1.9 --- src/sys/rump/net/lib/libshmif/rumpcomp_user.c:1.8 Tue Apr 30 00:03:54 2013 +++ src/sys/rump/net/lib/libshmif/rumpcomp_user.c Tue Apr 30 00:33:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpcomp_user.c,v 1.8 2013/04/30 00:03:54 pooka Exp $ */ +/* $NetBSD: rumpcomp_user.c,v 1.9 2013/04/30 00:33:16 pooka Exp $ */ /*- * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -167,7 +167,7 @@ rumpcomp_shmif_watchwait(int kq) /* a polling default implementation */ int -rumpcomp_shmif_watchsetup(int inotify, int fd) +rumpcomp_shmif_watchsetup(int *nono, int fd) { static int warned = 0;
CVS commit: src/external/bsd/libc++/lib
Module Name:src Committed By: joerg Date: Tue Apr 30 00:34:16 UTC 2013 Modified Files: src/external/bsd/libc++/lib: Makefile Log Message: Explicitly disable standard C++ include paths to prevent mixing includes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/libc++/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libc++/lib/Makefile diff -u src/external/bsd/libc++/lib/Makefile:1.1 src/external/bsd/libc++/lib/Makefile:1.2 --- src/external/bsd/libc++/lib/Makefile:1.1 Sat Apr 27 23:02:21 2013 +++ src/external/bsd/libc++/lib/Makefile Tue Apr 30 00:34:15 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/04/27 23:02:21 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2013/04/30 00:34:15 joerg Exp $ LIB= c++ WARNS= 4 @@ -29,7 +29,7 @@ CLEANFILES+= rt_${src} .include bsd.own.mk -CPPFLAGS+= -cxx-isystem ${LIBCXX_SRCDIR}/include -I${LIBCXXRT_SRCDIR}/src +CPPFLAGS+= -nostdinc++ -cxx-isystem ${LIBCXX_SRCDIR}/include -I${LIBCXXRT_SRCDIR}/src CPPFLAGS+= -DLIBCXXRT CXXFLAGS+= ${${ACTIVE_CC} == clang:? -std=c++11 : -std=c++0x}
CVS commit: src/sys/sys
Module Name:src Committed By: joerg Date: Tue Apr 30 00:42:32 UTC 2013 Modified Files: src/sys/sys: ctype_bits.h Log Message: Allow use from C++. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/sys/ctype_bits.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/sys/ctype_bits.h diff -u src/sys/sys/ctype_bits.h:1.4 src/sys/sys/ctype_bits.h:1.5 --- src/sys/sys/ctype_bits.h:1.4 Mon Apr 15 11:01:40 2013 +++ src/sys/sys/ctype_bits.h Tue Apr 30 00:42:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ctype_bits.h,v 1.4 2013/04/15 11:01:40 joerg Exp $ */ +/* $NetBSD: ctype_bits.h,v 1.5 2013/04/30 00:42:31 joerg Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -55,6 +55,7 @@ #define _CTYPE_T 0x1000 /* Special */ #define _CTYPE_Q 0x2000 /* Phonogram */ +__BEGIN_DECLS extern const unsigned short *_ctype_tab_; extern const short *_tolower_tab_; extern const short *_toupper_tab_; @@ -62,5 +63,6 @@ extern const short *_toupper_tab_; extern const unsigned short _C_ctype_tab_[]; extern const short _C_toupper_tab_[]; extern const short _C_tolower_tab_[]; +__END_DECLS #endif /* !_SYS_CTYPE_BITS_H_ */
CVS commit: src
Module Name:src Committed By: joerg Date: Tue Apr 30 00:45:05 UTC 2013 Modified Files: src/include: locale.h src/lib/libc/include: namespace.h src/lib/libc/locale: Makefile.inc setlocale.c Added Files: src/lib/libc/locale: duplocale.c freelocale.c newlocale.c Log Message: Make that to process PATH_LOCALE the first time _find_category is called. Use this to implement newlocale and provide duplocale/freelocale as well. Based on patches by Takehiko Nozaki with simplications and fix for the init order by myself. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/include/locale.h cvs rdiff -u -r1.165 -r1.166 src/lib/libc/include/namespace.h cvs rdiff -u -r1.61 -r1.62 src/lib/libc/locale/Makefile.inc \ src/lib/libc/locale/setlocale.c cvs rdiff -u -r0 -r1.1 src/lib/libc/locale/duplocale.c \ src/lib/libc/locale/freelocale.c src/lib/libc/locale/newlocale.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/locale.h diff -u src/include/locale.h:1.20 src/include/locale.h:1.21 --- src/include/locale.h:1.20 Sat Apr 27 21:24:27 2013 +++ src/include/locale.h Tue Apr 30 00:45:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: locale.h,v 1.20 2013/04/27 21:24:27 joerg Exp $ */ +/* $NetBSD: locale.h,v 1.21 2013/04/30 00:45:04 joerg Exp $ */ /* * Copyright (c) 1991, 1993 @@ -98,7 +98,17 @@ char *setlocale(int, const char *) __REN typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif +#define LC_ALL_MASK ((int)~0) +#define LC_COLLATE_MASK ((int)(1 LC_COLLATE)) +#define LC_CTYPE_MASK ((int)(1 LC_CTYPE)) +#define LC_MONETARY_MASK ((int)(1 LC_MONETARY)) +#define LC_NUMERIC_MASK ((int)(1 LC_NUMERIC)) +#define LC_TIME_MASK ((int)(1 LC_TIME)) +#define LC_MESSAGES_MASK ((int)(1 LC_MESSAGES)) +locale_t duplocale(locale_t); +void freelocale(locale_t); struct lconv *localeconv_l(locale_t); +locale_t newlocale(int, const char *, locale_t); #endif __END_DECLS Index: src/lib/libc/include/namespace.h diff -u src/lib/libc/include/namespace.h:1.165 src/lib/libc/include/namespace.h:1.166 --- src/lib/libc/include/namespace.h:1.165 Sun Apr 21 17:45:46 2013 +++ src/lib/libc/include/namespace.h Tue Apr 30 00:45:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.165 2013/04/21 17:45:46 joerg Exp $ */ +/* $NetBSD: namespace.h,v 1.166 2013/04/30 00:45:04 joerg Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -243,6 +243,7 @@ #define dn_expand _dn_expand #define dprintf_l _dprintf_l #define drand48 _drand48 +#define duplocale _duplocale #define endfsent _endfsent #define endgrent _endgrent #define endhostent _endhostent @@ -290,6 +291,7 @@ #define freenetconfigent _freenetconfigent #define freeaddrinfo _freeaddrinfo #define freeifaddrs _freeifaddrs +#define freelocale _freelocale #define fscanf_l _fscanf_l #define fstatvfs _fstatvfs #define ftok _ftok @@ -479,6 +481,7 @@ #define nc_perror _nc_perror #define nc_sperror _nc_sperror #define nanosleep _nanosleep +#define newlocale _newlocale #define nice _nice #if 0 #define nlist _nlist Index: src/lib/libc/locale/Makefile.inc diff -u src/lib/libc/locale/Makefile.inc:1.61 src/lib/libc/locale/Makefile.inc:1.62 --- src/lib/libc/locale/Makefile.inc:1.61 Sun Apr 14 23:44:53 2013 +++ src/lib/libc/locale/Makefile.inc Tue Apr 30 00:45:05 2013 @@ -1,13 +1,13 @@ # from: @(#)Makefile.inc 5.1 (Berkeley) 2/18/91 -# $NetBSD: Makefile.inc,v 1.61 2013/04/14 23:44:53 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.62 2013/04/30 00:45:05 joerg Exp $ # locale sources .PATH: ${ARCHDIR}/locale ${.CURDIR}/locale SRCS+= _def_messages.c _def_monetary.c _def_numeric.c _def_time.c \ setlocale.c __mb_cur_max.c \ - current_locale.c c_locale.c global_locale.c fix_grouping.c \ - localeconv.c nl_langinfo.c \ + current_locale.c c_locale.c duplocale.c global_locale.c fix_grouping.c \ + freelocale.c localeconv.c newlocale.c nl_langinfo.c \ generic_lc_all.c dummy_lc_collate.c \ wcstol.c wcstoll.c wcstoimax.c wcstoul.c wcstoull.c wcstoumax.c \ wcstod.c wcstof.c wcstold.c wcscoll.c wcsxfrm.c wcsftime.c Index: src/lib/libc/locale/setlocale.c diff -u src/lib/libc/locale/setlocale.c:1.61 src/lib/libc/locale/setlocale.c:1.62 --- src/lib/libc/locale/setlocale.c:1.61 Sun Apr 14 23:30:16 2013 +++ src/lib/libc/locale/setlocale.c Tue Apr 30 00:45:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: setlocale.c,v 1.61 2013/04/14 23:30:16 joerg Exp $ */ +/* $NetBSD: setlocale.c,v 1.62 2013/04/30 00:45:05 joerg Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -28,7 +28,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: setlocale.c,v 1.61 2013/04/14 23:30:16 joerg Exp $); +__RCSID($NetBSD: setlocale.c,v 1.62 2013/04/30 00:45:05 joerg Exp $); #endif /* LIBC_SCCS and not lint */ #include sys/types.h @@ -56,6 +56,16 @@ static _locale_set_t
CVS commit: src/lib/libexecinfo
Module Name:src Committed By: matt Date: Tue Apr 30 01:41:02 UTC 2013 Modified Files: src/lib/libexecinfo: Makefile Log Message: earm - earm* To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libexecinfo/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libexecinfo/Makefile diff -u src/lib/libexecinfo/Makefile:1.3 src/lib/libexecinfo/Makefile:1.4 --- src/lib/libexecinfo/Makefile:1.3 Sat Apr 27 06:24:23 2013 +++ src/lib/libexecinfo/Makefile Tue Apr 30 01:41:01 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/04/27 06:24:23 matt Exp $ +# $NetBSD: Makefile,v 1.4 2013/04/30 01:41:01 matt Exp $ .include bsd.own.mk @@ -20,7 +20,7 @@ MAN= backtrace.3 .if ${USE_UNWIND} == yes SRCS+=unwind.c -.if !empty(LIBEXECINFO_MACHINE_ARCH:Mearm) +.if !empty(LIBEXECINFO_MACHINE_ARCH:Mearm*) SRCS+=unwind_arm_ehabi_stub.c .endif .else
CVS commit: src/lib/libc
Module Name:src Committed By: matt Date: Tue Apr 30 01:42:04 UTC 2013 Modified Files: src/lib/libc: Makefile src/lib/libc/arch/arm: Makefile.inc src/lib/libc/arch/arm/gen: Makefile.inc src/lib/libc/softfloat: Makefile.inc Log Message: Match against LIBC_MACHINE_ARCH for MKCOMPAT To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/lib/libc/Makefile cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r1.21 -r1.22 src/lib/libc/arch/arm/gen/Makefile.inc cvs rdiff -u -r1.14 -r1.15 src/lib/libc/softfloat/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/lib/libc/Makefile diff -u src/lib/libc/Makefile:1.156 src/lib/libc/Makefile:1.157 --- src/lib/libc/Makefile:1.156 Sat Apr 27 08:00:40 2013 +++ src/lib/libc/Makefile Tue Apr 30 01:42:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.156 2013/04/27 08:00:40 matt Exp $ +# $NetBSD: Makefile,v 1.157 2013/04/30 01:42:03 matt Exp $ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be @@ -19,6 +19,8 @@ .include Makefile.inc +LIBC_MACHINE_ARCH?= ${MACHINE_ARCH} # for MKCOMPAT + LIB= c CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR} Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.20 src/lib/libc/arch/arm/Makefile.inc:1.21 --- src/lib/libc/arch/arm/Makefile.inc:1.20 Sun Feb 3 01:55:19 2013 +++ src/lib/libc/arch/arm/Makefile.inc Tue Apr 30 01:42:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.20 2013/02/03 01:55:19 matt Exp $ +# $NetBSD: Makefile.inc,v 1.21 2013/04/30 01:42:03 matt Exp $ .include bsd.own.mk @@ -6,7 +6,7 @@ SRCS+= __aeabi_read_tp.S __sigaction14_s CPPFLAGS += -I. -.if ${MACHINE_ARCH:Mearm*} != +.if !empty(LIBC_MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c @@ -18,7 +18,7 @@ SRCS+= arm_initfini.c CPPFLAGS += -DSOFTFLOAT # for earm, use the 64-bit softfloat -.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == armeb +.if ${LIBC_MACHINE_ARCH} == arm || ${LIBC_MACHINE_ARCH} == armeb SOFTFLOAT_BITS=32 .endif Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.21 src/lib/libc/arch/arm/gen/Makefile.inc:1.22 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.21 Sat Jan 26 07:09:41 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Tue Apr 30 01:42:04 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.21 2013/01/26 07:09:41 matt Exp $ +# $NetBSD: Makefile.inc,v 1.22 2013/04/30 01:42:04 matt Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ fabs.c flt_rounds.c modsi3.S umodsi3.S divide.S divsi3.S udivsi3.S @@ -11,7 +11,7 @@ SRCS+= isinff_ieee754.c isinfd_ieee754.c SRCS+= isnanf_ieee754.c isnand_ieee754.c SRCS+= signbitf_ieee754.c signbitd_ieee754.c -.if ${MACHINE_ARCH:Mearm*} != +.if !empty(LIBC_MACHINE_ARCH:Mearm*) SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c .endif Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.14 src/lib/libc/softfloat/Makefile.inc:1.15 --- src/lib/libc/softfloat/Makefile.inc:1.14 Tue Apr 16 12:26:28 2013 +++ src/lib/libc/softfloat/Makefile.inc Tue Apr 30 01:42:04 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2013/04/16 12:26:28 matt Exp $ +# $NetBSD: Makefile.inc,v 1.15 2013/04/30 01:42:04 matt Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -12,7 +12,7 @@ SRCS.softfloat= softfloat.c SRCS.softfloat+=fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \ fpgetsticky.c fpsetsticky.c -.if ${MACHINE_ARCH:Mearm*} != +.if !empty(LIBC_MACHINE_ARCH:Mearm*) SRCS.softfloat+=__aeabi_dcmpeq.c __aeabi_fcmpeq.c SRCS.softfloat+=__aeabi_dcmpge.c __aeabi_fcmpge.c SRCS.softfloat+=__aeabi_dcmpgt.c __aeabi_fcmpgt.c
CVS commit: src/lib/libc/quad
Module Name:src Committed By: matt Date: Tue Apr 30 01:43:02 UTC 2013 Modified Files: src/lib/libc/quad: Makefile.inc Log Message: ARM EABI needs left shift logical too. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/quad/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/lib/libc/quad/Makefile.inc diff -u src/lib/libc/quad/Makefile.inc:1.15 src/lib/libc/quad/Makefile.inc:1.16 --- src/lib/libc/quad/Makefile.inc:1.15 Sun Feb 3 01:48:53 2013 +++ src/lib/libc/quad/Makefile.inc Tue Apr 30 01:43:01 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.15 2013/02/03 01:48:53 matt Exp $ +# $NetBSD: Makefile.inc,v 1.16 2013/04/30 01:43:01 matt Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # Quad support @@ -17,8 +17,8 @@ SRCS.quad+= udivdi3.c umoddi3.c SRCS.quad+= ashldi3.S ashrdi3.S lshrdi3.S .elif (${MACHINE_ARCH} == m68000) SRCS.quad+= ashldi3.S lshrdi3.S -.elif (${MACHINE_ARCH:Mearm*} != ) -SRCS.quad+= ashrdi3.c lshldi3.c lshrdi3.c +.elif (!empty{LIBC_MACHINE_ARCH:Mearm*}) +SRCS.quad+= ashldi3.c ashrdi3.c lshrdi3.c lshldi3.c .else SRCS.quad+= ashldi3.c ashrdi3.c lshrdi3.c .endif
CVS commit: src/lib/libc/gen
Module Name:src Committed By: matt Date: Tue Apr 30 01:44:07 UTC 2013 Modified Files: src/lib/libc/gen: fixunsdfsi_ieee754.c fixunssfsi_ieee754.c Log Message: Include softfloat-for-gcc.h for __ARM_EABI__ to get aeabi aliases. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/fixunsdfsi_ieee754.c \ src/lib/libc/gen/fixunssfsi_ieee754.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/fixunsdfsi_ieee754.c diff -u src/lib/libc/gen/fixunsdfsi_ieee754.c:1.2 src/lib/libc/gen/fixunsdfsi_ieee754.c:1.3 --- src/lib/libc/gen/fixunsdfsi_ieee754.c:1.2 Sun Aug 5 04:28:58 2012 +++ src/lib/libc/gen/fixunsdfsi_ieee754.c Tue Apr 30 01:44:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fixunsdfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $ */ +/* $NetBSD: fixunsdfsi_ieee754.c,v 1.3 2013/04/30 01:44:07 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: fixunsdfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $); +__RCSID($NetBSD: fixunsdfsi_ieee754.c,v 1.3 2013/04/30 01:44:07 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include stdbool.h @@ -39,7 +39,7 @@ __RCSID($NetBSD: fixunsdfsi_ieee754.c,v #include float.h #include machine/ieee.h -#ifdef SOFTFLOAT +#if defined(SOFTFLOAT) || defined(__ARM_EABI__) #include softfloat/softfloat-for-gcc.h #endif Index: src/lib/libc/gen/fixunssfsi_ieee754.c diff -u src/lib/libc/gen/fixunssfsi_ieee754.c:1.2 src/lib/libc/gen/fixunssfsi_ieee754.c:1.3 --- src/lib/libc/gen/fixunssfsi_ieee754.c:1.2 Sun Aug 5 04:28:58 2012 +++ src/lib/libc/gen/fixunssfsi_ieee754.c Tue Apr 30 01:44:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fixunssfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $ */ +/* $NetBSD: fixunssfsi_ieee754.c,v 1.3 2013/04/30 01:44:07 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: fixunssfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $); +__RCSID($NetBSD: fixunssfsi_ieee754.c,v 1.3 2013/04/30 01:44:07 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include stdbool.h @@ -39,7 +39,7 @@ __RCSID($NetBSD: fixunssfsi_ieee754.c,v #include float.h #include machine/ieee.h -#ifdef SOFTFLOAT +#if defined(SOFTFLOAT) || defined(__ARM_EABI__) #include softfloat/softfloat-for-gcc.h #endif
CVS commit: src/lib/libm/arch/arm
Module Name:src Committed By: matt Date: Tue Apr 30 01:45:14 UTC 2013 Modified Files: src/lib/libm/arch/arm: fenv.c Log Message: Make this compile for earmhf To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libm/arch/arm/fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/arm/fenv.c diff -u src/lib/libm/arch/arm/fenv.c:1.1 src/lib/libm/arch/arm/fenv.c:1.2 --- src/lib/libm/arch/arm/fenv.c:1.1 Sun Apr 28 21:06:34 2013 +++ src/lib/libm/arch/arm/fenv.c Tue Apr 30 01:45:13 2013 @@ -28,20 +28,20 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: fenv.c,v 1.1 2013/04/28 21:06:34 matt Exp $); +__RCSID($NetBSD: fenv.c,v 1.2 2013/04/30 01:45:13 matt Exp $); #include sys/types.h #include assert.h #include fenv.h #include string.h #include unistd.h +#include inttypes.h #ifdef __SOFTFP__ #include ieeefp.h #include sys/signal.h #include sys/siginfo.h #else -#include inttypes.h #include arm/armreg.h #endif @@ -56,7 +56,9 @@ const fenv_t __fe_dfl_env = VFP_FPSCR_FZ int feclearexcept(int excepts) { +#ifndef lint _DIAGASSERT((except ~FE_EXCEPT_ALL) == 0); +#endif #ifdef __SOFTFP__ int old = fpresetsticky(excepts); return old ~excepts; @@ -93,7 +95,9 @@ fegetexceptflag(fexcept_t *flagp, int ex int feraiseexcept(int excepts) { +#ifndef lint _DIAGASSERT((except ~FE_EXCEPT_ALL) == 0); +#endif #ifdef __SOFTFP__ excepts = fpgetsticky(); @@ -116,7 +120,7 @@ feraiseexcept(int excepts) sigqueueinfo(getpid(), info); } #else - uint32_t fpscr = armreg_fpscr_read(); + int fpscr = armreg_fpscr_read(); fpscr = (fpscr ~VFP_FPSCR_ESUM) | __SHIFTIN(excepts, VFP_FPSCR_ESUM); armreg_fpscr_write(fpscr); #endif @@ -135,7 +139,9 @@ feraiseexcept(int excepts) int fesetexceptflag(const fexcept_t *flagp, int excepts) { +#ifndef lint _DIAGASSERT((except ~FE_EXCEPT_ALL) == 0); +#endif #ifdef __SOFTFP__ fpsetsticky((fpgetsticky() ~excepts) | (excepts *flagp)); #else @@ -184,7 +190,9 @@ fegetround(void) int fesetround(int round) { +#ifndef lint _DIAGASSERT(!(round ~__SHIFTOUT(VFP_FPSCR_RMODE, VFP_FPSCR_RMODE))); +#endif #ifdef __SOFTFP__ (void)fpsetround(round); #else @@ -262,8 +270,9 @@ fesetenv(const fenv_t *envp) int feupdateenv(const fenv_t *envp) { +#ifndef lint _DIAGASSERT(envp != NULL); - +#endif #ifdef __SOFTFP__ (void)fpsetround(__SHIFTIN(*envp, VFP_FPSCR_RMODE)); (void)fpsetmask(fpgetmask() | __SHIFTOUT(*envp, VFP_FPSCR_ESUM));
CVS commit: src/external/gpl3/gcc/lib/libgcc/libgcc
Module Name:src Committed By: matt Date: Tue Apr 30 02:28:16 UTC 2013 Modified Files: src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile Log Message: Use !empty(LIBGCC_MACHINE_ARCH:Mearm*) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile diff -u src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.12 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.13 --- src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.12 Thu Feb 14 15:42:31 2013 +++ src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile Tue Apr 30 02:28:16 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2013/02/14 15:42:31 matt Exp $ +# $NetBSD: Makefile,v 1.13 2013/04/30 02:28:16 matt Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -24,7 +24,7 @@ SRCS+= ${LIB2FUNCS} ${LIB2FUNCS_ST} ${L ${G_LIB2ADD_ST} ${LIB1ASMFUNCS} .if ${MKPIC} == no LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH} -.if ${LIBGCC_MACHINE_ARCH:Mearm*} == +.if empty(LIBGCC_MACHINE_ARCH:Mearm*) SRCS+= ${LIB2_EH} ${LIB2_EHASM} .endif .else
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: matt Date: Tue Apr 30 05:37:51 UTC 2013 Modified Files: src/sys/arch/arm/omap: omap2_reg.h Log Message: Add minimal definition for control module control status register to obtain the base frequency used for the system clock. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/omap/omap2_reg.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/arch/arm/omap/omap2_reg.h diff -u src/sys/arch/arm/omap/omap2_reg.h:1.17 src/sys/arch/arm/omap/omap2_reg.h:1.18 --- src/sys/arch/arm/omap/omap2_reg.h:1.17 Tue Apr 30 00:17:24 2013 +++ src/sys/arch/arm/omap/omap2_reg.h Tue Apr 30 05:37:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_reg.h,v 1.17 2013/04/30 00:17:24 matt Exp $ */ +/* $NetBSD: omap2_reg.h,v 1.18 2013/04/30 05:37:51 matt Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -740,13 +740,17 @@ #define OMAP3530_SDMA_SIZE 0x1000 /* 4KB */ #ifdef TI_AM335X -#define TI_AM335X_EMIF0_BASE 0x4c00 -#define TI_AM335X_EMIF0_SIZE 0x0010 -#define EMIF_SDRAM_CONFIG 8 -#define SDRAM_CONFIG_WIDTH __BITS(15,14) -#define SDRAM_CONFIG_RSIZE __BITS(9,7) -#define SDRAM_CONFIG_IBANK __BITS(6,4) -#define SDRAM_CONFIG_PAGESIZE __BITS(2,0) +#define TI_AM335X_CTLMOD_BASE 0x44e1 +#define CTLMOD_CONTROL_STATUS 0x40 +#define CTLMOD_CONTROL_STATUS_SYSBOOT1 __BITS(23,22) + +#define TI_AM335X_EMIF0_BASE 0x4c00 +#define TI_AM335X_EMIF0_SIZE 0x0010 +#define EMIF_SDRAM_CONFIG 8 +#define SDRAM_CONFIG_WIDTH __BITS(15,14) +#define SDRAM_CONFIG_RSIZE __BITS(9,7) +#define SDRAM_CONFIG_IBANK __BITS(6,4) +#define SDRAM_CONFIG_PAGESIZE __BITS(2,0) #endif #endif /* _ARM_OMAP_OMAP2_REG_H_ */
CVS commit: src/sys/arch/evbarm/beagle
Module Name:src Committed By: matt Date: Tue Apr 30 05:39:45 UTC 2013 Modified Files: src/sys/arch/evbarm/beagle: beagle_machdep.c Log Message: for the TI AM335x, use the control_status register in the control module to obtain the base frequency instead of assuming it's always 24MHz. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/evbarm/beagle/beagle_machdep.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/arch/evbarm/beagle/beagle_machdep.c diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.39 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.40 --- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.39 Tue Apr 30 00:18:01 2013 +++ src/sys/arch/evbarm/beagle/beagle_machdep.c Tue Apr 30 05:39:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: beagle_machdep.c,v 1.39 2013/04/30 00:18:01 matt Exp $ */ +/* $NetBSD: beagle_machdep.c,v 1.40 2013/04/30 05:39:44 matt Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.39 2013/04/30 00:18:01 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.40 2013/04/30 05:39:44 matt Exp $); #include opt_machdep.h #include opt_ddb.h @@ -691,9 +691,14 @@ omap4_cpu_clk(void) void am335x_cpu_clk(void) { + static const uint32_t sys_clks[4] = { + [0] = 1920, [1] = 2400, [2] = 2500, [3] = 2600 + }; const vaddr_t cm_base = OMAP2_CM_BASE - OMAP_L4_CORE_BASE + OMAP_L4_CORE_VBASE; const vaddr_t cm_wkup_base = cm_base + AM335X_PRCM_CM_WKUP; - const uint32_t sys_clk = 2400; + const vaddr_t ctlmod_base = TI_AM335X_CTLMOD_BASE - OMAP_L4_CORE_BASE + OMAP_L4_CORE_VBASE; + const uint32_t control_status = *(const volatile uint32_t *)(ctlmod_base + CTLMOD_CONTROL_STATUS); + const uint32_t sys_clk = sys_clks[__SHIFTOUT(control_status, CTLMOD_CONTROL_STATUS_SYSBOOT1)]; const uint32_t clksel_dpll_mpu = *(volatile uint32_t *)(cm_wkup_base + TI_AM335X_CM_CLKSEL_DPLL_MPU); const uint32_t div_m2_dpll_mpu = *(volatile uint32_t *)(cm_wkup_base + TI_AM335X_CM_DIV_M2_DPLL_MPU); const uint32_t m = __SHIFTOUT(clksel_dpll_mpu, TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_MULT);