CVS commit: src/tests/include/sys
Module Name:src Committed By: martin Date: Fri Feb 27 08:30:30 UTC 2015 Modified Files: src/tests/include/sys: t_socket.c Log Message: 2 seconds is too small as timeout on slow machines, bump to 10 (my hppa needs ~5). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/include/sys/t_socket.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/include/sys/t_socket.c diff -u src/tests/include/sys/t_socket.c:1.3 src/tests/include/sys/t_socket.c:1.4 --- src/tests/include/sys/t_socket.c:1.3 Sat Oct 19 17:45:00 2013 +++ src/tests/include/sys/t_socket.c Fri Feb 27 08:30:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_socket.c,v 1.3 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_socket.c,v 1.4 2015/02/27 08:30:30 martin Exp $ */ #include #include @@ -74,7 +74,7 @@ ATF_TC(cmsg_sendfd); ATF_TC_HEAD(cmsg_sendfd, tc) { atf_tc_set_md_var(tc, "descr", "Checks that fd passing works"); - atf_tc_set_md_var(tc, "timeout", "2"); + atf_tc_set_md_var(tc, "timeout", "10"); } ATF_TC_BODY(cmsg_sendfd, tc)
CVS commit: src/tests/lib/libc/stdlib
Module Name:src Committed By: martin Date: Fri Feb 27 08:55:36 UTC 2015 Modified Files: src/tests/lib/libc/stdlib: t_getenv.c Log Message: Double the timeout for sentev_basic to 600 seconds to make it work on slower machines. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_getenv.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/stdlib/t_getenv.c diff -u src/tests/lib/libc/stdlib/t_getenv.c:1.2 src/tests/lib/libc/stdlib/t_getenv.c:1.3 --- src/tests/lib/libc/stdlib/t_getenv.c:1.2 Fri Jul 15 13:54:31 2011 +++ src/tests/lib/libc/stdlib/t_getenv.c Fri Feb 27 08:55:35 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_getenv.c,v 1.2 2011/07/15 13:54:31 jruoho Exp $ */ +/* $NetBSD: t_getenv.c,v 1.3 2015/02/27 08:55:35 martin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: t_getenv.c,v 1.2 2011/07/15 13:54:31 jruoho Exp $"); +__RCSID("$NetBSD: t_getenv.c,v 1.3 2015/02/27 08:55:35 martin Exp $"); #include #include @@ -120,7 +120,7 @@ ATF_TC_HEAD(setenv_basic, tc) { atf_tc_set_md_var(tc, "descr", "Test setenv(3), getenv(3), unsetenv(3)"); - atf_tc_set_md_var(tc, "timeout", "300"); + atf_tc_set_md_var(tc, "timeout", "600"); } ATF_TC_BODY(setenv_basic, tc)
CVS commit: src/tests/dev/sysmon
Module Name:src Committed By: martin Date: Fri Feb 27 09:16:07 UTC 2015 Modified Files: src/tests/dev/sysmon: t_swsensor.sh Log Message: Double the timeout (to 120s) for slower machines To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/dev/sysmon/t_swsensor.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/sysmon/t_swsensor.sh diff -u src/tests/dev/sysmon/t_swsensor.sh:1.7 src/tests/dev/sysmon/t_swsensor.sh:1.8 --- src/tests/dev/sysmon/t_swsensor.sh:1.7 Sun Apr 14 16:07:46 2013 +++ src/tests/dev/sysmon/t_swsensor.sh Fri Feb 27 09:16:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: t_swsensor.sh,v 1.7 2013/04/14 16:07:46 martin Exp $ +# $NetBSD: t_swsensor.sh,v 1.8 2015/02/27 09:16:07 martin Exp $ get_sensor_info() { rump.envstat -x | \ @@ -60,7 +60,7 @@ start_rump() { common_head() { atf_set descr "$1" - atf_set timeout 60 + atf_set timeout 120 atf_set require.progs rump.powerd rump.envstat rump.modload \ rump.halt rump.sysctl rump_server \ sed grep awk \
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Fri Feb 27 09:23:03 UTC 2015 Modified Files: src/distrib/amd64 [netbsd-7]: Makefile src/distrib/notes/amd64 [netbsd-7]: contents src/distrib/notes/common [netbsd-7]: contents main src/etc/etc.amd64 [netbsd-7]: Makefile.inc Removed Files: src/distrib/amd64/floppies [netbsd-7]: Makefile src/distrib/amd64/floppies/bootfloppy [netbsd-7]: Makefile src/distrib/amd64/floppies/bootfloppy-big [netbsd-7]: Makefile src/distrib/amd64/floppies/bootfloppy-com [netbsd-7]: Makefile src/distrib/amd64/floppies/common [netbsd-7]: Makefile.bootfloppy boot.cfg Log Message: Pull up following revision(s) (requested by snj in ticket #548): etc/etc.amd64/Makefile.inc: revision 1.15 distrib/notes/common/contents: revision 1.171 distrib/amd64/floppies/bootfloppy-com/Makefile: file removal distrib/notes/amd64/contents: revision 1.3 distrib/amd64/floppies/bootfloppy/Makefile: file removal distrib/amd64/floppies/Makefile: file removal distrib/amd64/floppies/common/boot.cfg: file removal distrib/amd64/Makefile: revision 1.9 distrib/notes/common/main: revision 1.515 distrib/amd64/floppies/common/Makefile.bootfloppy: file removal distrib/amd64/floppies/bootfloppy-big/Makefile: file removal Nuke the five(!) install floppies. Welcome to 2015. Approved by dsl@, Master of Port. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.6.1 src/distrib/amd64/Makefile cvs rdiff -u -r1.3 -r0 src/distrib/amd64/floppies/Makefile cvs rdiff -u -r1.5 -r0 src/distrib/amd64/floppies/bootfloppy/Makefile cvs rdiff -u -r1.3 -r0 src/distrib/amd64/floppies/bootfloppy-big/Makefile cvs rdiff -u -r1.6 -r0 src/distrib/amd64/floppies/bootfloppy-com/Makefile cvs rdiff -u -r1.11 -r0 src/distrib/amd64/floppies/common/Makefile.bootfloppy cvs rdiff -u -r1.3 -r0 src/distrib/amd64/floppies/common/boot.cfg cvs rdiff -u -r1.2 -r1.2.12.1 src/distrib/notes/amd64/contents cvs rdiff -u -r1.170 -r1.170.20.1 src/distrib/notes/common/contents cvs rdiff -u -r1.510.4.1 -r1.510.4.2 src/distrib/notes/common/main cvs rdiff -u -r1.14.12.1 -r1.14.12.2 src/etc/etc.amd64/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/Makefile diff -u src/distrib/amd64/Makefile:1.7 src/distrib/amd64/Makefile:1.7.6.1 --- src/distrib/amd64/Makefile:1.7 Mon Jul 15 00:29:49 2013 +++ src/distrib/amd64/Makefile Fri Feb 27 09:23:03 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2013/07/15 00:29:49 khorben Exp $ +# $NetBSD: Makefile,v 1.7.6.1 2015/02/27 09:23:03 martin Exp $ SUBDIR= SUBDIR+= ramdisks @@ -8,7 +8,6 @@ SUBDIR+= kmod SUBDIR+= kmod-cgdroot SUBDIR+= .WAIT SUBDIR+= cdroms -SUBDIR+= floppies SUBDIR+= liveimage SUBDIR+= installimage TARGETS+= release Index: src/distrib/notes/amd64/contents diff -u src/distrib/notes/amd64/contents:1.2 src/distrib/notes/amd64/contents:1.2.12.1 --- src/distrib/notes/amd64/contents:1.2 Fri Aug 17 20:10:53 2012 +++ src/distrib/notes/amd64/contents Fri Feb 27 09:23:03 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: contents,v 1.2 2012/08/17 20:10:53 riz Exp $ +.\" $NetBSD: contents,v 1.2.12.1 2015/02/27 09:23:03 martin Exp $ .\" .\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -75,10 +75,6 @@ see below. . \*M bootable cdrom images; see below. . -. It Pa floppy/ -. -\*M boot and installation floppies; see below. -. . It Pa misc/ . Miscellaneous \*M installation utilities; see Index: src/distrib/notes/common/contents diff -u src/distrib/notes/common/contents:1.170 src/distrib/notes/common/contents:1.170.20.1 --- src/distrib/notes/common/contents:1.170 Tue Feb 14 15:09:02 2012 +++ src/distrib/notes/common/contents Fri Feb 27 09:23:02 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: contents,v 1.170 2012/02/14 15:09:02 jakllsch Exp $ +.\" $NetBSD: contents,v 1.170.20.1 2015/02/27 09:23:02 martin Exp $ .\" .\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -272,7 +272,7 @@ see below. . It Pa bootfs/ Netbootable RAM disk kernel and the file system in the RAM disk; see below. .\} -.if \n[alpha]:\n[amd64]:\n[amiga]:\n[atari]:\n[bebox]:\n[ews4800mips]:\ +.if \n[alpha]:\n[amiga]:\n[atari]:\n[bebox]:\n[ews4800mips]:\ \n[i386]:\n[news68k]:\n[newsmips]:\n[sparc]:\n[x68k]:\n[prep] \{\ . It Pa floppy/ \*M boot and installation floppies; see below. Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.510.4.1 src/distrib/notes/common/main:1.510.4.2 --- src/distrib/notes/common/main:1.510.4.1 Fri Nov 14 14:58:28 2014 +++ src/distrib/notes/common/main Fri Feb 27 09:23:02 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.510.4.1 2014/11/14 14:58:28 martin Exp $ +.\" $NetBSD: main,v 1.510.4.2 2015/02/27 09:23:02 martin Exp $ .\" .\" Copyright (c) 19
CVS commit: [netbsd-7] xsrc/external/mit/font-bh-lucidatypewriter/dist
Module Name:xsrc Committed By: martin Date: Fri Feb 27 09:33:03 UTC 2015 Removed Files: xsrc/external/mit/font-bh-lucidatypewriter/dist [netbsd-7]: AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README aclocal.m4 autogen.sh configure configure.ac install-sh lutBS08.bdf lutBS10.bdf lutBS12.bdf lutBS14.bdf lutBS18.bdf lutBS19.bdf lutBS24.bdf lutRS08.bdf lutRS10.bdf lutRS12.bdf lutRS14.bdf lutRS18.bdf lutRS19.bdf lutRS24.bdf missing mkinstalldirs Log Message: Pull up following revision(s) (requested by snj in ticket #549): external/mit/font-bh-lucidatypewriter/dist/lutBS14.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/autogen.sh: file removal external/mit/font-bh-lucidatypewriter/dist/configure: file removal external/mit/font-bh-lucidatypewriter/dist/COPYING: file removal external/mit/font-bh-lucidatypewriter/dist/AUTHORS: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS18.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/NEWS: file removal external/mit/font-bh-lucidatypewriter/dist/ChangeLog: file removal external/mit/font-bh-lucidatypewriter/dist/Makefile.in: file removal external/mit/font-bh-lucidatypewriter/dist/configure.ac: file removal external/mit/font-bh-lucidatypewriter/dist/lutBS18.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/install-sh: file removal external/mit/font-bh-lucidatypewriter/dist/aclocal.m4: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS24.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/README: file removal external/mit/font-bh-lucidatypewriter/dist/lutBS24.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/Makefile.am: file removal external/mit/font-bh-lucidatypewriter/dist/missing: file removal external/mit/font-bh-lucidatypewriter/dist/INSTALL: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS08.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS10.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutBS10.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS19.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS12.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutBS19.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutBS08.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/mkinstalldirs: file removal external/mit/font-bh-lucidatypewriter/dist/lutBS12.bdf: file removal external/mit/font-bh-lucidatypewriter/dist/lutRS14.bdf: file removal nuke an old and unused copy of font-bh-lucidatypewriter-75dpi-1.0.0. a current version of this font now lives in the font-bh-lucidatypewriter-75dpi directory now. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 \ xsrc/external/mit/font-bh-lucidatypewriter/dist/AUTHORS \ xsrc/external/mit/font-bh-lucidatypewriter/dist/COPYING \ xsrc/external/mit/font-bh-lucidatypewriter/dist/ChangeLog \ xsrc/external/mit/font-bh-lucidatypewriter/dist/INSTALL \ xsrc/external/mit/font-bh-lucidatypewriter/dist/Makefile.am \ xsrc/external/mit/font-bh-lucidatypewriter/dist/Makefile.in \ xsrc/external/mit/font-bh-lucidatypewriter/dist/NEWS \ xsrc/external/mit/font-bh-lucidatypewriter/dist/README \ xsrc/external/mit/font-bh-lucidatypewriter/dist/aclocal.m4 \ xsrc/external/mit/font-bh-lucidatypewriter/dist/autogen.sh \ xsrc/external/mit/font-bh-lucidatypewriter/dist/configure \ xsrc/external/mit/font-bh-lucidatypewriter/dist/configure.ac \ xsrc/external/mit/font-bh-lucidatypewriter/dist/install-sh \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS08.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS10.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS12.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS14.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS18.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS19.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS24.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS08.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS10.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS12.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS14.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS18.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS19.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS24.bdf \ xsrc/external/mit/font-bh-lucidatypewriter/dist/missing \ xsrc/external/mit/font-bh-lucidatypewriter/dist/mkinstalldirs Please note that diffs are not public domain; they are subje
CVS commit: [netbsd-7] xsrc/external/mit/xf86-video-vmware/include
Module Name:xsrc Committed By: martin Date: Fri Feb 27 09:59:03 UTC 2015 Modified Files: xsrc/external/mit/xf86-video-vmware/include [netbsd-7]: config.h Log Message: Pull up following revision(s) (requested by snj in ticket #550): external/mit/xf86-video-vmware/include/config.h: revision 1.11 update for xf86-video-vmware-13.1.0 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.2.1 \ xsrc/external/mit/xf86-video-vmware/include/config.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/xf86-video-vmware/include/config.h diff -u xsrc/external/mit/xf86-video-vmware/include/config.h:1.10 xsrc/external/mit/xf86-video-vmware/include/config.h:1.10.2.1 --- xsrc/external/mit/xf86-video-vmware/include/config.h:1.10 Sat Jul 12 04:46:26 2014 +++ xsrc/external/mit/xf86-video-vmware/include/config.h Fri Feb 27 09:59:03 2015 @@ -74,7 +74,7 @@ #define PACKAGE_NAME "xf86-video-vmware" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "xf86-video-vmware 13.0.2" +#define PACKAGE_STRING "xf86-video-vmware 13.1.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "xf86-video-vmware" @@ -83,22 +83,22 @@ #undef PACKAGE_URL /* Define to the version of this package. */ -#define PACKAGE_VERSION "13.0.2" +#define PACKAGE_VERSION "13.1.0" /* Major version of this package */ #define PACKAGE_VERSION_MAJOR 13 /* Minor version of this package */ -#define PACKAGE_VERSION_MINOR 0 +#define PACKAGE_VERSION_MINOR 1 /* Patch version of this package */ -#define PACKAGE_VERSION_PATCHLEVEL 2 +#define PACKAGE_VERSION_PATCHLEVEL 0 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "13.0.2" +#define VERSION "13.1.0" /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS
CVS commit: [netbsd-7] src/etc/etc.alpha
Module Name:src Committed By: martin Date: Fri Feb 27 10:10:32 UTC 2015 Modified Files: src/etc/etc.alpha [netbsd-7]: Makefile.inc Log Message: Pull up following revision(s) (requested by snj in ticket #551): etc/etc.alpha/Makefile.inc: revision 1.9 don't create an empty installation/misc directory in the release tree. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.58.1 src/etc/etc.alpha/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.alpha/Makefile.inc diff -u src/etc/etc.alpha/Makefile.inc:1.8 src/etc/etc.alpha/Makefile.inc:1.8.58.1 --- src/etc/etc.alpha/Makefile.inc:1.8 Tue Jul 24 10:49:23 2007 +++ src/etc/etc.alpha/Makefile.inc Fri Feb 27 10:10:32 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2007/07/24 10:49:23 pavel Exp $ +# $NetBSD: Makefile.inc,v 1.8.58.1 2015/02/27 10:10:32 martin Exp $ # # etc.alpha/Makefile.inc -- alpha-specific etc Makefile targets # @@ -13,8 +13,7 @@ BUILD_KERNELS+= INSTALL INSTALLATION_DIRS+= installation/floppy \ installation/diskimage \ installation/instkernel \ - installation/netboot \ - installation/misc + installation/netboot snap_md_post: cd ${KERNSRCDIR}/arch/alpha/stand/netboot && ${MAKE} release
CVS commit: [netbsd-7] src/sys/external/bsd/drm2
Module Name:src Committed By: martin Date: Fri Feb 27 11:23:54 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_gem.c intel_i2c.c src/sys/external/bsd/drm2/include/drm [netbsd-7]: drm_wait_netbsd.h Log Message: Pull up following revision(s) (requested by snj in ticket #553): sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.20 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.21 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.22 sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c: revision 1.5 sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c: revision 1.6 sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c: revision 1.7 sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h: revision 1.6 Fix returned timeout in wait_seqno: remaining time, not time slept. - Fix return code of __wait_seqno. - MAX(ret, 0) is 0 if ret is negative, but if ret is negative we want to return that negative value, meaning error. Should've been MIN(ret, 0), but I'll just rewrite it to clarify a wee bit. - If the GPU reset, call i915_gem_check_wedge and always return failure like Linux does. Caller must retry in that case. - Limit scope of ret and omit needless use of it to reduce confusion. - Make gmbus_wait_hw_status consistently use 50ms timeout like Linux. - Another attempt to fix the drm timed wait blarf blugh blahhh. ...and one more fix for __wait_seqno return value. - Also get the sense of the condition to wait until right. To generate a diff of this commit: cvs rdiff -u -r1.14.2.4 -r1.14.2.5 \ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c cvs rdiff -u -r1.4 -r1.4.2.1 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 \ 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/i915/i915_gem.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.14.2.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.14.2.5 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.14.2.4 Tue Dec 30 11:57:49 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Feb 27 11:23:53 2015 @@ -1441,9 +1441,33 @@ __wait_seqno(struct intel_ring_buffer *r if (!irq_test_in_progress) ring->irq_put(ring); - if (timeout) - timespecsub(&after, &before, timeout); - return MAX(ret, 0); /* ignore remaining ticks */ + if (timeout) { + struct timespec slept; + + /* Compute slept = after - before. */ + timespecsub(&after, &before, &slept); + + /* + * Return the time remaining, timeout - slept, if we + * slept for less time than the timeout; or zero if we + * timed out. + */ + if (timespeccmp(&slept, timeout, <)) + timespecsub(timeout, &slept, timeout); + else + timespecclear(timeout); + } + if (wedged) { /* GPU reset while we were waiting. */ + ret = i915_gem_check_wedge(&dev_priv->gpu_error, + interruptible); + if (ret == 0) + ret = -EAGAIN; + } + if (ret < 0) /* Error. */ + return ret; + if (ret == 0) /* Seqno didn't pass. */ + return -ETIME; + return 0; /* Seqno passed, maybe time to spare. */ } #else static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno, 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.4 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.4.2.1 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.4 Wed Jul 16 20:56:25 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Fri Feb 27 11:23:53 2015 @@ -269,9 +269,7 @@ gmbus_wait_hw_status(struct drm_i915_pri #endif int reg_offset = dev_priv->gpio_mmio_base; u32 gmbus2 = 0; -#ifdef __NetBSD__ - int ret; -#else +#ifndef __NetBSD__ DEFINE_WAIT(wait); #endif @@ -291,21 +289,20 @@ gmbus_wait_hw_status(struct drm_i915_pri #ifdef __NetBSD__ spin_lock(&dev_priv->gmbus_wait_lock); if (cold) { - unsigned timo = 1000; - ret = 0; + unsigned timo = 50; + while (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset), !ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status))) { - if (timo-- == 0) { -ret = -ETIMEDOUT; + if (timo-- == 0) break; - } - DELAY(100); + DELAY(1000); } } else { + int ret; DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue, - &dev_priv->gmbus_wait_lock, 1, + &dev_priv->gmbus_wait_lock, mstohz(50), (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset), - !ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status; + ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status; } spin_unlock(&dev_priv->gmbus_wait_lock); #else 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.4.2.1 src/sys/external/bsd/drm2/include/drm/drm_wait_netb
CVS commit: [netbsd-7] src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Fri Feb 27 11:29:44 UTC 2015 Modified Files: src/usr.sbin/sysinst [netbsd-7]: defs.h main.c net.c run.c util.c Log Message: Pull up following revision(s) (requested by snj in ticket #554): usr.sbin/sysinst/defs.h: revision 1.5 usr.sbin/sysinst/main.c: revision 1.6 usr.sbin/sysinst/net.c: revision 1.17 usr.sbin/sysinst/util.c: revision 1.5 usr.sbin/sysinst/run.c: revision 1.3 Don't use asctime(localtime(time_t *)) because this is really ctime(time_t *) and not checking the result of localtime can lead to tears. Add a safectime() that always returns a good string, and add some debugging so that we can see if there is indeed something wrong in the new libc time code. To generate a diff of this commit: cvs rdiff -u -r1.3.4.1 -r1.3.4.2 src/usr.sbin/sysinst/defs.h \ src/usr.sbin/sysinst/main.c cvs rdiff -u -r1.2.4.1 -r1.2.4.2 src/usr.sbin/sysinst/net.c \ src/usr.sbin/sysinst/run.c cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/usr.sbin/sysinst/util.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/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.3.4.1 src/usr.sbin/sysinst/defs.h:1.3.4.2 --- src/usr.sbin/sysinst/defs.h:1.3.4.1 Sun Jan 11 04:32:38 2015 +++ src/usr.sbin/sysinst/defs.h Fri Feb 27 11:29:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.3.4.1 2015/01/11 04:32:38 snj Exp $ */ +/* $NetBSD: defs.h,v 1.3.4.2 2015/02/27 11:29:44 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -550,6 +550,7 @@ void get_tz_default(void); int extract_file(distinfo *, int); void do_coloring (unsigned int, unsigned int); int set_menu_select(menudesc *, void *); +const char *safectime(time_t *); /* from target.c */ #if defined(DEBUG) || defined(DEBUG_ROOT) Index: src/usr.sbin/sysinst/main.c diff -u src/usr.sbin/sysinst/main.c:1.3.4.1 src/usr.sbin/sysinst/main.c:1.3.4.2 --- src/usr.sbin/sysinst/main.c:1.3.4.1 Sat Aug 23 03:44:02 2014 +++ src/usr.sbin/sysinst/main.c Fri Feb 27 11:29:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.3.4.1 2014/08/23 03:44:02 riz Exp $ */ +/* $NetBSD: main.c,v 1.3.4.2 2015/02/27 11:29:44 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -474,14 +474,13 @@ cleanup(void) endwin(); if (logfp) { - fprintf(logfp, "Log ended at: %s\n", asctime(localtime(&tloc))); + fprintf(logfp, "Log ended at: %s\n", safectime(&tloc)); fflush(logfp); fclose(logfp); logfp = NULL; } if (script) { - fprintf(script, "# Script ended at: %s\n", - asctime(localtime(&tloc))); + fprintf(script, "# Script ended at: %s\n", safectime(&tloc)); fflush(script); fclose(script); script = NULL; Index: src/usr.sbin/sysinst/net.c diff -u src/usr.sbin/sysinst/net.c:1.2.4.1 src/usr.sbin/sysinst/net.c:1.2.4.2 --- src/usr.sbin/sysinst/net.c:1.2.4.1 Sat Aug 23 03:44:02 2014 +++ src/usr.sbin/sysinst/net.c Fri Feb 27 11:29:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.2.4.1 2014/08/23 03:44:02 riz Exp $ */ +/* $NetBSD: net.c,v 1.2.4.2 2015/02/27 11:29:44 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -802,9 +802,8 @@ done: } scripting_fprintf(NULL, "cat
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Feb 27 12:01:08 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Tickets #548-#551, #553, #554 To generate a diff of this commit: cvs rdiff -u -r1.1.2.213 -r1.1.2.214 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.213 src/doc/CHANGES-7.0:1.1.2.214 --- src/doc/CHANGES-7.0:1.1.2.213 Fri Feb 27 07:20:18 2015 +++ src/doc/CHANGES-7.0 Fri Feb 27 12:01:08 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.213 2015/02/27 07:20:18 snj Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.214 2015/02/27 12:01:08 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -16104,3 +16104,113 @@ sys/dev/ic/dwc_gmac.c1.32 Fix ring buffer handling when the ring fills completely. [martin, ticket #546] +distrib/amd64/Makefile1.9 +distrib/amd64/floppies/Makefile delete +distrib/amd64/floppies/bootfloppy-big/Makefile delete +distrib/amd64/floppies/bootfloppy-com/Makefile delete +distrib/amd64/floppies/bootfloppy/Makefile delete +distrib/amd64/floppies/common/Makefile.bootfloppy delete +distrib/amd64/floppies/common/boot.cfg delete +distrib/notes/amd64/contents 1.3 +distrib/notes/common/contents 1.171 +distrib/notes/common/main 1.515 +etc/etc.amd64/Makefile.inc 1.15 + + Remove amd64 install floppy images. + [snj, ticket #548] + +external/mit/font-bh-lucidatypewriter/dist/AUTHORS delete +external/mit/font-bh-lucidatypewriter/dist/COPYING delete +external/mit/font-bh-lucidatypewriter/dist/ChangeLog delete +external/mit/font-bh-lucidatypewriter/dist/INSTALL delete +external/mit/font-bh-lucidatypewriter/dist/Makefile.am delete +external/mit/font-bh-lucidatypewriter/dist/Makefile.in delete +external/mit/font-bh-lucidatypewriter/dist/NEWS delete +external/mit/font-bh-lucidatypewriter/dist/README delete +external/mit/font-bh-lucidatypewriter/dist/aclocal.m4 delete +external/mit/font-bh-lucidatypewriter/dist/autogen.sh delete +external/mit/font-bh-lucidatypewriter/dist/configure delete +external/mit/font-bh-lucidatypewriter/dist/configure.ac delete +external/mit/font-bh-lucidatypewriter/dist/install-sh delete +external/mit/font-bh-lucidatypewriter/dist/lutBS08.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutBS10.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutBS12.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutBS14.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutBS18.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutBS19.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutBS24.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS08.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS10.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS12.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS14.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS18.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS19.bdf delete +external/mit/font-bh-lucidatypewriter/dist/lutRS24.bdf delete +external/mit/font-bh-lucidatypewriter/dist/missing delete +external/mit/font-bh-lucidatypewriter/dist/mkinstalldirs delete + + Remove an old and unused copy of font-bh-lucidatypewriter-75dpi-1.0.0. + A current version of this font now lives in the + font-bh-lucidatypewriter-75dpi directory now. + [snj, ticket #549] + +xsrc/external/mit/xf86-video-vmware/dist/ChangeLog up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/INSTALL up to 1.1.1.4 +xsrc/external/mit/xf86-video-vmware/dist/Makefile.in up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/aclocal.m4 up to 1.1.1.8 +xsrc/external/mit/xf86-video-vmware/dist/compile up to 1.1.1.4 +xsrc/external/mit/xf86-video-vmware/dist/configure up to 1.1.1.10 +xsrc/external/mit/xf86-video-vmware/dist/configure.ac up to 1.1.1.10 +xsrc/external/mit/xf86-video-vmware/dist/depcomp up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/install-sh up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/ltmain.sh up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/man/Makefile.in up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/saa/Makefile.in up to 1.1.1.2 +xsrc/external/mit/xf86-video-vmware/dist/saa/saa.c up to 1.1.1.2 +xsrc/external/mit/xf86-video-vmware/dist/saa/saa_unaccel.c up to 1.1.1.2 +xsrc/external/mit/xf86-video-vmware/dist/src/Makefile.in up to 1.1.1.7 +xsrc/external/mit/xf86-video-vmware/dist/src/vmware.c up to 1.1.1.8 +xsrc/external/mit/xf86-video-vmware/dist/src/vmware_bootstrap.c up to 1.1.1.3 +xsrc/external/mit/xf86-video-vmware/dist/src/vmwarevideo.c up to 1.1.1.5 +xsrc/external/mit/xf86-video-vmware/dist/vmwarectrl/Makefile.in up to 1.1.1.3 +xsrc/external/mit/xf86-video-vmware/dist/vmwgfx/Makefile.in up to 1.1.1.3 +xsrc/external/mit/xf86-video-v
CVS commit: src/tests/net/mcast
Module Name:src Committed By: martin Date: Fri Feb 27 13:15:49 UTC 2015 Modified Files: src/tests/net/mcast: t_mcast.c Log Message: Bump timeout for a poll() call slightly, so the test has a chance to work on slow machines. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/net/mcast/t_mcast.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/net/mcast/t_mcast.c diff -u src/tests/net/mcast/t_mcast.c:1.10 src/tests/net/mcast/t_mcast.c:1.11 --- src/tests/net/mcast/t_mcast.c:1.10 Mon Oct 27 21:28:58 2014 +++ src/tests/net/mcast/t_mcast.c Fri Feb 27 13:15:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mcast.c,v 1.10 2014/10/27 21:28:58 christos Exp $ */ +/* $NetBSD: t_mcast.c,v 1.11 2015/02/27 13:15:49 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include #ifdef __RCSID -__RCSID("$NetBSD: t_mcast.c,v 1.10 2014/10/27 21:28:58 christos Exp $"); +__RCSID("$NetBSD: t_mcast.c,v 1.11 2015/02/27 13:15:49 martin Exp $"); #else extern const char *__progname; #define getprogname() __progname @@ -275,7 +275,7 @@ receiver(const char *host, const char *p pfd.fd = s; pfd.events = POLLIN; for (seq = 0; seq < n; seq++) { - if (poll(&pfd, 1, 1000) == -1) + if (poll(&pfd, 1, 1) == -1) ERRX(EXIT_FAILURE, "poll (%s)", strerror(errno)); l = conn ? recv(s, &msg, sizeof(msg), 0) : recvfrom(s, &msg, sizeof(msg), 0, (void *)&ss, &slen);
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Fri Feb 27 13:18:11 UTC 2015 Added Files: src/sys/arch/evbarm/conf: OVERO_INSTALL Log Message: Add OVERO_INSTALL. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/OVERO_INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbarm/conf/OVERO_INSTALL diff -u /dev/null src/sys/arch/evbarm/conf/OVERO_INSTALL:1.1 --- /dev/null Fri Feb 27 13:18:11 2015 +++ src/sys/arch/evbarm/conf/OVERO_INSTALL Fri Feb 27 13:18:11 2015 @@ -0,0 +1,10 @@ +# $NetBSD: OVERO_INSTALL,v 1.1 2015/02/27 13:18:11 kiyohara Exp $ +# +# OVERO_INSTALL -- OVERO kernel with installation-sized ramdisk +# + +include "arch/evbarm/conf/OVERO" +include "arch/evbarm/conf/INSTALL" + +options BOOTHOWTO=RB_SINGLE +no makeoptions DEBUG
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: macallan Date: Fri Feb 27 14:44:16 UTC 2015 Modified Files: src/sys/arch/mips/mips: bus_space_alignstride_chipdep.c Log Message: on o32 kernels with MIPS3 use mips3_sd() and mips3_ld() in *read*_8() and *write*_8() methods needed by sgimips, some O2 registers can only be properly written in 64bit chunks To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 \ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.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/mips/mips/bus_space_alignstride_chipdep.c diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.22 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.23 --- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.22 Fri Feb 13 14:11:12 2015 +++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c Fri Feb 27 14:44:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.22 2015/02/13 14:11:12 macallan Exp $ */ +/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.23 2015/02/27 14:44:16 macallan Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.22 2015/02/13 14:11:12 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.23 2015/02/27 14:44:16 macallan Exp $"); #ifdef CHIP_EXTENT #include @@ -97,6 +97,10 @@ __KERNEL_RCSID(0, "$NetBSD: bus_space_al #include +#if defined(__mips_o32) && defined(MIPS3) +#define NEED_64BIT_ASM +#endif + #define __C(A,B) __CONCAT(A,B) #define __S(S) __STRING(S) @@ -737,7 +741,11 @@ __BS(read_8)(void *v, bus_space_handle_t h += CHIP_OFF64(off); shift = (h & (CHIP_ACCESS_SIZE - 1)) * 8; ptr = (void *)(h & ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1))); +#ifdef NEED_64BIT_ASM + r = CHIP_SWAP64(mips3_ld(ptr) >> shift); +#else r = CHIP_SWAP64(*ptr >> shift); +#endif return r; } @@ -843,7 +851,11 @@ __BS(write_8)(void *v, bus_space_handle_ h += CHIP_OFF64(off); shift = (h & (CHIP_ACCESS_SIZE - 1)) * 8; ptr = (void *)(h & ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1))); +#ifdef NEED_64BIT_ASM + mips3_sd(ptr, CHIP_SWAP64(val) << shift); +#else *ptr = CHIP_SWAP64(val) << shift; +#endif } #define CHIP_write_multi_N(BYTES,TYPE) \ @@ -983,7 +995,11 @@ __BS(read_stream_8)(void *v, bus_space_h volatile uint64_t *ptr; ptr = (void *)(intptr_t)(h + CHIP_OFF64(off)); +#ifdef NEED_64BIT_ASM + return mips3_ld(ptr); +#else return *ptr; +#endif } #define CHIP_read_multi_stream_N(BYTES,TYPE)\ @@ -1068,7 +1084,11 @@ __BS(write_stream_8)(void *v, bus_space_ volatile uint64_t *ptr; ptr = (void *)(intptr_t)(h + CHIP_OFF64(off)); +#ifdef NEED_64BIT_ASM + mips3_sd(ptr, val); +#else *ptr = val; +#endif } #define CHIP_write_multi_stream_N(BYTES,TYPE)\
CVS commit: src/share/man/man2
Module Name:src Committed By: riastradh Date: Fri Feb 27 15:21:54 UTC 2015 Modified Files: src/share/man/man2: siginfo.2 Log Message: Fix some typos and make style more consistent. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man2/siginfo.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man2/siginfo.2 diff -u src/share/man/man2/siginfo.2:1.6 src/share/man/man2/siginfo.2:1.7 --- src/share/man/man2/siginfo.2:1.6 Mon Apr 23 17:44:39 2012 +++ src/share/man/man2/siginfo.2 Fri Feb 27 15:21:54 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: siginfo.2,v 1.6 2012/04/23 17:44:39 jym Exp $ +.\" $NetBSD: siginfo.2,v 1.7 2015/02/27 15:21:54 riastradh Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -179,15 +179,15 @@ Integer divide by zero .It FPE_INTOVF Integer overflow .It FPE_FLTDIV -Floating point divide by zero +Floating-point divide by zero .It FPE_FLTOVF -Floating point overflow +Floating-point overflow .It FPE_FLTUND -Floating point underflow +Floating-point underflow .It FPE_FLTRES -Floating point inexact result +Floating-point inexact result .It FPE_FLTINV -Invalid Floating point operation +Invalid floating-point operation .It FPE_FLTSUB Subscript out of range .El @@ -203,9 +203,9 @@ Invalid permissions for mapped object .It BUS_ADRALN Invalid address alignment .It BUS_ADRERR -Non-existant physical address +Nonexistent physical address .It BUS_OBJERR -Object specific hardware error +Object-specific hardware error .El .It SIGTRAP .Bl -tag -width TRAP_BRKPT @@ -238,7 +238,7 @@ Output buffers available .It POLL_MSG Input message available .It POLL_ERR -I/O Error +I/O error .It POLL_PRI High priority input available .It POLL_HUP
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: christos Date: Fri Feb 27 15:35:10 UTC 2015 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: 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.79 -r1.80 src/sys/arch/amd64/amd64/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/amd64/amd64/trap.c diff -u src/sys/arch/amd64/amd64/trap.c:1.79 src/sys/arch/amd64/amd64/trap.c:1.80 --- src/sys/arch/amd64/amd64/trap.c:1.79 Sat Oct 18 04:33:24 2014 +++ src/sys/arch/amd64/amd64/trap.c Fri Feb 27 10:35:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.79 2014/10/18 08:33:24 snj Exp $ */ +/* $NetBSD: trap.c,v 1.80 2015/02/27 15:35:10 christos Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.79 2014/10/18 08:33:24 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.80 2015/02/27 15:35:10 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -608,15 +608,6 @@ faultcommon: } goto out; } - KSI_INIT_TRAP(&ksi); - ksi.ksi_trap = type & ~T_USER; - ksi.ksi_addr = (void *)cr2; - if (error == EACCES) { - ksi.ksi_code = SEGV_ACCERR; - error = EFAULT; - } else { - ksi.ksi_code = SEGV_MAPERR; - } if (type == T_PAGEFLT) { onfault = onfault_handler(pcb, frame); @@ -626,20 +617,38 @@ faultcommon: map, va, ftype, error); goto kernelfault; } - if (error == ENOMEM) { + + KSI_INIT_TRAP(&ksi); + ksi.ksi_trap = type & ~T_USER; + ksi.ksi_addr = (void *)cr2; + switch (error) { + case EINVAL: + ksi.ksi_signo = SIGBUS; + ksi.ksi_code = BUS_ADRERR; + break; + case EACCES: + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_ACCERR; + error = EFAULT; + break; + case ENOMEM: ksi.ksi_signo = SIGKILL; - printf("UVM: pid %d.%d (%s), uid %d killed: out of swap\n", - p->p_pid, l->l_lid, p->p_comm, - l->l_cred ? - kauth_cred_geteuid(l->l_cred) : -1); - } else { -#ifdef TRAP_SIGDEBUG - printf("pid %d.%d (%s): SEGV at rip %lx addr %lx\n", - p->p_pid, l->l_lid, p->p_comm, frame->tf_rip, va); - frame_dump(frame); -#endif + printf("UVM: pid %d.%d (%s), uid %d killed: " + "out of swap\n", p->p_pid, l->l_lid, p->p_comm, + l->l_cred ? kauth_cred_geteuid(l->l_cred) : -1); + break; + default: ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_MAPERR; + break; } + +#ifdef TRAP_SIGDEBUG + printf("pid %d.%d (%s): signal %d at rip %lx addr %lx " + "error %d\n", p->p_pid, l->l_lid, p->p_comm, ksi.ksi_signo, + frame->tf_rip, va, error); + frame_dump(frame); +#endif (*p->p_emul->e_trapsignal)(l, &ksi); break; }
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: nonaka Date: Fri Feb 27 15:53:09 UTC 2015 Modified Files: src/sys/dev/sdmmc: sdhc.c Log Message: eSDHC has no DMA_BOUNDARY in BLOCK_SIZE register. So clear multi segment DMA transfer support bit. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c diff -u src/sys/dev/sdmmc/sdhc.c:1.53 src/sys/dev/sdmmc/sdhc.c:1.54 --- src/sys/dev/sdmmc/sdhc.c:1.53 Fri Feb 27 01:52:15 2015 +++ src/sys/dev/sdmmc/sdhc.c Fri Feb 27 15:53:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.53 2015/02/27 01:52:15 nonaka Exp $ */ +/* $NetBSD: sdhc.c,v 1.54 2015/02/27 15:53:09 nonaka Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.53 2015/02/27 01:52:15 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.54 2015/02/27 15:53:09 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -425,7 +425,9 @@ sdhc_host_found(struct sdhc_softc *sc, b if (ISSET(caps, SDHC_HIGH_SPEED_SUPP)) saa.saa_caps |= SMC_CAPS_SD_HIGHSPEED; if (ISSET(hp->flags, SHF_USE_DMA)) { - saa.saa_caps |= SMC_CAPS_DMA | SMC_CAPS_MULTI_SEG_DMA; + saa.saa_caps |= SMC_CAPS_DMA; + if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) + saa.saa_caps |= SMC_CAPS_MULTI_SEG_DMA; } if (ISSET(sc->sc_flags, SDHC_FLAG_SINGLE_ONLY)) saa.saa_caps |= SMC_CAPS_SINGLE_ONLY;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Fri Feb 27 16:02:04 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_gem_execbuffer.c Log Message: Fix typo: __gtt_iomem, not __acpi_iomem. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.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/i915_gem_execbuffer.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c:1.4 Wed Jul 16 20:56:24 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c Fri Feb 27 16:02:03 2015 @@ -272,7 +272,7 @@ static inline int use_cpu_reloc(struct d # define __iomem __gtt_iomem static inline void -iowrite32(uint32_t value, uint32_t __acpi_iomem *ptr) +iowrite32(uint32_t value, uint32_t __gtt_iomem *ptr) { __insn_barrier();
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: nonaka Date: Fri Feb 27 16:08:17 UTC 2015 Modified Files: src/sys/dev/sdmmc: sdmmc.c sdmmc_mem.c sdmmcvar.h Log Message: fix to simulate multi-segment dma transfer for pq3sdhc(4). To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sdmmc/sdmmc.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/sdmmc/sdmmc_mem.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc/sdmmc.c diff -u src/sys/dev/sdmmc/sdmmc.c:1.23 src/sys/dev/sdmmc/sdmmc.c:1.24 --- src/sys/dev/sdmmc/sdmmc.c:1.23 Sun Nov 16 16:20:01 2014 +++ src/sys/dev/sdmmc/sdmmc.c Fri Feb 27 16:08:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc.c,v 1.23 2014/11/16 16:20:01 ozaki-r Exp $ */ +/* $NetBSD: sdmmc.c,v 1.24 2015/02/27 16:08:17 nonaka Exp $ */ /* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */ /* @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.23 2014/11/16 16:20:01 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.24 2015/02/27 16:08:17 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -626,25 +626,31 @@ sdmmc_function_alloc(struct sdmmc_softc bus_dma_segment_t ds; int rseg, error; - error = bus_dmamap_create(sc->sc_dmat, SDMMC_SECTOR_SIZE, 1, - SDMMC_SECTOR_SIZE, 0, BUS_DMA_WAITOK, &sf->bbuf_dmap); + error = bus_dmamap_create(sc->sc_dmat, MAXPHYS, 1, + MAXPHYS, 0, BUS_DMA_WAITOK, &sf->bbuf_dmap); if (error) goto fail1; - error = bus_dmamem_alloc(sc->sc_dmat, SDMMC_SECTOR_SIZE, + error = bus_dmamem_alloc(sc->sc_dmat, MAXPHYS, PAGE_SIZE, 0, &ds, 1, &rseg, BUS_DMA_WAITOK); if (error) goto fail2; - error = bus_dmamem_map(sc->sc_dmat, &ds, 1, SDMMC_SECTOR_SIZE, + error = bus_dmamem_map(sc->sc_dmat, &ds, 1, MAXPHYS, &sf->bbuf, BUS_DMA_WAITOK); if (error) goto fail3; error = bus_dmamap_load(sc->sc_dmat, sf->bbuf_dmap, - sf->bbuf, SDMMC_SECTOR_SIZE, NULL, + sf->bbuf, MAXPHYS, NULL, BUS_DMA_WAITOK|BUS_DMA_READ|BUS_DMA_WRITE); + if (error) + goto fail4; + error = bus_dmamap_create(sc->sc_dmat, MAXPHYS, 1, + MAXPHYS, 0, BUS_DMA_WAITOK, &sf->sseg_dmap); if (!error) goto out; - bus_dmamem_unmap(sc->sc_dmat, sf->bbuf, SDMMC_SECTOR_SIZE); + bus_dmamap_unload(sc->sc_dmat, sf->bbuf_dmap); +fail4: + bus_dmamem_unmap(sc->sc_dmat, sf->bbuf, MAXPHYS); fail3: bus_dmamem_free(sc->sc_dmat, &ds, 1); fail2: @@ -666,8 +672,9 @@ sdmmc_function_free(struct sdmmc_functio if (ISSET(sc->sc_flags, SMF_MEM_MODE) && ISSET(sc->sc_caps, SMC_CAPS_DMA) && !ISSET(sc->sc_caps, SMC_CAPS_MULTI_SEG_DMA)) { + bus_dmamap_destroy(sc->sc_dmat, sf->sseg_dmap); bus_dmamap_unload(sc->sc_dmat, sf->bbuf_dmap); - bus_dmamem_unmap(sc->sc_dmat, sf->bbuf, SDMMC_SECTOR_SIZE); + bus_dmamem_unmap(sc->sc_dmat, sf->bbuf, MAXPHYS); bus_dmamem_free(sc->sc_dmat, sf->bbuf_dmap->dm_segs, sf->bbuf_dmap->dm_nsegs); bus_dmamap_destroy(sc->sc_dmat, sf->bbuf_dmap); Index: src/sys/dev/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.33 src/sys/dev/sdmmc/sdmmc_mem.c:1.34 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.33 Sat Feb 7 04:13:26 2015 +++ src/sys/dev/sdmmc/sdmmc_mem.c Fri Feb 27 16:08:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.33 2015/02/07 04:13:26 christos Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.34 2015/02/27 16:08:17 nonaka Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -45,7 +45,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.33 2015/02/07 04:13:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.34 2015/02/27 16:08:17 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -87,10 +87,14 @@ static int sdmmc_mem_single_read_block(s u_char *, size_t); static int sdmmc_mem_single_write_block(struct sdmmc_function *, uint32_t, u_char *, size_t); -static int sdmmc_mem_read_block_subr(struct sdmmc_function *, uint32_t, -u_char *, size_t); -static int sdmmc_mem_write_block_subr(struct sdmmc_function *, uint32_t, -u_char *, size_t); +static int sdmmc_mem_single_segment_dma_read_block(struct sdmmc_function *, +uint32_t, u_char *, size_t); +static int sdmmc_mem_single_segment_dma_write_block(struct sdmmc_function *, +uint32_t, u_char *, size_t); +static int sdmmc_mem_read_block_subr(struct sdmmc_function *, bus_dmamap_t, +uint32_t, u_char *, size_t); +static int sdmmc_mem_write_block_subr(struct sdmmc_function *, bus_dmamap_t, +uint32_t, u_char *, size_t); /* * Initialize SD/MMC memory cards and memory in SDIO "combo" cards. @@ -1251,7 +1255,7 @@ static int sdmmc_mem_single_read_block(struct sdmmc_function *sf, uint32_t blkno, u_char *data, size_t datalen) { - struct sdmmc_softc *sc __diagused = sf->sc; + struct sdmmc_softc *sc =
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Fri Feb 27 16:09:19 UTC 2015 Modified Files: src/tests/lib/libc/sys: t_mmap.c Log Message: add truncate causing signal test To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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.7 src/tests/lib/libc/sys/t_mmap.c:1.8 --- src/tests/lib/libc/sys/t_mmap.c:1.7 Thu Jun 14 13:47:58 2012 +++ src/tests/lib/libc/sys/t_mmap.c Fri Feb 27 11:09:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.7 2012/06/14 17:47:58 bouyer Exp $ */ +/* $NetBSD: t_mmap.c,v 1.8 2015/02/27 16:09:19 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.7 2012/06/14 17:47:58 bouyer Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.8 2015/02/27 16:09:19 christos Exp $"); #include #include @@ -451,6 +451,60 @@ ATF_TC_CLEANUP(mmap_truncate, tc) (void)unlink(path); } +ATF_TC_WITH_CLEANUP(mmap_truncate_signal); +ATF_TC_HEAD(mmap_truncate_signal, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test mmap(2) ftruncate(2) causing signal"); +} + +ATF_TC_BODY(mmap_truncate_signal, tc) +{ + char *map; + long i; + int fd, sta; + pid_t pid; + + fd = open(path, O_RDWR | O_CREAT, 0700); + + if (fd < 0) + return; + + ATF_REQUIRE(write(fd, "foo\n", 5) == 5); + + map = mmap(NULL, page, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, 0); + ATF_REQUIRE(map != MAP_FAILED); + + sta = 0; + for (i = 0; i < 5; i++) + sta += map[i]; + ATF_REQUIRE(sta == 334); + + ATF_REQUIRE(ftruncate(fd, 0) == 0); + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + ATF_REQUIRE(signal(SIGBUS, map_sighandler) != SIG_ERR); + sta = 0; + for (i = 0; i < page; i++) + sta += map[i]; + ATF_REQUIRE(i == 0); + } + + (void)wait(&sta); + + ATF_REQUIRE(WIFEXITED(sta) != 0); + ATF_REQUIRE(WEXITSTATUS(sta) == SIGBUS); + ATF_REQUIRE(munmap(map, page) == 0); + ATF_REQUIRE(close(fd) == 0); +} + +ATF_TC_CLEANUP(mmap_truncate_signal, tc) +{ + (void)unlink(path); +} + ATF_TC(mmap_va0); ATF_TC_HEAD(mmap_va0, tc) { @@ -499,6 +553,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, mmap_prot_2); ATF_TP_ADD_TC(tp, mmap_prot_3); ATF_TP_ADD_TC(tp, mmap_truncate); + ATF_TP_ADD_TC(tp, mmap_truncate_signal); ATF_TP_ADD_TC(tp, mmap_va0); return atf_no_error();
CVS commit: src/sys/arch/powerpc/booke/dev
Module Name:src Committed By: nonaka Date: Fri Feb 27 16:09:06 UTC 2015 Modified Files: src/sys/arch/powerpc/booke/dev: pq3sdhc.c Log Message: Enable DMA transfer. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/dev/pq3sdhc.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/powerpc/booke/dev/pq3sdhc.c diff -u src/sys/arch/powerpc/booke/dev/pq3sdhc.c:1.5 src/sys/arch/powerpc/booke/dev/pq3sdhc.c:1.6 --- src/sys/arch/powerpc/booke/dev/pq3sdhc.c:1.5 Thu Jul 26 18:38:10 2012 +++ src/sys/arch/powerpc/booke/dev/pq3sdhc.c Fri Feb 27 16:09:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3sdhc.c,v 1.5 2012/07/26 18:38:10 matt Exp $ */ +/* $NetBSD: pq3sdhc.c,v 1.6 2015/02/27 16:09:05 nonaka Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,7 +31,7 @@ #define ESDHC_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: pq3sdhc.c,v 1.5 2012/07/26 18:38:10 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3sdhc.c,v 1.6 2015/02/27 16:09:05 nonaka Exp $"); #include #include @@ -87,7 +87,7 @@ pq3sdhc_attach(device_t parent, device_t psc->sc_children |= cna->cna_childmask; sc->sc.sc_dmat = cna->cna_dmat; sc->sc.sc_dev = self; - //sc->sc.sc_flags |= SDHC_FLAG_USE_DMA; + sc->sc.sc_flags |= SDHC_FLAG_USE_DMA; sc->sc.sc_flags |= SDHC_FLAG_HAVE_DVS | SDHC_FLAG_32BIT_ACCESS | SDHC_FLAG_ENHANCED; sc->sc.sc_host = sc->sc_hosts;
CVS commit: src/lib/libc/sys
Module Name:src Committed By: christos Date: Fri Feb 27 16:18:00 UTC 2015 Modified Files: src/lib/libc/sys: mmap.2 Log Message: Document SIGBUS per ToG. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/lib/libc/sys/mmap.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/mmap.2 diff -u src/lib/libc/sys/mmap.2:1.47 src/lib/libc/sys/mmap.2:1.48 --- src/lib/libc/sys/mmap.2:1.47 Thu Jan 5 10:19:52 2012 +++ src/lib/libc/sys/mmap.2 Fri Feb 27 11:18:00 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: mmap.2,v 1.47 2012/01/05 15:19:52 reinoud Exp $ +.\" $NetBSD: mmap.2,v 1.48 2015/02/27 16:18:00 christos Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" -.Dd December 20, 2011 +.Dd February 27, 2015 .Dt MMAP 2 .Os .Sh NAME @@ -138,6 +138,14 @@ regions, and must be specified as \-1. The mapped memory will be zero filled. .It Dv MAP_FILE Mapped from a regular file or character-special device memory. +Read accesses beyond the end of of the file or device but less +than the current page size will be zero-filled. +Write accesses beyond the end of the file or device but less +than the current page size will not affect the file or device. +References beyond the end of file that are beyond the current +page size will result in the delivery of +.Dv SIGBUS +signal. .It Dv MAP_FIXED Do not permit the system to select a different address than the one specified.
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: christos Date: Fri Feb 27 16:41:12 UTC 2015 Modified Files: src/sys/arch/i386/i386: trap.c Log Message: sync with amd64: SIGBUS for mmap out of range. To generate a diff of this commit: cvs rdiff -u -r1.273 -r1.274 src/sys/arch/i386/i386/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/i386/i386/trap.c diff -u src/sys/arch/i386/i386/trap.c:1.273 src/sys/arch/i386/i386/trap.c:1.274 --- src/sys/arch/i386/i386/trap.c:1.273 Sat Oct 18 04:33:25 2014 +++ src/sys/arch/i386/i386/trap.c Fri Feb 27 11:41:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.273 2014/10/18 08:33:25 snj Exp $ */ +/* $NetBSD: trap.c,v 1.274 2015/02/27 16:41:12 christos Exp $ */ /*- * Copyright (c) 1998, 2000, 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.273 2014/10/18 08:33:25 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.274 2015/02/27 16:41:12 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -653,15 +653,6 @@ faultcommon: } goto out; } - KSI_INIT_TRAP(&ksi); - ksi.ksi_trap = type & ~T_USER; - ksi.ksi_addr = (void *)cr2; - if (error == EACCES) { - ksi.ksi_code = SEGV_ACCERR; - error = EFAULT; - } else { - ksi.ksi_code = SEGV_MAPERR; - } if (type == T_PAGEFLT) { onfault = onfault_handler(pcb, frame); @@ -671,15 +662,38 @@ faultcommon: map, va, ftype, error); goto kernelfault; } - if (error == ENOMEM) { + + KSI_INIT_TRAP(&ksi); + ksi.ksi_trap = type & ~T_USER; + ksi.ksi_addr = (void *)cr2; + switch (error) { + case EINVAL: + ksi.ksi_signo = SIGBUS; + ksi.ksi_code = BUS_ADRERR; + break; + case EACCES: + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_ACCERR; + error = EFAULT; + break; + case ENOMEM: ksi.ksi_signo = SIGKILL; - 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); - } else { + printf("UVM: pid %d.%d (%s), uid %d killed: " + "out of swap\n", p->p_pid, l->l_lid, p->p_comm, + l->l_cred ? kauth_cred_geteuid(l->l_cred) : -1); + break; + default: ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_MAPERR; + break; } + +#ifdef TRAP_SIGDEBUG + printf("pid %d.%d (%s): signal %d at rip %lx addr %lx " + "error %d\n", p->p_pid, l->l_lid, p->p_comm, ksi.ksi_signo, + frame->tf_rip, va, error); + frame_dump(frame); +#endif (*p->p_emul->e_trapsignal)(l, &ksi); break; }
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Fri Feb 27 17:33:31 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: std.amlogic Log Message: no need to override ARM_CBAR, remove unused COM_16750 option To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/std.amlogic 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/std.amlogic diff -u src/sys/arch/evbarm/conf/std.amlogic:1.1 src/sys/arch/evbarm/conf/std.amlogic:1.2 --- src/sys/arch/evbarm/conf/std.amlogic:1.1 Sat Feb 7 17:20:16 2015 +++ src/sys/arch/evbarm/conf/std.amlogic Fri Feb 27 17:33:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: std.amlogic,v 1.1 2015/02/07 17:20:16 jmcneill Exp $ +# $NetBSD: std.amlogic,v 1.2 2015/02/27 17:33:31 jmcneill Exp $ # machine evbarm arm @@ -16,7 +16,6 @@ options __HAVE_MM_MD_DIRECT_MAPPED_PHYS options TPIDRPRW_IS_CURCPU options KERNEL_BASE_EXT=0x8000 options FPU_VFP -options ARM_CBAR=0xc430 makeoptions KERNEL_BASE_PHYS="0x0010" makeoptions KERNEL_BASE_VIRT="0x8010" @@ -25,5 +24,3 @@ makeoptions BOARDMKFRAG="${THISARM}/conf options ARM_INTR_IMPL="" options ARM_GENERIC_TODR - -options COM_16750
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Fri Feb 27 17:35:08 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_com.c amlogic_comreg.h files.amlogic src/sys/arch/evbarm/amlogic: amlogic_machdep.c src/sys/arch/evbarm/conf: ODROID-C1 Added Files: src/sys/arch/arm/amlogic: amlogic_comvar.h Log Message: Add basic serial console support. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_com.c \ src/sys/arch/arm/amlogic/amlogic_comreg.h \ src/sys/arch/arm/amlogic/files.amlogic cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_comvar.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/amlogic/amlogic_machdep.c cvs rdiff -u -r1.1 -r1.2 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/arm/amlogic/amlogic_com.c diff -u src/sys/arch/arm/amlogic/amlogic_com.c:1.1 src/sys/arch/arm/amlogic/amlogic_com.c:1.2 --- src/sys/arch/arm/amlogic/amlogic_com.c:1.1 Sat Feb 7 17:20:17 2015 +++ src/sys/arch/arm/amlogic/amlogic_com.c Fri Feb 27 17:35:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_com.c,v 1.1 2015/02/07 17:20:17 jmcneill Exp $ */ +/* $NetBSD: amlogic_com.c,v 1.2 2015/02/27 17:35:08 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: amlogic_com.c,v 1.1 2015/02/07 17:20:17 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: amlogic_com.c,v 1.2 2015/02/27 17:35:08 jmcneill Exp $"); #include #include @@ -43,79 +43,142 @@ __KERNEL_RCSID(1, "$NetBSD: amlogic_com. #include #include +#include + #include #include - -#include +#include +#include static int amlogic_com_match(device_t, cfdata_t, void *); static void amlogic_com_attach(device_t, device_t, void *); struct amlogic_com_softc { - struct com_softc asc_sc; - void *asc_ih; + device_t sc_dev; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + + int sc_ospeed; + tcflag_t sc_cflag; +}; + +static struct amlogic_com_softc amlogic_com_cnsc; + +static struct cnm_state amlogic_com_cnm_state; + +static int amlogic_com_cngetc(dev_t); +static void amlogic_com_cnputc(dev_t, int); +static void amlogic_com_cnpollc(dev_t, int); + +struct consdev amlogic_com_consdev = { + .cn_getc = amlogic_com_cngetc, + .cn_putc = amlogic_com_cnputc, + .cn_pollc = amlogic_com_cnpollc, }; CFATTACH_DECL_NEW(amlogic_com, sizeof(struct amlogic_com_softc), amlogic_com_match, amlogic_com_attach, NULL, NULL); -static int amlogic_com_ports; - static int amlogic_com_match(device_t parent, cfdata_t cf, void *aux) { + return 1; +} + +static void +amlogic_com_attach(device_t parent, device_t self, void *aux) +{ + struct amlogic_com_softc * const sc = device_private(self); struct amlogicio_attach_args * const aio = aux; const struct amlogic_locators * const loc = &aio->aio_loc; - bus_space_tag_t iot = aio->aio_core_a4x_bst; - bus_space_handle_t bsh; + const bus_addr_t iobase = AMLOGIC_CORE_BASE + loc->loc_offset; - KASSERT(!strcmp(cf->cf_name, loc->loc_name)); - KASSERT((amlogic_com_ports & __BIT(loc->loc_port)) == 0); - KASSERT(cf->cf_loc[AMLOGICIOCF_PORT] == AMLOGICIOCF_PORT_DEFAULT - || cf->cf_loc[AMLOGICIOCF_PORT] == loc->loc_port); + sc->sc_dev = self; + sc->sc_bst = aio->aio_core_bst; + sc->sc_bsh = aio->aio_bsh; - if (com_is_console(iot, AMLOGIC_CORE_BASE + loc->loc_offset, NULL)) - return 1; + aprint_naive("\n"); + if (amlogic_com_is_console(iobase)) { + aprint_normal(": (console)\n"); + } else { + aprint_normal("\n"); + } +} - bus_space_subregion(iot, aio->aio_bsh, - loc->loc_offset, loc->loc_size, &bsh); +static int +amlogic_com_cngetc(dev_t dev) +{ + bus_space_tag_t bst = amlogic_com_cnsc.sc_bst; + bus_space_handle_t bsh = amlogic_com_cnsc.sc_bsh; + uint32_t status; + int s, c; + + s = splserial(); + + status = bus_space_read_4(bst, bsh, UART_STATUS_REG); + if (status & UART_STATUS_RX_EMPTY) { + splx(s); + return -1; + } - const int rv = comprobe1(iot, bsh); + c = bus_space_read_4(bst, bsh, UART_RFIFO_REG); +#if defined(DDB) + extern int db_active; + if (!db_active) +#endif + { + int cn_trapped __unused = 0; + cn_check_magic(dev, c, amlogic_com_cnm_state); + } + + splx(s); - return rv; + return c & 0xff; } static void -amlogic_com_attach(device_t parent, device_t self, void *aux) +amlogic_com_cnputc(dev_t dev, int c) { - struct amlogic_com_softc * const asc = device_private(self); - struct com_softc * const sc = &asc->asc_sc; - struct amlogicio_attach_args * const aio = aux; - const struct amlogic_locators * const loc = &aio->aio_loc; - bus_space_tag_t iot = aio->aio_core_a4x_bst; - const bus_addr_t iobase = AMLOGIC_CORE_BASE + loc->loc_offset; - bus_space_handle_t ioh; + bus_space_tag_t bst = amlogic_com_cnsc.sc_bst; + bus_space_handle_t bsh = amlogic_com_cnsc.sc_bsh; + int s; - amlogic_com_ports |=
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: christos Date: Fri Feb 27 17:45:52 UTC 2015 Modified Files: src/sys/arch/i386/i386: trap.c Log Message: fix TRAP_SIGDEBUG compilation To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/sys/arch/i386/i386/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/i386/i386/trap.c diff -u src/sys/arch/i386/i386/trap.c:1.274 src/sys/arch/i386/i386/trap.c:1.275 --- src/sys/arch/i386/i386/trap.c:1.274 Fri Feb 27 11:41:12 2015 +++ src/sys/arch/i386/i386/trap.c Fri Feb 27 12:45:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.274 2015/02/27 16:41:12 christos Exp $ */ +/* $NetBSD: trap.c,v 1.275 2015/02/27 17:45:52 christos Exp $ */ /*- * Copyright (c) 1998, 2000, 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.274 2015/02/27 16:41:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.275 2015/02/27 17:45:52 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -689,10 +689,9 @@ faultcommon: } #ifdef TRAP_SIGDEBUG - printf("pid %d.%d (%s): signal %d at rip %lx addr %lx " + printf("pid %d.%d (%s): signal %d at eip %x addr %lx " "error %d\n", p->p_pid, l->l_lid, p->p_comm, ksi.ksi_signo, - frame->tf_rip, va, error); - frame_dump(frame); + frame->tf_eip, va, error); #endif (*p->p_emul->e_trapsignal)(l, &ksi); break;
CVS commit: src/sys/arch/evbarm/amlogic
Module Name:src Committed By: jmcneill Date: Fri Feb 27 18:00:29 UTC 2015 Modified Files: src/sys/arch/evbarm/amlogic: amlogic_machdep.c Log Message: use va not pa for console bsh To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.2 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.3 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.2 Fri Feb 27 17:35:08 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Fri Feb 27 18:00:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.2 2015/02/27 17:35:08 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.3 2015/02/27 18:00:29 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.2 2015/02/27 17:35:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.3 2015/02/27 18:00:29 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -470,9 +470,6 @@ static const int conmode = CONMODE; void consinit(void) { -#if NAMLOGIC_COM > 0 - bus_space_handle_t bsh; -#endif static int consinit_called = 0; if (consinit_called != 0) @@ -483,9 +480,9 @@ consinit(void) amlogic_putchar('e'); #if NAMLOGIC_COM > 0 - bus_space_subregion(&amlogic_bs_tag, amlogic_core_bsh, - consaddr - AMLOGIC_CORE_BASE, AMLOGIC_UART_SIZE, &bsh); - amlogic_com_cnattach(&amlogic_bs_tag, consaddr, conspeed, conmode); +const bus_space_handle_t bsh = +AMLOGIC_CORE_VBASE + (consaddr - AMLOGIC_CORE_BASE); + amlogic_com_cnattach(&amlogic_bs_tag, bsh, conspeed, conmode); #endif #if NUKBD > 0
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Fri Feb 27 18:26:49 UTC 2015 Modified Files: src/sys/arch/arm/cortex: a9tmr.c Log Message: match on Cortex-A5 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/cortex/a9tmr.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/a9tmr.c diff -u src/sys/arch/arm/cortex/a9tmr.c:1.10 src/sys/arch/arm/cortex/a9tmr.c:1.11 --- src/sys/arch/arm/cortex/a9tmr.c:1.10 Thu Jan 8 10:38:08 2015 +++ src/sys/arch/arm/cortex/a9tmr.c Fri Feb 27 18:26:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: a9tmr.c,v 1.10 2015/01/08 10:38:08 hkenken Exp $ */ +/* $NetBSD: a9tmr.c,v 1.11 2015/02/27 18:26:49 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.10 2015/01/08 10:38:08 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.11 2015/02/27 18:26:49 jmcneill Exp $"); #include #include @@ -96,7 +96,8 @@ a9tmr_match(device_t parent, cfdata_t cf if ((armreg_pfr1_read() & ARM_PFR1_GTIMER_MASK) != 0) return 0; - if (!CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid)) + if (!CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid) && + !CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) return 0; if (strcmp(mpcaa->mpcaa_name, cf->cf_name) != 0)
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Fri Feb 27 18:43:28 UTC 2015 Modified Files: src/sys/arch/arm/cortex: a9wdt.c armperiph.c Log Message: match on Cortex-A5 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/a9wdt.c cvs rdiff -u -r1.5 -r1.6 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/a9wdt.c diff -u src/sys/arch/arm/cortex/a9wdt.c:1.2 src/sys/arch/arm/cortex/a9wdt.c:1.3 --- src/sys/arch/arm/cortex/a9wdt.c:1.2 Sun Apr 13 02:20:33 2014 +++ src/sys/arch/arm/cortex/a9wdt.c Fri Feb 27 18:43:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: a9wdt.c,v 1.2 2014/04/13 02:20:33 matt Exp $ */ +/* $NetBSD: a9wdt.c,v 1.3 2015/02/27 18:43:28 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: a9wdt.c,v 1.2 2014/04/13 02:20:33 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: a9wdt.c,v 1.3 2015/02/27 18:43:28 jmcneill Exp $"); #include #include @@ -94,7 +94,8 @@ a9wdt_match(device_t parent, cfdata_t cf if (attached) return 0; - if (!CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid)) + if (!CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid) && + !CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) return 0; if (strcmp(mpcaa->mpcaa_name, cf->cf_name) != 0) Index: src/sys/arch/arm/cortex/armperiph.c diff -u src/sys/arch/arm/cortex/armperiph.c:1.5 src/sys/arch/arm/cortex/armperiph.c:1.6 --- src/sys/arch/arm/cortex/armperiph.c:1.5 Fri Dec 5 01:11:25 2014 +++ src/sys/arch/arm/cortex/armperiph.c Fri Feb 27 18:43:28 2015 @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.5 2014/12/05 01:11:25 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.6 2015/02/27 18:43:28 jmcneill Exp $"); #include #include @@ -63,6 +63,7 @@ static const struct armperiph_info a5_de { "armscu", 0x, 0 }, { "armgic", 0x1000, 0x0100 }, { "a9tmr", 0x0200, 0 }, + { "a9wdt", 0x0600, 0 }, { "", 0, 0 }, }; #endif
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Fri Feb 27 18:52:20 UTC 2015 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/cortex/a9_mpsubr.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/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.28 src/sys/arch/arm/cortex/a9_mpsubr.S:1.29 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.28 Sat Feb 7 17:14:32 2015 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Fri Feb 27 18:52:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.28 2015/02/07 17:14:32 jmcneill Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.29 2015/02/27 18:52:20 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -207,9 +207,11 @@ arm_cpuinit: #endif mcr p15, 0, r1, c2, c0, 2 // TTBCR write +#if !defined(CPU_CORTEXA5) XPUTC(#73) mov r1, #0 mcr p15, 0, r1, c8, c7, 0 // TLBIALL (just this core) +#endif XPUTC(#74) mov r1, #0 // get KERNEL_PID
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Fri Feb 27 19:39:56 UTC 2015 Modified Files: src/lib/libperfuse [netbsd-7]: ops.c perfuse.c src/lib/libpuffs [netbsd-7]: puffs.3 src/sys/fs/puffs [netbsd-7]: puffs_msgif.h puffs_sys.h puffs_vfsops.c puffs_vnops.c Log Message: Pull up following revision(s) (requested by manu in ticket #555): lib/libpuffs/puffs.3: revision 1.60 sys/fs/puffs/puffs_msgif.h: revision 1.84 lib/libperfuse/ops.c: revision 1.83 sys/fs/puffs/puffs_sys.h: revision 1.89 sys/fs/puffs/puffs_vfsops.c: revision 1.116 lib/libperfuse/perfuse.c: revision 1.36 sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202 Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE FUSE filesystems do not expect to get metadata updates for [amc]time and size, they updates the value on their own after operations. The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache flushes to the filesystem , and libperfuse uses it to match Linux FUSE behavior. While there, fix a bug in SETATTR: do not update kernel metadata cache from SETATTR reply when the request is asynchronous, as we do not have the reply yet. Update file size after write without metadata flush If we do not use metadata flush, we must make sure the size is updated in the filesystem after a write, otherwise the next GETATTR will get us a stale value and the file will be truncated. To generate a diff of this commit: cvs rdiff -u -r1.66.2.14 -r1.66.2.15 src/lib/libperfuse/ops.c cvs rdiff -u -r1.31.10.3 -r1.31.10.4 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.59 -r1.59.4.1 src/lib/libpuffs/puffs.3 cvs rdiff -u -r1.80.14.2 -r1.80.14.3 src/sys/fs/puffs/puffs_msgif.h cvs rdiff -u -r1.84.4.2 -r1.84.4.3 src/sys/fs/puffs/puffs_sys.h cvs rdiff -u -r1.113.2.2 -r1.113.2.3 src/sys/fs/puffs/puffs_vfsops.c cvs rdiff -u -r1.182.2.12 -r1.182.2.13 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.66.2.14 src/lib/libperfuse/ops.c:1.66.2.15 --- src/lib/libperfuse/ops.c:1.66.2.14 Sat Jan 17 11:47:27 2015 +++ src/lib/libperfuse/ops.c Fri Feb 27 19:39:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.66.2.14 2015/01/17 11:47:27 martin Exp $ */ +/* $NetBSD: ops.c,v 1.66.2.15 2015/02/27 19:39:56 martin Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -1828,6 +1828,7 @@ perfuse_node_setattr_ttl(struct puffs_us fsi->valid |= FUSE_FATTR_LOCKOWNER; } +#ifndef PUFFS_KFLAG_NOFLUSH_META /* * ftruncate() sends only va_size, and metadata cache * flush adds va_atime and va_mtime. Some FUSE @@ -1856,6 +1857,7 @@ perfuse_node_setattr_ttl(struct puffs_us */ if (fsi->valid == FUSE_FATTR_ATIME) fsi->valid &= ~FUSE_FATTR_ATIME; +#endif /* PUFFS_KFLAG_NOFLUSH_META */ /* * If nothing remain, discard the operation. Index: src/lib/libperfuse/perfuse.c diff -u src/lib/libperfuse/perfuse.c:1.31.10.3 src/lib/libperfuse/perfuse.c:1.31.10.4 --- src/lib/libperfuse/perfuse.c:1.31.10.3 Wed Nov 5 18:11:30 2014 +++ src/lib/libperfuse/perfuse.c Fri Feb 27 19:39:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse.c,v 1.31.10.3 2014/11/05 18:11:30 snj Exp $ */ +/* $NetBSD: perfuse.c,v 1.31.10.4 2015/02/27 19:39:56 martin Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -539,6 +539,15 @@ perfuse_init(struct perfuse_callbacks *p puffs_flags |= PUFFS_FLAG_IAONDEMAND; #endif + /* + * FUSE filesystem do not expect [amc]time and size + * updates to be sent by the kernel, they do the + * updates on their own after other operations. + */ +#ifdef PUFFS_KFLAG_NOFLUSH_META + puffs_flags |= PUFFS_KFLAG_NOFLUSH_META; +#endif + if (perfuse_diagflags & PDF_PUFFS) puffs_flags |= PUFFS_FLAG_OPDUMP; Index: src/lib/libpuffs/puffs.3 diff -u src/lib/libpuffs/puffs.3:1.59 src/lib/libpuffs/puffs.3:1.59.4.1 --- src/lib/libpuffs/puffs.3:1.59 Tue Mar 18 18:20:38 2014 +++ src/lib/libpuffs/puffs.3 Fri Feb 27 19:39:56 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: puffs.3,v 1.59 2014/03/18 18:20:38 riastradh Exp $ +.\" $NetBSD: puffs.3,v 1.59.4.1 2015/02/27 19:39:56 martin Exp $ .\" .\" Copyright (c) 2006, 2007, 2008 Antti Kantee. All rights reserved. .\" @@ -263,6 +263,9 @@ Never send lookups for .Dq .. to the filesystem. Parent vnodes are all kept active until their children are reclaimed. +.It Dv PUFFS_KFLAG_NOFLUSH_META +Do not send metadata cache flushes for time and size to the filesystem, +which should take care of updating the values on its own. .It Dv PUFFS_FLAG_OPDUMP This option makes the framework dump a textual representation of each operation before executing it. Index: src/sys/fs/puffs/puffs_msgif.h diff -u src/sys/fs/puffs/puffs_msgif.h:1.80.14.2 src/sys/fs/puffs/puffs_msgif.h:1.80.14.3 -
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Feb 27 19:41:34 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket #555 To generate a diff of this commit: cvs rdiff -u -r1.1.2.214 -r1.1.2.215 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.214 src/doc/CHANGES-7.0:1.1.2.215 --- src/doc/CHANGES-7.0:1.1.2.214 Fri Feb 27 12:01:08 2015 +++ src/doc/CHANGES-7.0 Fri Feb 27 19:41:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.214 2015/02/27 12:01:08 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.215 2015/02/27 19:41:34 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -16214,3 +16214,14 @@ usr.sbin/sysinst/util.c1.5 [snj, ticket #554] +lib/libperfuse/ops.c1.83 +lib/libperfuse/perfuse.c 1.36 +lib/libpuffs/puffs.31.60 +sys/fs/puffs/puffs_msgif.h 1.84 +sys/fs/puffs/puffs_sys.h 1.89 +sys/fs/puffs/puffs_vfsops.c 1.116 +sys/fs/puffs/puffs_vnops.c 1.200-1.202 + + Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE. + [manu, ticket #555] +
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: jmcneill Date: Fri Feb 27 19:56:07 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_intr.h Log Message: increase pic max sources To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_intr.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_intr.h diff -u src/sys/arch/arm/amlogic/amlogic_intr.h:1.1 src/sys/arch/arm/amlogic/amlogic_intr.h:1.2 --- src/sys/arch/arm/amlogic/amlogic_intr.h:1.1 Sat Feb 7 17:20:17 2015 +++ src/sys/arch/arm/amlogic/amlogic_intr.h Fri Feb 27 19:56:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_intr.h,v 1.1 2015/02/07 17:20:17 jmcneill Exp $ */ +/* $NetBSD: amlogic_intr.h,v 1.2 2015/02/27 19:56:07 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,8 +29,8 @@ #ifndef _ARM_AMLOGIC_INTR_H #define _ARM_AMLOGIC_INTR_H -#define PIC_MAXSOURCES 224 -#define PIC_MAXMAXSOURCES 256 +#define PIC_MAXSOURCES 256 +#define PIC_MAXMAXSOURCES 282 #include #include
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Fri Feb 27 19:57:10 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_board.c amlogic_reg.h src/sys/arch/evbarm/amlogic: amlogic_machdep.c Added Files: src/sys/arch/arm/amlogic: amlogic_crureg.h Log Message: derive cpu freq from cbus regs To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_board.c \ src/sys/arch/arm/amlogic/amlogic_reg.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_crureg.h cvs rdiff -u -r1.3 -r1.4 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/arm/amlogic/amlogic_board.c diff -u src/sys/arch/arm/amlogic/amlogic_board.c:1.1 src/sys/arch/arm/amlogic/amlogic_board.c:1.2 --- src/sys/arch/arm/amlogic/amlogic_board.c:1.1 Sat Feb 7 17:20:17 2015 +++ src/sys/arch/arm/amlogic/amlogic_board.c Fri Feb 27 19:57:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_board.c,v 1.1 2015/02/07 17:20:17 jmcneill Exp $ */ +/* $NetBSD: amlogic_board.c,v 1.2 2015/02/27 19:57:10 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.1 2015/02/07 17:20:17 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.2 2015/02/27 19:57:10 jmcneill Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: amlogic_boar #include #include +#include #include bus_space_handle_t amlogic_core_bsh; @@ -53,6 +54,14 @@ 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); + + void amlogic_bootstrap(void) { @@ -62,4 +71,79 @@ amlogic_bootstrap(void) AMLOGIC_CORE_SIZE, 0, &amlogic_core_bsh); if (error) panic("%s: failed to map CORE registers: %d", __func__, error); + + curcpu()->ci_data.cpu_cc_freq = amlogic_get_rate_a9(); +} + +static uint32_t +amlogic_get_rate_xtal(void) +{ + uint32_t ctlreg0; + + ctlreg0 = CBUS_READ(PREG_CTLREG0_ADDR_REG); + + return __SHIFTOUT(ctlreg0, PREG_CTLREG0_ADDR_CLKRATE) * 100; +} + +static uint32_t +amlogic_get_rate_sys(void) +{ + uint32_t cntl; + uint64_t clk; + u_int mul, div, od; + + clk = amlogic_get_rate_xtal(); + cntl = CBUS_READ(HHI_SYS_PLL_CNTL_REG); + mul = __SHIFTOUT(cntl, HHI_SYS_PLL_CNTL_MUL); + div = __SHIFTOUT(cntl, HHI_SYS_PLL_CNTL_DIV); + od = __SHIFTOUT(cntl, HHI_SYS_PLL_CNTL_OD); + + clk *= mul; + clk /= div; + clk >>= od; + + return (uint32_t)clk; +} + +static uint32_t +amlogic_get_rate_a9(void) +{ + uint32_t cntl0, cntl1; + uint32_t rate = 0; + + cntl0 = CBUS_READ(HHI_SYS_CPU_CLK_CNTL0_REG); + if (cntl0 & HHI_SYS_CPU_CLK_CNTL0_CLKSEL) { + switch (__SHIFTOUT(cntl0, HHI_SYS_CPU_CLK_CNTL0_PLLSEL)) { + case 0: + rate = amlogic_get_rate_xtal(); + break; + case 1: + rate = amlogic_get_rate_sys(); + break; + case 2: + rate = 125000; + break; + } + } else { + rate = amlogic_get_rate_xtal(); + } + + KASSERTMSG(rate != 0, "couldn't determine A9 rate"); + + switch (__SHIFTOUT(cntl0, HHI_SYS_CPU_CLK_CNTL0_SOUTSEL)) { + case 0: + break; + case 1: + rate /= 2; + break; + case 2: + rate /= 3; + break; + case 3: + cntl1 = CBUS_READ(HHI_SYS_CPU_CLK_CNTL1_REG); + rate /= (__SHIFTOUT(cntl1, HHI_SYS_CPU_CLK_CNTL1_SDIV) + 1); + break; + } + + return rate; } Index: src/sys/arch/arm/amlogic/amlogic_reg.h diff -u src/sys/arch/arm/amlogic/amlogic_reg.h:1.1 src/sys/arch/arm/amlogic/amlogic_reg.h:1.2 --- src/sys/arch/arm/amlogic/amlogic_reg.h:1.1 Sat Feb 7 17:20:17 2015 +++ src/sys/arch/arm/amlogic/amlogic_reg.h Fri Feb 27 19:57:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_reg.h,v 1.1 2015/02/07 17:20:17 jmcneill Exp $ */ +/* $NetBSD: amlogic_reg.h,v 1.2 2015/02/27 19:57:10 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -35,6 +35,7 @@ #define AMLOGIC_CORE_SIZE 0x1020 #define AMLOGIC_CORE_VBASE 0xe000 +#define AMLOGIC_CBUS_OFFSET 0x0110 #define AMLOGIC_UART0_OFFSET 0x01102130 #define AMLOGIC_UART1_OFFSET 0x01102137 #define AMLOGIC_UART2_OFFSET 0x011021c0 Index: src/sys/arch/evbarm/amlogic/amlogic_machdep.c diff -u src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.3 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.4 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.3 Fri Feb 27 18:00:29 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Fri Feb 27 19:57:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.3 2015/02/27 18:00:29 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.4 2015/02/27 19:57:10 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@
CVS commit: [netbsd-6] src
Module Name:src Committed By: martin Date: Fri Feb 27 20:21:02 UTC 2015 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c perfuse.c src/lib/libpuffs [netbsd-6]: puffs.3 src/sys/fs/puffs [netbsd-6]: puffs_msgif.h puffs_sys.h puffs_vfsops.c puffs_vnops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1260): lib/libpuffs/puffs.3: revision 1,55,1.60 sys/fs/puffs/puffs_msgif.h: revision 1.84 lib/libperfuse/ops.c: revision 1.83 sys/fs/puffs/puffs_sys.h: revision 1.89 sys/fs/puffs/puffs_vfsops.c: revision 1.116 lib/libperfuse/perfuse.c: revision 1.36 sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202 Use more markup. New sentence, new line. Bump date for previous. Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE FUSE filesystems do not expect to get metadata updates for [amc]time and size, they updates the value on their own after operations. The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache flushes to the filesystem , and libperfuse uses it to match Linux FUSE behavior. While there, fix a bug in SETATTR: do not update kernel metadata cache from SETATTR reply when the request is asynchronous, as we do not have the reply yet. Update file size after write without metadata flush If we do not use metadata flush, we must make sure the size is updated in the filesystem after a write, otherwise the next GETATTR will get us a stale value and the file will be truncated. To generate a diff of this commit: cvs rdiff -u -r1.50.2.20 -r1.50.2.21 src/lib/libperfuse/ops.c cvs rdiff -u -r1.25.2.5 -r1.25.2.6 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.49.2.3 -r1.49.2.4 src/lib/libpuffs/puffs.3 cvs rdiff -u -r1.77.8.3 -r1.77.8.4 src/sys/fs/puffs/puffs_msgif.h cvs rdiff -u -r1.78.8.3 -r1.78.8.4 src/sys/fs/puffs/puffs_sys.h cvs rdiff -u -r1.100.8.3 -r1.100.8.4 src/sys/fs/puffs/puffs_vfsops.c cvs rdiff -u -r1.163.2.11 -r1.163.2.12 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.20 src/lib/libperfuse/ops.c:1.50.2.21 --- src/lib/libperfuse/ops.c:1.50.2.20 Fri Jan 16 19:42:54 2015 +++ src/lib/libperfuse/ops.c Fri Feb 27 20:21:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.20 2015/01/16 19:42:54 martin Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.21 2015/02/27 20:21:02 martin Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -1818,6 +1818,7 @@ perfuse_node_setattr_ttl(struct puffs_us fsi->valid |= FUSE_FATTR_LOCKOWNER; } +#ifndef PUFFS_KFLAG_NOFLUSH_META /* * ftruncate() sends only va_size, and metadata cache * flush adds va_atime and va_mtime. Some FUSE @@ -1846,6 +1847,7 @@ perfuse_node_setattr_ttl(struct puffs_us */ if (fsi->valid == FUSE_FATTR_ATIME) fsi->valid &= ~FUSE_FATTR_ATIME; +#endif /* PUFFS_KFLAG_NOFLUSH_META */ /* * If nothing remain, discard the operation. Index: src/lib/libperfuse/perfuse.c diff -u src/lib/libperfuse/perfuse.c:1.25.2.5 src/lib/libperfuse/perfuse.c:1.25.2.6 --- src/lib/libperfuse/perfuse.c:1.25.2.5 Mon Nov 3 19:37:58 2014 +++ src/lib/libperfuse/perfuse.c Fri Feb 27 20:21:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse.c,v 1.25.2.5 2014/11/03 19:37:58 msaitoh Exp $ */ +/* $NetBSD: perfuse.c,v 1.25.2.6 2015/02/27 20:21:02 martin Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -536,6 +536,15 @@ perfuse_init(struct perfuse_callbacks *p puffs_flags |= PUFFS_FLAG_IAONDEMAND; #endif + /* + * FUSE filesystem do not expect [amc]time and size + * updates to be sent by the kernel, they do the + * updates on their own after other operations. + */ +#ifdef PUFFS_KFLAG_NOFLUSH_META + puffs_flags |= PUFFS_KFLAG_NOFLUSH_META; +#endif + if (perfuse_diagflags & PDF_PUFFS) puffs_flags |= PUFFS_FLAG_OPDUMP; Index: src/lib/libpuffs/puffs.3 diff -u src/lib/libpuffs/puffs.3:1.49.2.3 src/lib/libpuffs/puffs.3:1.49.2.4 --- src/lib/libpuffs/puffs.3:1.49.2.3 Thu Sep 13 20:20:16 2012 +++ src/lib/libpuffs/puffs.3 Fri Feb 27 20:21:02 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: puffs.3,v 1.49.2.3 2012/09/13 20:20:16 riz Exp $ +.\" $NetBSD: puffs.3,v 1.49.2.4 2015/02/27 20:21:02 martin Exp $ .\" .\" Copyright (c) 2006, 2007, 2008 Antti Kantee. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2012 +.Dd August 10, 2012 .Dt PUFFS 3 .Os .Sh NAME @@ -259,8 +259,13 @@ will be called instead of and .Fn puffs_node_setattr . .It Dv PUFFS_KFLAG_CACHE_DOTDOT -Never send lookups for .. to the filesystem. Parent vnodes are all -kept active until their children are reclaimed. +Never send lookups for +.Dq .. +to the filesystem. +Parent vnodes are all k
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: martin Date: Fri Feb 27 20:22:36 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket #1260 To generate a diff of this commit: cvs rdiff -u -r1.1.2.198 -r1.1.2.199 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.198 src/doc/CHANGES-6.2:1.1.2.199 --- src/doc/CHANGES-6.2:1.1.2.198 Mon Feb 23 07:00:57 2015 +++ src/doc/CHANGES-6.2 Fri Feb 27 20:22:36 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.198 2015/02/23 07:00:57 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.199 2015/02/27 20:22:36 martin Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -9663,3 +9663,15 @@ external/bsd/bind/dist/lib/dns/zone.c Security patch for bind from ISC (to 9.9.6-P2). Only the change to lib/dns/zone.c is security relevant (CVE-2015-1349). [spz, ticket #1259] + +lib/libperfuse/ops.c1.83 +lib/libperfuse/perfuse.c 1.36 +lib/libpuffs/puffs.31.55,1.60 +sys/fs/puffs/puffs_msgif.h 1.84 +sys/fs/puffs/puffs_sys.h 1.89 +sys/fs/puffs/puffs_vfsops.c 1.116 +sys/fs/puffs/puffs_vnops.c 1.200-1.202 + + Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE. + [manu, ticket #1260] +
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Fri Feb 27 20:40:09 UTC 2015 Modified Files: src/sys/arch/arm/cortex: armperiph.c pl310.c Log Message: allow arml2cc to be used on Cortex-A5 if the "offset" property is specified To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/cortex/armperiph.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/cortex/pl310.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.6 src/sys/arch/arm/cortex/armperiph.c:1.7 --- src/sys/arch/arm/cortex/armperiph.c:1.6 Fri Feb 27 18:43:28 2015 +++ src/sys/arch/arm/cortex/armperiph.c Fri Feb 27 20:40:09 2015 @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.6 2015/02/27 18:43:28 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.7 2015/02/27 20:40:09 jmcneill Exp $"); #include #include @@ -64,6 +64,7 @@ static const struct armperiph_info a5_de { "armgic", 0x1000, 0x0100 }, { "a9tmr", 0x0200, 0 }, { "a9wdt", 0x0600, 0 }, + { "arml2cc", 0, 0 }, /* external; needs "offset" property */ { "", 0, 0 }, }; #endif Index: src/sys/arch/arm/cortex/pl310.c diff -u src/sys/arch/arm/cortex/pl310.c:1.16 src/sys/arch/arm/cortex/pl310.c:1.17 --- src/sys/arch/arm/cortex/pl310.c:1.16 Mon Dec 1 22:39:06 2014 +++ src/sys/arch/arm/cortex/pl310.c Fri Feb 27 20:40:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pl310.c,v 1.16 2014/12/01 22:39:06 matt Exp $ */ +/* $NetBSD: pl310.c,v 1.17 2015/02/27 20:40:09 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pl310.c,v 1.16 2014/12/01 22:39:06 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pl310.c,v 1.17 2015/02/27 20:40:09 jmcneill Exp $"); #include #include @@ -99,7 +99,8 @@ arml2cc_match(device_t parent, cfdata_t if (arml2cc_sc) return 0; - if (!CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid)) + if (!CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid) && + !CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) return 0; if (strcmp(mpcaa->mpcaa_name, cf->cf_name) != 0) @@ -138,7 +139,17 @@ arml2cc_attach(device_t parent, device_t prop_dictionary_t dict = device_properties(self); uint32_t off; + aprint_naive("\n"); + if (!prop_dictionary_get_uint32(dict, "offset", &off)) { + if (CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) { + /* + * PL310 on Cortex-A5 is external to PERIPHBASE, so + * "offset" property is required. + */ + aprint_normal(": not configured\n"); + return; + } off = L2CC_BASE; } @@ -172,7 +183,6 @@ arml2cc_attach(device_t parent, device_t const bool enabled_p = arml2cc_read_4(sc, L2C_CTL) != 0; - aprint_naive("\n"); aprint_normal(": ARM PL310%s L2 Cache Controller%s\n", revstr, enabled_p ? "" : " (disabled)");
CVS commit: src/sys/arch/evbarm/amlogic
Module Name:src Committed By: jmcneill Date: Fri Feb 27 20:41:01 UTC 2015 Modified Files: src/sys/arch/evbarm/amlogic: amlogic_machdep.c Log Message: pass external pl310 offset to arml2cc with device_register To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 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.4 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.5 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.4 Fri Feb 27 19:57:10 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Fri Feb 27 20:41:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.4 2015/02/27 19:57:10 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.5 2015/02/27 20:41:01 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.4 2015/02/27 19:57:10 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.5 2015/02/27 20:41:01 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -561,4 +561,13 @@ amlogic_device_register(device_t self, v return; } + + if (device_is_a(self, "arml2cc")) { + /* + * L2 cache regs are at C420 and A9 periph base is + * at C430; pass as a negative offset for the benefit + * of armperiph bus. + */ + prop_dictionary_set_uint32(dict, "offset", 0xfff0); + } }
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Fri Feb 27 21:13:52 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_crureg.h src/sys/arch/evbarm/amlogic: amlogic_machdep.c Log Message: implement amlogic_reset To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_crureg.h cvs rdiff -u -r1.5 -r1.6 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/arm/amlogic/amlogic_crureg.h diff -u src/sys/arch/arm/amlogic/amlogic_crureg.h:1.1 src/sys/arch/arm/amlogic/amlogic_crureg.h:1.2 --- src/sys/arch/arm/amlogic/amlogic_crureg.h:1.1 Fri Feb 27 19:57:10 2015 +++ src/sys/arch/arm/amlogic/amlogic_crureg.h Fri Feb 27 21:13:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_crureg.h,v 1.1 2015/02/27 19:57:10 jmcneill Exp $ */ +/* $NetBSD: amlogic_crureg.h,v 1.2 2015/02/27 21:13:52 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -47,4 +47,12 @@ #define PREG_CTLREG0_ADDR_REG CBUS_REG(0x2000) #define PREG_CTLREG0_ADDR_CLKRATE __BITS(9,4) +#define WATCHDOG_TC_REG CBUS_REG(0x2640) +#define WATCHDOG_TC_CPUS __BITS(27,24) +#define WATCHDOG_TC_ENABLE __BIT(19) +#define WATCHDOG_TC_TCNT __BITS(15,0) + +#define WATCHDOG_RESET_REG CBUS_REG(0x2641) +#define WATCHDOG_RESET_COUNT __BITS(15,0) + #endif /* _ARM_AMLOGIC_CRUREG_H */ Index: src/sys/arch/evbarm/amlogic/amlogic_machdep.c diff -u src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.5 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.6 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.5 Fri Feb 27 20:41:01 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Fri Feb 27 21:13:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.5 2015/02/27 20:41:01 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.6 2015/02/27 21:13:52 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.5 2015/02/27 20:41:01 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.6 2015/02/27 21:13:52 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -181,6 +181,7 @@ __KERNEL_RCSID(0, "$NetBSD: amlogic_mach #include #include +#include #include #include #include @@ -490,16 +491,16 @@ consinit(void) void amlogic_reset(void) { -#if notyet bus_space_tag_t bst = &amlogic_bs_tag; - bus_space_handle_t bsh; +bus_space_handle_t bsh = amlogic_core_bsh; - bus_space_subregion(bst, amlogic_core1_bsh, - ROCKCHIP_CRU_OFFSET, ROCKCHIP_CRU_SIZE, &bsh); + bus_space_write_4(bst, bsh, 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, CRU_GLB_SRST_FST_REG, - CRU_GLB_SRST_FST_MAGIC); -#endif + for (;;) { + __asm("wfi"); + } } #ifdef KGDB
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: jmcneill Date: Fri Feb 27 21:34:40 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_io.c Log Message: fix amlogiccom locator name To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/amlogic/amlogic_io.c diff -u src/sys/arch/arm/amlogic/amlogic_io.c:1.1 src/sys/arch/arm/amlogic/amlogic_io.c:1.2 --- src/sys/arch/arm/amlogic/amlogic_io.c:1.1 Sat Feb 7 17:20:17 2015 +++ src/sys/arch/arm/amlogic/amlogic_io.c Fri Feb 27 21:34:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_io.c,v 1.1 2015/02/07 17:20:17 jmcneill Exp $ */ +/* $NetBSD: amlogic_io.c,v 1.2 2015/02/27 21:34:40 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_amlogic.h" #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_io.c,v 1.1 2015/02/07 17:20:17 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_io.c,v 1.2 2015/02/27 21:34:40 jmcneill Exp $"); #include #include @@ -56,8 +56,10 @@ static int amlogicio_find(device_t, cfda static bool amlogicio_found = false; static const struct amlogic_locators amlogic_locators[] = { - { "com", AMLOGIC_UART0AO_OFFSET, AMLOGIC_UART_SIZE, 0, AMLOGIC_INTR_UART0AO }, - { "com", AMLOGIC_UART2AO_OFFSET, AMLOGIC_UART_SIZE, 2, AMLOGIC_INTR_UART2AO }, + { "amlogiccom", +AMLOGIC_UART0AO_OFFSET, AMLOGIC_UART_SIZE, 0, AMLOGIC_INTR_UART0AO }, + { "amlogiccom", +AMLOGIC_UART2AO_OFFSET, AMLOGIC_UART_SIZE, 2, AMLOGIC_INTR_UART2AO }, }; int
CVS commit: src/sys/external/bsd/drm2/dist/drm
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:03:30 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_irq.c Log Message: Fix another *@!#^$@!& timeout return convention mistake. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/drm_irq.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/drm_irq.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.5 src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.5 Wed Jul 16 20:56:24 2014 +++ src/sys/external/bsd/drm2/dist/drm/drm_irq.c Sat Feb 28 03:03:30 2015 @@ -1301,11 +1301,11 @@ int drm_wait_vblank(struct drm_device *d vblwait->request.sequence) <= (1 << 23)) || !dev->irq_enabled)); spin_unlock_irqrestore(&dev->vbl_lock, irqflags); - if (0 < ret) - /* - * ret is ticks remaining on success in this case, but - * caller just wants 0 for success. - */ + if (ret < 0) /* Failed: do nothing. */ + ; + else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ + ret = -EBUSY; + else /* Succeeded (ret > 0): return 0. */ ret = 0; } #else
CVS commit: src/sys/external/bsd/drm2/dist/drm
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:05:09 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_irq.c Log Message: Clarify comment in last commit. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/drm_irq.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/drm_irq.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.6 src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/drm_irq.c:1.6 Sat Feb 28 03:03:30 2015 +++ src/sys/external/bsd/drm2/dist/drm/drm_irq.c Sat Feb 28 03:05:09 2015 @@ -1301,7 +1301,7 @@ int drm_wait_vblank(struct drm_device *d vblwait->request.sequence) <= (1 << 23)) || !dev->irq_enabled)); spin_unlock_irqrestore(&dev->vbl_lock, irqflags); - if (ret < 0) /* Failed: do nothing. */ + if (ret < 0) /* Failed: return negative error as is. */ ; else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ ret = -EBUSY;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:06:46 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_dma.c Log Message: And another timeout return value mistake. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.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/i915_dma.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.13 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.13 Wed Feb 25 13:06:13 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Sat Feb 28 03:06:46 2015 @@ -816,6 +816,12 @@ static int i915_wait_irq(struct drm_devi &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,
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:22:50 UTC 2015 Modified Files: src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h Log Message: Write an essay to remind myself about (timed) wait return values. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ 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.6 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.7 --- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.6 Thu Feb 26 23:27:41 2015 +++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h Sat Feb 28 03:22:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_wait_netbsd.h,v 1.6 2015/02/26 23:27:41 riastradh Exp $ */ +/* $NetBSD: drm_wait_netbsd.h,v 1.7 2015/02/28 03:22:50 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -104,6 +104,28 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, cv_broadcast(q); } +/* + * WARNING: These DRM_*WAIT*_UNTIL macros are designed to replace the + * Linux wait_event_* macros. They have a different return value + * convention from the legacy portability DRM_WAIT_ON macro and a + * different return value convention from cv_*wait*. Specifically, + * DRM_*WAIT*_UNTIL and Linux wait_event_* + * + * - return negative error code on failure (e.g., interruption), + * - return zero on timeout, and + * - return one on success. + * + * Contrast DRM_WAIT_ON which returns -EINTR/-ERESTART on interruption, + * -EBUSY on timeout, and zero on success; and cv_*wait*, which return + * -EINTR/-ERESTART on interruption, -EWOULDBLOCK on timeout, and zero + * on success. + * + * We don't simply implement DRM_WAIT_ON because, like Linux + * wait_event_*, it lacks an interlock, whereas we require an interlock + * for any waits in order to avoid the standard race conditions + * associated with non-interlocked waits that plague Linux drivers. + */ + #define _DRM_WAIT_UNTIL(RET, WAIT, Q, INTERLOCK, CONDITION) do \ { \ KASSERT(mutex_is_locked((INTERLOCK)));\ @@ -135,7 +157,7 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, * - 0 if condition is false after timeout, * - 1 if condition is true after timeout or one tick before timeout, * - number of ticks left if condition evaluated to true before timeout, or - * - error if failure (e.g., interrupted). + * - negative error if failure (e.g., interrupted). * * XXX Comments in Linux say it returns -ERESTARTSYS if interrupted. * What if by a signal without SA_RESTART? Shouldn't it be -EINTR
CVS commit: src/sys/external/bsd/drm2/dist/drm/via
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:23:32 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/via: via_dmablit.c via_irq.c via_video.c Log Message: Fix these drm waits too, in case anyone tries to use this via code. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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 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/via/via_dmablit.c diff -u src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.2 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.2 Tue Aug 26 17:28:14 2014 +++ src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c Sat Feb 28 03:23:32 2015 @@ -600,6 +600,12 @@ via_dmablit_sync(struct drm_device *dev, DRM_SPIN_TIMED_WAIT_UNTIL(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 @@ -878,9 +884,18 @@ via_dmablit_grab_slot(drm_via_blitq_t *b DRM_SPIN_TIMED_WAIT_UNTIL(ret, &blitq->busy_queue, &blitq->blit_lock, DRM_HZ, blitq->num_free > 0); + if (ret < 0) /* Failure: return negative error as is. */ + ; + else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ + ret = -EBUSY; + else /* Success (ret > 0): return 0. */ + ret = 0; + /* Map -EINTR to -EAGAIN. */ + if (ret == -EINTR) + ret = -EAGAIN; + /* Bail on failure. */ if (ret) { - if (ret == -EINTR) -ret = -EAGAIN; + spin_unlock_irqrestore(&blitq->blit_lock, irqsave); return ret; } #else Index: src/sys/external/bsd/drm2/dist/drm/via/via_irq.c diff -u src/sys/external/bsd/drm2/dist/drm/via/via_irq.c:1.2 src/sys/external/bsd/drm2/dist/drm/via/via_irq.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/via/via_irq.c:1.2 Tue Aug 26 17:28:14 2014 +++ src/sys/external/bsd/drm2/dist/drm/via/via_irq.c Sat Feb 28 03:23:32 2015 @@ -260,6 +260,12 @@ via_driver_irq_wait(struct drm_device *d (((cur_irq_sequence = cur_irq->irq_received) - *sequence) <= (1 << 23))); } + if (ret < 0) /* Failure: return negative error as is. */ + ; + else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ + ret = -EBUSY; + else /* Success (ret > 0): return 0. */ + ret = 0; spin_unlock(&cur_irq->irq_lock); #else if (masks[real_irq][2] && !force_sequence) { Index: src/sys/external/bsd/drm2/dist/drm/via/via_video.c diff -u src/sys/external/bsd/drm2/dist/drm/via/via_video.c:1.2 src/sys/external/bsd/drm2/dist/drm/via/via_video.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/via/via_video.c:1.2 Tue Aug 26 17:28:14 2014 +++ src/sys/external/bsd/drm2/dist/drm/via/via_video.c Sat Feb 28 03:23:32 2015 @@ -108,6 +108,12 @@ int via_decoder_futex(struct drm_device &dev_priv->decoder_lock[fx->lock], (fx->ms / 10) * (DRM_HZ / 100), *lock != fx->val); + if (ret < 0) /* Failure: return negative error as is. */ + ; + else if (ret == 0) /* Timed out: return -EBUSY like Linux. */ + ret = -EBUSY; + else /* Success (ret > 0): return 0. */ + ret = 0; mutex_unlock(&dev_priv->decoder_lock[fx->lock]); #else DRM_WAIT_ON(ret, dev_priv->decoder_queue[fx->lock],
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:27:38 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_drv.h Log Message: Recheck condition after wait in wait_for like Linux does. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/i915/intel_drv.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/i915/intel_drv.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h:1.7 src/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h:1.8 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h:1.7 Sun Sep 7 23:03:11 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h Sat Feb 28 03:27:38 2015 @@ -50,7 +50,9 @@ int ms = (MS); \ while (!(COND)) { \ if (--ms < 0) { \ -ret__ = -ETIMEDOUT; \ +DELAY(1000);\ +if (!(COND))\ + ret__ = -ETIMEDOUT; \ break; \ } \ DELAY(1000); \ @@ -59,7 +61,8 @@ unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \ while (!(COND)) { \ if (time_after(jiffies, timeout__)) { \ -ret__ = -ETIMEDOUT; \ +if (!(COND))\ + ret__ = -ETIMEDOUT; \ break; \ } \ if ((W) && drm_can_sleep()) { \
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo
Module Name:src Committed By: riastradh Date: Sat Feb 28 03:33:22 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo: nouveau_engine_fifo_nvc0.c nouveau_engine_fifo_nve0.c Log Message: More DRM_TIMED_WAIT mistakes: 0, not -ETIMEDOUT, for timeout. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.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/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.2 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.2 Sat Aug 23 08:03:33 2014 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c Sat Feb 28 03:33:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.2 2014/08/23 08:03:33 riastradh Exp $ */ +/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $ */ /* * Copyright 2012 Red Hat Inc. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.2 2014/08/23 08:03:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $"); #include #include @@ -122,7 +122,7 @@ nvc0_fifo_runlist_update(struct nvc0_fif DRM_SPIN_TIMED_WAIT_UNTIL(ret, &priv->runlist.wait, &priv->runlist.lock, msecs_to_jiffies(2000), !(nv_rd32(priv, 0x00227c) & 0x0010)); - if (ret == -ETIMEDOUT) + if (ret == 0) nv_error(priv, "runlist update timeout\n"); spin_unlock(&priv->runlist.lock); } Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.2 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.2 Sat Aug 23 08:03:33 2014 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c Sat Feb 28 03:33:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.2 2014/08/23 08:03:33 riastradh Exp $ */ +/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $ */ /* * Copyright 2012 Red Hat Inc. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.2 2014/08/23 08:03:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $"); #include #include @@ -144,7 +144,7 @@ nve0_fifo_runlist_update(struct nve0_fif msecs_to_jiffies(2000), !(nv_rd32(priv, 0x002284 + (engine * 0x08)) & 0x0010)); - if (ret == -ETIMEDOUT) + if (ret == 0) nv_error(priv, "runlist %d update timeout\n", engine); spin_unlock(&engn->lock); }
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 04:18:12 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_display.c Log Message: Fix sense of conditional in wait while cold. Functional change! To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_display.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_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.14 src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.15 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.14 Sat Feb 28 04:17:37 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c Sat Feb 28 04:18:12 2015 @@ -3138,7 +3138,7 @@ static void intel_crtc_wait_for_pending_ #ifdef __NetBSD__ if (cold) { unsigned timo = 1000; - while (!intel_crtc_has_pending_flip(crtc)) { + while (intel_crtc_has_pending_flip(crtc)) { if (timo-- == 0) /* Give up. */ break;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 04:17:37 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_display.c Log Message: Simplify wait while cold. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_display.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_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.13 src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.14 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.13 Thu Nov 6 12:47:48 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c Sat Feb 28 04:17:37 2015 @@ -3131,9 +3131,6 @@ static void intel_crtc_wait_for_pending_ { struct drm_device *dev = crtc->dev; struct drm_i915_private *dev_priv = dev->dev_private; -#ifdef __NetBSD__ - int ret = 0; -#endif if (crtc->primary->fb == NULL) return; @@ -3141,16 +3138,16 @@ static void intel_crtc_wait_for_pending_ #ifdef __NetBSD__ if (cold) { unsigned timo = 1000; - ret = 0; while (!intel_crtc_has_pending_flip(crtc)) { - if (timo-- == 0) { -ret = -ETIMEDOUT; + if (timo-- == 0) +/* Give up. */ break; - } DELAY(10); } } else { unsigned long flags; + int ret; + spin_lock_irqsave(&dev_priv->pending_flip_lock, flags); WARN_ON(DRM_SPIN_WAITERS_P(&dev_priv->pending_flip_queue, &dev_priv->pending_flip_lock));
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 04:47:45 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.c Log Message: Make timed and untimed cases of __wait_seqno agree on return value. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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/i915_gem.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.22 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.23 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.22 Thu Feb 26 23:32:40 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sat Feb 28 04:47:44 2015 @@ -1427,6 +1427,12 @@ __wait_seqno(struct intel_ring_buffer *r else DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &ring->irq_queue, &dev_priv->irq_lock, ticks, EXIT_COND); + if (ret < 0) /* Failure: return negative error as is. */ + ; + else if (ret == 0) /* Timed out: return -ETIME. */ + ret = -ETIME; + else /* Succeeded (ret > 0): return 0. */ + ret = 0; } else { if (interruptible) DRM_SPIN_WAIT_UNTIL(ret, &ring->irq_queue, @@ -1434,6 +1440,7 @@ __wait_seqno(struct intel_ring_buffer *r else DRM_SPIN_WAIT_NOINTR_UNTIL(ret, &ring->irq_queue, &dev_priv->irq_lock, EXIT_COND); + /* ret is negative on failure or zero on success. */ } #undef EXIT_COND spin_unlock(&dev_priv->irq_lock); @@ -1463,11 +1470,7 @@ __wait_seqno(struct intel_ring_buffer *r if (ret == 0) ret = -EAGAIN; } - if (ret < 0) /* Error. */ - return ret; - if (ret == 0) /* Seqno didn't pass. */ - return -ETIME; - return 0; /* Seqno passed, maybe time to spare. */ + return ret; } #else static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 04:54:12 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_dp.c intel_i2c.c Log Message: Fix two more gmbus wait bugs. - Fix sense of return value in intel_dp_aux_wait_done. - Make the waits uninterruptible here like in Linux. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c cvs rdiff -u -r1.7 -r1.8 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_dp.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.9 src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.10 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.9 Thu Nov 6 12:47:48 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Sat Feb 28 04:54:12 2015 @@ -371,10 +371,16 @@ intel_dp_aux_wait_done(struct intel_dp * if (has_aux_irq && !cold) { int ret; spin_lock(&dev_priv->gmbus_wait_lock); - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue, - &dev_priv->gmbus_wait_lock, msecs_to_jiffies_timeout(10), + DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, + &dev_priv->gmbus_wait_queue, &dev_priv->gmbus_wait_lock, + msecs_to_jiffies_timeout(10), C); - done = ret; /* XXX ugh */ + if (ret < 0) /* Failure: pretend same as done. */ + done = true; + else if (ret == 0) /* Timed out: not done. */ + done = false; + else /* Succeeded (ret > 0): done. */ + done = true; spin_unlock(&dev_priv->gmbus_wait_lock); } else { done = wait_for_atomic(C, 10) == 0; 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.7 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.8 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.7 Fri Feb 27 04:40:17 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Sat Feb 28 04:54:12 2015 @@ -299,8 +299,9 @@ gmbus_wait_hw_status(struct drm_i915_pri } } else { int ret; - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue, - &dev_priv->gmbus_wait_lock, mstohz(50), + 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; }
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: riastradh Date: Sat Feb 28 04:57:12 UTC 2015 Modified Files: src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h Log Message: Elaborate on essay about DRM_*WAIT*_UNTIL reutrn convention. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ 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.7 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.8 --- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.7 Sat Feb 28 03:22:50 2015 +++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h Sat Feb 28 04:57:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_wait_netbsd.h,v 1.7 2015/02/28 03:22:50 riastradh Exp $ */ +/* $NetBSD: drm_wait_netbsd.h,v 1.8 2015/02/28 04:57:12 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -106,12 +106,18 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, /* * WARNING: These DRM_*WAIT*_UNTIL macros are designed to replace the - * Linux wait_event_* macros. They have a different return value + * Linux wait_event* macros. They have a different return value * convention from the legacy portability DRM_WAIT_ON macro and a - * different return value convention from cv_*wait*. Specifically, - * DRM_*WAIT*_UNTIL and Linux wait_event_* + * different return value convention from cv_*wait*. * - * - return negative error code on failure (e.g., interruption), + * Specifically, the untimed macros + * + * - return negative error code on failure (interruption), and + * - return zero on sucess. + * + * The timed macros + * + * - return negative error code on failure (interruption), * - return zero on timeout, and * - return one on success. * @@ -121,9 +127,14 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, * on success. * * We don't simply implement DRM_WAIT_ON because, like Linux - * wait_event_*, it lacks an interlock, whereas we require an interlock + * wait_event*, it lacks an interlock, whereas we require an interlock * for any waits in order to avoid the standard race conditions * associated with non-interlocked waits that plague Linux drivers. + * + * XXX In retrospect, giving the timed and untimed macros a different + * return convention from one another to match Linux may have been a + * bad idea. All of this inconsistent timeout return convention logic + * has been a consistent source of bugs. */ #define _DRM_WAIT_UNTIL(RET, WAIT, Q, INTERLOCK, CONDITION) do \
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Sat Feb 28 05:37:10 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_i2c.c Log Message: This one is uninterruptible upstream too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 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.8 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.8 Sat Feb 28 04:54:12 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Sat Feb 28 05:37:10 2015 @@ -350,7 +350,7 @@ gmbus_wait_idle(struct drm_i915_private #ifdef __NetBSD__ spin_lock(&dev_priv->gmbus_wait_lock); - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue, + DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &dev_priv->gmbus_wait_queue, &dev_priv->gmbus_wait_lock, msecs_to_jiffies_timeout(10), C); spin_unlock(&dev_priv->gmbus_wait_lock);
CVS commit: [netbsd-6-0] src/usr.bin/gzip
Module Name:src Committed By: snj Date: Sat Feb 28 05:36:33 UTC 2015 Modified Files: src/usr.bin/gzip [netbsd-6-0]: gzip.1 gzip.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1261): usr.bin/gzip/gzip.1: revision 1.24 usr.bin/gzip/gzip.c: revision 1.107 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.21 -r1.21.10.1 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.105 -r1.105.10.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/usr.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.21 src/usr.bin/gzip/gzip.1:1.21.10.1 --- src/usr.bin/gzip/gzip.1:1.21 Sun Jun 19 02:22:36 2011 +++ src/usr.bin/gzip/gzip.1 Sat Feb 28 05:36:33 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $ +.\" $NetBSD: gzip.1,v 1.21.10.1 2015/02/28 05:36:33 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.10.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 05:36:33 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.10.1 2015/02/28 05:36:33 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("$NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $"); +__RCSID("$NetBSD: gzip.c,v 1.105.10.1 2015/02/28 05:36:33 snj Exp $"); #endif /* not lint */ /* @@ -160,7 +160,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "NetBSD gzip 20101018"; +static const char gzip_version[] = "NetBSD gzip 20150113"; static int cflag; /* stdout mode */ static int dflag; /* decompress mode */ @@ -1311,7 +1311,7 @@ file_uncompress(char *file, char *outfil #ifndef SMALL ssize_t rv; time_t timestamp = 0; - unsigned char name[PATH_MAX + 1]; + char name[PATH_MAX + 1]; #endif /* gather the old name info */ @@ -1372,15 +1372,24 @@ file_uncompress(char *file, char *outfil goto lose; } if (name[0] != 0) { +char *dp, *nf; + +/* strip saved directory name */ +nf = strrchr(name, '/'); +if (nf == NULL) + nf = name; +else + nf++; + /* preserve original directory name */ -char *dp = strrchr(file, '/'); +dp = strrchr(file, '/'); if (dp == NULL) dp = file; else dp++; snprintf(outfile, outsize, "%.*s%.*s", (int) (dp - file), - file, (int) rbytes, name); + file, (int) rbytes, nf); } } }
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Feb 28 05:36:47 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1261 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.30 src/doc/CHANGES-6.0.7:1.1.2.31 --- src/doc/CHANGES-6.0.7:1.1.2.30 Mon Feb 23 08:15:19 2015 +++ src/doc/CHANGES-6.0.7 Sat Feb 28 05:36:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.30 2015/02/23 08:15:19 msaitoh Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.31 2015/02/28 05:36:47 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -4369,3 +4369,10 @@ external/bsd/bind/dist/lib/dns/zone.c Security patch for bind from ISC (to 9.9.6-P2). Only the change to lib/dns/zone.c is security relevant (CVE-2015-1349). [spz, ticket #1259] + +usr.bin/gzip/gzip.11.24 +usr.bin/gzip/gzip.c1.107 + + do not use directory paths present in gzip files with the -N flag. + [mrg, ticket #1261] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Feb 28 05:38:04 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1261 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.30 src/doc/CHANGES-6.1.6:1.1.2.31 --- src/doc/CHANGES-6.1.6:1.1.2.30 Mon Feb 23 07:20:52 2015 +++ src/doc/CHANGES-6.1.6 Sat Feb 28 05:38:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.30 2015/02/23 07:20:52 msaitoh Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.31 2015/02/28 05:38:04 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -4103,3 +4103,10 @@ external/bsd/bind/dist/lib/dns/zone.c Security patch for bind from ISC (to 9.9.6-P2). Only the change to lib/dns/zone.c is security relevant (CVE-2015-1349). [spz, ticket #1259] + +usr.bin/gzip/gzip.11.24 +usr.bin/gzip/gzip.c1.107 + + do not use directory paths present in gzip files with the -N flag. + [mrg, ticket #1261] +
CVS commit: [netbsd-6-1] src/usr.bin/gzip
Module Name:src Committed By: snj Date: Sat Feb 28 05:37:43 UTC 2015 Modified Files: src/usr.bin/gzip [netbsd-6-1]: gzip.1 gzip.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1261): usr.bin/gzip/gzip.1: revision 1.24 usr.bin/gzip/gzip.c: revision 1.107 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.21 -r1.21.16.1 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.105 -r1.105.16.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/usr.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.21 src/usr.bin/gzip/gzip.1:1.21.16.1 --- src/usr.bin/gzip/gzip.1:1.21 Sun Jun 19 02:22:36 2011 +++ src/usr.bin/gzip/gzip.1 Sat Feb 28 05:37:42 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $ +.\" $NetBSD: gzip.1,v 1.21.16.1 2015/02/28 05:37:42 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.16.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 05:37:42 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.16.1 2015/02/28 05:37:42 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("$NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $"); +__RCSID("$NetBSD: gzip.c,v 1.105.16.1 2015/02/28 05:37:42 snj Exp $"); #endif /* not lint */ /* @@ -160,7 +160,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "NetBSD gzip 20101018"; +static const char gzip_version[] = "NetBSD gzip 20150113"; static int cflag; /* stdout mode */ static int dflag; /* decompress mode */ @@ -1311,7 +1311,7 @@ file_uncompress(char *file, char *outfil #ifndef SMALL ssize_t rv; time_t timestamp = 0; - unsigned char name[PATH_MAX + 1]; + char name[PATH_MAX + 1]; #endif /* gather the old name info */ @@ -1372,15 +1372,24 @@ file_uncompress(char *file, char *outfil goto lose; } if (name[0] != 0) { +char *dp, *nf; + +/* strip saved directory name */ +nf = strrchr(name, '/'); +if (nf == NULL) + nf = name; +else + nf++; + /* preserve original directory name */ -char *dp = strrchr(file, '/'); +dp = strrchr(file, '/'); if (dp == NULL) dp = file; else dp++; snprintf(outfile, outsize, "%.*s%.*s", (int) (dp - file), - file, (int) rbytes, name); + file, (int) rbytes, nf); } } }
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo
Module Name:src Committed By: riastradh Date: Sat Feb 28 05:38:49 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo: nouveau_engine_fifo_nvc0.c nouveau_engine_fifo_nve0.c Log Message: These are uninterruptible upstream too. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.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/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.3 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.3 Sat Feb 28 03:33:22 2015 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c Sat Feb 28 05:38:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $ */ +/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.4 2015/02/28 05:38:49 riastradh Exp $ */ /* * Copyright 2012 Red Hat Inc. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.4 2015/02/28 05:38:49 riastradh Exp $"); #include #include @@ -119,7 +119,7 @@ nvc0_fifo_runlist_update(struct nvc0_fif int ret; spin_lock(&priv->runlist.lock); - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &priv->runlist.wait, + DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &priv->runlist.wait, &priv->runlist.lock, msecs_to_jiffies(2000), !(nv_rd32(priv, 0x00227c) & 0x0010)); if (ret == 0) Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.3 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.3 Sat Feb 28 03:33:22 2015 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c Sat Feb 28 05:38:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $ */ +/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.4 2015/02/28 05:38:49 riastradh Exp $ */ /* * Copyright 2012 Red Hat Inc. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.3 2015/02/28 03:33:22 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.4 2015/02/28 05:38:49 riastradh Exp $"); #include #include @@ -140,7 +140,7 @@ nve0_fifo_runlist_update(struct nve0_fif int ret; spin_lock(&engn->lock); - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &engn->wait, &engn->lock, + DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &engn->wait, &engn->lock, msecs_to_jiffies(2000), !(nv_rd32(priv, 0x002284 + (engine * 0x08)) & 0x0010));
CVS commit: [netbsd-6] src/usr.bin/gzip
Module Name:src Committed By: snj Date: Sat Feb 28 05:38:38 UTC 2015 Modified Files: src/usr.bin/gzip [netbsd-6]: gzip.1 gzip.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1261): usr.bin/gzip/gzip.1: revision 1.24 usr.bin/gzip/gzip.c: revision 1.107 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.21 -r1.21.4.1 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.105 -r1.105.4.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/usr.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.21 src/usr.bin/gzip/gzip.1:1.21.4.1 --- src/usr.bin/gzip/gzip.1:1.21 Sun Jun 19 02:22:36 2011 +++ src/usr.bin/gzip/gzip.1 Sat Feb 28 05:38:37 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $ +.\" $NetBSD: gzip.1,v 1.21.4.1 2015/02/28 05:38:37 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.4.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 05:38:37 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.4.1 2015/02/28 05:38:37 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("$NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $"); +__RCSID("$NetBSD: gzip.c,v 1.105.4.1 2015/02/28 05:38:37 snj Exp $"); #endif /* not lint */ /* @@ -160,7 +160,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "NetBSD gzip 20101018"; +static const char gzip_version[] = "NetBSD gzip 20150113"; static int cflag; /* stdout mode */ static int dflag; /* decompress mode */ @@ -1311,7 +1311,7 @@ file_uncompress(char *file, char *outfil #ifndef SMALL ssize_t rv; time_t timestamp = 0; - unsigned char name[PATH_MAX + 1]; + char name[PATH_MAX + 1]; #endif /* gather the old name info */ @@ -1372,15 +1372,24 @@ file_uncompress(char *file, char *outfil goto lose; } if (name[0] != 0) { +char *dp, *nf; + +/* strip saved directory name */ +nf = strrchr(name, '/'); +if (nf == NULL) + nf = name; +else + nf++; + /* preserve original directory name */ -char *dp = strrchr(file, '/'); +dp = strrchr(file, '/'); if (dp == NULL) dp = file; else dp++; snprintf(outfile, outsize, "%.*s%.*s", (int) (dp - file), - file, (int) rbytes, name); + file, (int) rbytes, nf); } } }
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Feb 28 05:39:00 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1261 To generate a diff of this commit: cvs rdiff -u -r1.1.2.199 -r1.1.2.200 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.199 src/doc/CHANGES-6.2:1.1.2.200 --- src/doc/CHANGES-6.2:1.1.2.199 Fri Feb 27 20:22:36 2015 +++ src/doc/CHANGES-6.2 Sat Feb 28 05:39:00 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.199 2015/02/27 20:22:36 martin Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.200 2015/02/28 05:39:00 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -9675,3 +9675,9 @@ sys/fs/puffs/puffs_vnops.c 1.200-1.202 Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE. [manu, ticket #1260] +usr.bin/gzip/gzip.11.24 +usr.bin/gzip/gzip.c1.107 + + do not use directory paths present in gzip files with the -N flag. + [mrg, ticket #1261] +
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Sat Feb 28 05:42:07 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_pm.c Log Message: Another upstream uninterruptible. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.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/radeon/radeon_pm.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.c Sat Feb 28 05:42:07 2015 @@ -159,7 +159,7 @@ static void radeon_sync_with_vblank(stru spin_lock(&rdev->irq.vblank_lock); rdev->pm.vblank_sync = false; - DRM_SPIN_TIMED_WAIT_UNTIL(ret, &rdev->irq.vblank_queue, + DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &rdev->irq.vblank_queue, &rdev->irq.vblank_lock, msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT), rdev->pm.vblank_sync);
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Sat Feb 28 07:59:36 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: 557 To generate a diff of this commit: cvs rdiff -u -r1.1.2.215 -r1.1.2.216 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.215 src/doc/CHANGES-7.0:1.1.2.216 --- src/doc/CHANGES-7.0:1.1.2.215 Fri Feb 27 19:41:34 2015 +++ src/doc/CHANGES-7.0 Sat Feb 28 07:59:36 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.215 2015/02/27 19:41:34 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.216 2015/02/28 07:59:36 snj Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -16225,3 +16225,17 @@ sys/fs/puffs/puffs_vnops.c 1.200-1.202 Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE. [manu, ticket #555] +external/zlib/pigz/dist/pigz.c 1.2 +usr.bin/gzip/gzip.11.24 +usr.bin/gzip/gzip.c1.107 + + pigz: 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. + gzip: do not use directory paths present in gzip files with the + -N flag. + [mrg, ticket #557] +