CVS commit: src/tests/usr.bin/config
Module Name:src Committed By: uebayasi Date: Sun Oct 4 07:59:47 UTC 2015 Modified Files: src/tests/usr.bin/config: t_config.sh Log Message: Catch up with the current, generated Makefile format. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/config/t_config.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/usr.bin/config/t_config.sh diff -u src/tests/usr.bin/config/t_config.sh:1.6 src/tests/usr.bin/config/t_config.sh:1.7 --- src/tests/usr.bin/config/t_config.sh:1.6 Thu Nov 20 09:02:00 2014 +++ src/tests/usr.bin/config/t_config.sh Sun Oct 4 07:59:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: t_config.sh,v 1.6 2014/11/20 09:02:00 uebayasi Exp $ +# $NetBSD: t_config.sh,v 1.7 2015/10/04 07:59:47 uebayasi Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -147,9 +147,9 @@ check_select() { local f=Makefile - grep -q '^a\.o:' $f && - grep -q '^b\.o:' $f && - grep -q '^c\.o:' $f && + grep -q '^ a\.c ' $f && + grep -q '^ b\.c ' $f && + grep -q '^ c\.c ' $f && : } select_body() {
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: joerg Date: Sun Oct 4 08:15:46 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: autoconf.c Log Message: Panic takes a format string. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/arch/sparc/sparc/autoconf.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/sparc/sparc/autoconf.c diff -u src/sys/arch/sparc/sparc/autoconf.c:1.258 src/sys/arch/sparc/sparc/autoconf.c:1.259 --- src/sys/arch/sparc/sparc/autoconf.c:1.258 Tue Aug 12 13:53:49 2014 +++ src/sys/arch/sparc/sparc/autoconf.c Sun Oct 4 08:15:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.258 2014/08/12 13:53:49 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.259 2015/10/04 08:15:46 joerg Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.258 2014/08/12 13:53:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.259 2015/10/04 08:15:46 joerg Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1296,7 +1296,7 @@ extern struct sparc_bus_space_tag mainbu if ((node = findnode(node0, sp)) == 0) { if (ssp->flags & BS_OPTIONAL) continue; printf("could not find %s in OPENPROM\n", sp); - panic(sp); + panic("%s", sp); } memset(&ma, 0, sizeof ma); @@ -1318,7 +1318,7 @@ extern struct sparc_bus_space_tag mainbu if (config_found(dev, (void *)&ma, mbprint) == NULL) { if (ssp->flags & BS_OPTIONAL) continue; - panic(sp); + panic("%s", sp); } }
CVS commit: src/sys/arch
Module Name:src Committed By: joerg Date: Sun Oct 4 08:16:14 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: db_disasm.c src/sys/arch/sparc64/sparc64: db_disasm.c Log Message: Avoid left-shifting negative values. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sparc/sparc/db_disasm.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc64/sparc64/db_disasm.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/sparc/sparc/db_disasm.c diff -u src/sys/arch/sparc/sparc/db_disasm.c:1.20 src/sys/arch/sparc/sparc/db_disasm.c:1.21 --- src/sys/arch/sparc/sparc/db_disasm.c:1.20 Thu Apr 14 08:59:09 2011 +++ src/sys/arch/sparc/sparc/db_disasm.c Sun Oct 4 08:16:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.20 2011/04/14 08:59:09 mrg Exp $ */ +/* $NetBSD: db_disasm.c,v 1.21 2015/10/04 08:16:13 joerg Exp $ */ /* * Copyright (c) 1994 David S. Miller, da...@nadzieja.rutgers.edu @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.20 2011/04/14 08:59:09 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.21 2015/10/04 08:16:13 joerg Exp $"); #include #include @@ -900,7 +900,7 @@ db_disasm(vaddr_t loc, bool altfmt) if (((bitmask>>30) & 0x3) == 0x1) { /* Call */ - you_lose = ((~0x1)<<30); + you_lose = ((~0x1U)<<30); } else if (((bitmask>>30) & 0x3) == 0x0) { if (((bitmask>>22) & 0x7) == 0x4) { /* Sethi */ Index: src/sys/arch/sparc64/sparc64/db_disasm.c diff -u src/sys/arch/sparc64/sparc64/db_disasm.c:1.17 src/sys/arch/sparc64/sparc64/db_disasm.c:1.18 --- src/sys/arch/sparc64/sparc64/db_disasm.c:1.17 Thu Feb 27 18:14:52 2014 +++ src/sys/arch/sparc64/sparc64/db_disasm.c Sun Oct 4 08:16:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.17 2014/02/27 18:14:52 joerg Exp $ */ +/* $NetBSD: db_disasm.c,v 1.18 2015/10/04 08:16:14 joerg Exp $ */ /* * Copyright (c) 1994 David S. Miller, da...@nadzieja.rutgers.edu @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.17 2014/02/27 18:14:52 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.18 2015/10/04 08:16:14 joerg Exp $"); #include #include @@ -905,7 +905,7 @@ db_disasm(db_addr_t loc, bool altfmt) if (((bitmask>>30) & 0x3) == 0x1) { /* Call */ - you_lose = ((~0x1)<<30); + you_lose = ((~0x1U)<<30); } else if (((bitmask>>30) & 0x3) == 0x0) { if (((bitmask>>22) & 0x7) == 0x4) { /* Sethi */
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: joerg Date: Sun Oct 4 08:17:03 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: db_interface.c Log Message: Arrays are never NULL. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sparc/sparc/db_interface.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/sparc/sparc/db_interface.c diff -u src/sys/arch/sparc/sparc/db_interface.c:1.90 src/sys/arch/sparc/sparc/db_interface.c:1.91 --- src/sys/arch/sparc/sparc/db_interface.c:1.90 Fri Feb 28 10:16:51 2014 +++ src/sys/arch/sparc/sparc/db_interface.c Sun Oct 4 08:17:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.90 2014/02/28 10:16:51 skrll Exp $ */ +/* $NetBSD: db_interface.c,v 1.91 2015/10/04 08:17:03 joerg Exp $ */ /* * Mach Operating System @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.90 2014/02/28 10:16:51 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.91 2015/10/04 08:17:03 joerg Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -240,9 +240,6 @@ db_suspend_others(void) int cpu_me = cpu_number(); int win; - if (cpus == NULL) - return 1; - __cpu_simple_lock(&db_lock); if (ddb_cpu == NOCPU) ddb_cpu = cpu_me;
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: joerg Date: Sun Oct 4 08:17:43 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: msiiep.c Log Message: Don't check unsigned values for negativity. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sparc/sparc/msiiep.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/sparc/sparc/msiiep.c diff -u src/sys/arch/sparc/sparc/msiiep.c:1.45 src/sys/arch/sparc/sparc/msiiep.c:1.46 --- src/sys/arch/sparc/sparc/msiiep.c:1.45 Sat Nov 16 23:54:01 2013 +++ src/sys/arch/sparc/sparc/msiiep.c Sun Oct 4 08:17:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: msiiep.c,v 1.45 2013/11/16 23:54:01 mrg Exp $ */ +/* $NetBSD: msiiep.c,v 1.46 2015/10/04 08:17:43 joerg Exp $ */ /* * Copyright (c) 2001 Valeriy E. Ushakov @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.45 2013/11/16 23:54:01 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.46 2015/10/04 08:17:43 joerg Exp $"); #include #include @@ -507,7 +507,7 @@ mspcic_pci_map_find(struct mspcic_pci_ma for (i = 0; i < nmaps; ++i, ++m) { offset = pciaddr - m->pcibase; - if (offset >= 0 && offset + size <= m->size) + if (offset + size <= m->size) return (m->sysbase + offset); } return (0);
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: joerg Date: Sun Oct 4 08:18:49 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: pmap.c Log Message: Use pointer computation for references outside an object. To generate a diff of this commit: cvs rdiff -u -r1.358 -r1.359 src/sys/arch/sparc/sparc/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/sparc/sparc/pmap.c diff -u src/sys/arch/sparc/sparc/pmap.c:1.358 src/sys/arch/sparc/sparc/pmap.c:1.359 --- src/sys/arch/sparc/sparc/pmap.c:1.358 Sat May 3 11:17:06 2014 +++ src/sys/arch/sparc/sparc/pmap.c Sun Oct 4 08:18:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.358 2014/05/03 11:17:06 nakayama Exp $ */ +/* $NetBSD: pmap.c,v 1.359 2015/10/04 08:18:49 joerg Exp $ */ /* * Copyright (c) 1996 @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.358 2014/05/03 11:17:06 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.359 2015/10/04 08:18:49 joerg Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -3214,7 +3214,7 @@ pmap_bootstrap4_4c(void *top, int nctx, * above NUREG, we save storage space and can index kernel and * user regions in the same way. */ - kernel_pmap_store.pm_regmap = &kernel_regmap_store[-NUREG]; + kernel_pmap_store.pm_regmap = kernel_regmap_store - NUREG; for (i = NKREG; --i >= 0;) { #if defined(SUN4_MMU3L) kernel_regmap_store[i].rg_smeg = reginval; @@ -3592,7 +3592,7 @@ pmap_bootstrap4m(void *top) * above NUREG, we save storage space and can index kernel and * user regions in the same way. */ - kernel_pmap_store.pm_regmap = &kernel_regmap_store[-NUREG]; + kernel_pmap_store.pm_regmap = kernel_regmap_store - NUREG; memset(kernel_regmap_store, 0, NKREG * sizeof(struct regmap)); memset(kernel_segmap_store, 0, NKREG * NSEGRG * sizeof(struct segmap)); for (i = NKREG; --i >= 0;) {
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: joerg Date: Sun Oct 4 08:19:13 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: syscall.c Log Message: Unsigned values can not be negative. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc/sparc/syscall.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/sparc/sparc/syscall.c diff -u src/sys/arch/sparc/sparc/syscall.c:1.28 src/sys/arch/sparc/sparc/syscall.c:1.29 --- src/sys/arch/sparc/sparc/syscall.c:1.28 Wed Jun 26 16:53:34 2013 +++ src/sys/arch/sparc/sparc/syscall.c Sun Oct 4 08:19:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.28 2013/06/26 16:53:34 matt Exp $ */ +/* $NetBSD: syscall.c,v 1.29 2015/10/04 08:19:13 joerg Exp $ */ /* * Copyright (c) 1996 @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.28 2013/06/26 16:53:34 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.29 2015/10/04 08:19:13 joerg Exp $"); #include "opt_sparc_arch.h" #include "opt_multiprocessor.h" @@ -143,7 +143,7 @@ getargs(struct proc *p, struct trapframe break; } - if (*code < 0 || *code >= p->p_emul->e_nsysent) + if (*code >= p->p_emul->e_nsysent) return ENOSYS; *callp += *code;
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: joerg Date: Sun Oct 4 08:19:40 UTC 2015 Modified Files: src/sys/arch/sparc/sparc: trap.c Log Message: panic takes a format string. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 src/sys/arch/sparc/sparc/trap.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/sparc/sparc/trap.c diff -u src/sys/arch/sparc/sparc/trap.c:1.192 src/sys/arch/sparc/sparc/trap.c:1.193 --- src/sys/arch/sparc/sparc/trap.c:1.192 Mon Mar 2 13:53:19 2015 +++ src/sys/arch/sparc/sparc/trap.c Sun Oct 4 08:19:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.192 2015/03/02 13:53:19 martin Exp $ */ +/* $NetBSD: trap.c,v 1.193 2015/10/04 08:19:40 joerg Exp $ */ /* * Copyright (c) 1996 @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.192 2015/03/02 13:53:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.193 2015/10/04 08:19:40 joerg Exp $"); #include "opt_ddb.h" #include "opt_compat_svr4.h" @@ -296,7 +296,7 @@ trap(unsigned type, int psr, int pc, str write_all_windows(); (void) kdb_trap(type, tf); #endif - panic(type < N_TRAP_TYPES ? trap_type[type] : T); + panic("%s", type < N_TRAP_TYPES ? trap_type[type] : T); /* NOTREACHED */ } if ((l = curlwp) == NULL)
CVS commit: src/sys/dev/sbus
Module Name:src Committed By: joerg Date: Sun Oct 4 08:20:24 UTC 2015 Modified Files: src/sys/dev/sbus: stp4020.c Log Message: Drop unused (inline) function. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/dev/sbus/stp4020.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/sbus/stp4020.c diff -u src/sys/dev/sbus/stp4020.c:1.67 src/sys/dev/sbus/stp4020.c:1.68 --- src/sys/dev/sbus/stp4020.c:1.67 Sat Oct 27 17:18:37 2012 +++ src/sys/dev/sbus/stp4020.c Sun Oct 4 08:20:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: stp4020.c,v 1.67 2012/10/27 17:18:37 chs Exp $ */ +/* $NetBSD: stp4020.c,v 1.68 2015/10/04 08:20:24 joerg Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.67 2012/10/27 17:18:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.68 2015/10/04 08:20:24 joerg Exp $"); #include #include @@ -152,7 +152,6 @@ static void stp4020_dump_regs(struct stp static int stp4020_rd_sockctl(struct stp4020_socket *, int); static void stp4020_wr_sockctl(struct stp4020_socket *, int, int); -static int stp4020_rd_winctl(struct stp4020_socket *, int, int); static void stp4020_wr_winctl(struct stp4020_socket *, int, int, int); void stp4020_delay(struct stp4020_softc *sc, unsigned int); @@ -222,14 +221,6 @@ stp4020_wr_sockctl(struct stp4020_socket bus_space_write_2(h->tag, h->regs, o, v); } -static inline int -stp4020_rd_winctl(struct stp4020_socket *h, int win, int idx) -{ - int o = (STP4020_SOCKREGS_SIZE * (h->sock)) + - (STP4020_WINREGS_SIZE * win) + idx; - return (bus_space_read_2(h->tag, h->regs, o)); -} - static inline void stp4020_wr_winctl(struct stp4020_socket *h, int win, int idx, int v) {
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Sun Oct 4 10:16:39 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: RPI Log Message: Fix commented out USB HC debug options. RPI doesn't have [eo]hci. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/conf/RPI Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/RPI diff -u src/sys/arch/evbarm/conf/RPI:1.64 src/sys/arch/evbarm/conf/RPI:1.65 --- src/sys/arch/evbarm/conf/RPI:1.64 Tue Aug 18 15:54:20 2015 +++ src/sys/arch/evbarm/conf/RPI Sun Oct 4 10:16:39 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: RPI,v 1.64 2015/08/18 15:54:20 phx Exp $ +# $NetBSD: RPI,v 1.65 2015/10/04 10:16:39 skrll Exp $ # # RPi -- Raspberry Pi # @@ -26,8 +26,7 @@ options PLCONSOLE ## USB Debugging options options USB_DEBUG -#options EHCI_DEBUG -#options OHCI_DEBUG +#options DWC2_DEBUG #options UHUB_DEBUG
CVS commit: [nick-nhusb] src/sys/external/bsd/dwc2
Module Name:src Committed By: skrll Date: Sun Oct 4 10:45:37 UTC 2015 Modified Files: src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c Log Message: Adapt to usbroothub and use usbroothub defaults for some requests rather than returning an error. To generate a diff of this commit: cvs rdiff -u -r1.32.2.11 -r1.32.2.12 src/sys/external/bsd/dwc2/dwc2.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/external/bsd/dwc2/dwc2.c diff -u src/sys/external/bsd/dwc2/dwc2.c:1.32.2.11 src/sys/external/bsd/dwc2/dwc2.c:1.32.2.12 --- src/sys/external/bsd/dwc2/dwc2.c:1.32.2.11 Tue Sep 22 12:06:06 2015 +++ src/sys/external/bsd/dwc2/dwc2.c Sun Oct 4 10:45:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2.c,v 1.32.2.11 2015/09/22 12:06:06 skrll Exp $ */ +/* $NetBSD: dwc2.c,v 1.32.2.12 2015/10/04 10:45:37 skrll Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.11 2015/09/22 12:06:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.12 2015/10/04 10:45:37 skrll Exp $"); #include "opt_usb.h" @@ -604,6 +604,18 @@ dwc2_roothub_ctrl(struct usbd_bus *bus, return buflen; } break; + + case C(UR_GET_CONFIG, UT_READ_DEVICE): + case C(UR_GET_INTERFACE, UT_READ_INTERFACE): + case C(UR_GET_STATUS, UT_READ_INTERFACE): + case C(UR_GET_STATUS, UT_READ_ENDPOINT): + case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): + case C(UR_SET_CONFIG, UT_WRITE_DEVICE): + /* default from usbroothub */ + DPRINTFN(4, "returning %d (usbroothub default)", buflen); + + return buflen; + default: /* Hub requests */ err = dwc2_hcd_hub_control(sc->sc_hsotg,
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sun Oct 4 12:10:51 UTC 2015 Modified Files: src/share/man/man9: pci.9 Log Message: Bump date. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/share/man/man9/pci.9 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/man9/pci.9 diff -u src/share/man/man9/pci.9:1.42 src/share/man/man9/pci.9:1.43 --- src/share/man/man9/pci.9:1.42 Fri Oct 2 05:22:49 2015 +++ src/share/man/man9/pci.9 Sun Oct 4 12:10:51 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci.9,v 1.42 2015/10/02 05:22:49 msaitoh Exp $ +.\" $NetBSD: pci.9,v 1.43 2015/10/04 12:10:51 wiz Exp $ .\" .\" Copyright (c) 2001, 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 14, 2015 +.Dd October 2, 2015 .Dt PCI 9 .Os .Sh NAME
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: mrg Date: Sun Oct 4 17:52:50 UTC 2015 Modified Files: src/sys/arch/x86/x86: cpu_ucode_intel.c Log Message: kmem_free() the address returned by kmem_alloc(). found by Brainy. use the newly aligned location if we needed it. found by kre. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/cpu_ucode_intel.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_ucode_intel.c diff -u src/sys/arch/x86/x86/cpu_ucode_intel.c:1.8 src/sys/arch/x86/x86/cpu_ucode_intel.c:1.9 --- src/sys/arch/x86/x86/cpu_ucode_intel.c:1.8 Tue May 12 00:00:35 2015 +++ src/sys/arch/x86/x86/cpu_ucode_intel.c Sun Oct 4 17:52:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_ucode_intel.c,v 1.8 2015/05/12 00:00:35 msaitoh Exp $ */ +/* $NetBSD: cpu_ucode_intel.c,v 1.9 2015/10/04 17:52:50 mrg Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.8 2015/05/12 00:00:35 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.9 2015/10/04 17:52:50 mrg Exp $"); #include "opt_xen.h" #include "opt_cpu_ucode.h" @@ -111,6 +111,7 @@ cpu_ucode_intel_apply(struct cpu_ucode_s uint32_t ucodetarget, oucodeversion, nucodeversion; int platformid; struct intel1_ucode_header *uh; + void *uha; size_t newbufsize = 0; int rv = 0; @@ -126,12 +127,12 @@ cpu_ucode_intel_apply(struct cpu_ucode_s if ((uintptr_t)(sc->sc_blob) & 15) { /* Make the buffer 16 byte aligned */ newbufsize = sc->sc_blobsize + 15; - uh = kmem_alloc(newbufsize, KM_SLEEP); - if (uh == NULL) { + uha = kmem_alloc(newbufsize, KM_SLEEP); + if (uha == NULL) { printf("%s: memory allocation failed\n", __func__); return EINVAL; } - uh = (struct intel1_ucode_header *)roundup2((uintptr_t)uh, 16); + uh = (struct intel1_ucode_header *)roundup2((uintptr_t)uha, 16); /* Copy to the new area */ memcpy(uh, sc->sc_blob, sc->sc_blobsize); } @@ -144,7 +145,7 @@ cpu_ucode_intel_apply(struct cpu_ucode_s rv = EEXIST; /* ??? */ goto out; } - wrmsr(MSR_BIOS_UPDT_TRIG, (uintptr_t)(sc->sc_blob) + 48); + wrmsr(MSR_BIOS_UPDT_TRIG, (uintptr_t)uh + 48); intel_getcurrentucode(&nucodeversion, &platformid); kpreempt_enable(); @@ -158,7 +159,7 @@ cpu_ucode_intel_apply(struct cpu_ucode_s oucodeversion, nucodeversion); out: if (newbufsize != 0) - kmem_free(uh, newbufsize); + kmem_free(uha, newbufsize); return rv; } #endif /* ! XEN */
CVS commit: src/sys/dev/gpio
Module Name:src Committed By: jmcneill Date: Sun Oct 4 18:35:44 UTC 2015 Modified Files: src/sys/dev/gpio: gpiobutton.c Log Message: Use sysmon_taskq instead of our own workqueue for submitting button events. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/gpio/gpiobutton.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/gpio/gpiobutton.c diff -u src/sys/dev/gpio/gpiobutton.c:1.2 src/sys/dev/gpio/gpiobutton.c:1.3 --- src/sys/dev/gpio/gpiobutton.c:1.2 Sat May 30 17:12:16 2015 +++ src/sys/dev/gpio/gpiobutton.c Sun Oct 4 18:35:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gpiobutton.c,v 1.2 2015/05/30 17:12:16 jmcneill Exp $ */ +/* $NetBSD: gpiobutton.c,v 1.3 2015/10/04 18:35:44 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: gpiobutton.c,v 1.2 2015/05/30 17:12:16 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpiobutton.c,v 1.3 2015/10/04 18:35:44 jmcneill Exp $"); #include #include @@ -37,10 +37,10 @@ __KERNEL_RCSID(0, "$NetBSD: gpiobutton.c #include #include #include -#include #include #include +#include #include @@ -65,15 +65,13 @@ struct gpiobutton_softc { struct sysmon_pswitch sc_smpsw; - struct workqueue *sc_wq; callout_t sc_tick; bool sc_state; - struct work sc_work; }; static bool gpiobutton_is_pressed(struct gpiobutton_softc *); static void gpiobutton_tick(void *); -static void gpiobutton_task(struct work *, void *); +static void gpiobutton_task(void *); CFATTACH_DECL_NEW(gpiobutton, sizeof(struct gpiobutton_softc), gpiobutton_match, gpiobutton_attach, NULL, NULL); @@ -106,7 +104,7 @@ gpiobutton_attach(device_t parent, devic struct gpiobutton_softc * const sc = device_private(self); struct gpio_attach_args * const ga = aux; const char *desc; - int caps, error; + int caps; const u_int type = __SHIFTOUT(ga->ga_flags, GPIOBUTTON_TYPE_MASK); const u_int pol = __SHIFTOUT(ga->ga_flags, GPIOBUTTON_POLARITY_MASK); @@ -151,15 +149,7 @@ gpiobutton_attach(device_t parent, devic callout_init(&sc->sc_tick, CALLOUT_MPSAFE); callout_setfunc(&sc->sc_tick, gpiobutton_tick, sc); - error = workqueue_create(&sc->sc_wq, device_xname(self), - gpiobutton_task, sc, PRI_NONE, IPL_VM, WQ_MPSAFE); - if (error) { - aprint_error_dev(self, "couldn't create workqueue: %d\n", - error); - return; - } - - gpiobutton_task(&sc->sc_work, sc); + gpiobutton_tick(sc); } static bool @@ -179,20 +169,19 @@ gpiobutton_tick(void *priv) { struct gpiobutton_softc * const sc = priv; - workqueue_enqueue(sc->sc_wq, &sc->sc_work, NULL); + const bool new_state = gpiobutton_is_pressed(sc); + if (new_state != sc->sc_state) { + sc->sc_state = new_state; + sysmon_task_queue_sched(0, gpiobutton_task, sc); + } + callout_schedule(&sc->sc_tick, GPIOBUTTON_POLL_INTERVAL); } static void -gpiobutton_task(struct work *wk, void *priv) +gpiobutton_task(void *priv) { struct gpiobutton_softc * const sc = priv; - const bool new_state = gpiobutton_is_pressed(sc); - if (new_state != sc->sc_state) { - aprint_debug_dev(sc->sc_dev, "button pressed\n"); - sysmon_pswitch_event(&sc->sc_smpsw, PSWITCH_EVENT_PRESSED); - sc->sc_state = new_state; - } - - callout_schedule(&sc->sc_tick, GPIOBUTTON_POLL_INTERVAL); + sysmon_pswitch_event(&sc->sc_smpsw, + sc->sc_state ? PSWITCH_EVENT_PRESSED : PSWITCH_EVENT_RELEASED); }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jym Date: Sun Oct 4 21:08:30 UTC 2015 Modified Files: src/sys/arch/x86/x86: cpu_ucode_intel.c Log Message: Cache CPU index in the non-preemptible part otherwise it can be unreliable (and report a CPU as patched while it was not). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/x86/cpu_ucode_intel.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_ucode_intel.c diff -u src/sys/arch/x86/x86/cpu_ucode_intel.c:1.9 src/sys/arch/x86/x86/cpu_ucode_intel.c:1.10 --- src/sys/arch/x86/x86/cpu_ucode_intel.c:1.9 Sun Oct 4 17:52:50 2015 +++ src/sys/arch/x86/x86/cpu_ucode_intel.c Sun Oct 4 21:08:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_ucode_intel.c,v 1.9 2015/10/04 17:52:50 mrg Exp $ */ +/* $NetBSD: cpu_ucode_intel.c,v 1.10 2015/10/04 21:08:30 jym Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.9 2015/10/04 17:52:50 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.10 2015/10/04 21:08:30 jym Exp $"); #include "opt_xen.h" #include "opt_cpu_ucode.h" @@ -109,7 +109,7 @@ int cpu_ucode_intel_apply(struct cpu_ucode_softc *sc, int cpuno) { uint32_t ucodetarget, oucodeversion, nucodeversion; - int platformid; + int platformid, cpuid; struct intel1_ucode_header *uh; void *uha; size_t newbufsize = 0; @@ -147,6 +147,7 @@ cpu_ucode_intel_apply(struct cpu_ucode_s } wrmsr(MSR_BIOS_UPDT_TRIG, (uintptr_t)uh + 48); intel_getcurrentucode(&nucodeversion, &platformid); + cpuid = curcpu()->ci_index; kpreempt_enable(); @@ -155,7 +156,7 @@ cpu_ucode_intel_apply(struct cpu_ucode_s goto out; } - printf("cpu %d: ucode 0x%x->0x%x\n", curcpu()->ci_index, + printf("cpu %d: ucode 0x%x->0x%x\n", cpuid, oucodeversion, nucodeversion); out: if (newbufsize != 0)
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Sun Oct 4 22:51:19 UTC 2015 Modified Files: src/share/man/man9: module.9 Log Message: Minor tweaks, from Michael McConville To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/share/man/man9/module.9 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/man9/module.9 diff -u src/share/man/man9/module.9:1.37 src/share/man/man9/module.9:1.38 --- src/share/man/man9/module.9:1.37 Thu Jun 4 01:58:30 2015 +++ src/share/man/man9/module.9 Sun Oct 4 22:51:19 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: module.9,v 1.37 2015/06/04 01:58:30 pgoyette Exp $ +.\" $NetBSD: module.9,v 1.38 2015/10/04 22:51:19 pgoyette Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 18, 2011 +.Dd October 5, 2015 .Dt MODULE 9 .Os .Sh NAME @@ -74,8 +74,9 @@ the kernel and reboot. Modules can be loaded from within the kernel image, provided by the boot loader, or loaded from the file system. .Pp -Two data types are relevant for -.Nm : +The +.Nm +subsystem includes two data types: .Bl -enum -offset indent .It The @@ -84,10 +85,13 @@ type provides storage to describe a modu .It The .Vt modinfo_t -type resides within the module itself, and contains module header info. +type resides within +.Vt module_t +and contains module header info. .El .Pp -The module subsystem is protected by the global kernconfig_mutex. +The module subsystem is protected by the global +.Va kernconfig_mutex . .Sh FUNCTIONS .Bl -tag -width abcd .It Fn MODULE "class" "name" "required"
CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common
Module Name:src Committed By: christos Date: Sun Oct 4 23:25:32 UTC 2015 Modified Files: src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c Log Message: put back module filename finding code. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.9 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.10 --- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.9 Thu Sep 24 10:25:29 2015 +++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Sun Oct 4 19:25:32 2015 @@ -1169,6 +1169,36 @@ dt_module_update(dtrace_hdl_t *dtp, stru (void) strlcpy(name, k_stat->name, sizeof(name)); (void) strlcpy(fname, k_stat->pathname, sizeof(fname)); +#elif defined(__NetBSD__) + int mib_osrel[2] = { CTL_KERN, KERN_OSRELEASE }; + int mib_mach[2] = { CTL_HW, HW_MACHINE }; + char osrel[64]; + char machine[64]; + size_t len; + + if (strcmp("netbsd", name) == 0) { + /* want the kernel */ + strncpy(fname, "/netbsd", sizeof(fname)); + } else { + + /* build stand module path from system */ + len = sizeof(osrel); + if (sysctl(mib_osrel, 2, osrel, &len, NULL, 0) == -1) { + dt_dprintf("sysctl osrel failed: %s\n", +strerror(errno)); + return; + } + + len = sizeof(machine); + if (sysctl(mib_mach, 2, machine, &len, NULL, 0) == -1) { + dt_dprintf("sysctl machine failed: %s\n", +strerror(errno)); + return; + } + + (void) snprintf(fname, sizeof (fname), + "/stand/%s/%s/modules/%s/%s.kmod", machine, osrel, name, name); + } #endif if ((fd = open(fname, O_RDONLY)) == -1 || fstat64(fd, &st) == -1 ||
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Mon Oct 5 04:15:42 UTC 2015 Modified Files: src/sys/netinet6: nd6_rtr.c Log Message: Use satosin6 instead of its own macro To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c diff -u src/sys/netinet6/nd6_rtr.c:1.103 src/sys/netinet6/nd6_rtr.c:1.104 --- src/sys/netinet6/nd6_rtr.c:1.103 Mon Aug 24 09:45:29 2015 +++ src/sys/netinet6/nd6_rtr.c Mon Oct 5 04:15:42 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.103 2015/08/24 09:45:29 ozaki-r Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.104 2015/10/05 04:15:42 ozaki-r Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.103 2015/08/24 09:45:29 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.104 2015/10/05 04:15:42 ozaki-r Exp $"); #include #include @@ -2097,13 +2097,12 @@ rt6_flush(struct in6_addr *gateway, stru static int rt6_deleteroute(struct rtentry *rt, void *arg) { -#define SIN6(s) ((struct sockaddr_in6 *)s) struct in6_addr *gate = (struct in6_addr *)arg; if (rt->rt_gateway == NULL || rt->rt_gateway->sa_family != AF_INET6) return (0); - if (!IN6_ARE_ADDR_EQUAL(gate, &SIN6(rt->rt_gateway)->sin6_addr)) + if (!IN6_ARE_ADDR_EQUAL(gate, &satosin6(rt->rt_gateway)->sin6_addr)) return (0); /* @@ -2123,7 +2122,6 @@ rt6_deleteroute(struct rtentry *rt, void return (rtrequest(RTM_DELETE, rt_getkey(rt), rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL)); -#undef SIN6 } int