CVS commit: src
Module Name:src Committed By: mrg Date: Sun Mar 1 07:46:04 UTC 2015 Modified Files: src/distrib/sets: mkvars.mk sets.subr src/distrib/sets/lists/xdebug: md.amd64 md.i386 src/distrib/sets/lists/xserver: md.amd64 md.i386 src/external/mit/xorg/server/drivers: Makefile src/share/mk: bsd.README bsd.own.mk Added Files: src/external/mit/xorg/server/drivers/xf86-video-radeon-kms: Makefile Log Message: add build framework to choose between xf86-video-ati 6.x (UMS/KMS) and 7.x (KMS only), and switch x86 to the latest (KMS only) version. (if someone can make x86 install both radeon_drv.so.[67] and leave the default symlink to .7, that would be nice. renaming it so that it's easier to choose via xorg.conf is a little more tricky..) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/mkvars.mk cvs rdiff -u -r1.162 -r1.163 src/distrib/sets/sets.subr cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/xdebug/md.amd64 cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/md.i386 cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/xserver/md.amd64 cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/xserver/md.i386 cvs rdiff -u -r1.63 -r1.64 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r0 -r1.1 \ src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/Makefile cvs rdiff -u -r1.337 -r1.338 src/share/mk/bsd.README cvs rdiff -u -r1.843 -r1.844 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/mkvars.mk diff -u src/distrib/sets/mkvars.mk:1.15 src/distrib/sets/mkvars.mk:1.16 --- src/distrib/sets/mkvars.mk:1.15 Sun Jan 26 21:33:53 2014 +++ src/distrib/sets/mkvars.mk Sun Mar 1 07:46:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mkvars.mk,v 1.15 2014/01/26 21:33:53 joerg Exp $ +# $NetBSD: mkvars.mk,v 1.16 2015/03/01 07:46:04 mrg Exp $ MKEXTRAVARS= \ MACHINE \ @@ -21,6 +21,7 @@ MKEXTRAVARS= \ MKSOFTFLOAT \ MKXORG \ MKXORG_SERVER \ + MKX11RADEONKMS \ X11FLAVOR \ USE_INET6 \ USE_KERBEROS \ Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.162 src/distrib/sets/sets.subr:1.163 --- src/distrib/sets/sets.subr:1.162 Mon Jan 5 03:45:31 2015 +++ src/distrib/sets/sets.subr Sun Mar 1 07:46:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.162 2015/01/05 03:45:31 mrg Exp $ +# $NetBSD: sets.subr,v 1.163 2015/03/01 07:46:04 mrg Exp $ # # @@ -179,7 +179,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.162 2015/01/05 03:45:31 mrg Exp $ +# # $NetBSD: sets.subr,v 1.163 2015/03/01 07:46:04 mrg Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -261,6 +261,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # ssp ${HAVE_SSP} != no # tpm ${MKTPM} != no # x11 ${MKX11} != no && ${X11FLAVOUR} != "Xorg" +# x11radeonkms ${MKX11} != no && ${MKX11RADEONKMS} != no # xorg ${MKX11} != no && ${X11FLAVOUR} == "Xorg" # xorg_server ${MKXORG_SERVER} != no # yp ${MKYP} != no Index: src/distrib/sets/lists/xdebug/md.amd64 diff -u src/distrib/sets/lists/xdebug/md.amd64:1.10 src/distrib/sets/lists/xdebug/md.amd64:1.11 --- src/distrib/sets/lists/xdebug/md.amd64:1.10 Mon Jan 5 03:45:31 2015 +++ src/distrib/sets/lists/xdebug/md.amd64 Sun Mar 1 07:46:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.10 2015/01/05 03:45:31 mrg Exp $ +# $NetBSD: md.amd64,v 1.11 2015/03/01 07:46:04 mrg Exp $ ./usr/X11R7/lib/libI810XvMC_g.a-unknown- debuglib,xorg ./usr/X11R7/lib/libIntelXvMC_g.a -unknown- debuglib,xorg ./usr/X11R7/lib/libchromeXvMCPro_g.a -unknown- debuglib,xorg @@ -146,7 +146,8 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/nv_drv.so.2.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/openchrome_drv.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/r128_drv.so.6.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/radeon_drv.so.6.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/radeon_drv.so.6.debug -unknown- xorg,debug,!x11radeonkms +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/radeon_drv.so.7.debug -unknown- xorg,debug,x11radeonkms ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/radeonhd_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3_drv.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3virge_drv.so.1.debug -unknown- xorg,debug Index: src/distrib/sets/lists/xdebug/md.i386 diff -u src/distrib/sets/lists/xdebug/md.i386:1.11 src/distrib/sets/lists/xdebug/md.i386:1.12 --- src/distrib/sets/lists/xdebug/md.i386:1.11 Mon Jan 5 03:45:31 2015 +++ src/distrib/sets/lists/xdebug/md.i386 Sun
CVS commit: xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: mrg Date: Sun Mar 1 07:44:07 UTC 2015 Modified Files: xsrc/external/mit/xorg-server/dist/exa: exa_unaccel.c xsrc/external/mit/xorg-server/dist/glx: glxdri.c xsrc/external/mit/xorg-server/dist/include: regionstr.h Log Message: port a change back from newer xorg-server, which is needed for xf86-video-ati 7.x. http://lists.x.org/archives/xorg-devel/2011-March/020990.html commit 43e47433cf55c98db5308a51c1c514c59901f598 Author: S�ren Sandmann Pedersen Date: Tue Mar 29 13:06:36 2011 -0400 Add RegionInitBoxes(), and fix some buggy callers of RegionInit(). The interface to RegionInit(): RegionInit (RegionPtr pReg, BoxPtr rect, int size); is very confusing because it doesn't take a list of boxes, it takes *one* box, but if that box is NULL, it initializes an empty region with 'size' rectangles preallocated. Most callers of this function were correctly passing either NULL or just one box, but there were three confused cases, where the code seems to expect a region to be created from a list of boxes. This patch adds a new function RegionInitBoxes() and fixes those instances to call that instead. And yes, the pixman function to initialize a region from a list of boxes is called init_rects() because pixman is also awesome. V2: Make RegionInitBoxes() return a Bool indicating whether the call succeeded, and fix the callers to check this return value. Signed-off-by: Soren Sandmann To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/exa/exa_unaccel.c cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/glx/glxdri.c cvs rdiff -u -r1.4 -r1.5 \ xsrc/external/mit/xorg-server/dist/include/regionstr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/exa/exa_unaccel.c diff -u xsrc/external/mit/xorg-server/dist/exa/exa_unaccel.c:1.2 xsrc/external/mit/xorg-server/dist/exa/exa_unaccel.c:1.3 --- xsrc/external/mit/xorg-server/dist/exa/exa_unaccel.c:1.2 Fri Nov 9 10:27:33 2012 +++ xsrc/external/mit/xorg-server/dist/exa/exa_unaccel.c Sun Mar 1 07:44:07 2015 @@ -127,11 +127,10 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, Draw EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); -if (pExaScr->prepare_access_reg) { +if (pExaScr->prepare_access_reg && RegionInitBoxes(®, pbox, nbox)) { PixmapPtr pPixmap = exaGetDrawablePixmap(pSrc); exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff); - RegionInit(®, pbox, nbox); RegionTranslate(®, xoff + dx, yoff + dy); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, ®); RegionUninit(®); @@ -140,11 +139,11 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, Draw if (pExaScr->prepare_access_reg && !exaGCReadsDestination(pDst, pGC->planemask, pGC->fillStyle, - pGC->alu, pGC->clientClipType)) { + pGC->alu, pGC->clientClipType) && + RegionInitBoxes (®, pbox, nbox)) { PixmapPtr pPixmap = exaGetDrawablePixmap(pDst); exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff); - RegionInit(®, pbox, nbox); RegionTranslate(®, xoff, yoff); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, ®); RegionUninit(®); Index: xsrc/external/mit/xorg-server/dist/glx/glxdri.c diff -u xsrc/external/mit/xorg-server/dist/glx/glxdri.c:1.5 xsrc/external/mit/xorg-server/dist/glx/glxdri.c:1.6 --- xsrc/external/mit/xorg-server/dist/glx/glxdri.c:1.5 Tue Aug 2 07:15:02 2011 +++ xsrc/external/mit/xorg-server/dist/glx/glxdri.c Sun Mar 1 07:44:07 2015 @@ -831,10 +831,19 @@ static void __glXReportDamage(__DRIdrawa __glXenterServer(GL_FALSE); -RegionInit(®ion, (BoxPtr) rects, num_rects); -RegionTranslate(®ion, pDraw->x, pDraw->y); -DamageDamageRegion(pDraw, ®ion); -RegionUninit(®ion); +if (RegionInitBoxes(®ion, (BoxPtr) rects, num_rects)) { + RegionTranslate(®ion, pDraw->x, pDraw->y); + DamageDamageRegion(pDraw, ®ion); + RegionUninit(®ion); +} +else { + while (num_rects--) { + RegionInit (®ion, (BoxPtr) rects++, 1); + RegionTranslate(®ion, pDraw->x, pDraw->y); + DamageDamageRegion(pDraw, ®ion); + RegionUninit(®ion); + } +} __glXleaveServer(GL_FALSE); } Index: xsrc/external/mit/xorg-server/dist/include/regionstr.h diff -u xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.4 xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.5 --- xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.4 Fri Feb 6 20:18:17 2015 +++ xsrc/external/mit/xorg-server/dist/include/regionstr.h Sun Mar 1 07:44:07 2015 @@ -135,6 +135,11 @@ static inline void RegionInit(RegionPtr } } +static inline Bool RegionInitBoxes(RegionPtr pReg, BoxPtr boxes, int nBoxes) +{ +return pixma
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd
Module Name:xsrc Committed By: mrg Date: Sun Mar 1 07:40:53 UTC 2015 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd: bsd_init.c Log Message: remove \n\n that confuses the Xorg log file. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_init.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_init.c:1.6 xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_init.c:1.7 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_init.c:1.6 Tue Aug 2 07:15:04 2011 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_init.c Sun Mar 1 07:40:53 2015 @@ -482,7 +482,7 @@ xf86OpenSyscons() { xf86ErrorF(" (version 0.x)\n"); } - xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); + xf86Msg(from, "using VT number %d\n", xf86Info.vtno); } else { @@ -601,7 +601,7 @@ xf86OpenPcvt() xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n", pcvt_version.rmajor, pcvt_version.rminor); #endif - xf86Msg(X_PROBED, "using VT number %d\n\n", xf86Info.vtno); + xf86Msg(X_PROBED, "using VT number %d\n", xf86Info.vtno); } else {
CVS commit: src/sys/dev/ic
Module Name:src Committed By: mlelstv Date: Sun Mar 1 07:05:59 UTC 2015 Modified Files: src/sys/dev/ic: vga.c vga_raster.c Log Message: Also unmap video memory when detaching console To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/dev/ic/vga.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ic/vga_raster.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/vga.c diff -u src/sys/dev/ic/vga.c:1.114 src/sys/dev/ic/vga.c:1.115 --- src/sys/dev/ic/vga.c:1.114 Wed Jan 14 17:45:27 2015 +++ src/sys/dev/ic/vga.c Sun Mar 1 07:05:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.114 2015/01/14 17:45:27 chs Exp $ */ +/* $NetBSD: vga.c,v 1.115 2015/03/01 07:05:59 mlelstv Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.114 2015/01/14 17:45:27 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.115 2015/03/01 07:05:59 mlelstv Exp $"); #include "opt_vga.h" /* for WSCONS_SUPPORT_PCVTFONTS */ @@ -725,6 +725,7 @@ vga_cndetach(void) bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10); bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10); + bus_space_unmap(vh->vh_memt, vh->vh_allmemh, 0x2); vga_console_attached = 0; vgaconsole = 0; Index: src/sys/dev/ic/vga_raster.c diff -u src/sys/dev/ic/vga_raster.c:1.43 src/sys/dev/ic/vga_raster.c:1.44 --- src/sys/dev/ic/vga_raster.c:1.43 Wed Jan 14 17:45:27 2015 +++ src/sys/dev/ic/vga_raster.c Sun Mar 1 07:05:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.43 2015/01/14 17:45:27 chs Exp $ */ +/* $NetBSD: vga_raster.c,v 1.44 2015/03/01 07:05:59 mlelstv Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.43 2015/01/14 17:45:27 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.44 2015/03/01 07:05:59 mlelstv Exp $"); #include "opt_vga.h" #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -567,6 +567,7 @@ vga_cndetach(void) bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10); bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10); + bus_space_unmap(vh->vh_memt, vh->vh_allmemh, 0x2); vga_console_attached = 0; vgaconsole = 0;
CVS import: xsrc/external/mit/xf86-video-ati-kms/dist
Module Name:xsrc Committed By: mrg Date: Sun Mar 1 04:52:47 UTC 2015 Update of /cvsroot/xsrc/external/mit/xf86-video-ati-kms/dist In directory ivanova.netbsd.org:/tmp/cvs-serv19011 Log Message: initial import of xf86-video-ati 7.5.0 sources, into a new subdir as this only has a chance of working on systems with KMS -- -7 on x86 only, so we need to keep the 6.x around for everyone else. Status: Vendor Tag: xorg Release Tags: xf86-video-ati-7-5-0 N xsrc/external/mit/xf86-video-ati-kms/dist/ltmain.sh N xsrc/external/mit/xf86-video-ati-kms/dist/depcomp N xsrc/external/mit/xf86-video-ati-kms/dist/config.guess N xsrc/external/mit/xf86-video-ati-kms/dist/missing N xsrc/external/mit/xf86-video-ati-kms/dist/aclocal.m4 N xsrc/external/mit/xf86-video-ati-kms/dist/COPYING N xsrc/external/mit/xf86-video-ati-kms/dist/compile N xsrc/external/mit/xf86-video-ati-kms/dist/INSTALL N xsrc/external/mit/xf86-video-ati-kms/dist/Makefile.in N xsrc/external/mit/xf86-video-ati-kms/dist/config.sub N xsrc/external/mit/xf86-video-ati-kms/dist/configure.ac N xsrc/external/mit/xf86-video-ati-kms/dist/README N xsrc/external/mit/xf86-video-ati-kms/dist/Makefile.am N xsrc/external/mit/xf86-video-ati-kms/dist/configure N xsrc/external/mit/xf86-video-ati-kms/dist/ChangeLog N xsrc/external/mit/xf86-video-ati-kms/dist/config.h.in N xsrc/external/mit/xf86-video-ati-kms/dist/install-sh N xsrc/external/mit/xf86-video-ati-kms/dist/man/Makefile.in N xsrc/external/mit/xf86-video-ati-kms/dist/man/radeon.man N xsrc/external/mit/xf86-video-ati-kms/dist/man/Makefile.am N xsrc/external/mit/xf86-video-ati-kms/dist/man/ati.man N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_state.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/ati.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_pci_chipset_gen.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_version.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_video.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_bo_helper.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_probe.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/evergreen_exa.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/cayman_accel.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_textured_videofuncs.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_chipset_gen.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_exa_render.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_shader.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/evergreen_accel.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_reg_auto_r6xx.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_xvmc.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/cayman_reg.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_glamor.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/bicubic_table.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_misc.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_exa_shared.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/atipcirename.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_dri2.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_pci_device_match_gen.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/drmmode_display.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/simple_list.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/bicubic_table.py N xsrc/external/mit/xf86-video-ati-kms/dist/src/atipciids.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/evergreen_textured_videofuncs.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/cayman_shader.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/compat-api.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_reg.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_exa.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_textured_videofuncs.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/evergreen_reg.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_dri2.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/ati_pciids_gen.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_reg_r6xx.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/cayman_reg_auto.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/evergreen_shader.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/Makefile.in N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_bo_helper.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/r600_reg_r7xx.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_exa_funcs.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/r6xx_accel.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_probe.c N xsrc/external/mit/xf86-video-ati-kms/dist/src/evergreen_shader.h N xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_exa_shared.h N xsrc/external/mit/xf86-video-ati-kms/di
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sun Mar 1 01:14:41 UTC 2015 Modified Files: src/sys/kern: uipc_usrreq.c Log Message: PR/39918: ITOH Yasufumi: Replace KASSERT with continue, since the file descriptor can be closed since closef() does not pay attention to FDEFER. XXX: Pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/kern/uipc_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.174 src/sys/kern/uipc_usrreq.c:1.175 --- src/sys/kern/uipc_usrreq.c:1.174 Sat Feb 28 16:42:01 2015 +++ src/sys/kern/uipc_usrreq.c Sat Feb 28 20:14:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_usrreq.c,v 1.174 2015/02/28 21:42:01 rtr Exp $ */ +/* $NetBSD: uipc_usrreq.c,v 1.175 2015/03/01 01:14:41 christos Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.174 2015/02/28 21:42:01 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.175 2015/03/01 01:14:41 christos Exp $"); #include #include @@ -1711,7 +1711,14 @@ unp_gc(file_t *dp) if ((fp->f_flag & FDEFER) != 0) { atomic_and_uint(&fp->f_flag, ~FDEFER); unp_defer--; -KASSERT(fp->f_count != 0); +if (fp->f_count == 0) { + /* + * XXX: closef() doesn't pay attention + * to FDEFER + */ + mutex_exit(&fp->f_lock); + continue; +} } else { if (fp->f_count == 0 || (fp->f_flag & FMARK) != 0 ||
CVS commit: src/usr.bin/sed
Module Name:src Committed By: asau Date: Sun Mar 1 01:07:46 UTC 2015 Modified Files: src/usr.bin/sed: extern.h process.c Log Message: Hide more subroutines in processing phase. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/sed/extern.h cvs rdiff -u -r1.50 -r1.51 src/usr.bin/sed/process.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/sed/extern.h diff -u src/usr.bin/sed/extern.h:1.18 src/usr.bin/sed/extern.h:1.19 --- src/usr.bin/sed/extern.h:1.18 Sun Mar 1 01:00:07 2015 +++ src/usr.bin/sed/extern.h Sun Mar 1 01:07:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.18 2015/03/01 01:00:07 asau Exp $ */ +/* $NetBSD: extern.h,v 1.19 2015/03/01 01:07:46 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -63,9 +63,7 @@ extern int ispan; extern int rflags; /* regex flags to use */ void compile(void); -void cspace(SPACE *, const char *, size_t, enum e_spflag); int process(void); -void resetstate(void); char *strregerror(int, regex_t *); void *xmalloc(size_t); void *xrealloc(void *, size_t); Index: src/usr.bin/sed/process.c diff -u src/usr.bin/sed/process.c:1.50 src/usr.bin/sed/process.c:1.51 --- src/usr.bin/sed/process.c:1.50 Sun Mar 1 01:00:07 2015 +++ src/usr.bin/sed/process.c Sun Mar 1 01:07:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: process.c,v 1.50 2015/03/01 01:00:07 asau Exp $ */ +/* $NetBSD: process.c,v 1.51 2015/03/01 01:07:46 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -38,7 +38,7 @@ #endif #include -__RCSID("$NetBSD: process.c,v 1.50 2015/03/01 01:00:07 asau Exp $"); +__RCSID("$NetBSD: process.c,v 1.51 2015/03/01 01:07:46 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/process.c 192732 2009-05-25 06:45:33Z brian $"); #endif @@ -81,11 +81,13 @@ static int lastline(void); static __inline int applies(struct s_command *); static void cfclose(struct s_command *, struct s_command *); +static void cspace(SPACE *, const char *, size_t, enum e_spflag); static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); static __inline int regexec_e(regex_t *, const char *, int, int, size_t); static void regsub(SPACE *, char *, char *); +static void resetstate(void); static int substitute(struct s_command *); static FILE *infile; /* Current input file */ @@ -375,7 +377,7 @@ applies(struct s_command *cp) /* * Reset the sed processor to its initial state. */ -void +static void resetstate(void) { struct s_command *cp; @@ -774,7 +776,7 @@ regsub(SPACE *sp, char *string, char *sr * Concatenate space: append the source space to the destination space, * allocating new space as necessary. */ -void +static void cspace(SPACE *sp, const char *p, size_t len, enum e_spflag spflag) { size_t tlen;
CVS commit: src/usr.bin/sed
Module Name:src Committed By: asau Date: Sun Mar 1 01:00:07 UTC 2015 Modified Files: src/usr.bin/sed: extern.h main.c process.c Log Message: Close files opened at processing time within processing phase. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/sed/extern.h cvs rdiff -u -r1.32 -r1.33 src/usr.bin/sed/main.c cvs rdiff -u -r1.49 -r1.50 src/usr.bin/sed/process.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/sed/extern.h diff -u src/usr.bin/sed/extern.h:1.17 src/usr.bin/sed/extern.h:1.18 --- src/usr.bin/sed/extern.h:1.17 Sun Mar 1 00:51:08 2015 +++ src/usr.bin/sed/extern.h Sun Mar 1 01:00:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.17 2015/03/01 00:51:08 asau Exp $ */ +/* $NetBSD: extern.h,v 1.18 2015/03/01 01:00:07 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -62,7 +62,6 @@ extern int aflag, nflag; extern int ispan; extern int rflags; /* regex flags to use */ -void cfclose(struct s_command *, struct s_command *); void compile(void); void cspace(SPACE *, const char *, size_t, enum e_spflag); int process(void); Index: src/usr.bin/sed/main.c diff -u src/usr.bin/sed/main.c:1.32 src/usr.bin/sed/main.c:1.33 --- src/usr.bin/sed/main.c:1.32 Sun Mar 1 00:38:01 2015 +++ src/usr.bin/sed/main.c Sun Mar 1 01:00:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.32 2015/03/01 00:38:01 asau Exp $ */ +/* $NetBSD: main.c,v 1.33 2015/03/01 01:00:07 asau Exp $ */ /*- * Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson. @@ -39,7 +39,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.32 2015/03/01 00:38:01 asau Exp $"); +__RCSID("$NetBSD: main.c,v 1.33 2015/03/01 01:00:07 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $"); #endif @@ -185,7 +185,6 @@ main(int argc, char *argv[]) else add_file(NULL); rval = process(); - cfclose(prog, NULL); if (fclose(stdout)) err(1, "stdout"); exit(rval); Index: src/usr.bin/sed/process.c diff -u src/usr.bin/sed/process.c:1.49 src/usr.bin/sed/process.c:1.50 --- src/usr.bin/sed/process.c:1.49 Sun Mar 1 00:51:08 2015 +++ src/usr.bin/sed/process.c Sun Mar 1 01:00:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: process.c,v 1.49 2015/03/01 00:51:08 asau Exp $ */ +/* $NetBSD: process.c,v 1.50 2015/03/01 01:00:07 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -38,7 +38,7 @@ #endif #include -__RCSID("$NetBSD: process.c,v 1.49 2015/03/01 00:51:08 asau Exp $"); +__RCSID("$NetBSD: process.c,v 1.50 2015/03/01 01:00:07 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/process.c 192732 2009-05-25 06:45:33Z brian $"); #endif @@ -80,6 +80,7 @@ static int mf_fgets(SPACE *, enum e_spfl static int lastline(void); static __inline int applies(struct s_command *); +static void cfclose(struct s_command *, struct s_command *); static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); @@ -296,6 +297,7 @@ new: if (!nflag && !pd) OUT(); flush_appends(); } /* for all lines */ + cfclose(prog, NULL); return rval; } @@ -795,7 +797,7 @@ cspace(SPACE *sp, const char *p, size_t /* * Close all cached opened files and report any errors */ -void +static void cfclose(struct s_command *cp, struct s_command *end) {
CVS commit: src/usr.bin/sed
Module Name:src Committed By: asau Date: Sun Mar 1 00:51:08 UTC 2015 Modified Files: src/usr.bin/sed: compile.c extern.h process.c Log Message: Move run-time data structures into processing part. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/sed/compile.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/sed/extern.h cvs rdiff -u -r1.48 -r1.49 src/usr.bin/sed/process.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/sed/compile.c diff -u src/usr.bin/sed/compile.c:1.44 src/usr.bin/sed/compile.c:1.45 --- src/usr.bin/sed/compile.c:1.44 Sat Feb 28 21:56:53 2015 +++ src/usr.bin/sed/compile.c Sun Mar 1 00:51:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: compile.c,v 1.44 2015/02/28 21:56:53 asau Exp $ */ +/* $NetBSD: compile.c,v 1.45 2015/03/01 00:51:08 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -38,7 +38,7 @@ #endif #include -__RCSID("$NetBSD: compile.c,v 1.44 2015/02/28 21:56:53 asau Exp $"); +__RCSID("$NetBSD: compile.c,v 1.45 2015/03/01 00:51:08 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/compile.c 259132 2013-12-09 18:57:20Z eadler $"); #endif @@ -154,9 +154,6 @@ compile(void) *compile_stream(&prog) = NULL; fixuplabel(prog, NULL); uselabel(); - if (appendnum > 0) - appends = xmalloc(sizeof(struct s_appends) * appendnum); - match = xmalloc((maxnsub + 1) * sizeof(regmatch_t)); } #define EATSPACE() do { \ Index: src/usr.bin/sed/extern.h diff -u src/usr.bin/sed/extern.h:1.16 src/usr.bin/sed/extern.h:1.17 --- src/usr.bin/sed/extern.h:1.16 Sun Mar 1 00:38:01 2015 +++ src/usr.bin/sed/extern.h Sun Mar 1 00:51:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.16 2015/03/01 00:38:01 asau Exp $ */ +/* $NetBSD: extern.h,v 1.17 2015/03/01 00:51:08 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -56,8 +56,6 @@ struct s_flist { extern struct s_compunit *script; extern struct s_flist *files; extern struct s_command *prog; -extern struct s_appends *appends; -extern regmatch_t *match; extern size_t maxnsub; extern size_t appendnum; extern int aflag, nflag; Index: src/usr.bin/sed/process.c diff -u src/usr.bin/sed/process.c:1.48 src/usr.bin/sed/process.c:1.49 --- src/usr.bin/sed/process.c:1.48 Sun Mar 1 00:38:01 2015 +++ src/usr.bin/sed/process.c Sun Mar 1 00:51:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: process.c,v 1.48 2015/03/01 00:38:01 asau Exp $ */ +/* $NetBSD: process.c,v 1.49 2015/03/01 00:51:08 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -38,7 +38,7 @@ #endif #include -__RCSID("$NetBSD: process.c,v 1.48 2015/03/01 00:38:01 asau Exp $"); +__RCSID("$NetBSD: process.c,v 1.49 2015/03/01 00:51:08 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/process.c 192732 2009-05-25 06:45:33Z brian $"); #endif @@ -104,7 +104,7 @@ static u_long linenum; static int rval; /* Exit status */ -struct s_appends *appends; /* Array of pointers to strings to append. */ +static struct s_appends *appends; /* Array of pointers to strings to append. */ static size_t appendx; /* Index into appends array. */ size_t appendnum; /* Size of appends array. */ @@ -113,7 +113,7 @@ static int sdone; /* If any substitutes /* Iov structure for 'w' commands. */ static regex_t *defpreg; size_t maxnsub; -regmatch_t *match; +static regmatch_t *match; #define OUT() do {fwrite(ps, 1, psl, outfile); fputc('\n', outfile);} while (0) @@ -125,6 +125,10 @@ process(void) size_t oldpsl = 0; char *p; + if (appendnum > 0) + appends = xmalloc(sizeof(struct s_appends) * appendnum); + match = xmalloc((maxnsub + 1) * sizeof(regmatch_t)); + p = NULL; for (linenum = 0; mf_fgets(&PS, REPLACE);) {
CVS commit: src/usr.bin/sed
Module Name:src Committed By: asau Date: Sun Mar 1 00:38:01 UTC 2015 Modified Files: src/usr.bin/sed: extern.h main.c process.c Log Message: Move data I/O file pointers into processing part. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/sed/extern.h cvs rdiff -u -r1.31 -r1.32 src/usr.bin/sed/main.c cvs rdiff -u -r1.47 -r1.48 src/usr.bin/sed/process.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/sed/extern.h diff -u src/usr.bin/sed/extern.h:1.15 src/usr.bin/sed/extern.h:1.16 --- src/usr.bin/sed/extern.h:1.15 Sat Feb 28 21:56:53 2015 +++ src/usr.bin/sed/extern.h Sun Mar 1 00:38:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.15 2015/02/28 21:56:53 asau Exp $ */ +/* $NetBSD: extern.h,v 1.16 2015/03/01 00:38:01 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -62,7 +62,6 @@ extern size_t maxnsub; extern size_t appendnum; extern int aflag, nflag; extern int ispan; -extern FILE *infile, *outfile; extern int rflags; /* regex flags to use */ void cfclose(struct s_command *, struct s_command *); Index: src/usr.bin/sed/main.c diff -u src/usr.bin/sed/main.c:1.31 src/usr.bin/sed/main.c:1.32 --- src/usr.bin/sed/main.c:1.31 Sat Feb 28 21:56:53 2015 +++ src/usr.bin/sed/main.c Sun Mar 1 00:38:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.31 2015/02/28 21:56:53 asau Exp $ */ +/* $NetBSD: main.c,v 1.32 2015/03/01 00:38:01 asau Exp $ */ /*- * Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson. @@ -39,7 +39,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.31 2015/02/28 21:56:53 asau Exp $"); +__RCSID("$NetBSD: main.c,v 1.32 2015/03/01 00:38:01 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $"); #endif @@ -88,9 +88,6 @@ static struct s_compunit **cu_nextp = &s struct s_flist *files; static struct s_flist **fl_nextp = &files; -FILE *infile; /* Current input file */ -FILE *outfile; /* Current output file */ - int aflag; static int eflag; int nflag; Index: src/usr.bin/sed/process.c diff -u src/usr.bin/sed/process.c:1.47 src/usr.bin/sed/process.c:1.48 --- src/usr.bin/sed/process.c:1.47 Sat Feb 28 21:56:53 2015 +++ src/usr.bin/sed/process.c Sun Mar 1 00:38:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: process.c,v 1.47 2015/02/28 21:56:53 asau Exp $ */ +/* $NetBSD: process.c,v 1.48 2015/03/01 00:38:01 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -38,7 +38,7 @@ #endif #include -__RCSID("$NetBSD: process.c,v 1.47 2015/02/28 21:56:53 asau Exp $"); +__RCSID("$NetBSD: process.c,v 1.48 2015/03/01 00:38:01 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/process.c 192732 2009-05-25 06:45:33Z brian $"); #endif @@ -87,6 +87,9 @@ static __inline int regexec_e(regex_t * static void regsub(SPACE *, char *, char *); static int substitute(struct s_command *); +static FILE *infile; /* Current input file */ +static FILE *outfile; /* Current output file */ + /* * Current file and line number; line numbers restart across compilation * units, but span across input files. The latter is optional if editing
CVS commit: src/sys/dev
Module Name:src Committed By: mrg Date: Sun Mar 1 00:34:14 UTC 2015 Modified Files: src/sys/dev: midi_if.h Log Message: fix some comments about MP midi. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/midi_if.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/midi_if.h diff -u src/sys/dev/midi_if.h:1.26 src/sys/dev/midi_if.h:1.27 --- src/sys/dev/midi_if.h:1.26 Sun Dec 21 22:21:03 2014 +++ src/sys/dev/midi_if.h Sun Mar 1 00:34:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: midi_if.h,v 1.26 2014/12/21 22:21:03 mrg Exp $ */ +/* $NetBSD: midi_if.h,v 1.27 2015/03/01 00:34:14 mrg Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -50,11 +50,11 @@ struct midi_info { * * METHOD INTR NOTES * --- --- - - * open held - * close held - * output held - * getinfo held Called at attach time - * ioctl held + * open - + * close - + * output - + * getinfo - Called at attach time + * ioctl - * get_locks - Called at attach time */
CVS commit: src/sys/kern
Module Name:src Committed By: jmcneill Date: Sat Feb 28 23:04:34 UTC 2015 Modified Files: src/sys/kern: kern_module.c Log Message: if the root file-system is not yet mounted, hide "vfs load failed" spam with options DEBUG To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/kern/kern_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.102 src/sys/kern/kern_module.c:1.103 --- src/sys/kern/kern_module.c:1.102 Tue Dec 2 13:00:38 2014 +++ src/sys/kern/kern_module.c Sat Feb 28 23:04:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.102 2014/12/02 13:00:38 pooka Exp $ */ +/* $NetBSD: kern_module.c,v 1.103 2015/02/28 23:04:34 jmcneill Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.102 2014/12/02 13:00:38 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.103 2015/02/28 23:04:34 jmcneill Exp $"); #define _MODULE_INTERNAL @@ -966,7 +966,8 @@ module_do_load(const char *name, bool is * available for each architecture, so we don't * print an error if they are missing. */ - if (modclass != MODULE_CLASS_EXEC || error != ENOENT) + if ((modclass != MODULE_CLASS_EXEC || error != ENOENT) && + root_device != NULL) module_error("vfs load failed for `%s', " "error %d", name, error); #endif
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: jmcneill Date: Sat Feb 28 22:53:25 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_board.c Log Message: invert gpio OEN bit logic, now usb works To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_board.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/amlogic/amlogic_board.c diff -u src/sys/arch/arm/amlogic/amlogic_board.c:1.4 src/sys/arch/arm/amlogic/amlogic_board.c:1.5 --- src/sys/arch/arm/amlogic/amlogic_board.c:1.4 Sat Feb 28 18:50:57 2015 +++ src/sys/arch/arm/amlogic/amlogic_board.c Sat Feb 28 22:53:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_board.c,v 1.4 2015/02/28 18:50:57 jmcneill Exp $ */ +/* $NetBSD: amlogic_board.c,v 1.5 2015/02/28 22:53:25 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_amlogic.h" #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.4 2015/02/28 18:50:57 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.5 2015/02/28 22:53:25 jmcneill Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -224,7 +224,7 @@ amlogic_usbphy_init(int port) if (gpio_power) { gpioao = bus_space_read_4(bst, bsh, gpioao_reg); - gpioao |= __BIT(pin); /* OEN */ + gpioao &= ~__BIT(pin); /* OEN */ bus_space_write_4(bst, bsh, gpioao_reg, gpioao); if (pol) { gpioao |= __BIT(pin + 16); /* OUT */ @@ -278,7 +278,7 @@ amlogic_usbphy_init(int port) if (gpio_reset) { /* Reset */ gpioao = bus_space_read_4(bst, bsh, gpioao_reg); - gpioao |= __BIT(pin); /* OEN */ + gpioao &= ~__BIT(pin); /* OEN */ bus_space_write_4(bst, bsh, gpioao_reg, gpioao); if (pol) { gpioao |= __BIT(pin + 16); /* OUT */
CVS commit: src/usr.bin/sed
Module Name:src Committed By: asau Date: Sat Feb 28 21:56:53 UTC 2015 Modified Files: src/usr.bin/sed: compile.c extern.h main.c process.c Log Message: Improve modularity of "sed" source: - move program source input subroutines into compiler part; - move data I/O subroutines into processor part. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.bin/sed/compile.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/sed/extern.h cvs rdiff -u -r1.30 -r1.31 src/usr.bin/sed/main.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/sed/process.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/sed/compile.c diff -u src/usr.bin/sed/compile.c:1.43 src/usr.bin/sed/compile.c:1.44 --- src/usr.bin/sed/compile.c:1.43 Thu Jun 26 02:14:32 2014 +++ src/usr.bin/sed/compile.c Sat Feb 28 21:56:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: compile.c,v 1.43 2014/06/26 02:14:32 christos Exp $ */ +/* $NetBSD: compile.c,v 1.44 2015/02/28 21:56:53 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -38,7 +38,7 @@ #endif #include -__RCSID("$NetBSD: compile.c,v 1.43 2014/06/26 02:14:32 christos Exp $"); +__RCSID("$NetBSD: compile.c,v 1.44 2015/02/28 21:56:53 asau Exp $"); #ifdef __FBSDID __FBSDID("$FreeBSD: head/usr.bin/sed/compile.c 259132 2013-12-09 18:57:20Z eadler $"); #endif @@ -73,6 +73,8 @@ static struct labhash { int lh_ref; } *labels[LHSZ]; +static char *cu_fgets(char *, int, int *); + static char *compile_addr(char *, struct s_addr *); static char *compile_ccl(char **, char *); static char *compile_delimited(char *, char *, int); @@ -91,6 +93,14 @@ static void fixuplabel(struct s_comman static void uselabel(void); /* + * Current file and line number; line numbers restart across compilation + * units, but span across input files. The latter is optional if editing + * in place. + */ +static const char *fname; /* File name. */ +static u_long linenum; + +/* * Command specification. This is used to drive the command parser. */ struct s_format { @@ -945,3 +955,99 @@ uselabel(void) } } } + +/* + * Like fgets, but go through the chain of compilation units chaining them + * together. Empty strings and files are ignored. + */ +char * +cu_fgets(char *buf, int n, int *more) +{ + static enum {ST_EOF, ST_FILE, ST_STRING} state = ST_EOF; + static FILE *f; /* Current open file */ + static char *s; /* Current pointer inside string */ + static char string_ident[30]; + char *p; + +again: + switch (state) { + case ST_EOF: + if (script == NULL) { + if (more != NULL) +*more = 0; + return (NULL); + } + linenum = 0; + switch (script->type) { + case CU_FILE: + if ((f = fopen(script->s, "r")) == NULL) +err(1, "%s", script->s); + fname = script->s; + state = ST_FILE; + goto again; + case CU_STRING: + if (((size_t)snprintf(string_ident, + sizeof(string_ident), "\"%s\"", script->s)) >= + sizeof(string_ident) - 1) +(void)strcpy(string_ident + +sizeof(string_ident) - 6, " ...\""); + fname = string_ident; + s = script->s; + state = ST_STRING; + goto again; + } + case ST_FILE: + if ((p = fgets(buf, n, f)) != NULL) { + linenum++; + if (linenum == 1 && buf[0] == '#' && buf[1] == 'n') +nflag = 1; + if (more != NULL) +*more = !feof(f); + return (p); + } + script = script->next; + (void)fclose(f); + state = ST_EOF; + goto again; + case ST_STRING: + if (linenum == 0 && s[0] == '#' && s[1] == 'n') + nflag = 1; + p = buf; + for (;;) { + if (n-- <= 1) { +*p = '\0'; +linenum++; +if (more != NULL) + *more = 1; +return (buf); + } + switch (*s) { + case '\0': +state = ST_EOF; +if (s == script->s) { + script = script->next; + goto again; +} else { + script = script->next; + *p = '\0'; + linenum++; + if (more != NULL) + *more = 0; + return (buf); +} + case '\n': +*p++ = '\n'; +*p = '\0'; +s++; +linenum++; +if (more != NULL) + *more = 0; +return (buf); + default: +*p++ = *s++; + } + } + } + /* NOTREACHED */ + return (NULL); +} Index: src/usr.bin/sed/extern.h diff -u src/usr.bin/sed/extern.h:1.14 src/usr.bin/sed/extern.h:1.15 --- src/usr.bin/sed/extern.h:1.14 Fri Jun 6 21:56:39 2014 +++ src/usr.bin/sed/extern.h Sat Feb 28 21:56:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.14 2014/06/06 21:56:39 wiz Exp $ */ +/* $NetBSD: extern.h,v 1.15 2015/02/28 21:56:53 asau Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -36,24 +36,39 @@ * $FreeBSD: head/usr.bin/sed/extern.h 170608 2007-06-12 12:05:24Z yar $ */ +/* + * Linked list of units (strings and files) to be compiled + */ +struct s_compunit { + struct s_compunit *next; + enum e_cut {CU_FILE, CU_STRING} type; + char *s; /* Pointer to string or fname */ +}; + +/* + * Linked list of files to be processed + */ +struct s_flist { + char
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: martin Date: Sat Feb 28 21:44:33 UTC 2015 Modified Files: src/sys/arch/sparc64/sparc64: trap.c Log Message: As christos put it: "Tidy up error handling, and return SIGBUS for mmap past the end of file as required by the spec." To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/arch/sparc64/sparc64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/trap.c diff -u src/sys/arch/sparc64/sparc64/trap.c:1.180 src/sys/arch/sparc64/sparc64/trap.c:1.181 --- src/sys/arch/sparc64/sparc64/trap.c:1.180 Thu Feb 20 01:40:42 2014 +++ src/sys/arch/sparc64/sparc64/trap.c Sat Feb 28 21:44:33 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.180 2014/02/20 01:40:42 joerg Exp $ */ +/* $NetBSD: trap.c,v 1.181 2015/02/28 21:44:33 martin Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.180 2014/02/20 01:40:42 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.181 2015/02/28 21:44:33 martin Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -1198,17 +1198,25 @@ kfault: } #endif KSI_INIT_TRAP(&ksi); - if (rv == ENOMEM) { - printf("UVM: pid %d (%s), uid %d killed: out of swap\n", - p->p_pid, p->p_comm, - l->l_cred ? - kauth_cred_geteuid(l->l_cred) : -1); + switch (rv) { + case EINVAL: + ksi.ksi_signo = SIGBUS; + ksi.ksi_code = BUS_ADRERR; + break; + case EACCES: + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_ACCERR; + break; + case ENOMEM: ksi.ksi_signo = SIGKILL; - ksi.ksi_code = SI_NOINFO; - } else { + printf("UVM: pid %d (%s), uid %d killed: out of swap\n", + p->p_pid, p->p_comm, + l->l_cred ? kauth_cred_geteuid(l->l_cred) : -1); + break; + default: ksi.ksi_signo = SIGSEGV; - ksi.ksi_code = (rv == EACCES -? SEGV_ACCERR : SEGV_MAPERR); + ksi.ksi_code = SEGV_MAPERR; + break; } ksi.ksi_trap = type; ksi.ksi_addr = (void *)sfva;
CVS commit: src/sys/kern
Module Name:src Committed By: rtr Date: Sat Feb 28 21:42:01 UTC 2015 Modified Files: src/sys/kern: uipc_usrreq.c Log Message: Place opening brace to function at column 0, like in the rest of the file. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/sys/kern/uipc_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.173 src/sys/kern/uipc_usrreq.c:1.174 --- src/sys/kern/uipc_usrreq.c:1.173 Mon Feb 2 02:28:26 2015 +++ src/sys/kern/uipc_usrreq.c Sat Feb 28 21:42:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_usrreq.c,v 1.173 2015/02/02 02:28:26 christos Exp $ */ +/* $NetBSD: uipc_usrreq.c,v 1.174 2015/02/28 21:42:01 rtr Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.173 2015/02/02 02:28:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.174 2015/02/28 21:42:01 rtr Exp $"); #include #include @@ -920,7 +920,8 @@ unp_sockaddr(struct socket *so, struct m * what it calls "abstract" unix sockets. */ static struct sockaddr_un * -makeun(struct mbuf *nam, size_t *addrlen) { +makeun(struct mbuf *nam, size_t *addrlen) +{ struct sockaddr_un *sun; *addrlen = nam->m_len + 1;
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: riastradh Date: Sat Feb 28 21:30:22 UTC 2015 Modified Files: src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h Log Message: Actually poll every tick as advertised. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.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/external/bsd/drm2/include/drm/drm_wait_netbsd.h diff -u src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.10 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.11 --- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.10 Sat Feb 28 21:17:32 2015 +++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h Sat Feb 28 21:30:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_wait_netbsd.h,v 1.10 2015/02/28 21:17:32 riastradh Exp $ */ +/* $NetBSD: drm_wait_netbsd.h,v 1.11 2015/02/28 21:30:22 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -144,8 +144,7 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, break; \ } \ /* XXX errno NetBSD->Linux */ \ - (RET) = -cv_timedwait_sig((Q), &(INTERLOCK)->sl_lock, \ - (_dswo_end - _dswo_now)); \ + (RET) = -cv_timedwait_sig((Q), &(INTERLOCK)->sl_lock, 1); \ if (RET) { \ if ((RET) == -EWOULDBLOCK) \ (RET) = (CONDITION) ? 0 : -EBUSY; \
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: riastradh Date: Sat Feb 28 21:17:32 UTC 2015 Modified Files: src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h Log Message: Remove extraneous blank line. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.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/external/bsd/drm2/include/drm/drm_wait_netbsd.h diff -u src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.9 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.10 --- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.9 Sat Feb 28 18:25:39 2015 +++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h Sat Feb 28 21:17:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_wait_netbsd.h,v 1.9 2015/02/28 18:25:39 riastradh Exp $ */ +/* $NetBSD: drm_wait_netbsd.h,v 1.10 2015/02/28 21:17:32 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -149,7 +149,6 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, if (RET) { \ if ((RET) == -EWOULDBLOCK) \ (RET) = (CONDITION) ? 0 : -EBUSY; \ - \ break; \ } \ } \
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Feb 28 18:52:01 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: ODROID-C1 Log Message: add dwctwo and usb devices To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/ODROID-C1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/ODROID-C1 diff -u src/sys/arch/evbarm/conf/ODROID-C1:1.2 src/sys/arch/evbarm/conf/ODROID-C1:1.3 --- src/sys/arch/evbarm/conf/ODROID-C1:1.2 Fri Feb 27 17:35:08 2015 +++ src/sys/arch/evbarm/conf/ODROID-C1 Sat Feb 28 18:52:01 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: ODROID-C1,v 1.2 2015/02/27 17:35:08 jmcneill Exp $ +# $NetBSD: ODROID-C1,v 1.3 2015/02/28 18:52:01 jmcneill Exp $ # # Odroid-C1 (Amlogic S805) based SBC (Single Board Computer) # @@ -175,6 +175,20 @@ amlogicio0 at mainbus? amlogiccom0 at amlogicio0 port 0 options CONSADDR=0xc81004c0, CONSPEED=115200 +# USB +dwctwo0 at amlogicio0 port 0 +dwctwo1 at amlogicio0 port 1 +usb* at dwctwo? + +include "dev/usb/usbdevices.config" +midi* at midibus? + +## USB debugging options +#options USBVERBOSE +#options USB_DEBUG +#options UHUB_DEBUG +#options DWC2_DEBUG + # Pseudo-Devices # disk/mass storage pseudo-devices
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: jmcneill Date: Sat Feb 28 18:50:57 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_board.c amlogic_crureg.h amlogic_dwctwo.c Log Message: more usb phy / clk init To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/amlogic/amlogic_board.c \ src/sys/arch/arm/amlogic/amlogic_crureg.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_dwctwo.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/amlogic/amlogic_board.c diff -u src/sys/arch/arm/amlogic/amlogic_board.c:1.3 src/sys/arch/arm/amlogic/amlogic_board.c:1.4 --- src/sys/arch/arm/amlogic/amlogic_board.c:1.3 Sat Feb 28 15:20:43 2015 +++ src/sys/arch/arm/amlogic/amlogic_board.c Sat Feb 28 18:50:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_board.c,v 1.3 2015/02/28 15:20:43 jmcneill Exp $ */ +/* $NetBSD: amlogic_board.c,v 1.4 2015/02/28 18:50:57 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_amlogic.h" #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.3 2015/02/28 15:20:43 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.4 2015/02/28 18:50:57 jmcneill Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -59,7 +59,7 @@ struct arm32_bus_dma_tag amlogic_dma_tag AMLOGIC_CBUS_OFFSET + (x)) #define CBUS_WRITE(x, v) \ bus_space_write_4(&amlogic_bs_tag, amlogic_core_bsh, \ - AMLOGIC_CBUS_OFFSET + (x), (v)) + AMLOGIC_CBUS_OFFSET + (x), (v)) void amlogic_bootstrap(void) @@ -157,15 +157,40 @@ amlogic_get_rate_a9periph(void) return amlogic_get_rate_a9() / div; } +static void +amlogic_usbphy_clkgate_enable(int port) +{ + switch (port) { + case 0: + CBUS_WRITE(EE_CLK_GATING1_REG, + CBUS_READ(EE_CLK_GATING1_REG) | + EE_CLK_GATING1_USB_GENERAL | + EE_CLK_GATING1_USB0); + CBUS_WRITE(EE_CLK_GATING2_REG, + CBUS_READ(EE_CLK_GATING2_REG) | + EE_CLK_GATING2_USB0_TO_DDR); + break; + case 1: + CBUS_WRITE(EE_CLK_GATING1_REG, + CBUS_READ(EE_CLK_GATING1_REG) | + EE_CLK_GATING1_USB_GENERAL | + EE_CLK_GATING1_USB1); + CBUS_WRITE(EE_CLK_GATING2_REG, + CBUS_READ(EE_CLK_GATING2_REG) | + EE_CLK_GATING2_USB1_TO_DDR); + break; + } +} + void amlogic_usbphy_init(int port) { bus_space_tag_t bst = &amlogic_bs_tag; bus_space_handle_t bsh = amlogic_core_bsh; - bus_size_t ctrl_reg, cfg_reg, gpioao_reg; - uint32_t ctrl, cfg, gpioao; + bus_size_t ctrl_reg, cfg_reg, adp_bc_reg, gpioao_reg; + uint32_t ctrl, cfg, adp_bc, gpioao; u_int pin, pol; - bool gpio_power = false, gpio_reset = false; + bool gpio_power = false, gpio_reset = false, aca_enable = false; gpioao_reg = AMLOGIC_GPIOAO_OFFSET; @@ -173,6 +198,7 @@ amlogic_usbphy_init(int port) case 0: cfg_reg = PREI_USB_PHY_A_CFG_REG; ctrl_reg = PREI_USB_PHY_A_CTRL_REG; + adp_bc_reg = PREI_USB_PHY_A_ADP_BC_REG; pin = 5; pol = 1; gpio_power = true; @@ -180,17 +206,26 @@ amlogic_usbphy_init(int port) case 1: cfg_reg = PREI_USB_PHY_B_CFG_REG; ctrl_reg = PREI_USB_PHY_B_CTRL_REG; + adp_bc_reg = PREI_USB_PHY_B_ADP_BC_REG; pin = 4; pol = 0; gpio_reset = true; + aca_enable = true; break; default: return; } + if (port == 0) { + CBUS_WRITE(RESET1_REG, RESET1_USB); + } + + amlogic_usbphy_clkgate_enable(port); + if (gpio_power) { gpioao = bus_space_read_4(bst, bsh, gpioao_reg); gpioao |= __BIT(pin); /* OEN */ + bus_space_write_4(bst, bsh, gpioao_reg, gpioao); if (pol) { gpioao |= __BIT(pin + 16); /* OUT */ } else { @@ -199,8 +234,6 @@ amlogic_usbphy_init(int port) bus_space_write_4(bst, bsh, gpioao_reg, gpioao); } - CBUS_WRITE(RESET1_REG, RESET1_USB); - delay(1000); cfg = CBUS_READ(cfg_reg); @@ -229,15 +262,40 @@ amlogic_usbphy_init(int port) if ((ctrl & PREI_USB_PHY_CTRL_CLK_DET) == 0) printf("WARNING: USB PHY port %d clock not detected\n", port); + if (aca_enable) { + adp_bc = CBUS_READ(adp_bc_reg); + adp_bc |= PREI_USB_PHY_ADP_BC_ACA_ENABLE; + CBUS_WRITE(adp_bc_reg, adp_bc); + + delay(1000); + + adp_bc = CBUS_READ(adp_bc_reg); + if (adp_bc & PREI_USB_PHY_ADP_BC_ACA_FLOATING) + printf("WARNING: USB PHY port %d failed to enable " + "ACA detection\n", port); + } + if (gpio_reset) { /* Reset */ gpioao = bus_space_read_4(bst, bsh, gpioao_reg); gpioao |= __BIT(pin); /* OEN */ + bus_space_write_4(bst, bsh, gpioao_reg, gpioao); if (pol) { gpioao |= __BIT(pin + 16); /* OUT */ } else { gpioao &= ~__BIT(pin + 16); /* OUT */ } bus_space_write_4(bst, bsh, gpioao_reg, gpioao); + + delay(1000); + + if (pol) { + gpioao &= ~__BIT(pin + 16); /* OUT */ + } else { + gpioao |= __BIT(pin + 16); /* OUT */ + } + bus_space_write_4(bst, bsh, gpioao_reg, gpioao); + + delay(6); } } Index: src/sys/arch/arm/amlogic/amlogic_crureg.h diff -u src/sys/arch/
CVS commit: src/sys/arch/evbarm/amlogic
Module Name:src Committed By: jmcneill Date: Sat Feb 28 18:50:15 UTC 2015 Modified Files: src/sys/arch/evbarm/amlogic: amlogic_machdep.c Log Message: access watchdog with AMLOGIC_CBUS_OFFSET offset To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/amlogic/amlogic_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/amlogic/amlogic_machdep.c diff -u src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.7 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.8 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.7 Sat Feb 28 15:21:07 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Sat Feb 28 18:50:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.7 2015/02/28 15:21:07 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.8 2015/02/28 18:50:15 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.7 2015/02/28 15:21:07 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.8 2015/02/28 18:50:15 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -492,11 +492,12 @@ void amlogic_reset(void) { bus_space_tag_t bst = &amlogic_bs_tag; -bus_space_handle_t bsh = amlogic_core_bsh; + bus_space_handle_t bsh = amlogic_core_bsh; + bus_size_t off = AMLOGIC_CBUS_OFFSET; - bus_space_write_4(bst, bsh, WATCHDOG_TC_REG, + bus_space_write_4(bst, bsh, off + WATCHDOG_TC_REG, WATCHDOG_TC_CPUS | WATCHDOG_TC_ENABLE | 1); - bus_space_write_4(bst, bsh, WATCHDOG_RESET_REG, 0); + bus_space_write_4(bst, bsh, off + WATCHDOG_RESET_REG, 0); for (;;) { __asm("wfi");
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Sat Feb 28 18:25:39 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_irq.c src/sys/external/bsd/drm2/dist/drm/i915: i915_dma.c src/sys/external/bsd/drm2/dist/drm/via: via_dmablit.c via_drv.h via_irq.c via_video.c src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h Log Message: New macro DRM_SPIN_WAIT_ON better reflects DRM_WAIT_ON. We still need to adapt all waits from upstream to use an interlock, so we can't implement DRM_WAIT_ON verbatim, but this more closely reflects the API of DRM_WAIT_ON than DRM_*WAIT*_UNTIL do. Major difference is that this polls every tick, like DRM_WAIT_ON, unlike DRM_*WAIT*_UNTIL. So it will mask missing wakeups, but it wouldn't surprise me if there were such things upstream. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/drm_irq.c cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c \ src/sys/external/bsd/drm2/dist/drm/via/via_irq.c \ src/sys/external/bsd/drm2/dist/drm/via/via_video.c cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/via/via_drv.h cvs rdiff -u -r1.8 -r1.9 \ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.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/external/bsd/drm2/dist/drm/drm_irq.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.7 src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.8 --- src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.7 Sat Feb 28 03:05:09 2015 +++ src/sys/external/bsd/drm2/dist/drm/drm_irq.c Sat Feb 28 18:25:39 2015 @@ -1293,20 +1293,14 @@ int drm_wait_vblank(struct drm_device *d #ifdef __NetBSD__ { unsigned long irqflags; + spin_lock_irqsave(&dev->vbl_lock, irqflags); - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev->vblank[crtc].queue, - &dev->vbl_lock, - (3 * HZ), + DRM_SPIN_WAIT_ON(ret, &dev->vblank[crtc].queue, &dev->vbl_lock, + 3 * HZ, (((drm_vblank_count(dev, crtc) - vblwait->request.sequence) <= (1 << 23)) || !dev->irq_enabled)); spin_unlock_irqrestore(&dev->vbl_lock, irqflags); - if (ret < 0) /* Failed: return negative error as is. */ - ; - else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ - ret = -EBUSY; - else /* Succeeded (ret > 0): return 0. */ - ret = 0; } #else DRM_WAIT_ON(ret, dev->vblank[crtc].queue, 3 * HZ, Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.14 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.15 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.14 Sat Feb 28 03:06:46 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Sat Feb 28 18:25:39 2015 @@ -812,16 +812,9 @@ static int i915_wait_irq(struct drm_devi #ifdef __NetBSD__ unsigned long flags; spin_lock_irqsave(&dev_priv->irq_lock, flags); - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &ring->irq_queue, - &dev_priv->irq_lock, + DRM_SPIN_WAIT_ON(ret, &ring->irq_queue, &dev_priv->irq_lock, 3 * DRM_HZ, READ_BREADCRUMB(dev_priv) >= irq_nr); - if (ret < 0) /* Failure: return negative error as is. */ - ; - else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ - ret = -EBUSY; - else /* Succeeded (ret > 0): return 0. */ - ret = 0; spin_unlock_irqrestore(&dev_priv->irq_lock, flags); #else DRM_WAIT_ON(ret, ring->irq_queue, 3 * HZ, Index: src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c diff -u src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.3 src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.3 Sat Feb 28 03:23:32 2015 +++ src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c Sat Feb 28 18:25:39 2015 @@ -597,15 +597,8 @@ via_dmablit_sync(struct drm_device *dev, #ifdef __NetBSD__ spin_lock(&blitq->blit_lock); if (via_dmablit_active(blitq, engine, handle, &queue)) { - DRM_SPIN_TIMED_WAIT_UNTIL(ret, queue, &blitq->blit_lock, - 3*DRM_HZ, + DRM_SPIN_WAIT_ON(ret, queue, &blitq->blit_lock, 3*DRM_HZ, !via_dmablit_active(blitq, engine, handle, NULL)); - if (ret < 0) /* Failure: return negative error as is. */ - ; - else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ - ret = -EBUSY; - else /* Succeeded (ret > 0): return 0. */ - ret = 0; } spin_unlock(&blitq->blit_lock); #else @@ -881,15 +874,9 @@ via_dmablit_grab_slot(drm_via_blitq_t *b spin_lock_irqsave(&blitq->blit_lock, irqsave); while (blitq->num_free == 0) { #ifdef __NetBSD__ - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &blitq->busy_queue, - &blitq->blit_lock, DRM_HZ, + DRM_SPIN_WAIT_ON(ret, &blitq->busy_queue, &blitq->blit_lock, + DRM_HZ, blitq->num_free > 0); - if (ret < 0) /* Failure: return ne
CVS commit: xsrc/external/mit/xsm/dist
Module Name:xsrc Committed By: wiz Date: Sat Feb 28 17:27:14 UTC 2015 Modified Files: xsrc/external/mit/xsm/dist: auth.c choose.c lock.c remote.c restart.c saveutil.c Log Message: Switch to the version of the close-on-exec patch that was committed upstream. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xsm/dist/auth.c \ xsrc/external/mit/xsm/dist/choose.c xsrc/external/mit/xsm/dist/lock.c \ xsrc/external/mit/xsm/dist/remote.c xsrc/external/mit/xsm/dist/restart.c \ xsrc/external/mit/xsm/dist/saveutil.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xsm/dist/auth.c diff -u xsrc/external/mit/xsm/dist/auth.c:1.2 xsrc/external/mit/xsm/dist/auth.c:1.3 --- xsrc/external/mit/xsm/dist/auth.c:1.2 Thu Sep 18 19:13:50 2014 +++ xsrc/external/mit/xsm/dist/auth.c Sat Feb 28 17:27:14 2015 @@ -154,26 +154,30 @@ SetAuthentication(int count, IceListenOb if ((addAuthFile = unique_filename (path, ".xsm")) == NULL) goto bad; -if (!(addfp = fopen (addAuthFile, "we"))) +if (!(addfp = fopen (addAuthFile, "w"))) goto bad; +fcntl(fileno(addfp), F_SETFD, FD_CLOEXEC); if ((remAuthFile = unique_filename (path, ".xsm")) == NULL) goto bad; -if (!(removefp = fopen (remAuthFile, "we"))) +if (!(removefp = fopen (remAuthFile, "w"))) goto bad; +fcntl(fileno(removefp), F_SETFD, FD_CLOEXEC); #else if ((addAuthFile = unique_filename (path, ".xsm", &fd)) == NULL) goto bad; -if (!(addfp = fdopen(fd, "wbe"))) +if (!(addfp = fdopen(fd, "wb"))) goto bad; +fcntl(fileno(addfp), F_SETFD, FD_CLOEXEC); if ((remAuthFile = unique_filename (path, ".xsm", &fd)) == NULL) goto bad; -if (!(removefp = fdopen(fd, "wbe"))) +if (!(removefp = fdopen(fd, "wb"))) goto bad; +fcntl(fileno(removefp), F_SETFD, FD_CLOEXEC); #endif if ((*authDataEntries = (IceAuthDataEntry *) XtMalloc ( Index: xsrc/external/mit/xsm/dist/choose.c diff -u xsrc/external/mit/xsm/dist/choose.c:1.2 xsrc/external/mit/xsm/dist/choose.c:1.3 --- xsrc/external/mit/xsm/dist/choose.c:1.2 Thu Sep 18 19:13:50 2014 +++ xsrc/external/mit/xsm/dist/choose.c Sat Feb 28 17:27:14 2015 @@ -98,7 +98,7 @@ GetSessionNames(int *count_ret, String * if ((dir = opendir (path)) == NULL) return 0; -(void)fcntl(dirfd(dir), F_SETFD, FD_CLOEXEC); +fcntl(dirfd(dir), F_SETFD, FD_CLOEXEC); count = 0; Index: xsrc/external/mit/xsm/dist/lock.c diff -u xsrc/external/mit/xsm/dist/lock.c:1.2 xsrc/external/mit/xsm/dist/lock.c:1.3 --- xsrc/external/mit/xsm/dist/lock.c:1.2 Thu Sep 18 19:13:50 2014 +++ xsrc/external/mit/xsm/dist/lock.c Sat Feb 28 17:27:14 2015 @@ -117,10 +117,11 @@ GetLockId(const char *session_name) snprintf (lock_file, sizeof(lock_file), "%s/.XSMlock-%s", path, session_name); -if ((fp = fopen (lock_file, "re")) == NULL) +if ((fp = fopen (lock_file, "r")) == NULL) { return (NULL); } +fcntl(fileno(fp), F_SETFD, FD_CLOEXEC); buf[0] = '\0'; fscanf (fp, "%255s\n", buf); Index: xsrc/external/mit/xsm/dist/remote.c diff -u xsrc/external/mit/xsm/dist/remote.c:1.2 xsrc/external/mit/xsm/dist/remote.c:1.3 --- xsrc/external/mit/xsm/dist/remote.c:1.2 Thu Sep 18 19:13:50 2014 +++ xsrc/external/mit/xsm/dist/remote.c Sat Feb 28 17:27:14 2015 @@ -111,7 +111,8 @@ remote_start(const char *restart_protoco default: /* parent */ close (pipefd[0]); - fp = fdopen (pipefd[1], "we"); + fcntl(pipefd[1], F_SETFD, FD_CLOEXEC); + fp = fdopen (pipefd[1], "w"); fprintf (fp, "CONTEXT X\n"); fprintf (fp, "DIR %s\n", cwd); Index: xsrc/external/mit/xsm/dist/restart.c diff -u xsrc/external/mit/xsm/dist/restart.c:1.2 xsrc/external/mit/xsm/dist/restart.c:1.3 --- xsrc/external/mit/xsm/dist/restart.c:1.2 Thu Sep 18 19:13:50 2014 +++ xsrc/external/mit/xsm/dist/restart.c Sat Feb 28 17:27:14 2015 @@ -531,11 +531,11 @@ StartDefaultApps (void) home = "."; snprintf (filename, sizeof(filename), "%s/.xsmstartup", home); -f = fopen (filename, "re"); +f = fopen (filename, "r"); if (!f) { - f = fopen (SYSTEM_INIT_FILE, "re"); + f = fopen (SYSTEM_INIT_FILE, "r"); if (!f) { printf ("Could not find default apps file. Make sure you did\n"); @@ -543,6 +543,7 @@ StartDefaultApps (void) exit (1); } } +fcntl(fileno(f), F_SETFD, FD_CLOEXEC); buf = NULL; buflen = 0; Index: xsrc/external/mit/xsm/dist/saveutil.c diff -u xsrc/external/mit/xsm/dist/saveutil.c:1.2 xsrc/external/mit/xsm/dist/saveutil.c:1.3 --- xsrc/external/mit/xsm/dist/saveutil.c:1.2 Thu Sep 18 19:13:50 2014 +++ xsrc/external/mit/xsm/dist/saveutil.c Sat Feb 28 17:27:14 2015 @@ -65,13 +65,14 @@ ReadSave(const char *session_name, char int state, i; int version_number; -f = fopen(session_save_file, "re"); +f = fopen
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: skrll Date: Sat Feb 28 15:45:12 UTC 2015 Modified Files: src/sys/arch/arm/cortex: armperiph.c Log Message: Make this compile where gtmr isn't used. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/cortex/armperiph.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/cortex/armperiph.c diff -u src/sys/arch/arm/cortex/armperiph.c:1.8 src/sys/arch/arm/cortex/armperiph.c:1.9 --- src/sys/arch/arm/cortex/armperiph.c:1.8 Sat Feb 28 09:34:35 2015 +++ src/sys/arch/arm/cortex/armperiph.c Sat Feb 28 15:45:12 2015 @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.8 2015/02/28 09:34:35 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.9 2015/02/28 15:45:12 skrll Exp $"); #include #include @@ -40,6 +40,7 @@ __KERNEL_RCSID(1, "$NetBSD: armperiph.c, #include #include +#include static int armperiph_match(device_t, cfdata_t, void *); static void armperiph_attach(device_t, device_t, void *); @@ -205,9 +206,11 @@ armperiph_attach(device_t parent, device .mpcaa_off1 = cfg->cfg_devices[i].pi_off1, .mpcaa_off2 = cfg->cfg_devices[i].pi_off2, }; +#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA15) if (strcmp(mpcaa.mpcaa_name, "armgtmr") == 0) { mpcaa.mpcaa_irq = IRQ_GTMR_PPI_VTIMER; } +#endif config_found(self, &mpcaa, NULL); }
CVS commit: src/sys/arch/evbarm/amlogic
Module Name:src Committed By: jmcneill Date: Sat Feb 28 15:21:07 UTC 2015 Modified Files: src/sys/arch/evbarm/amlogic: amlogic_machdep.c Log Message: set correct a9tmr/a9wdt frequency To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/amlogic/amlogic_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/amlogic/amlogic_machdep.c diff -u src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.6 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.7 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.6 Fri Feb 27 21:13:52 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Sat Feb 28 15:21:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.6 2015/02/27 21:13:52 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.7 2015/02/28 15:21:07 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.6 2015/02/27 21:13:52 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.7 2015/02/28 15:21:07 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -558,7 +558,7 @@ amlogic_device_register(device_t self, v */ if (device_is_a(self, "a9tmr") || device_is_a(self, "a9wdt")) { prop_dictionary_set_uint32(dict, "frequency", - 16 / 2); + amlogic_get_rate_a9periph()); return; }
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: jmcneill Date: Sat Feb 28 15:20:43 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_board.c amlogic_crureg.h amlogic_intr.h amlogic_io.c amlogic_reg.h amlogic_var.h files.amlogic Added Files: src/sys/arch/arm/amlogic: amlogic_dwctwo.c Log Message: add dwc2 attachment, doesnt quite work yet To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/amlogic/amlogic_board.c \ src/sys/arch/arm/amlogic/amlogic_crureg.h \ src/sys/arch/arm/amlogic/amlogic_intr.h \ src/sys/arch/arm/amlogic/amlogic_io.c \ src/sys/arch/arm/amlogic/amlogic_reg.h \ src/sys/arch/arm/amlogic/files.amlogic cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_dwctwo.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/amlogic/amlogic_board.c diff -u src/sys/arch/arm/amlogic/amlogic_board.c:1.2 src/sys/arch/arm/amlogic/amlogic_board.c:1.3 --- src/sys/arch/arm/amlogic/amlogic_board.c:1.2 Fri Feb 27 19:57:10 2015 +++ src/sys/arch/arm/amlogic/amlogic_board.c Sat Feb 28 15:20:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_board.c,v 1.2 2015/02/27 19:57:10 jmcneill Exp $ */ +/* $NetBSD: amlogic_board.c,v 1.3 2015/02/28 15:20:43 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_amlogic.h" #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.2 2015/02/27 19:57:10 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.3 2015/02/28 15:20:43 jmcneill Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -54,13 +54,12 @@ struct arm32_bus_dma_tag amlogic_dma_tag _BUS_DMATAG_FUNCS, }; -#define CBUS_READ(x) \ - bus_space_read_4(&amlogic_bs_tag, amlogic_core_bsh, (x)) - -static uint32_t amlogic_get_rate_xtal(void); -static uint32_t amlogic_get_rate_sys(void); -static uint32_t amlogic_get_rate_a9(void); - +#define CBUS_READ(x) \ + bus_space_read_4(&amlogic_bs_tag, amlogic_core_bsh, \ + AMLOGIC_CBUS_OFFSET + (x)) +#define CBUS_WRITE(x, v) \ + bus_space_write_4(&amlogic_bs_tag, amlogic_core_bsh, \ + AMLOGIC_CBUS_OFFSET + (x), (v)) void amlogic_bootstrap(void) @@ -75,7 +74,7 @@ amlogic_bootstrap(void) curcpu()->ci_data.cpu_cc_freq = amlogic_get_rate_a9(); } -static uint32_t +uint32_t amlogic_get_rate_xtal(void) { uint32_t ctlreg0; @@ -85,7 +84,7 @@ amlogic_get_rate_xtal(void) return __SHIFTOUT(ctlreg0, PREG_CTLREG0_ADDR_CLKRATE) * 100; } -static uint32_t +uint32_t amlogic_get_rate_sys(void) { uint32_t cntl; @@ -105,7 +104,7 @@ amlogic_get_rate_sys(void) return (uint32_t)clk; } -static uint32_t +uint32_t amlogic_get_rate_a9(void) { uint32_t cntl0, cntl1; @@ -147,3 +146,98 @@ amlogic_get_rate_a9(void) return rate; } + +uint32_t +amlogic_get_rate_a9periph(void) +{ + const uint32_t cntl1 = CBUS_READ(HHI_SYS_CPU_CLK_CNTL1_REG); + const u_int div = __SHIFTOUT(cntl1, + HHI_SYS_CPU_CLK_CNTL1_PERIPH_CLK_MUX) + 2; + + return amlogic_get_rate_a9() / div; +} + +void +amlogic_usbphy_init(int port) +{ + bus_space_tag_t bst = &amlogic_bs_tag; + bus_space_handle_t bsh = amlogic_core_bsh; + bus_size_t ctrl_reg, cfg_reg, gpioao_reg; + uint32_t ctrl, cfg, gpioao; + u_int pin, pol; + bool gpio_power = false, gpio_reset = false; + + gpioao_reg = AMLOGIC_GPIOAO_OFFSET; + + switch (port) { + case 0: + cfg_reg = PREI_USB_PHY_A_CFG_REG; + ctrl_reg = PREI_USB_PHY_A_CTRL_REG; + pin = 5; + pol = 1; + gpio_power = true; + break; + case 1: + cfg_reg = PREI_USB_PHY_B_CFG_REG; + ctrl_reg = PREI_USB_PHY_B_CTRL_REG; + pin = 4; + pol = 0; + gpio_reset = true; + break; + default: + return; + } + + if (gpio_power) { + gpioao = bus_space_read_4(bst, bsh, gpioao_reg); + gpioao |= __BIT(pin); /* OEN */ + if (pol) { + gpioao |= __BIT(pin + 16); /* OUT */ + } else { + gpioao &= ~__BIT(pin + 16); /* OUT */ + } + bus_space_write_4(bst, bsh, gpioao_reg, gpioao); + } + + CBUS_WRITE(RESET1_REG, RESET1_USB); + + delay(1000); + + cfg = CBUS_READ(cfg_reg); + cfg |= PREI_USB_PHY_CFG_CLK_32K_ALT_SEL; + CBUS_WRITE(cfg_reg, cfg); + + ctrl = CBUS_READ(ctrl_reg); + ctrl &= ~PREI_USB_PHY_CTRL_FSEL; + ctrl |= __SHIFTIN(PREI_USB_PHY_CTRL_FSEL_24M, + PREI_USB_PHY_CTRL_FSEL); + ctrl |= PREI_USB_PHY_CTRL_POR; + CBUS_WRITE(ctrl_reg, ctrl); + + delay(1000); + + ctrl = CBUS_READ(ctrl_reg); + ctrl &= ~PREI_USB_PHY_CTRL_POR; + CBUS_WRITE(ctrl_reg, ctrl); + + delay(5); + + ctrl = CBUS_READ(ctrl_reg); + + printf("USBPHY: port %d, ctrl %#x\n", port, ctrl); + + if ((ctrl & PREI_USB_PHY_CTRL_CLK_DET) == 0) + printf("WARNING: USB PHY port %d clock not detected\n", port); + + if (gpio_reset) { + /* Reset */ + gpioao = bus_space_read_4(bst, bsh, gpioao_reg); + gpioao |= __BIT(pin); /* OEN */ + if (pol) { + gpioao |= __BIT(pin + 16); /* OUT */ + } else { + gpi
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 14:10:00 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_i2c.c Log Message: Match Linux's wait for gmbus a little more precisely. Don't just wait up to 50 ms for a gmbus interrupt -- poll every tick for >=50 ms. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/dist/drm/i915/intel_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/external/bsd/drm2/dist/drm/i915/intel_i2c.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.9 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.10 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.9 Sat Feb 28 05:37:10 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Sat Feb 28 14:10:00 2015 @@ -264,9 +264,7 @@ gmbus_wait_hw_status(struct drm_i915_pri u32 gmbus2_status, u32 gmbus4_irq_en) { -#ifndef __NetBSD__ int i; -#endif int reg_offset = dev_priv->gpio_mmio_base; u32 gmbus2 = 0; #ifndef __NetBSD__ @@ -289,21 +287,25 @@ gmbus_wait_hw_status(struct drm_i915_pri #ifdef __NetBSD__ spin_lock(&dev_priv->gmbus_wait_lock); if (cold) { - unsigned timo = 50; - + i = 50; while (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset), !ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status))) { - if (timo-- == 0) + if (i-- == 0) break; DELAY(1000); } } else { - int ret; - DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, - &dev_priv->gmbus_wait_queue, &dev_priv->gmbus_wait_lock, - mstohz(50), - (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset), - ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status; + for (i = 0; i < mstohz(50); i++) { + int ret; + + DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, + &dev_priv->gmbus_wait_queue, + &dev_priv->gmbus_wait_lock, + 1, + (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset), +ISSET(gmbus2, +(GMBUS_SATOER | gmbus2_status; + } } spin_unlock(&dev_priv->gmbus_wait_lock); #else
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: martin Date: Sat Feb 28 13:57:08 UTC 2015 Modified Files: src/tests/lib/libc/sys: t_mmap.c Log Message: Make sure to use the values calculated in the loop that is supposed to crash the client process - so the compiler does not optimize it all away. Also improve diagnostic in case of common bug: SIGSEGV instead of SIGBUS. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_mmap.c diff -u src/tests/lib/libc/sys/t_mmap.c:1.8 src/tests/lib/libc/sys/t_mmap.c:1.9 --- src/tests/lib/libc/sys/t_mmap.c:1.8 Fri Feb 27 16:09:19 2015 +++ src/tests/lib/libc/sys/t_mmap.c Sat Feb 28 13:57:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.8 2015/02/27 16:09:19 christos Exp $ */ +/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.8 2015/02/27 16:09:19 christos Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $"); #include #include @@ -486,15 +486,23 @@ ATF_TC_BODY(mmap_truncate_signal, tc) if (pid == 0) { ATF_REQUIRE(signal(SIGBUS, map_sighandler) != SIG_ERR); + ATF_REQUIRE(signal(SIGSEGV, map_sighandler) != SIG_ERR); sta = 0; for (i = 0; i < page; i++) sta += map[i]; + /* child never will get this far, but the compiler will + not know, so better use the values calculated to + prevent the access to be optimized out */ ATF_REQUIRE(i == 0); + ATF_REQUIRE(sta == 0); + return; } (void)wait(&sta); ATF_REQUIRE(WIFEXITED(sta) != 0); + if (WEXITSTATUS(sta) == SIGSEGV) + atf_tc_fail("child process got SIGSEGV instead of SIGBUS"); ATF_REQUIRE(WEXITSTATUS(sta) == SIGBUS); ATF_REQUIRE(munmap(map, page) == 0); ATF_REQUIRE(close(fd) == 0);
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Sat Feb 28 13:08:00 UTC 2015 Modified Files: src/sys/compat/linux/common: linux_limit.h Log Message: When converting limits from linux32 (int32_t) to native (uint64_t), cast it to unsigned first to avoid bad side effect for negative values. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/common/linux_limit.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/compat/linux/common/linux_limit.h diff -u src/sys/compat/linux/common/linux_limit.h:1.6 src/sys/compat/linux/common/linux_limit.h:1.7 --- src/sys/compat/linux/common/linux_limit.h:1.6 Sat Sep 22 22:34:02 2012 +++ src/sys/compat/linux/common/linux_limit.h Sat Feb 28 13:08:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_limit.h,v 1.6 2012/09/22 22:34:02 joerg Exp $ */ +/* $NetBSD: linux_limit.h,v 1.7 2015/02/28 13:08:00 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ static int linux_to_bsd_limit(int); linux_to_bsd_rlimit1(b, l, rlim_max) #define linux32_to_bsd_rlimit1(b, l, f) \ -(b)->f = (l)->f == LINUX32_RLIM_INFINITY ? RLIM_INFINITY : (l)->f +(b)->f = (l)->f == LINUX32_RLIM_INFINITY ? RLIM_INFINITY : (uint32_t)(l)->f #define linux32_to_bsd_rlimit(b, l) \ linux32_to_bsd_rlimit1(b, l, rlim_cur); \ linux32_to_bsd_rlimit1(b, l, rlim_max)
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Sat Feb 28 09:34:35 UTC 2015 Modified Files: src/sys/arch/arm/broadcom: bcm2835_intr.c bcm2835_obio.c bcm2835_space.c bcm2835reg.h bcm2835var.h files.bcm2835 src/sys/arch/arm/cortex: armperiph.c gtmr.c gtmr_var.h mpcore_var.h src/sys/arch/evbarm/conf: RPI mk.rpi std.rpi src/sys/arch/evbarm/rpi: genassym.cf rpi.h rpi_machdep.c rpi_start.S Added Files: src/sys/arch/evbarm/conf: RPI2 src/sys/arch/evbarm/rpi: rpi2_start.S Log Message: Initial RPI2 support - it doesn't work yet. The generic timer gets messed up somehow. This commit changes the KVA layout of the RPI. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm2835_intr.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/broadcom/bcm2835_obio.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/broadcom/bcm2835_space.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/broadcom/bcm2835reg.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm2835var.h cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/broadcom/files.bcm2835 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/armperiph.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/cortex/gtmr.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/cortex/gtmr_var.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/mpcore_var.h cvs rdiff -u -r1.59 -r1.60 src/sys/arch/evbarm/conf/RPI cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/RPI2 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/mk.rpi cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/conf/std.rpi cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/rpi/genassym.cf cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/rpi/rpi.h cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/rpi/rpi2_start.S cvs rdiff -u -r1.56 -r1.57 src/sys/arch/evbarm/rpi/rpi_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/rpi/rpi_start.S 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/broadcom/bcm2835_intr.c diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.4 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.5 --- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.4 Sun Sep 7 15:28:05 2014 +++ src/sys/arch/arm/broadcom/bcm2835_intr.c Sat Feb 28 09:34:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_intr.c,v 1.4 2014/09/07 15:28:05 skrll Exp $ */ +/* $NetBSD: bcm2835_intr.c,v 1.5 2015/02/28 09:34:34 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,21 +30,28 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.4 2014/09/07 15:28:05 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.5 2015/02/28 09:34:34 skrll Exp $"); #define _INTR_PRIVATE +#include "opt_bcm283x.h" + #include -#include +#include +#include #include +#include #include -#include + +#include #include +#include #include #include +#include static void bcm2835_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); static void bcm2835_pic_block_irqs(struct pic_softc *, size_t, uint32_t); @@ -53,6 +60,21 @@ static void bcm2835_pic_establish_irq(st static void bcm2835_pic_source_name(struct pic_softc *, int, char *, size_t); +#if defined(BCM2836) +static void bcm2836mp_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); +static void bcm2836mp_pic_block_irqs(struct pic_softc *, size_t, uint32_t); +static int bcm2836mp_pic_find_pending_irqs(struct pic_softc *); +static void bcm2836mp_pic_establish_irq(struct pic_softc *, struct intrsource *); +static void bcm2836mp_pic_source_name(struct pic_softc *, int, char *, +size_t); +#ifdef MULTIPROCESSOR +int bcm2836mp_ipi_handler(void *); +static void bcm2836mp_cpu_init(struct pic_softc *, struct cpu_info *); +static void bcm2836mp_send_ipi(struct pic_softc *, const kcpuset_t *, u_long); +#endif +#endif + + static int bcm2835_icu_match(device_t, cfdata_t, void *); static void bcm2835_icu_attach(device_t, device_t, void *); @@ -70,6 +92,26 @@ struct pic_softc bcm2835_pic = { .pic_name = "bcm2835 pic", }; +#if defined(BCM2836) +static struct pic_ops bcm2836mp_picops = { + .pic_unblock_irqs = bcm2836mp_pic_unblock_irqs, + .pic_block_irqs = bcm2836mp_pic_block_irqs, + .pic_find_pending_irqs = bcm2836mp_pic_find_pending_irqs, + .pic_establish_irq = bcm2836mp_pic_establish_irq, + .pic_source_name = bcm2836mp_pic_source_name, +#ifdef MULTIPROCESSOR + .pic_cpu_init = bcm2836mp_cpu_init, + .pic_ipi_send = bcm2836mp_send_ipi, +#endif +}; + +struct pic_softc bcm2836mp_pic = { + .pic_ops = &bcm2836mp_picops, + .pic_maxsources = BCM2836MP_NIRQ, + .pic_name = "bcm2836 mp pic", +}; +#endif + struct bcm2835icu_softc { device_t sc_dev; bus_space_tag_t sc_iot; @@ -111,6 +153,15 @@ static const char * const bcm2835_source "GPU0 Halted", "GPU1 Halted", "Illegal #1", "Illegal #0" }; +#if defined(BCM2836) +static const char * const bcm2836mp_sources[BCM2836MP_NIRQ] = { + "cntpsirq", "cntpnsir
CVS commit: [netbsd-7] src
Module Name:src Committed By: snj Date: Sat Feb 28 07:59:22 UTC 2015 Modified Files: src/external/zlib/pigz/dist [netbsd-7]: pigz.c src/usr.bin/gzip [netbsd-7]: gzip.1 gzip.c Log Message: Pull up following revision(s) (requested by mrg in ticket #557): external/zlib/pigz/dist/pigz.c: revision 1.2 usr.bin/gzip/gzip.1: revision 1.24 usr.bin/gzip/gzip.c: revision 1.107 merge https://github.com/madler/pigz/commit/fdad1406b3ec809f4954ff7cdf9e99eb18c2458f: When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending paths are put in the gzip header. -- do not use directory paths present in gzip files with the -N flag, similar to the problem reported in pigz. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.1.1.2.2.1 src/external/zlib/pigz/dist/pigz.c cvs rdiff -u -r1.23 -r1.23.4.1 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.105 -r1.105.20.1 src/usr.bin/gzip/gzip.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/zlib/pigz/dist/pigz.c diff -u src/external/zlib/pigz/dist/pigz.c:1.1.1.2 src/external/zlib/pigz/dist/pigz.c:1.1.1.2.2.1 --- src/external/zlib/pigz/dist/pigz.c:1.1.1.2 Sun Jun 15 17:37:21 2014 +++ src/external/zlib/pigz/dist/pigz.c Sat Feb 28 07:59:22 2015 @@ -3502,26 +3502,35 @@ local void process(char *path) " (use -f to force)"); } else { -char *to, *repl; +char *to = g.inf, *sufx = ""; +size_t pre = 0; -/* use header name for output when decompressing with -N */ -to = g.inf; -if (g.decode && (g.headis & 1) != 0 && g.hname != NULL) { -to = g.hname; -len = strlen(g.hname); +/* select parts of the output file name */ +if (g.decode) { +/* for -dN or -dNT, use the path from the input file and the name + from the header, stripping any path in the header name */ +if ((g.headis & 1) != 0 && g.hname != NULL) { +pre = justname(g.inf) - g.inf; +to = justname(g.hname); +len = strlen(to); +} +/* for -d or -dNn, replace abbreviated suffixes */ +else if (strcmp(to + len, ".tgz") == 0) +sufx = ".tar"; } - -/* replace .tgx with .tar when decoding */ -repl = g.decode && strcmp(to + len, ".tgz") ? "" : ".tar"; +else +/* add appropriate suffix when compressing */ +sufx = g.sufx; /* create output file and open to write */ -g.outf = MALLOC(len + (g.decode ? strlen(repl) : strlen(g.sufx)) + 1); +g.outf = MALLOC(pre + len + strlen(sufx) + 1); if (g.outf == NULL) bail("not enough memory", ""); -memcpy(g.outf, to, len); -strcpy(g.outf + len, g.decode ? repl : g.sufx); +memcpy(g.outf, g.inf, pre); +memcpy(g.outf + pre, to, len); +strcpy(g.outf + pre + len, sufx); g.outd = open(g.outf, O_CREAT | O_TRUNC | O_WRONLY | - (g.force ? 0 : O_EXCL), 0600); + (g.force ? 0 : O_EXCL), 0600); /* if exists and not -f, give user a chance to overwrite */ if (g.outd < 0 && errno == EEXIST && isatty(0) && g.verbosity) { Index: src/usr.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.23 src/usr.bin/gzip/gzip.1:1.23.4.1 --- src/usr.bin/gzip/gzip.1:1.23 Tue Mar 18 18:20:45 2014 +++ src/usr.bin/gzip/gzip.1 Sat Feb 28 07:59:22 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.23 2014/03/18 18:20:45 riastradh Exp $ +.\" $NetBSD: gzip.1,v 1.23.4.1 2015/02/28 07:59:22 snj Exp $ .\" .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green .\" All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 18, 2011 +.Dd January 13, 2015 .Dt GZIP 1 .Os .Sh NAME @@ -191,7 +191,7 @@ program for This manual documents .Nx .Nm -version 20040427. +version 20150113. .Sh AUTHORS This implementation of .Nm Index: src/usr.bin/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.105 src/usr.bin/gzip/gzip.c:1.105.20.1 --- src/usr.bin/gzip/gzip.c:1.105 Tue Aug 30 23:06:00 2011 +++ src/usr.bin/gzip/gzip.c Sat Feb 28 07:59:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $ */ +/* $NetBSD: gzip.c,v 1.105.20.1 2015/02/28 07:59:22 snj Exp $ */ /* * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -30,7 +30,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved."); -__RCSID("$Net