CVS commit: src/sys/rump/net/lib/libnetbt
Module Name:src Committed By: joerg Date: Mon Nov 11 00:56:20 UTC 2013 Modified Files: src/sys/rump/net/lib/libnetbt: Makefile Log Message: Fix syntax for undefined HAVE_GCC. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libnetbt/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnetbt/Makefile diff -u src/sys/rump/net/lib/libnetbt/Makefile:1.2 src/sys/rump/net/lib/libnetbt/Makefile:1.3 --- src/sys/rump/net/lib/libnetbt/Makefile:1.2 Thu Nov 7 21:30:58 2013 +++ src/sys/rump/net/lib/libnetbt/Makefile Mon Nov 11 00:56:20 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/11/07 21:30:58 christos Exp $ +# $NetBSD: Makefile,v 1.3 2013/11/11 00:56:20 joerg Exp $ # .include @@ -15,7 +15,7 @@ SRCS= bt_proto.c bt_sysctl.c \ rfcomm_dlc.c rfcomm_session.c rfcomm_socket.c rfcomm_upper.c \ sco_socket.c sco_upper.c -.if ${HAVE_GCC} && ${HAVE_GCC} == 48 +.if ${HAVE_GCC:U} == "48" .if ${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el" COPTS.l2cap_signal.c= -O0 .endif
CVS commit: src/lib/libm/arch
Module Name:src Committed By: joerg Date: Mon Nov 11 00:31:51 UTC 2013 Modified Files: src/lib/libm/arch/i387: fenv.c src/lib/libm/arch/x86_64: fenv.c Log Message: Preserve the initial x87 control word in the global FP environment in preparation for adjusting the default based on the main binary version. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/fenv.c cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/x86_64/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/i387/fenv.c diff -u src/lib/libm/arch/i387/fenv.c:1.5 src/lib/libm/arch/i387/fenv.c:1.6 --- src/lib/libm/arch/i387/fenv.c:1.5 Wed May 29 00:53:19 2013 +++ src/lib/libm/arch/i387/fenv.c Mon Nov 11 00:31:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.c,v 1.5 2013/05/29 00:53:19 riastradh Exp $ */ +/* $NetBSD: fenv.c,v 1.6 2013/11/11 00:31:51 joerg Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: fenv.c,v 1.5 2013/05/29 00:53:19 riastradh Exp $"); +__RCSID("$NetBSD: fenv.c,v 1.6 2013/11/11 00:31:51 joerg Exp $"); #include #include @@ -115,16 +115,20 @@ fenv_t __fe_dfl_env = { */ static int __HAS_SSE = 0; -static void __test_sse(void) __attribute__ ((constructor)); +static void __init_libm(void) __attribute__ ((constructor, used)); -static void __test_sse(void) +static void __init_libm(void) { size_t oldlen = sizeof(__HAS_SSE); int rv; + uint16_t control; rv = sysctlbyname("machdep.sse", &__HAS_SSE, &oldlen, NULL, 0); if (rv == -1) __HAS_SSE = 0; + + __fnstcw(&control); + __fe_dfl_env.x87.control = control; } /* Index: src/lib/libm/arch/x86_64/fenv.c diff -u src/lib/libm/arch/x86_64/fenv.c:1.5 src/lib/libm/arch/x86_64/fenv.c:1.6 --- src/lib/libm/arch/x86_64/fenv.c:1.5 Fri Oct 18 17:03:02 2013 +++ src/lib/libm/arch/x86_64/fenv.c Mon Nov 11 00:31:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.c,v 1.5 2013/10/18 17:03:02 christos Exp $ */ +/* $NetBSD: fenv.c,v 1.6 2013/11/11 00:31:51 joerg Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: fenv.c,v 1.5 2013/10/18 17:03:02 christos Exp $"); +__RCSID("$NetBSD: fenv.c,v 1.6 2013/11/11 00:31:51 joerg Exp $"); #include #include @@ -100,6 +100,16 @@ fenv_t __fe_dfl_env = { }; #define FE_DFL_ENV ((const fenv_t *) &__fe_dfl_env) +static void __init_libm(void) __attribute__ ((constructor, used)); + +static void __init_libm(void) +{ + uint16_t control; + + __fnstcw(&control); + __fe_dfl_env.x87.control = control; +} + /* * The feclearexcept() function clears the supported floating-point exceptions
CVS commit: src/sys/arch/usermode/modules/syscallemu
Module Name:src Committed By: jmcneill Date: Sun Nov 10 22:08:58 UTC 2013 Modified Files: src/sys/arch/usermode/modules/syscallemu: Makefile Log Message: use MACHINE_CPU instead of MACHINE_ARCH To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/modules/syscallemu/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/modules/syscallemu/Makefile diff -u src/sys/arch/usermode/modules/syscallemu/Makefile:1.4 src/sys/arch/usermode/modules/syscallemu/Makefile:1.5 --- src/sys/arch/usermode/modules/syscallemu/Makefile:1.4 Sun Nov 10 19:58:38 2013 +++ src/sys/arch/usermode/modules/syscallemu/Makefile Sun Nov 10 22:08:58 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2013/11/10 19:58:38 jmcneill Exp $ +# $NetBSD: Makefile,v 1.5 2013/11/10 22:08:58 jmcneill Exp $ .include @@ -11,12 +11,12 @@ M?= ${S}/modules KMOD= syscallemu SRCS= syscallemu.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" +.if ${MACHINE_CPU} == "i386" || ${MACHINE_CPU} == "x86_64" SRCS+= syscallemu_x86.c -.elif ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm" +.elif ${MACHINE_CPU} == "arm" SRCS+= syscallemu_arm.c .else -.error ${MACHINE_ARCH} not implemented +.error ${MACHINE_CPU} not implemented .endif .include
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Sun Nov 10 20:59:27 UTC 2013 Modified Files: src/lib/libc: shlib_version Log Message: Sort out relationship with crt0.o on major bump. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/lib/libc/shlib_version 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/shlib_version diff -u src/lib/libc/shlib_version:1.243 src/lib/libc/shlib_version:1.244 --- src/lib/libc/shlib_version:1.243 Thu Oct 24 19:37:35 2013 +++ src/lib/libc/shlib_version Sun Nov 10 20:59:27 2013 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.243 2013/10/24 19:37:35 joerg Exp $ +# $NetBSD: shlib_version,v 1.244 2013/11/10 20:59:27 joerg Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -36,5 +36,6 @@ # - remove ruserok() and friends to libcompat (or entirely) # - remove alloca fallback and expect compiler to provide a builtin version. # - switch to DT_INIT_ARRAY on all platforms +# - consolidate ownership with crt0.o and avoid common symbols major=12 minor=187
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: christos Date: Sun Nov 10 20:18:51 UTC 2013 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: more unused variable fixes To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/arch/pmax/pmax/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/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.246 src/sys/arch/pmax/pmax/machdep.c:1.247 --- src/sys/arch/pmax/pmax/machdep.c:1.246 Sun Nov 10 15:09:52 2013 +++ src/sys/arch/pmax/pmax/machdep.c Sun Nov 10 15:18:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.247 2013/11/10 20:18:51 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2013/11/10 20:18:51 christos Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -134,14 +134,12 @@ void mach_init(int argc, int32_t *argv32, int code, intptr_t cv, u_int bim, char *bip) { char *cp; -/*###137 [cc] error: variable 'bootinfo_msg' set but not used [-Werror=unused-but-set-variable]%%%*/ const char *bootinfo_msg; int i; char *kernend; #if NKSYMS || defined(DDB) || defined(MODULAR) void *ssym = 0; struct btinfo_symtab *bi_syms; - struct exec *aout; /* XXX backwards compatilbity for DDB */ #endif extern char edata[], end[]; /* XXX */ @@ -163,7 +161,9 @@ mach_init(int argc, int32_t *argv32, int /* clear the BSS segment */ #if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); - aout = (struct exec *)edata; +#ifdef EXEC_AOUT + struct exec *aout = (struct exec *)edata; +#endif /* Was it a valid bootinfo symtab info? */ if (bi_syms != NULL) {
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: christos Date: Sun Nov 10 20:09:53 UTC 2013 Modified Files: src/sys/arch/pmax/ibus: pm.c sii.c src/sys/arch/pmax/pmax: machdep.c src/sys/arch/pmax/tc: dtkbd.c ioasic.c Log Message: fix unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/ibus/pm.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/ibus/sii.c cvs rdiff -u -r1.245 -r1.246 src/sys/arch/pmax/pmax/machdep.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/tc/dtkbd.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/pmax/tc/ioasic.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/pmax/ibus/pm.c diff -u src/sys/arch/pmax/ibus/pm.c:1.11 src/sys/arch/pmax/ibus/pm.c:1.12 --- src/sys/arch/pmax/ibus/pm.c:1.11 Wed Jan 11 16:17:33 2012 +++ src/sys/arch/pmax/ibus/pm.c Sun Nov 10 15:09:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.11 2012/01/11 21:17:33 macallan Exp $ */ +/* $NetBSD: pm.c,v 1.12 2013/11/10 20:09:52 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.11 2012/01/11 21:17:33 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.12 2013/11/10 20:09:52 christos Exp $"); #include #include @@ -555,14 +555,12 @@ pm_flush(struct pm_softc *sc) int v, i, x, y; u_short *p, *pe; struct hwcmap256 *cm; - struct rasops_info *ri; if (sc->sc_changed == 0) return (1); vdac = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_VDAC); pcc = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_PCC); - ri = &pm_ri; v = sc->sc_changed; if ((v & WSDISPLAY_CURSOR_DOCUR) != 0) { Index: src/sys/arch/pmax/ibus/sii.c diff -u src/sys/arch/pmax/ibus/sii.c:1.10 src/sys/arch/pmax/ibus/sii.c:1.11 --- src/sys/arch/pmax/ibus/sii.c:1.10 Sat Jul 9 13:32:30 2011 +++ src/sys/arch/pmax/ibus/sii.c Sun Nov 10 15:09:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sii.c,v 1.10 2011/07/09 17:32:30 matt Exp $ */ +/* $NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.10 2011/07/09 17:32:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $"); #include "sii.h" /* @@ -1757,11 +1757,10 @@ sii_CmdDone(struct siisoftc *sc, int tar /* target: which device is done */ /* error: error code if any errors */ { - ScsiCmd *scsicmd; int i; - scsicmd = sc->sc_cmd[target]; #ifdef DIAGNOSTIC + ScsiCmd *scsicmd = sc->sc_cmd[target]; if (target < 0 || !scsicmd) panic("sii_CmdDone"); #endif Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.245 src/sys/arch/pmax/pmax/machdep.c:1.246 --- src/sys/arch/pmax/pmax/machdep.c:1.245 Sat Jul 28 19:08:57 2012 +++ src/sys/arch/pmax/pmax/machdep.c Sun Nov 10 15:09:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.245 2012/07/28 23:08:57 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.245 2012/07/28 23:08:57 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -134,6 +134,7 @@ void mach_init(int argc, int32_t *argv32, int code, intptr_t cv, u_int bim, char *bip) { char *cp; +/*###137 [cc] error: variable 'bootinfo_msg' set but not used [-Werror=unused-but-set-variable]%%%*/ const char *bootinfo_msg; int i; char *kernend; @@ -215,6 +216,8 @@ mach_init(int argc, int32_t *argv32, int #if 0 if (bootinfo_msg != NULL) printf(bootinfo_msg); +#else + __USE(bootinfo_msg); #endif /* * Set the VM page size. Index: src/sys/arch/pmax/tc/dtkbd.c diff -u src/sys/arch/pmax/tc/dtkbd.c:1.10 src/sys/arch/pmax/tc/dtkbd.c:1.11 --- src/sys/arch/pmax/tc/dtkbd.c:1.10 Sat Jul 9 13:32:31 2011 +++ src/sys/arch/pmax/tc/dtkbd.c Sun Nov 10 15:09:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dtkbd.c,v 1.10 2011/07/09 17:32:31 matt Exp $ */ +/* $NetBSD: dtkbd.c,v 1.11 2013/11/10 20:09:53 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtkbd.c,v 1.10 2011/07/09 17:32:31 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtkbd.c,v 1.11 2013/11/10 20:09:53 christos Exp $"); #include "locators.h" @@ -187,9 +187,6 @@ dtkbd_cnpollc(void *v, int on) int dtkbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { - struct dtkbd_softc *sc; - - sc = v; switch (cmd) { case WSKBDIO_GTYPE: Index: src/sys/arch/pmax/tc/ioasic.c diff -u src/sys/arch/pmax/tc/ioasic.c:1.21 src/sys/arch/pmax/tc/ioasic.c:1.22 --- src/sys/arch/pmax/tc/ioasic.c:1.21 Sat Jul 9 13:32:31 2011 +++ src/sys/arch/pmax/tc/ioasic.c Sun Nov 10 15:
CVS commit: src/sys/arch/usermode/target/arm
Module Name:src Committed By: jmcneill Date: Sun Nov 10 20:03:46 UTC 2013 Added Files: src/sys/arch/usermode/target/arm: cpu_arm.c Log Message: usermode arm md stub To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/usermode/target/arm/cpu_arm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/usermode/target/arm/cpu_arm.c diff -u /dev/null src/sys/arch/usermode/target/arm/cpu_arm.c:1.1 --- /dev/null Sun Nov 10 20:03:46 2013 +++ src/sys/arch/usermode/target/arm/cpu_arm.c Sun Nov 10 20:03:46 2013 @@ -0,0 +1,137 @@ +/* $NetBSD: cpu_arm.c,v 1.1 2013/11/10 20:03:46 jmcneill Exp $ */ + +/*- + * Copyright (c) 2011 Reinoud Zandijk + * Copyright (c) 2007, 2013 Jared D. McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Note that this machdep.c uses the `dummy' mcontext_t defined for usermode. + * This is basicly a blob of PAGE_SIZE big. We might want to switch over to + * non-generic mcontext_t's one day, but will this break non-NetBSD hosts? + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: cpu_arm.c,v 1.1 2013/11/10 20:03:46 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "opt_exec.h" + +/* from sys/arch/arm/include/frame.h : KEEP IN SYNC */ +struct sigframe_siginfo { + siginfo_t sf_si; /* actual saved siginfo */ + ucontext_t sf_uc; /* actual saved ucontext */ +}; + +void +sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask) +{ + panic("sendsig_siginfo not implemented"); +} + +void +setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack) +{ + panic("sendsig_siginfo not implemented"); +} + +void +md_syscall_get_syscallnumber(ucontext_t *ucp, uint32_t *code) +{ + panic("md_syscall_get_syscallnumber not implemented"); +} + +int +md_syscall_getargs(lwp_t *l, ucontext_t *ucp, int nargs, int argsize, + register_t *args) +{ + panic("md_syscall_getargs not implemented"); + return 0; +} + +void +md_syscall_set_returnargs(lwp_t *l, ucontext_t *ucp, + int error, register_t *rval) +{ + panic("md_syscall_set_returnargs not implemented"); +} + +register_t +md_get_pc(ucontext_t *ucp) +{ + panic("md_get_pc not implemented"); + return 0; +} + +register_t +md_get_sp(ucontext_t *ucp) +{ + panic("md_get_sp not implemented"); + return 0; +} + +int +md_syscall_check_opcode(ucontext_t *ucp) +{ + panic("md_syscall_check_opcode not implemented"); + return 0; +} + +void +md_syscall_get_opcode(ucontext_t *ucp, uint32_t *opcode) +{ + panic("md_syscall_get_opcode not implemented"); +} + +void +md_syscall_inc_pc(ucontext_t *ucp, uint32_t opcode) +{ + panic("md_syscall_inc_pc not implemented"); +} + +void +md_syscall_dec_pc(ucontext_t *ucp, uint32_t opcode) +{ + panic("md_syscall_dec_pc not implemented"); +} +
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Nov 10 20:01:55 UTC 2013 Added Files: src/sys/arch/evbarm/conf: GENERIC_USERMODE Log Message: add usermode kernel config To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/GENERIC_USERMODE Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbarm/conf/GENERIC_USERMODE diff -u /dev/null src/sys/arch/evbarm/conf/GENERIC_USERMODE:1.1 --- /dev/null Sun Nov 10 20:01:55 2013 +++ src/sys/arch/evbarm/conf/GENERIC_USERMODE Sun Nov 10 20:01:55 2013 @@ -0,0 +1,17 @@ +# $NetBSD: GENERIC_USERMODE,v 1.1 2013/11/10 20:01:55 jmcneill Exp $ + +machine usermode +include "arch/usermode/conf/GENERIC.common" +include "arch/arm/conf/majors.arm32" + +no options EXEC_ELF64 + +options INSECURE # required by sysinst + +options TEXTADDR=0x2000 # 1 Gb `phys ram' / total space +options KVMSIZE= 0x1000 # KVM space reserved in VM map, 256 Mb +options NKMEMPAGES_MAX=32768 # 128 Mb max + +#options INCLUDE_CONFIG_FILE +#ident "GENERIC_USERMODE-$Revision: 1.1 $" +
CVS commit: src/sys/arch/usermode/modules/syscallemu
Module Name:src Committed By: jmcneill Date: Sun Nov 10 19:58:38 UTC 2013 Modified Files: src/sys/arch/usermode/modules/syscallemu: Makefile Added Files: src/sys/arch/usermode/modules/syscallemu: syscallemu_arm.c Log Message: arm support for syscallemu, not tested To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/modules/syscallemu/Makefile cvs rdiff -u -r0 -r1.1 \ src/sys/arch/usermode/modules/syscallemu/syscallemu_arm.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/usermode/modules/syscallemu/Makefile diff -u src/sys/arch/usermode/modules/syscallemu/Makefile:1.3 src/sys/arch/usermode/modules/syscallemu/Makefile:1.4 --- src/sys/arch/usermode/modules/syscallemu/Makefile:1.3 Tue Jul 3 21:07:41 2012 +++ src/sys/arch/usermode/modules/syscallemu/Makefile Sun Nov 10 19:58:38 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2012/07/03 21:07:41 christos Exp $ +# $NetBSD: Makefile,v 1.4 2013/11/10 19:58:38 jmcneill Exp $ .include @@ -13,6 +13,8 @@ KMOD= syscallemu SRCS= syscallemu.c .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" SRCS+= syscallemu_x86.c +.elif ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm" +SRCS+= syscallemu_arm.c .else .error ${MACHINE_ARCH} not implemented .endif Added files: Index: src/sys/arch/usermode/modules/syscallemu/syscallemu_arm.c diff -u /dev/null src/sys/arch/usermode/modules/syscallemu/syscallemu_arm.c:1.1 --- /dev/null Sun Nov 10 19:58:38 2013 +++ src/sys/arch/usermode/modules/syscallemu/syscallemu_arm.c Sun Nov 10 19:58:38 2013 @@ -0,0 +1,107 @@ +/* $NetBSD: syscallemu_arm.c,v 1.1 2013/11/10 19:58:38 jmcneill Exp $ */ + +/*- + * Copyright (c) 2011 Reinoud Zandijk + * Copyright (c) 2012-2013 Jared D. McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: syscallemu_arm.c,v 1.1 2013/11/10 19:58:38 jmcneill Exp $"); + +#include +#include +#include + +#include + +#include "syscallemu.h" + +#define ARM_TF_PC(frame) ((frame)->tf_pc) + +/* + * If syscallemu specific data is present for the process, verify that the + * caller is allowed to execute system calls. If not, deliver a SIGILL to + * the process. When syscallemu specific data is not present, simply defer + * to the original syscall handler. + */ +static void +arm_syscall_emu(struct trapframe *frame, struct lwp *l, uint32_t insn) +{ + void (*md_syscall)(struct trapframe *, struct lwp *, uint32_t) = NULL; + struct syscallemu_data *sce; + register_t pc_call; + struct proc *p; + ksiginfo_t ksi; + + p = l->l_proc; + + pc_call = ARM_TF_PC(frame) - INSN_SIZE; + + /* Determine if we need to emulate the system call */ + sce = syscallemu_getsce(p); + if (sce) { + if ((pc_call >= sce->sce_user_start && + pc_call < sce->sce_user_end) || + (pc_call + INSN_SIZE >= sce->sce_user_start && + pc_call + INSN_SIZE < sce->sce_user_end)) { + md_syscall = NULL; + } else { + md_syscall = sce->sce_md_syscall; + } + } else { + md_syscall = p->p_md.md_syscall; + } + + if (md_syscall == NULL) { + /* If emulating, deliver SIGILL to process */ + ARM_TF_PC(frame) = pc_call; + KSI_INIT_TRAP(&ksi); + ksi.ksi_signo = SIGILL; + ksi.ksi_code = ILL_ILLTRP; + ksi.ksi_addr = (void *)ARM_TF_PC(frame); + ksi.ksi_trap = 0; + trapsignal(l, &ksi); + userret(l); + } else { + /* Not emulating, so treat as a normal syscall */ + KASSERT(md_syscall != NULL); + md_syscall(frame, l, insn); + } +} + +/* + * Set p_md.md_syscall to our syscall filter, and return a pointer to the + * original syscall handler.
CVS commit: src/sys/arch/usermode/include
Module Name:src Committed By: jmcneill Date: Sun Nov 10 19:52:01 UTC 2013 Modified Files: src/sys/arch/usermode/include: ansi.h asm.h bswap.h byte_swap.h cdefs.h disklabel.h elf_machdep.h endian.h endian_machdep.h genheaders.sh int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h limits.h netbsd32_machdep.h param.h psl.h ptrace.h vmparam.h wchar_limits.h Log Message: support building on arm To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/include/ansi.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/usermode/include/asm.h \ src/sys/arch/usermode/include/bswap.h \ src/sys/arch/usermode/include/byte_swap.h \ src/sys/arch/usermode/include/elf_machdep.h \ src/sys/arch/usermode/include/endian.h \ src/sys/arch/usermode/include/endian_machdep.h \ src/sys/arch/usermode/include/int_const.h \ src/sys/arch/usermode/include/int_fmtio.h \ src/sys/arch/usermode/include/int_limits.h \ src/sys/arch/usermode/include/int_mwgwtypes.h \ src/sys/arch/usermode/include/int_types.h \ src/sys/arch/usermode/include/limits.h \ src/sys/arch/usermode/include/netbsd32_machdep.h \ src/sys/arch/usermode/include/wchar_limits.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/usermode/include/cdefs.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/usermode/include/disklabel.h \ src/sys/arch/usermode/include/ptrace.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/include/genheaders.sh cvs rdiff -u -r1.11 -r1.12 src/sys/arch/usermode/include/param.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/usermode/include/psl.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/usermode/include/vmparam.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/usermode/include/ansi.h diff -u src/sys/arch/usermode/include/ansi.h:1.3 src/sys/arch/usermode/include/ansi.h:1.4 --- src/sys/arch/usermode/include/ansi.h:1.3 Mon Aug 22 21:45:38 2011 +++ src/sys/arch/usermode/include/ansi.h Sun Nov 10 19:52:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.3 2011/08/22 21:45:38 jmcneill Exp $ */ +/* $NetBSD: ansi.h,v 1.4 2013/11/10 19:52:01 jmcneill Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -50,6 +50,11 @@ #define _BSD_PTRDIFF_T_ long #define _BSD_SIZE_T_ unsigned long #define _BSD_SSIZE_T_ long +#elif defined(__arm__) +#define _BSD_CLOCK_T_ unsigned int +#define _BSD_PTRDIFF_T_ long int +#define _BSD_SIZE_T_ unsigned long int +#define _BSD_SSIZE_T_ long int #else #error "platform not supported" #endif Index: src/sys/arch/usermode/include/asm.h diff -u src/sys/arch/usermode/include/asm.h:1.10 src/sys/arch/usermode/include/asm.h:1.11 --- src/sys/arch/usermode/include/asm.h:1.10 Sun Feb 5 17:40:08 2012 +++ src/sys/arch/usermode/include/asm.h Sun Nov 10 19:52:01 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: asm.h,v 1.10 2012/02/05 17:40:08 reinoud Exp $ */ +/* $NetBSD: asm.h,v 1.11 2013/11/10 19:52:01 jmcneill Exp $ */ /* - * Automatically generated by genheaders.sh on Sun Feb 5 18:39:33 CET 2012 + * Automatically generated by genheaders.sh on Sun Nov 10 15:47:57 AST 2013 * Do not modify directly! */ #ifndef _USERMODE_ASM_H @@ -11,6 +11,8 @@ #include "../../i386/include/asm.h" #elif defined(__x86_64__) #include "../../amd64/include/asm.h" +#elif defined(__arm__) +#include "../../arm/include/asm.h" #else #error port me #endif Index: src/sys/arch/usermode/include/bswap.h diff -u src/sys/arch/usermode/include/bswap.h:1.10 src/sys/arch/usermode/include/bswap.h:1.11 --- src/sys/arch/usermode/include/bswap.h:1.10 Sun Feb 5 17:40:08 2012 +++ src/sys/arch/usermode/include/bswap.h Sun Nov 10 19:52:01 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: bswap.h,v 1.10 2012/02/05 17:40:08 reinoud Exp $ */ +/* $NetBSD: bswap.h,v 1.11 2013/11/10 19:52:01 jmcneill Exp $ */ /* - * Automatically generated by genheaders.sh on Sun Feb 5 18:39:34 CET 2012 + * Automatically generated by genheaders.sh on Sun Nov 10 15:47:57 AST 2013 * Do not modify directly! */ #ifndef _USERMODE_BSWAP_H @@ -11,6 +11,8 @@ #include "../../i386/include/bswap.h" #elif defined(__x86_64__) #include "../../amd64/include/bswap.h" +#elif defined(__arm__) +#include "../../arm/include/bswap.h" #else #error port me #endif Index: src/sys/arch/usermode/include/byte_swap.h diff -u src/sys/arch/usermode/include/byte_swap.h:1.10 src/sys/arch/usermode/include/byte_swap.h:1.11 --- src/sys/arch/usermode/include/byte_swap.h:1.10 Sun Feb 5 17:40:08 2012 +++ src/sys/arch/usermode/include/byte_swap.h Sun Nov 10 19:52:01 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: byte_swap.h,v 1.10 2012/02/05 17:40:08 reinoud Exp $ */ +/* $NetBSD: byte_swap.h,v 1.11 2013/11/10 19:52:01 jmcneill Exp $ */ /* - * Automatically generated by genheaders.sh on Sun Feb 5 18:39:34 CET 2012 + * Automatically generated by genheaders.sh on Sun Nov 10 15:47:57 AST 2013 * Do not modify directly! */ #ifnde
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: jmcneill Date: Sun Nov 10 19:51:00 UTC 2013 Modified Files: src/sys/arch/usermode/usermode: thunk.c Log Message: define _KMEMUSER before including machine/vmparam.h To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/usermode/usermode/thunk.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/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.83 src/sys/arch/usermode/usermode/thunk.c:1.84 --- src/sys/arch/usermode/usermode/thunk.c:1.83 Wed May 22 13:34:31 2013 +++ src/sys/arch/usermode/usermode/thunk.c Sun Nov 10 19:51:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.83 2013/05/22 13:34:31 reinoud Exp $ */ +/* $NetBSD: thunk.c,v 1.84 2013/11/10 19:51:00 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -28,7 +28,7 @@ #include #ifdef __NetBSD__ -__RCSID("$NetBSD: thunk.c,v 1.83 2013/05/22 13:34:31 reinoud Exp $"); +__RCSID("$NetBSD: thunk.c,v 1.84 2013/11/10 19:51:00 jmcneill Exp $"); #endif #include @@ -41,6 +41,8 @@ __RCSID("$NetBSD: thunk.c,v 1.83 2013/05 #include #include #include + +#define _KMEMUSER #include #include
CVS commit: src/sys/arch/usermode/conf
Module Name:src Committed By: jmcneill Date: Sun Nov 10 19:49:49 UTC 2013 Modified Files: src/sys/arch/usermode/conf: Makefile.usermode Log Message: use MACHINE_CPU instead of uname -p; create symlink for arm headers To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/usermode/conf/Makefile.usermode 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/usermode/conf/Makefile.usermode diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.33 src/sys/arch/usermode/conf/Makefile.usermode:1.34 --- src/sys/arch/usermode/conf/Makefile.usermode:1.33 Wed Mar 6 11:36:21 2013 +++ src/sys/arch/usermode/conf/Makefile.usermode Sun Nov 10 19:49:49 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.usermode,v 1.33 2013/03/06 11:36:21 yamt Exp $ +# $NetBSD: Makefile.usermode,v 1.34 2013/11/10 19:49:49 jmcneill Exp $ USETOOLS?= no NEED_OWN_INSTALL_TARGET?= no @@ -59,8 +59,8 @@ MD_OBJS= thunk.o MD_CFILES= ${USERMODE}/usermode/thunk.c MD_SFILES= -MD_OBJS+= cpu_${MACHINE_ARCH}.o -MD_CFILES+= ${USERMODE}/target/${MACHINE_ARCH}/cpu_${MACHINE_ARCH}.c +MD_OBJS+= cpu_${MACHINE_CPU}.o +MD_CFILES+= ${USERMODE}/target/${MACHINE_CPU}/cpu_${MACHINE_CPU}.c ## ## (5) link settings @@ -88,6 +88,8 @@ NVFLAGS= -n ln -s $S/arch/i386/include i386 @rm -f amd64 && \ ln -s $S/arch/amd64/include amd64 + @rm -f arm && \ + ln -s $S/arch/arm/include arm .endif thunk.d: ${USERMODE}/usermode/thunk.c @@ -97,7 +99,7 @@ thunk.d: ${USERMODE}/usermode/thunk.c thunk.o: ${USERMODE}/usermode/thunk.c ${CC} ${COPTS} ${CPPFLAGS.thunk.c} -c -o $@ ${USERMODE}/usermode/thunk.c -cpu_${MACHINE_ARCH}.o: ${USERMODE}/target/${MACHINE_ARCH}/cpu_${MACHINE_ARCH}.c +cpu_${MACHINE_CPU}.o: ${USERMODE}/target/${MACHINE_CPU}/cpu_${MACHINE_CPU}.c ## ## (7) misc settings
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: christos Date: Sun Nov 10 18:28:08 UTC 2013 Modified Files: src/sys/ufs/ufs: ufs_wapbl.h Log Message: __USE a variable for the non-wapbl case To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/ufs/ufs_wapbl.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/ufs/ufs/ufs_wapbl.h diff -u src/sys/ufs/ufs/ufs_wapbl.h:1.7 src/sys/ufs/ufs/ufs_wapbl.h:1.8 --- src/sys/ufs/ufs/ufs_wapbl.h:1.7 Mon Sep 19 07:18:01 2011 +++ src/sys/ufs/ufs/ufs_wapbl.h Sun Nov 10 13:28:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_wapbl.h,v 1.7 2011/09/19 11:18:01 gdt Exp $ */ +/* $NetBSD: ufs_wapbl.h,v 1.8 2013/11/10 18:28:08 christos Exp $ */ /*- * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc. @@ -163,7 +163,7 @@ ufs_wapbl_end2(struct mount *mp, struct if (mp->mnt_wapbl) wapbl_register_deallocation(mp->mnt_wapbl, blk, len) #else /* ! WAPBL */ -#define UFS_WAPBL_BEGIN(mp) 0 +#define UFS_WAPBL_BEGIN(mp) (__USE(mp), 0) #define UFS_WAPBL_BEGIN1(mp, v1) 0 #define UFS_WAPBL_END(mp) do { } while (0) #define UFS_WAPBL_END1(mp, v1)
CVS commit: src/sys/arch
Module Name:src Committed By: christos Date: Sun Nov 10 18:27:15 UTC 2013 Modified Files: src/sys/arch/emips/ebus: ace_ebus.c clock_ebus.c dz_ebus.c icap_ebus.c if_le_ebus.c src/sys/arch/emips/emips: machdep.c src/sys/arch/mips/mips: mips_machdep.c pmap.c Log Message: fix unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/emips/ebus/ace_ebus.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/emips/ebus/clock_ebus.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/emips/ebus/dz_ebus.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/ebus/icap_ebus.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/emips/ebus/if_le_ebus.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/emips/emips/machdep.c cvs rdiff -u -r1.257 -r1.258 src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.208 -r1.209 src/sys/arch/mips/mips/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/emips/ebus/ace_ebus.c diff -u src/sys/arch/emips/ebus/ace_ebus.c:1.8 src/sys/arch/emips/ebus/ace_ebus.c:1.9 --- src/sys/arch/emips/ebus/ace_ebus.c:1.8 Sun Oct 13 02:55:34 2013 +++ src/sys/arch/emips/ebus/ace_ebus.c Sun Nov 10 13:27:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $ */ +/* $NetBSD: ace_ebus.c,v 1.9 2013/11/10 18:27:15 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.9 2013/11/10 18:27:15 christos Exp $"); #include #include @@ -1462,7 +1462,7 @@ sysace_send_config(struct ace_softc *sc, * Rest of code lifted with mods from the dev\ata\wd.c driver */ -/* $NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $ */ +/* $NetBSD: ace_ebus.c,v 1.9 2013/11/10 18:27:15 christos Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -2431,6 +2431,7 @@ acedump(dev_t dev, daddr_t blkno, void * va, size, blkno); DELAY(500 * 1000); /* half a second */ err = 0; + __USE(err); #endif acedoingadump = 0; Index: src/sys/arch/emips/ebus/clock_ebus.c diff -u src/sys/arch/emips/ebus/clock_ebus.c:1.6 src/sys/arch/emips/ebus/clock_ebus.c:1.7 --- src/sys/arch/emips/ebus/clock_ebus.c:1.6 Sun Jun 12 00:44:27 2011 +++ src/sys/arch/emips/ebus/clock_ebus.c Sun Nov 10 13:27:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: clock_ebus.c,v 1.6 2011/06/12 04:44:27 tsutsui Exp $ */ +/* $NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: clock_ebus.c,v 1.6 2011/06/12 04:44:27 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $"); #include #include @@ -260,7 +260,7 @@ eclock_ebus_intr(void *cookie, void *f) struct eclock_softc *sc = cookie; struct _Tc *tc = sc->sc_dp; struct clockframe *cf = f; - volatile uint32_t x; + volatile uint32_t x __unused; x = tc->Control; tc->DownCounterHigh = 0; Index: src/sys/arch/emips/ebus/dz_ebus.c diff -u src/sys/arch/emips/ebus/dz_ebus.c:1.5 src/sys/arch/emips/ebus/dz_ebus.c:1.6 --- src/sys/arch/emips/ebus/dz_ebus.c:1.5 Sun Jun 12 01:22:30 2011 +++ src/sys/arch/emips/ebus/dz_ebus.c Sun Nov 10 13:27:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dz_ebus.c,v 1.5 2011/06/12 05:22:30 tsutsui Exp $ */ +/* $NetBSD: dz_ebus.c,v 1.6 2013/11/10 18:27:15 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.5 2011/06/12 05:22:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.6 2013/11/10 18:27:15 christos Exp $"); #include "opt_ddb.h" @@ -514,7 +514,7 @@ void dzrint(struct dz_softc *sc, uint32_t csr) { struct tty *tp; - int cc, mcc; + int cc; struct _Usart *dzr; sc->sc_rxint++; @@ -523,11 +523,6 @@ dzrint(struct dz_softc *sc, uint32_t csr cc = dzr->RxData; tp = sc->sc_dz.dz_tty; - if (csr & USI_RXBRK) - mcc = CNC_BREAK; - else - mcc = cc; - /* clear errors before we print or bail out */ if (csr & (USI_OVRE|USI_FRAME|USI_PARE)) dzr->Control = USC_RSTSTA; Index: src/sys/arch/emips/ebus/icap_ebus.c diff -u src/sys/arch/emips/ebus/icap_ebus.c:1.3 src/sys/arch/emips/ebus/icap_ebus.c:1.4 --- src/sys/arch/emips/ebus/icap_ebus.c:1.3 Sat Oct 27 13:17:45 2012 +++ src/sys/arch/emips/ebus/icap_ebus.c Sun Nov 10 13:27:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: icap_ebus.c,v 1.3 2012/10/27 17:17:45 chs Exp $ */ +/* $NetBSD: icap_ebus.c,v 1.4 2013/11/10 18:27:15 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: icap_ebus.c,v 1.3 2012/10/27 17:17:45 chs Exp $");
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: christos Date: Sun Nov 10 17:18:32 UTC 2013 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: fix unused To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/mips/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.108 src/sys/arch/mips/include/cpu.h:1.109 --- src/sys/arch/mips/include/cpu.h:1.108 Sat Nov 9 19:50:13 2013 +++ src/sys/arch/mips/include/cpu.h Sun Nov 10 12:18:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.108 2013/11/10 00:50:13 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.109 2013/11/10 17:18:32 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -148,7 +148,7 @@ struct cpu_info { }; -#define CPU_INFO_ITERATOR int __UNUSED +#define CPU_INFO_ITERATOR int __unused #define CPU_INFO_FOREACH(cii, ci) \ ci = &cpu_info_store; ci != NULL; ci = ci->ci_next
CVS commit: src/usr.bin/elf2ecoff
Module Name:src Committed By: christos Date: Sun Nov 10 17:14:25 UTC 2013 Modified Files: src/usr.bin/elf2ecoff: elf2ecoff.c Log Message: remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/elf2ecoff/elf2ecoff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/elf2ecoff/elf2ecoff.c diff -u src/usr.bin/elf2ecoff/elf2ecoff.c:1.28 src/usr.bin/elf2ecoff/elf2ecoff.c:1.29 --- src/usr.bin/elf2ecoff/elf2ecoff.c:1.28 Tue Aug 23 16:27:22 2011 +++ src/usr.bin/elf2ecoff/elf2ecoff.c Sun Nov 10 12:14:25 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2ecoff.c,v 1.28 2011/08/23 20:27:22 christos Exp $ */ +/* $NetBSD: elf2ecoff.c,v 1.29 2013/11/10 17:14:25 christos Exp $ */ /* * Copyright (c) 1997 Jonathan Stone @@ -106,7 +106,6 @@ main(int argc, char **argv) size_t i; int pad; struct sect text, data, bss; /* a.out-compatible sections */ - struct sect rdata, sdata, sbss; /* ECOFF-only sections */ struct ecoff_exechdr ep; struct ecoff_scnhdr esecs[6]; @@ -114,7 +113,6 @@ main(int argc, char **argv) int infile, outfile; unsigned long cur_vma = ULONG_MAX; - int symflag = 0; int nsecs = 0; int mipsel; @@ -122,9 +120,6 @@ main(int argc, char **argv) text.len = data.len = bss.len = 0; text.vaddr = data.vaddr = bss.vaddr = 0; - rdata.len = sdata.len = sbss.len = 0; - rdata.vaddr = sdata.vaddr = sbss.vaddr = 0; - /* Check args... */ if (argc < 3 || argc > 4) { usage: @@ -136,7 +131,6 @@ usage: if (argc == 4) { if (strcmp(argv[3], "-s")) goto usage; - symflag = 1; } /* Try the input file... */ if ((infile = open(argv[1], O_RDONLY)) < 0) @@ -753,10 +747,9 @@ translate_syms(struct elf_syms *elfp, st /* Copy and translate symbols... */ idx = 0; for (i = 0; i < nsyms; i++) { - int binding, type; + int binding; binding = ELF32_ST_BIND((elfp->elf_syms[i].st_info)); - type = ELF32_ST_TYPE((elfp->elf_syms[i].st_info)); /* skip strange symbols */ if (binding == 0) {
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: rmind Date: Sun Nov 10 12:46:19 UTC 2013 Modified Files: src/sys/fs/tmpfs: tmpfs_subr.c tmpfs_vfsops.c Log Message: Handle whiteout case in tmpfs_dir_detach() and tmpfs_unmount(). To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/fs/tmpfs/tmpfs_subr.c cvs rdiff -u -r1.53 -r1.54 src/sys/fs/tmpfs/tmpfs_vfsops.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/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.84 src/sys/fs/tmpfs/tmpfs_subr.c:1.85 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.84 Sun Nov 10 03:20:20 2013 +++ src/sys/fs/tmpfs/tmpfs_subr.c Sun Nov 10 12:46:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.84 2013/11/10 03:20:20 christos Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.85 2013/11/10 12:46:19 rmind Exp $ */ /* * Copyright (c) 2005-2013 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.84 2013/11/10 03:20:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.85 2013/11/10 12:46:19 rmind Exp $"); #include #include @@ -520,7 +520,6 @@ tmpfs_dir_detach(tmpfs_node_t *dnode, tm if (__predict_true(node != TMPFS_NODE_WHITEOUT)) { /* Deassociate the inode and entry. */ - de->td_node = NULL; node->tn_dirent_hint = NULL; KASSERT(node->tn_links > 0); @@ -541,6 +540,7 @@ tmpfs_dir_detach(tmpfs_node_t *dnode, tm events |= NOTE_LINK; } } + de->td_node = NULL; /* Remove the entry from the directory. */ if (dnode->tn_spec.tn_dir.tn_readdir_lastp == de) { Index: src/sys/fs/tmpfs/tmpfs_vfsops.c diff -u src/sys/fs/tmpfs/tmpfs_vfsops.c:1.53 src/sys/fs/tmpfs/tmpfs_vfsops.c:1.54 --- src/sys/fs/tmpfs/tmpfs_vfsops.c:1.53 Fri Nov 8 15:44:23 2013 +++ src/sys/fs/tmpfs/tmpfs_vfsops.c Sun Nov 10 12:46:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vfsops.c,v 1.53 2013/11/08 15:44:23 rmind Exp $ */ +/* $NetBSD: tmpfs_vfsops.c,v 1.54 2013/11/10 12:46:19 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.53 2013/11/08 15:44:23 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.54 2013/11/10 12:46:19 rmind Exp $"); #include #include @@ -230,7 +230,8 @@ tmpfs_unmount(struct mount *mp, int mntf continue; } while ((de = TAILQ_FIRST(&node->tn_spec.tn_dir.tn_dir)) != NULL) { - if ((cnode = de->td_node) != NULL) { + cnode = de->td_node; + if (cnode && cnode != TMPFS_NODE_WHITEOUT) { cnode->tn_vnode = NULL; } tmpfs_dir_detach(node, de);
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: slp Date: Sun Nov 10 12:07:52 UTC 2013 Modified Files: src/sys/compat/linux/common: linux_misc.c Log Message: On linux_sys_getdents, insert d_type at the end of each record. Fixes PR kern/47806. To generate a diff of this commit: cvs rdiff -u -r1.226 -r1.227 src/sys/compat/linux/common/linux_misc.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/compat/linux/common/linux_misc.c diff -u src/sys/compat/linux/common/linux_misc.c:1.226 src/sys/compat/linux/common/linux_misc.c:1.227 --- src/sys/compat/linux/common/linux_misc.c:1.226 Tue Sep 24 13:27:50 2013 +++ src/sys/compat/linux/common/linux_misc.c Sun Nov 10 12:07:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.226 2013/09/24 13:27:50 njoly Exp $ */ +/* $NetBSD: linux_misc.c,v 1.227 2013/11/10 12:07:52 slp Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.226 2013/09/24 13:27:50 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.227 2013/11/10 12:07:52 slp Exp $"); #include #include @@ -784,9 +784,10 @@ again: } idb.d_off = (linux_off_t)off; idb.d_reclen = (u_short)linux_reclen; + /* Linux puts d_type at the end of each record */ + *((char *)&idb + idb.d_reclen - 1) = bdp->d_type; } strcpy(idb.d_name, bdp->d_name); - idb.d_name[strlen(idb.d_name) + 1] = bdp->d_type; if ((error = copyout((void *)&idb, outp, linux_reclen))) goto out; /* advance past this real entry */