Re: CVS commit: src/sys/dev
On Wed, 27 Jul 2016, co...@sdf.org wrote: Log Message: If we're going to check for a NULL pointer, do the check before we dereference it (to get the lock address). To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/md.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/md.c diff -u src/sys/dev/md.c:1.76 src/sys/dev/md.c:1.77 --- src/sys/dev/md.c:1.76 Mon Jan 4 16:24:52 2016 +++ src/sys/dev/md.cWed Jul 27 01:09:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $ */ +/* $NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -414,13 +414,13 @@ mdstrategy(struct buf *bp) sc = device_lookup_private(_cd, MD_UNIT(bp->b_dev)); - mutex_enter(>sc_lock); - if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) { bp->b_error = ENXIO; goto done; } + mutex_enter(>sc_lock); + switch (sc->sc_type) { #if MEMORY_DISK_SERVER case MD_UMEM_SERVER: goto done; will exit mutex not entered now, I think. Yup - already fixed. Well, I had fixed it in my localcount branch, but not on HEAD. It should be fixed everywhere now. Thanks for pointing this out. +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +--+--++
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Wed Jul 27 05:14:40 UTC 2016 Modified Files: src/sys/dev: md.c Log Message: Don't mutex_exit() if we didn't mutex_enter(). Pointed out by coypu. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/md.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/md.c diff -u src/sys/dev/md.c:1.77 src/sys/dev/md.c:1.78 --- src/sys/dev/md.c:1.77 Wed Jul 27 01:09:44 2016 +++ src/sys/dev/md.c Wed Jul 27 05:14:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $ */ +/* $NetBSD: md.c,v 1.78 2016/07/27 05:14:40 pgoyette Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.78 2016/07/27 05:14:40 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -463,9 +463,9 @@ mdstrategy(struct buf *bp) bp->b_error = EIO; break; } + mutex_exit(>sc_lock); done: - mutex_exit(>sc_lock); biodone(bp); }
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Wed Jul 27 05:14:40 UTC 2016 Modified Files: src/sys/dev: md.c Log Message: Don't mutex_exit() if we didn't mutex_enter(). Pointed out by coypu. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dev
On Wed, 27 Jul 2016, co...@sdf.org wrote: Log Message: If we're going to check for a NULL pointer, do the check before we dereference it (to get the lock address). To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/md.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/md.c diff -u src/sys/dev/md.c:1.76 src/sys/dev/md.c:1.77 --- src/sys/dev/md.c:1.76 Mon Jan 4 16:24:52 2016 +++ src/sys/dev/md.cWed Jul 27 01:09:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $ */ +/* $NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -414,13 +414,13 @@ mdstrategy(struct buf *bp) sc = device_lookup_private(_cd, MD_UNIT(bp->b_dev)); - mutex_enter(>sc_lock); - if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) { bp->b_error = ENXIO; goto done; } + mutex_enter(>sc_lock); + switch (sc->sc_type) { #if MEMORY_DISK_SERVER case MD_UMEM_SERVER: goto done; will exit mutex not entered now, I think. Yup - already fixed. +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +--+--++
Re: CVS commit: src/sys/dev
On Wed, Jul 27, 2016 at 01:09:44AM +, Paul Goyette wrote: > Module Name: src > Committed By: pgoyette > Date: Wed Jul 27 01:09:44 UTC 2016 > > Modified Files: > src/sys/dev: md.c > > Log Message: > If we're going to check for a NULL pointer, do the check before we > dereference it (to get the lock address). > > > To generate a diff of this commit: > cvs rdiff -u -r1.76 -r1.77 src/sys/dev/md.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/md.c > diff -u src/sys/dev/md.c:1.76 src/sys/dev/md.c:1.77 > --- src/sys/dev/md.c:1.76 Mon Jan 4 16:24:52 2016 > +++ src/sys/dev/md.c Wed Jul 27 01:09:44 2016 > @@ -1,4 +1,4 @@ > -/* $NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $ */ > +/* $NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $ */ > > /* > * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. > @@ -40,7 +40,7 @@ > */ > > #include > -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $"); > +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $"); > > #ifdef _KERNEL_OPT > #include "opt_md.h" > @@ -414,13 +414,13 @@ mdstrategy(struct buf *bp) > > sc = device_lookup_private(_cd, MD_UNIT(bp->b_dev)); > > - mutex_enter(>sc_lock); > - > if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) { > bp->b_error = ENXIO; > goto done; > } > > + mutex_enter(>sc_lock); > + > switch (sc->sc_type) { > #if MEMORY_DISK_SERVER > case MD_UMEM_SERVER: > goto done; will exit mutex not entered now, I think.
CVS commit: src/sys/netinet
Module Name:src Committed By: knakahara Date: Wed Jul 27 04:23:42 UTC 2016 Modified Files: src/sys/netinet: ip_flow.c Log Message: remove extra ifdefs. no functional changes. ip_flow.c becomes build target only if GATEWAY kernel option is on. So, "#ifdef GATEWAY" in ip_flow.c is not needed. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/netinet/ip_flow.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: knakahara Date: Wed Jul 27 04:23:42 UTC 2016 Modified Files: src/sys/netinet: ip_flow.c Log Message: remove extra ifdefs. no functional changes. ip_flow.c becomes build target only if GATEWAY kernel option is on. So, "#ifdef GATEWAY" in ip_flow.c is not needed. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/netinet/ip_flow.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/netinet/ip_flow.c diff -u src/sys/netinet/ip_flow.c:1.74 src/sys/netinet/ip_flow.c:1.75 --- src/sys/netinet/ip_flow.c:1.74 Tue Jul 26 05:53:30 2016 +++ src/sys/netinet/ip_flow.c Wed Jul 27 04:23:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_flow.c,v 1.74 2016/07/26 05:53:30 ozaki-r Exp $ */ +/* $NetBSD: ip_flow.c,v 1.75 2016/07/27 04:23:42 knakahara Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 1.74 2016/07/26 05:53:30 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 1.75 2016/07/27 04:23:42 knakahara Exp $"); #include #include @@ -565,7 +565,6 @@ ipflow_invalidate_all(int new_size) return error; } -#ifdef GATEWAY /* * sysctl helper routine for net.inet.ip.maxflows. */ @@ -625,7 +624,6 @@ sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG return error; } -#endif /* GATEWAY */ static void ipflow_sysctl_init(struct sysctllog **clog) @@ -643,7 +641,6 @@ ipflow_sysctl_init(struct sysctllog **cl NULL, 0, NULL, 0, CTL_NET, PF_INET, IPPROTO_IP, CTL_EOL); -#ifdef GATEWAY sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "maxflows", @@ -658,5 +655,4 @@ ipflow_sysctl_init(struct sysctllog **cl sysctl_net_inet_ip_hashsize, 0, _hashsize, 0, CTL_NET, PF_INET, IPPROTO_IP, CTL_CREATE, CTL_EOL); -#endif /* GATEWAY */ }
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Wed Jul 27 03:25:00 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: fss.c md.c Log Message: Repair the inevitable tyops in previous. To generate a diff of this commit: cvs rdiff -u -r1.93.2.4 -r1.93.2.5 src/sys/dev/fss.c cvs rdiff -u -r1.76.2.4 -r1.76.2.5 src/sys/dev/md.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/fss.c diff -u src/sys/dev/fss.c:1.93.2.4 src/sys/dev/fss.c:1.93.2.5 --- src/sys/dev/fss.c:1.93.2.4 Wed Jul 27 01:13:50 2016 +++ src/sys/dev/fss.c Wed Jul 27 03:25:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $ */ +/* $NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $"); #include #include @@ -225,7 +225,7 @@ fss_open(dev_t dev, int flags, int mode, cf->cf_atname = fss_cd.cd_name; cf->cf_unit = minor(dev); cf->cf_fstate = FSTATE_STAR; - self = config_attach_pseudo(cf)); + self = config_attach_pseudo(cf); device_acquire(self); sc = device_private(self); if (sc == NULL) { @@ -242,7 +242,7 @@ fss_open(dev_t dev, int flags, int mode, mutex_exit(>sc_slock); mutex_exit(_device_lock); - device_release(sc); + device_release(self); return 0; } Index: src/sys/dev/md.c diff -u src/sys/dev/md.c:1.76.2.4 src/sys/dev/md.c:1.76.2.5 --- src/sys/dev/md.c:1.76.2.4 Wed Jul 27 01:13:50 2016 +++ src/sys/dev/md.c Wed Jul 27 03:25:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.76.2.4 2016/07/27 01:13:50 pgoyette Exp $ */ +/* $NetBSD: md.c,v 1.76.2.5 2016/07/27 03:25:00 pgoyette Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76.2.4 2016/07/27 01:13:50 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76.2.5 2016/07/27 03:25:00 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -291,7 +291,7 @@ mdopen(dev_t dev, int flag, int fmt, str cf->cf_atname = md_cd.cd_name; cf->cf_unit = unit; cf->cf_fstate = FSTATE_STAR; - self = config_attach_pseudo(cf)); + self = config_attach_pseudo(cf); if (self != NULL) { device_acquire(self); sc = device_private(self); @@ -465,7 +465,7 @@ mdstrategy(struct buf *bp) } sc = device_private(self); - if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) { + if (sc->sc_type == MD_UNCONFIGURED) { bp->b_error = ENXIO; goto done; } @@ -515,11 +515,11 @@ mdstrategy(struct buf *bp) break; } - done: mutex_exit(>sc_lock); - + done: biodone(bp); - device_release(self); + if (self != NULL) + device_release(self); } static int
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Wed Jul 27 03:25:00 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: fss.c md.c Log Message: Repair the inevitable tyops in previous. To generate a diff of this commit: cvs rdiff -u -r1.93.2.4 -r1.93.2.5 src/sys/dev/fss.c cvs rdiff -u -r1.76.2.4 -r1.76.2.5 src/sys/dev/md.c 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: christos Date: Wed Jul 27 02:33:40 UTC 2016 Modified Files: src/doc: TODO.8 Log Message: start creating a table and say I will do binutils. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/doc/TODO.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.8 diff -u src/doc/TODO.8:1.1 src/doc/TODO.8:1.2 --- src/doc/TODO.8:1.1 Tue Jul 26 00:18:04 2016 +++ src/doc/TODO.8 Tue Jul 26 22:33:40 2016 @@ -1,12 +1,90 @@ -$NetBSD: TODO.8,v 1.1 2016/07/26 04:18:04 martin Exp $ +$NetBSD: TODO.8,v 1.2 2016/07/27 02:33:40 christos Exp $ Items we (currently) plan to finish before branching netbsd-8: - find a releng release driver volunteer - - import binutils 2.26.1 + - import binutils 2.26.1 [christos] - switch all architectures to gcc 5.4 - switch all architectures to new binutils and gdb - enable PIE/ASLR on all architectures (that have switched to gcc 5.4 if we fail previous item) where it works and of course: fix as many bugs as possible. + + gcc-54 but-226 gdb-710 PIE ASLR MPROT +aarch64 N +acorn26 Y Y Y Y Y Y +acorn32 Y Y Y Y Y Y +algor +alpha Y Y +amd64 Y Y Y Y Y Y +amiga +amigappc Y Y Y +arc +arm +atari +bebox Y Y Y +cats Y Y Y +cesfic +cobalt +dreamcast +emips +epoc32 +evbarm Y Y Y Y Y Y +evbarm64 N Y +evbcf +evbmips +evbppc Y Y Y +evbsh3 +evbsh5 +ews4800mips +hp300 +hp700 Y Y +hpc +hpcarm Y Y Y +hpcmips +hpcsh +hppa Y Y +i386 Y Y Y Y Y Y +ia64 Y Y +ibmnws +iyonix +landisk +luna68k +m68k +mac68k +macppc Y Y +mips +mipsco +mmeyeY +mvme68k +mvmeppc Y Y Y +netwinder +news68k +newsmips +next68k +ofppc Y Y Y +or1k +playstation2 Y Y Y +pmax +pmppc Y Y Y +powerpc Y Y Y +prep Y Y Y +riscv +rs6000 Y Y Y +sandpoint Y Y Y +sbmips +sgimipsY +sh3Y +sh5 +shark Y Y Y Y Y Y +sparc Y Y Y Y Y N +sparc64 Y Y Y Y Y N +sun2 +sun3 +sun68k +vax Y Y Y +x68k +x86 Y Y Y Y Y Y +xen Y Y Y Y Y Y +zaurus
CVS commit: src/doc
Module Name:src Committed By: christos Date: Wed Jul 27 02:33:40 UTC 2016 Modified Files: src/doc: TODO.8 Log Message: start creating a table and say I will do binutils. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/doc/TODO.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Wed Jul 27 01:13:50 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: fss.c ld.c md.c Log Message: Update a few more drivers for localcount(9) To generate a diff of this commit: cvs rdiff -u -r1.93.2.3 -r1.93.2.4 src/sys/dev/fss.c cvs rdiff -u -r1.94.2.3 -r1.94.2.4 src/sys/dev/ld.c cvs rdiff -u -r1.76.2.3 -r1.76.2.4 src/sys/dev/md.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/fss.c diff -u src/sys/dev/fss.c:1.93.2.3 src/sys/dev/fss.c:1.93.2.4 --- src/sys/dev/fss.c:1.93.2.3 Tue Jul 26 05:54:39 2016 +++ src/sys/dev/fss.c Wed Jul 27 01:13:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.93.2.3 2016/07/26 05:54:39 pgoyette Exp $ */ +/* $NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.3 2016/07/26 05:54:39 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $"); #include #include @@ -172,6 +172,10 @@ fss_attach(device_t parent, device_t sel vfs_hooks_attach(_vfs_hooks); } +/* + * Caller must hold a reference to the device's localcount. The + * reference is released upon successful exit. + */ static int fss_detach(device_t self, int flags) { @@ -193,12 +197,14 @@ fss_detach(device_t self, int flags) disk_destroy(sc->sc_dkdev); free(sc->sc_dkdev, M_DEVBUF); + device_release(self); return 0; } int fss_open(dev_t dev, int flags, int mode, struct lwp *l) { + device_t self; int mflag; cfdata_t cf; struct fss_softc *sc; @@ -207,15 +213,23 @@ fss_open(dev_t dev, int flags, int mode, mutex_enter(_device_lock); - sc = device_lookup_private(_cd, minor(dev)); + self = device_lookup_acquire(_cd, minor(dev)); + if (self == NULL) + sc = NULL; + else + sc = device_private(self); + if (sc == NULL) { cf = malloc(sizeof(*cf), M_DEVBUF, M_WAITOK); cf->cf_name = fss_cd.cd_name; cf->cf_atname = fss_cd.cd_name; cf->cf_unit = minor(dev); cf->cf_fstate = FSTATE_STAR; - sc = device_private(config_attach_pseudo(cf)); + self = config_attach_pseudo(cf)); + device_acquire(self); + sc = device_private(self); if (sc == NULL) { + device_release(self); mutex_exit(_device_lock); return ENOMEM; } @@ -228,15 +242,17 @@ fss_open(dev_t dev, int flags, int mode, mutex_exit(>sc_slock); mutex_exit(_device_lock); + device_release(sc); return 0; } int fss_close(dev_t dev, int flags, int mode, struct lwp *l) { + device_t self = device_lookup_acquire(_cd, minor(dev)); int mflag, error; cfdata_t cf; - struct fss_softc *sc = device_lookup_private(_cd, minor(dev)); + struct fss_softc *sc = device_private(self); mflag = (mode == S_IFCHR ? FSS_CDEV_OPEN : FSS_BDEV_OPEN); error = 0; @@ -248,6 +264,7 @@ restart: sc->sc_flags &= ~mflag; mutex_exit(>sc_slock); mutex_exit(_device_lock); + device_release(self); return 0; } if ((sc->sc_flags & FSS_ACTIVE) != 0 && @@ -260,6 +277,7 @@ restart: if ((sc->sc_flags & FSS_ACTIVE) != 0) { mutex_exit(>sc_slock); mutex_exit(_device_lock); + device_release(self); return error; } @@ -272,14 +290,16 @@ restart: free(cf, M_DEVBUF); mutex_exit(_device_lock); + /* device_release() was called by fss_detach() from config_detach() */ return error; } void fss_strategy(struct buf *bp) { + device_t self = device_lookup_acquire(_cd, minor(bp->b_dev));; const bool write = ((bp->b_flags & B_READ) != B_READ); - struct fss_softc *sc = device_lookup_private(_cd, minor(bp->b_dev)); + struct fss_softc *sc = device_private(self); mutex_enter(>sc_slock); @@ -290,6 +310,7 @@ fss_strategy(struct buf *bp) bp->b_error = (write ? EROFS : ENXIO); bp->b_resid = bp->b_bcount; biodone(bp); + device_release(self); return; } @@ -298,6 +319,7 @@ fss_strategy(struct buf *bp) cv_signal(>sc_work_cv); mutex_exit(>sc_slock); + device_release(self); } int @@ -315,8 +337,9 @@ fss_write(dev_t dev, struct uio *uio, in int fss_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { + device_t self = device_lookup_acquire(_cd, minor(dev)); int error; - struct fss_softc *sc = device_lookup_private(_cd, minor(dev)); + struct fss_softc *sc = device_private(self); struct fss_set _fss; struct fss_set *fss = (struct fss_set *)data; struct fss_set50 *fss50 = (struct fss_set50 *)data; @@ -430,6 +453,7 @@ fss_ioctl(dev_t dev, u_long cmd, void *d break; } + device_release(self); return error; } @@ -570,18 +594,22 @@ fss_softc_free(struct fss_softc *sc) static void fss_unmount_hook(struct mount *mp) { + device_t self; int i; struct fss_softc *sc; mutex_enter(_device_lock); for (i = 0; i < fss_cd.cd_ndevs; i++) { - if ((sc = device_lookup_private(_cd, i)) == NULL) + self =
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Wed Jul 27 01:13:50 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: fss.c ld.c md.c Log Message: Update a few more drivers for localcount(9) To generate a diff of this commit: cvs rdiff -u -r1.93.2.3 -r1.93.2.4 src/sys/dev/fss.c cvs rdiff -u -r1.94.2.3 -r1.94.2.4 src/sys/dev/ld.c cvs rdiff -u -r1.76.2.3 -r1.76.2.4 src/sys/dev/md.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
Module Name:src Committed By: pgoyette Date: Wed Jul 27 01:09:44 UTC 2016 Modified Files: src/sys/dev: md.c Log Message: If we're going to check for a NULL pointer, do the check before we dereference it (to get the lock address). To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/md.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
Module Name:src Committed By: pgoyette Date: Wed Jul 27 01:09:44 UTC 2016 Modified Files: src/sys/dev: md.c Log Message: If we're going to check for a NULL pointer, do the check before we dereference it (to get the lock address). To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/md.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/md.c diff -u src/sys/dev/md.c:1.76 src/sys/dev/md.c:1.77 --- src/sys/dev/md.c:1.76 Mon Jan 4 16:24:52 2016 +++ src/sys/dev/md.c Wed Jul 27 01:09:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $ */ +/* $NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -414,13 +414,13 @@ mdstrategy(struct buf *bp) sc = device_lookup_private(_cd, MD_UNIT(bp->b_dev)); - mutex_enter(>sc_lock); - if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) { bp->b_error = ENXIO; goto done; } + mutex_enter(>sc_lock); + switch (sc->sc_type) { #if MEMORY_DISK_SERVER case MD_UMEM_SERVER:
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Tue Jul 26 11:08:59 UTC 2016 Modified Files: src/share/man/man4: iic.4 Log Message: Update supported masters and slaves. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/iic.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/man4
Module Name:src Committed By: msaitoh Date: Tue Jul 26 11:08:59 UTC 2016 Modified Files: src/share/man/man4: iic.4 Log Message: Update supported masters and slaves. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/iic.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/iic.4 diff -u src/share/man/man4/iic.4:1.12 src/share/man/man4/iic.4:1.13 --- src/share/man/man4/iic.4:1.12 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/iic.4 Tue Jul 26 11:08:59 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: iic.4,v 1.12 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: iic.4,v 1.13 2016/07/26 11:08:59 msaitoh Exp $ .\" $OpenBSD: iic.4,v 1.74 2008/09/10 16:13:43 reyk Exp $ .\" .\" Copyright (c) 2004, 2006 Alexander Yurchenko@@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd October 15, 2011 +.Dd July 26, 2016 .Dt IIC 4 .Os .Sh NAME @@ -29,27 +29,54 @@ .\" grep -h '^iic.*at' */conf/* | sort -u -k +3 | sed -e 's,[ ][ ]*, ,g' -e 's, *#.*,,' | sh -c 'while read iic at ic ; do printf ".Cd \"$iic $at %-20s # %s\"\n" "$ic" "`grep \"iic.*at.*$ic\" */conf/* | sed \"s,/.*,,\" | sort -u | tr \"\012\" \ `" ; done' | uniq | tee /tmp/x .\" cat /tmp/x .\" -.Cd "iic* at alipm? # sparc64 " .Cd "iic* at acpismbus? # amd64 i386" +.Cd "iic* at alipm? # alpha amd64 i386 sparc64 " .Cd "iic* at amdpm? # amd64 i386 " .Cd "iic* at armadillo9iic? # evbarm " .Cd "iic0 at at91twi? # evbarm " .Cd "iic0 at ausmbus0 # evbmips " +.Cd "iic* at awiniic? # evbarm " +.Cd "iic4 at awinp2wi0# evbarm " +.Cd "iic* at bcmi2c? # evbarm " +.Cd "iic* at coram? # amd64 i386 " .Cd "iic0 at cuda0# macppc " +.Cd "iic* at cxdtv? # amd64 i386 " +.Cd "iic* at diic?# acorn32 evbppc " +.Cd "iic* at exyoiic? # evbarm " +.Cd "iic* at g2i2c? # evbarm " .Cd "iic0 at gpiic? # evbppc " .Cd "iic* at gpioiic? # amd64 i386 " -.Cd "iic* at gtiic? # evbppc " +.Cd "iic* at gttwsi? # evbarm evbppc " .Cd "iic* at gxiic? # evbarm " +.Cd "iic* at i2cbus? # evbarm " .Cd "iic* at ichsmb? # amd64 i386 " +.Cd "iic* at imxi2c? # evbarm " .Cd "iic0 at iociic0 # acorn26 " .Cd "iic0 at iomdiic? # acorn32 " .Cd "iic0 at iopiic? # evbarm iyonix " +.Cd "iic* at ismt?# amd64 i386 " +.Cd "iic* at jziic? # evbmips " .Cd "iic* at ki2c?# macppc " +.Cd "iic* at nbpiic? # hpcarm " .Cd "iic* at nfsmb? # amd64 i386 " .Cd "iic* at ociic? # sandpoint " +.Cd "iic* at omapiic? # evbarm " +.Cd "iic* at pcfiic? # sparc64 " .Cd "iic* at piixpm? # amd64 i386 " +.Cd "iic* at ri2c?# evbmips " +.Cd "iic0 at rkiic0 # evbarm " +.Cd "iic1 at rkiic1 # evbarm " +.Cd "iic2 at rkiic2 # evbarm " +.Cd "iic3 at rkiic3 # evbarm " +.Cd "iic4 at rkiic4 # evbarm " +.Cd "iic* at rtciic? # mmeye " .Cd "iic0 at slugiic0 # evbarm " +.Cd "iic* at tegrai2c?# evbarm " +.Cd "iic* at tiiic? # evbarm " +.Cd "iic* at tsciic? # alpha " .Cd "iic* at viapcib? # i386 " +.Cd "iic* at voyager0 # evbmips " +.Cd "iic0 at ziic?# evbmips zaurus " .Sh DESCRIPTION .Tn I2C is a two-wire bus developed by Philips used for connecting @@ -96,35 +123,59 @@ A wide list of I2C masters are supported .\" cat /tmp/x .\" .Bl -tag -width 18n -compact -offset indent -.It Xr alipm 4 -Acer Labs M7101 SMBus controller .It Xr acpismbus 4 ACPI SMBus Control Method Interface +.It Xr alipm 4 +Acer Labs M7101 SMBus controller .It Xr amdpm 4 AMD768 Power Management Controller and AMD8111 System Management Controller .It Xr armadillo9iic 4 .It Xr at91twi 4 .It Xr ausmbus 4 +.It Xr awiniic 4 +.It Xr awinp2wi 4 +.It Xr bcmi2c 4 +.It Xr coram 4 +digital video driver for Conexant CX23885 based cards .It Xr cuda 4 support for CUDA microcontrollers found in many Power Macintosh and -and compatible computers +compatible computers +.It Xr cxdtv 4 +digital video driver for Conexant CX2388x based cards +.It Xr diic 4 +.It Xr exyoiic 4 +.It Xr g2i2c 4 .It Xr gpiic 4 -.It Xr gtiic 4 +.It Xr gpioiic 4 +GPIO I2C controller +.It Xr gttwsi 4 +.It Xr i2cbus 4 .It Xr gxiic 4 .It Xr ichsmb 4 -Intel ICH SMBus controller +Intel Chipset internal SMBus controller +.It Xr imxi2c 4 .It Xr iociic 4
CVS commit: src/sys/netinet
Module Name:src Committed By: ozaki-r Date: Tue Jul 26 08:34:55 UTC 2016 Modified Files: src/sys/netinet: ip_input.c Log Message: Fix downmatch increment To generate a diff of this commit: cvs rdiff -u -r1.337 -r1.338 src/sys/netinet/ip_input.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/netinet/ip_input.c diff -u src/sys/netinet/ip_input.c:1.337 src/sys/netinet/ip_input.c:1.338 --- src/sys/netinet/ip_input.c:1.337 Fri Jul 8 06:15:33 2016 +++ src/sys/netinet/ip_input.c Tue Jul 26 08:34:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.337 2016/07/08 06:15:33 ozaki-r Exp $ */ +/* $NetBSD: ip_input.c,v 1.338 2016/07/26 08:34:55 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.337 2016/07/08 06:15:33 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.338 2016/07/26 08:34:55 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -381,7 +381,7 @@ ip_match_our_address(struct ifnet *ifp, if ((ia->ia_ifp->if_flags & IFF_UP) != 0) break; else -downmatch++; +(*downmatch)++; } }
CVS commit: src/sys/netinet
Module Name:src Committed By: ozaki-r Date: Tue Jul 26 08:34:55 UTC 2016 Modified Files: src/sys/netinet: ip_input.c Log Message: Fix downmatch increment To generate a diff of this commit: cvs rdiff -u -r1.337 -r1.338 src/sys/netinet/ip_input.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/i2c
Module Name:src Committed By: msaitoh Date: Tue Jul 26 08:13:57 UTC 2016 Modified Files: src/sys/dev/i2c: sdtemp.c Log Message: Move functions to make module related code at the bottom of this file. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/sdtemp.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/i2c
Module Name:src Committed By: msaitoh Date: Tue Jul 26 08:13:57 UTC 2016 Modified Files: src/sys/dev/i2c: sdtemp.c Log Message: Move functions to make module related code at the bottom of this file. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/sdtemp.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/i2c/sdtemp.c diff -u src/sys/dev/i2c/sdtemp.c:1.28 src/sys/dev/i2c/sdtemp.c:1.29 --- src/sys/dev/i2c/sdtemp.c:1.28 Tue Jul 26 07:30:16 2016 +++ src/sys/dev/i2c/sdtemp.c Tue Jul 26 08:13:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.28 2016/07/26 07:30:16 msaitoh Exp $*/ +/* $NetBSD: sdtemp.c,v 1.29 2016/07/26 08:13:57 msaitoh Exp $*/ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.28 2016/07/26 07:30:16 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.29 2016/07/26 08:13:57 msaitoh Exp $"); #include #include @@ -607,35 +607,6 @@ sdtemp_pmf_resume(device_t dev, const pm return (error == 0); } -MODULE(MODULE_CLASS_DRIVER, sdtemp, "i2cexec,sysmon_envsys"); - -#ifdef _MODULE -#include "ioconf.c" -#endif - -static int -sdtemp_modcmd(modcmd_t cmd, void *opaque) -{ - int error = 0; - - switch (cmd) { - case MODULE_CMD_INIT: -#ifdef _MODULE - error = config_init_component(cfdriver_ioconf_sdtemp, - cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp); -#endif - return error; - case MODULE_CMD_FINI: -#ifdef _MODULE - error = config_fini_component(cfdriver_ioconf_sdtemp, - cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp); -#endif - return error; - default: - return ENOTTY; - } -} - /* Device dependent config functions */ static void @@ -693,3 +664,32 @@ sdtemp_config_idt(struct sdtemp_softc *s aprint_error("%s: error %d writing resolution register\n", device_xname(sc->sc_dev), rv); } + +MODULE(MODULE_CLASS_DRIVER, sdtemp, "i2cexec,sysmon_envsys"); + +#ifdef _MODULE +#include "ioconf.c" +#endif + +static int +sdtemp_modcmd(modcmd_t cmd, void *opaque) +{ + int error = 0; + + switch (cmd) { + case MODULE_CMD_INIT: +#ifdef _MODULE + error = config_init_component(cfdriver_ioconf_sdtemp, + cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp); +#endif + return error; + case MODULE_CMD_FINI: +#ifdef _MODULE + error = config_fini_component(cfdriver_ioconf_sdtemp, + cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp); +#endif + return error; + default: + return ENOTTY; + } +}
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Jul 26 08:05:51 UTC 2016 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Note MCP9804 now also supported by sdtemp(4) - thx msaitoh. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/mcp980x.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/mcp980x.4 diff -u src/share/man/man4/mcp980x.4:1.5 src/share/man/man4/mcp980x.4:1.6 --- src/share/man/man4/mcp980x.4:1.5 Tue Oct 15 14:51:58 2013 +++ src/share/man/man4/mcp980x.4 Tue Jul 26 08:05:51 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: mcp980x.4,v 1.5 2013/10/15 14:51:58 rkujawa Exp $ +.\" $NetBSD: mcp980x.4,v 1.6 2016/07/26 08:05:51 rkujawa Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 15, 2013 +.Dd July 26, 2016 .Dt MCP980X 4 .Os .Sh NAME @@ -71,7 +71,7 @@ The driver was written by .An Radoslaw Kujawa Aq Mt radoslaw.kuj...@gmail.com . .Sh CAVEATS -MCP9805 chip is different and is supported by the +MCP9804 and MCP9805 chip are different and is supported by the .Xr sdtemp 4 driver. .Pp
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Jul 26 08:05:51 UTC 2016 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Note MCP9804 now also supported by sdtemp(4) - thx msaitoh. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [pgoyette-localcount] src/sys/dev/acpi
Module Name:src Committed By: pgoyette Date: Tue Jul 26 07:44:21 UTC 2016 Modified Files: src/sys/dev/acpi [pgoyette-localcount]: pckbc_acpi.c Log Message: Fix conversion to device_lookup_acquire() To generate a diff of this commit: cvs rdiff -u -r1.34.10.1 -r1.34.10.2 src/sys/dev/acpi/pckbc_acpi.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/acpi/pckbc_acpi.c diff -u src/sys/dev/acpi/pckbc_acpi.c:1.34.10.1 src/sys/dev/acpi/pckbc_acpi.c:1.34.10.2 --- src/sys/dev/acpi/pckbc_acpi.c:1.34.10.1 Tue Jul 26 03:24:20 2016 +++ src/sys/dev/acpi/pckbc_acpi.c Tue Jul 26 07:44:21 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pckbc_acpi.c,v 1.34.10.1 2016/07/26 03:24:20 pgoyette Exp $ */ +/* $NetBSD: pckbc_acpi.c,v 1.34.10.2 2016/07/26 07:44:21 pgoyette Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.34.10.1 2016/07/26 03:24:20 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.34.10.2 2016/07/26 07:44:21 pgoyette Exp $"); #include #include @@ -234,7 +234,7 @@ out: static void pckbc_acpi_intr_establish(struct pckbc_softc *sc, pckbc_slot_t slot) { - device_t self; + device_t self = NULL; struct pckbc_acpi_softc *psc; isa_chipset_tag_t ic = NULL; void *rv = NULL; @@ -245,7 +245,11 @@ pckbc_acpi_intr_establish(struct pckbc_s * Note we're always called with sc == first. */ for (i = 0; i < pckbc_cd.cd_ndevs; i++) { - psc = device_lookup_private_acquire(_cd, i, ); + self = device_lookup_acquire(_cd, i); + if (self == NULL) + psc = NULL; + else + psc = device_private(self); if (psc && psc->sc_slot == slot) { irq = psc->sc_irq; ist = psc->sc_ist; @@ -263,7 +267,8 @@ pckbc_acpi_intr_establish(struct pckbc_s aprint_normal_dev(sc->sc_dv, "using irq %d for %s slot\n", irq, pckbc_slot_names[slot]); } - device_release(self); + if (self != NULL) + device_release(self); } static void
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Tue Jul 26 07:44:44 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: video.c Log Message: Typo To generate a diff of this commit: cvs rdiff -u -r1.32.8.1 -r1.32.8.2 src/sys/dev/video.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Tue Jul 26 07:44:44 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: video.c Log Message: Typo To generate a diff of this commit: cvs rdiff -u -r1.32.8.1 -r1.32.8.2 src/sys/dev/video.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/video.c diff -u src/sys/dev/video.c:1.32.8.1 src/sys/dev/video.c:1.32.8.2 --- src/sys/dev/video.c:1.32.8.1 Tue Jul 26 03:24:20 2016 +++ src/sys/dev/video.c Tue Jul 26 07:44:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: video.c,v 1.32.8.1 2016/07/26 03:24:20 pgoyette Exp $ */ +/* $NetBSD: video.c,v 1.32.8.2 2016/07/26 07:44:44 pgoyette Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney@@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.32.8.1 2016/07/26 03:24:20 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.32.8.2 2016/07/26 07:44:44 pgoyette Exp $"); #include "video.h" #if NVIDEO > 0 @@ -1630,7 +1630,7 @@ videoopen(dev_t dev, int flags, int ifmt flags, sc, sc->hw_dev)); hw = sc->hw_if; - if (hw == NULL) [ + if (hw == NULL) { device_release(sc->sc_dev); return ENXIO; }
CVS commit: [pgoyette-localcount] src/sys/dev/acpi
Module Name:src Committed By: pgoyette Date: Tue Jul 26 07:44:21 UTC 2016 Modified Files: src/sys/dev/acpi [pgoyette-localcount]: pckbc_acpi.c Log Message: Fix conversion to device_lookup_acquire() To generate a diff of this commit: cvs rdiff -u -r1.34.10.1 -r1.34.10.2 src/sys/dev/acpi/pckbc_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Tue Jul 26 07:42:40 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: midi.c Log Message: Fix botched edit. To generate a diff of this commit: cvs rdiff -u -r1.85.2.1 -r1.85.2.2 src/sys/dev/midi.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/midi.c diff -u src/sys/dev/midi.c:1.85.2.1 src/sys/dev/midi.c:1.85.2.2 --- src/sys/dev/midi.c:1.85.2.1 Tue Jul 26 03:24:20 2016 +++ src/sys/dev/midi.c Tue Jul 26 07:42:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.85.2.1 2016/07/26 03:24:20 pgoyette Exp $ */ +/* $NetBSD: midi.c,v 1.85.2.2 2016/07/26 07:42:39 pgoyette Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.85.2.1 2016/07/26 03:24:20 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.85.2.2 2016/07/26 07:42:39 pgoyette Exp $"); #include "midi.h" #include "sequencer.h" @@ -1598,9 +1598,8 @@ out: int midi_writebytes(int unit, u_char *bf, int cc) { - device_t self = device_lookup_acquire(_cd, MIDIUNIT(dev)); + device_t self = device_lookup_acquire(_cd, unit); struct midi_softc *sc; - device_lookup_private_acquire(_cd, unit, ); int error; if (self == NULL)
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Tue Jul 26 07:42:40 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: midi.c Log Message: Fix botched edit. To generate a diff of this commit: cvs rdiff -u -r1.85.2.1 -r1.85.2.2 src/sys/dev/midi.c 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: msaitoh Date: Tue Jul 26 07:36:54 UTC 2016 Modified Files: src/doc: CHANGES Log Message: Note sdtemp(4). To generate a diff of this commit: cvs rdiff -u -r1.2175 -r1.2176 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2175 src/doc/CHANGES:1.2176 --- src/doc/CHANGES:1.2175 Mon Jul 18 17:26:58 2016 +++ src/doc/CHANGES Tue Jul 26 07:36:54 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2175 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2176 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -331,3 +331,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: dhcpcd(8): Import dhcpcd-6.11.1. [roy 20160617] mdocml: Import 1.13.4. [christos 20160715] acpi(4): Updated ACPICA to 20160527. [christos 20160718] + sdtemp(4): Add support for Atmel AT30TS00, AT30TSE004, Giantec + GT30TS00, GT34TS02, Microchip MCP9804, MCP98244, IDT + TS3000GB[02], TS3001GB2, TSE200[24]GB2 and On Semiconductor + CAT34TS04. [msaitoh 20160726]
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Tue Jul 26 07:33:30 UTC 2016 Modified Files: src/share/man/man4: sdtemp.4 Log Message: - Add new devices. - s/DDR2 and DDR3 SDRAM DIMMs/DDR2 and newer DIMMs/ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/sdtemp.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/sdtemp.4 diff -u src/share/man/man4/sdtemp.4:1.4 src/share/man/man4/sdtemp.4:1.5 --- src/share/man/man4/sdtemp.4:1.4 Tue Oct 11 17:53:27 2011 +++ src/share/man/man4/sdtemp.4 Tue Jul 26 07:33:30 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: sdtemp.4,v 1.4 2011/10/11 17:53:27 njoly Exp $ +.\" $NetBSD: sdtemp.4,v 1.5 2016/07/26 07:33:30 msaitoh Exp $ .\" .\" Copyright (c) 2008 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 January 8, 2011 +.Dd July 26, 2016 .Dt SDTEMP 4 .Os .Sh NAME @@ -49,7 +49,7 @@ driver provides support for the .Tn Microchip Technology MCP9805/98242 and other chips that conform to JEDEC Standard 21-C section 4.7. -Memory module temperature sensors are optional on DDR2 and DDR3 SDRAM DIMMs. +Memory module temperature sensors are optional on DDR2 and newer DIMMs. Sensors provided by this driver, including the on-chip thresholds for the Alarm Window and Critical level, are accessed through the .Xr envsys 4 @@ -65,28 +65,47 @@ driver include: .Pp .Bl -bullet -offset indent .It -.Tn Catalyst -.Em CAT34TS02 +.Tn Analog Devices +.Em ADT7408 +.It +.Tn Atmel +.Em AT30TS00 +and +.Em AT30TSE004 +.It +.Tn On semiconductor (Catalyst) +.Em CAT34TS02 , +.Em CAT34TS02C , +.Em CAT34TS04 and .Em CAT6095 .It -.Tn Analog Devices -.Em ADT7408 +.Tn Giantec Semiconductor +.Em GT30TS00 +and +.Em GT34TS02 .It .Tn Integrated Deviced Technology -.Em TSE2002B3 +.Em TSE2002B3 , +.Em TSE2002GB2 , +.Em TSE2004GB2 , +.Em TS3000B3 , +.Em TS3000GB0 , +.Em TS3000GB2 and -.Em TSE3000B3 +.Em TS30001GB2 .It .Tn Maxim .Em MAX6604 .It .Tn Microchip Technology +.Em MCP9804 , .Em MCP9805 , .Em MCP9843 , .Em MCP98242 , -and .Em MCP98243 +and +.Em MCP98244 .It .Tn NXP Semiconductors .Em SE97 @@ -94,9 +113,12 @@ and .Em SE98 .It .Tn STmicroelectronics -.Em STTS424 +.Em STTS424 , +.Em STTS424E , +.Em STTS2002 , +.Em STTS2004 and -.Em STTS424E +.Em STTS3000 .El .Sh SEE ALSO .Xr envsys 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Tue Jul 26 07:33:30 UTC 2016 Modified Files: src/share/man/man4: sdtemp.4 Log Message: - Add new devices. - s/DDR2 and DDR3 SDRAM DIMMs/DDR2 and newer DIMMs/ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/sdtemp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Tue Jul 26 07:30:16 UTC 2016 Modified Files: src/sys/dev/i2c: sdtemp.c sdtemp_reg.h Log Message: Reviewed and OK'd by pgoyette: - Add supoprt for Atmel AT30TS00, AT30TSE004, Giantec GT30TS00, GT34TS02, Microchip MCP9804, MCP98244, IDT TS3000GB[02], TS3001GB2, TSE2004GB2, and On Semiconductor CAT34TS04. Taken from OpenBSD. - Add IDT TSE2002GB2. - Check the temperature resolution field in the capability register instead of the hard coded value in the match table. With this change, some devices' temperature resolution would be fixed. - The resolution register is a vendor specific register. - All of IDT devices have the resolution register. - The address of the resolution register of Microchip MCP98244 is different from other Microchip devices. - Show accuracy, range, resolution and timeout with aprint_normal(). - Show timeout with aprint_debug(). To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/i2c/sdtemp.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/sdtemp_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/sdtemp.c diff -u src/sys/dev/i2c/sdtemp.c:1.27 src/sys/dev/i2c/sdtemp.c:1.28 --- src/sys/dev/i2c/sdtemp.c:1.27 Tue Jul 26 07:25:51 2016 +++ src/sys/dev/i2c/sdtemp.c Tue Jul 26 07:30:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.27 2016/07/26 07:25:51 msaitoh Exp $*/ +/* $NetBSD: sdtemp.c,v 1.28 2016/07/26 07:30:16 msaitoh Exp $*/ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.27 2016/07/26 07:25:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.28 2016/07/26 07:30:16 msaitoh Exp $"); #include #include @@ -55,6 +55,9 @@ struct sdtemp_softc { sysmon_envsys_lim_t sc_deflims; uint32_t sc_defprops; int sc_resolution; + uint16_t sc_mfgid; + uint16_t sc_devid; + uint16_t sc_devid_masked; uint16_t sc_capability; }; @@ -79,12 +82,15 @@ static int sdtemp_write_16(struct sdtemp static uint32_t sdtemp_decode_temp(struct sdtemp_softc *, uint16_t); static bool sdtemp_pmf_suspend(device_t, const pmf_qual_t *); static bool sdtemp_pmf_resume(device_t, const pmf_qual_t *); +/* Device dependent config functions */ +static void sdtemp_config_mcp(struct sdtemp_softc *); +static void sdtemp_config_idt(struct sdtemp_softc *); struct sdtemp_dev_entry { const uint16_t sdtemp_mfg_id; - const uint16_t sdtemp_devrev; - const uint16_t sdtemp_mask; - const uint8_t sdtemp_resolution; + const uint16_t sdtemp_devrev; + const uint16_t sdtemp_mask; + void (*sdtemp_config)(struct sdtemp_softc *); const char*sdtemp_desc; }; @@ -92,47 +98,78 @@ struct sdtemp_dev_entry { #define __UK2C(uk) (((uk) - 27315) / 100) -/* - * List of devices known to conform to JEDEC JC42.4 - * - * NOTE: A non-negative value for resolution indicates that the sensor - * resolution is fixed at that number of fractional bits; a negative - * value indicates that the sensor needs to be configured. In either - * case, trip-point registers are fixed at two-bit (0.25C) resolution. - */ +/* List of devices known to conform to JEDEC JC42.4 */ + +#define CMCP sdtemp_config_mcp +#define CIDT sdtemp_config_idt + static const struct sdtemp_dev_entry sdtemp_dev_table[] = { -{ MAXIM_MANUFACTURER_ID, MAX_6604_DEVICE_ID,MAX_6604_MASK, 3, +{ AT_MANUFACTURER_ID, AT_30TS00_DEVICE_ID, AT_30TS00_MASK, NULL, + "Atmel AT30TS00" }, +{ AT2_MANUFACTURER_ID, AT2_30TSE004_DEVICE_ID, AT2_30TSE004_MASK, NULL, + "Atmel AT30TSE004" }, +{ GT_MANUFACTURER_ID, GT_30TS00_DEVICE_ID, GT_30TS00_MASK, NULL, + "Giantec GT30TS00" }, +{ GT2_MANUFACTURER_ID, GT2_34TS02_DEVICE_ID,GT2_34TS02_MASK, NULL, + "Giantec GT34TS02" }, +{ MAXIM_MANUFACTURER_ID, MAX_6604_DEVICE_ID, MAX_6604_MASK, NULL, "Maxim MAX6604" }, -{ MCP_MANUFACTURER_ID, MCP_9805_DEVICE_ID,MCP_9805_MASK, 2, +{ MCP_MANUFACTURER_ID, MCP_9804_DEVICE_ID, MCP_9804_MASK, CMCP, + "Microchip Tech MCP9804" }, +{ MCP_MANUFACTURER_ID, MCP_9805_DEVICE_ID, MCP_9805_MASK, NULL, "Microchip Tech MCP9805/MCP9843" }, -{ MCP_MANUFACTURER_ID, MCP_98243_DEVICE_ID, MCP_98243_MASK, -4, - "Microchip Tech MCP98243" }, -{ MCP_MANUFACTURER_ID, MCP_98242_DEVICE_ID, MCP_98242_MASK, -4, +{ MCP_MANUFACTURER_ID, MCP_98242_DEVICE_ID, MCP_98242_MASK, CMCP, "Microchip Tech MCP98242" }, -{ ADT_MANUFACTURER_ID, ADT_7408_DEVICE_ID,ADT_7408_MASK, 4, +{ MCP_MANUFACTURER_ID, MCP_98243_DEVICE_ID, MCP_98243_MASK, CMCP, + "Microchip Tech MCP98243" }, +{ MCP_MANUFACTURER_ID, MCP_98244_DEVICE_ID, MCP_98244_MASK, CMCP, + "Microchip Tech MCP98244" }, +{ ADT_MANUFACTURER_ID, ADT_7408_DEVICE_ID, ADT_7408_MASK, NULL, "Analog
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Tue Jul 26 07:30:16 UTC 2016 Modified Files: src/sys/dev/i2c: sdtemp.c sdtemp_reg.h Log Message: Reviewed and OK'd by pgoyette: - Add supoprt for Atmel AT30TS00, AT30TSE004, Giantec GT30TS00, GT34TS02, Microchip MCP9804, MCP98244, IDT TS3000GB[02], TS3001GB2, TSE2004GB2, and On Semiconductor CAT34TS04. Taken from OpenBSD. - Add IDT TSE2002GB2. - Check the temperature resolution field in the capability register instead of the hard coded value in the match table. With this change, some devices' temperature resolution would be fixed. - The resolution register is a vendor specific register. - All of IDT devices have the resolution register. - The address of the resolution register of Microchip MCP98244 is different from other Microchip devices. - Show accuracy, range, resolution and timeout with aprint_normal(). - Show timeout with aprint_debug(). To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/i2c/sdtemp.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/sdtemp_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Tue Jul 26 07:25:51 UTC 2016 Modified Files: src/sys/dev/i2c: sdtemp.c Log Message: - Print device ID in 16bits instead of 8bits in aprint_debug(). - s/STTS2002/STTS2004/ for STTS2004. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/i2c/sdtemp.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/i2c/sdtemp.c diff -u src/sys/dev/i2c/sdtemp.c:1.26 src/sys/dev/i2c/sdtemp.c:1.27 --- src/sys/dev/i2c/sdtemp.c:1.26 Wed May 20 00:43:28 2015 +++ src/sys/dev/i2c/sdtemp.c Tue Jul 26 07:25:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.26 2015/05/20 00:43:28 msaitoh Exp $*/ +/* $NetBSD: sdtemp.c,v 1.27 2016/07/26 07:25:51 msaitoh Exp $*/ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.26 2015/05/20 00:43:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.27 2016/07/26 07:25:51 msaitoh Exp $"); #include #include @@ -123,7 +123,7 @@ sdtemp_dev_table[] = { { STTS_MANUFACTURER_ID, STTS_2002_DEVICE_ID,STTS_2002_MASK, 2, "STmicroelectronics STTS2002" }, { STTS_MANUFACTURER_ID, STTS_2004_DEVICE_ID,STTS_2004_MASK, 2, - "STmicroelectronics STTS2002" }, + "STmicroelectronics STTS2004" }, { STTS_MANUFACTURER_ID, STTS_3000_DEVICE_ID,STTS_3000_MASK, 2, "STmicroelectronics STTS3000" }, { CAT_MANUFACTURER_ID, CAT_34TS02_DEVICE_ID, CAT_34TS02_MASK, 4, @@ -176,8 +176,8 @@ sdtemp_match(device_t parent, cfdata_t c i = sdtemp_lookup(mfgid, devid); if (sdtemp_dev_table[i].sdtemp_mfg_id == 0) { - aprint_debug("sdtemp: No match for mfg 0x%04x dev 0x%02x " - "rev 0x%02x at address 0x%02x\n", mfgid, devid >> 8, + aprint_debug("sdtemp: No match for mfg 0x%04x dev 0x%04x " + "rev 0x%02x at address 0x%02x\n", mfgid, devid, devid & 0xff, sc.sc_address); return 0; } @@ -213,8 +213,8 @@ sdtemp_attach(device_t parent, device_t if (sdtemp_dev_table[i].sdtemp_mfg_id == 0) aprint_debug_dev(self, - "mfg 0x%04x dev 0x%02x rev 0x%02x at addr 0x%02x\n", - mfgid, devid >> 8, devid & 0xff, ia->ia_addr); + "mfg 0x%04x dev 0x%04x rev 0x%02x at addr 0x%02x\n", + mfgid, devid, devid & 0xff, ia->ia_addr); /* * Alarm capability is required; if not present, this is likely
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Tue Jul 26 07:25:51 UTC 2016 Modified Files: src/sys/dev/i2c: sdtemp.c Log Message: - Print device ID in 16bits instead of 8bits in aprint_debug(). - s/STTS2002/STTS2004/ for STTS2004. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/i2c/sdtemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [pgoyette-localcount] src/external/cddl/osnet
Module Name:src Committed By: pgoyette Date: Tue Jul 26 06:17:26 UTC 2016 Modified Files: src/external/cddl/osnet/dev/fbt [pgoyette-localcount]: fbt.c src/external/cddl/osnet/dev/sdt [pgoyette-localcount]: sdt.c src/external/cddl/osnet/dist/uts/common/dtrace [pgoyette-localcount]: dtrace.c src/external/cddl/osnet/dist/uts/common/fs/zfs [pgoyette-localcount]: zfs_ioctl.c Log Message: More renaming of LOCALCOUNT_INITIALIZER --> DEVSW_MODULE_INIT To generate a diff of this commit: cvs rdiff -u -r1.18.2.4 -r1.18.2.5 src/external/cddl/osnet/dev/fbt/fbt.c cvs rdiff -u -r1.16.2.4 -r1.16.2.5 src/external/cddl/osnet/dev/sdt/sdt.c cvs rdiff -u -r1.32.2.4 -r1.32.2.5 \ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c cvs rdiff -u -r1.10.2.2 -r1.10.2.3 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [pgoyette-localcount] src/external/cddl/osnet
Module Name:src Committed By: pgoyette Date: Tue Jul 26 06:17:26 UTC 2016 Modified Files: src/external/cddl/osnet/dev/fbt [pgoyette-localcount]: fbt.c src/external/cddl/osnet/dev/sdt [pgoyette-localcount]: sdt.c src/external/cddl/osnet/dist/uts/common/dtrace [pgoyette-localcount]: dtrace.c src/external/cddl/osnet/dist/uts/common/fs/zfs [pgoyette-localcount]: zfs_ioctl.c Log Message: More renaming of LOCALCOUNT_INITIALIZER --> DEVSW_MODULE_INIT To generate a diff of this commit: cvs rdiff -u -r1.18.2.4 -r1.18.2.5 src/external/cddl/osnet/dev/fbt/fbt.c cvs rdiff -u -r1.16.2.4 -r1.16.2.5 src/external/cddl/osnet/dev/sdt/sdt.c cvs rdiff -u -r1.32.2.4 -r1.32.2.5 \ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c cvs rdiff -u -r1.10.2.2 -r1.10.2.3 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_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/external/cddl/osnet/dev/fbt/fbt.c diff -u src/external/cddl/osnet/dev/fbt/fbt.c:1.18.2.4 src/external/cddl/osnet/dev/fbt/fbt.c:1.18.2.5 --- src/external/cddl/osnet/dev/fbt/fbt.c:1.18.2.4 Tue Jul 19 06:27:00 2016 +++ src/external/cddl/osnet/dev/fbt/fbt.c Tue Jul 26 06:17:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fbt.c,v 1.18.2.4 2016/07/19 06:27:00 pgoyette Exp $ */ +/* $NetBSD: fbt.c,v 1.18.2.5 2016/07/26 06:17:26 pgoyette Exp $ */ /* * CDDL HEADER START @@ -153,7 +153,7 @@ static void fbt_resume(void *, dtrace_id #define FBT_PROBETAB_SIZE 0x8000 /* 32k entries -- 128K total */ static const struct cdevsw fbt_cdevsw = { - LOCALCOUNT_INITIALIZER + DEVSW_MODULE_INIT .d_open = fbt_open, .d_close = noclose, .d_read = noread, Index: src/external/cddl/osnet/dev/sdt/sdt.c diff -u src/external/cddl/osnet/dev/sdt/sdt.c:1.16.2.4 src/external/cddl/osnet/dev/sdt/sdt.c:1.16.2.5 --- src/external/cddl/osnet/dev/sdt/sdt.c:1.16.2.4 Tue Jul 19 06:27:00 2016 +++ src/external/cddl/osnet/dev/sdt/sdt.c Tue Jul 26 06:17:26 2016 @@ -39,7 +39,7 @@ * unloaded; in particular, probes may not span multiple kernel modules. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.16.2.4 2016/07/19 06:27:00 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.16.2.5 2016/07/26 06:17:26 pgoyette Exp $"); #include #include @@ -120,7 +120,7 @@ sdt_open(dev_t dev, int flags, int mode, } static const struct cdevsw sdt_cdevsw = { - LOCALCOUNT_INITIALIZER + DEVSW_MODULE_INIT .d_open = sdt_open, .d_close = noclose, .d_read = noread, Index: src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.32.2.4 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.32.2.5 --- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.32.2.4 Tue Jul 19 06:27:01 2016 +++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Tue Jul 26 06:17:26 2016 @@ -15340,7 +15340,7 @@ static dev_type_open(dtrace_open); /* Just opens, clones to the fileops below */ const struct cdevsw dtrace_cdevsw = { - LOCALCOUNT_INITIALIZER + DEVSW_MODULE_INIT .d_open = dtrace_open, .d_close = noclose, .d_read = noread, Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.10.2.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.10.2.3 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.10.2.2 Tue Jul 19 06:27:01 2016 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 26 06:17:26 2016 @@ -4564,7 +4564,7 @@ nb_zfsdev_ioctl(dev_t dev, u_long cmd, v } const struct bdevsw zfs_bdevsw = { - LOCALCOUNT_INITIALIZER + DEVSW_MODULE_INIT .d_open = nb_zvol_bopen, .d_close = nb_zvol_bclose, .d_strategy = zvol_strategy, @@ -4575,7 +4575,7 @@ const struct bdevsw zfs_bdevsw = { }; const struct cdevsw zfs_cdevsw = { - LOCALCOUNT_INITIALIZER + DEVSW_MODULE_INIT .d_open = nb_zvol_copen, .d_close = nb_zvol_cclose, .d_read = nb_zvol_read,