CVS commit: src/sys/dev/isa
Module Name:src Committed By: pgoyette Date: Wed Jun 14 05:01:35 UTC 2017 Modified Files: src/sys/dev/isa: pcppi.c pcppivar.h spkr_pcppi.c Log Message: Instead of directly referencing a parent device's code (ie, pcppi_bell() routine), let the parent device pass a pointer to the code (in the aux config data). This allows us to load the spkr module without requiring the pcppi parent device to exist. (The spkr device can also have an audio as parent.) To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/isa/pcppi.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/isa/pcppivar.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/isa/spkr_pcppi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: pgoyette Date: Wed Jun 14 05:01:35 UTC 2017 Modified Files: src/sys/dev/isa: pcppi.c pcppivar.h spkr_pcppi.c Log Message: Instead of directly referencing a parent device's code (ie, pcppi_bell() routine), let the parent device pass a pointer to the code (in the aux config data). This allows us to load the spkr module without requiring the pcppi parent device to exist. (The spkr device can also have an audio as parent.) To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/isa/pcppi.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/isa/pcppivar.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/isa/spkr_pcppi.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/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.44 src/sys/dev/isa/pcppi.c:1.45 --- src/sys/dev/isa/pcppi.c:1.44 Sun May 17 05:20:37 2015 +++ src/sys/dev/isa/pcppi.c Wed Jun 14 05:01:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.44 2015/05/17 05:20:37 pgoyette Exp $ */ +/* $NetBSD: pcppi.c,v 1.45 2017/06/14 05:01:35 pgoyette Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.44 2015/05/17 05:20:37 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45 2017/06/14 05:01:35 pgoyette Exp $"); #include "attimer.h" @@ -246,6 +246,7 @@ pcppi_rescan(device_t self, const char * return 0; pa.pa_cookie = sc; + pa.pa_bell_func = pcppi_bell; config_search_loc(pcppisearch, sc->sc_dv, "pcppi", NULL, ); return 0; Index: src/sys/dev/isa/pcppivar.h diff -u src/sys/dev/isa/pcppivar.h:1.11 src/sys/dev/isa/pcppivar.h:1.12 --- src/sys/dev/isa/pcppivar.h:1.11 Wed Nov 23 23:07:32 2011 +++ src/sys/dev/isa/pcppivar.h Wed Jun 14 05:01:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppivar.h,v 1.11 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: pcppivar.h,v 1.12 2017/06/14 05:01:35 pgoyette Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -34,6 +34,7 @@ typedef void *pcppi_tag_t; struct pcppi_attach_args { pcppi_tag_t pa_cookie; + void (*pa_bell_func)(pcppi_tag_t, int, int, int); }; struct pcppi_softc { Index: src/sys/dev/isa/spkr_pcppi.c diff -u src/sys/dev/isa/spkr_pcppi.c:1.10 src/sys/dev/isa/spkr_pcppi.c:1.11 --- src/sys/dev/isa/spkr_pcppi.c:1.10 Sun Jun 11 21:54:22 2017 +++ src/sys/dev/isa/spkr_pcppi.c Wed Jun 14 05:01:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr_pcppi.c,v 1.10 2017/06/11 21:54:22 pgoyette Exp $ */ +/* $NetBSD: spkr_pcppi.c,v 1.11 2017/06/14 05:01:35 pgoyette Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spkr_pcppi.c,v 1.10 2017/06/11 21:54:22 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr_pcppi.c,v 1.11 2017/06/14 05:01:35 pgoyette Exp $"); #include #include @@ -66,6 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: spkr_pcppi.c struct spkr_pcppi_softc { struct spkr_softc sc_spkr; pcppi_tag_t sc_pcppicookie; + void (*sc_bell_func)(pcppi_tag_t, int, int, int); }; static int spkr_pcppi_probe(device_t, cfdata_t, void *); @@ -88,7 +89,7 @@ spkr_pcppi_tone(device_t self, u_int xhz aprint_debug_dev(self, "%s: %u %u\n", __func__, xhz, ticks); #endif /* SPKRDEBUG */ struct spkr_pcppi_softc *sc = device_private(self); - pcppi_bell(sc->sc_pcppicookie, xhz, ticks, PCPPI_BELL_SLEEP); + (*sc->sc_bell_func)(sc->sc_pcppicookie, xhz, ticks, PCPPI_BELL_SLEEP); } /* rest for given number of ticks */ @@ -123,6 +124,7 @@ spkr_pcppi_attach(device_t parent, devic aprint_normal(": PC Speaker\n"); sc->sc_pcppicookie = pa->pa_cookie; + sc->sc_bell_func = pa->pa_bell_func; spkr_attach(self, spkr_pcppi_tone, spkr_pcppi_rest); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n");
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Wed Jun 14 04:58:28 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: tickets 28-32 To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-8.0 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-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.8 src/doc/CHANGES-8.0:1.1.2.9 --- src/doc/CHANGES-8.0:1.1.2.8 Sat Jun 10 06:35:52 2017 +++ src/doc/CHANGES-8.0 Wed Jun 14 04:58:28 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.8 2017/06/10 06:35:52 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.9 2017/06/14 04:58:28 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -227,3 +227,31 @@ external/bsd/dhcp/dist/relay/dhcrelay.c flag in order to service requests. [manu, ticket #27] +sys/arch/x86/x86/cpu.c1.131 + + Further reduce the loop counter so that hatching completes + before the boot processor times us out. + [pgoyette, ticket #28] + +external/gpl3/gcc/dist/gcc/config/vax/builtins.md 1.6 + + Fix __builtin_ffs vax code generation. PR port-vax/51761 + [flxd, ticket #29] + +sys/dev/fdt/fdt_intr.c1.11 + + Fix an issue with interrupt controller lookup wrt cascading + interrupt controllers. + [jmcneill, ticket #30] + +sys/arch/evbarm/fdt/fdt_machdep.c 1.7 + + Parse more than one entry from the /memory node's reg property. + [jmcneill, ticket #31] + +external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h 1.11 +external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h 1.21 + + regen to fix PR toolchain/52142. + [maya, ticket #32] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Wed Jun 14 04:58:28 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: tickets 28-32 To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el
Module Name:src Committed By: snj Date: Wed Jun 14 04:55:59 UTC 2017 Modified Files: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el [netbsd-8]: auto-host.h configargs.h Log Message: Pull up following revision(s) (requested by maya in ticket #32): external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h: revision 1.11 external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h: revision 1.21 regen after new binutils To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.8.1 \ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h cvs rdiff -u -r1.20 -r1.20.6.1 \ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.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/gcc/usr.bin/gcc/arch/mips64el/auto-host.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h:1.10 src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h:1.10.8.1 --- src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h:1.10 Tue Jun 7 18:53:03 2016 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h Wed Jun 14 04:55:59 2017 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.87 2016/03/17 23:41:21 mrg Exp */ +/* Generated from: NetBSD: mknative-gcc,v 1.89 2016/10/05 19:25:49 christos Exp */ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* auto-host.h. Generated from config.in by configure. */ @@ -297,7 +297,7 @@ /* Define if your assembler supports .module. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_AS_DOT_MODULE */ +#define HAVE_AS_DOT_MODULE 1 #endif @@ -509,7 +509,7 @@ /* Define if the assembler understands -mnan=. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_AS_NAN */ +#define HAVE_AS_NAN 1 #endif Index: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h:1.20 src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h:1.20.6.1 --- src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h:1.20 Tue Oct 18 01:33:01 2016 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h Wed Jun 14 04:55:59 2017 @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* Generated automatically. */ -static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=mips64el--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20160606' --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-mpc-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/mips64el --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd7.0 --host=mips64el--netbsd --with-sysroot=/var/ obj/mknative/evbmips-mips64el/usr/src/destdir.evbmips"; +static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=mips64el--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20160606' --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-mpc-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/evbmips-mips64el/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/mips64el --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd7.1 --host=mips64el--netbsd --with-sysroot=/var/ obj/mknative/evbmips-mips64el/usr/src/destdir.evbmips"; static const char thread_model[] = "posix"; static const struct {
CVS commit: [netbsd-8] src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el
Module Name:src Committed By: snj Date: Wed Jun 14 04:55:59 UTC 2017 Modified Files: src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el [netbsd-8]: auto-host.h configargs.h Log Message: Pull up following revision(s) (requested by maya in ticket #32): external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h: revision 1.11 external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h: revision 1.21 regen after new binutils To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.8.1 \ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h cvs rdiff -u -r1.20 -r1.20.6.1 \ src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/evbarm/fdt
Module Name:src Committed By: snj Date: Wed Jun 14 04:54:21 UTC 2017 Modified Files: src/sys/arch/evbarm/fdt [netbsd-8]: fdt_machdep.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #31): sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.7 Parse more than one entry from the /memory node's reg property. To generate a diff of this commit: cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/arch/evbarm/fdt/fdt_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/fdt/fdt_machdep.c diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.4.2.1 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.4.2.2 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.4.2.1 Tue Jun 6 16:26:53 2017 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Wed Jun 14 04:54:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.4.2.1 2017/06/06 16:26:53 snj Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.4.2.2 2017/06/14 04:54:21 snj Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.4.2.1 2017/06/06 16:26:53 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.4.2.2 2017/06/14 04:54:21 snj Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -139,6 +139,34 @@ fdt_printn(u_int n, int base) #define DPRINTN(x,b) #endif +/* + * Get the first physically contiguous region of memory. + */ +static void +fdt_get_memory(uint64_t *paddr, uint64_t *psize) +{ + const int memory = OF_finddevice("/memory"); + uint64_t cur_addr, cur_size; + int index; + + /* Assume the first entry is the start of memory */ + if (fdtbus_get_reg64(memory, 0, paddr, psize) != 0) + panic("Cannot determine memory size"); + + DPRINTF("FDT /memory [%d] @ 0x%" PRIx64 " size 0x%" PRIx64 "\n", + 0, *paddr, *psize); + + /* If subsequent entries follow the previous one, append them. */ + for (index = 1; + fdtbus_get_reg64(memory, index, _addr, _size) == 0; + index++) { + DPRINTF("FDT /memory [%d] @ 0x%" PRIx64 " size 0x%" PRIx64 "\n", + index, cur_addr, cur_size); + if (*paddr + *psize == cur_addr) + *psize += cur_size; + } +} + u_int initarm(void *arg) { @@ -219,9 +247,7 @@ initarm(void *arg) KERNEL_VM_BASE - KERNEL_BASE, KERNEL_BASE_VOFFSET); - const int memory = OF_finddevice("/memory"); - if (fdtbus_get_reg64(memory, 0, _addr, _size) != 0) - panic("Cannot determine memory size"); + fdt_get_memory(_addr, _size); #if !defined(_LP64) /* Cannot map memory above 4GB */
CVS commit: [netbsd-8] src/sys/arch/evbarm/fdt
Module Name:src Committed By: snj Date: Wed Jun 14 04:54:21 UTC 2017 Modified Files: src/sys/arch/evbarm/fdt [netbsd-8]: fdt_machdep.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #31): sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.7 Parse more than one entry from the /memory node's reg property. To generate a diff of this commit: cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/arch/evbarm/fdt/fdt_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/fdt
Module Name:src Committed By: snj Date: Wed Jun 14 04:53:12 UTC 2017 Modified Files: src/sys/dev/fdt [netbsd-8]: fdt_intr.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #30): sys/dev/fdt/fdt_intr.c: revision 1.11 Fix an issue with interrupt controller lookup wrt cascading interrupt controllers. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/dev/fdt/fdt_intr.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/fdt/fdt_intr.c diff -u src/sys/dev/fdt/fdt_intr.c:1.10 src/sys/dev/fdt/fdt_intr.c:1.10.2.1 --- src/sys/dev/fdt/fdt_intr.c:1.10 Fri Jun 2 13:12:33 2017 +++ src/sys/dev/fdt/fdt_intr.c Wed Jun 14 04:53:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_intr.c,v 1.10 2017/06/02 13:12:33 jmcneill Exp $ */ +/* $NetBSD: fdt_intr.c,v 1.10.2.1 2017/06/14 04:53:12 snj Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.10 2017/06/02 13:12:33 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.10.2.1 2017/06/14 04:53:12 snj Exp $"); #include #include @@ -44,6 +44,11 @@ struct fdtbus_interrupt_controller { struct fdtbus_interrupt_controller *ic_next; }; +struct fdtbus_interrupt_cookie { + struct fdtbus_interrupt_controller *c_ic; + void *c_ih; +}; + static struct fdtbus_interrupt_controller *fdtbus_ic = NULL; static bool has_interrupt_map(int); @@ -79,7 +84,7 @@ fdtbus_get_interrupt_parent(int phandle) } static struct fdtbus_interrupt_controller * -fdtbus_get_interrupt_controller_ic(int phandle) +fdtbus_get_interrupt_controller(int phandle) { struct fdtbus_interrupt_controller * ic; for (ic = fdtbus_ic; ic; ic = ic->ic_next) { @@ -90,17 +95,6 @@ fdtbus_get_interrupt_controller_ic(int p return NULL; } -static struct fdtbus_interrupt_controller * -fdtbus_get_interrupt_controller(int phandle) -{ - const int ic_phandle = fdtbus_get_interrupt_parent(phandle); - if (ic_phandle < 0) { - return NULL; - } - - return fdtbus_get_interrupt_controller_ic(ic_phandle); -} - int fdtbus_register_interrupt_controller(device_t dev, int phandle, const struct fdtbus_interrupt_controller_func *funcs) @@ -123,8 +117,10 @@ fdtbus_intr_establish(int phandle, u_int int (*func)(void *), void *arg) { struct fdtbus_interrupt_controller *ic; + struct fdtbus_interrupt_cookie *c = NULL; u_int *specifier; int ihandle; + void *ih; specifier = get_specifier_by_index(phandle, index, ); if (specifier == NULL) @@ -134,17 +130,23 @@ fdtbus_intr_establish(int phandle, u_int if (ic == NULL) return NULL; - return ic->ic_funcs->establish(ic->ic_dev, specifier, + ih = ic->ic_funcs->establish(ic->ic_dev, specifier, ipl, flags, func, arg); + if (ih != NULL) { + c = kmem_alloc(sizeof(*c), KM_SLEEP); + c->c_ic = ic; + c->c_ih = ih; + } + + return c; } void -fdtbus_intr_disestablish(int phandle, void *ih) +fdtbus_intr_disestablish(int phandle, void *cookie) { - struct fdtbus_interrupt_controller *ic; - - ic = fdtbus_get_interrupt_controller(phandle); - KASSERT(ic != NULL); + struct fdtbus_interrupt_cookie *c = cookie; + struct fdtbus_interrupt_controller *ic = c->c_ic; + void *ih = c->c_ih; return ic->ic_funcs->disestablish(ic->ic_dev, ih); }
CVS commit: [netbsd-8] src/sys/dev/fdt
Module Name:src Committed By: snj Date: Wed Jun 14 04:53:12 UTC 2017 Modified Files: src/sys/dev/fdt [netbsd-8]: fdt_intr.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #30): sys/dev/fdt/fdt_intr.c: revision 1.11 Fix an issue with interrupt controller lookup wrt cascading interrupt controllers. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/dev/fdt/fdt_intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config/vax
Module Name:src Committed By: snj Date: Wed Jun 14 04:49:32 UTC 2017 Modified Files: src/external/gpl3/gcc/dist/gcc/config/vax [netbsd-8]: builtins.md Log Message: Pull up following revision(s) (requested by flxd in ticket #29): external/gpl3/gcc/dist/gcc/config/vax/builtins.md: revision 1.6 Fix PR port-vax/51761 as suggested by Paul Koning on port-vax list. Installation (install.ram, -Os) on my VS4000 is possible without SCSI timeouts again. Other variable-length bit field instructions should be checked for correct constraints, too! To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.8.1 \ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md 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/dist/gcc/config/vax/builtins.md diff -u src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5 src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5.8.1 --- src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5 Sun Jan 24 09:43:34 2016 +++ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Wed Jun 14 04:49:32 2017 @@ -47,7 +47,7 @@ (define_insn "ctzsi2" [(set (match_operand:SI 0 "nonimmediate_operand" "=rQ") - (ctz:SI (match_operand:SI 1 "general_operand" "nrmT"))) + (ctz:SI (match_operand:SI 1 "general_operand" "nrQT"))) (set (cc0) (match_dup 0))] "" "ffs $0,$32,%1,%0")
CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config/vax
Module Name:src Committed By: snj Date: Wed Jun 14 04:49:32 UTC 2017 Modified Files: src/external/gpl3/gcc/dist/gcc/config/vax [netbsd-8]: builtins.md Log Message: Pull up following revision(s) (requested by flxd in ticket #29): external/gpl3/gcc/dist/gcc/config/vax/builtins.md: revision 1.6 Fix PR port-vax/51761 as suggested by Paul Koning on port-vax list. Installation (install.ram, -Os) on my VS4000 is possible without SCSI timeouts again. Other variable-length bit field instructions should be checked for correct constraints, too! To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.8.1 \ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/x86/x86
Module Name:src Committed By: snj Date: Wed Jun 14 04:47:33 UTC 2017 Modified Files: src/sys/arch/x86/x86 [netbsd-8]: cpu.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #28): sys/arch/x86/x86/cpu.c: revision 1.131 Further reduce the loop counter so that hatching completes before the boot processor times us out. Add a nice big XXX comment for why the counter is so low. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.130.2.1 src/sys/arch/x86/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/x86/x86
Module Name:src Committed By: snj Date: Wed Jun 14 04:47:33 UTC 2017 Modified Files: src/sys/arch/x86/x86 [netbsd-8]: cpu.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #28): sys/arch/x86/x86/cpu.c: revision 1.131 Further reduce the loop counter so that hatching completes before the boot processor times us out. Add a nice big XXX comment for why the counter is so low. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.130.2.1 src/sys/arch/x86/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.130 src/sys/arch/x86/x86/cpu.c:1.130.2.1 --- src/sys/arch/x86/x86/cpu.c:1.130 Wed May 31 14:41:07 2017 +++ src/sys/arch/x86/x86/cpu.c Wed Jun 14 04:47:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.130 2017/05/31 14:41:07 kre Exp $ */ +/* $NetBSD: cpu.c,v 1.130.2.1 2017/06/14 04:47:33 snj Exp $ */ /*- * Copyright (c) 2000-2012 NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.130 2017/05/31 14:41:07 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.130.2.1 2017/06/14 04:47:33 snj Exp $"); #include "opt_ddb.h" #include "opt_mpbios.h" /* for MPDEBUG */ @@ -835,7 +835,13 @@ cpu_hatch(void *v) } x86_mwait(0, 0); } else { - for (i = 100; i != 0; i--) { + /* + * XXX The loop repetition count could be a lot higher, but + * XXX currently qemu emulator takes a _very_long_time_ to + * XXX execute the pause instruction. So for now, use a low + * XXX value to allow the cpu to hatch before timing out. + */ + for (i = 50; i != 0; i--) { x86_pause(); } }
CVS commit: src/tests/net/ipsec
Module Name:src Committed By: ozaki-r Date: Wed Jun 14 02:33:37 UTC 2017 Modified Files: src/tests/net/ipsec: t_ipsec_gif.sh t_ipsec_l2tp.sh Log Message: Enable DEBUG for babylon5 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/net/ipsec/t_ipsec_gif.sh \ src/tests/net/ipsec/t_ipsec_l2tp.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/ipsec/t_ipsec_gif.sh diff -u src/tests/net/ipsec/t_ipsec_gif.sh:1.5 src/tests/net/ipsec/t_ipsec_gif.sh:1.6 --- src/tests/net/ipsec/t_ipsec_gif.sh:1.5 Fri May 12 02:34:45 2017 +++ src/tests/net/ipsec/t_ipsec_gif.sh Wed Jun 14 02:33:37 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ipsec_gif.sh,v 1.5 2017/05/12 02:34:45 ozaki-r Exp $ +# $NetBSD: t_ipsec_gif.sh,v 1.6 2017/06/14 02:33:37 ozaki-r Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -33,7 +33,7 @@ BUS_LOCAL=./bus_ipsec_local BUS_TUNNEL=./bus_ipsec_tunnel BUS_REMOTE=./bus_ipsec_remote -DEBUG=${DEBUG:-false} +DEBUG=${DEBUG:-true} make_gif_pktstr() { Index: src/tests/net/ipsec/t_ipsec_l2tp.sh diff -u src/tests/net/ipsec/t_ipsec_l2tp.sh:1.5 src/tests/net/ipsec/t_ipsec_l2tp.sh:1.6 --- src/tests/net/ipsec/t_ipsec_l2tp.sh:1.5 Fri May 12 02:34:45 2017 +++ src/tests/net/ipsec/t_ipsec_l2tp.sh Wed Jun 14 02:33:37 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ipsec_l2tp.sh,v 1.5 2017/05/12 02:34:45 ozaki-r Exp $ +# $NetBSD: t_ipsec_l2tp.sh,v 1.6 2017/06/14 02:33:37 ozaki-r Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -33,7 +33,7 @@ BUS_LOCAL=./bus_ipsec_local BUS_TUNNEL=./bus_ipsec_tunnel BUS_REMOTE=./bus_ipsec_remote -DEBUG=${DEBUG:-false} +DEBUG=${DEBUG:-true} make_l2tp_pktstr() {
CVS commit: src/tests/net/ipsec
Module Name:src Committed By: ozaki-r Date: Wed Jun 14 02:33:37 UTC 2017 Modified Files: src/tests/net/ipsec: t_ipsec_gif.sh t_ipsec_l2tp.sh Log Message: Enable DEBUG for babylon5 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/net/ipsec/t_ipsec_gif.sh \ src/tests/net/ipsec/t_ipsec_l2tp.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if_vlan
Module Name:src Committed By: ozaki-r Date: Wed Jun 14 02:32:29 UTC 2017 Modified Files: src/tests/net/if_vlan: t_vlan.sh Log Message: Add test cases for vlan(4) >From s-yamaguchi@IIJ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/net/if_vlan/t_vlan.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if_vlan/t_vlan.sh diff -u src/tests/net/if_vlan/t_vlan.sh:1.1 src/tests/net/if_vlan/t_vlan.sh:1.2 --- src/tests/net/if_vlan/t_vlan.sh:1.1 Sat Nov 26 03:19:49 2016 +++ src/tests/net/if_vlan/t_vlan.sh Wed Jun 14 02:32:29 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_vlan.sh,v 1.1 2016/11/26 03:19:49 ozaki-r Exp $ +# $NetBSD: t_vlan.sh,v 1.2 2017/06/14 02:32:29 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -28,11 +28,56 @@ BUS=bus SOCK_LOCAL=unix://commsock1 SOCK_REMOTE=unix://commsock2 -IP_LOCAL=10.0.0.1 -IP_REMOTE=10.0.0.2 +IP_LOCAL0=10.0.0.1 +IP_LOCAL1=10.0.1.1 +IP_REMOTE0=10.0.0.2 +IP_REMOTE1=10.0.1.2 +IP6_LOCAL0=fc00:0::1 +IP6_LOCAL1=fc00:1::1 +IP6_REMOTE0=fc00:0::2 +IP6_REMOTE1=fc00:1::2 DEBUG=${DEBUG:-false} +vlan_create_destroy_body_common() +{ + export RUMP_SERVER=${SOCK_LOCAL} + + atf_check -s exit:0 rump.ifconfig vlan0 create + atf_check -s exit:0 rump.ifconfig vlan0 up + atf_check -s exit:0 rump.ifconfig vlan0 down + atf_check -s exit:0 rump.ifconfig vlan0 destroy + + atf_check -s exit:0 rump.ifconfig shmif0 create + atf_check -s exit:0 rump.ifconfig vlan0 create + atf_check -s exit:0 rump.ifconfig vlan0 vlan 1 vlanif shmif0 + atf_check -s exit:0 rump.ifconfig vlan0 up + atf_check -s exit:0 rump.ifconfig vlan0 destroy + + # more than one vlan interface with a same parent interface + atf_check -s exit:0 rump.ifconfig shmif1 create + atf_check -s exit:0 rump.ifconfig vlan0 create + atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0 + atf_check -s exit:0 rump.ifconfig vlan1 create + atf_check -s exit:0 rump.ifconfig vlan1 vlan 11 vlanif shmif0 + + # more than one interface with another parent interface + atf_check -s exit:0 rump.ifconfig vlan2 create + atf_check -s exit:0 rump.ifconfig vlan2 vlan 12 vlanif shmif1 + atf_check -s exit:0 rump.ifconfig vlan3 create + atf_check -s exit:0 rump.ifconfig vlan3 vlan 13 vlanif shmif1 + atf_check -s exit:0 rump.ifconfig shmif0 destroy + atf_check -s exit:0 -o not-match:'shmif0' rump.ifconfig vlan0 + atf_check -s exit:0 -o not-match:'shmif0' rump.ifconfig vlan1 + atf_check -s exit:0 -o match:'shmif1' rump.ifconfig vlan2 + atf_check -s exit:0 -o match:'shmif1' rump.ifconfig vlan3 + atf_check -s exit:0 rump.ifconfig vlan0 destroy + atf_check -s exit:0 rump.ifconfig vlan1 destroy + atf_check -s exit:0 rump.ifconfig vlan2 destroy + atf_check -s exit:0 rump.ifconfig vlan3 destroy + +} + atf_test_case vlan_create_destroy cleanup vlan_create_destroy_head() { @@ -43,17 +88,12 @@ vlan_create_destroy_head() vlan_create_destroy_body() { - rump_server_start $SOCK_LOCAL vlan - export RUMP_SERVER=${SOCK_LOCAL} - - atf_check -s exit:0 rump.ifconfig vlan0 create - atf_check -s exit:0 rump.ifconfig vlan0 up - atf_check -s exit:0 rump.ifconfig vlan0 down - atf_check -s exit:0 rump.ifconfig vlan0 destroy + vlan_create_destroy_body_common } + vlan_create_destroy_cleanup() { @@ -61,20 +101,47 @@ vlan_create_destroy_cleanup() cleanup } -atf_test_case vlan_basic cleanup -vlan_basic_head() +atf_test_case vlan_create_destroy6 cleanup +vlan_create_destroy6_head() { - atf_set "descr" "tests of communications over vlan interfaces" + atf_set "descr" "tests of creation and deletion of vlan interface with IPv6" atf_set "require.progs" "rump_server" } -vlan_basic_body() +vlan_create_destroy6_body() { - rump_server_start $SOCK_LOCAL vlan + rump_server_start $SOCK_LOCAL vlan netinet6 + + vlan_create_destroy_body_common +} + +vlan_create_destroy6_cleanup() +{ + + $DEBUG && dump + cleanup +} + +vlan_basic_body_common() +{ + local outfile=./out + local af=inet + local prefix=24 + local local0=$IP_LOCAL0 + local remote0=$IP_REMOTE0 + local ping_cmd="rump.ping -n -w 1 -c 1" + + if [ x"$1" = x"inet6" ]; then + af="inet6" + prefix=64 + local0=$IP6_LOCAL0 + remote0=$IP6_REMOTE0 + ping_cmd="rump.ping6 -n -c 1" + fi + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS - rump_server_start $SOCK_REMOTE vlan rump_server_add_iface $SOCK_REMOTE shmif0 $BUS export RUMP_SERVER=$SOCK_LOCAL @@ -85,19 +152,53 @@ vlan_basic_body() export RUMP_SERVER=$SOCK_LOCAL atf_check -s exit:0 rump.ifconfig vlan0 create atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0 - atf_check -s exit:0 rump.ifconfig vlan0 $IP_LOCAL/24 + atf_check -s exit:0 rump.ifconfig vlan0 $af $local0/$prefix atf_check -s exit:0 rump.ifconfig vlan0 up atf_check -s exit:0 rump.ifconfig -w 10 export RUMP_SERVER=$SOCK_REMOTE atf_check -s exit:0 rump.ifconfig vlan0 create atf_check
CVS commit: src/tests/net/if_vlan
Module Name:src Committed By: ozaki-r Date: Wed Jun 14 02:32:29 UTC 2017 Modified Files: src/tests/net/if_vlan: t_vlan.sh Log Message: Add test cases for vlan(4) >From s-yamaguchi@IIJ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/net/if_vlan/t_vlan.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: ozaki-r Date: Wed Jun 14 02:00:44 UTC 2017 Modified Files: src/sys/netipsec: ipsec.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/netipsec/ipsec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: ozaki-r Date: Wed Jun 14 02:00:44 UTC 2017 Modified Files: src/sys/netipsec: ipsec.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.99 src/sys/netipsec/ipsec.c:1.100 --- src/sys/netipsec/ipsec.c:1.99 Fri Jun 2 03:41:20 2017 +++ src/sys/netipsec/ipsec.c Wed Jun 14 02:00:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.99 2017/06/02 03:41:20 ozaki-r Exp $ */ +/* $NetBSD: ipsec.c,v 1.100 2017/06/14 02:00:43 ozaki-r Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.99 2017/06/02 03:41:20 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.100 2017/06/14 02:00:43 ozaki-r Exp $"); /* * IPsec controller part. @@ -237,10 +237,8 @@ ipsec_checkpcbcache(struct mbuf *m, stru * might have lower priority than a rule that would otherwise * have matched the packet. */ - if (memcmp(>sp_cache[dir].cacheidx, , sizeof(spidx))) return NULL; - } else { /* * The pcb is connected, and the L4 code is sure that: @@ -296,11 +294,11 @@ ipsec_fillpcbcache(struct inpcbpolicy *p case IPSEC_POLICY_NONE: case IPSEC_POLICY_BYPASS: pcbsp->sp_cache[dir].cachehint = - IPSEC_PCBHINT_NO; +IPSEC_PCBHINT_NO; break; default: pcbsp->sp_cache[dir].cachehint = - IPSEC_PCBHINT_YES; +IPSEC_PCBHINT_YES; } } } @@ -325,7 +323,7 @@ ipsec_invalpcbcache(struct inpcbpolicy * pcbsp->sp_cache[i].cachehint = IPSEC_PCBHINT_UNKNOWN; pcbsp->sp_cache[i].cachegen = 0; memset(>sp_cache[i].cacheidx, 0, - sizeof(pcbsp->sp_cache[i].cacheidx)); + sizeof(pcbsp->sp_cache[i].cacheidx)); } return 0; } @@ -916,9 +914,9 @@ ipsec4_setspidx_inpcb(struct mbuf *m, st pcb->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; } else { memset(>inp_sp->sp_in->spidx, 0, - sizeof (pcb->inp_sp->sp_in->spidx)); + sizeof(pcb->inp_sp->sp_in->spidx)); memset(>inp_sp->sp_out->spidx, 0, - sizeof (pcb->inp_sp->sp_in->spidx)); + sizeof(pcb->inp_sp->sp_in->spidx)); } return error; } @@ -1133,11 +1131,9 @@ ipsec4_setspidx_ipaddr(struct mbuf *m, s if (m->m_len < sizeof (struct ip)) { m_copydata(m, offsetof(struct ip, ip_src), - sizeof (struct in_addr), - >src.sin.sin_addr); + sizeof(struct in_addr), >src.sin.sin_addr); m_copydata(m, offsetof(struct ip, ip_dst), - sizeof (struct in_addr), - >dst.sin.sin_addr); + sizeof(struct in_addr), >dst.sin.sin_addr); } else { struct ip *ip = mtod(m, struct ip *); spidx->src.sin.sin_addr = ip->ip_src;
CVS commit: src/sys/kern
Module Name:src Committed By: chs Date: Wed Jun 14 00:52:37 UTC 2017 Modified Files: src/sys/kern: kern_ksyms.c Log Message: create an nmap table for module symtabs too. needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: chs Date: Wed Jun 14 00:52:37 UTC 2017 Modified Files: src/sys/kern: kern_ksyms.c Log Message: create an nmap table for module symtabs too. needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/kern/kern_ksyms.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/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.84 src/sys/kern/kern_ksyms.c:1.85 --- src/sys/kern/kern_ksyms.c:1.84 Thu Jul 7 06:55:43 2016 +++ src/sys/kern/kern_ksyms.c Wed Jun 14 00:52:37 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.84 2016/07/07 06:55:43 msaitoh Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.85 2017/06/14 00:52:37 chs Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.84 2016/07/07 06:55:43 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.85 2017/06/14 00:52:37 chs Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_copy_symtab.h" @@ -336,8 +336,9 @@ addsymtab(const char *name, void *symsta nglob = 0; for (i = n = 0; i < nsyms; i++) { - /* This breaks CTF mapping, so don't do it when - * DTrace is enabled + /* + * This breaks CTF mapping, so don't do it when + * DTrace is enabled. */ #ifndef KDTRACE_HOOKS /* @@ -396,6 +397,7 @@ addsymtab(const char *name, void *symsta tab->sd_symstart = nsym; tab->sd_symsize = n * sizeof(Elf_Sym); tab->sd_nglob = nglob; + addsymtab_strstart = str; if (kheapsort(nsym, n, sizeof(Elf_Sym), addsymtab_compar, ) != 0) panic("addsymtab"); @@ -731,11 +733,14 @@ ksyms_modload(const char *name, void *sy char *strstart, vsize_t strsize) { struct ksyms_symtab *st; + void *nmap; st = kmem_zalloc(sizeof(*st), KM_SLEEP); + nmap = kmem_zalloc(symsize / sizeof(Elf_Sym) * sizeof (uint32_t), + KM_SLEEP); mutex_enter(_lock); addsymtab(name, symstart, symsize, strstart, strsize, st, symstart, - NULL, 0, NULL); + NULL, 0, nmap); mutex_exit(_lock); } @@ -757,6 +762,8 @@ ksyms_modunload(const char *name) if (!ksyms_isopen) { TAILQ_REMOVE(_symtabs, st, sd_queue); ksyms_sizes_calc(); + kmem_free(st->sd_nmap, + st->sd_nmapsize * sizeof(uint32_t)); kmem_free(st, sizeof(*st)); } break; @@ -984,6 +991,8 @@ ksymsclose(dev_t dev, int oflags, int de next = TAILQ_NEXT(st, sd_queue); if (st->sd_gone) { TAILQ_REMOVE(_symtabs, st, sd_queue); + kmem_free(st->sd_nmap, + st->sd_nmapsize * sizeof(uint32_t)); kmem_free(st, sizeof(*st)); resize = true; }
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Wed Jun 14 00:40:05 UTC 2017 Modified Files: src/sys/arch/amd64/include: frame.h src/sys/arch/i386/include: frame.h Log Message: add an lwp_trapframe() interface to return an LWP's user trapframe. needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/include/frame.h cvs rdiff -u -r1.35 -r1.36 src/sys/arch/i386/include/frame.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/amd64/include/frame.h diff -u src/sys/arch/amd64/include/frame.h:1.17 src/sys/arch/amd64/include/frame.h:1.18 --- src/sys/arch/amd64/include/frame.h:1.17 Thu Feb 20 18:20:39 2014 +++ src/sys/arch/amd64/include/frame.h Wed Jun 14 00:40:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.17 2014/02/20 18:20:39 dsl Exp $ */ +/* $NetBSD: frame.h,v 1.18 2017/06/14 00:40:05 chs Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -121,6 +121,7 @@ struct sigframe_siginfo { #ifdef _KERNEL struct lwp; void buildcontext(struct lwp *, void *, void *); +#define lwp_trapframe(l) ((l)->l_md.md_regs) #endif #else /* __x86_64__ */ Index: src/sys/arch/i386/include/frame.h diff -u src/sys/arch/i386/include/frame.h:1.35 src/sys/arch/i386/include/frame.h:1.36 --- src/sys/arch/i386/include/frame.h:1.35 Sun Feb 19 21:06:11 2012 +++ src/sys/arch/i386/include/frame.h Wed Jun 14 00:40:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.35 2012/02/19 21:06:11 rmind Exp $ */ +/* $NetBSD: frame.h,v 1.36 2017/06/14 00:40:05 chs Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -173,6 +173,7 @@ struct sigframe_siginfo { void *getframe(struct lwp *, int, int *); void buildcontext(struct lwp *, int, void *, void *); void sendsig_sigcontext(const ksiginfo_t *, const sigset_t *); +#define lwp_trapframe(l) ((l)->l_md.md_regs) #endif #endif /* _I386_FRAME_H_ */
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Wed Jun 14 00:40:05 UTC 2017 Modified Files: src/sys/arch/amd64/include: frame.h src/sys/arch/i386/include: frame.h Log Message: add an lwp_trapframe() interface to return an LWP's user trapframe. needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/include/frame.h cvs rdiff -u -r1.35 -r1.36 src/sys/arch/i386/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [jdolecek-ncq] src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Tue Jun 13 19:15:32 UTC 2017 Modified Files: src/sys/dev/ic [jdolecek-ncq]: mvsata.c Log Message: use MVSATA_EDMAQ_LEN instead of magic number for number of queue slots To generate a diff of this commit: cvs rdiff -u -r1.35.6.9 -r1.35.6.10 src/sys/dev/ic/mvsata.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/ic/mvsata.c diff -u src/sys/dev/ic/mvsata.c:1.35.6.9 src/sys/dev/ic/mvsata.c:1.35.6.10 --- src/sys/dev/ic/mvsata.c:1.35.6.9 Mon Jun 12 21:38:50 2017 +++ src/sys/dev/ic/mvsata.c Tue Jun 13 19:15:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsata.c,v 1.35.6.9 2017/06/12 21:38:50 jdolecek Exp $ */ +/* $NetBSD: mvsata.c,v 1.35.6.10 2017/06/13 19:15:32 jdolecek Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.35.6.9 2017/06/12 21:38:50 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.35.6.10 2017/06/13 19:15:32 jdolecek Exp $"); #include "opt_mvsata.h" @@ -2881,7 +2881,7 @@ mvsata_port_init(struct mvsata_hc *mvhc, chp = >port_ata_channel; chp->ch_channel = channel; chp->ch_atac = >sc_wdcdev.sc_atac; - chp->ch_queue = ata_queue_alloc(32); + chp->ch_queue = ata_queue_alloc(MVSATA_EDMAQ_LEN); sc->sc_ata_channels[channel] = chp; rv = mvsata_wdc_reg_init(mvport, sc->sc_wdcdev.regs + channel);
CVS commit: [jdolecek-ncq] src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Tue Jun 13 19:15:32 UTC 2017 Modified Files: src/sys/dev/ic [jdolecek-ncq]: mvsata.c Log Message: use MVSATA_EDMAQ_LEN instead of magic number for number of queue slots To generate a diff of this commit: cvs rdiff -u -r1.35.6.9 -r1.35.6.10 src/sys/dev/ic/mvsata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: spz Date: Tue Jun 13 19:13:55 UTC 2017 Modified Files: src/sys/arch/ews4800mips/sbd: fb_sbdio.c src/sys/arch/pmax/ibus: pm.c src/sys/dev/hpc: bivideo.c src/sys/dev/ic: sti.c Log Message: correct size checks so they cannot be circumvented by integer overflows reported by CTurt, thanks for the notification To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ews4800mips/sbd/fb_sbdio.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/pmax/ibus/pm.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/hpc/bivideo.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/sti.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/ews4800mips/sbd/fb_sbdio.c diff -u src/sys/arch/ews4800mips/sbd/fb_sbdio.c:1.15 src/sys/arch/ews4800mips/sbd/fb_sbdio.c:1.16 --- src/sys/arch/ews4800mips/sbd/fb_sbdio.c:1.15 Tue Jun 23 21:00:23 2015 +++ src/sys/arch/ews4800mips/sbd/fb_sbdio.c Tue Jun 13 19:13:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fb_sbdio.c,v 1.15 2015/06/23 21:00:23 matt Exp $ */ +/* $NetBSD: fb_sbdio.c,v 1.16 2017/06/13 19:13:55 spz Exp $ */ /*- * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #define WIRED_FB_TLB #include -__KERNEL_RCSID(0, "$NetBSD: fb_sbdio.c,v 1.15 2015/06/23 21:00:23 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fb_sbdio.c,v 1.16 2017/06/13 19:13:55 spz Exp $"); #include #include @@ -303,6 +303,8 @@ _fb_ioctl(void *v, void *vs, u_long cmd, if (ri->ri_flg == RI_FORCEMONO) break; ga_clut_get(ga); + if (cmap->index >= 256 || cmap->count > 256 - cmap->index) + return (EINVAL); for (i = 0; i < cmap->count; i++) { cmap->red[i] = ga->clut[cmap->index + i][0]; cmap->green[i] = ga->clut[cmap->index + i][1]; @@ -313,6 +315,8 @@ _fb_ioctl(void *v, void *vs, u_long cmd, case WSDISPLAYIO_PUTCMAP: if (ri->ri_flg == RI_FORCEMONO) break; + if (cmap->index >= 256 || cmap->count > 256 - cmap->index) + return (EINVAL); for (i = 0; i < cmap->count; i++) { ga->clut[cmap->index + i][0] = cmap->red[i]; ga->clut[cmap->index + i][1] = cmap->green[i]; Index: src/sys/arch/pmax/ibus/pm.c diff -u src/sys/arch/pmax/ibus/pm.c:1.12 src/sys/arch/pmax/ibus/pm.c:1.13 --- src/sys/arch/pmax/ibus/pm.c:1.12 Sun Nov 10 20:09:52 2013 +++ src/sys/arch/pmax/ibus/pm.c Tue Jun 13 19:13:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.12 2013/11/10 20:09:52 christos Exp $ */ +/* $NetBSD: pm.c,v 1.13 2017/06/13 19:13:55 spz Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.12 2013/11/10 20:09:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.13 2017/06/13 19:13:55 spz Exp $"); #include #include @@ -666,7 +666,7 @@ pm_get_cmap(struct pm_softc *sc, struct index = p->index; count = p->count; - if (index >= sc->sc_cmap_size || (index + count) > sc->sc_cmap_size) + if (index >= sc->sc_cmap_size || count > sc->sc_cmap_size - index) return (EINVAL); if ((rv = copyout(>sc_cmap.r[index], p->red, count)) != 0) @@ -685,7 +685,7 @@ pm_set_cmap(struct pm_softc *sc, struct index = p->index; count = p->count; - if (index >= sc->sc_cmap_size || (index + count) > sc->sc_cmap_size) + if (index >= sc->sc_cmap_size || count > sc->sc_cmap_size - index) return (EINVAL); if ((rv = copyin(p->red, >sc_cmap.r[index], count)) != 0) Index: src/sys/dev/hpc/bivideo.c diff -u src/sys/dev/hpc/bivideo.c:1.33 src/sys/dev/hpc/bivideo.c:1.34 --- src/sys/dev/hpc/bivideo.c:1.33 Sat Oct 27 17:18:17 2012 +++ src/sys/dev/hpc/bivideo.c Tue Jun 13 19:13:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bivideo.c,v 1.33 2012/10/27 17:18:17 chs Exp $ */ +/* $NetBSD: bivideo.c,v 1.34 2017/06/13 19:13:55 spz Exp $ */ /*- * Copyright (c) 1999-2001 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.33 2012/10/27 17:18:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.34 2017/06/13 19:13:55 spz Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcfb.h" @@ -402,8 +402,8 @@ bivideo_ioctl(void *v, u_long cmd, void if (sc->sc_fbconf.hf_class != HPCFB_CLASS_INDEXCOLOR || sc->sc_fbconf.hf_pack_width != 8 || - 256 <= cmap->index || - 256 < (cmap->index + cmap->count)) + cmap->index >= 256 || + cmap->count > 256 - cmap->index) return (EINVAL); error = copyout(_cmap_r[cmap->index], cmap->red, Index: src/sys/dev/ic/sti.c diff -u src/sys/dev/ic/sti.c:1.18 src/sys/dev/ic/sti.c:1.19 --- src/sys/dev/ic/sti.c:1.18 Sun Jun 29 04:08:43 2014 +++ src/sys/dev/ic/sti.c Tue Jun 13 19:13:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.18 2014/06/29 04:08:43 tsutsui Exp $ */ +/* $NetBSD: sti.c,v 1.19 2017/06/13 19:13:55 spz Exp $ */ /* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti.c,v
CVS commit: src/sys
Module Name:src Committed By: spz Date: Tue Jun 13 19:13:55 UTC 2017 Modified Files: src/sys/arch/ews4800mips/sbd: fb_sbdio.c src/sys/arch/pmax/ibus: pm.c src/sys/dev/hpc: bivideo.c src/sys/dev/ic: sti.c Log Message: correct size checks so they cannot be circumvented by integer overflows reported by CTurt, thanks for the notification To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ews4800mips/sbd/fb_sbdio.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/pmax/ibus/pm.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/hpc/bivideo.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/sti.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: dholland Date: Tue Jun 13 17:18:00 UTC 2017 Modified Files: src/games/fortune/datfiles: fortunes Log Message: another one To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/games/fortune/datfiles/fortunes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: dholland Date: Tue Jun 13 17:18:00 UTC 2017 Modified Files: src/games/fortune/datfiles: fortunes Log Message: another one To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/games/fortune/datfiles/fortunes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/datfiles/fortunes diff -u src/games/fortune/datfiles/fortunes:1.63 src/games/fortune/datfiles/fortunes:1.64 --- src/games/fortune/datfiles/fortunes:1.63 Thu May 4 19:12:53 2017 +++ src/games/fortune/datfiles/fortunes Tue Jun 13 17:18:00 2017 @@ -16203,3 +16203,7 @@ An assortment of ways to be assimilated % The Navy's forever doomed to be inefficient because it's always trying to do things in a sub-optimal manner. +% +Q. What do you do if you find an abomination rooted in and need a +druid in a hurry? +A. Call the copse.
CVS commit: src/sys/arch/cats/cats
Module Name:src Committed By: skrll Date: Tue Jun 13 15:24:05 UTC 2017 Modified Files: src/sys/arch/cats/cats: cats_machdep.c Log Message: Now that bus_space can use devmap - use it for early console To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/cats/cats/cats_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cats/cats
Module Name:src Committed By: skrll Date: Tue Jun 13 15:24:05 UTC 2017 Modified Files: src/sys/arch/cats/cats: cats_machdep.c Log Message: Now that bus_space can use devmap - use it for early console To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/cats/cats/cats_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/cats/cats/cats_machdep.c diff -u src/sys/arch/cats/cats/cats_machdep.c:1.83 src/sys/arch/cats/cats/cats_machdep.c:1.84 --- src/sys/arch/cats/cats/cats_machdep.c:1.83 Sun Mar 19 12:46:21 2017 +++ src/sys/arch/cats/cats/cats_machdep.c Tue Jun 13 15:24:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cats_machdep.c,v 1.83 2017/03/19 12:46:21 skrll Exp $ */ +/* $NetBSD: cats_machdep.c,v 1.84 2017/06/13 15:24:05 skrll Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.83 2017/03/19 12:46:21 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.84 2017/06/13 15:24:05 skrll Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -266,7 +266,7 @@ initarm(void *arm_bootargs) pmap_devmap_bootstrap((vaddr_t)ebsabootinfo.bt_l1, cats_devmap); #ifdef FCOM_INIT_ARM - fcomcnattach(DC21285_ARMCSR_BASE, comcnspeed, comcnmode); + fcomcnattach(DC21285_ARMCSR_VBASE, comcnspeed, comcnmode); #endif /* Talk to the user */
CVS commit: src/sys/arch/arm/footbridge
Module Name:src Committed By: skrll Date: Tue Jun 13 15:23:17 UTC 2017 Modified Files: src/sys/arch/arm/footbridge: footbridge_io.c Log Message: Use devmap if available To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/footbridge/footbridge_io.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/arm/footbridge/footbridge_io.c diff -u src/sys/arch/arm/footbridge/footbridge_io.c:1.22 src/sys/arch/arm/footbridge/footbridge_io.c:1.23 --- src/sys/arch/arm/footbridge/footbridge_io.c:1.22 Sat Feb 22 20:33:00 2014 +++ src/sys/arch/arm/footbridge/footbridge_io.c Tue Jun 13 15:23:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: footbridge_io.c,v 1.22 2014/02/22 20:33:00 matt Exp $ */ +/* $NetBSD: footbridge_io.c,v 1.23 2017/06/13 15:23:17 skrll Exp $ */ /* * Copyright (c) 1997 Causality Limited @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: footbridge_io.c,v 1.22 2014/02/22 20:33:00 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: footbridge_io.c,v 1.23 2017/06/13 15:23:17 skrll Exp $"); #include #include @@ -182,8 +182,8 @@ int footbridge_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { - bus_addr_t startpa, endpa, pa; - vaddr_t va; + paddr_t startpa, endpa, pa; + const struct pmap_devmap *pd; /* Round the allocation to page boundries */ startpa = trunc_page(bpa); @@ -200,12 +200,19 @@ footbridge_mem_bs_map(void *t, bus_addr_ return 0; } + pa = bpa; + if ((pd = pmap_devmap_find_pa(pa, size)) != NULL) { + /* Device was statically mapped. */ + *bshp = pd->pd_va + (pa - pd->pd_pa); + return 0; + } + /* * Eventually this function will do the mapping check for overlapping / * multiple mappings */ - va = uvm_km_alloc(kernel_map, endpa - startpa, 0, + vaddr_t va = uvm_km_alloc(kernel_map, endpa - startpa, 0, UVM_KMF_VAONLY | UVM_KMF_NOWAIT); if (va == 0) return ENOMEM;
CVS commit: src/sys/arch/arm/footbridge
Module Name:src Committed By: skrll Date: Tue Jun 13 15:23:17 UTC 2017 Modified Files: src/sys/arch/arm/footbridge: footbridge_io.c Log Message: Use devmap if available To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/footbridge/footbridge_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: chs Date: Tue Jun 13 14:05:47 UTC 2017 Modified Files: src/sys/sys: disk.h Log Message: move include of back to where userland will get it. some third-party software relies on this header including that one. pointed out by joerg. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/sys/disk.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/disk.h diff -u src/sys/sys/disk.h:1.71 src/sys/sys/disk.h:1.72 --- src/sys/sys/disk.h:1.71 Thu Jun 8 22:24:59 2017 +++ src/sys/sys/disk.h Tue Jun 13 14:05:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: disk.h,v 1.71 2017/06/08 22:24:59 chs Exp $ */ +/* $NetBSD: disk.h,v 1.72 2017/06/13 14:05:47 chs Exp $ */ /*- * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc. @@ -82,6 +82,7 @@ #include #include #include +#include /* * Disk information dictionary. @@ -299,7 +300,6 @@ struct disk_strategy { #ifdef _KERNEL #include #include -#include #include
CVS commit: src/sys/sys
Module Name:src Committed By: chs Date: Tue Jun 13 14:05:47 UTC 2017 Modified Files: src/sys/sys: disk.h Log Message: move include of back to where userland will get it. some third-party software relies on this header including that one. pointed out by joerg. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/sys/disk.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Jun 13 13:46:14 UTC 2017 Modified Files: src/doc: 3RDPARTY Log Message: gdb-8.0 out. To generate a diff of this commit: cvs rdiff -u -r1.1448 -r1.1449 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.1448 src/doc/3RDPARTY:1.1449 --- src/doc/3RDPARTY:1.1448 Thu Jun 8 16:44:03 2017 +++ src/doc/3RDPARTY Tue Jun 13 13:46:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1448 2017/06/08 16:44:03 abhinav Exp $ +# $NetBSD: 3RDPARTY,v 1.1449 2017/06/13 13:46:14 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -483,7 +483,7 @@ Before importing a new version of extern Package: gdb Version: 7.12 -Current Vers: 7.12.1 +Current Vers: 8.0 Maintainer: FSF Archive Site: ftp://ftp.gnu.org/gnu/gdb/ Home Page: http://www.gnu.org/software/gdb/
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Jun 13 13:46:14 UTC 2017 Modified Files: src/doc: 3RDPARTY Log Message: gdb-8.0 out. To generate a diff of this commit: cvs rdiff -u -r1.1448 -r1.1449 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/find
Module Name:src Committed By: christos Date: Tue Jun 13 13:10:32 UTC 2017 Modified Files: src/usr.bin/find: function.c Log Message: PR/52295: Anthony Mallet: find -delete: "relative path not safe" with absolute paths ... Fix from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/usr.bin/find/function.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/find/function.c diff -u src/usr.bin/find/function.c:1.75 src/usr.bin/find/function.c:1.76 --- src/usr.bin/find/function.c:1.75 Sun Jun 12 22:06:44 2016 +++ src/usr.bin/find/function.c Tue Jun 13 09:10:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: function.c,v 1.75 2016/06/13 02:06:44 pgoyette Exp $ */ +/* $NetBSD: function.c,v 1.76 2017/06/13 13:10:32 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: function.c,v 1.75 2016/06/13 02:06:44 pgoyette Exp $"); +__RCSID("$NetBSD: function.c,v 1.76 2017/06/13 13:10:32 christos Exp $"); #endif #endif /* not lint */ @@ -465,7 +465,7 @@ f_delete(PLAN *plan __unused, FTSENT *en errx(1, "-delete: insecure options got turned on"); /* Potentially unsafe - do not accept relative paths whatsoever */ - if (strchr(entry->fts_accpath, '/') != NULL) + if (entry->fts_level > 0 && strchr(entry->fts_accpath, '/') != NULL) errx(1, "-delete: %s: relative path potentially not safe", entry->fts_accpath);
CVS commit: src/usr.bin/find
Module Name:src Committed By: christos Date: Tue Jun 13 13:10:32 UTC 2017 Modified Files: src/usr.bin/find: function.c Log Message: PR/52295: Anthony Mallet: find -delete: "relative path not safe" with absolute paths ... Fix from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/usr.bin/find/function.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Jun 13 09:37:22 UTC 2017 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Sync with FreeBSD r316541: > Fix a double free in ixgbe_rxeof() > > Submitted by:rstone > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D10255 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ix_txrx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Jun 13 09:37:22 UTC 2017 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Sync with FreeBSD r316541: > Fix a double free in ixgbe_rxeof() > > Submitted by:rstone > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D10255 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ix_txrx.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/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.26 src/sys/dev/pci/ixgbe/ix_txrx.c:1.27 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.26 Tue Jun 13 09:35:12 2017 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue Jun 13 09:37:22 2017 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/ -/*$NetBSD: ix_txrx.c,v 1.26 2017/06/13 09:35:12 msaitoh Exp $*/ +/*$NetBSD: ix_txrx.c,v 1.27 2017/06/13 09:37:22 msaitoh Exp $*/ #include "opt_inet.h" #include "opt_inet6.h" @@ -1446,21 +1446,10 @@ fail: static void ixgbe_free_receive_ring(struct rx_ring *rxr) -{ - struct ixgbe_rx_buf *rxbuf; +{ for (int i = 0; i < rxr->num_desc; i++) { - rxbuf = >rx_buffers[i]; - if (rxbuf->buf != NULL) { - bus_dmamap_sync(rxr->ptag->dt_dmat, rxbuf->pmap, - 0, rxbuf->buf->m_pkthdr.len, - BUS_DMASYNC_POSTREAD); - ixgbe_dmamap_unload(rxr->ptag, rxbuf->pmap); - rxbuf->buf->m_flags |= M_PKTHDR; - m_freem(rxbuf->buf); - rxbuf->buf = NULL; - rxbuf->flags = 0; - } + ixgbe_rx_discard(rxr, i); } } @@ -1632,7 +1621,9 @@ fail: */ for (int i = 0; i < j; ++i) { rxr = >rx_rings[i]; + IXGBE_RX_LOCK(rxr); ixgbe_free_receive_ring(rxr); + IXGBE_RX_UNLOCK(rxr); } return (ENOBUFS); @@ -1686,15 +1677,7 @@ ixgbe_free_receive_buffers(struct rx_rin if (rxr->rx_buffers != NULL) { for (int i = 0; i < adapter->num_rx_desc; i++) { rxbuf = >rx_buffers[i]; - if (rxbuf->buf != NULL) { -bus_dmamap_sync(rxr->ptag->dt_dmat, -rxbuf->pmap, 0, rxbuf->buf->m_pkthdr.len, -BUS_DMASYNC_POSTREAD); -ixgbe_dmamap_unload(rxr->ptag, rxbuf->pmap); -rxbuf->buf->m_flags |= M_PKTHDR; -m_freem(rxbuf->buf); - } - rxbuf->buf = NULL; + ixgbe_rx_discard(rxr, i); if (rxbuf->pmap != NULL) { ixgbe_dmamap_destroy(rxr->ptag, rxbuf->pmap); rxbuf->pmap = NULL; @@ -1772,11 +1755,14 @@ ixgbe_rx_discard(struct rx_ring *rxr, in */ if (rbuf->fmp != NULL) {/* Partial chain ? */ - rbuf->fmp->m_flags |= M_PKTHDR; + bus_dmamap_sync(rxr->ptag->dt_dmat, rbuf->pmap, 0, + rbuf->buf->m_pkthdr.len, BUS_DMASYNC_POSTREAD); m_freem(rbuf->fmp); rbuf->fmp = NULL; rbuf->buf = NULL; /* rbuf->buf is part of fmp's chain */ } else if (rbuf->buf) { + bus_dmamap_sync(rxr->ptag->dt_dmat, rbuf->pmap, 0, + rbuf->buf->m_pkthdr.len, BUS_DMASYNC_POSTREAD); m_free(rbuf->buf); rbuf->buf = NULL; } @@ -1870,6 +1856,9 @@ ixgbe_rxeof(struct ix_queue *que) goto next_desc; } + bus_dmamap_sync(rxr->ptag->dt_dmat, rbuf->pmap, 0, + rbuf->buf->m_pkthdr.len, BUS_DMASYNC_POSTREAD); + /* ** On 82599 which supports a hardware ** LRO (called HW RSC), packets need
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Jun 13 09:35:12 UTC 2017 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Fix the partial chain check in ixgbe_rx_discard(). This bug was addded in rev. 1.33. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ix_txrx.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/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.25 src/sys/dev/pci/ixgbe/ix_txrx.c:1.26 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.25 Fri Jun 9 03:19:55 2017 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue Jun 13 09:35:12 2017 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/ -/*$NetBSD: ix_txrx.c,v 1.25 2017/06/09 03:19:55 msaitoh Exp $*/ +/*$NetBSD: ix_txrx.c,v 1.26 2017/06/13 09:35:12 msaitoh Exp $*/ #include "opt_inet.h" #include "opt_inet6.h" @@ -1771,7 +1771,7 @@ ixgbe_rx_discard(struct rx_ring *rxr, in ** and mapping. */ - if (rbuf->buf != NULL) {/* Partial chain ? */ + if (rbuf->fmp != NULL) {/* Partial chain ? */ rbuf->fmp->m_flags |= M_PKTHDR; m_freem(rbuf->fmp); rbuf->fmp = NULL;
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Jun 13 09:35:12 UTC 2017 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Fix the partial chain check in ixgbe_rx_discard(). This bug was addded in rev. 1.33. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ix_txrx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man
Module Name:src Committed By: nat Date: Tue Jun 13 09:11:22 UTC 2017 Modified Files: src/share/man/man4: Makefile src/share/man/man9: Makefile Log Message: Add wsbell. Found by wiz@. To generate a diff of this commit: cvs rdiff -u -r1.637 -r1.638 src/share/man/man4/Makefile cvs rdiff -u -r1.414 -r1.415 src/share/man/man9/Makefile 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/Makefile diff -u src/share/man/man4/Makefile:1.637 src/share/man/man4/Makefile:1.638 --- src/share/man/man4/Makefile:1.637 Sat May 27 21:02:55 2017 +++ src/share/man/man4/Makefile Tue Jun 13 09:11:22 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.637 2017/05/27 21:02:55 bouyer Exp $ +# $NetBSD: Makefile,v 1.638 2017/06/13 09:11:22 nat Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -69,7 +69,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a viornd.4 vioscsi.4 virt.4 \ virtio.4 vlan.4 vmmon.4 vmnet.4 vnd.4 voodoofb.4 vr.4 vte.4 \ wapbl.4 wb.4 wbsio.4 wd.4 wdc.4 wi.4 wm.4 wpi.4 \ - wscons.4 wsdisplay.4 wsfont.4 wskbd.4 wsmouse.4 wsmux.4 \ + wsbell.4 wscons.4 wsdisplay.4 wsfont.4 wskbd.4 wsmouse.4 wsmux.4 \ xbox.4 xge.4 \ yds.4 ym.4 \ zero.4 zstty.4 zyd.4 Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.414 src/share/man/man9/Makefile:1.415 --- src/share/man/man9/Makefile:1.414 Sun May 21 19:07:29 2017 +++ src/share/man/man9/Makefile Tue Jun 13 09:11:22 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.414 2017/05/21 19:07:29 abhinav Exp $ +# $NetBSD: Makefile,v 1.415 2017/06/13 09:11:22 nat Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -61,7 +61,7 @@ MAN= accept_filter.9 accf_data.9 accf_ht vnfileops.9 vnode.9 vnodeops.9 vnsubr.9 \ ubc.9 usbd_status.9 usbdi.9 uvm.9 uvm_hotplug.9 uvm_km.9 uvm_map.9 \ vmem.9 wapbl.9 wdc.9 workqueue.9 \ - wscons.9 wsdisplay.9 wsfont.9 wskbd.9 wsmouse.9 \ + wsbell.9 wscons.9 wsdisplay.9 wsfont.9 wskbd.9 wsmouse.9 \ xcall.9 MAN+= boothowto.9
CVS commit: src/share/man
Module Name:src Committed By: nat Date: Tue Jun 13 09:11:22 UTC 2017 Modified Files: src/share/man/man4: Makefile src/share/man/man9: Makefile Log Message: Add wsbell. Found by wiz@. To generate a diff of this commit: cvs rdiff -u -r1.637 -r1.638 src/share/man/man4/Makefile cvs rdiff -u -r1.414 -r1.415 src/share/man/man9/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/crypto/opencrypto
Module Name:src Committed By: martin Date: Tue Jun 13 08:16:16 UTC 2017 Modified Files: src/tests/crypto/opencrypto: h_ioctl.c Log Message: Avoid variable lenght buffers to help the stack protector (hopefully no functional change) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/crypto/opencrypto/h_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/crypto/opencrypto/h_ioctl.c diff -u src/tests/crypto/opencrypto/h_ioctl.c:1.1 src/tests/crypto/opencrypto/h_ioctl.c:1.2 --- src/tests/crypto/opencrypto/h_ioctl.c:1.1 Fri Jun 9 06:09:02 2017 +++ src/tests/crypto/opencrypto/h_ioctl.c Tue Jun 13 08:16:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: h_ioctl.c,v 1.1 2017/06/09 06:09:02 knakahara Exp $ */ +/* $NetBSD: h_ioctl.c,v 1.2 2017/06/13 08:16:16 martin Exp $ */ /*- * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -69,11 +69,11 @@ static int test_ngsession(int fd) { int ret; - int cs_count = 2; struct crypt_sgop sg; - struct session_n_op css[cs_count]; + struct session_n_op css[2]; + const size_t cs_count = __arraycount(css); - for (int i = 0; i < cs_count; i++) { + for (size_t i = 0; i < cs_count; i++) { struct session_n_op *cs = [i]; memset(cs, 0, sizeof(*cs)); @@ -100,9 +100,9 @@ static int test_nfsession(int fd) { int ret; - int sid_count = 2; struct crypt_sfop sf; - u_int32_t sids[sid_count]; + u_int32_t sids[2]; + const size_t sid_count = __arraycount(sids); memset(sids, 0, sizeof(sids)); memset(, 0, sizeof(sf)); @@ -124,11 +124,11 @@ static int test_ncryptm(int fd) { int ret; - int cs_count = 2; struct crypt_mop mop; - struct crypt_n_op css[cs_count]; + struct crypt_n_op css[2]; + const size_t cs_count = __arraycount(css); - for (int i = 0; i < cs_count; i++) { + for (size_t i = 0; i < cs_count; i++) { struct crypt_n_op *cs; cs = [i]; @@ -157,11 +157,11 @@ static int test_ncryptretm(int fd) { int ret; - int req_count = 2; struct session_op cs; struct crypt_mop mop; - struct crypt_n_op cnos[req_count]; + struct crypt_n_op cnos[2]; + const size_t req_count = __arraycount(cnos); unsigned char cno_dst[req_count][AES_CIPHER_LEN]; struct cryptret cret; @@ -177,7 +177,7 @@ test_ncryptretm(int fd) return ret; } - for (int i = 0; i < req_count; i++) { + for (size_t i = 0; i < req_count; i++) { struct crypt_n_op *cno = [i]; memset(cno, 0, sizeof(*cno)); @@ -196,7 +196,7 @@ test_ncryptretm(int fd) if (ret < 0) fprintf(stderr, "failed: CIOCNCRYPTM\n"); - for (int i = 0; i < req_count; i++) { + for (size_t i = 0; i < req_count; i++) { struct crypt_result *cr = [i]; memset(cr, 0, sizeof(*cr));
CVS commit: src/tests/crypto/opencrypto
Module Name:src Committed By: martin Date: Tue Jun 13 08:16:16 UTC 2017 Modified Files: src/tests/crypto/opencrypto: h_ioctl.c Log Message: Avoid variable lenght buffers to help the stack protector (hopefully no functional change) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/crypto/opencrypto/h_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Tue Jun 13 08:10:52 UTC 2017 Modified Files: src/share/man/man4: wsmux.4 Log Message: Fix typo in macro name. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/wsmux.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/wsmux.4 diff -u src/share/man/man4/wsmux.4:1.13 src/share/man/man4/wsmux.4:1.14 --- src/share/man/man4/wsmux.4:1.13 Tue Jun 13 06:37:21 2017 +++ src/share/man/man4/wsmux.4 Tue Jun 13 08:10:52 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: wsmux.4,v 1.13 2017/06/13 06:37:21 pgoyette Exp $ +.\" $NetBSD: wsmux.4,v 1.14 2017/06/13 08:10:52 wiz Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -71,7 +71,7 @@ and detached. .Pp If a .Xr wskbd 4 , -.X4 wsbell 4 , +.Xr wsbell 4 , or .Xr wsmouse 4 device is opened despite having a mux it will be detached from the mux.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Tue Jun 13 08:10:52 UTC 2017 Modified Files: src/share/man/man4: wsmux.4 Log Message: Fix typo in macro name. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/wsmux.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: nat Date: Tue Jun 13 06:39:09 UTC 2017 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/man: mi Log Message: Update for wsbell(4) manual pages. To generate a diff of this commit: cvs rdiff -u -r1.2139 -r1.2140 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.1557 -r1.1558 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2139 src/distrib/sets/lists/comp/mi:1.2140 --- src/distrib/sets/lists/comp/mi:1.2139 Mon Jun 5 23:44:08 2017 +++ src/distrib/sets/lists/comp/mi Tue Jun 13 06:39:09 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2139 2017/06/05 23:44:08 christos Exp $ +# $NetBSD: mi,v 1.2140 2017/06/13 06:39:09 nat Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -11580,6 +11580,7 @@ ./usr/share/man/cat9/workqueue_destroy.0 comp-sys-catman .cat ./usr/share/man/cat9/workqueue_enqueue.0 comp-sys-catman .cat ./usr/share/man/cat9/writedisklabel.0 comp-sys-catman .cat +./usr/share/man/cat9/wsbell.0 comp-sys-catman .cat ./usr/share/man/cat9/wscons.0 comp-sys-catman .cat ./usr/share/man/cat9/wsdisplay.0 comp-sys-catman .cat ./usr/share/man/cat9/wsdisplay_cnattach.0 comp-sys-catman .cat @@ -18992,6 +18993,7 @@ ./usr/share/man/html9/workqueue_destroy.html comp-sys-htmlman html ./usr/share/man/html9/workqueue_enqueue.html comp-sys-htmlman html ./usr/share/man/html9/writedisklabel.html comp-sys-htmlman html +./usr/share/man/html9/wsbell.html comp-sys-htmlman html ./usr/share/man/html9/wscons.html comp-sys-htmlman html ./usr/share/man/html9/wsdisplay.html comp-sys-htmlman html ./usr/share/man/html9/wsdisplay_cnattach.html comp-sys-htmlman html @@ -26656,6 +26658,7 @@ ./usr/share/man/man9/workqueue_destroy.9 comp-sys-man .man ./usr/share/man/man9/workqueue_enqueue.9 comp-sys-man .man ./usr/share/man/man9/writedisklabel.9 comp-sys-man .man +./usr/share/man/man9/wsbell.9 comp-sys-man .man ./usr/share/man/man9/wscons.9 comp-sys-man .man ./usr/share/man/man9/wsdisplay.9 comp-sys-man .man ./usr/share/man/man9/wsdisplay_cnattach.9 comp-sys-man .man Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1557 src/distrib/sets/lists/man/mi:1.1558 --- src/distrib/sets/lists/man/mi:1.1557 Sat May 27 21:02:55 2017 +++ src/distrib/sets/lists/man/mi Tue Jun 13 06:39:09 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1557 2017/05/27 21:02:55 bouyer Exp $ +# $NetBSD: mi,v 1.1558 2017/06/13 06:39:09 nat Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1976,6 +1976,7 @@ ./usr/share/man/cat4/wmihp.0 man-sys-catman .cat ./usr/share/man/cat4/wmimsi.0 man-sys-catman .cat ./usr/share/man/cat4/wpi.0 man-sys-catman .cat +./usr/share/man/cat4/wsbell.0 man-sys-catman .cat ./usr/share/man/cat4/wscons.0 man-sys-catman .cat ./usr/share/man/cat4/wsdisplay.0 man-sys-catman .cat ./usr/share/man/cat4/wsfont.0 man-sys-catman .cat @@ -5011,6 +5012,7 @@ ./usr/share/man/html4/wmihp.html man-sys-htmlman html ./usr/share/man/html4/wmimsi.html man-sys-htmlman html ./usr/share/man/html4/wpi.html man-sys-htmlman html +./usr/share/man/html4/wsbell.html man-sys-htmlman html ./usr/share/man/html4/wscons.html man-sys-htmlman html ./usr/share/man/html4/wsdisplay.html man-sys-htmlman html ./usr/share/man/html4/wsfont.html man-sys-htmlman html @@ -7978,6 +7980,7 @@ ./usr/share/man/man4/wmihp.4 man-sys-man .man ./usr/share/man/man4/wmimsi.4 man-sys-man .man ./usr/share/man/man4/wpi.4 man-sys-man .man +./usr/share/man/man4/wsbell.4 man-sys-man .man ./usr/share/man/man4/wscons.4 man-sys-man .man ./usr/share/man/man4/wsdisplay.4 man-sys-man .man ./usr/share/man/man4/wsfont.4 man-sys-man .man
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: nat Date: Tue Jun 13 06:39:09 UTC 2017 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/man: mi Log Message: Update for wsbell(4) manual pages. To generate a diff of this commit: cvs rdiff -u -r1.2139 -r1.2140 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.1557 -r1.1558 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Tue Jun 13 06:37:21 UTC 2017 Modified Files: src/share/man/man4: wsmux.4 Log Message: Update for inclusion of references to the new wsbell(4) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/wsmux.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/wsmux.4 diff -u src/share/man/man4/wsmux.4:1.12 src/share/man/man4/wsmux.4:1.13 --- src/share/man/man4/wsmux.4:1.12 Sun Mar 6 17:39:05 2011 +++ src/share/man/man4/wsmux.4 Tue Jun 13 06:37:21 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: wsmux.4,v 1.12 2011/03/06 17:39:05 wiz Exp $ +.\" $NetBSD: wsmux.4,v 1.13 2017/06/13 06:37:21 pgoyette Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -24,15 +24,16 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 26, 1999 +.Dd June 13, 2017 .Dt WSMUX 4 .Os .Sh NAME .Nm wsmux .Nd console keyboard/mouse multiplexor for wscons .Sh SYNOPSIS -.Cd "wskbd* at ... mux 1" -.Cd "wsmouse* at ... mux 0" +.Cd "wskbd*at ... mux 1" +.Cd "wsbell* at ... mux 1" +.Cd "wsmouse* at ... mux 0" .Pp .Cd pseudo-device wsmux .Sh DESCRIPTION @@ -43,7 +44,7 @@ is a pseudo-device driver that allows se input devices to have their events multiplexed into one stream. .Pp The typical usage for this device is to have two multiplexors, one -for mouse events and one for keyboard events. +for mouse events and one for keyboard and bell events. All .Xr wsmouse 4 devices should direct their events to the mouse mux (normally 0) @@ -60,12 +61,17 @@ command. It will then receive all keystrokes from all keyboards and, furthermore, keyboards can be dynamically attached and detached without further user interaction. +Additionally, bell events generated for the display will be directed to +all attached +.Xr wsbell 4 +devices. In a similar way, the window system will open the mouse multiplexor and receive all mouse events; mice can also be dynamically attached and detached. .Pp If a -.Xr wskbd 4 +.Xr wskbd 4 , +.X4 wsbell 4 , or .Xr wsmouse 4 device is opened despite having a mux it will be detached from the mux. @@ -99,6 +105,7 @@ a.k.a. .Pa /usr/include/dev/wscons/wsconsio.h .El .Sh SEE ALSO +.Xr wsbell 4 , .Xr wscons 4 , .Xr wsdisplay 4 , .Xr wskbd 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Tue Jun 13 06:37:21 UTC 2017 Modified Files: src/share/man/man4: wsmux.4 Log Message: Update for inclusion of references to the new wsbell(4) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/wsmux.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man
Module Name:src Committed By: nat Date: Tue Jun 13 06:27:10 UTC 2017 Added Files: src/share/man/man4: wsbell.4 src/share/man/man9: wsbell.9 Log Message: Manual pages for wsbell. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/share/man/man4/wsbell.4 cvs rdiff -u -r0 -r1.1 src/share/man/man9/wsbell.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man
Module Name:src Committed By: nat Date: Tue Jun 13 06:27:10 UTC 2017 Added Files: src/share/man/man4: wsbell.4 src/share/man/man9: wsbell.9 Log Message: Manual pages for wsbell. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/share/man/man4/wsbell.4 cvs rdiff -u -r0 -r1.1 src/share/man/man9/wsbell.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/share/man/man4/wsbell.4 diff -u /dev/null src/share/man/man4/wsbell.4:1.1 --- /dev/null Tue Jun 13 06:27:10 2017 +++ src/share/man/man4/wsbell.4 Tue Jun 13 06:27:10 2017 @@ -0,0 +1,107 @@ +.\" $NetBSD: wsbell.4,v 1.1 2017/06/13 06:27:10 nat Exp $ +.\" +.\" Copyright (c) 2017 Nathanial Sloss+.\" 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. +.\" +.Dd June 13, 2017 +.Dt WSBELL 4 +.Os +.Sh NAME +.Nm wsbell +.Nd generic bell support in wscons +.Sh SYNOPSIS +.Cd "wsbell*at spkr? console?" +.Sh DESCRIPTION +The +.Nm +driver utilizes the +.Xr speaker 4 +driver to provide a system bell with or without a keyboard for the +.Xr wscons 4 +framework. +When a bell character is received on a +.Xr wsdisplay 4 +screen, +.Nm +sounds the bell. +.Pp +The +.Xr wsconsctl 8 +utility gives access to several configurable parameters that effect the sound +of the system bell. +.Ss Ioctls +The following +.Xr ioctl 2 +calls are provided by the +.Nm +driver. +Their definitions are found in +.Pa dev/wscons/wsconsio.h . +.Bl -tag -width Dv +.It Dv WSKBDIO_BELL +Will sound the default bell. +.It Dv WSKBDIO_GETBELL +Will return a struct wskbd_bell_data with the current bell parameters. +.It Dv WSKBDIO_SETBELL +Takes a struct wskbd_bell_data and uses it to set the bell parameters. +These are used by the WSKBDIO_BELL +.Xr ioctl 2 +call. +.It Dv WSKBDIO_COMPLEXBELL +Will sound a bell using a supplied struct wskbd_bell_data for its parameters. +.It Dv WSKBDIO_GETDEFAULTBELL +Will return a struct wskbd_bell_data with the +.Em default +bell parameters. +.It Dv WSKBDIO_SETDEFAULTBELL +Takes a struct wskbd_bell_data and uses it to set the +.Em default +bell parameters. +.El +.Pp +Ioctls use the following structure: +.Bd -literal +struct wskbd_bell_data { + u_int which; /* values to get/set */ +#define WSKBD_BELL_DOPITCH 0x1 /* get/set pitch */ +#define WSKBD_BELL_DOPERIOD 0x2 /* get/set period */ +#define WSKBD_BELL_DOVOLUME 0x4 /* get/set volume */ +#define WSKBD_BELL_DOALL 0x7 /* all of the above */ + u_int pitch; /* pitch, in Hz */ + u_int period; /* period, in milliseconds */ + u_int volume; /* percentage of max volume */ +}; +.Ed +.Sh FILES +.Bl -item +.It +.Pa /usr/include/dev/wscons/wsconsio.h . +.El +.Sh SEE ALSO +.Xr speaker 4 , +.Xr wscons 4 , +.Xr wskbd 4 , +.Xr wsmux 4 , +.Xr wsconsctl 8 , +.Xr wsbell 9 Index: src/share/man/man9/wsbell.9 diff -u /dev/null src/share/man/man9/wsbell.9:1.1 --- /dev/null Tue Jun 13 06:27:10 2017 +++ src/share/man/man9/wsbell.9 Tue Jun 13 06:27:10 2017 @@ -0,0 +1,112 @@ +.\" $NetBSD: wsbell.9,v 1.1 2017/06/13 06:27:10 nat Exp $ +.\" +.\" Copyright (c) 2017 Nathanial Sloss +.\" 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 +.\"
CVS commit: src/share/man/man4
Module Name:src Committed By: nat Date: Tue Jun 13 06:25:20 UTC 2017 Modified Files: src/share/man/man4: speaker.4 Log Message: Update the speaker man page, mentioning wsbell and new formatting for ioctls. Ok pgoyette@. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/speaker.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/speaker.4 diff -u src/share/man/man4/speaker.4:1.22 src/share/man/man4/speaker.4:1.23 --- src/share/man/man4/speaker.4:1.22 Sun Jun 11 10:30:15 2017 +++ src/share/man/man4/speaker.4 Tue Jun 13 06:25:20 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: speaker.4,v 1.22 2017/06/11 10:30:15 pgoyette Exp $ +.\" $NetBSD: speaker.4,v 1.23 2017/06/13 06:25:20 nat Exp $ .\" .\" Copyright (c) 2016 Nathanial Sloss.\" All rights reserved. @@ -35,7 +35,7 @@ .\" .\" <> .\" -.Dd June 11, 2017 +.Dd June 13, 2017 .Dt SPEAKER 4 .Os .Sh NAME @@ -77,10 +77,9 @@ Other processes may emit beeps while the .Pp For the audio device speaker, the speaker uses one of the virtual audio channels. -Enabling this device will also provide a keyboard bell. -The audio device used for synthesized beeps can be controlled by the -.Sq hw.beep.device -sysctl variable. +Enabling this device will also provide a +.Xr wsbell 4 +keyboard bell. .Pp Applications may call .Fn ioctl @@ -88,18 +87,30 @@ on a speaker file descriptor to control definitions for the .Fn ioctl interface are in -.In machine/spkr.h . -The tone_t structure used in these calls has two fields, -specifying a frequency (in hz) and a duration (in 1/100ths of a second). +.In dev/spkrio.h . +.Pp +The tone_t structure is as follows: +.Bd -literal +typedef struct { + int frequency; /* in hertz */ + int duration; /* in 1/100ths of a second */ +} tone_t; +.Ed A frequency of zero is interpreted as a rest. .Pp -At present there are two such ioctls. -SPKRTONE accepts a pointer to a -single tone structure as third argument and plays it. -SPKRTUNE accepts a -pointer to the first of an array of tone structures and plays them in -continuous sequence; this array must be terminated by a final member with -a zero duration. +At present there are four ioctls: +.Bl -tag -width Dv +.It Dv SPKRGETVOL +Returns an integer, which is the current bell volume as a percentage (0-100). +.It Dv SPKRSETVOL +Accepts an integer, which is the desired volume as a percentage. +.It Dv SPKRTONE +Accepts a pointer to a single tone structure as third argument and plays it. +.It Dv SPKRTUNE +Accepts a pointer to the first of an array of tone structures and plays +them in continuous sequence; this array must be terminated by a final member +with a zero duration. +.El .Pp The play-string language is modelled on the PLAY statement conventions of IBM BASIC 2.0. @@ -197,7 +208,9 @@ melody sections. .It Pa /dev/speaker .El .Sh SEE ALSO +.Xr audio 4 , .Xr pcppi 4 , +.Xr wsbell 4 , .Xr sysctl 8 .Sh HISTORY This
CVS commit: src/share/man/man4
Module Name:src Committed By: nat Date: Tue Jun 13 06:25:20 UTC 2017 Modified Files: src/share/man/man4: speaker.4 Log Message: Update the speaker man page, mentioning wsbell and new formatting for ioctls. Ok pgoyette@. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/speaker.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.