CVS commit: src/sys/net
Module Name:src Committed By: msaitoh Date: Tue Apr 23 07:29:04 UTC 2019 Modified Files: src/sys/net: if_media.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/net/if_media.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/net/if_media.c diff -u src/sys/net/if_media.c:1.42 src/sys/net/if_media.c:1.43 --- src/sys/net/if_media.c:1.42 Mon Apr 22 11:10:52 2019 +++ src/sys/net/if_media.c Tue Apr 23 07:29:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_media.c,v 1.42 2019/04/22 11:10:52 msaitoh Exp $ */ +/* $NetBSD: if_media.c,v 1.43 2019/04/23 07:29:04 msaitoh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.42 2019/04/22 11:10:52 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.43 2019/04/23 07:29:04 msaitoh Exp $"); #include #include @@ -97,8 +97,8 @@ static int _ifmedia_ioctl(struct ifnet * /* * Compile-time options: * IFMEDIA_DEBUG: - * turn on implementation-level debug printfs. - * Useful for debugging newly-ported drivers. + * Turn on implementation-level debug printfs. + * Useful for debugging newly-ported drivers. */ #ifdef IFMEDIA_DEBUG @@ -252,13 +252,10 @@ _ifmedia_ioctl(struct ifnet *ifp, struct int error = 0; if (ifp == NULL || ifr == NULL || ifm == NULL) - return (EINVAL); + return EINVAL; switch (cmd) { - /* - * Set the current media. - */ - case SIOCSIFMEDIA: + case SIOCSIFMEDIA: /* Set the current media. */ { struct ifmedia_entry *oldentry; u_int oldmedia; @@ -310,9 +307,7 @@ _ifmedia_ioctl(struct ifnet *ifp, struct break; } - /* - * Get list of available media and current media on interface. - */ + /* Get list of available media and current media on interface. */ case SIOCGIFMEDIA: { struct ifmedia_entry *ep; @@ -455,7 +450,7 @@ ifmedia_baudrate(int mword) for (i = 0; ifmedia_baudrate_descriptions[i].ifmb_word != 0; i++) { if ((mword & (IFM_NMASK|IFM_TMASK)) == ifmedia_baudrate_descriptions[i].ifmb_word) - return (ifmedia_baudrate_descriptions[i].ifmb_baudrate); + return ifmedia_baudrate_descriptions[i].ifmb_baudrate; } /* Not known. */
CVS commit: src/sys/compat
Module Name:src Committed By: msaitoh Date: Tue Apr 23 07:45:07 UTC 2019 Modified Files: src/sys/compat/common: uipc_syscalls_40.c src/sys/compat/netbsd32: netbsd32_ioctl.c src/sys/compat/sunos: sunos_ioctl.c src/sys/compat/sunos32: sunos32_ioctl.c src/sys/compat/ultrix: ultrix_ioctl.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/compat/common/uipc_syscalls_40.c cvs rdiff -u -r1.101 -r1.102 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.68 -r1.69 src/sys/compat/sunos/sunos_ioctl.c cvs rdiff -u -r1.34 -r1.35 src/sys/compat/sunos32/sunos32_ioctl.c cvs rdiff -u -r1.37 -r1.38 src/sys/compat/ultrix/ultrix_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/sys/compat/common/uipc_syscalls_40.c diff -u src/sys/compat/common/uipc_syscalls_40.c:1.19 src/sys/compat/common/uipc_syscalls_40.c:1.20 --- src/sys/compat/common/uipc_syscalls_40.c:1.19 Thu Apr 18 17:45:12 2019 +++ src/sys/compat/common/uipc_syscalls_40.c Tue Apr 23 07:45:06 2019 @@ -1,9 +1,9 @@ -/* $NetBSD: uipc_syscalls_40.c,v 1.19 2019/04/18 17:45:12 christos Exp $ */ +/* $NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $ */ /* written by Pavel Cahyna, 2006. Public domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.19 2019/04/18 17:45:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -29,10 +29,8 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall #include /* - * Return interface configuration - * of system. List may be used - * in later ioctl's (above) to get - * other information. + * Return interface configuration of system. List may be used in later + * ioctl's (above) to get other information. */ /*ARGSUSED*/ static int @@ -158,7 +156,7 @@ compat_ifconf(u_long cmd, void *data) ifc->ifc_len -= space; else ifc->ifc_len = -space; - return (0); + return 0; release_exit: if_release(ifp, &psref); Index: src/sys/compat/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.101 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.102 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.101 Sun Jan 27 02:08:40 2019 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Tue Apr 23 07:45:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.101 2019/01/27 02:08:40 pgoyette Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.102 2019/04/23 07:45:06 msaitoh Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.101 2019/01/27 02:08:40 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.102 2019/04/23 07:45:06 msaitoh Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -94,7 +94,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_ioc #if 0 static inline void -netbsd32_to_format_op(struct netbsd32_format_op *s32p, struct format_op *p, u_long cmd) +netbsd32_to_format_op(struct netbsd32_format_op *s32p, +struct format_op *p, u_long cmd) { p->df_buf = (char *)NETBSD32PTR64(s32p->df_buf); @@ -142,8 +143,9 @@ netbsd32_to_oifreq(struct netbsd32_oifre static inline void netbsd32_to_if_addrprefreq(const struct netbsd32_if_addrprefreq *ifap32, - struct if_addrprefreq *ifap, u_long cmd) +struct if_addrprefreq *ifap, u_long cmd) { + strlcpy(ifap->ifap_name, ifap32->ifap_name, sizeof(ifap->ifap_name)); ifap->ifap_preference = ifap32->ifap_preference; memcpy(&ifap->ifap_addr, &ifap32->ifap_addr, @@ -160,7 +162,8 @@ netbsd32_to_ifconf(struct netbsd32_ifcon } static inline void -netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p, struct ifmediareq *p, u_long cmd) +netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p, +struct ifmediareq *p, u_long cmd) { memcpy(p, s32p, sizeof *s32p); @@ -211,7 +214,8 @@ netbsd32_to_ifdrv(struct netbsd32_ifdrv } static inline void -netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *s32p, struct sioc_vif_req *p, u_long cmd) +netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *s32p, +struct sioc_vif_req *p, u_long cmd) { p->vifi = s32p->vifi; @@ -222,7 +226,8 @@ netbsd32_to_sioc_vif_req(struct netbsd32 } static inline void -netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *s32p, struct sioc_sg_req *p, u_long cmd) +netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *s32p, +struct sioc_sg_req *p, u_long cmd) { p->src = s32p->src; @@ -235,6 +240,7 @@ netbsd32_to_sioc_sg_req(struct netbsd32_ static inline void netbsd32_to_atareq(struct netbsd32_atareq *s32p, struct atareq *p, u_long cmd) { + p->flags = (u_long)s32p->flags; p->command = s32p->command; p->features = s32p->features; @@ -250,7 +256,8 @@ netbsd32_to_atareq(struct netbsd32_atare } s
CVS commit: [netbsd-8] src/sys/external/bsd
Module Name:src Committed By: martin Date: Tue Apr 23 10:16:52 UTC 2019 Modified Files: src/sys/external/bsd/common/include/linux [netbsd-8]: err.h errno.h src/sys/external/bsd/drm2/dist/drm/nouveau [netbsd-8]: nouveau_drm.c nouveau_fence.c src/sys/external/bsd/drm2/drm [netbsd-8]: drm_drv.c src/sys/external/bsd/drm2/include/drm [netbsd-8]: drm_wait_netbsd.h src/sys/external/bsd/drm2/linux [netbsd-8]: linux_ww_mutex.c Log Message: Pull up following revision(s) via patch (requested by mrg in ticket #1242): sys/external/bsd/common/include/linux/err.h: revision 1.3 sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h: revision 1.15 sys/external/bsd/common/include/linux/errno.h: revision 1.4 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c: revision 1.17 sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.6 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c: revision 1.14 fix various problems i've seen where cv_*wait*() return ERESTART, which is -3 in netbsd, which we have mapped linux ERESTARTSYS to. this has a problem because linux code often returns errors and pointers in the same value, and pointer values between -4095 and - -1 are considered as error returns, but -3 ends up as 3 and thus is not considered an error, and mayhem ensues. with this in place my kabylake system seems actually stable, i have not triggered any of my prior issues in almost 4 weeks now. Taylor asked me to write up a description and then wrote most of the text below for me :-) In Linux code, we always work with ERESTARTSYS so the code meaning start over is a positive NetBSD errno safe for PTR_ERR/ERR_PTR. To achieve this: 1. adapt all cv_waits that return to Linux so they map ERESTART to ERESTARTSYS, and 2. adapt all returns to userland so they convert ERESTARTSYS to ERESTART. Leave EINTR and all other error codes alone. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.16.1 src/sys/external/bsd/common/include/linux/err.h cvs rdiff -u -r1.3 -r1.3.24.1 \ src/sys/external/bsd/common/include/linux/errno.h cvs rdiff -u -r1.8 -r1.8.10.1 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c cvs rdiff -u -r1.4.10.1 -r1.4.10.2 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c cvs rdiff -u -r1.17.10.1 -r1.17.10.2 src/sys/external/bsd/drm2/drm/drm_drv.c cvs rdiff -u -r1.14 -r1.14.10.1 \ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h cvs rdiff -u -r1.2.10.2 -r1.2.10.3 \ src/sys/external/bsd/drm2/linux/linux_ww_mutex.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/common/include/linux/err.h diff -u src/sys/external/bsd/common/include/linux/err.h:1.1 src/sys/external/bsd/common/include/linux/err.h:1.1.16.1 --- src/sys/external/bsd/common/include/linux/err.h:1.1 Tue Aug 18 21:10:56 2015 +++ src/sys/external/bsd/common/include/linux/err.h Tue Apr 23 10:16:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: err.h,v 1.1 2015/08/18 21:10:56 skrll Exp $ */ +/* $NetBSD: err.h,v 1.1.16.1 2019/04/23 10:16:51 martin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #include -#define MAX_ERRNO ELAST +#define MAX_ERRNO 4095 static inline bool IS_ERR_VALUE(uintptr_t n) Index: src/sys/external/bsd/common/include/linux/errno.h diff -u src/sys/external/bsd/common/include/linux/errno.h:1.3 src/sys/external/bsd/common/include/linux/errno.h:1.3.24.1 --- src/sys/external/bsd/common/include/linux/errno.h:1.3 Wed Jul 16 20:56:24 2014 +++ src/sys/external/bsd/common/include/linux/errno.h Tue Apr 23 10:16:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: errno.h,v 1.3 2014/07/16 20:56:24 riastradh Exp $ */ +/* $NetBSD: errno.h,v 1.3.24.1 2019/04/23 10:16:51 martin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -35,7 +35,10 @@ * - Linux consistently passes around negative errno values. NetBSD * consistently passes around positive ones, except the special magic * in-kernel ones (EJUSTRETURN, ERESTART, &c.) which should not be - * exposed to userland. Be careful! + * exposed to userland *or* linux-only code using the negative pointer + * means error return pattern. Be careful! If Using ERESTARTSYS from + * Linux code, be sure it is remapped back to ERESTART before NetBSD + * code sees it. */ #ifndef _LINUX_ERRNO_H_ @@ -43,7 +46,7 @@ #include -#define ERESTARTSYS ERESTART +#define ERESTARTSYS (ELAST+1) /* XXX */ #define ENOTSUPP ENOTSUP /* XXX ??? */ #define EREMOTEIO EIO /* XXX Urk... */ #define ECHRNG ERANGE /* XXX ??? */ Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.8 src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.8.10.1 --- src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_d
CVS commit: [netbsd-8] src
Module Name:src Committed By: martin Date: Tue Apr 23 10:24:54 UTC 2019 Modified Files: src/external/mit/xorg/bin/proxymngr [netbsd-8]: Makefile src/external/mit/xorg/bin/sessreg [netbsd-8]: Makefile src/external/mit/xorg/bin/xinit [netbsd-8]: Makefile src/external/mit/xorg/lib/libXaw [netbsd-8]: Makefile src/external/mit/xorg/lib/xkeyboard-config [netbsd-8]: Makefile src/external/mit/xorg/server/xorg-server.old/hw/xfree86/doc [netbsd-8]: Makefile src/share/mk [netbsd-8]: bsd.x11.mk Log Message: Pull up following revision(s) via patch (requested by mrg in ticket #1243): external/mit/xorg/bin/xinit/Makefile: revision 1.7 external/mit/xorg/lib/libXaw/Makefile: revision 1.12 external/mit/xorg/lib/xkeyboard-config/Makefile: revision 1.13 external/mit/xorg/server/xorg-server.old/hw/xfree86/doc/Makefile: revision 1.2 share/mk/bsd.x11.mk: revision 1.130 external/mit/xorg/bin/sessreg/Makefile: revision 1.7 external/mit/xorg/bin/proxymngr/Makefile: revision 1.4 fix a bunch of man page transforms. XXX X11MANCPP=yes has only one use left, maybe it can go away! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.54.1 src/external/mit/xorg/bin/proxymngr/Makefile cvs rdiff -u -r1.6 -r1.6.8.1 src/external/mit/xorg/bin/sessreg/Makefile cvs rdiff -u -r1.6 -r1.6.34.1 src/external/mit/xorg/bin/xinit/Makefile cvs rdiff -u -r1.11 -r1.11.8.1 src/external/mit/xorg/lib/libXaw/Makefile cvs rdiff -u -r1.12 -r1.12.6.1 \ src/external/mit/xorg/lib/xkeyboard-config/Makefile cvs rdiff -u -r1.1.1.1 -r1.1.1.1.8.1 \ src/external/mit/xorg/server/xorg-server.old/hw/xfree86/doc/Makefile cvs rdiff -u -r1.124 -r1.124.6.1 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/proxymngr/Makefile diff -u src/external/mit/xorg/bin/proxymngr/Makefile:1.2 src/external/mit/xorg/bin/proxymngr/Makefile:1.2.54.1 --- src/external/mit/xorg/bin/proxymngr/Makefile:1.2 Tue Oct 14 23:37:19 2008 +++ src/external/mit/xorg/bin/proxymngr/Makefile Tue Apr 23 10:24:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2008/10/14 23:37:19 cube Exp $ +# $NetBSD: Makefile,v 1.2.54.1 2019/04/23 10:24:54 martin Exp $ .include @@ -23,6 +23,9 @@ FILESDIR= ${PROXYMANAGERDIR} LDADD+= -lXt -lSM -lICE -lXext -lX11 DPADD+= ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11} +X11EXTRAMANTRANSFORMS+= \ + __configdir__ ${X11ETCDIR}/proxymngr + .PATH: ${X11SRCDIR.${PROG}} .include Index: src/external/mit/xorg/bin/sessreg/Makefile diff -u src/external/mit/xorg/bin/sessreg/Makefile:1.6 src/external/mit/xorg/bin/sessreg/Makefile:1.6.8.1 --- src/external/mit/xorg/bin/sessreg/Makefile:1.6 Sun Aug 24 18:27:16 2014 +++ src/external/mit/xorg/bin/sessreg/Makefile Tue Apr 23 10:24:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2014/08/24 18:27:16 apb Exp $ +# $NetBSD: Makefile,v 1.6.8.1 2019/04/23 10:24:54 martin Exp $ .include @@ -12,6 +12,11 @@ X11EXTRAMANDEFS+= -e 's,__ttys_file__,/e -e 's,__utmp_file__,${XDMPIDDIR}/utmp,g' \ -e 's,__wtmp_file__,${XDMLOGDIR}/wtmp,g' +X11EXTRAMANTRANSFORMS+= \ + __utmp_manpage__ utmpx \ + __wtmp_manpage__ wtmpx \ + __lastlog_file__ lastlogx + .include .include Index: src/external/mit/xorg/bin/xinit/Makefile diff -u src/external/mit/xorg/bin/xinit/Makefile:1.6 src/external/mit/xorg/bin/xinit/Makefile:1.6.34.1 --- src/external/mit/xorg/bin/xinit/Makefile:1.6 Wed Aug 3 02:56:29 2011 +++ src/external/mit/xorg/bin/xinit/Makefile Tue Apr 23 10:24:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/08/03 02:56:29 mrg Exp $ +# $NetBSD: Makefile,v 1.6.34.1 2019/04/23 10:24:54 martin Exp $ .include @@ -27,8 +27,10 @@ FILESDIR= ${XINITDIR} LDADD+= -lXmuu -lXt -lSM -lICE -lXext -lX11 DPADD+= ${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11} -X11EXTRAMANDEFS=-D__xinitdir__=${XINITDIR} -X11MANCPP= yes +X11EXTRAMANTRANSFORMS+= \ + __xinitdir__ ${XINITDIR} \ + __configdir__ ${X11LIBDIR}/xinit \ + __SCOMAN__ 1 .PATH: ${X11SRCDIR.${PROG}} .PATH: ${X11SRCDIR.${PROG}}/man Index: src/external/mit/xorg/lib/libXaw/Makefile diff -u src/external/mit/xorg/lib/libXaw/Makefile:1.11 src/external/mit/xorg/lib/libXaw/Makefile:1.11.8.1 --- src/external/mit/xorg/lib/libXaw/Makefile:1.11 Sun Jul 19 07:55:07 2015 +++ src/external/mit/xorg/lib/libXaw/Makefile Tue Apr 23 10:24:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2015/07/19 07:55:07 mrg Exp $ +# $NetBSD: Makefile,v 1.11.8.1 2019/04/23 10:24:54 martin Exp $ .include @@ -69,6 +69,9 @@ LIBDPLIBS=\ PKGCONFIG= xaw7 PKGDIST= ${LIBOLD} +X11EXTRAMANTRANSFORMS+= \ + __docdir__ ${X11LIBDIR}/doc + .include .include Index: src/external/mit/xorg/lib/xkeyboard-config/Makefile diff -u src/external/mit/xorg/lib/xkeyboard-config/Makefile:1.12 src/external/mit/xorg/li
CVS commit: [netbsd-8] src/external/mit/xorg/server/xorg-server/hw/xfree86/doc
Module Name:src Committed By: martin Date: Tue Apr 23 10:28:29 UTC 2019 Modified Files: src/external/mit/xorg/server/xorg-server/hw/xfree86/doc [netbsd-8]: Makefile Log Message: Pull up following revision(s) via patch (requested by mrg in ticket #1243): external/mit/xorg/bin/xinit/Makefile: revision 1.7 external/mit/xorg/lib/libXaw/Makefile: revision 1.12 external/mit/xorg/lib/xkeyboard-config/Makefile: revision 1.13 external/mit/xorg/server/xorg-server.old/hw/xfree86/doc/Makefile: revision 1.2 share/mk/bsd.x11.mk: revision 1.130 external/mit/xorg/bin/sessreg/Makefile: revision 1.7 external/mit/xorg/bin/proxymngr/Makefile: revision 1.4 fix a bunch of man page transforms. XXX X11MANCPP=yes has only one use left, maybe it can go away! To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.6.1 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile:1.7 src/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile:1.7.6.1 --- src/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile:1.7 Sun Aug 14 03:43:04 2016 +++ src/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile Tue Apr 23 10:28:29 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2016/08/14 03:43:04 mrg Exp $ +# $NetBSD: Makefile,v 1.7.6.1 2019/04/23 10:28:29 martin Exp $ .include @@ -12,5 +12,11 @@ FILESDIR= ${X11USRLIBDIR}/X11/doc MAN= Xorg.1 xorg.conf.5 # xorg.conf.d.5? +X11EXTRAMANTRANSFORMS+= \ + __xconfigdir__ xorg.conf.d \ + __xkbdir__ ${X11LIBDIR}/xkb \ + __modulepath__ ${X11ROOTDIR}/modules \ + __X11datadir__ ${X11LIBDIR} + .include .include
CVS commit: [netbsd-8] src/etc/mtree
Module Name:src Committed By: martin Date: Tue Apr 23 10:38:49 UTC 2019 Modified Files: src/etc/mtree [netbsd-8]: Makefile NetBSD.dist.base Added Files: src/etc/mtree [netbsd-8]: NetBSD.dist.iscsi Log Message: Pull up following revision(s) via patch (requested by mrg in ticket #1244): etc/mtree/NetBSD.dist.base: revision 1.190 etc/mtree/NetBSD.dist.base: revision 1.191 etc/mtree/NetBSD.dist.base: revision 1.192 etc/mtree/NetBSD.dist.base: revision 1.193 etc/mtree/NetBSD.dist.iscsi: revision 1.1 etc/mtree/NetBSD.dist.base: revision 1.186 etc/mtree/NetBSD.dist.base: revision 1.187 etc/mtree/NetBSD.dist.base: revision 1.188 etc/mtree/NetBSD.dist.base: revision 1.189 etc/mtree/Makefile: revision 1.38 - add new entries of gcc=7 and libgomp, libasan, liblsan, libstdc++, libubsan - add missing header files fpr gcc=7 - add some missing gcc=5 obsolete entries - create ./usr/include/dev/bluetooth in mtree not make, and move it into the base set where all other directories are. create include/dev/dm here instead of elsewhere, where it may fail add missing ./usr/include/dev/hdaudio (base). (perhaps we should stop 'make includes' from creating the target directory for normal builds as this leads to mtree inconsistencies.) add missing ./usr/include/dev/hdmicec add missing ./usr/include/dev/iscsi. add two more missing subdirs: ./usr/include/dev/pud ./usr/include/dev/putter add final missing directory from /usr/include: ./usr/include/netmpls move ./usr/include/dev/iscsi into NetBSD.dist.iscsi that is only included if MKISCSI != no. To generate a diff of this commit: cvs rdiff -u -r1.36.6.1 -r1.36.6.2 src/etc/mtree/Makefile cvs rdiff -u -r1.160.2.3 -r1.160.2.4 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r0 -r1.1.2.2 src/etc/mtree/NetBSD.dist.iscsi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/Makefile diff -u src/etc/mtree/Makefile:1.36.6.1 src/etc/mtree/Makefile:1.36.6.2 --- src/etc/mtree/Makefile:1.36.6.1 Wed Aug 30 15:45:04 2017 +++ src/etc/mtree/Makefile Tue Apr 23 10:38:49 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36.6.1 2017/08/30 15:45:04 martin Exp $ +# $NetBSD: Makefile,v 1.36.6.2 2019/04/23 10:38:49 martin Exp $ .include @@ -40,6 +40,10 @@ EXTRA_DIST_FILES+= NetBSD.dist.dtrace EXTRA_DIST_FILES+= NetBSD.dist.extsrc .endif +.if ${MKISCSI} != "no" +EXTRA_DIST_FILES+= NetBSD.dist.iscsi +.endif + NetBSD.dist: NetBSD.dist.tmp cmp -s NetBSD.dist.tmp NetBSD.dist || { \ echo "Updating NetBSD.dist"; \ Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.160.2.3 src/etc/mtree/NetBSD.dist.base:1.160.2.4 --- src/etc/mtree/NetBSD.dist.base:1.160.2.3 Wed Oct 31 08:55:32 2018 +++ src/etc/mtree/NetBSD.dist.base Tue Apr 23 10:38:49 2019 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.160.2.3 2018/10/31 08:55:32 martin Exp $ +# $NetBSD: NetBSD.dist.base,v 1.160.2.4 2019/04/23 10:38:49 martin Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -112,10 +112,14 @@ ./usr/include/dev ./usr/include/dev/apm ./usr/include/dev/ata +./usr/include/dev/bluetooth ./usr/include/dev/dec +./usr/include/dev/dm ./usr/include/dev/dmover ./usr/include/dev/dtv ./usr/include/dev/filemon +./usr/include/dev/hdaudio +./usr/include/dev/hdmicec ./usr/include/dev/hpc ./usr/include/dev/i2c ./usr/include/dev/i2o @@ -127,6 +131,8 @@ ./usr/include/dev/pci ./usr/include/dev/pckbc ./usr/include/dev/pcmcia +./usr/include/dev/pud +./usr/include/dev/putter ./usr/include/dev/raidframe ./usr/include/dev/sbus ./usr/include/dev/scsipi @@ -208,15 +214,16 @@ ./usr/include/msdosfs ./usr/include/net ./usr/include/net/agr +./usr/include/net80211 ./usr/include/netatalk ./usr/include/netbt ./usr/include/netcan ./usr/include/netinet -./usr/include/net80211 ./usr/include/netinet6 ./usr/include/netipsec ./usr/include/netisdn ./usr/include/netkey +./usr/include/netmpls ./usr/include/netnatm ./usr/include/netpgp ./usr/include/netsmb Added files: Index: src/etc/mtree/NetBSD.dist.iscsi diff -u /dev/null src/etc/mtree/NetBSD.dist.iscsi:1.1.2.2 --- /dev/null Tue Apr 23 10:38:49 2019 +++ src/etc/mtree/NetBSD.dist.iscsi Tue Apr 23 10:38:49 2019 @@ -0,0 +1,3 @@ +# $NetBSD: NetBSD.dist.iscsi,v 1.1.2.2 2019/04/23 10:38:49 martin Exp $ + +./usr/include/dev/iscsi
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue Apr 23 10:40:16 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1242 - #1244 To generate a diff of this commit: cvs rdiff -u -r1.1.2.133 -r1.1.2.134 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.133 src/doc/CHANGES-8.1:1.1.2.134 --- src/doc/CHANGES-8.1:1.1.2.133 Mon Apr 22 09:07:40 2019 +++ src/doc/CHANGES-8.1 Tue Apr 23 10:40:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.133 2019/04/22 09:07:40 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.134 2019/04/23 10:40:16 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2913,3 +2913,34 @@ sys/net/if_gif.c1.146 gif(4): prevent duplicate tunnels early. [knakahara, ticket #1241] +sys/external/bsd/common/include/linux/err.h 1.3 (patch) +sys/external/bsd/common/include/linux/errno.h 1.4 (patch) +sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c 1.17 (patch) +sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c 1.14 (patch) +sys/external/bsd/drm2/drm/drm_drv.c (patch) +sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h 1.15 (patch) +sys/external/bsd/drm2/linux/linux_ww_mutex.c 1.6 (patch) + + Fix various issues with handling of ERESTART and + positive/negative error returns. + [mrg, ticket #1242] + +external/mit/xorg/bin/proxymngr/Makefile 1.4 (patch) +external/mit/xorg/bin/sessreg/Makefile 1.7 (patch) +external/mit/xorg/bin/xinit/Makefile 1.7 (patch) +external/mit/xorg/lib/libXaw/Makefile 1.12 (patch) +external/mit/xorg/lib/xkeyboard-config/Makefile 1.13 (patch) +external/mit/xorg/server/xorg-server.old/hw/xfree86/doc/Makefile 1.2 (patch) +external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile (patch) +share/mk/bsd.x11.mk1.130 (patch) + + Fix a bunch of man page transforms. + [mrg, ticket #1243] + +etc/mtree/Makefile1.38 (patch) +etc/mtree/NetBSD.dist.base 1.186-1.193 (patch) +etc/mtree/NetBSD.dist.iscsi 1.1 (patch) + + Fix various conditionals and add missing mtree directory specs. + [mrg, ticket #1244] +
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: bouyer Date: Tue Apr 23 11:05:15 UTC 2019 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Don't try to aquire/release the pmap lock when in ddb. Avoids a deadlock when entering ddb, or on "mach cpu n" ddb command (the pmap lock may already be held by another CPU, which is halted when entering ddb). Posted to port-arm@ on April 19. To generate a diff of this commit: cvs rdiff -u -r1.371 -r1.372 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.371 src/sys/arch/arm/arm32/pmap.c:1.372 --- src/sys/arch/arm/arm32/pmap.c:1.371 Sun Oct 28 14:59:17 2018 +++ src/sys/arch/arm/arm32/pmap.c Tue Apr 23 11:05:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.371 2018/10/28 14:59:17 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.372 2019/04/23 11:05:14 bouyer Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -217,7 +217,11 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.371 2018/10/28 14:59:17 skrll Exp $"); +#ifdef DDB +#include +#endif + +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.372 2019/04/23 11:05:14 bouyer Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -538,6 +542,11 @@ vaddr_t pmap_directlimit; static inline void pmap_acquire_pmap_lock(pmap_t pm) { +#if defined(MULTIPROCESSOR) && defined(DDB) + if (db_onproc != NULL) + return; +#endif + if (pm == pmap_kernel()) { #ifdef MULTIPROCESSOR KERNEL_LOCK(1, NULL); @@ -550,6 +559,10 @@ pmap_acquire_pmap_lock(pmap_t pm) static inline void pmap_release_pmap_lock(pmap_t pm) { +#if defined(MULTIPROCESSOR) && defined(DDB) + if (db_onproc != NULL) + return; +#endif if (pm == pmap_kernel()) { #ifdef MULTIPROCESSOR KERNEL_UNLOCK_ONE(NULL);
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: bouyer Date: Tue Apr 23 11:21:21 UTC 2019 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Fix a deadlock between the pool and pmap codes: - cpu0 grabs the kernel lock (e.g. from a non-MPSAFE interrupt) and calls pool_get(). - cpu1 does a pool_get() on the same pool from MPSAFE code, which needs a pool_page_alloc(), which ends up in pmap_extract_coherency(). So cpu0 holds the kernel_lock and wants the pool lock. cpu1 holds the pool lock and wants the kernel_lock in pmap_extract_coherency(). The pmap code should not rely on kernel_lock. Intead make the pmap_kernel()->pm_obj_lock a IPL_VM lock and use it as pmap lock (thus dropping the pmap test pmap_{acquire,release}_pmap_lock()). This needs to be a IPL_VM because unlike user pmaps, this can be locked from interrupt context. Add a IPL_NONE lock for pmap_growkernel(). We can't use pmap_kernel()->pm_obj_lock here because pmap_grow_map() may sleep. Make pmap_lock (which may be locked with pm_obj_lock held) a IPL_VM lock in all case. reorder a few things to not call pool_get()/pool_put() (which may sleep) with pm_obj_lock held. Patch initially posted to port-arm@ on April 19, improved patch (per suggestions from Nick Hudson and Jason Thorpe) on April 21. To generate a diff of this commit: cvs rdiff -u -r1.372 -r1.373 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.372 src/sys/arch/arm/arm32/pmap.c:1.373 --- src/sys/arch/arm/arm32/pmap.c:1.372 Tue Apr 23 11:05:14 2019 +++ src/sys/arch/arm/arm32/pmap.c Tue Apr 23 11:21:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.372 2019/04/23 11:05:14 bouyer Exp $ */ +/* $NetBSD: pmap.c,v 1.373 2019/04/23 11:21:21 bouyer Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -221,7 +221,7 @@ #include #endif -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.372 2019/04/23 11:05:14 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.373 2019/04/23 11:21:21 bouyer Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -521,6 +521,7 @@ static size_t cnptes; vaddr_t memhook; /* used by mem.c & others */ kmutex_t memlock __cacheline_aligned; /* used by mem.c & others */ kmutex_t pmap_lock __cacheline_aligned; +kmutex_t kpm_lock __cacheline_aligned; extern void *msgbufaddr; int pmap_kmpages; /* @@ -543,33 +544,21 @@ static inline void pmap_acquire_pmap_lock(pmap_t pm) { #if defined(MULTIPROCESSOR) && defined(DDB) - if (db_onproc != NULL) + if (__predict_false(db_onproc != NULL)) return; #endif - if (pm == pmap_kernel()) { -#ifdef MULTIPROCESSOR - KERNEL_LOCK(1, NULL); -#endif - } else { - mutex_enter(pm->pm_lock); - } + mutex_enter(pm->pm_lock); } static inline void pmap_release_pmap_lock(pmap_t pm) { #if defined(MULTIPROCESSOR) && defined(DDB) - if (db_onproc != NULL) + if (__predict_false(db_onproc != NULL)) return; #endif - if (pm == pmap_kernel()) { -#ifdef MULTIPROCESSOR - KERNEL_UNLOCK_ONE(NULL); -#endif - } else { - mutex_exit(pm->pm_lock); - } + mutex_exit(pm->pm_lock); } static inline void @@ -3070,6 +3059,10 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ #else const bool vector_page_p = (va == vector_page); #endif + struct pmap_page *pp = pmap_pv_tracked(pa); + struct pv_entry *new_pv = NULL; + struct pv_entry *old_pv = NULL; + int error = 0; UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist); @@ -3085,6 +3078,12 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ * test for a managed page by checking pg != NULL. */ pg = pmap_initialized ? PHYS_TO_VM_PAGE(pa) : NULL; + /* + * if we may need a new pv entry allocate if now, as we can't do it + * with the kernel_pmap locked + */ + if (pg || pp) + new_pv = pool_get(&pmap_pv_pool, PR_NOWAIT); nflags = 0; if (prot & VM_PROT_WRITE) @@ -3108,7 +3107,8 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ if (l2b == NULL) { if (flags & PMAP_CANFAIL) { pmap_release_pmap_lock(pm); - return (ENOMEM); + error = ENOMEM; + goto free_pv; } panic("pmap_enter: failed to allocate L2 bucket"); } @@ -3131,8 +3131,6 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ } else opg = NULL; - struct pmap_page *pp = pmap_pv_tracked(pa); - if (pg || pp) { KASSERT((pg != NULL) != (pp != NULL)); struct vm_page_md *md = (pg != NULL) ? VM_PAGE_TO_MD(pg) : @@ -3241,9 +3239,10 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ } #endif } else { -pmap_release_page_lock(md); -pv = pool_get(&pmap_pv_pool, PR_NOWAIT); +pv = new_pv; +new_pv = NULL; if (pv == NULL) { + pmap_release_page_lock(md); pmap_release_pmap_lock(pm); if ((flags & PMAP_CANFAIL) == 0) panic("pmap_enter: " @@ -3254,7 +3253,6 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ 0, 0, 0, 0); return (ENOMEM); } -pmap_acquire_page_lock(md); }
CVS commit: src/sys/conf
Module Name:src Committed By: christos Date: Tue Apr 23 13:36:42 UTC 2019 Modified Files: src/sys/conf: dts.mk Log Message: Add -h to the link command so that we replace the target file each time; this should fix: *** Failed target: .BEGIN *** Failed command: ln -sf /usr/src/sys/external/gpl2/dts/dist/arch/arm/boot/dts dts/arm *** Error code 1 (ignored) ln: dts/arm/dts: Permission denied To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/conf/dts.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/dts.mk diff -u src/sys/conf/dts.mk:1.10 src/sys/conf/dts.mk:1.11 --- src/sys/conf/dts.mk:1.10 Sun Dec 16 23:37:15 2018 +++ src/sys/conf/dts.mk Tue Apr 23 09:36:42 2019 @@ -1,4 +1,4 @@ -# $NetBSD: dts.mk,v 1.10 2018/12/17 04:37:15 thorpej Exp $ +# $NetBSD: dts.mk,v 1.11 2019/04/23 13:36:42 christos Exp $ DTSARCH?=${MACHINE_CPU} DTSGNUARCH?=${DTSARCH} @@ -8,7 +8,7 @@ DTSPADDING?=1024 .BEGIN:: -@mkdir -p dts .for _arch in ${DTSGNUARCH} - -@ln -sf ${S:S@^../@../../@}/external/gpl2/dts/dist/arch/${_arch}/boot/dts dts/${_arch} + -@ln -shf ${S:S@^../@../../@}/external/gpl2/dts/dist/arch/${_arch}/boot/dts dts/${_arch} .endfor .endif
CVS commit: [isaki-audio2] src/sys/arch/arm/xscale
Module Name:src Committed By: isaki Date: Tue Apr 23 13:38:48 UTC 2019 Modified Files: src/sys/arch/arm/xscale [isaki-audio2]: pxa2x0_ac97.c Log Message: Adapt to audio2. - XXX Need an accurate list of supported frequencies. To generate a diff of this commit: cvs rdiff -u -r1.15.2.1 -r1.15.2.2 src/sys/arch/arm/xscale/pxa2x0_ac97.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/xscale/pxa2x0_ac97.c diff -u src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.15.2.1 src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.15.2.2 --- src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.15.2.1 Sun Apr 21 05:11:21 2019 +++ src/sys/arch/arm/xscale/pxa2x0_ac97.c Tue Apr 23 13:38:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_ac97.c,v 1.15.2.1 2019/04/21 05:11:21 isaki Exp $ */ +/* $NetBSD: pxa2x0_ac97.c,v 1.15.2.2 2019/04/23 13:38:48 isaki Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -49,8 +49,6 @@ #include #include -#include -#include #include #include @@ -110,9 +108,6 @@ struct acu_softc { /* Child audio(4) device */ device_t sc_audiodev; - /* auconv encodings */ - struct audio_encoding_set *sc_encodings; - /* MPSAFE interfaces */ kmutex_t sc_lock; kmutex_t sc_intr_lock; @@ -132,9 +127,10 @@ static int acu_intr(void *); static int acu_open(void *, int); static void acu_close(void *); -static int acu_query_encoding(void *, struct audio_encoding *); -static int acu_set_params(void *, int, int, audio_params_t *, audio_params_t *, - stream_filter_list_t *, stream_filter_list_t *); +static int acu_query_format(void *, audio_format_query_t *); +static int acu_set_format(void *, int, + const audio_params_t *, const audio_params_t *, + audio_filter_reg_t *, audio_filter_reg_t *); static int acu_round_blocksize(void *, int, int, const audio_params_t *); static int acu_halt_output(void *); static int acu_halt_input(void *); @@ -150,16 +146,14 @@ static int acu_mixer_get_port(void *, mi static int acu_query_devinfo(void *, mixer_devinfo_t *); static void *acu_malloc(void *, int, size_t); static void acu_free(void *, void *, size_t); -static size_t acu_round_buffersize(void *, int, size_t); -static paddr_t acu_mappage(void *, void *, off_t, int); static int acu_get_props(void *); static void acu_get_locks(void *, kmutex_t **, kmutex_t **); struct audio_hw_if acu_hw_if = { .open = acu_open, .close = acu_close, - .query_encoding = acu_query_encoding, - .set_params = acu_set_params, + .query_format = acu_query_format, + .set_format = acu_set_format, .round_blocksize = acu_round_blocksize, .halt_output = acu_halt_output, .halt_input = acu_halt_input, @@ -169,8 +163,6 @@ struct audio_hw_if acu_hw_if = { .query_devinfo = acu_query_devinfo, .allocm = acu_malloc, .freem = acu_free, - .round_buffersize = acu_round_buffersize, - .mappage = acu_mappage, .get_props = acu_get_props, .trigger_output = acu_trigger_output, .trigger_input = acu_trigger_input, @@ -192,6 +184,7 @@ static const struct audio_format acu_for .channels = 2, .channel_mask = AUFMT_STEREO, .frequency_type = 0, + /* XXX Need an accurate list of frequencies. */ .frequency = { 4000, 48000 }, }, }; @@ -319,7 +312,6 @@ pxaacu_attach(device_t parent, device_t if (ac97_attach(&sc->sc_host_if, sc->sc_dev, &sc->sc_lock)) { aprint_error_dev(self, "Failed to attach primary codec\n"); - fail: acu_reg_write(sc, AC97_GCR, 0); delay(100); pxa2x0_clkman_config(CKEN_AC97, false); @@ -327,14 +319,6 @@ pxaacu_attach(device_t parent, device_t return; } - if (auconv_create_encodings(acu_formats, ACU_NFORMATS, - &sc->sc_encodings)) { - aprint_error_dev(self, "Failed to create encodings\n"); - if (sc->sc_codec_if != NULL) - (sc->sc_codec_if->vtbl->detach)(sc->sc_codec_if); - goto fail; - } - sc->sc_audiodev = audio_attach_mi(&acu_hw_if, sc, sc->sc_dev); /* @@ -572,59 +556,38 @@ acu_close(void *arg) } static int -acu_query_encoding(void *arg, struct audio_encoding *fp) +acu_query_format(void *arg, audio_format_query_t *afp) { - struct acu_softc *sc = arg; - return (auconv_query_encoding(sc->sc_encodings, fp)); + return audio_query_format(acu_formats, ACU_NFORMATS, afp); } static int -acu_set_params(void *arg, int setmode, int usemode, -audio_params_t *play, audio_params_t *rec, -stream_filter_list_t *pfil, stream_filter_list_t *rfil) +acu_set_format(void *arg, int setmode, +const audio_params_t *play, const audio_params_t *rec, +audio_filter_reg_t *pfil, audio_filter_reg_t *rfil) { struct acu_softc *sc = arg; - struct audio_params *p; - stream_filter_list_t *fil; - int mode, err; - - for (mode = AUMODE_RECORD; mode != -1; - mode = (mode == AUMODE_RECORD) ? AUMODE_PLAY : -1) { - if ((setmode & mode) == 0) - continue; - - p = (mode == AUMODE_PLAY) ? play : rec; + int rate; + int err; - if (p->
CVS commit: src/usr.bin/uniq
Module Name:src Committed By: uwe Date: Tue Apr 23 14:40:12 UTC 2019 Modified Files: src/usr.bin/uniq: uniq.c Log Message: Don't pass '-' to getopt(3). My guess is that *very* old getopt didn't handle "--" terminator, so this code was working around it and not quite correctly at that. Fixes weird output from $ uniq --long-option uniq: uniq: No such file or directory (for more fun, run that command from /usr/bin as root). Pointed out by Andreas Krey. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/uniq/uniq.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/uniq/uniq.c diff -u src/usr.bin/uniq/uniq.c:1.20 src/usr.bin/uniq/uniq.c:1.21 --- src/usr.bin/uniq/uniq.c:1.20 Sun Oct 16 06:17:51 2016 +++ src/usr.bin/uniq/uniq.c Tue Apr 23 14:40:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uniq.c,v 1.20 2016/10/16 06:17:51 abhinav Exp $ */ +/* $NetBSD: uniq.c,v 1.21 2019/04/23 14:40:12 uwe Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif -__RCSID("$NetBSD: uniq.c,v 1.20 2016/10/16 06:17:51 abhinav Exp $"); +__RCSID("$NetBSD: uniq.c,v 1.21 2019/04/23 14:40:12 uwe Exp $"); #endif /* not lint */ #include @@ -75,11 +75,8 @@ main (int argc, char *argv[]) setprogname(argv[0]); ifp = ofp = NULL; obsolete(argv); - while ((ch = getopt(argc, argv, "-cdf:s:u")) != -1) + while ((ch = getopt(argc, argv, "cdf:s:u")) != -1) switch (ch) { - case '-': - --optind; - goto done; case 'c': cflag = 1; break;
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Tue Apr 23 16:14:32 UTC 2019 Modified Files: src/sys/arch/arm/arm32: arm32_kvminit.c Log Message: Revert the part of the previous Whitespace commit which clearly was functional. This will probably come back with other changes and a proper commit message. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/arm32/arm32_kvminit.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/arm32/arm32_kvminit.c diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.53 src/sys/arch/arm/arm32/arm32_kvminit.c:1.54 --- src/sys/arch/arm/arm32/arm32_kvminit.c:1.53 Sun Mar 17 08:38:52 2019 +++ src/sys/arch/arm/arm32/arm32_kvminit.c Tue Apr 23 16:14:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_kvminit.c,v 1.53 2019/03/17 08:38:52 skrll Exp $ */ +/* $NetBSD: arm32_kvminit.c,v 1.54 2019/04/23 16:14:32 skrll Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -127,7 +127,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.53 2019/03/17 08:38:52 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.54 2019/04/23 16:14:32 skrll Exp $"); #include #include @@ -753,13 +753,13 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_b cur_pv.pv_cache = PTE_CACHE; } while (pv != NULL) { - if (concat_pvaddr(&cur_pv, pv)) { - cur_pv.pv_size += pv->pv_size; - - pv = SLIST_NEXT(pv, pv_list); - continue; - } if (mapallmem_p) { + if (concat_pvaddr(&cur_pv, pv)) { +cur_pv.pv_size += pv->pv_size; + +pv = SLIST_NEXT(pv, pv_list); +continue; + } if (cur_pv.pv_pa + cur_pv.pv_size < pv->pv_pa) { /* * See if we can extend the current pv to emcompass the
CVS commit: src/usr.bin/uniq
Module Name:src Committed By: christos Date: Tue Apr 23 17:35:11 UTC 2019 Modified Files: src/usr.bin/uniq: uniq.c Log Message: remove unused label To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/uniq/uniq.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/uniq/uniq.c diff -u src/usr.bin/uniq/uniq.c:1.21 src/usr.bin/uniq/uniq.c:1.22 --- src/usr.bin/uniq/uniq.c:1.21 Tue Apr 23 10:40:12 2019 +++ src/usr.bin/uniq/uniq.c Tue Apr 23 13:35:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uniq.c,v 1.21 2019/04/23 14:40:12 uwe Exp $ */ +/* $NetBSD: uniq.c,v 1.22 2019/04/23 17:35:10 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif -__RCSID("$NetBSD: uniq.c,v 1.21 2019/04/23 14:40:12 uwe Exp $"); +__RCSID("$NetBSD: uniq.c,v 1.22 2019/04/23 17:35:10 christos Exp $"); #endif /* not lint */ #include @@ -102,7 +102,7 @@ main (int argc, char *argv[]) usage(); } -done: argc -= optind; + argc -= optind; argv +=optind; switch(argc) {
CVS commit: [netbsd-8] src/sys/arch/arm/arm32
Module Name:src Committed By: martin Date: Tue Apr 23 18:22:37 UTC 2019 Modified Files: src/sys/arch/arm/arm32 [netbsd-8]: pmap.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1245): sys/arch/arm/arm32/pmap.c: revision 1.372 Don't try to aquire/release the pmap lock when in ddb. Avoids a deadlock when entering ddb, or on "mach cpu n" ddb command (the pmap lock may already be held by another CPU, which is halted when entering ddb). Posted to port-arm@ on April 19. To generate a diff of this commit: cvs rdiff -u -r1.349.2.1 -r1.349.2.2 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.349.2.1 src/sys/arch/arm/arm32/pmap.c:1.349.2.2 --- src/sys/arch/arm/arm32/pmap.c:1.349.2.1 Thu Nov 2 21:29:51 2017 +++ src/sys/arch/arm/arm32/pmap.c Tue Apr 23 18:22:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.349.2.1 2017/11/02 21:29:51 snj Exp $ */ +/* $NetBSD: pmap.c,v 1.349.2.2 2019/04/23 18:22:37 martin Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -217,7 +217,11 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.349.2.1 2017/11/02 21:29:51 snj Exp $"); +#ifdef DDB +#include +#endif + +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.349.2.2 2019/04/23 18:22:37 martin Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -531,6 +535,11 @@ vaddr_t pmap_directlimit; static inline void pmap_acquire_pmap_lock(pmap_t pm) { +#if defined(MULTIPROCESSOR) && defined(DDB) + if (db_onproc != NULL) + return; +#endif + if (pm == pmap_kernel()) { #ifdef MULTIPROCESSOR KERNEL_LOCK(1, NULL); @@ -543,6 +552,10 @@ pmap_acquire_pmap_lock(pmap_t pm) static inline void pmap_release_pmap_lock(pmap_t pm) { +#if defined(MULTIPROCESSOR) && defined(DDB) + if (db_onproc != NULL) + return; +#endif if (pm == pmap_kernel()) { #ifdef MULTIPROCESSOR KERNEL_UNLOCK_ONE(NULL);
CVS commit: [netbsd-8] src/sys/arch/arm/arm32
Module Name:src Committed By: martin Date: Tue Apr 23 18:26:22 UTC 2019 Modified Files: src/sys/arch/arm/arm32 [netbsd-8]: pmap.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1246): sys/arch/arm/arm32/pmap.c: revision 1.373 (via patch) Fix a deadlock between the pool and pmap codes: - cpu0 grabs the kernel lock (e.g. from a non-MPSAFE interrupt) and calls pool_get(). - cpu1 does a pool_get() on the same pool from MPSAFE code, which needs a pool_page_alloc(), which ends up in pmap_extract_coherency(). So cpu0 holds the kernel_lock and wants the pool lock. cpu1 holds the pool lock and wants the kernel_lock in pmap_extract_coherency(). The pmap code should not rely on kernel_lock. Intead make the pmap_kernel()->pm_obj_lock a IPL_VM lock and use it as pmap lock (thus dropping the pmap test pmap_{acquire,release}_pmap_lock()). This needs to be a IPL_VM because unlike user pmaps, this can be locked from interrupt context. Add a IPL_NONE lock for pmap_growkernel(). We can't use pmap_kernel()->pm_obj_lock here because pmap_grow_map() may sleep. Make pmap_lock (which may be locked with pm_obj_lock held) a IPL_VM lock in all case. reorder a few things to not call pool_get()/pool_put() (which may sleep) with pm_obj_lock held. Patch initially posted to port-arm@ on April 19, improved patch (per suggestions from Nick Hudson and Jason Thorpe) on April 21. To generate a diff of this commit: cvs rdiff -u -r1.349.2.2 -r1.349.2.3 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.349.2.2 src/sys/arch/arm/arm32/pmap.c:1.349.2.3 --- src/sys/arch/arm/arm32/pmap.c:1.349.2.2 Tue Apr 23 18:22:37 2019 +++ src/sys/arch/arm/arm32/pmap.c Tue Apr 23 18:26:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.349.2.2 2019/04/23 18:22:37 martin Exp $ */ +/* $NetBSD: pmap.c,v 1.349.2.3 2019/04/23 18:26:22 martin Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -221,7 +221,7 @@ #include #endif -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.349.2.2 2019/04/23 18:22:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.349.2.3 2019/04/23 18:26:22 martin Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -514,6 +514,7 @@ static size_t cnptes; vaddr_t memhook; /* used by mem.c & others */ kmutex_t memlock __cacheline_aligned; /* used by mem.c & others */ kmutex_t pmap_lock __cacheline_aligned; +kmutex_t kpm_lock __cacheline_aligned; extern void *msgbufaddr; int pmap_kmpages; /* @@ -536,33 +537,21 @@ static inline void pmap_acquire_pmap_lock(pmap_t pm) { #if defined(MULTIPROCESSOR) && defined(DDB) - if (db_onproc != NULL) + if (__predict_false(db_onproc != NULL)) return; #endif - if (pm == pmap_kernel()) { -#ifdef MULTIPROCESSOR - KERNEL_LOCK(1, NULL); -#endif - } else { - mutex_enter(pm->pm_lock); - } + mutex_enter(pm->pm_lock); } static inline void pmap_release_pmap_lock(pmap_t pm) { #if defined(MULTIPROCESSOR) && defined(DDB) - if (db_onproc != NULL) + if (__predict_false(db_onproc != NULL)) return; #endif - if (pm == pmap_kernel()) { -#ifdef MULTIPROCESSOR - KERNEL_UNLOCK_ONE(NULL); -#endif - } else { - mutex_exit(pm->pm_lock); - } + mutex_exit(pm->pm_lock); } static inline void @@ -3068,6 +3057,10 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ #else const bool vector_page_p = (va == vector_page); #endif + struct pmap_page *pp = pmap_pv_tracked(pa); + struct pv_entry *new_pv = NULL; + struct pv_entry *old_pv = NULL; + int error = 0; UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist); @@ -3083,6 +3076,12 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ * test for a managed page by checking pg != NULL. */ pg = pmap_initialized ? PHYS_TO_VM_PAGE(pa) : NULL; + /* + * if we may need a new pv entry allocate if now, as we can't do it + * with the kernel_pmap locked + */ + if (pg || pp) + new_pv = pool_get(&pmap_pv_pool, PR_NOWAIT); nflags = 0; if (prot & VM_PROT_WRITE) @@ -3106,7 +3105,8 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ if (l2b == NULL) { if (flags & PMAP_CANFAIL) { pmap_release_pmap_lock(pm); - return (ENOMEM); + error = ENOMEM; + goto free_pv; } panic("pmap_enter: failed to allocate L2 bucket"); } @@ -3129,8 +3129,6 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ } else opg = NULL; - struct pmap_page *pp = pmap_pv_tracked(pa); - if (pg || pp) { KASSERT((pg != NULL) != (pp != NULL)); struct vm_page_md *md = (pg != NULL) ? VM_PAGE_TO_MD(pg) : @@ -3239,9 +3237,10 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ } #endif } else { -pmap_release_page_lock(md); -pv = pool_get(&pmap_pv_pool, PR_NOWAIT); +pv = new_pv; +new_pv = NULL; if (pv == NULL) { + pmap_release_page_lock(md); pmap_release_pmap_lock(pm); if ((flags & PMAP_CANFAIL) == 0)
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue Apr 23 18:27:39 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1245 and #1246 To generate a diff of this commit: cvs rdiff -u -r1.1.2.134 -r1.1.2.135 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.134 src/doc/CHANGES-8.1:1.1.2.135 --- src/doc/CHANGES-8.1:1.1.2.134 Tue Apr 23 10:40:16 2019 +++ src/doc/CHANGES-8.1 Tue Apr 23 18:27:38 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.134 2019/04/23 10:40:16 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.135 2019/04/23 18:27:38 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2944,3 +2944,14 @@ etc/mtree/NetBSD.dist.iscsi 1.1 (patch Fix various conditionals and add missing mtree directory specs. [mrg, ticket #1244] +sys/arch/arm/arm32/pmap.c 1.372 + + Don't try to aquire/release the pmap lock when in ddb, it + may cause a deadlock. + [bouyer, ticket #1245] + +sys/arch/arm/arm32/pmap.c 1.373 (patch) + + Fix a deadlock between the pool and pmap codes. + [bouyer, ticket #1246] +
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: christos Date: Tue Apr 23 20:55:53 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: compatibility-atomic-c++0x.cc compatibility-thread-c++0x.cc src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98: compatibility.cc istream.cc src/external/gpl3/gcc/lib/libstdc++-v3: Makefile Log Message: Add an ifdef _GLIBCXX_COMPAT_ that removes the versioned symbol nodes from libstdc++ and enable it for now only for the random archives but not for the shared object (although it does not break anything that I've tested to enable it for the shared object too). Fixes static linking, which does not handle multiple versioned symbols properly. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc \ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc cvs rdiff -u -r1.46 -r1.47 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc:1.1.1.4 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc:1.2 --- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc:1.1.1.4 Sat Jan 19 05:14:04 2019 +++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc Tue Apr 23 16:55:53 2019 @@ -150,8 +150,12 @@ _GLIBCXX_END_NAMESPACE_VERSION && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) +#ifdef _GLIBCXX_COMPAT_ #define _GLIBCXX_ASM_SYMVER(cur, old, version) \ asm (".symver " #cur "," #old "@@" #version); +#else +#define _GLIBCXX_ASM_SYMVER(cur, old, version) +#endif _GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag5clearESt12memory_order, _ZNVSt9__atomic011atomic_flag5clearESt12memory_order, GLIBCXX_3.4.11) Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc:1.1.1.4 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc:1.2 --- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc:1.1.1.4 Sat Jan 19 05:14:05 2019 +++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc Tue Apr 23 16:55:53 2019 @@ -35,8 +35,12 @@ # error "compatibility-thread-c++0x.cc must be compiled with -std=gnu++0x" #endif +#ifdef _GLIBCXX_COMPAT_ #define _GLIBCXX_ASM_SYMVER(cur, old, version) \ asm (".symver " #cur "," #old "@@@" #version); +#else +#define _GLIBCXX_ASM_SYMVER(cur, old, version) +#endif // XXX GLIBCXX_ABI Deprecated // gcc-4.6.0 Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc:1.3 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc:1.4 --- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc:1.3 Sat Jan 19 07:10:14 2019 +++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc Tue Apr 23 16:55:53 2019 @@ -365,6 +365,7 @@ _GLIBCXX_END_NAMESPACE_VERSION // In the future, GLIBCXX_ABI > 6 should remove all uses of // _GLIBCXX_*_SYMVER macros in this file. +#ifdef _GLIBCXX_COMPAT_ #define _GLIBCXX_3_4_SYMVER(XXname, name) \ extern "C" void \ _X##name() \ @@ -379,6 +380,11 @@ _GLIBCXX_END_NAMESPACE_VERSION #define _GLIBCXX_ASM_SYMVER(cur, old, version) \ asm (".symver " #cur "," #old "@@" #version); +#else +#define _GLIBCXX_3_4_SYMVER(XXname, name) +#define _GLIBCXX_3_4_5_SYMVER(XXname, name) +#define _GLIBCXX_ASM_SYMVER(cur, old, version) +#endif #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER #include Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc:1.1.1.4 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc:1.2 --- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc:1.1.1.4 Sat Jan 19 05:14:04 2019 +++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc Tue Apr 23 16:55:53 2019 @@ -112,8 +112,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION basic_istream:: ignore(streamsize __n, int_type __delim) { +#ifdef _GLIBCXX_COMPAT_ if (traits_type::eq_int_type(__delim, traits_type::eof())) return ignore(__n); +#endif _M_gcount = 0; sentry __cerb(*this, true); @@ -35
CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64
Module Name:src Committed By: mrg Date: Tue Apr 23 22:22:22 UTC 2019 Added Files: src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: symver-config.h Log Message: add missing symver-config.h To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/symver-config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/symver-config.h diff -u /dev/null src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/symver-config.h:1.1 --- /dev/null Tue Apr 23 22:22:22 2019 +++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/symver-config.h Tue Apr 23 22:22:22 2019 @@ -0,0 +1,1319 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-gcc,v 1.101 2019/02/23 06:54:45 mrg Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `acosf' function. */ +#define HAVE_ACOSF 1 + +/* Define to 1 if you have the `acosl' function. */ +#define HAVE_ACOSL 1 + +/* Define to 1 if you have the `aligned_alloc' function. */ +#define HAVE_ALIGNED_ALLOC 1 + +/* Define to 1 if you have the `asinf' function. */ +#define HAVE_ASINF 1 + +/* Define to 1 if you have the `asinl' function. */ +#define HAVE_ASINL 1 + +/* Define to 1 if the target assembler supports .symver directive. */ +#define HAVE_AS_SYMVER_DIRECTIVE 1 + +/* Define to 1 if you have the `atan2f' function. */ +#define HAVE_ATAN2F 1 + +/* Define to 1 if you have the `atan2l' function. */ +#define HAVE_ATAN2L 1 + +/* Define to 1 if you have the `atanf' function. */ +#define HAVE_ATANF 1 + +/* Define to 1 if you have the `atanl' function. */ +#define HAVE_ATANL 1 + +/* Define to 1 if you have the `at_quick_exit' function. */ +#define HAVE_AT_QUICK_EXIT 1 + +/* Define to 1 if the target assembler supports thread-local storage. */ +/* #undef HAVE_CC_TLS */ + +/* Define to 1 if you have the `ceilf' function. */ +#define HAVE_CEILF 1 + +/* Define to 1 if you have the `ceill' function. */ +#define HAVE_CEILL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_COMPLEX_H 1 + +/* Define to 1 if you have the `cosf' function. */ +#define HAVE_COSF 1 + +/* Define to 1 if you have the `coshf' function. */ +#define HAVE_COSHF 1 + +/* Define to 1 if you have the `coshl' function. */ +#define HAVE_COSHL 1 + +/* Define to 1 if you have the `cosl' function. */ +#define HAVE_COSL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if EBADMSG exists. */ +#define HAVE_EBADMSG 1 + +/* Define if ECANCELED exists. */ +#define HAVE_ECANCELED 1 + +/* Define if ECHILD exists. */ +#define HAVE_ECHILD 1 + +/* Define if EIDRM exists. */ +#define HAVE_EIDRM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define if ENODATA exists. */ +#define HAVE_ENODATA 1 + +/* Define if ENOLINK exists. */ +#define HAVE_ENOLINK 1 + +/* Define if ENOSPC exists. */ +#define HAVE_ENOSPC 1 + +/* Define if ENOSR exists. */ +#define HAVE_ENOSR 1 + +/* Define if ENOSTR exists. */ +#define HAVE_ENOSTR 1 + +/* Define if ENOTRECOVERABLE exists. */ +/* #undef HAVE_ENOTRECOVERABLE */ + +/* Define if ENOTSUP exists. */ +#define HAVE_ENOTSUP 1 + +/* Define if EOVERFLOW exists. */ +#define HAVE_EOVERFLOW 1 + +/* Define if EOWNERDEAD exists. */ +/* #undef HAVE_EOWNERDEAD */ + +/* Define if EPERM exists. */ +#define HAVE_EPERM 1 + +/* Define if EPROTO exists. */ +#define HAVE_EPROTO 1 + +/* Define if ETIME exists. */ +#define HAVE_ETIME 1 + +/* Define if ETIMEDOUT exists. */ +#define HAVE_ETIMEDOUT 1 + +/* Define if ETXTBSY exists. */ +#define HAVE_ETXTBSY 1 + +/* Define if EWOULDBLOCK exists. */ +#define HAVE_EWOULDBLOCK 1 + +/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ +#define HAVE_EXCEPTION_PTR_SINCE_GCC46 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_EXECINFO_H 1 + +/* Define to 1 if you have the `expf' function. */ +#define HAVE_EXPF 1 + +/* Define to 1 if you have the `expl' function. */ +#define HAVE_EXPL 1 + +/* Define to 1 if you have the `fabsf' function. */ +#define HAVE_FABSF 1 + +/* Define to 1 if you have the `fabsl' function. */ +#define HAVE_FABSL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FENV_H 1 + +/* Define to 1 if you have the `finite' function. */ +#define HAVE_FINITE 1 + +/* Define to 1 if you have the `finitef' function. */ +#define HAVE_FINITEF 1 + +/* Define to 1 if you have the `finitel' function. */ +/* #undef HAVE_FINITEL */ + +/* Define to 1
CVS commit: src/usr.sbin/veriexecgen
Module Name:src Committed By: sevan Date: Tue Apr 23 22:35:42 UTC 2019 Modified Files: src/usr.sbin/veriexecgen: veriexecgen.c Log Message: Omit files not marked executable from the signature database by default. Closes PR kern/41669 Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/veriexecgen/veriexecgen.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.sbin/veriexecgen/veriexecgen.c diff -u src/usr.sbin/veriexecgen/veriexecgen.c:1.18 src/usr.sbin/veriexecgen/veriexecgen.c:1.19 --- src/usr.sbin/veriexecgen/veriexecgen.c:1.18 Sat Sep 9 21:27:23 2017 +++ src/usr.sbin/veriexecgen/veriexecgen.c Tue Apr 23 22:35:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: veriexecgen.c,v 1.18 2017/09/09 21:27:23 sevan Exp $ */ +/* $NetBSD: veriexecgen.c,v 1.19 2019/04/23 22:35:42 sevan Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #ifndef lint #ifdef __RCSID -__RCSID("$NetBSD: veriexecgen.c,v 1.18 2017/09/09 21:27:23 sevan Exp $"); +__RCSID("$NetBSD: veriexecgen.c,v 1.19 2019/04/23 22:35:42 sevan Exp $"); #endif #endif /* not lint */ @@ -208,7 +208,7 @@ add_new_entry(veriexecgen_t *vp, FTSENT } else sb = *file->fts_statp; - if (!vp->all_files && !vp->scan_system_dirs && !IS_EXEC(sb.st_mode)) + if (!vp->all_files && !IS_EXEC(sb.st_mode)) return; e = ecalloc(1UL, sizeof(*e));
CVS commit: src/sys/net
Module Name:src Committed By: msaitoh Date: Wed Apr 24 05:07:20 UTC 2019 Modified Files: src/sys/net: if_media.h Log Message: No functional change: - IFM_AVALID and IFM_ACTIVE are NOT for the media word. Fix comment. - RFU stands for Reserved for Future Use. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/net/if_media.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/net/if_media.h diff -u src/sys/net/if_media.h:1.62 src/sys/net/if_media.h:1.63 --- src/sys/net/if_media.h:1.62 Wed Apr 17 07:04:03 2019 +++ src/sys/net/if_media.h Wed Apr 24 05:07:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_media.h,v 1.62 2019/04/17 07:04:03 msaitoh Exp $ */ +/* $NetBSD: if_media.h,v 1.63 2019/04/24 05:07:20 msaitoh Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -84,6 +84,12 @@ #endif /*_KERNEL */ /* + * Status bits. THIS IS NOT A MEDIA WORD. + */ +#define IFM_AVALID 0x0001 /* Active bit valid */ +#define IFM_ACTIVE 0x0002 /* Interface attached to working net */ + +/* * if_media Options word: * Bits Use * --- @@ -91,16 +97,16 @@ * 5-7 Media type * 8-15 Type specific options * 16-18 Mode (for multi-mode devices) - * 19 RFU (not used) + * 19 (Reserved for Future Use) * 20-27 Shared (global) options * 28-31 Instance * * 3 2 1 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 * +---+---+-+-+---+-+-+ - * | | |R| | | | |STA| - * | IMASK | GMASK |F|MMASK| OMASK |NMASK| +---| - * | | |U| | | | TMASK | + * | | |R| | | | | + * | IMASK | GMASK |F|MMASK| OMASK |NMASK| TMASK | + * | | |U| | | | | * +---+---+-+-+---+-+-+ * <-> <---> <---> * IFM_INST() IFM_MODE()IFM_TYPE() @@ -174,12 +180,6 @@ #define IFM_NONE 2 /* Deselect all media */ /* - * Status bits (IFM_TMASK) - */ -#define IFM_AVALID 0x0001 /* Active bit valid */ -#define IFM_ACTIVE 0x0002 /* Interface attached to working net */ - -/* * Shared (global) options (IFM_GMASK) */ #define IFM_FDX 0x0010 /* Force full duplex */
CVS commit: src/sys/net/agr
Module Name:src Committed By: msaitoh Date: Wed Apr 24 05:31:24 UTC 2019 Modified Files: src/sys/net/agr: if_agrmonitor.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/net/agr/if_agrmonitor.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/net/agr/if_agrmonitor.c diff -u src/sys/net/agr/if_agrmonitor.c:1.5 src/sys/net/agr/if_agrmonitor.c:1.6 --- src/sys/net/agr/if_agrmonitor.c:1.5 Sat Jan 28 22:56:09 2017 +++ src/sys/net/agr/if_agrmonitor.c Wed Apr 24 05:31:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_agrmonitor.c,v 1.5 2017/01/28 22:56:09 maya Exp $ */ +/* $NetBSD: if_agrmonitor.c,v 1.6 2019/04/24 05:31:24 msaitoh Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_agrmonitor.c,v 1.5 2017/01/28 22:56:09 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_agrmonitor.c,v 1.6 2019/04/24 05:31:24 msaitoh Exp $"); #include #include @@ -48,8 +48,7 @@ agrport_monitor(struct agr_port *port) media = IFM_ETHER | IFM_NONE; status = IFM_AVALID; - if ((~port->port_ifp->if_flags & (IFF_RUNNING | IFF_UP)) - == 0) { + if ((~port->port_ifp->if_flags & (IFF_RUNNING | IFF_UP)) == 0) { int error; error = agr_port_getmedia(port, &media, &status); @@ -60,26 +59,21 @@ agrport_monitor(struct agr_port *port) } } - if ((status & (IFM_AVALID | IFM_ACTIVE)) == IFM_AVALID) { + if ((status & (IFM_AVALID | IFM_ACTIVE)) == IFM_AVALID) media = IFM_ETHER | IFM_NONE; /* XXX ether */ - } if (media == IFM_NONE) { - /* - * possible eg. when the phy is not configured. - */ + /* possible eg. when the phy is not configured. */ #if defined(DEBUG) printf("%s: IFM_NONE\n", __func__); #endif /* defined(DEBUG) */ media = IFM_ETHER | IFM_NONE; /* XXX ether */ } - if (port->port_media == media) { + if (port->port_media == media) return; - } port->port_media = media; - if (sc->sc_iftop->iftop_portstate) { + if (sc->sc_iftop->iftop_portstate) (*sc->sc_iftop->iftop_portstate)(port); - } }
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: thorpej Date: Wed Apr 24 06:03:02 UTC 2019 Modified Files: src/sys/dev/fdt: fdt_i2c.c Log Message: Fix leak of iba.iba_child_devices in fdtbus_attach_i2cbus(). Patch provided by yarl-baudig %%at%% mailoo.org To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/fdt/fdt_i2c.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_i2c.c diff -u src/sys/dev/fdt/fdt_i2c.c:1.6 src/sys/dev/fdt/fdt_i2c.c:1.7 --- src/sys/dev/fdt/fdt_i2c.c:1.6 Wed Jan 30 01:24:00 2019 +++ src/sys/dev/fdt/fdt_i2c.c Wed Apr 24 06:03:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_i2c.c,v 1.6 2019/01/30 01:24:00 jmcneill Exp $ */ +/* $NetBSD: fdt_i2c.c,v 1.7 2019/04/24 06:03:02 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.6 2019/01/30 01:24:00 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.7 2019/04/24 06:03:02 thorpej Exp $"); #include #include @@ -106,6 +106,7 @@ fdtbus_attach_i2cbus(device_t dev, int p { struct i2cbus_attach_args iba; prop_dictionary_t devs, props; + device_t ret; u_int address_cells; devs = prop_dictionary_create(); @@ -124,5 +125,9 @@ fdtbus_attach_i2cbus(device_t dev, int p props = device_properties(dev); prop_dictionary_set_bool(props, "i2c-indirect-config", false); - return config_found_ia(dev, "i2cbus", &iba, print); + ret = config_found_ia(dev, "i2cbus", &iba, print); + if (iba.iba_child_devices) + prop_object_release(iba.iba_child_devices); + + return ret; }
CVS commit: src/sys/arch/evbarm/fdt
Module Name:src Committed By: skrll Date: Wed Apr 24 06:37:31 UTC 2019 Modified Files: src/sys/arch/evbarm/fdt: fdt_machdep.c Log Message: In fdt_add_boot_physmem make sure the memory range has pages available before adding it to the fdt_physmem array. Fixes a problem that jmcneill@ pointed out to me. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 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.61 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.62 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.61 Sat Mar 30 13:17:23 2019 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Wed Apr 24 06:37:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.61 2019/03/30 13:17:23 jmcneill Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.62 2019/04/24 06:37:31 skrll Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.61 2019/03/30 13:17:23 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.62 2019/04/24 06:37:31 skrll Exp $"); #include "opt_machdep.h" #include "opt_bootconfig.h" @@ -251,14 +251,22 @@ static struct boot_physmem fdt_physmem[M static void fdt_add_boot_physmem(const struct fdt_memory *m, void *arg) { - struct boot_physmem *bp = &fdt_physmem[nfdt_physmem++]; + const paddr_t saddr = round_page(m->start); + const paddr_t eaddr = trunc_page(m->end); - VPRINTF(" %" PRIx64 " - %" PRIx64 "\n", m->start, m->end - 1); + VPRINTF(" %" PRIx64 " - %" PRIx64, m->start, m->end - 1); + if (saddr >= eaddr) { + VPRINTF(" skipped\n"); + return; + } + VPRINTF("\n"); + + struct boot_physmem *bp = &fdt_physmem[nfdt_physmem++]; KASSERT(nfdt_physmem <= MAX_PHYSMEM); - bp->bp_start = atop(round_page(m->start)); - bp->bp_pages = atop(trunc_page(m->end)) - bp->bp_start; + bp->bp_start = atop(saddr); + bp->bp_pages = atop(eaddr) - bp->bp_start; bp->bp_freelist = VM_FREELIST_DEFAULT; #ifdef _LP64