From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 00:26:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30ED6F4E; Sun, 11 Jan 2015 00:26:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4F195F; Sun, 11 Jan 2015 00:26:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B0QIoN056251; Sun, 11 Jan 2015 00:26:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B0QI6B056250; Sun, 11 Jan 2015 00:26:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501110026.t0B0QI6B056250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Jan 2015 00:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276952 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 00:26:19 -0000 Author: mav Date: Sun Jan 11 00:26:18 2015 New Revision: 276952 URL: https://svnweb.freebsd.org/changeset/base/276952 Log: Add LBA as secondary sort key for synchronous I/O requests. On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz) precision. It makes primary sort key (timestamp) collision very possible. In such situations sorting by secondary key of LBA is much more reasonable then by totally meaningless zio pointer value. With this change on multi-threaded synchronous ZVOL read I've measured 10% throughput increase and average latency reduction. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Jan 10 23:43:39 2015 (r276951) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan 11 00:26:18 2015 (r276952) @@ -301,6 +301,11 @@ vdev_queue_timestamp_compare(const void if (z1->io_timestamp > z2->io_timestamp) return (1); + if (z1->io_offset < z2->io_offset) + return (-1); + if (z1->io_offset > z2->io_offset) + return (1); + if (z1 < z2) return (-1); if (z1 > z2) From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 01:38:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66FFA541; Sun, 11 Jan 2015 01:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51FC9E7C; Sun, 11 Jan 2015 01:38:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B1cX6u088479; Sun, 11 Jan 2015 01:38:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B1cXrB088478; Sun, 11 Jan 2015 01:38:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501110138.t0B1cXrB088478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 01:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276953 - stable/10/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 01:38:33 -0000 Author: gjb Date: Sun Jan 11 01:38:32 2015 New Revision: 276953 URL: https://svnweb.freebsd.org/changeset/base/276953 Log: MFC r276765, r276766, r276820, r276822, r276827, r276828: r276765: Update pkg-stage.sh to be compatible with pkg-1.4.x. In 1.3.x and earlier, ABI format is, for example, freebsd:11:x86:64. In 1.4.x, ABI format is FreeBSD:11:amd64, and a new configuration entry, ALTABI, is: freebsd:11:x86:64. Export PKG_ABI and PKG_ALTABI accordingly, and if PKG_ALTABI is set, create a symlink within the dvd PKG_CACHEDIR so both new and old ABI directories exist. r276766: Properly change directories before creating the PKG_ALTABI -> PKG_ABI symlink. r276820: Print informational output when NOPORTS is set, which would otherwise cause pkg-stage.sh to silently exit. r276822: Ensure /var/run/ld-elf.so.hints exists before building pkg(8). r276827: Ensure the ports directories exist for the list of packages intended to be included on the DVD, and remove any nonexistent ports from the final list. Print the list of missing paths, and ensure that DVD_PACKAGES is non-zero length (which should never happen). r276828: Switch to x11/gnome3 now that x11/gnome2 no longer exists in the ports tree. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/scripts/pkg-stage.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/scripts/pkg-stage.sh ============================================================================== --- stable/10/release/scripts/pkg-stage.sh Sun Jan 11 00:26:18 2015 (r276952) +++ stable/10/release/scripts/pkg-stage.sh Sun Jan 11 01:38:32 2015 (r276953) @@ -11,7 +11,7 @@ export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" -DVD_PACKAGES="archivers/unzip +_DVD_PACKAGES="archivers/unzip devel/subversion devel/subversion-static emulators/linux_base-f10 @@ -27,23 +27,51 @@ sysutils/screen www/firefox www/links x11-drivers/xf86-video-vmware -x11/gnome2 +x11/gnome3 x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f /usr/ports/Makefile ]; then + echo "*** /usr/ports is missing! ***" + echo "*** Skipping pkg-stage.sh ***" + echo "*** Unset NOPORTS to fix this ***" exit 0 fi if [ ! -x /usr/local/sbin/pkg ]; then + /etc/rc.d/ldconfig restart /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi +export DVD_DIR="dvd/packages" export PKG_ABI=$(pkg config ABI) -export PKG_REPODIR="dvd/packages/${PKG_ABI}" +export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null) +export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}" /bin/mkdir -p ${PKG_REPODIR} +if [ ! -z "${PKG_ALTABI}" ]; then + (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI}) +fi + +# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the +# final list. +for _P in ${_DVD_PACKAGES}; do + if [ -d "/usr/ports/${_P}" ]; then + DVD_PACKAGES="${DVD_PACKAGES} ${_P}" + else + echo "*** Skipping nonexistent port: ${_P}" + fi +done + +# Make sure the package list is not empty. +if [ -z "${DVD_PACKAGES}" ]; then + echo "*** The package list is empty." + echo "*** Something is very wrong." + # Exit '0' so the rest of the build process continues + # so other issues (if any) can be addressed as well. + exit 0 +fi # Print pkg(8) information to make debugging easier. ${PKGCMD} -vv From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 01:49:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F16896E0; Sun, 11 Jan 2015 01:49:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC93EF4C; Sun, 11 Jan 2015 01:49:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B1nrEv093365; Sun, 11 Jan 2015 01:49:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B1nrUj093364; Sun, 11 Jan 2015 01:49:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501110149.t0B1nrUj093364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 01:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276954 - stable/9/release/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 01:49:54 -0000 Author: gjb Date: Sun Jan 11 01:49:52 2015 New Revision: 276954 URL: https://svnweb.freebsd.org/changeset/base/276954 Log: MFC r271480, r271483, r271491, r276765, r276766, r276820, r276822, r276827, r276828: r271480: Set PKG_CACHEDIR to an 'All/' directory one level lower to fix 'pkg repo' generating repository metadata for the on-disc packages. r271483: Fix duplicate PKG_ABI in the PKG_CACHEDIR path. r271491: Simplify dvd package population with pkg-1.3. r276765: Update pkg-stage.sh to be compatible with pkg-1.4.x. In 1.3.x and earlier, ABI format is, for example, freebsd:11:x86:64. In 1.4.x, ABI format is FreeBSD:11:amd64, and a new configuration entry, ALTABI, is: freebsd:11:x86:64. Export PKG_ABI and PKG_ALTABI accordingly, and if PKG_ALTABI is set, create a symlink within the dvd PKG_CACHEDIR so both new and old ABI directories exist. r276766: Properly change directories before creating the PKG_ALTABI -> PKG_ABI symlink. r276820: Print informational output when NOPORTS is set, which would otherwise cause pkg-stage.sh to silently exit. r276822: Ensure /var/run/ld-elf.so.hints exists before building pkg(8). r276827: Ensure the ports directories exist for the list of packages intended to be included on the DVD, and remove any nonexistent ports from the final list. Print the list of missing paths, and ensure that DVD_PACKAGES is non-zero length (which should never happen). r276828: Switch to x11/gnome3 now that x11/gnome2 no longer exists in the ports tree. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/scripts/pkg-stage.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/scripts/pkg-stage.sh ============================================================================== --- stable/9/release/scripts/pkg-stage.sh Sun Jan 11 01:38:32 2015 (r276953) +++ stable/9/release/scripts/pkg-stage.sh Sun Jan 11 01:49:52 2015 (r276954) @@ -11,7 +11,7 @@ export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" -DVD_PACKAGES="archivers/unzip +_DVD_PACKAGES="archivers/unzip devel/subversion devel/subversion-static emulators/linux_base-f10 @@ -27,33 +27,58 @@ sysutils/screen www/firefox www/links x11-drivers/xf86-video-vmware -x11/gnome2 +x11/gnome3 x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f /usr/ports/Makefile ]; then + echo "*** /usr/ports is missing! ***" + echo "*** Skipping pkg-stage.sh ***" + echo "*** Unset NOPORTS to fix this ***" exit 0 fi if [ ! -x /usr/local/sbin/pkg ]; then + /etc/rc.d/ldconfig restart /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi -PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}') -PKG_ABI="${PKG_ABI%\";}" -PKG_ABI="${PKG_ABI#\"}" -export PKG_ABI -export PKG_CACHEDIR="dvd/packages/${PKG_ABI}" +export DVD_DIR="dvd/packages" +export PKG_ABI=$(pkg config ABI) +export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null) +export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}" + +/bin/mkdir -p ${PKG_REPODIR} +if [ ! -z "${PKG_ALTABI}" ]; then + (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI}) +fi -/bin/mkdir -p ${PKG_CACHEDIR} +# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the +# final list. +for _P in ${_DVD_PACKAGES}; do + if [ -d "/usr/ports/${_P}" ]; then + DVD_PACKAGES="${DVD_PACKAGES} ${_P}" + else + echo "*** Skipping nonexistent port: ${_P}" + fi +done + +# Make sure the package list is not empty. +if [ -z "${DVD_PACKAGES}" ]; then + echo "*** The package list is empty." + echo "*** Something is very wrong." + # Exit '0' so the rest of the build process continues + # so other issues (if any) can be addressed as well. + exit 0 +fi # Print pkg(8) information to make debugging easier. ${PKGCMD} -vv ${PKGCMD} update -f -${PKGCMD} fetch -d ${DVD_PACKAGES} +${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES} -${PKGCMD} repo ${PKG_CACHEDIR} +${PKGCMD} repo ${PKG_REPODIR} # Always exit '0', even if pkg(8) complains about conflicts. exit 0 From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 07:02:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 539CE16F; Sun, 11 Jan 2015 07:02:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3500DD98; Sun, 11 Jan 2015 07:02:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B725nH039935; Sun, 11 Jan 2015 07:02:05 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B723dO039929; Sun, 11 Jan 2015 07:02:03 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501110702.t0B723dO039929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 11 Jan 2015 07:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276955 - in stable/10/sys: compat/freebsd32 compat/linux kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 07:02:05 -0000 Author: dchagin Date: Sun Jan 11 07:02:03 2015 New Revision: 276955 URL: https://svnweb.freebsd.org/changeset/base/276955 Log: MFC r276564, r276654: Cast *path to silence clang -Wpointer-sign warning. Indeed, instead of hiding the kern___getcwd() bug by bogus cast in r276564, change path type to char * (pathnames are always char *). And remove bogus casts of malloc(). kern___getcwd() internally doesn't actually use or support u_char * paths, except to copy them to a normal char * path. These changes are not visible to libc as libc/gen/getcwd.c misdeclares __getcwd() as taking a plain char * path. While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as we always have sysproto.h. Modified: stable/10/sys/compat/freebsd32/syscalls.master stable/10/sys/compat/linux/linux_getcwd.c stable/10/sys/kern/syscalls.master stable/10/sys/kern/vfs_cache.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/10/sys/compat/freebsd32/syscalls.master Sun Jan 11 01:49:52 2015 (r276954) +++ stable/10/sys/compat/freebsd32/syscalls.master Sun Jan 11 07:02:03 2015 (r276955) @@ -583,7 +583,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL NOPROTO { int mlockall(int how); } 325 AUE_MUNLOCKALL NOPROTO { int munlockall(void); } -326 AUE_GETCWD NOPROTO { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD NOPROTO { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL NOPROTO { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: stable/10/sys/compat/linux/linux_getcwd.c ============================================================================== --- stable/10/sys/compat/linux/linux_getcwd.c Sun Jan 11 01:49:52 2015 (r276954) +++ stable/10/sys/compat/linux/linux_getcwd.c Sun Jan 11 07:02:03 2015 (r276955) @@ -186,7 +186,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bu dirbuflen = DIRBLKSIZ; if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); #if 0 unionread: @@ -413,7 +413,7 @@ out: int linux_getcwd(struct thread *td, struct linux_getcwd_args *args) { - caddr_t bp, bend, path; + char *bp, *bend, *path; int error, len, lenused; #ifdef DEBUG @@ -428,7 +428,7 @@ linux_getcwd(struct thread *td, struct l else if (len < 2) return ERANGE; - path = (char *)malloc(len, M_TEMP, M_WAITOK); + path = malloc(len, M_TEMP, M_WAITOK); error = kern___getcwd(td, path, UIO_SYSSPACE, len); if (!error) { Modified: stable/10/sys/kern/syscalls.master ============================================================================== --- stable/10/sys/kern/syscalls.master Sun Jan 11 01:49:52 2015 (r276954) +++ stable/10/sys/kern/syscalls.master Sun Jan 11 07:02:03 2015 (r276955) @@ -571,7 +571,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL STD { int mlockall(int how); } 325 AUE_MUNLOCKALL STD { int munlockall(void); } -326 AUE_GETCWD STD { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD STD { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL STD { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: stable/10/sys/kern/vfs_cache.c ============================================================================== --- stable/10/sys/kern/vfs_cache.c Sun Jan 11 01:49:52 2015 (r276954) +++ stable/10/sys/kern/vfs_cache.c Sun Jan 11 07:02:03 2015 (r276955) @@ -1044,14 +1044,6 @@ vfs_cache_lookup(ap) return (error); } - -#ifndef _SYS_SYSPROTO_H_ -struct __getcwd_args { - u_char *buf; - u_int buflen; -}; -#endif - /* * XXX All of these sysctls would probably be more productive dead. */ @@ -1070,7 +1062,7 @@ sys___getcwd(td, uap) } int -kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen) +kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen) { char *bp, *tmpbuf; struct filedesc *fdp; Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Sun Jan 11 01:49:52 2015 (r276954) +++ stable/10/sys/sys/syscallsubr.h Sun Jan 11 07:02:03 2015 (r276955) @@ -57,7 +57,7 @@ struct stat; struct thr_param; struct __wrusage; -int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, +int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 07:04:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC9232D9; Sun, 11 Jan 2015 07:04:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE091DAC; Sun, 11 Jan 2015 07:04:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B74Mi3040236; Sun, 11 Jan 2015 07:04:22 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B74JdO040221; Sun, 11 Jan 2015 07:04:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501110704.t0B74JdO040221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 11 Jan 2015 07:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276956 - in stable/10/sys: compat/freebsd32 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 07:04:22 -0000 Author: dchagin Date: Sun Jan 11 07:04:18 2015 New Revision: 276956 URL: https://svnweb.freebsd.org/changeset/base/276956 Log: Regen for r276955 (__getcwd path bug). Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c stable/10/sys/kern/init_sysent.c stable/10/sys/kern/syscalls.c stable/10/sys/kern/systrace_args.c stable/10/sys/sys/syscall.h stable/10/sys/sys/syscall.mk stable/10/sys/sys/sysproto.h Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ #define FREEBSD32_SYS_syscall 0 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ const char *freebsd32_syscallnames[] = { Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ #include "opt_compat.h" Modified: stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 11 07:04:18 2015 (r276956) @@ -1615,7 +1615,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -5873,7 +5873,7 @@ systrace_entry_setargdesc(int sysnum, in case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/kern/init_sysent.c Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ #include "opt_compat.h" Modified: stable/10/sys/kern/syscalls.c ============================================================================== --- stable/10/sys/kern/syscalls.c Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/kern/syscalls.c Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ const char *syscallnames[] = { Modified: stable/10/sys/kern/systrace_args.c ============================================================================== --- stable/10/sys/kern/systrace_args.c Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/kern/systrace_args.c Sun Jan 11 07:04:18 2015 (r276956) @@ -1712,7 +1712,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -6122,7 +6122,7 @@ systrace_entry_setargdesc(int sysnum, in case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: stable/10/sys/sys/syscall.h ============================================================================== --- stable/10/sys/sys/syscall.h Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/sys/syscall.h Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ #define SYS_syscall 0 Modified: stable/10/sys/sys/syscall.mk ============================================================================== --- stable/10/sys/sys/syscall.mk Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/sys/syscall.mk Sun Jan 11 07:04:18 2015 (r276956) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin +# created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin MIASM = \ syscall.o \ exit.o \ Modified: stable/10/sys/sys/sysproto.h ============================================================================== --- stable/10/sys/sys/sysproto.h Sun Jan 11 07:02:03 2015 (r276955) +++ stable/10/sys/sys/sysproto.h Sun Jan 11 07:04:18 2015 (r276956) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin + * created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin */ #ifndef _SYS_SYSPROTO_H_ @@ -905,7 +905,7 @@ struct munlockall_args { register_t dummy; }; struct __getcwd_args { - char buf_l_[PADL_(u_char *)]; u_char * buf; char buf_r_[PADR_(u_char *)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char buflen_l_[PADL_(u_int)]; u_int buflen; char buflen_r_[PADR_(u_int)]; }; struct sched_setparam_args { From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 07:10:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBF3042C; Sun, 11 Jan 2015 07:10:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB9C5E54; Sun, 11 Jan 2015 07:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B7AjJn041063; Sun, 11 Jan 2015 07:10:45 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B7AiGc041054; Sun, 11 Jan 2015 07:10:44 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501110710.t0B7AiGc041054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 11 Jan 2015 07:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276957 - in stable/9/sys: compat/freebsd32 compat/linux kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 07:10:46 -0000 Author: dchagin Date: Sun Jan 11 07:10:43 2015 New Revision: 276957 URL: https://svnweb.freebsd.org/changeset/base/276957 Log: MFC r276564, r276654: Cast *path to silence clang -Wpointer-sign warning. Instead of hiding the kern___getcwd() bug by bogus cast in r276564, change path type to char * (pathnames are always char *). And remove bogus casts of malloc(). kern___getcwd() internally doesn't actually use or support u_char * paths, except to copy them to a normal char * path. These changes are not visible to libc as libc/gen/getcwd.c misdeclares __getcwd() as taking a plain char * path. While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as we always have sysproto.h. Modified: stable/9/sys/compat/freebsd32/syscalls.master stable/9/sys/compat/linux/linux_getcwd.c stable/9/sys/kern/syscalls.master stable/9/sys/kern/vfs_cache.c stable/9/sys/sys/syscallsubr.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/9/sys/compat/freebsd32/syscalls.master Sun Jan 11 07:04:18 2015 (r276956) +++ stable/9/sys/compat/freebsd32/syscalls.master Sun Jan 11 07:10:43 2015 (r276957) @@ -580,7 +580,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL NOPROTO { int mlockall(int how); } 325 AUE_MUNLOCKALL NOPROTO { int munlockall(void); } -326 AUE_GETCWD NOPROTO { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD NOPROTO { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL NOPROTO { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: stable/9/sys/compat/linux/linux_getcwd.c ============================================================================== --- stable/9/sys/compat/linux/linux_getcwd.c Sun Jan 11 07:04:18 2015 (r276956) +++ stable/9/sys/compat/linux/linux_getcwd.c Sun Jan 11 07:10:43 2015 (r276957) @@ -186,7 +186,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bu dirbuflen = DIRBLKSIZ; if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); #if 0 unionread: @@ -413,7 +413,7 @@ out: int linux_getcwd(struct thread *td, struct linux_getcwd_args *args) { - caddr_t bp, bend, path; + char *bp, *bend, *path; int error, len, lenused; #ifdef DEBUG @@ -428,7 +428,7 @@ linux_getcwd(struct thread *td, struct l else if (len < 2) return ERANGE; - path = (char *)malloc(len, M_TEMP, M_WAITOK); + path = malloc(len, M_TEMP, M_WAITOK); error = kern___getcwd(td, path, UIO_SYSSPACE, len); if (!error) { Modified: stable/9/sys/kern/syscalls.master ============================================================================== --- stable/9/sys/kern/syscalls.master Sun Jan 11 07:04:18 2015 (r276956) +++ stable/9/sys/kern/syscalls.master Sun Jan 11 07:10:43 2015 (r276957) @@ -569,7 +569,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL STD { int mlockall(int how); } 325 AUE_MUNLOCKALL STD { int munlockall(void); } -326 AUE_GETCWD STD { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD STD { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL STD { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: stable/9/sys/kern/vfs_cache.c ============================================================================== --- stable/9/sys/kern/vfs_cache.c Sun Jan 11 07:04:18 2015 (r276956) +++ stable/9/sys/kern/vfs_cache.c Sun Jan 11 07:10:43 2015 (r276957) @@ -1044,14 +1044,6 @@ vfs_cache_lookup(ap) return (error); } - -#ifndef _SYS_SYSPROTO_H_ -struct __getcwd_args { - u_char *buf; - u_int buflen; -}; -#endif - /* * XXX All of these sysctls would probably be more productive dead. */ @@ -1070,7 +1062,7 @@ sys___getcwd(td, uap) } int -kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen) +kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen) { char *bp, *tmpbuf; struct filedesc *fdp; Modified: stable/9/sys/sys/syscallsubr.h ============================================================================== --- stable/9/sys/sys/syscallsubr.h Sun Jan 11 07:04:18 2015 (r276956) +++ stable/9/sys/sys/syscallsubr.h Sun Jan 11 07:10:43 2015 (r276957) @@ -56,7 +56,7 @@ struct stat; struct thr_param; struct __wrusage; -int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, +int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 07:13:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41D23565; Sun, 11 Jan 2015 07:13:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23B0CE64; Sun, 11 Jan 2015 07:13:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B7DRVj044835; Sun, 11 Jan 2015 07:13:27 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B7DOfW044822; Sun, 11 Jan 2015 07:13:24 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501110713.t0B7DOfW044822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 11 Jan 2015 07:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276958 - in stable/9/sys: compat/freebsd32 kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 07:13:27 -0000 Author: dchagin Date: Sun Jan 11 07:13:23 2015 New Revision: 276958 URL: https://svnweb.freebsd.org/changeset/base/276958 Log: Regen for r276957 (__getcwd() path bug). Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h stable/9/sys/compat/freebsd32/freebsd32_syscall.h stable/9/sys/compat/freebsd32/freebsd32_syscalls.c stable/9/sys/compat/freebsd32/freebsd32_sysent.c stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c stable/9/sys/kern/init_sysent.c stable/9/sys/kern/syscalls.c stable/9/sys/kern/systrace_args.c stable/9/sys/sys/syscall.h stable/9/sys/sys/syscall.mk stable/9/sys/sys/sysproto.h Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/9/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ #define FREEBSD32_SYS_syscall 0 Modified: stable/9/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ const char *freebsd32_syscallnames[] = { Modified: stable/9/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ #include "opt_compat.h" Modified: stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 11 07:13:23 2015 (r276958) @@ -1594,7 +1594,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -5698,7 +5698,7 @@ systrace_setargdesc(int sysnum, int ndx, case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: stable/9/sys/kern/init_sysent.c ============================================================================== --- stable/9/sys/kern/init_sysent.c Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/kern/init_sysent.c Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/kern/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ #include "opt_compat.h" @@ -525,19 +525,19 @@ struct sysent sysent[] = { { AS(cpuset_setaffinity_args), (sy_call_t *)sys_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 488 = cpuset_setaffinity */ { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 489 = faccessat */ { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ - { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 491 = fchownat */ + { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ { AS(fexecve_args), (sy_call_t *)sys_fexecve, AUE_FEXECVE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 492 = fexecve */ { AS(fstatat_args), (sy_call_t *)sys_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 493 = fstatat */ { AS(futimesat_args), (sy_call_t *)sys_futimesat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 494 = futimesat */ - { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 495 = linkat */ + { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 495 = linkat */ { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 496 = mkdirat */ { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 497 = mkfifoat */ { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 498 = mknodat */ { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 499 = openat */ - { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 500 = readlinkat */ + { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 500 = readlinkat */ { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 501 = renameat */ - { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 502 = symlinkat */ - { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 503 = unlinkat */ + { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 502 = symlinkat */ + { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 503 = unlinkat */ { AS(posix_openpt_args), (sy_call_t *)sys_posix_openpt, AUE_POSIX_OPENPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 504 = posix_openpt */ { AS(gssd_syscall_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 505 = gssd_syscall */ { AS(jail_get_args), (sy_call_t *)sys_jail_get, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 506 = jail_get */ Modified: stable/9/sys/kern/syscalls.c ============================================================================== --- stable/9/sys/kern/syscalls.c Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/kern/syscalls.c Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/kern/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ const char *syscallnames[] = { Modified: stable/9/sys/kern/systrace_args.c ============================================================================== --- stable/9/sys/kern/systrace_args.c Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/kern/systrace_args.c Sun Jan 11 07:13:23 2015 (r276958) @@ -1691,7 +1691,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -5971,7 +5971,7 @@ systrace_setargdesc(int sysnum, int ndx, case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: stable/9/sys/sys/syscall.h ============================================================================== --- stable/9/sys/sys/syscall.h Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/sys/syscall.h Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/kern/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ #define SYS_syscall 0 Modified: stable/9/sys/sys/syscall.mk ============================================================================== --- stable/9/sys/sys/syscall.mk Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/sys/syscall.mk Sun Jan 11 07:13:23 2015 (r276958) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/9/sys/kern/syscalls.master 260208 2014-01-02 21:57:03Z jhb +# created from FreeBSD: stable/9/sys/kern/syscalls.master 276957 2015-01-11 07:10:43Z dchagin MIASM = \ syscall.o \ exit.o \ Modified: stable/9/sys/sys/sysproto.h ============================================================================== --- stable/9/sys/sys/sysproto.h Sun Jan 11 07:10:43 2015 (r276957) +++ stable/9/sys/sys/sysproto.h Sun Jan 11 07:13:23 2015 (r276958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 260208 2014-01-02 21:57:03Z jhb + * created from FreeBSD: stable/9/sys/kern/syscalls.master 276957 2015-01-11 07:10:43Z dchagin */ #ifndef _SYS_SYSPROTO_H_ @@ -895,7 +895,7 @@ struct munlockall_args { register_t dummy; }; struct __getcwd_args { - char buf_l_[PADL_(u_char *)]; u_char * buf; char buf_r_[PADR_(u_char *)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char buflen_l_[PADL_(u_int)]; u_int buflen; char buflen_r_[PADR_(u_int)]; }; struct sched_setparam_args { From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 07:52:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29F91816; Sun, 11 Jan 2015 07:52:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15C8E1B6; Sun, 11 Jan 2015 07:52:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B7q0jw062854; Sun, 11 Jan 2015 07:52:00 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B7pwHe062831; Sun, 11 Jan 2015 07:51:58 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501110751.t0B7pwHe062831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 11 Jan 2015 07:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276959 - in head/sys/dev/cxgb: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 07:52:01 -0000 Author: np Date: Sun Jan 11 07:51:58 2015 New Revision: 276959 URL: https://svnweb.freebsd.org/changeset/base/276959 Log: cxgb: replace r273280 with a more comprehensive fix. Poll for link state when the link is down, even for interrupt capable PHYs. Allow PHYs to report a dubious "partial" link. If this state is seen 3 consecutive times (each check is ~1s apart) then reset the PHY. This is a workaround for a situation where repeatedly toggling the link from the peer gets the AEL2005 PHY into a state where it never establishes a PCS block lock even when everything is in order. MFC after: 1 week Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c head/sys/dev/cxgb/common/cxgb_aq100x.c head/sys/dev/cxgb/common/cxgb_common.h head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/cxgb/common/cxgb_tn1010.c head/sys/dev/cxgb/common/cxgb_vsc8211.c head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 11 07:51:58 2015 (r276959) @@ -283,10 +283,10 @@ static int ael1002_intr_noop(struct cphy /* * Get link status for a 10GBASE-R device. */ -static int get_link_status_r(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_r(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -296,10 +296,16 @@ static int get_link_status_r(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; - if (*link_ok == 0) - return (0); + stat0 &= 1; + stat1 &= 1; + stat2 = (stat2 >> 12) & 1; + if (stat0 & stat1 & stat2) + *link_state = PHY_LINK_UP; + else if (stat0 == 1 && stat1 == 0 && stat2 == 1) + *link_state = PHY_LINK_PARTIAL; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -1345,10 +1351,8 @@ static int ael2005_intr_handler(struct c return ret; ret |= cause; - if (!ret) { - (void) ael2005_reset(phy, 0); + if (!ret) ret |= cphy_cause_link_change; - } return ret; } @@ -2156,10 +2160,10 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, /* * Get link status for a 10GBASE-X device. */ -static int get_link_status_x(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_x(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -2169,7 +2173,10 @@ static int get_link_status_x(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1; + if ((stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1) + *link_state = PHY_LINK_UP; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -2230,10 +2237,10 @@ static int xaui_direct_reset(struct cphy return 0; } -static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, +static int xaui_direct_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int status; adapter_t *adapter = phy->adapter; @@ -2245,7 +2252,7 @@ static int xaui_direct_get_link_status(s XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) | t3_read_reg(adapter, XGM_REG(A_XGM_SERDES_STAT3, phy->addr)); - *link_ok = !(status & F_LOWSIG0); + *link_state = status & F_LOWSIG0 ? PHY_LINK_DOWN : PHY_LINK_UP; } if (speed) *speed = SPEED_10000; Modified: head/sys/dev/cxgb/common/cxgb_aq100x.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 11 07:51:58 2015 (r276959) @@ -350,7 +350,7 @@ aq100x_set_speed_duplex(struct cphy *phy } static int -aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, +aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { int err; @@ -440,8 +440,8 @@ aq100x_get_link_status(struct cphy *phy, link = 1; done: - if (link_ok) - *link_ok = link; + if (link_state) + *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN; return (0); } Modified: head/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- head/sys/dev/cxgb/common/cxgb_common.h Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_common.h Sun Jan 11 07:51:58 2015 (r276959) @@ -543,6 +543,12 @@ enum { phy_modtype_unknown }; +enum { + PHY_LINK_DOWN = 0, + PHY_LINK_UP, + PHY_LINK_PARTIAL +}; + /* PHY operations */ struct cphy_ops { int (*reset)(struct cphy *phy, int wait); @@ -558,7 +564,7 @@ struct cphy_ops { int (*advertise)(struct cphy *phy, unsigned int advertise_map); int (*set_loopback)(struct cphy *phy, int mmd, int dir, int enable); int (*set_speed_duplex)(struct cphy *phy, int speed, int duplex); - int (*get_link_status)(struct cphy *phy, int *link_ok, int *speed, + int (*get_link_status)(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc); int (*power_down)(struct cphy *phy, int enable); }; @@ -567,6 +573,7 @@ struct cphy_ops { struct cphy { u8 addr; /* PHY address */ u8 modtype; /* PHY module type */ + u8 rst; unsigned int priv; /* scratch pad */ unsigned int caps; /* PHY capabilities */ adapter_t *adapter; /* associated adapter */ Modified: head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 11 07:51:58 2015 (r276959) @@ -185,7 +185,7 @@ static int mv88e1xxx_set_loopback(struct on ? BMCR_LOOPBACK : 0); } -static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_ok, +static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { u32 status; @@ -206,8 +206,9 @@ static int mv88e1xxx_get_link_status(str else sp = SPEED_1000; } - if (link_ok) - *link_ok = (status & V_PSSR_LINK) != 0; + if (link_state) + *link_state = status & V_PSSR_LINK ? PHY_LINK_UP : + PHY_LINK_DOWN; if (speed) *speed = sp; if (duplex) Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 11 07:51:58 2015 (r276959) @@ -1520,7 +1520,7 @@ static void t3_clear_faults(adapter_t *a */ void t3_link_changed(adapter_t *adapter, int port_id) { - int link_ok, speed, duplex, fc, link_fault; + int link_ok, speed, duplex, fc, link_fault, link_state; struct port_info *pi = adap2pinfo(adapter, port_id); struct cphy *phy = &pi->phy; struct cmac *mac = &pi->mac; @@ -1532,7 +1532,14 @@ void t3_link_changed(adapter_t *adapter, fc = lc->fc; link_fault = 0; - phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + phy->ops->get_link_status(phy, &link_state, &speed, &duplex, &fc); + link_ok = (link_state == PHY_LINK_UP); + if (link_state != PHY_LINK_PARTIAL) + phy->rst = 0; + else if (++phy->rst == 3) { + phy->ops->reset(phy, 0); + phy->rst = 0; + } if (link_ok == 0) pi->link_fault = LF_NO; Modified: head/sys/dev/cxgb/common/cxgb_tn1010.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 11 07:51:58 2015 (r276959) @@ -129,7 +129,7 @@ static int tn1010_advertise(struct cphy ADVERTISE_LOOP_TIMING); } -static int tn1010_get_link_status(struct cphy *phy, int *link_ok, +static int tn1010_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int status, lpa, adv; @@ -139,8 +139,9 @@ static int tn1010_get_link_status(struct if (err) return err; - if (link_ok) - *link_ok = (status & F_LINK_STAT) != 0; + if (link_state) + *link_state = status & F_LINK_STAT ? PHY_LINK_UP : + PHY_LINK_DOWN; if (G_ANEG_STAT(status) == ANEG_COMPLETE) { sp = (status & F_ANEG_SPEED_1G) ? SPEED_1000 : SPEED_10000; Modified: head/sys/dev/cxgb/common/cxgb_vsc8211.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 11 07:51:58 2015 (r276959) @@ -129,7 +129,7 @@ static int vsc8211_autoneg_restart(struc BMCR_ANRESTART); } -static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -141,7 +141,7 @@ static int vsc8211_get_link_status(struc if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -150,7 +150,8 @@ static int vsc8211_get_link_status(struc err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; @@ -201,7 +202,7 @@ static int vsc8211_get_link_status(struc return 0; } -static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -213,7 +214,7 @@ static int vsc8211_get_link_status_fiber if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -222,7 +223,8 @@ static int vsc8211_get_link_status_fiber err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/cxgb_main.c Sun Jan 11 07:51:58 2015 (r276959) @@ -2289,7 +2289,8 @@ check_link_status(void *arg, int pending t3_link_changed(sc, pi->port_id); - if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ) || + pi->link_config.link_ok == 0) callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 08:36:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 068A7CD5; Sun, 11 Jan 2015 08:36:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E692D6D4; Sun, 11 Jan 2015 08:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B8aBJa081867; Sun, 11 Jan 2015 08:36:11 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B8aBLG081866; Sun, 11 Jan 2015 08:36:11 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201501110836.t0B8aBLG081866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Sun, 11 Jan 2015 08:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276960 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 08:36:12 -0000 Author: marck (doc committer) Date: Sun Jan 11 08:36:11 2015 New Revision: 276960 URL: https://svnweb.freebsd.org/changeset/base/276960 Log: MFH r276083: Add VAMI (VMware Appliance Management Interface) port. Modified: stable/10/etc/services Modified: stable/10/etc/services ============================================================================== --- stable/10/etc/services Sun Jan 11 07:51:58 2015 (r276959) +++ stable/10/etc/services Sun Jan 11 08:36:11 2015 (r276960) @@ -2343,6 +2343,8 @@ mdns 5353/tcp #Multicast DNS mdns 5353/udp #Multicast DNS postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database +vami 5480/tcp #VMware Appliance Management Interface, HTTPS-like +vami 5480/udp #VMware Appliance Management Interface, HTTPS-like rplay 5555/udp amqp 5672/sctp #AMQP amqp 5672/tcp #AMQP From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 08:40:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 680CFE0F; Sun, 11 Jan 2015 08:40:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F4C6E3; Sun, 11 Jan 2015 08:40:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B8e2Wa082459; Sun, 11 Jan 2015 08:40:02 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B8e2YU082458; Sun, 11 Jan 2015 08:40:02 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201501110840.t0B8e2YU082458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Sun, 11 Jan 2015 08:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276961 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 08:40:02 -0000 Author: marck (doc committer) Date: Sun Jan 11 08:40:01 2015 New Revision: 276961 URL: https://svnweb.freebsd.org/changeset/base/276961 Log: MFH r276083: Add VAMI (VMware Appliance Management Interface) port. Modified: stable/9/etc/services Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/services ============================================================================== --- stable/9/etc/services Sun Jan 11 08:36:11 2015 (r276960) +++ stable/9/etc/services Sun Jan 11 08:40:01 2015 (r276961) @@ -2343,6 +2343,8 @@ mdns 5353/tcp #Multicast DNS mdns 5353/udp #Multicast DNS postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database +vami 5480/tcp #VMware Appliance Management Interface, HTTPS-like +vami 5480/udp #VMware Appliance Management Interface, HTTPS-like rplay 5555/udp amqp 5672/sctp #AMQP amqp 5672/tcp #AMQP From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 08:40:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EBF8F3A; Sun, 11 Jan 2015 08:40:22 +0000 (UTC) Received: from mail-yk0-x236.google.com (mail-yk0-x236.google.com [IPv6:2607:f8b0:4002:c07::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB6D6E6; Sun, 11 Jan 2015 08:40:22 +0000 (UTC) Received: by mail-yk0-f182.google.com with SMTP id 131so7192118ykp.13; Sun, 11 Jan 2015 00:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1UetdXpWI1EYSSfc4CqErtC0l7+n5yuXkGF1rB38h84=; b=uR5rWcFJkGolratN9e0eCFzmaHfIQGI6KPin4ljW4+/k4weym6ypiFolkWpZ4QkBae 3MurOhBkI2IK6gqikBBiZvEECWAE2TvrQKptsV2oLSeWGCpCm0f0TegJ6grq+rhftkJ5 5YryzCEki+nI7eiicENJB/ZSyhp9qA6rzGYpDkRH+EUf9oXQtpONnuR6JEmlUizaCz6l MkRk0bgFRNb4bGvTToBHiBS7W/7gWBlvBcR0A+NncYtQdPx6WWsqur2i2QIo2eK3/fbt 3DWxzMmgLDtTymSbwNsQI9XEL0BHgoX5Cw0dPqFj0+so9Chpq5qRe4NfGcBgvUHj7h0c NMqg== MIME-Version: 1.0 X-Received: by 10.170.205.4 with SMTP id w4mr21299661yke.125.1420965621184; Sun, 11 Jan 2015 00:40:21 -0800 (PST) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.170.142.198 with HTTP; Sun, 11 Jan 2015 00:40:21 -0800 (PST) In-Reply-To: <201501100007.t0A07Y8V069453@svn.freebsd.org> References: <201501100007.t0A07Y8V069453@svn.freebsd.org> Date: Sun, 11 Jan 2015 09:40:21 +0100 X-Google-Sender-Auth: KAWJvxIvBkwxVRXKlGTIZs9BDnI Message-ID: Subject: Re: svn commit: r276897 - vendor/xz/dist/src/liblzma From: Antoine Brodin To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 08:40:22 -0000 On Sat, Jan 10, 2015 at 1:07 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Jan 10 00:07:34 2015 > New Revision: 276897 > URL: https://svnweb.freebsd.org/changeset/base/276897 > > Log: > Import the lzma pc file > > Added: > vendor/xz/dist/src/liblzma/liblzma.pc.in (contents, props changed) > > Added: vendor/xz/dist/src/liblzma/liblzma.pc.in > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ vendor/xz/dist/src/liblzma/liblzma.pc.in Sat Jan 10 00:07:34 2015 (r276897) > @@ -0,0 +1,19 @@ > +# > +# Author: Lasse Collin > +# > +# This file has been put into the public domain. > +# You can do whatever you want with this file. > +# > + > +prefix=@prefix@ > +exec_prefix=@exec_prefix@ > +libdir=@libdir@ > +includedir=@includedir@ > + > +Name: liblzma > +Description: General purpose data compression library > +URL: @PACKAGE_URL@ > +Version: @PACKAGE_VERSION@ > +Cflags: -I${includedir} > +Libs: -L${libdir} -llzma > +Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ > Hi, There is a problem: % grep libdir /usr/libdata/pkgconfig/liblzma.pc libdir=/usr/lib32 Libs: -L${libdir} -llzma Cheers, Antoine From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 09:25:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 958F3445; Sun, 11 Jan 2015 09:25:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81920ADF; Sun, 11 Jan 2015 09:25:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0B9P2hD005369; Sun, 11 Jan 2015 09:25:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B9P2Sg005368; Sun, 11 Jan 2015 09:25:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501110925.t0B9P2Sg005368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 11 Jan 2015 09:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276962 - head/lib/liblzma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 09:25:02 -0000 Author: bapt Date: Sun Jan 11 09:25:01 2015 New Revision: 276962 URL: https://svnweb.freebsd.org/changeset/base/276962 Log: Do not regenerate and install liblzma.pc when only build libraries aka do not regenerate while generating 32bits libs Reported by: antoine Modified: head/lib/liblzma/Makefile Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Sun Jan 11 08:40:01 2015 (r276961) +++ head/lib/liblzma/Makefile Sun Jan 11 09:25:01 2015 (r276962) @@ -148,12 +148,13 @@ CFLAGS+= -DSYMBOL_VERSIONING CLEANFILES+= liblzma.pc +.if !defined(LIBRARIES_ONLY) all: liblzma.pc liblzma.pc: liblzma.pc.in @sed -e 's,@prefix@,/usr,g ; \ s,@exec_prefix@,/usr,g ; \ - s,@libdir@,${LIBDIR},g ; \ - s,@includedir@,${INCLUDEDIR},g ; \ + s,@libdir@,/usr/lib,g ; \ + s,@includedir@,/usr/include,g ; \ s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ s,@PTHREAD_CFLAGS@,,g ; \ @@ -162,5 +163,6 @@ liblzma.pc: liblzma.pc.in beforeinstall: @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig +.endif .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 10:26:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DE7BEB0; Sun, 11 Jan 2015 10:26:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89655FB7; Sun, 11 Jan 2015 10:26:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BAQoJV033715; Sun, 11 Jan 2015 10:26:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BAQo8a033714; Sun, 11 Jan 2015 10:26:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501111026.t0BAQo8a033714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 11 Jan 2015 10:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276963 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 10:26:50 -0000 Author: andrew Date: Sun Jan 11 10:26:49 2015 New Revision: 276963 URL: https://svnweb.freebsd.org/changeset/base/276963 Log: Rework the GIC driver to ease the import of the arm_intrng branch. The common code has been pulled out to static functions. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Jan 11 09:25:01 2015 (r276962) +++ head/sys/arm/arm/gic.c Sun Jan 11 10:26:49 2015 (r276963) @@ -155,10 +155,10 @@ arm_gic_probe(device_t dev) return (BUS_PROBE_DEFAULT); } -void -gic_init_secondary(void) +static void +arm_gic_init_secondary(device_t dev) { - struct arm_gic_softc *sc = arm_gic_sc; + struct arm_gic_softc *sc = device_get_softc(dev); int i; for (i = 0; i < sc->nirqs; i += 4) @@ -311,21 +311,9 @@ arm_gic_attach(device_t dev) return (0); } -static void -gic_post_filter(void *arg) -{ - struct arm_gic_softc *sc = arm_gic_sc; - uintptr_t irq = (uintptr_t) arg; - - if (irq > GIC_LAST_IPI) - arm_irq_memory_barrier(irq); - gic_c_write_4(sc, GICC_EOIR, irq); -} - -int -arm_get_next_irq(int last_irq) +static int +arm_gic_next_irq(struct arm_gic_softc *sc, int last_irq) { - struct arm_gic_softc *sc = arm_gic_sc; uint32_t active_irq; active_irq = gic_c_read_4(sc, GICC_IAR); @@ -348,31 +336,11 @@ arm_get_next_irq(int last_irq) return active_irq; } -void -arm_mask_irq(uintptr_t nb) -{ - struct arm_gic_softc *sc = arm_gic_sc; - - gic_d_write_4(sc, GICD_ICENABLER(nb >> 5), (1UL << (nb & 0x1F))); - gic_c_write_4(sc, GICC_EOIR, nb); -} - -void -arm_unmask_irq(uintptr_t nb) -{ - struct arm_gic_softc *sc = arm_gic_sc; - - if (nb > GIC_LAST_IPI) - arm_irq_memory_barrier(nb); - gic_d_write_4(sc, GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); -} - static int -gic_config_irq(int irq, enum intr_trigger trig, +arm_gic_config(device_t dev, int irq, enum intr_trigger trig, enum intr_polarity pol) { - struct arm_gic_softc *sc = arm_gic_sc; - device_t dev = sc->gic_dev; + struct arm_gic_softc *sc = device_get_softc(dev); uint32_t reg; uint32_t mask; @@ -421,11 +389,32 @@ invalid_args: return (EINVAL); } + +static void +arm_gic_mask(device_t dev, int irq) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + gic_d_write_4(sc, GICD_ICENABLER(irq >> 5), (1UL << (irq & 0x1F))); + gic_c_write_4(sc, GICC_EOIR, irq); +} + +static void +arm_gic_unmask(device_t dev, int irq) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + if (irq > GIC_LAST_IPI) + arm_irq_memory_barrier(irq); + + gic_d_write_4(sc, GICD_ISENABLER(irq >> 5), (1UL << (irq & 0x1F))); +} + #ifdef SMP -void -pic_ipi_send(cpuset_t cpus, u_int ipi) +static void +arm_gic_ipi_send(device_t dev, cpuset_t cpus, u_int ipi) { - struct arm_gic_softc *sc = arm_gic_sc; + struct arm_gic_softc *sc = device_get_softc(dev); uint32_t val = 0, i; for (i = 0; i < MAXCPU; i++) @@ -435,8 +424,8 @@ pic_ipi_send(cpuset_t cpus, u_int ipi) gic_d_write_4(sc, GICD_SGIR(0), val | ipi); } -int -pic_ipi_read(int i) +static int +arm_gic_ipi_read(device_t dev, int i) { if (i != -1) { @@ -452,9 +441,79 @@ pic_ipi_read(int i) return (0x3ff); } +static void +arm_gic_ipi_clear(device_t dev, int ipi) +{ + /* no-op */ +} +#endif + +static void +gic_post_filter(void *arg) +{ + struct arm_gic_softc *sc = arm_gic_sc; + uintptr_t irq = (uintptr_t) arg; + + if (irq > GIC_LAST_IPI) + arm_irq_memory_barrier(irq); + gic_c_write_4(sc, GICC_EOIR, irq); +} + +static int +gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol) +{ + + return (arm_gic_config(arm_gic_sc->gic_dev, irq, trig, pol)); +} + +void +arm_mask_irq(uintptr_t nb) +{ + + arm_gic_mask(arm_gic_sc->gic_dev, nb); +} + +void +arm_unmask_irq(uintptr_t nb) +{ + + arm_gic_unmask(arm_gic_sc->gic_dev, nb); +} + +int +arm_get_next_irq(int last_irq) +{ + + return (arm_gic_next_irq(arm_gic_sc, last_irq)); +} + +void +gic_init_secondary(void) +{ + + arm_gic_init_secondary(arm_gic_sc->gic_dev); +} + +#ifdef SMP +void +pic_ipi_send(cpuset_t cpus, u_int ipi) +{ + + arm_gic_ipi_send(arm_gic_sc->gic_dev, cpus, ipi); +} + +int +pic_ipi_read(int i) +{ + + return (arm_gic_ipi_read(arm_gic_sc->gic_dev, i)); +} + void pic_ipi_clear(int ipi) { + + arm_gic_ipi_clear(arm_gic_sc->gic_dev, ipi); } #endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 11:28:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 606F3349; Sun, 11 Jan 2015 11:28:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ABB16C1; Sun, 11 Jan 2015 11:28:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BBS5v3062204; Sun, 11 Jan 2015 11:28:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BBS43i062185; Sun, 11 Jan 2015 11:28:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111128.t0BBS43i062185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 11:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276965 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 11:28:05 -0000 Author: hselasky Date: Sun Jan 11 11:28:03 2015 New Revision: 276965 URL: https://svnweb.freebsd.org/changeset/base/276965 Log: MFC r276321, r276404, r276407 and r276799: Various XHCI fixes and improvements: - Improve and fix MSI interrupt allocation, setup and release. - Add missed flushing of data which can happen when "xhci_configure_mask()" is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes error feature is always enabled except for ISOCHRONOUS transfers. - Allow systems having a page size greater than 4K to use fewer scatter-gather XHCI TRB entries for its payload data. The XHCI controller can handle at least 65536 bytes per scatter-gather list entry. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Sun Jan 11 11:27:25 2015 (r276964) +++ stable/10/sys/dev/usb/controller/xhci.c Sun Jan 11 11:28:03 2015 (r276965) @@ -2287,6 +2287,7 @@ xhci_configure_mask(struct usb_device *u temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } + usb_pc_cpu_flush(&sc->sc_hw.devs[index].input_pc); return (0); } @@ -2391,10 +2392,14 @@ xhci_configure_endpoint(struct usb_devic XHCI_EPCTX_1_MAXB_SET(max_packet_count) | XHCI_EPCTX_1_MAXP_SIZE_SET(max_packet_size); - if ((udev->parent_hs_hub != NULL) || (udev->address != 0)) { - if (type != UE_ISOCHRONOUS) - temp |= XHCI_EPCTX_1_CERR_SET(3); - } + /* + * Always enable the "three strikes and you are gone" feature + * except for ISOCHRONOUS endpoints. This is suggested by + * section 4.3.3 in the XHCI specification about device slot + * initialisation. + */ + if (type != UE_ISOCHRONOUS) + temp |= XHCI_EPCTX_1_CERR_SET(3); switch (type) { case UE_CONTROL: Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Sun Jan 11 11:27:25 2015 (r276964) +++ stable/10/sys/dev/usb/controller/xhci.h Sun Jan 11 11:28:03 2015 (r276965) @@ -320,11 +320,23 @@ struct xhci_dev_endpoint_trbs { XHCI_MAX_TRANSFERS) + XHCI_MAX_STREAMS]; }; -#define XHCI_TD_PAGE_NBUF 17 /* units, room enough for 64Kbytes */ -#define XHCI_TD_PAGE_SIZE 4096 /* bytes */ -#define XHCI_TD_PAYLOAD_MAX (XHCI_TD_PAGE_SIZE * (XHCI_TD_PAGE_NBUF - 1)) +#if (USB_PAGE_SIZE < 4096) +#error "The XHCI driver needs a pagesize above or equal to 4K" +#endif + +/* Define the maximum payload which we will handle in a single TRB */ +#define XHCI_TD_PAYLOAD_MAX 65536 /* bytes */ + +/* Define the maximum payload of a single scatter-gather list element */ +#define XHCI_TD_PAGE_SIZE \ + ((USB_PAGE_SIZE < XHCI_TD_PAYLOAD_MAX) ? USB_PAGE_SIZE : XHCI_TD_PAYLOAD_MAX) + +/* Define the maximum length of the scatter-gather list */ +#define XHCI_TD_PAGE_NBUF \ + (((XHCI_TD_PAYLOAD_MAX + XHCI_TD_PAGE_SIZE - 1) / XHCI_TD_PAGE_SIZE) + 1) struct xhci_td { + /* one LINK TRB has been added to the TRB array */ struct xhci_trb td_trb[XHCI_TD_PAGE_NBUF + 1]; /* @@ -452,7 +464,6 @@ struct xhci_softc { struct usb_device *sc_devices[XHCI_MAX_DEVICES]; struct resource *sc_io_res; - int sc_irq_rid; struct resource *sc_irq_res; void *sc_intr_hdl; Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 11:27:25 2015 (r276964) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 11:28:03 2015 (r276965) @@ -201,21 +201,19 @@ xhci_pci_attach(device_t self) usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); - sc->sc_irq_rid = 0; + rid = 0; if (xhci_use_msi) { - count = pci_msi_count(self); - if (count >= 1) { - count = 1; - if (pci_alloc_msi(self, &count) == 0) { - if (bootverbose) - device_printf(self, "MSI enabled\n"); - sc->sc_irq_rid = 1; - } + count = 1; + if (pci_alloc_msi(self, &count) == 0) { + if (bootverbose) + device_printf(self, "MSI enabled\n"); + rid = 1; } } - sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, - &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE); + sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->sc_irq_res == NULL) { + pci_release_msi(self); device_printf(self, "Could not allocate IRQ\n"); /* goto error; FALLTHROUGH - use polling */ } @@ -232,16 +230,22 @@ xhci_pci_attach(device_t self) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); if (err != 0) { + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); + sc->sc_irq_res = NULL; + pci_release_msi(self); device_printf(self, "Could not setup IRQ, err=%d\n", err); sc->sc_intr_hdl = NULL; } } - if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL || - xhci_use_polling() != 0) { - device_printf(self, "Interrupt polling at %dHz\n", hz); - USB_BUS_LOCK(&sc->sc_bus); - xhci_interrupt_poll(sc); - USB_BUS_UNLOCK(&sc->sc_bus); + if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL) { + if (xhci_use_polling() != 0) { + device_printf(self, "Interrupt polling at %dHz\n", hz); + USB_BUS_LOCK(&sc->sc_bus); + xhci_interrupt_poll(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + } else + goto error; } /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ @@ -304,11 +308,10 @@ xhci_pci_detach(device_t self) sc->sc_intr_hdl = NULL; } if (sc->sc_irq_res) { - if (sc->sc_irq_rid == 1) - pci_release_msi(self); - bus_release_resource(self, SYS_RES_IRQ, sc->sc_irq_rid, - sc->sc_irq_res); + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); sc->sc_irq_res = NULL; + pci_release_msi(self); } if (sc->sc_io_res) { bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 11:53:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BC35708; Sun, 11 Jan 2015 11:53:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BBD9951; Sun, 11 Jan 2015 11:53:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BBrEYO076567; Sun, 11 Jan 2015 11:53:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BBrDMm076560; Sun, 11 Jan 2015 11:53:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111153.t0BBrDMm076560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 11:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276966 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 11:53:14 -0000 Author: hselasky Date: Sun Jan 11 11:53:12 2015 New Revision: 276966 URL: https://svnweb.freebsd.org/changeset/base/276966 Log: MFC r251499, r271156, r276321, r276404, r276407, r276799 and r273376: Various XHCI fixes and improvements: - Add IDs for Intel Patsburg USB 2.0 controller (dependancy). - Add support for polling the XHCI interrupt handler when the regular interrupt handler is not working properly or in case of MSI interrupts which are not yet supported. Remove interrupt setup code for FreeBSD versions older than 700031. - Improve and fix MSI interrupt allocation, setup and release. - Add missed flushing of data which can happen when "xhci_configure_mask()" is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes error feature is always enabled except for ISOCHRONOUS transfers. - Allow systems having a page size greater than 4K to use fewer scatter-gather XHCI TRB entries for its payload data. The XHCI controller can handle at least 65536 bytes per scatter-gather list entry. - Add the Intel BayTrail USB device which needs port routing for USB 3.0. PR: 179342 Modified: stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h stable/9/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Sun Jan 11 11:28:03 2015 (r276965) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Sun Jan 11 11:53:12 2015 (r276966) @@ -120,6 +120,10 @@ ehci_pci_match(device_t self) case 0x43961002: return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x1d268086: + return ("Intel Patsburg USB 2.0 controller"); + case 0x1d2d8086: + return ("Intel Patsburg USB 2.0 controller"); case 0x1e268086: return ("Intel Panther Point USB 2.0 controller"); case 0x1e2d8086: Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Sun Jan 11 11:28:03 2015 (r276965) +++ stable/9/sys/dev/usb/controller/xhci.c Sun Jan 11 11:53:12 2015 (r276966) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int xhcidebug; static int xhciroute; +static int xhcipolling; static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, @@ -94,6 +95,9 @@ TUNABLE_INT("hw.usb.xhci.debug", &xhcide SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, + &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); +TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); #else #define xhciroute 0 #endif @@ -181,6 +185,16 @@ xhci_dump_device(struct xhci_softc *sc, } #endif +uint8_t +xhci_use_polling(void) +{ +#ifdef USB_DEBUG + return (xhcipolling != 0); +#else + return (0); +#endif +} + static void xhci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb) { @@ -2252,6 +2266,7 @@ xhci_configure_mask(struct usb_device *u temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } + usb_pc_cpu_flush(&sc->sc_hw.devs[index].input_pc); return (0); } @@ -2339,10 +2354,14 @@ xhci_configure_endpoint(struct usb_devic XHCI_EPCTX_1_MAXB_SET(max_packet_count) | XHCI_EPCTX_1_MAXP_SIZE_SET(max_packet_size); - if ((udev->parent_hs_hub != NULL) || (udev->address != 0)) { - if (type != UE_ISOCHRONOUS) - temp |= XHCI_EPCTX_1_CERR_SET(3); - } + /* + * Always enable the "three strikes and you are gone" feature + * except for ISOCHRONOUS endpoints. This is suggested by + * section 4.3.3 in the XHCI specification about device slot + * initialisation. + */ + if (type != UE_ISOCHRONOUS) + temp |= XHCI_EPCTX_1_CERR_SET(3); switch (type) { case UE_CONTROL: Modified: stable/9/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.h Sun Jan 11 11:28:03 2015 (r276965) +++ stable/9/sys/dev/usb/controller/xhci.h Sun Jan 11 11:53:12 2015 (r276966) @@ -311,11 +311,23 @@ struct xhci_dev_endpoint_trbs { struct xhci_trb trb[XHCI_MAX_ENDPOINTS][XHCI_MAX_TRANSFERS]; }; -#define XHCI_TD_PAGE_NBUF 17 /* units, room enough for 64Kbytes */ -#define XHCI_TD_PAGE_SIZE 4096 /* bytes */ -#define XHCI_TD_PAYLOAD_MAX (XHCI_TD_PAGE_SIZE * (XHCI_TD_PAGE_NBUF - 1)) +#if (USB_PAGE_SIZE < 4096) +#error "The XHCI driver needs a pagesize above or equal to 4K" +#endif + +/* Define the maximum payload which we will handle in a single TRB */ +#define XHCI_TD_PAYLOAD_MAX 65536 /* bytes */ + +/* Define the maximum payload of a single scatter-gather list element */ +#define XHCI_TD_PAGE_SIZE \ + ((USB_PAGE_SIZE < XHCI_TD_PAYLOAD_MAX) ? USB_PAGE_SIZE : XHCI_TD_PAYLOAD_MAX) + +/* Define the maximum length of the scatter-gather list */ +#define XHCI_TD_PAGE_NBUF \ + (((XHCI_TD_PAYLOAD_MAX + XHCI_TD_PAGE_SIZE - 1) / XHCI_TD_PAGE_SIZE) + 1) struct xhci_td { + /* one LINK TRB has been added to the TRB array */ struct xhci_trb td_trb[XHCI_TD_PAGE_NBUF + 1]; /* @@ -432,6 +444,8 @@ struct xhci_softc { struct usb_process sc_config_proc; struct usb_bus_msg sc_config_msg[2]; + struct usb_callout sc_callout; + xhci_port_route_t *sc_port_route; union xhci_hub_desc sc_hub_desc; @@ -441,7 +455,6 @@ struct xhci_softc { struct usb_device *sc_devices[XHCI_MAX_DEVICES]; struct resource *sc_io_res; - int sc_irq_rid; struct resource *sc_irq_res; void *sc_intr_hdl; @@ -498,6 +511,7 @@ struct xhci_softc { /* prototypes */ +uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t); usb_error_t xhci_start_controller(struct xhci_softc *); Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 11:28:03 2015 (r276965) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 11:53:12 2015 (r276966) @@ -102,6 +102,8 @@ xhci_pci_match(device_t self) case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x0f358086: + return ("Intel Intel BayTrail USB 3.0 controller"); case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); @@ -138,6 +140,16 @@ xhci_pci_probe(device_t self) static int xhci_use_msi = 1; TUNABLE_INT("hw.usb.xhci.msi", &xhci_use_msi); +static void +xhci_interrupt_poll(void *_sc) +{ + struct xhci_softc *sc = _sc; + USB_BUS_UNLOCK(&sc->sc_bus); + xhci_interrupt(sc); + USB_BUS_LOCK(&sc->sc_bus); + usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); +} + static int xhci_pci_port_route(device_t self, uint32_t set, uint32_t clear) { @@ -189,23 +201,23 @@ xhci_pci_attach(device_t self) sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); - sc->sc_irq_rid = 0; + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); + + rid = 0; if (xhci_use_msi) { - count = pci_msi_count(self); - if (count >= 1) { - count = 1; - if (pci_alloc_msi(self, &count) == 0) { - if (bootverbose) - device_printf(self, "MSI enabled\n"); - sc->sc_irq_rid = 1; - } + count = 1; + if (pci_alloc_msi(self, &count) == 0) { + if (bootverbose) + device_printf(self, "MSI enabled\n"); + rid = 1; } } - sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, - &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE); + sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->sc_irq_res == NULL) { + pci_release_msi(self); device_printf(self, "Could not allocate IRQ\n"); - goto error; + /* goto error; FALLTHROUGH - use polling */ } sc->sc_bus.bdev = device_add_child(self, "usbus", -1); if (sc->sc_bus.bdev == NULL) { @@ -216,20 +228,31 @@ xhci_pci_attach(device_t self) sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self)); -#if (__FreeBSD_version >= 700031) - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); -#else - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); -#endif - if (err) { - device_printf(self, "Could not setup IRQ, err=%d\n", err); - sc->sc_intr_hdl = NULL; - goto error; + if (sc->sc_irq_res != NULL) { + err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); + if (err != 0) { + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); + sc->sc_irq_res = NULL; + pci_release_msi(self); + device_printf(self, "Could not setup IRQ, err=%d\n", err); + sc->sc_intr_hdl = NULL; + } } + if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL) { + if (xhci_use_polling() != 0) { + device_printf(self, "Interrupt polling at %dHz\n", hz); + USB_BUS_LOCK(&sc->sc_bus); + xhci_interrupt_poll(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + } else + goto error; + } + /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ switch (pci_get_devid(self)) { + case 0x0f358086: /* BayTrail */ case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ @@ -276,21 +299,22 @@ xhci_pci_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_children(self); + if (sc->sc_io_res) { + usb_callout_drain(&sc->sc_callout); + xhci_halt_controller(sc); + } + pci_disable_busmaster(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { - - xhci_halt_controller(sc); - bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl); sc->sc_intr_hdl = NULL; } if (sc->sc_irq_res) { - if (sc->sc_irq_rid == 1) - pci_release_msi(self); - bus_release_resource(self, SYS_RES_IRQ, sc->sc_irq_rid, - sc->sc_irq_res); + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); sc->sc_irq_res = NULL; + pci_release_msi(self); } if (sc->sc_io_res) { bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 12:01:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2A37A32; Sun, 11 Jan 2015 12:01:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84090A2C; Sun, 11 Jan 2015 12:01:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BC1mW8081210; Sun, 11 Jan 2015 12:01:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BC1lP9081206; Sun, 11 Jan 2015 12:01:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111201.t0BC1lP9081206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 12:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r276967 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 12:01:48 -0000 Author: hselasky Date: Sun Jan 11 12:01:46 2015 New Revision: 276967 URL: https://svnweb.freebsd.org/changeset/base/276967 Log: MFC r251499, r271156, r276321, r276404, r276407, r276799 and r273376: Various XHCI fixes and improvements: - Add IDs for Intel Patsburg USB 2.0 controller (dependancy). - Add support for polling the XHCI interrupt handler when the regular interrupt handler is not working properly or in case of MSI interrupts which are not yet supported. Remove interrupt setup code for FreeBSD versions older than 700031. - Improve and fix MSI interrupt allocation, setup and release. - Add missed flushing of data which can happen when "xhci_configure_mask()" is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes error feature is always enabled except for ISOCHRONOUS transfers. - Allow systems having a page size greater than 4K to use fewer scatter-gather XHCI TRB entries for its payload data. The XHCI controller can handle at least 65536 bytes per scatter-gather list entry. - Add the Intel BayTrail USB device which needs port routing for USB 3.0. PR: 179342 Modified: stable/8/sys/dev/usb/controller/ehci_pci.c stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/controller/xhci.h stable/8/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_pci.c Sun Jan 11 11:53:12 2015 (r276966) +++ stable/8/sys/dev/usb/controller/ehci_pci.c Sun Jan 11 12:01:46 2015 (r276967) @@ -120,6 +120,12 @@ ehci_pci_match(device_t self) case 0x43961002: return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x0f348086: + return ("Intel BayTrail USB 2.0 controller"); + case 0x1d268086: + return ("Intel Patsburg USB 2.0 controller"); + case 0x1d2d8086: + return ("Intel Patsburg USB 2.0 controller"); case 0x1e268086: return ("Intel Panther Point USB 2.0 controller"); case 0x1e2d8086: Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Sun Jan 11 11:53:12 2015 (r276966) +++ stable/8/sys/dev/usb/controller/xhci.c Sun Jan 11 12:01:46 2015 (r276967) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int xhcidebug; static int xhciroute; +static int xhcipolling; SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, @@ -94,6 +95,9 @@ TUNABLE_INT("hw.usb.xhci.debug", &xhcide SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, + &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); +TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); #else #define xhciroute 0 #endif @@ -181,6 +185,16 @@ xhci_dump_device(struct xhci_softc *sc, } #endif +uint8_t +xhci_use_polling(void) +{ +#ifdef USB_DEBUG + return (xhcipolling != 0); +#else + return (0); +#endif +} + static void xhci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb) { @@ -2252,6 +2266,7 @@ xhci_configure_mask(struct usb_device *u temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } + usb_pc_cpu_flush(&sc->sc_hw.devs[index].input_pc); return (0); } @@ -2339,10 +2354,14 @@ xhci_configure_endpoint(struct usb_devic XHCI_EPCTX_1_MAXB_SET(max_packet_count) | XHCI_EPCTX_1_MAXP_SIZE_SET(max_packet_size); - if ((udev->parent_hs_hub != NULL) || (udev->address != 0)) { - if (type != UE_ISOCHRONOUS) - temp |= XHCI_EPCTX_1_CERR_SET(3); - } + /* + * Always enable the "three strikes and you are gone" feature + * except for ISOCHRONOUS endpoints. This is suggested by + * section 4.3.3 in the XHCI specification about device slot + * initialisation. + */ + if (type != UE_ISOCHRONOUS) + temp |= XHCI_EPCTX_1_CERR_SET(3); switch (type) { case UE_CONTROL: Modified: stable/8/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.h Sun Jan 11 11:53:12 2015 (r276966) +++ stable/8/sys/dev/usb/controller/xhci.h Sun Jan 11 12:01:46 2015 (r276967) @@ -311,11 +311,23 @@ struct xhci_dev_endpoint_trbs { struct xhci_trb trb[XHCI_MAX_ENDPOINTS][XHCI_MAX_TRANSFERS]; }; -#define XHCI_TD_PAGE_NBUF 17 /* units, room enough for 64Kbytes */ -#define XHCI_TD_PAGE_SIZE 4096 /* bytes */ -#define XHCI_TD_PAYLOAD_MAX (XHCI_TD_PAGE_SIZE * (XHCI_TD_PAGE_NBUF - 1)) +#if (USB_PAGE_SIZE < 4096) +#error "The XHCI driver needs a pagesize above or equal to 4K" +#endif + +/* Define the maximum payload which we will handle in a single TRB */ +#define XHCI_TD_PAYLOAD_MAX 65536 /* bytes */ + +/* Define the maximum payload of a single scatter-gather list element */ +#define XHCI_TD_PAGE_SIZE \ + ((USB_PAGE_SIZE < XHCI_TD_PAYLOAD_MAX) ? USB_PAGE_SIZE : XHCI_TD_PAYLOAD_MAX) + +/* Define the maximum length of the scatter-gather list */ +#define XHCI_TD_PAGE_NBUF \ + (((XHCI_TD_PAYLOAD_MAX + XHCI_TD_PAGE_SIZE - 1) / XHCI_TD_PAGE_SIZE) + 1) struct xhci_td { + /* one LINK TRB has been added to the TRB array */ struct xhci_trb td_trb[XHCI_TD_PAGE_NBUF + 1]; /* @@ -432,6 +444,8 @@ struct xhci_softc { struct usb_process sc_config_proc; struct usb_bus_msg sc_config_msg[2]; + struct usb_callout sc_callout; + xhci_port_route_t *sc_port_route; union xhci_hub_desc sc_hub_desc; @@ -441,7 +455,6 @@ struct xhci_softc { struct usb_device *sc_devices[XHCI_MAX_DEVICES]; struct resource *sc_io_res; - int sc_irq_rid; struct resource *sc_irq_res; void *sc_intr_hdl; @@ -498,6 +511,7 @@ struct xhci_softc { /* prototypes */ +uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t); usb_error_t xhci_start_controller(struct xhci_softc *); Modified: stable/8/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 11:53:12 2015 (r276966) +++ stable/8/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 12:01:46 2015 (r276967) @@ -102,6 +102,8 @@ xhci_pci_match(device_t self) case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x0f358086: + return ("Intel Intel BayTrail USB 3.0 controller"); case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); @@ -136,6 +138,16 @@ xhci_pci_probe(device_t self) static int xhci_use_msi = 1; TUNABLE_INT("hw.usb.xhci.msi", &xhci_use_msi); +static void +xhci_interrupt_poll(void *_sc) +{ + struct xhci_softc *sc = _sc; + USB_BUS_UNLOCK(&sc->sc_bus); + xhci_interrupt(sc); + USB_BUS_LOCK(&sc->sc_bus); + usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); +} + static int xhci_pci_port_route(device_t self, uint32_t set, uint32_t clear) { @@ -187,23 +199,22 @@ xhci_pci_attach(device_t self) sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); - sc->sc_irq_rid = 0; + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); + + rid = 0; if (xhci_use_msi) { - count = pci_msi_count(self); - if (count >= 1) { - count = 1; - if (pci_alloc_msi(self, &count) == 0) { - if (bootverbose) - device_printf(self, "MSI enabled\n"); - sc->sc_irq_rid = 1; - } + count = 1; + if (pci_alloc_msi(self, &count) == 0) { + if (bootverbose) + device_printf(self, "MSI enabled\n"); + rid = 1; } } - sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, - &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE); + sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->sc_irq_res == NULL) { + pci_release_msi(self); device_printf(self, "Could not allocate IRQ\n"); - goto error; } sc->sc_bus.bdev = device_add_child(self, "usbus", -1); if (sc->sc_bus.bdev == NULL) { @@ -214,20 +225,31 @@ xhci_pci_attach(device_t self) sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self)); -#if (__FreeBSD_version >= 700031) - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); -#else - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); -#endif - if (err) { - device_printf(self, "Could not setup IRQ, err=%d\n", err); - sc->sc_intr_hdl = NULL; - goto error; + if (sc->sc_irq_res != NULL) { + err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); + if (err != 0) { + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); + sc->sc_irq_res = NULL; + pci_release_msi(self); + device_printf(self, "Could not setup IRQ, err=%d\n", err); + sc->sc_intr_hdl = NULL; + } + } + if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL) { + if (xhci_use_polling() != 0) { + device_printf(self, "Interrupt polling at %dHz\n", hz); + USB_BUS_LOCK(&sc->sc_bus); + xhci_interrupt_poll(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + } else + goto error; } + /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ switch (pci_get_devid(self)) { + case 0x0f358086: /* BayTrail */ case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ @@ -239,6 +261,14 @@ xhci_pci_attach(device_t self) break; } + if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL || + xhci_use_polling() != 0) { + device_printf(self, "Interrupt polling at %dHz\n", hz); + USB_BUS_LOCK(&sc->sc_bus); + xhci_interrupt_poll(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + } + xhci_pci_take_controller(self); err = xhci_halt_controller(sc); @@ -274,21 +304,22 @@ xhci_pci_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_all_children(self); + if (sc->sc_io_res) { + usb_callout_drain(&sc->sc_callout); + xhci_halt_controller(sc); + } + pci_disable_busmaster(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { - - xhci_halt_controller(sc); - bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl); sc->sc_intr_hdl = NULL; } if (sc->sc_irq_res) { - if (sc->sc_irq_rid == 1) - pci_release_msi(self); - bus_release_resource(self, SYS_RES_IRQ, sc->sc_irq_rid, - sc->sc_irq_res); + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); sc->sc_irq_res = NULL; + pci_release_msi(self); } if (sc->sc_io_res) { bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 12:08:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA967E93; Sun, 11 Jan 2015 12:08:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAB25A64; Sun, 11 Jan 2015 12:08:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BC8I8V082136; Sun, 11 Jan 2015 12:08:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BC8IfO082133; Sun, 11 Jan 2015 12:08:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111208.t0BC8IfO082133@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 12:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276968 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 12:08:19 -0000 Author: hselasky Date: Sun Jan 11 12:08:17 2015 New Revision: 276968 URL: https://svnweb.freebsd.org/changeset/base/276968 Log: MFC r271156 and r273376: - Add IDs for Intel Patsburg USB 2.0 controller. - Add the Intel BayTrail USB device which needs port routing for USB 3.0. Modified: stable/10/sys/dev/usb/controller/ehci_pci.c stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_pci.c Sun Jan 11 12:01:46 2015 (r276967) +++ stable/10/sys/dev/usb/controller/ehci_pci.c Sun Jan 11 12:08:17 2015 (r276968) @@ -120,6 +120,12 @@ ehci_pci_match(device_t self) case 0x43961002: return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x0f348086: + return ("Intel BayTrail USB 2.0 controller"); + case 0x1d268086: + return ("Intel Patsburg USB 2.0 controller"); + case 0x1d2d8086: + return ("Intel Patsburg USB 2.0 controller"); case 0x1e268086: return ("Intel Panther Point USB 2.0 controller"); case 0x1e2d8086: Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 12:01:46 2015 (r276967) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Sun Jan 11 12:08:17 2015 (r276968) @@ -102,6 +102,8 @@ xhci_pci_match(device_t self) case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x0f358086: + return ("Intel Intel BayTrail USB 3.0 controller"); case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); @@ -250,6 +252,7 @@ xhci_pci_attach(device_t self) /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ switch (pci_get_devid(self)) { + case 0x0f358086: /* BayTrail */ case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 12:19:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80748282; Sun, 11 Jan 2015 12:19:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B333B6F; Sun, 11 Jan 2015 12:19:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BCJoOf087065; Sun, 11 Jan 2015 12:19:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BCJouB087064; Sun, 11 Jan 2015 12:19:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111219.t0BCJouB087064@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 12:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276970 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 12:19:50 -0000 Author: hselasky Date: Sun Jan 11 12:19:49 2015 New Revision: 276970 URL: https://svnweb.freebsd.org/changeset/base/276970 Log: MFC r276532 and r276626: The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or witness printouts in the console driver clients can cause this mutex to recurse by calls to "printf()" from witness for example. In particular this can happen if "debug.witness.skipspin=0" is set in the boot environment. Modified: stable/9/sys/kern/kern_cons.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_cons.c ============================================================================== --- stable/9/sys/kern/kern_cons.c Sun Jan 11 12:17:27 2015 (r276969) +++ stable/9/sys/kern/kern_cons.c Sun Jan 11 12:19:49 2015 (r276970) @@ -497,6 +497,13 @@ cnputs(char *p) int unlock_reqd = 0; if (use_cnputs_mtx) { + /* + * NOTE: Debug prints and/or witness printouts in + * console driver clients can cause the "cnputs_mtx" + * mutex to recurse. Simply return if that happens. + */ + if (mtx_owned(&cnputs_mtx)) + return; mtx_lock_spin(&cnputs_mtx); unlock_reqd = 1; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 12:17:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5AE3E0; Sun, 11 Jan 2015 12:17:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0917B60; Sun, 11 Jan 2015 12:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BCHR8O086752; Sun, 11 Jan 2015 12:17:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BCHRqn086751; Sun, 11 Jan 2015 12:17:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111217.t0BCHRqn086751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 12:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276969 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 12:17:28 -0000 Author: hselasky Date: Sun Jan 11 12:17:27 2015 New Revision: 276969 URL: https://svnweb.freebsd.org/changeset/base/276969 Log: MFC r276532 and r276626: The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or witness printouts in the console driver clients can cause this mutex to recurse by calls to "printf()" from witness for example. In particular this can happen if "debug.witness.skipspin=0" is set in the boot environment. Modified: stable/10/sys/kern/kern_cons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Sun Jan 11 12:08:17 2015 (r276968) +++ stable/10/sys/kern/kern_cons.c Sun Jan 11 12:17:27 2015 (r276969) @@ -505,6 +505,13 @@ cnputs(char *p) int unlock_reqd = 0; if (use_cnputs_mtx) { + /* + * NOTE: Debug prints and/or witness printouts in + * console driver clients can cause the "cnputs_mtx" + * mutex to recurse. Simply return if that happens. + */ + if (mtx_owned(&cnputs_mtx)) + return; mtx_lock_spin(&cnputs_mtx); unlock_reqd = 1; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 12:21:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47009427; Sun, 11 Jan 2015 12:21:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31FBDB80; Sun, 11 Jan 2015 12:21:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BCLe9L090329; Sun, 11 Jan 2015 12:21:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BCLeed090328; Sun, 11 Jan 2015 12:21:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111221.t0BCLeed090328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 12:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r276971 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 12:21:40 -0000 Author: hselasky Date: Sun Jan 11 12:21:39 2015 New Revision: 276971 URL: https://svnweb.freebsd.org/changeset/base/276971 Log: MFC r276532 and r276626: The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or witness printouts in the console driver clients can cause this mutex to recurse by calls to "printf()" from witness for example. In particular this can happen if "debug.witness.skipspin=0" is set in the boot environment. Modified: stable/8/sys/kern/kern_cons.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_cons.c ============================================================================== --- stable/8/sys/kern/kern_cons.c Sun Jan 11 12:19:49 2015 (r276970) +++ stable/8/sys/kern/kern_cons.c Sun Jan 11 12:21:39 2015 (r276971) @@ -419,6 +419,13 @@ cnputs(char *p) int unlock_reqd = 0; if (use_cnputs_mtx) { + /* + * NOTE: Debug prints and/or witness printouts in + * console driver clients can cause the "cnputs_mtx" + * mutex to recurse. Simply return if that happens. + */ + if (mtx_owned(&cnputs_mtx)) + return; mtx_lock_spin(&cnputs_mtx); unlock_reqd = 1; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 12:25:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 236D855D; Sun, 11 Jan 2015 12:25:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E930EC15; Sun, 11 Jan 2015 12:25:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BCPA6Q091292; Sun, 11 Jan 2015 12:25:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BCPAKg091291; Sun, 11 Jan 2015 12:25:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111225.t0BCPAKg091291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 12:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276972 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 12:25:11 -0000 Author: hselasky Date: Sun Jan 11 12:25:10 2015 New Revision: 276972 URL: https://svnweb.freebsd.org/changeset/base/276972 Log: MFC r276534: The "vt_suspend_flush_timer()" function is sometimes called locked which prevents us from doing a "callout_drain()" call. The callout in question has a lock associated with it and we are not freeing the callout. That means we can use the "callout_stop()" function to atomically stop the callback iff the "callout_stop()" function is called locked. This patch applies proper locking to "callout_stop()" and replaces a "callout_drain()" with a "callout_stop()". Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Sun Jan 11 12:21:39 2015 (r276971) +++ stable/10/sys/dev/vt/vt_core.c Sun Jan 11 12:25:10 2015 (r276972) @@ -114,6 +114,7 @@ const struct terminal_class vt_termclass #define VT_LOCK(vd) mtx_lock(&(vd)->vd_lock) #define VT_UNLOCK(vd) mtx_unlock(&(vd)->vd_lock) +#define VT_LOCK_ASSERT(vd, what) mtx_assert(&(vd)->vd_lock, what) #define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \ (vw)->vw_number) @@ -282,12 +283,18 @@ vt_resume_flush_timer(struct vt_device * static void vt_suspend_flush_timer(struct vt_device *vd) { + /* + * As long as this function is called locked, callout_stop() + * has the same effect like callout_drain() with regard to + * preventing the callback function from executing. + */ + VT_LOCK_ASSERT(vd, MA_OWNED); if (!(vd->vd_flags & VDF_ASYNC) || !atomic_cmpset_int(&vd->vd_timer_armed, 1, 0)) return; - callout_drain(&vd->vd_timer); + callout_stop(&vd->vd_timer); } static void @@ -2595,7 +2602,9 @@ vt_allocate(struct vt_driver *drv, void if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ + VT_LOCK(vd); vt_suspend_flush_timer(vd); + VT_UNLOCK(vd); /* * Mute current terminal until we done. vt_change_font (called * from vt_resize) will unmute it. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 13:59:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71A0E25A; Sun, 11 Jan 2015 13:59:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C8A9653; Sun, 11 Jan 2015 13:59:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BDxQkD040800; Sun, 11 Jan 2015 13:59:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BDxQVC040799; Sun, 11 Jan 2015 13:59:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111359.t0BDxQVC040799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 13:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276975 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 13:59:26 -0000 Author: hselasky Date: Sun Jan 11 13:59:25 2015 New Revision: 276975 URL: https://svnweb.freebsd.org/changeset/base/276975 Log: MFC r276611: Make sure an error case exits unlocked. Modified: stable/10/sys/dev/usb/wlan/if_rsu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsu.c Sun Jan 11 13:18:25 2015 (r276974) +++ stable/10/sys/dev/usb/wlan/if_rsu.c Sun Jan 11 13:59:25 2015 (r276975) @@ -326,11 +326,11 @@ rsu_attach(device_t self) if (sc->cut != 3) sc->cut = (sc->cut >> 1) + 1; error = rsu_read_rom(sc); + RSU_UNLOCK(sc); if (error != 0) { device_printf(self, "could not read ROM\n"); goto fail_rom; } - RSU_UNLOCK(sc); IEEE80211_ADDR_COPY(sc->sc_bssid, &sc->rom[0x12]); device_printf(self, "MAC/BB RTL8712 cut %d\n", sc->cut); ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 14:22:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB185867; Sun, 11 Jan 2015 14:22:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3DF98DA; Sun, 11 Jan 2015 14:22:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BEM269054326; Sun, 11 Jan 2015 14:22:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BEM1DB054318; Sun, 11 Jan 2015 14:22:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111422.t0BEM1DB054318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 14:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276976 - in stable/10: contrib/ofed/management/opensm/osmtest contrib/ofed/usr.bin contrib/ofed/usr.bin/osmtest contrib/ofed/usr.lib etc/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:22:03 -0000 Author: hselasky Date: Sun Jan 11 14:22:00 2015 New Revision: 276976 URL: https://svnweb.freebsd.org/changeset/base/276976 Log: MFC r276823: Add makefile for the "osmtest" utility. While at it: - Fix depend target by removing a space after an "-I" inclusion option. - Fix some minor compile issues in the "osmtest" utility. PR: 196580 Added: stable/10/contrib/ofed/usr.bin/osmtest/ - copied from r276823, head/contrib/ofed/usr.bin/osmtest/ Modified: stable/10/contrib/ofed/management/opensm/osmtest/osmt_multicast.c stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c stable/10/contrib/ofed/usr.bin/Makefile stable/10/contrib/ofed/usr.lib/Makefile stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/management/opensm/osmtest/osmt_multicast.c ============================================================================== --- stable/10/contrib/ofed/management/opensm/osmtest/osmt_multicast.c Sun Jan 11 13:59:25 2015 (r276975) +++ stable/10/contrib/ofed/management/opensm/osmtest/osmt_multicast.c Sun Jan 11 14:22:00 2015 (r276976) @@ -42,6 +42,7 @@ #ifndef __WIN__ #include #endif +#include #include #include #include Modified: stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c Sun Jan 11 13:59:25 2015 (r276975) +++ stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c Sun Jan 11 14:22:00 2015 (r276976) @@ -3013,7 +3013,7 @@ Exit: /********************************************************************** **********************************************************************/ -inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec) +static inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec) { return (p_rec->dlid << 16 | p_rec->slid); } Modified: stable/10/contrib/ofed/usr.bin/Makefile ============================================================================== --- stable/10/contrib/ofed/usr.bin/Makefile Sun Jan 11 13:59:25 2015 (r276975) +++ stable/10/contrib/ofed/usr.bin/Makefile Sun Jan 11 14:22:00 2015 (r276976) @@ -1,7 +1,11 @@ .include -SUBDIR = ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat -SUBDIR += ibsysstat ibtracert opensm perfquery saquery -SUBDIR += sminfo smpdump smpquery vendstat +SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \ + ibsysstat ibtracert opensm perfquery saquery \ + sminfo smpdump smpquery vendstat + +.if ${MK_TESTS} != "no" +SUBDIR+= osmtest +.endif .include Modified: stable/10/contrib/ofed/usr.lib/Makefile ============================================================================== --- stable/10/contrib/ofed/usr.lib/Makefile Sun Jan 11 13:59:25 2015 (r276975) +++ stable/10/contrib/ofed/usr.lib/Makefile Sun Jan 11 14:22:00 2015 (r276976) @@ -1,6 +1,6 @@ .include -SUBDIR = libibcommon libibmad libibumad libibverbs libmlx4 libmthca -SUBDIR += libopensm libosmcomp libosmvendor libibcm librdmacm libsdp +SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \ + libopensm libosmcomp libosmvendor libibcm librdmacm libsdp .include Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Jan 11 13:59:25 2015 (r276975) +++ stable/10/etc/mtree/BSD.tests.dist Sun Jan 11 14:22:00 2015 (r276976) @@ -307,6 +307,8 @@ .. ncal .. + opensm + .. printf .. sed From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 14:30:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C05A9A31; Sun, 11 Jan 2015 14:30:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA02799E; Sun, 11 Jan 2015 14:30:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BEUpZ4056410; Sun, 11 Jan 2015 14:30:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BEUol6056405; Sun, 11 Jan 2015 14:30:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111430.t0BEUol6056405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 14:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276977 - in stable/9/contrib/ofed: management/opensm/osmtest usr.bin usr.bin/osmtest usr.lib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:30:52 -0000 Author: hselasky Date: Sun Jan 11 14:30:50 2015 New Revision: 276977 URL: https://svnweb.freebsd.org/changeset/base/276977 Log: MFC r276823: Add makefile for the "osmtest" utility. While at it: - Fix depend target by removing a space after an "-I" inclusion option. - Fix some minor compile issues in the "osmtest" utility. PR: 196580 Sponsored by: Mellanox Technologies Added: stable/9/contrib/ofed/usr.bin/osmtest/ - copied from r276823, head/contrib/ofed/usr.bin/osmtest/ Modified: stable/9/contrib/ofed/management/opensm/osmtest/osmt_multicast.c stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c stable/9/contrib/ofed/usr.bin/Makefile stable/9/contrib/ofed/usr.lib/Makefile Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/management/opensm/osmtest/osmt_multicast.c ============================================================================== --- stable/9/contrib/ofed/management/opensm/osmtest/osmt_multicast.c Sun Jan 11 14:22:00 2015 (r276976) +++ stable/9/contrib/ofed/management/opensm/osmtest/osmt_multicast.c Sun Jan 11 14:30:50 2015 (r276977) @@ -42,6 +42,7 @@ #ifndef __WIN__ #include #endif +#include #include #include #include Modified: stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c Sun Jan 11 14:22:00 2015 (r276976) +++ stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c Sun Jan 11 14:30:50 2015 (r276977) @@ -3013,7 +3013,7 @@ Exit: /********************************************************************** **********************************************************************/ -inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec) +static inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec) { return (p_rec->dlid << 16 | p_rec->slid); } Modified: stable/9/contrib/ofed/usr.bin/Makefile ============================================================================== --- stable/9/contrib/ofed/usr.bin/Makefile Sun Jan 11 14:22:00 2015 (r276976) +++ stable/9/contrib/ofed/usr.bin/Makefile Sun Jan 11 14:30:50 2015 (r276977) @@ -1,7 +1,7 @@ .include -SUBDIR = ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat -SUBDIR += ibsysstat ibtracert opensm perfquery saquery -SUBDIR += sminfo smpdump smpquery vendstat +SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \ + ibsysstat ibtracert opensm perfquery saquery \ + sminfo smpdump smpquery vendstat .include Modified: stable/9/contrib/ofed/usr.lib/Makefile ============================================================================== --- stable/9/contrib/ofed/usr.lib/Makefile Sun Jan 11 14:22:00 2015 (r276976) +++ stable/9/contrib/ofed/usr.lib/Makefile Sun Jan 11 14:30:50 2015 (r276977) @@ -1,6 +1,6 @@ .include -SUBDIR = libibcommon libibmad libibumad libibverbs libmlx4 libmthca -SUBDIR += libopensm libosmcomp libosmvendor libibcm librdmacm libsdp +SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \ + libopensm libosmcomp libosmvendor libibcm librdmacm libsdp .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 14:33:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDDCDC0E; Sun, 11 Jan 2015 14:33:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8A569BE; Sun, 11 Jan 2015 14:33:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BEXHc9059280; Sun, 11 Jan 2015 14:33:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BEXHTP059279; Sun, 11 Jan 2015 14:33:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111433.t0BEXHTP059279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 14:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276978 - stable/9/contrib/ofed/management/opensm/opensm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:33:17 -0000 Author: hselasky Date: Sun Jan 11 14:33:16 2015 New Revision: 276978 URL: https://svnweb.freebsd.org/changeset/base/276978 Log: MFC r276815: Fix for compilation issue. Don't use the "abs()" function for unsigned computations. PR: 196597 Sponsored by: Mellanox Technologies Modified: stable/9/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c ============================================================================== --- stable/9/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Sun Jan 11 14:30:50 2015 (r276977) +++ stable/9/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Sun Jan 11 14:33:16 2015 (r276978) @@ -2917,6 +2917,10 @@ Exit: /*************************************************** ***************************************************/ +static boolean_t __osm_invalid_link_rank_diff(const uint32_t val) +{ + return (val != 1U && val != -1U); +} static int __osm_ftree_fabric_construct_sw_ports(IN ftree_fabric_t * p_ftree, IN ftree_sw_t * p_sw) @@ -2993,7 +2997,7 @@ static int __osm_ftree_fabric_construct_ p_remote_hca_or_sw = (void *)p_remote_sw; - if (abs(p_sw->rank - p_remote_sw->rank) != 1) { + if (__osm_invalid_link_rank_diff(p_sw->rank - p_remote_sw->rank)) { OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB16: " "Illegal link between switches with ranks %u and %u:\n" From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 14:36:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C501CD8C; Sun, 11 Jan 2015 14:36:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFA2B9D2; Sun, 11 Jan 2015 14:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BEaRhu059742; Sun, 11 Jan 2015 14:36:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BEaRDL059741; Sun, 11 Jan 2015 14:36:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111436.t0BEaRDL059741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 14:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276979 - stable/10/contrib/ofed/management/opensm/opensm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:36:27 -0000 Author: hselasky Date: Sun Jan 11 14:36:26 2015 New Revision: 276979 URL: https://svnweb.freebsd.org/changeset/base/276979 Log: MFC r276815: Fix for compilation issue. Don't use the "abs()" function for unsigned computations. PR: 196597 Sponsored by: Mellanox Technologies Modified: stable/10/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c ============================================================================== --- stable/10/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Sun Jan 11 14:33:16 2015 (r276978) +++ stable/10/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Sun Jan 11 14:36:26 2015 (r276979) @@ -2917,6 +2917,10 @@ Exit: /*************************************************** ***************************************************/ +static boolean_t __osm_invalid_link_rank_diff(const uint32_t val) +{ + return (val != 1U && val != -1U); +} static int __osm_ftree_fabric_construct_sw_ports(IN ftree_fabric_t * p_ftree, IN ftree_sw_t * p_sw) @@ -2993,7 +2997,7 @@ static int __osm_ftree_fabric_construct_ p_remote_hca_or_sw = (void *)p_remote_sw; - if (abs(p_sw->rank - p_remote_sw->rank) != 1) { + if (__osm_invalid_link_rank_diff(p_sw->rank - p_remote_sw->rank)) { OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB16: " "Illegal link between switches with ranks %u and %u:\n" From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 14:49:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15F15120; Sun, 11 Jan 2015 14:49:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 009BEAC6; Sun, 11 Jan 2015 14:49:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BEnI6O064843; Sun, 11 Jan 2015 14:49:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BEnIkw064842; Sun, 11 Jan 2015 14:49:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111449.t0BEnIkw064842@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 14:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276980 - stable/9/contrib/ofed/usr.bin/osmtest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:49:19 -0000 Author: hselasky Date: Sun Jan 11 14:49:18 2015 New Revision: 276980 URL: https://svnweb.freebsd.org/changeset/base/276980 Log: Unset BINDIR for osmtest, because ${TESTSBASE} is unset. Sponsored by: Mellanox Technologies Modified: stable/9/contrib/ofed/usr.bin/osmtest/Makefile Modified: stable/9/contrib/ofed/usr.bin/osmtest/Makefile ============================================================================== --- stable/9/contrib/ofed/usr.bin/osmtest/Makefile Sun Jan 11 14:36:26 2015 (r276979) +++ stable/9/contrib/ofed/usr.bin/osmtest/Makefile Sun Jan 11 14:49:18 2015 (r276980) @@ -5,7 +5,8 @@ OPENSM= ${.CURDIR}/../../management/opensm .PATH: ${OPENSM}/osmtest ${OPENSM}/man -BINDIR= ${TESTSBASE}/usr.bin/opensm +# NOTE: FreeBSD-9 has currently no ${TESTSBASE} +#BINDIR= ${TESTSBASE}/usr.bin/opensm PROG= osmtest SRCS= main.c \ From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 15:00:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A560480; Sun, 11 Jan 2015 15:00:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654C7BA8; Sun, 11 Jan 2015 15:00:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BF09RA070473; Sun, 11 Jan 2015 15:00:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BF08xT070470; Sun, 11 Jan 2015 15:00:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111500.t0BF08xT070470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 15:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276981 - head/contrib/ofed/libmlx4/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 15:00:09 -0000 Author: hselasky Date: Sun Jan 11 15:00:08 2015 New Revision: 276981 URL: https://svnweb.freebsd.org/changeset/base/276981 Log: Fix support for ConnectX2 hardware. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libmlx4/src/mlx4-abi.h head/contrib/ofed/libmlx4/src/mlx4.c head/contrib/ofed/libmlx4/src/mlx4.h Modified: head/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4-abi.h Sun Jan 11 14:49:18 2015 (r276980) +++ head/contrib/ofed/libmlx4/src/mlx4-abi.h Sun Jan 11 15:00:08 2015 (r276981) @@ -38,6 +38,13 @@ #define MLX4_UVERBS_MIN_ABI_VERSION 2 #define MLX4_UVERBS_MAX_ABI_VERSION 4 +struct mlx4_alloc_ucontext_resp_v3 { + struct ibv_get_context_resp ibv_resp; + __u32 qp_tab_size; + __u16 bf_reg_size; + __u16 bf_regs_per_page; +}; + struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; __u32 dev_caps; Modified: head/contrib/ofed/libmlx4/src/mlx4.c ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4.c Sun Jan 11 14:49:18 2015 (r276980) +++ head/contrib/ofed/libmlx4/src/mlx4.c Sun Jan 11 15:00:08 2015 (r276981) @@ -142,8 +142,10 @@ static struct ibv_context *mlx4_alloc_co struct mlx4_context *context; struct ibv_get_context cmd; struct mlx4_alloc_ucontext_resp resp; + struct mlx4_alloc_ucontext_resp_v3 resp_v3; int i; struct ibv_device_attr dev_attrs; + unsigned int bf_reg_size; context = calloc(1, sizeof *context); if (!context) @@ -151,11 +153,26 @@ static struct ibv_context *mlx4_alloc_co context->ibv_ctx.cmd_fd = cmd_fd; - if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, - &resp.ibv_resp, sizeof resp)) - goto err_free; + if (to_mdev(ibdev)->driver_abi_ver > 3) { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp.ibv_resp, sizeof resp)) + goto err_free; + + context->num_qps = resp.qp_tab_size; + context->num_xrc_srqs = resp.qp_tab_size; + bf_reg_size = resp.bf_reg_size; + context->cqe_size = resp.cqe_size; + } else { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp_v3.ibv_resp, sizeof resp_v3)) + goto err_free; + + context->num_qps = resp_v3.qp_tab_size; + context->num_xrc_srqs = resp_v3.qp_tab_size; + bf_reg_size = resp_v3.bf_reg_size; + context->cqe_size = 32; + } - context->num_qps = resp.qp_tab_size; context->qp_table_shift = ffs(context->num_qps) - 1 - MLX4_QP_TABLE_BITS; context->qp_table_mask = (1 << context->qp_table_shift) - 1; @@ -163,7 +180,6 @@ static struct ibv_context *mlx4_alloc_co for (i = 0; i < MLX4_QP_TABLE_SIZE; ++i) context->qp_table[i].refcnt = 0; - context->num_xrc_srqs = resp.qp_tab_size; context->xrc_srq_table_shift = ffs(context->num_xrc_srqs) - 1 - MLX4_XRC_SRQ_TABLE_BITS; context->xrc_srq_table_mask = (1 << context->xrc_srq_table_shift) - 1; @@ -182,7 +198,7 @@ static struct ibv_context *mlx4_alloc_co if (context->uar == MAP_FAILED) goto err_free; - if (resp.bf_reg_size) { + if (bf_reg_size) { context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size, PROT_WRITE, MAP_SHARED, cmd_fd, to_mdev(ibdev)->page_size); @@ -192,7 +208,7 @@ static struct ibv_context *mlx4_alloc_co context->bf_page = NULL; context->bf_buf_size = 0; } else { - context->bf_buf_size = resp.bf_reg_size / 2; + context->bf_buf_size = bf_reg_size / 2; context->bf_offset = 0; pthread_spin_init(&context->bf_lock, PTHREAD_PROCESS_PRIVATE); } @@ -201,7 +217,6 @@ static struct ibv_context *mlx4_alloc_co context->bf_buf_size = 0; } - context->cqe_size = resp.cqe_size; pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE); context->ibv_ctx.ops = mlx4_ctx_ops; @@ -294,6 +309,7 @@ found: dev->ibv_dev.ops = mlx4_dev_ops; dev->page_size = sysconf(_SC_PAGESIZE); + dev->driver_abi_ver = abi_version; return &dev->ibv_dev; } Modified: head/contrib/ofed/libmlx4/src/mlx4.h ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4.h Sun Jan 11 14:49:18 2015 (r276980) +++ head/contrib/ofed/libmlx4/src/mlx4.h Sun Jan 11 15:00:08 2015 (r276981) @@ -162,6 +162,7 @@ enum { struct mlx4_device { struct ibv_device ibv_dev; int page_size; + int driver_abi_ver; }; struct mlx4_db_page; From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 16:15:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB23FE12; Sun, 11 Jan 2015 16:15:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC68D231; Sun, 11 Jan 2015 16:15:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BGFWb2007052; Sun, 11 Jan 2015 16:15:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BGFWSr007050; Sun, 11 Jan 2015 16:15:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111615.t0BGFWSr007050@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 16:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276982 - in head: share/man/man9 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:15:33 -0000 Author: hselasky Date: Sun Jan 11 16:15:31 2015 New Revision: 276982 URL: https://svnweb.freebsd.org/changeset/base/276982 Log: Remove no longer used "M_FLOWID" flag and update the netisr manpage. This patch completes process started by r275358. Sponsored by: Mellanox Technologies Modified: head/share/man/man9/netisr.9 head/sys/sys/mbuf.h Modified: head/share/man/man9/netisr.9 ============================================================================== --- head/share/man/man9/netisr.9 Sun Jan 11 15:00:08 2015 (r276981) +++ head/share/man/man9/netisr.9 Sun Jan 11 16:15:31 2015 (r276982) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2010 +.Dd January 11, 2015 .Dt NETISR 9 .Os .Sh NAME @@ -126,13 +126,13 @@ MIB names, so should not contain whitesp Protocol handler function that will be invoked on each packet received for the protocol. .It Vt netisr_m2flow_t Va nh_m2flow -Optional protocol function to generate a flow ID and set -.Dv M_FLOWID -for packets that do not enter +Optional protocol function to generate a flow ID and set a valid +hashtype for packets that enter the .Nm with -.Dv M_FLOWID -defined. +.Dv M_HASHTYPE_GET(m) +equal to +.Dv M_HASHTYPE_NONE . Will be used only with .Dv NETISR_POLICY_FLOW . .It Vt netisr_m2cpuid_t Va nh_m2cpuid Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Jan 11 15:00:08 2015 (r276981) +++ head/sys/sys/mbuf.h Sun Jan 11 16:15:31 2015 (r276982) @@ -221,7 +221,7 @@ struct mbuf { #define M_MCAST 0x00000020 /* send/received as link-level multicast */ #define M_PROMISC 0x00000040 /* packet was not for us */ #define M_VLANTAG 0x00000080 /* ether_vtag is valid */ -#define M_FLOWID 0x00000100 /* deprecated: flowid is valid */ +#define M_UNUSED_8 0x00000100 /* --available-- */ #define M_NOFREE 0x00000200 /* do not free mbuf, embedded in cluster */ #define M_PROTO1 0x00001000 /* protocol-specific */ @@ -248,7 +248,7 @@ struct mbuf { * Flags preserved when copying m_pkthdr. */ #define M_COPYFLAGS \ - (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG|M_FLOWID| \ + (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG| \ M_PROTOFLAGS) /* @@ -256,7 +256,7 @@ struct mbuf { */ #define M_FLAG_BITS \ "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ - "\7M_PROMISC\10M_VLANTAG\11M_FLOWID" + "\7M_PROMISC\10M_VLANTAG" #define M_FLAG_PROTOBITS \ "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \ "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \ From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 16:36:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7DD7356; Sun, 11 Jan 2015 16:36:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D373E5F9; Sun, 11 Jan 2015 16:36:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BGaewK016734; Sun, 11 Jan 2015 16:36:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BGael1016733; Sun, 11 Jan 2015 16:36:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501111636.t0BGael1016733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Jan 2015 16:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276983 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:36:41 -0000 Author: mav Date: Sun Jan 11 16:36:39 2015 New Revision: 276983 URL: https://svnweb.freebsd.org/changeset/base/276983 Log: When aggregating TRIM segments, move the new one to the list end. New segment at the list head may block all TRIM requests until txg of that segment can be processed. On my random I/O tests this change reduce peak TRIM list length from 650 to 450 segments. Hopefully it should reduce TRIM burstiness when list processing is unblocked. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 11 16:15:31 2015 (r276982) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 11 16:36:39 2015 (r276983) @@ -244,17 +244,23 @@ trim_map_segment_add(trim_map_t *tm, uin ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { TRIM_MAP_SINC(tm, end - ts_before->ts_end); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; + list_remove(&tm->tm_head, ts_before); + list_insert_tail(&tm->tm_head, ts_before); } else if (merge_after) { TRIM_MAP_SINC(tm, ts_after->ts_start - start); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); } else { TRIM_MAP_SINC(tm, end - start); TRIM_MAP_QINC(tm); From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 16:46:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93A1C4F1; Sun, 11 Jan 2015 16:46:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E2096C9; Sun, 11 Jan 2015 16:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BGkkRY021475; Sun, 11 Jan 2015 16:46:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BGkiCR021466; Sun, 11 Jan 2015 16:46:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501111646.t0BGkiCR021466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 11 Jan 2015 16:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276984 - in head/sys/arm: allwinner/a20 altera/socfpga arm freescale/imx include rockchip samsung/exynos ti/omap4 xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:46:46 -0000 Author: andrew Date: Sun Jan 11 16:46:43 2015 New Revision: 276984 URL: https://svnweb.freebsd.org/changeset/base/276984 Log: Rename gic_init_secondary to arm_init_secondary_ic to help with the merge of the arm_intrng project branch. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/arm/gic.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/intr.h head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/allwinner/a20/a20_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -57,7 +57,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -84,7 +84,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/arm/gic.c Sun Jan 11 16:46:43 2015 (r276984) @@ -488,7 +488,7 @@ arm_get_next_irq(int last_irq) } void -gic_init_secondary(void) +arm_init_secondary_ic(void) { arm_gic_init_secondary(arm_gic_sc->gic_dev); Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/freescale/imx/imx6_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -66,7 +66,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/include/intr.h Sun Jan 11 16:46:43 2015 (r276984) @@ -85,7 +85,7 @@ extern int (*arm_config_irq)(int irq, en void arm_irq_memory_barrier(uintptr_t); -void gic_init_secondary(void); +void arm_init_secondary_ic(void); int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, int *trig, int *pol); Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/rockchip/rk30xx_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -79,7 +79,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -70,7 +70,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/ti/omap4/omap4_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/xilinx/zy7_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -43,7 +43,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 17:00:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E67E37EC; Sun, 11 Jan 2015 17:00:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2AA6807; Sun, 11 Jan 2015 17:00:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BH0PcE027915; Sun, 11 Jan 2015 17:00:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BH0PDc027914; Sun, 11 Jan 2015 17:00:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501111700.t0BH0PDc027914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 17:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276985 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 17:00:26 -0000 Author: ian Date: Sun Jan 11 17:00:24 2015 New Revision: 276985 URL: https://svnweb.freebsd.org/changeset/base/276985 Log: Store the shadow command/mode register in the softc, not a local static var. Submitted by: Michal Meloun Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 11 16:46:43 2015 (r276984) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 11 17:00:24 2015 (r276985) @@ -124,6 +124,7 @@ struct bcm_sdhci_softc { bus_dma_tag_t sc_dma_tag; bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; + uint32_t cmd_and_mode; }; static int bcm_sdhci_probe(device_t); @@ -341,6 +342,14 @@ bcm_sdhci_read_2(device_t dev, struct sd struct bcm_sdhci_softc *sc = device_get_softc(dev); uint32_t val = RD4(sc, off & ~3); + /* + * Standard 32-bit handling of command and transfer mode. + */ + if (off == SDHCI_TRANSFER_MODE) { + return (sc->cmd_and_mode >> 16); + } else if (off == SDHCI_COMMAND_FLAGS) { + return (sc->cmd_and_mode & 0x0000ffff); + } return ((val >> (off & 3)*8) & 0xffff); } @@ -375,16 +384,15 @@ static void bcm_sdhci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val) { struct bcm_sdhci_softc *sc = device_get_softc(dev); - static uint32_t cmd_and_trandfer_mode; uint32_t val32; if (off == SDHCI_COMMAND_FLAGS) - val32 = cmd_and_trandfer_mode; + val32 = sc->cmd_and_mode; else val32 = RD4(sc, off & ~3); val32 &= ~(0xffff << (off & 3)*8); val32 |= (val << (off & 3)*8); if (off == SDHCI_TRANSFER_MODE) - cmd_and_trandfer_mode = val32; + sc->cmd_and_mode = val32; else WR4(sc, off & ~3, val32); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 17:10:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 205DB9B9; Sun, 11 Jan 2015 17:10:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B2EC959; Sun, 11 Jan 2015 17:10:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BHA8UQ031548; Sun, 11 Jan 2015 17:10:08 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BHA8qs031546; Sun, 11 Jan 2015 17:10:08 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501111710.t0BHA8qs031546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 11 Jan 2015 17:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276986 - in stable/10/sys: amd64/conf i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 17:10:09 -0000 Author: nwhitehorn Date: Sun Jan 11 17:10:07 2015 New Revision: 276986 URL: https://svnweb.freebsd.org/changeset/base/276986 Log: MFC r265329: Disable ACPI and P4TCC throttling by default, following discussion on freebsd-current. These CPU speed control techniques are usually unhelpful at best. For now, continue building the relevant code into GENERIC so that it can trivially be re-enabled at runtime if anyone wants it. Relnotes: yes Modified: stable/10/sys/amd64/conf/GENERIC.hints stable/10/sys/i386/conf/GENERIC.hints Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC.hints ============================================================================== --- stable/10/sys/amd64/conf/GENERIC.hints Sun Jan 11 17:00:24 2015 (r276985) +++ stable/10/sys/amd64/conf/GENERIC.hints Sun Jan 11 17:10:07 2015 (r276986) @@ -31,3 +31,5 @@ hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" +hint.acpi_throttle.0.disabled="1" +hint.p4tcc.0.disabled="1" Modified: stable/10/sys/i386/conf/GENERIC.hints ============================================================================== --- stable/10/sys/i386/conf/GENERIC.hints Sun Jan 11 17:00:24 2015 (r276985) +++ stable/10/sys/i386/conf/GENERIC.hints Sun Jan 11 17:10:07 2015 (r276986) @@ -39,3 +39,5 @@ hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" +hint.acpi_throttle.0.disabled="1" +hint.p4tcc.0.disabled="1" From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 17:18:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD62ECDD; Sun, 11 Jan 2015 17:18:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97D579B5; Sun, 11 Jan 2015 17:18:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BHIFgt036066; Sun, 11 Jan 2015 17:18:15 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BHIF0e036063; Sun, 11 Jan 2015 17:18:15 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501111718.t0BHIF0e036063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 11 Jan 2015 17:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276987 - in stable/9/sys: amd64/conf i386/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 17:18:15 -0000 Author: nwhitehorn Date: Sun Jan 11 17:18:14 2015 New Revision: 276987 URL: https://svnweb.freebsd.org/changeset/base/276987 Log: MFC r265329: Disable ACPI and P4TCC throttling by default, following discussion on freebsd-current. These CPU speed control techniques are usually unhelpful at best. For now, continue building the relevant code into GENERIC so that it can trivially be re-enabled at runtime if anyone wants it. Relnotes: yes Modified: stable/9/sys/amd64/conf/GENERIC.hints stable/9/sys/i386/conf/GENERIC.hints Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC.hints ============================================================================== --- stable/9/sys/amd64/conf/GENERIC.hints Sun Jan 11 17:10:07 2015 (r276986) +++ stable/9/sys/amd64/conf/GENERIC.hints Sun Jan 11 17:18:14 2015 (r276987) @@ -31,3 +31,5 @@ hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" +hint.acpi_throttle.0.disabled="1" +hint.p4tcc.0.disabled="1" Modified: stable/9/sys/i386/conf/GENERIC.hints ============================================================================== --- stable/9/sys/i386/conf/GENERIC.hints Sun Jan 11 17:10:07 2015 (r276986) +++ stable/9/sys/i386/conf/GENERIC.hints Sun Jan 11 17:18:14 2015 (r276987) @@ -39,3 +39,5 @@ hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" +hint.acpi_throttle.0.disabled="1" +hint.p4tcc.0.disabled="1" From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 18:13:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C563A83; Sun, 11 Jan 2015 18:13:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86DEBE5F; Sun, 11 Jan 2015 18:13:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BIDvwN064188; Sun, 11 Jan 2015 18:13:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BIDuhR064185; Sun, 11 Jan 2015 18:13:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501111813.t0BIDuhR064185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 11 Jan 2015 18:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276991 - stable/10/share/termcap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:13:57 -0000 Author: ngie Date: Sun Jan 11 18:13:56 2015 New Revision: 276991 URL: https://svnweb.freebsd.org/changeset/base/276991 Log: MFC r275687,r275692: Relnotes: yes r275687: Remove termcap entry reordering; install the file verbatim instead termcap entry reordering requires ex (which is available via usr.bin/vi), which breaks on build hosts where installworld is run with MK_VI == no (or when make delete-old is run on ^/projects/building-blocks as vi, et al, are removed on the branch when the knob is tweaked to => "no") Reordering termcap was believed to improve performance, but the file is now accessed via /etc/termcap.db, so /etc/termcap (and /usr/share/misc/termcap by proxy) access is less preferred. Reordering the file broke the historical comment <-> entry mapping as well, which could muddle the purpose of entries in the file, so it could be potentially harmful to readers in its reordered state. Discussion took place on hackers@ here: https://lists.freebsd.org/pipermail/freebsd-hackers/2014-December/046657.html Discussed with: -hackers, mp Sponsored by: EMC / Isilon Storage Division r275692: Fix building termcap.db when make obj is run beforehand from a clean tree by using make variables for the filenames, which helps resolve pathing appropriately when running cap_mkdb Pointyhat to: me Added: stable/10/share/termcap/termcap - copied unchanged from r275687, head/share/termcap/termcap Deleted: stable/10/share/termcap/reorder stable/10/share/termcap/termcap.src Modified: stable/10/share/termcap/Makefile stable/10/share/termcap/README Directory Properties: stable/10/ (props changed) Modified: stable/10/share/termcap/Makefile ============================================================================== --- stable/10/share/termcap/Makefile Sun Jan 11 18:02:13 2015 (r276990) +++ stable/10/share/termcap/Makefile Sun Jan 11 18:13:56 2015 (r276991) @@ -9,10 +9,7 @@ MAN= termcap.5 FILES= termcap termcap.db FILESDIR= ${BINDIR}/misc -CLEANFILES+= termcap termcap.db - -termcap: reorder termcap.src - TERM=dumb TERMCAP=dumb: ex - ${.CURDIR}/termcap.src < ${.CURDIR}/reorder +CLEANFILES+= termcap.db .include .if ${TARGET_ENDIANNESS} == "1234" @@ -24,7 +21,7 @@ CAP_MKDB_ENDIAN= .endif termcap.db: termcap - cap_mkdb ${CAP_MKDB_ENDIAN} termcap + cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} etc-termcap: ln -fs ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap Modified: stable/10/share/termcap/README ============================================================================== --- stable/10/share/termcap/README Sun Jan 11 18:02:13 2015 (r276990) +++ stable/10/share/termcap/README Sun Jan 11 18:13:56 2015 (r276991) @@ -1,4 +1,6 @@ # @(#)README 8.1 (Berkeley) 6/8/93 +# +# $FreeBSD$ << 12 May 1983 >> To install this directory on your system: @@ -19,7 +21,7 @@ common and really should go near the fro Third, if you are not a super user and cannot create the directory /usr/lib/tabset, make a corresponding directory somewhere you can and add a line to reorder to globally change all /usr/lib/tabset's to your own -path name. This change is better than just changing the termcap.src file +path name. This change is better than just changing the termcap file because it makes it easier to diff it from newer distributed versions. Try to keep the source as is whenever possible, and put mungings into reorder. Copied: stable/10/share/termcap/termcap (from r275687, head/share/termcap/termcap) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/termcap/termcap Sun Jan 11 18:13:56 2015 (r276991, copy of r275687, head/share/termcap/termcap) @@ -0,0 +1,4667 @@ +# Copyright (c) 1980, 1985, 1989, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)termcap.src 8.2 (Berkeley) 11/17/93 +# $FreeBSD$ + +# Termcap source file +# John Kunze, Berkeley +# Craig Leres, Berkeley +# +# Please submit changes via https://bugs.freebsd.org/submit/ +# +# << EOH - after reordering, above header lines survive and this line dies >> +# +# DESCRIPTION: +# This file describes capabilities of various terminals, as needed by +# software such as screen editors. It does not attempt to describe +# printing terminals very well, nor graphics terminals. Someday. +# See termcap(5) in the Unix Programmers Manual for documentation. +# +# Conventions: First entry is canonical name for model or mode, last entry +# is verbose description. Others are mnemonic synonyms for the terminal. +# +# Terminal naming conventions: +# Terminal names look like - +# Certain abbreviations (e.g. c100 for concept100) are also allowed +# for upward compatibility. The part to the left of the dash, if a +# dash is present, describes the particular hardware of the terminal. +# The part to the right can be used for flags indicating special ROM's, +# extra memory, particular terminal modes, or user preferences. +# All names should be in lower case, for consistency in typing. +# +# The following are conventionally used flags: +# rv Terminal in reverse video mode (black on white) +# 2p Has two pages of memory. Likewise 4p, 8p, etc. +# w Wide - in 132 column mode. +# pp Has a printer port which is used. +# na No arrow keys - termcap ignores arrow keys which are +# actually there on the terminal, so the user can use +# the arrow keys locally. +# +# To easily test a new terminal description, put it in $HOME/.termcap +# and programs will look there before looking in /etc/termcap. +# You can also setenv TERMPATH to a list of full pathnames (separated +# by spaces or colons) to be searched by tgetent() in the order listed. +# The TERMCAP environment variable is usually set to the termcap +# entry itself to avoid reading files when starting up a program. +# +# If you absolutely MUST check for a specific terminal (this is discouraged) +# check for the 2nd entry (the canonical form) since all other codes are +# subject to change. We would much rather put in special capabilities +# to describe your terminal than have you key on the name. +# +# Special manufacturer codes: +# A: hardcopy daisy wheel terminals +# M: Misc. (with only a few terminals) +# q: Homemade +# s: special (dialup, etc.) +# +# Comments in this file begin with # - they cannot appear in the middle +# of a termcap entry. Individual entries are commented out by +# placing a period between the colon and the capability name. +# +# To add a termcap entry under FreeBSD for a new terminal type, insert +# the entry in the appropriate location in /etc/termcap then issue this +# command: +# +# cap_mkdb -f /usr/share/misc/termcap /etc/termcap +# +# Terminfo source entries can be converted to termcap entries with the +# tic program that is part of the ncurses distribution, see the ports +# section. +# +# +# This file is to be installed with an editor script (reorder) +# that moves the most common terminals to the front of the file. +# # -------------------------------- +# +# A: DAISY WHEEL PRINTERS +# +# The A manufacturer represents Diablo, DTC, Xerox, Qume, and other Daisy +# wheel terminals until such time as termcap distinguishes between them +# enough to justify separate codes. +# This is an "experimental" entry for the SRI Agiles. +# It has been tried in a minimal way -- the Agile did not blow up! +# However, it has not been exhaustively tested. +# Anyone who tries it and finds it wanting should get in touch with: +# Ralph Keirstead (ralph@sri-unix); +# EK352; SRI International; 333 Ravenswood Avenue; Menlo Park, CA 94025 +agile|agiles|sri agiles:\ + :bs:hc:os:pl:co#132:do=^J:kb=^H:up=\E\n:\ + :hu=\E0:hd=\E9:if=/usr/share/tabset/std:is=\EE\EF\EJ: +1620|1720|450|ipsi|diablo 1620:\ + :do=^J:ct=\E2:st=\E1:ch=\E\t%i%.:\ + :if=/usr/share/tabset/xerox1720:\ + :kb=^H:le=^H:bs:co#132:hc:hu=\EU:hd=\ED:os:pt:up=\E\n: +1620-m8|1640-m8|diablo 1620 w/8 column left margin:\ + :do=^J:co#124:is=\r \E9:tc=1620: +1640|1740|630|1730|x1700|diablo|xerox|diablo 1640:\ + :if=/usr/share/tabset/xerox1730:\ + :us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620: +1640-lm|1740-lm|630-lm|1730-lm|x1700-lm|diablo-lm|xerox-lm|\ + diablo 1640 with indented left margin:\ + :if=/usr/share/tabset/xerox1730-lm:\ + :co#124:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620: +# DTC 382 with VDU. Has no cd so we fake it with ce. Standout works but +# won't go away without dynamite. The terminal has tabs, but I'm getting +# tired of fighting the braindamage. If no tab is set or the terminal's +# in a bad mood, it glitches the screen around all of memory. Note that +# return puts a blank ("a return character") in the space the cursor was +# at, so we use ^P return (and thus ^P newline for newline). Note also +# that if you turn off pt and let Unix expand tabs, curses won't work +# (current version) because it doesn't turn off this bit, and cursor +# addressing sends a tab for row/column 9. What a losing terminal! I +# have been unable to get tabs set in all 96 lines - it always leaves at +# least one line with no tabs in it, and once you tab through that line, +# it completely weirds out. +dtc|ps|dtc382|382:\ + :do=^J:al=^P^Z:am:le=^H:\ + :bs:co#80:ce=^P^U:cl=20^P^]:cm=%r^P^Q%.%.:dc=^X:\ + :dl=^P^S:ei=^Pi:ho=^P^R:im=^PI:ve=^Pb:vs=^PB:pc=\177:te=20^P^]:\ + :li#24:nd=^PR:.se=^P \200:.so=^P \002^PF:us=^P \020:ue=^P \200:\ + :up=^P^L:nc:xr:xs:da:db:.pt:cr=^P^M:cd=^P^U^P^S^P^S:\ + :if=/usr/share/tabset/dtc382: +dtc300s|300|300s|dtc 300s:\ + :ct=\E3:st=\E1:do=^J:\ + :kb=^h:le=^H:bs:co#132:hc:hu=\EH:hd=\Eh:os:pt:up=^Z: +gsi:\ + :le=^H:bs:co#132:hc:hd=\Eh:hu=\EH:os:pt:up=^Z:do=^J: +# This used to have :pl: - maybe they meant :pt:? +aj830|aj832|aj|anderson jacobson:\ + :do=^J:le=^H:bs:hc:hd=\E9:hu=\E8:os:up=\E7: +# From Chris Torek Thu, 7 Nov 85 18:21:58 EST +aj510|AJ510|Anderson-Jacobson model 510:\ + :ip=.1*:so=\E"I:us=\E"U:cd=\E'P:ce=\E'L:cl=^L:cm=\E#%+ %+ :\ + :dl=2*\E&D:ue=\E"U:co#80:li#24:se=\E"I:al=2*\E&I:im=\E'I:ei=\E'J:\ + :dc=.1*\E'D:up=\EY:nd=\EX:bs:am:mi:ti=\E"N:te=\E"N:\ + :ku=\EY:kd=\EZ:kl=\EW:kr=\EX:pc=\177: +# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981 +# This is incomplete, but it's a start. +5520|nec|spinwriter|nec 5520:\ + :ct=\E3:st=\E1:do=^J:kb=^h:le=^H:bs:co#132:hc:hu=\E]s\E9\E]W:\ + :hd=\E]s\n\E]W:os:pt:up=\E9: +qume5|qume|Qume Sprint 5:\ + :ct=\E3:st=\E1:do=^J:\ + :kb=^h:le=^H:bs:co#80:hc:hu=\EH:hd=\Eh:os:pt:up=^Z: +q102|qume102|Qume 102:\ + :al=\EE:am:bs:bt=\EI:\ + :cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:ct=\E3:\ + :dc=\EW:dl=\ER:do=^J:ho=^^:ic=\EQ:\ + :k0=^A@\r:k1=^AA\r:k2=^AB\r:k3=^AC\r:kd=^J:kl=^H:kr=^L:ku=^K:\ + :le=^H:li#24:ma=^K^P^L :nd=^L:\ + :se=\EG0:sg#1:so=\EG4:st=\E1:\ + :ue=\EG0:ug#1:up=^K:us=\EG8: +# From ucbvax!mtxinu!sybase!tim (Tim Wood) Fri Sep 27 10:25:24 PDT 1985 +# This entry supports line and character insert and delete, scroll up and +# down and the arrow keys. To use it, perform the following on your qvt-101 +# 1) enter SET-UP mode, select the SET 3 line; +# 2) move the cursor to the EMULATION item and hit SPACE +# until QVT-101B appears +# 3) enter SHIFT-S +# 4) exit SET-UP - the terminal is now configured +q101|qvt101|qvt-101|Qume 101 $310 special:\ + :al=\EE:am:bt=\EI:ce=\Et:cl=\E*:dc=\EW:\ + :dl=\ER:do=^J:ic=\EQ:md=\E(:me=\EG0:mh=\E):\ + :le=^H:bs:cm=\E=%+ %+ :cl=1^Z:co#80:ho=^^:li#24:ma=^K^P:nd=^L:ku=^K:\ + :vs=\EM4\040\200\200\200:mr=\EG4:ms:so=\EG4:se=\EG1: +# I suspect the xerox1720 is the same as the diablo 1620. +x1720|1700|x1750|xerox 1720:\ + :co#132:le=^H:bs:hc:os:pt:do=^J:ct=\E2:st=\E1: +# # -------------------------------- +# +# B: AT&T ATT +# +# AT&T Teletype 5410 Terminal (a.k.a. 4410) +# From: carvalho%kepler@Berkeley.EDU (Marcio de Carvalho) +# Date: Thu, 26 Feb 87 09:16:50 PST +# +# Although the 5410 supports labels, it blanks the screen after +# each label is programmed creating to much visual activity. +# To use the labels, use FL=\E[%d;00q%-16s +# +5410|4410|tty5410|att4410|AT&T Teletype 5410 terminal with 80 columns:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\ + :cm=5\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:ic=\E[@:\ + :kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\ + :li#24:nd=\E[C:se=\E[m:so=\E[2;7m:sr=\EM:\ + :ue=\E[m:up=\E[A:us=\E[4m:EE=\E[m:BO=\E[0;7m:DS=\E[2m:\ + :KM=/usr/lib/ua/kmap.5410:is=\E[0m^O\E[?6l:kn#8:\ + :k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k4=\EOg:k6=\EOh:\ + :k7=\EOi:k8=\EOj:ko=nd,up,ho: +# AT&T 630 MTG DMD from muller%sdcc7@ucsd.edu (Keith Muller) +att630|dmd630|ATT630|630DMD|630dmd|630MTG|AT&T 630 windowing terminal:\ + :am:da:db:ms:bs:co#80:it#8:li#60:lm#0:\ + :up=\E[A:do=\E[B:nd=\E[C:le=\b:UP=\E[%dA:DO=\E[%dB:RI=\E[%dC:\ + :LE=\E[%dD:cm=\E[%i%d;%dH:ho=\E[H:bt=\E[Z:\ + :sf=\n:sr=\EM:SF=\E[%dS:SR=\E[%dT:us=\E[4m:ue=\E[m:so=\E[7m:se=\E[m:\ + :mr=\E[7m:mh=\E[2m:mb=\E[5m:me=\E[m:ce=\E[K:cd=\E[J:cl=\E[H\E[J:\ + :dc=\E[P:dl=\E[M:al=\E[L:DC=\E[%dP:DL=\E[%dM:AL=\E[%dL:\ + :ic=\E[@:IC=\E[%d@:sc=\E7:rc=\E8:i2=\E[m:rs=\Ec:\ + :pf=\E[?4i:po=\E[?5i:\ + :kb=\b:kC=\E[2J:kh=\E[H:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D: +dmd630-24|att630-24|ATT630-24|630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines:\ + :li#24:tc=att630: +dmd615|att615|ATT615|615DMD|615MTG|AT&T 615 windowing terminal 80 column:\ + :li#24:tc=att630: +dmd615-w|att615-w|ATT615-w|615DMD-w|615MTG-w|AT&T 615 windowing terminal 132 column:\ + :li#24:co#132:tc=att630: +dmd620|att620|ATT620|620DMD|620MTG|AT&T 620 windowing terminal 80 column:\ + :li#24:tc=att630: +dmd620-w|att620-w|ATT620-w|620DMD-w|620MTG-w|AT&T 620 windowing terminal 132 column:\ + :li#24:co#132:tc=att630: +# AT&T Teletype 5420 Terminal (a.k.a. 4415) June 5, 1985 +5420|4415|tty5420|att4415|AT&T Teletype 5420 terminal:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\ + :cm=\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:im=\E[4h:ei=\E[4l:\ + :kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\ + :li#24:nd=\E[C:se=\E[m:so=\E[2;7m:sr=\EM:\ + :ue=\E[m:up=\E[A:us=\E[4m:EE=\E[m:BO=\E[0;7m:DS=\E[2m:\ + :KM=/usr/lib/ua/kmap.5420:\ + :is=\E[0m^O\E[1;2;3;4;6l\E[12;13;14;20l\E[?6;97;99l\E[?7h\E[4i\Ex\E[25;1j\212\E[8;0j\E[9;0j\E[10;0j\E[19;1j:\ + :db:mi:pt:kn#8:k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k5=\EOg:k6=\EOh:\ + :k7=\EOi:k8=\EOj:ve=\E[11;0j:\ + :vs=\E[11;1j:ko=bt,nd,up,dc,dl,ho,im,al: +# AT&T Teletype 5425 Terminal (a.k.a 4425) June 5, 1985 +5425|4425|tty5425|att4425|AT&T Teletype 5425:\ + :FL=\E[%d;00q%-16s\E~:FE=\E|:KM=/usr/lib/ua/kmap.5425:\ + :is=\E[0m^O\E[1;2;3;4;6l\E[12;13;14;20l\E[?6l\E[?7h\E[4i\E[9;0j\E[10;0j\E[11;0j\E[21;1j\E[25;1j\212:\ + :ve=\E[12;0j:vs=\E[12;1j:tc=5420: +t4|4420|tty4420|Teletype 4420:\ + :vs=\ER:ve=\ER:am:da:db:mi:cr=\EG:\ + :nl=\EG\EB:li#23:\ + :co#80:cl=\EH\EJ:cd=\EJ:cm=\EY%+ %+ :\ + :bs:up=\E7:do=\EB:nd=\EC:al=\EL:\ + :dl=\EM:dc=\EP:ic=\E\136:sf=\EH\EM\EY5 :sr=\ET:kb=^H: +pc6300plus|6300|6300plus:\ + :al=\E[1L:am:bs:cd=\E[0J:ce=\E[0K:cl=\E[2J\E[H:cm=\E[%i%2;%2H:co#80:\ + :dc=\E[1P:dl=\E[1M:do=\E[B:ho=\E[H:\ + :ic=\E[1@:kb=\10:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:li#24:\ + :k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k5=\EOg:k6=\EOh:k7=\EOi:k8=\EOj:\ + :k9=\EOk:k10=\EOu:nd=\E[C:se=\E[m:so=\E[7m:ue=\E[m:up=\E[A:us=\E[4m:\ + :EE=\E[m:BO=\E[0;7m:CV=\E[=C:CI=\E[=1C:KM=/usr/lib/ua/kmap.s5: +# AT&T 6386 decompiled and hacked from SVR3.1 terminfo +# From: caron@polya.Stanford.EDU (Ilan G. Caron) +# Problems: (1) The mode lines are screwed up - they're not in standout +# (an extraneous ESC-RD sequence is prepended to each mode line). +# (2) Cursor addressing into the mode line is often off-by-one, +# in particular, when the percentage indicator is updated. +# (3) When reverting to a single window (C-x 1), the display +# needs refreshing (an extraneous ESC-S seems to be generated). +# (The above 3 might be manifestations of the same problem). +# (4) Deletes sometime don't, especially when done fast - does this +# suggest that I need to pad something? +AT386|at386|386AT|386at|at/386 console:\ + :am:bw:eo:xo:Co#8:NC#3:co#80:li#25:pa#64:kn#6:\ + :@7=\E[Y:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:\ + :F1=\EOZ:F2=\EOA:IC=\E[%d@:LE=\E[%dD:RI=\E[%dC:\ + :SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\ + :ac=``a1fxgqh0jYk?lZm@nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~:\ + :ae=\E[10m:al=\E[1L:as=\E[12m:bl=^G:cd=\E[J:ce=\E[K:\ + :cl=\E[2J\E[H:cm=\E[%i%2;%2H:cr=\r:dc=\E[P:dl=\E[1M:\ + :do=\E[B:ho=\E[H:ic=\E[1@:is=\E[0;10;39m:k1=\EOP:\ + :k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:k6=\EOU:k7=\EOV:\ + :k8=\EOW:k9=\EOX:k;=\EOY:kB=^]:kC=\E[2J:kD=\E[P:\ + :kI=\E[@:kM=\E0:kN=\E[U:kP=\E[V:kb=\b:kd=\E[B:kh=\E[H:\ + :kl=\E[D:kr=\E[C:ku=\E[A:le=\E[D:mb=\E[5m:md=\E[1m:\ + :me=\E[0;10m:mk=\E[9m:mr=\E[7m:nd=\E[C:op=\E[0m:\ + :se=\E[m:sf=\E[S:so=\E[43;30m:ta=\t:ue=\E[m:up=\E[A:\ + :sr=\E[T:TC=\E[%d@:IC=\E[%d@:\ + :us=\E[4m:vb=^G:bc=\E[D: +s4|PC7300|unixpc|pc7300|7300|3b1|Safari 4:\ + :so=\E[2;7m:DS=\E[2m:XS=\E[9m:KM=/usr/lib/ua/kmap.s4:tc=pc6300plus: +# AT&T Teletype 610 Terminal +b610|610|610bct|tty610:\ + :CV=\E[25h:CI=\E[25l:KM=/usr/lib/ua/kmap.s4:\ + :FL=\E[%d;00q%-16s\E[0p:FE=\E[2p:cl=\E[1;1H\E[J:\ + :is=\E[0m^O\E[25;1|^J\E[8;0|\E[4;13;20l\E[?5l\E[12h\E[?7h\E[?4i:\ + :ve=\E[?12l:vs=\E[?12h:tc=5420: +# # -------------------------------- +# +# C: CONTROL DATA +# +cdc456|cdc:\ + :do=^J:li#24:co#80:cl=^Y^X:nd=^L:up=^Z:le=^H:bs:\ + :cm=\E1%+ %+ :ho=^Y:al=\E\114:dl=\E\112:ce=^V:cd=^X:am: +cdc456tst:\ + :do=^J:li#24:co#80:cl=^y^x:le=^H:bs:cm=\E1%+ %+ :am: +# # -------------------------------- +# +# D: DATAMEDIA +# +dm1520|dm1521|1521|1520|datamedia 1520:\ + :do=^J:am:le=^H:bs:cd=^K:ce=^]:cl=^L:cm=^^%r%+ %+ :co#80:ho=^Y:\ + :ku=^_:kd=^J:kl=^H:kr=^\:kh=^Y:\ + :li#24:nd=^\:up=^_:xn:ma=^\ ^_^P^YH:pt: +dm2500|datamedia2500|2500|datamedia 2500:\ + :do=^J:al=15^P\n^X^]^X^]:le=^H:bs:ce=^W:cl=^^^^\177:\ + :cm=^L%r%n%.%.:co#80:dc=10*^P\b^X^]:dl=10*^P^Z^X^]:\ + :dm=^P:ed=^X^]:ei=10\377\377^X^]:ho=^B:ic=10*^P^\^X^]:\ + :im=^P:li#24:nc:nd=^\:pc=\377:so@=^N:se=^X^]:up=^Z: +dm3025|datamedia 3025a:\ + :MT:is=\EQ\EU\EV:do=^J:\ + :al=130\EP\n\EQ:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :\ + :co#80:dc=6\b:dl=130\EP\EA\EQ:dm=\EP:ed=\EQ:ei=\EQ:ho=\EH:\ + :im=\EP:ip=6:li#24:nd=\EC:pt:so=\EO1:se=\EO0:up=\EA: +3045|dm3045|datamedia 3045a:\ + :is=\EU\EV:do=^J:\ + :am:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :co#80:\ + :dc=6\EB:ei=\EP:ho=\EH:im=\EP:ip=6:\ + :k0=\Ey\r:k1=\Ep\r:k2=\Eq\r:k3=\Er\r:k4=\Es\r:\ + :k5=\Et\r:k6=\Eu\r:k7=\Ev\r:k8=\Ew\r:k9=\Ex\r:\ + :kh=\EH:ku=\EA:kr=\EC:li#24:nd=\EC:pc=\177:pt:eo:ul:up=\EA:xn: +# dt80/1 is a vt100 lookalike, but it doesn't seem to need any padding. +dt80|dmdt80|dm80|datamedia dt80/1:\ + :do=^J:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=%i\E[%d;%dH:ho=\E[H:\ + :nd=\E[C:sr=\EM:so=\E[7m:se=\E[m:up=\E[A:us=\E[4m:ue=\E[m:tc=vt100: +# except in 132 column mode, where it needs a little padding. +# This is still less padding than the vt100, and you can always turn on +# the ^S/^Q handshaking, so you can use vt100 flavors for things like +# reverse video. +dt80w|dmdt80w|dm80w|datamedia dt80/1 in 132 char mode:\ + :do=^J:cd=20\E[0J:co#132:ce=20\E[0K:\ + :cm=5\E[%i%d;%dH:cl=50\E[H\E[2J:up=5\E[A:tc=dmdt80: +# # -------------------------------- +# +# H: HAZELTINE +# +# Since nd is blank, when you want to erase something you +# are out of luck. You will have to do ^L's a lot to +# redraw the screen. h1000 is untested. It doesn't work in +# vi - this terminal is too dumb for even vi. (The code is +# there but it isn't debugged for this case.) +h1000|hazeltine 1000:\ + :le=^H:bs:ho=^K:cl=^L:nd= :co#80:li#12:do=^J: +# Note: the h1552 appears to be the first Hazeltine terminal which +# is not braindamaged. It has tildes and backprimes and everything! +# Be sure the auto lf/cr switch is set to cr. +h1552|hazeltine 1552:\ + :do=^J:al=\EE:dl=\EO:k1=\EP:l1=blue:k2=\EQ:\ + :l2=red:k3=\ER:l3=green:tc=vt52: +h1552rv|hazeltine 1552 reverse video:\ + :do=^J:so=\ES:se=\ET:tc=h1552: +# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981 +h1420|hazeltine 1420:\ + :do=^J:le=^H:bs:am:li#24:co#80:al=\E^Z:dl=\E^S:cd=\E^X:cl=\E\034:\ + :up=\E^L:nd=^P:ce=\E^O:ta=^N:cm=\E^Q%r%.%+ :so=\E\037:se=\E^Y: +# New "safe" cursor movement (11/87) from cgs@umd5. Prevents freakout with +# out-of-range args and tn3270. No hz since it needs to receive ~'s. +h1500|hazeltine 1500:\ + :al=40~^Z:am:bs:cd=10~^X:ce=~^O:cl=~^\:cm=~^Q%r%>^^ %+`%+`:\ + :co#80:dl=40~^S:do=~^K:ho=~^R:kh=~^R:kr=^P:ku=~^L:kd=^J:kl=^H:\ + :le=^H:li#24:nd=^P:so=~^_:se=~^Y:up=~^L:.cm=~^Q%r%.%.: +# h1510 assumed to be in sane escape mode. Else use h1500. +h1510|hazeltine 1510:\ + :do=^J:al=\E^Z:am:le=^H:bs:cd=\E^X:ce=\E^O:cl=\E^\:cm=\E^Q%r%.%.:\ + :co#80:dl=\E^S:do=\E^K:hz:li#24:nd=^P:.se=\E^_:.so=\E^Y:up=\E^L: +h1520|hazeltine 1520:\ + :do=^J:al=~^Z:am:le=^H:bs:cd=~^X:ce=~^O:cl=~\034:cm=~^Q%r%.%.\200:\ + :co#80:dl=~^S:do=~^K:hz:li#24:nd=^P:se=~^Y:so=~\037:up=~^L:ho=~^R: +# Note: h2000 won't work well because of a clash between upper case and ~'s. +h2000|hazeltine 2000:\ + :do=^J:al=6~^z:am:le=^H:bs:cl=6~^\:cm=~^q%r%.%.:co#74:\ + :dl=6~^s:ho=~^r:li#27:nc:pc=\177: +# Hazeltine esprit entries from Univ of Utah Tue Feb 1 06:39:37 1983 +# J.Lepreau, lepreau@utah-cs, harpo!utah-cs!lepreau +esprit|hazeltine esprit:\ + :al=40\E^Z:bs:cd=5\E^X:ce=\E^O:cl=\E^\:cm=\E^Q%r%>^^ %+`%+`:co#80:\ + :dl=40\E^S:do=\E^K:ho=\E^R:li#24:nd=^P:se=\E^Y:so=\E^_:up=\E^L: +esprit-am|hazeltine esprit auto-margin:\ + :am:tc=esprit: +# # -------------------------------- +# +# I: IBM +# +# ibm61 and ibm63 from Warren Gish (cswarren@violet.berkeley.edu). +# installed 12-17-86. +# 3161 only opens a new line if a null line exists on the screen. +# To ensure a null line exists, an SBA is performed, positioning the +# Buffer Address in column 0 of the last line. The last line is then +# cleared to nulls, BA mode is canceled, and the new line is opened +# at the cursor position. +ibm61|ibm3161|3161|IBM 3161-11:\ + :am:bs:bw:cl=\EL:li#24:co#80:cd=\EJ:al=\EX7 \EI\E Z\EN:\ + :ce=\EI:cm=\EY%+\040%+\040:nd=\EC:up=\EA:do=\EB:\ + :dl=\EO:dc=\EQ:kd=\EB:ku=\EA:kl=\ED:kr=\EC:kh=\EH:\ + :us=\E4\102:ue=\E4\100:so=\E4\110:se=\E4\100: +# From seth@sirius.ctr.columbia.edu Sun May 20 11:02:34 1990 +ibm3163|ibm63|i3163|3163|IBM 3163:\ + :al=\EN:am:bs:bt=\E2:cd=\EJ:ce=\EI:cl=\EL:\ + :cm=\EY%+\040%+\040:co#80:ct=\E 1:dc=\EQ:\ + :dl=\EO:do=\EB:ds=\E#\072:es:fs=\E=:ho=\EH:\ + :hs:ic=\EP:kA=\EN:kB=\E2:kC=\EQ:\ + :kD=\EQ:kE=\EI:kI=\EI:kL=\EO:kS=\EJ:\ + :kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:kh=\EH:\ + :le=\ED:li#24:mb=\E4D:md=\E4H:me=\E4@:\ + :mk=\E4P:mr=\E4A:nd=\EC:\ + :ds=\E#\::es:fs=\E=\E#;:hs:ts=\E=:ws#80:\ + :se=\E4@:so=\E4I:ue=\E4@:up=\EA:us=\E4B: +ibm|ibm3101|3101|i3101|IBM 3101-10:\ + :do=^J:ct=\EH:st=\E0:\ + :if=/usr/share/tabset/ibm3101:\ + :am:le=^H:bs:cl=\EK:li#24:co#80:nd=\EC:up=\EA:cd=\EJ:ce=\EI:\ + :kd=\EB:kl=\ED:kr=\EC:ku=\EA:ho=\EH:cm=\EY%+\40%+\40:pt: +ibm327-789|ibm-3277-2|ibm-3278-2|ibm-3278-3|ibm-3278-4|ibm-3278-5|ibm-3279-2|ibm-3279-3:\ + :tc=ibm327-56: +ibm327-56|ibm-3275-2|ibm-3276-2|ibm-3276-3|ibm-3276-4|line mode IBM 3270 style:\ + :gn:ce=\r:cl=\r\n:ho=\r: +ibm-apl|apl|IBM apl terminal simulator:\ + :li#25:tc=dm1520: +# ibmapa* and ibmmono entries come from ACIS 4.3 distribution +rtpc|ibmapa16|ibm6155|IBM 6155 Extended Monochrome Graphics Display:\ + :ts=\Ej\EY@%+ \Eo:ds=\Ej\EY@\40\EI\Ek:li#32:tc=ibmconsole: +# Advanced Monochrome (6153) and Color (6154) Graphics Display: +ibmapa8c|ibmapa8|ibm6154|ibm6153|IBM 6153/4 Advanced Graphics Display:\ + :ts=\Ej\EY?%+ \Eo:ds=\Ej\EY?\40\EI\Ek:li#31:tc=ibmconsole: +ibmapa8c-c|ibm6154-c|IBM 6154 Advanced Color Graphics Display color termcap:\ + :ts=\Ej\EY?%+ \Eo:ds=\Ej\EY?\40\EI\Ek:li#31:mh=\EF\Ef7;:tc=ibmega-c: +ibmmono|ibmconsole|ibm5151|IBM workstation monochrome:\ + :se=\Ez:so=\EZ:sr=\EA:al=\EL:dl=\EM:\ + :kb=^H:us=\EW:ue=\Ew:\ + :k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:k6=\EP:k7=\EQ:k8=\ER:k9=\EY:\ + :k0=\E<:I0=f10:kI=\000:kh=\EH:kR=\EG:kP=\Eg:kF=\EE:kN=\EE:\ + :md=\EZ:me=\Ew\Eq\Ez\EB:mk=\EF\Ef0;\Eb0;:mr=\Ep:\ + :ts=\Ej\EY8%+ \Eo:fs=\Ek:ds=\Ej\EY8\40\EI\Ek:es:hs:sb:tc=ibm3101: +ibmega-c|ibm5154-c|IBM Enhanced Color Display color termcap:\ + :se=\EB:so=\EF\Ef3;:ue=\EB:us=\EF\Ef2;:tc=ibmconsole: +# from marc pawliger--marc@ibminet.awdpa.ibm.com +# also in /usr/lpp/bos/bsdsysadmin. +hft-c|ibm8512|ibm8513|IBM High Function Terminal:\ + :co#80:li#25:am:ht:\ + :cm=\E[%i%d;%dH:ti=\E[20;4l\E[?7h\Eb:te=\E[20h:\ + :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\ + :ec=\E[%dX:\ + :cl=\E[H\E[J:cd=\E[J:el=\E[K:\ + :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\ + :im=\E[4h:ei=\E[4l:mi:\ + :dm=\E[4h:ed=\E[4l:\ + :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:ms:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ + :as=^N:ae=^O:sc=\E[s:rc=\E[u:\ + :kb=\E[D:kf=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\ + :k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\ + :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\ + :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J: +hft|AIWS High Function Terminal:\ + :al=\E[L:cr=^M:do=^J:sf=^J:bl=^G:am:le=^H:cd=\E[J:\ + :ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:co#80:li#25:\ + :dc=\E[P:dl=\E[M:ho=\E[H:\ + :ic=\E[@:im=\E6:ei=\E6:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:mk=\E[8m:me=\E[0m:\ + :ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:kh=\E[H:kb=^H:\ + :nd=\E[C:ta=^I:up=\E[A:xo:\ + :ue=\E[m:us=\E[4m:se=\E[m:so=\E[7m:\ + :kP=\E[159q:kN=\E[153q:\ + :k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:\ + :k5=\E[005q:k6=\E[006q:k7=\E[007q:k8=\E[008q:\ + :k9=\E[009q:ka=\E[010q: +# From pryor@math.berkeley.edu +ibm5081|ibmmpel|IBM 5081 1024x1024 256/4096 color display:\ + :ts=\Ej\EYA%+ \Eo:fs=\Ek:ds=\Ej\EYA\40\EI\Ek:es:hs:\ + :li#33:tc=ibmconsole: +ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 enhanced color display:\ + :ts=\Ej\EYA%+ \Eo:fs=\Ek:ds=\Ej\EYA\40\EI\Ek:es:hs:\ + :li#33:tc=ibmega-c: +# ibm3151 and ibm3151-25 are modified from a Usenet posting +# from http://www.cs.utk.edu/~shuford/terminal/ibm_3161.termcap.txt +# Newsgroups: comp.terminals Message-ID: <1rkqgnINNdso@uwm.edu> +ibm3151|ibm3152|ibm3162|Ibm3162|ibm3151-pc:\ + :am:mi:ms:\ + :co#80:li#24:kn#9:\ + :cd=\EJ:ce=\EI:cl=\EH\EJ:cm=\EY%+ %+ :dc=\EQ:dl=\EO:\ + :ho=\EH:k1=\Ea\n:k2=\Eb\n:k3=\Ec\n:k4=\Ed\n:k5=\Ee\n:\ + :k6=\Ef\n:k7=\Eg\n:k8=\Eh\n:k9=\Ei\n:kb=\b:kd=\EB:\ + :kh=\EH:kl=\ED:kr=\EC:ku=\EA:nd=\EC:se=\E4>b:so=\E4!a:\ + :te=\E>A:ti=\E>B:ue=\E4=b:up=\EA:us=\E4"a:bc=\ED:\ + :U8=\Eb:so=\E4!a:\ + :te=\E>A:ti=\E>B:ue=\E4=b:up=\EA:us=\E4"a:bc=\ED:\ + :U8=\E\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ + :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\ + :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: +# luna's BMC terminal emulator +luna|luna68k|LUNA68K Bitmap console:\ + :li#46:co#88:tc=ansi: +# SCO console and SOS-Syscons console for 386bsd +scoansi|SCO Extended ANSI standard crt:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%d;%dH:co#80:\ + :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:\ + :nd=\E[C:pt:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:up=\E[A:\ + :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:\ + :k7=\E[S:k8=\E[T:k9=\E[U:k0=\E[V:\ + :kb=^h:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:eo:sf=\E[S:sr=\E[T:\ + :mb=\E[5m:md=\E[1m:me=\E[m:\ + :GS=\E[12m:GE=\E[10m:GV=\63:GH=D:\ + :GC=E:GL=\64:GR=C:RT=^J:G1=?:G2=Z:G3=@:G4=Y:G5=;:G6=I:G7=H:G8=<:\ + :GU=A:GD=B:\ + :CW=\E[M:NU=\E[N:RF=\E[O:RC=\E[P:\ + :WL=\E[S:WR=\E[T:CL=\E[U:CR=\E[V:\ + :HM=\E[H:EN=\E[F:PU=\E[I:PD=\E[G:\ + :Gc=N:Gd=K:Gh=M:Gl=L:Gu=J:Gv=\072: +trs80|trs-80|radio shack trs-80 Model I:\ + :do=^J:am:le=^H:bs:co#64:li#16: +d800|Direct 800/A:\ + :do=^J:co#80:li#24:am:cl=\E[1;1H\E[2J:le=^H:bs:cm=\E[%i%d;%dH:\ + :nd=\E[C:up=\E[A:ce=\E[K:cd=\E[J:\ + :so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:xs:vs=\E[>12l:ve=\E[>12h:\ + :sf=\ED:sr=\EM:da:db:as=\E[1m:ae=\E[0m:ms:pt:\ + :kl=\E[D:kr=\E[C:ku=\E[A:kd=\E[B:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :k5=\EOT:k6=\EOU:k7=\EOV:k8=\EOW: +vc404|volker-craig 404:\ + :do=^J:am:le=^H:bs:cd=40^W:ce=20^V:cl=40^X:cm=^P%+ %+ :co#80:\ + :ho=40^Y:kd=^J:kl=^H:kr=^U:ku=^Z:li#24:ma=^Z^P^U :nd=^U:up=^Z: +vc404-s|volker-craig 404 w/standout mode:\ + :do=^J:se=^O:so=^N:tc=vc404: +vc404-na|volker-craig 404 w/no arrow keys:\ + :ma@:kr@:ku@:tc=vc404: +vc404-s-na|volker-craig 404 w/standout mode and no arrow keys:\ + :se=^O:so=^N:tc=vc404-na: +# From: wolfgang@cs.sfu.ca +vc414|vc414h|Volker-Craig 414H in sane escape mode.:\ + :am:ic=\E\072:dc=\E\063:so=\E\031:se=\E\037:\ + :kl=^H:kr=^P:ku=\E^L:kd=\E^K:kh=\E^R:\ + :k0=\EA:k1=\EB:k2=\EC:k3=\ED:k4=\EE:k5=\EF:k6=\EG:k7=\EH:\ + :l0=PF1:l1=PF2:l2=PF3:l3=PF4:l4=PF5:l5=PF6:l6=PF7:l7=PF8:\ + :al=40\E^Z:bs:cd=\E^X:ce=10\E^O:cl=40\E^\:co#80:\ + :do=\E^K:li#24:nd=^P:up=\E^L: +vc414h-noxon:\ + :dl=40\E^S:cm=40\E^Q%r%.%.:ho=\E^R:\ + :tc=vc414h: +# missing in vc303a and vc303 descriptions: they scroll 2 lines at a time +vc303a|vc403a|volker-craig 303a:\ + :do=^J:am:le=^H:bs:ce=20^V:cl=40^X:co#80:ho=40^Y:kd=^J:kl=^H::kr=^U:\ + :ku=^Z:li#24:ll=^P^@W:nd=^U:ns:up=^Z: +vc303|vc103|vc203|volker-craig 303:\ + :do=^J:am:le=^H:bs:cl=40^L:co#80:ho=40^K:kd=^J:kl=^H:\ + :kr=^I:ku=^N:li#24:ll=^O\200W:nd=^I:ns:up=^N: +# Test version for Falco ts-1. See "arpavax.hickman@ucb" for info +falco|ts1|ts-1|falco ts-1:is=\Eu\E3:\ + :do=^J:al=\EE:am:bs:ce=\ET\EG0^h:cm=\E=%+ %+ :cl=\E*:cd=\EY:co#80:\ + :dc=\EW:dl=\ER:ei=\Er:ho=^^:im=\Eq:k0=^A0\r:kd=^J:kl=^H:pt:\ + :kr=^L:ku=^K:li#24:nd=^L:se=\Eg0:so=\Eg1:up=^K:us=\Eg1:ue=\Eg0: +falco-p|falco ts-1sp|falco with paging option:\ + :is=\EZ\E3\E_c:\ + :al=\EE:am:bs:ce=\ET\EG0^H\Eg0:cl=\E*:cd=\EY:co#80:dc=\EW:\ + :dl=\ER:kd=\E[B:kl=\E[D:ei=\Er:im=\Eq:pt:db:\ + :kr=\E[C:ku=\E[A:li#24:nd=\E[C:se=\Eg0:so=\Eg4:\ + :up=\E[A:us=\Eg1:ti=\E_d:te=\E_b:\ + :ue=\Eg0:do=\E[B:cm=\E=%+ %+ :ms:kh=\E[H:da:mi:bt=\EI: +# NOTE: bg can scroll, it just would rather not (ns) - rwells 3/13/81. +# (Shouldn't you take out ns and put in an nl instead? - mrh) +bitgraph|BBN BitGraph terminal:\ + :do=^J:al=2*\E[L:bs:cd=150\E[J:ce=2\E[K:\ + :cl=150\E[H\E[J:cm=%i\E[%d;%dH:co#85:\ + :dl=2*\E[M:k0=\EP:k1=\EQ:k2=\ER:k3=\ES:kd=\EB:ke=\E>:kl=\ED:kr=\EC:\ + :ks=\E=:ku=\EA:li#64:nd=\E[C:ns:pt:se=\E[0m:so=\E[7m:up=\E[A:sf=280\n: +d132|datagraphix|datagraphix 132a:\ + :do=^J:co#80:li#30:cl=^l:ho=\Et:da:db:sf=\Ev:sr=\Ew:\ + :up=\Ek:nd=\El:vs=\ex:ve=\Em\En:\ + :al=\E3:ic=\E5:dc=\E6:in:ic=\E5: +soroc|Soroc 120:\ + :do=^J:cd=\EY:ce=\ET:cl=2\E*:ma=^K^P^R^L^L :\ + :kl=^H:ku=^K:kr=^L:kd=^J:tc=adm3a: +# From: ma179abu%sdcc3@sdcsvax.ucsd.edu (Bill Houle) +iq140|soroc140|Soroc IQ140 with inverse & dim:\ + :ic=\EQ:dc=\EW:al=\EE:dl=\ER:ce=\ET:cd=\EY:cl=\E+:cm=\E=%+ %+ :\ + :up=^K:do=^J:le=^H:nd=^L:ho=^^:ta=\Ei:ma=^Kk^Jj^Hh^Ll^^h:am:bs:\ + :co#80:li#24:kb=^H:kh=^^:ku=^K:kd=^J:kl=^H:kr=^L:\ + :k0=^AI:k1=^A@:k2=^AA:k3=^AB:k4=^AC:k5=^AD:k6=^AE:k7=^AF:\ + :k8=^AG:k9=^AH:se=\E^?:so=\E^?:us=\E):ue=\E(: +# tec is untested, and taken from CB/Unix virtual terminal driver. +# Upper case terminal, uses lower case for control sequences!!! +# The driver shows the C ~ operator used on CM coordinates. +# Without the terminal in front of me, I can't figure out what's +# going on, so I've dotted out the cm. Note there is no ~ in tgoto. +tec400|tec scope:\ + :do=^J:.cm=l%r%.%.:up=x:do=h:nd=g:le=w:ho=i:so={:se=|:sg#1:\ + :cl=f:al=e:dl=u:ic=d:dc=t:ce=c:cd=s: +# From ucbvax!geoff Mon Sep 21 21:15:45 1981 +# This entry has been tested. +tec500|tec 500:\ + :do=^J:am:le=^H:bs:cm=\E=%+ %+ :cl=20^Z:\ + :co#80:ho=^^:li#24:nd=^L:up=^K:so=^]:se=^\: +# I would appreciate more information on this terminal, such as the +# manufacturer and the model number. There are too many tecs in here. +tec:\ + :li#24:co#80:cl=^l:up=^k:nd=\037:\ + :am:le=^H:bs:ho=\036:ma=^K^P^_ :do=^J: +teletec|Teletec Datascreen:\ + :do=^J:am:le=^H:bs:co#80:cl=^l:ho=^^:li#24:nd=^_:up=^k: +# From cbosg!ucbvax!SRC:george Fri Sep 11 22:38:32 1981 +ampex|d80|dialogue|dialogue80|ampex dialogue 80:\ + :ct=\E3:st=\E1:do=^J:is=\EA:us=\El:ue=\Em:\ + :am:le=^H:bs:pt:cl=75\E*:cm=\E=%+ %+ :\ + :al=5*\EE:bt=\EI:ic=\EQ:dl=5*\ER:dc=\EW:\ + :ce=\Et:cd=\Ey:so=\Ej:se=\Ek:li#24:co#80:nd=^L:up=^K: +# From: atd!dsd!rcb@ucbvax.berkeley.edu (Richard Bascove) +a210|210|ampex210|ampex a210:\ + :am:bs:cl=\E*:cm=\E=%+ %+ :al=\EE:bt=\EI:ic=\EQ:\ + :dl=\ER:dc=\EW:ho=^^:xn:ce=\Et:cd=\Ey:li#24:co#80:nd=^L:up=^K:\ + :pt:if=/usr/share/tabset/std:is=\EC\Eu\E'\E(\El\EA\E%\E{\E.2\EG0\Ed\En:\ + :kl=^H:kr=^L:kd=^V:ku=^K:kh=^^:hs:ts=\E.0\Eg\E}\Ef:fs=\E.2:\ + :kn#10:k0=^A0^M:k1=^A1^M:k2=^A2^M:k3=^A3^M:k4=^A4^M:k5=^A5^M:\ + :vb=\EU\EX\EU\EX\EU\EX\EU\EX:k6=^A6^M:k7=^A7^M:k8=^A8^M:k9=^A9^M:\ + :so=\EG4:se=\EG0:us=\EG8:ue=\EG0:ug#1:sg#1: +digilog|333|digilog 333:\ + :le=^H:bs:co#80:ce=\030:ho=^n:li#16:nd=^i:up=^o:do=^J: +ep48|ep4080|execuport 4080:\ + :am:le=^H:bs:os:co#80:hu=\036:hd=\034:do=^J: +ep40|ep4000|execuport 4000:\ + :am:le=^H:bs:os:co#136:hu=\036:hd=\034:do=^J: +terminet1200|terminet300|tn1200|tn300|terminet|GE terminet 1200:\ + :co#120:hc:os:do=^J: +# AED 512 +# by giles Billingsley (gilesb%ucbcad@berkeley) +# rewritten 8/82 for newer AEDs and better operation of vi,etc. +aed|AED|aed512|AED512|aed 512:\ + :db:co#64:li#40:cl=^L:bs:nd=\Ei0800\001:\ + :up=^K:ve=\E\E\E\E\E\E\E\072004=000200??\001:\ + :vb=\EK0001??0000K0001202080\001:\ + :us=\E\07200>8000140\001:ue=\E\07200>8000100\001:\ + :uc=\Ei???>l0800i0102\001:\ + :ti=\E\07200>8000140{<04<0??00001010L<0\072004=0002??00\001:\ + :te=\E\07200>8000100{804<0??00001000L80\072004=000200??\001:\ + :so=\E\07200>8000140[80C00\001:se=\E[00C80\001:\ + :is=\EG1MMM.`40K0001202080K8001????00^L\EC80L80{80^L\EK010100????K0601??0000c818100\EG1HHH.\07210000019A27FD006A280D002A200A52429FE8524861086118612861360N031B4C3F3F1800N041B0C1B4C38301800N001B3B313030301800N011B3B313030341800N021B3B313030381800N050800N061B3B313335301800\07211000015A58E8D5011A58F8D5111A5908D5211A5918D531160\07212000015AD5011858EAD5111858FAD52118590AD5311859160\0721300004B2071C5858E0A18658E0A0A858EA900858F268FA5278590A50A29018591A9F51865908590A90165918591A59038E58E8590A591E58F290185912071C5180A0A0A0901858EA900858F268F60\0721350000BA9472031DEA9502031DE60\E\E\E\EG1MMM.^A: +aed-ucb|AED-UCB|aed512-ucb|AED512-UCB|aed 512 w/o UCB ROM:\ + :db:co#64:li#40:cl=^L:bs:nd=\Ei0800\001:up=^K:\ + :ve=\E\E\E\E\E\E\E\072004=000200??\001:\ + :vb=\EK0001??0000K0001202080\001:\ + :us=\E\07200>8000140\001:ue=\E\07200>8000100\001:\ + :uc=\Ei???>l0800i0102\001:\ + :ti=\E\07200>8000140{<04<0??00001010L<0\072004=0002??00\001:\ + :te=\E\07200>8000100{804<0??00001000L80\072004=000200??\001:\ + :so=\E\07200>8000140[80C00\001:se=\E[00C80\001:\ + :if=/usr/share/tabset/aed512: +# CIT 80 - vt 100 emulator, the termcap has been modified to remove +# the delay times and do an auto tab set rather than the indirect +# file used in vt100. +cit80|cit 80|Citoh 80:\ + :co#80:li#24:am:cl=\E[;H\EJ:bs:cm=\E[%i%2;%2H:nd=\E[C:up=\E[A:\ + :ce=\EK:cd=\EJ:is=\E>:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD: +# From mtxinu!sybase!tim (Tim Wood) Fri Sep 27 09:39:12 PDT 1985 +# Alternate cit101 (vt100 em) file used in vt100. +# Uses 23 lines so can run citsys (like h19sys). +# 24 May 85 (mtxinu!sybase!tim) - removed 2-byte limit on 'cm' cursor +# coordinates otherwise there is garbling on long lines in +# co#132 mode; also added support for multipage memory on the Itoh. +citc|Citoh fast vt100:\ + :co#80:li#23:am:cl=\E[;H\E[2J:bs:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g:\ + :ks=\E[?1h\E=:ke=\E[?1l\E>:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\ + :vb=\E[?5h\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\E[?5l:\ + :dc=\E[P:al=\E[L:dl=\E[M:ic=\E[@:vs=\E7\E[U:ve=\E[V\E8:xn: +cita:\ + :co#80:li#23:am:cl=\E[;H\E[2J:bs:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g:\ + :ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:vs=\E7\E[U:ve=\E[V\E8:\ + :vb=\E[?5h\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\E[?5l:xn: +cit101:li#24:vb@:tc=citc: +cit101b:li#24:tc=citc: +cit500|cit-500|cit 500:\ + :co#80:li#40:cl=50\E[;H\E[2J:bs:am:cm=5\E[%i%2;%2H:nd=2\E[C:up=2\E[A:\ + :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ + :is=\E(B\E)0\E>\E[?3l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :if=/usr/share/tabset/vt100:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\ + :kh=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:xn:\ + :do=\ED:al=\E[L:dc=\E[P:dl=\E[M: +# Note several versions of blit. I don't know exactly what is what +# so please send me any corrections to this -- mrh +# From research!ikeya!rob Tue Aug 31 23:41 EDT 1982 +blit|jerq|blit-pb|blit running teletype rom:\ + :do=^J:IC=\Ef%+ :DC=\Ee%+ :AL=\EF%+ :DL=\EE%+ :\ + :mi:dl=\EE!:ic=\Ef!:dc=\Ee!:al=\EF!:\ + :ce=\EK:cl=^L:cm=\EY%r%+ %+ :co#87:li#72:nd=\EC:\ + :up=\EA:ku=\EA:kd=\EB:kr=\EC:kl=\ED:kb=^H:am:ul:pt:eo: +cbblit|columbus enhanced tty blit:\ + :vb=\E^G:so=\EU!:se=\EV!:us=\EU":ue=\EV":cd=\EJ:\ + :im=\EQ:ei=\ER:ic@:co#88:sf=\EG:tc=blit: +oblit|ojerq|first version of blit rom:\ + :do=^J:AL=\Ef%+ :DL=\Ee%+ :mi:dl=\EE:ei=\ER:im=\EQ:dc=\EO:da:db:\ + :al=\EF:cd=\EJ:ce=\EK:cl=^L:cm=\EY%r%+ %+ :co#88:li#72:nd=\EC:\ + :up=\EA:vb=\E^G:am:ul:pt:eo: +daleblit|daleterm|blit running Dale DeJager's ROM:\ + :ku=\EA:kd=\EB:kr=\EC:kl=\ED:so=\EU!:se=\EV!:us=\EU":ue=\EV":\ + :da@:db@:tc=oblit: +datapoint|dp3|dp3360|datapoint 3360:\ + :do=^J:am:le=^H:bs:cd=^_:ce=^^:cl=^]^_:co#82:ho=^]:li#25:nd=^x:up=^z: +# From: cbosgd!utcs!romwa@ucbvax.berkeley.edu (mark dornfeld) +# This termcap is for the LANPAR Technologies VISION 3220 +# terminal. The function key definitions k0-k5 represent the +# edit keypad: FIND, INSERT HERE, REMOVE, SELECT, PREV SCREEN, +# NEXT SCREEN. The key definitions k6-k9 represent the PF1 to +# PF4 keys. +v3220|LANPAR Vision II model 3220/3221/3222:\ + :co#80:li#24:cl=\E[H\E[J:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :is=\E>\E[?3l\E[?7h\E[?8h\E[p:ks=\E=:ke=\E>:\ + :kn#10:k0=\E[1~:k1=\E[2~:k2=\E[3~:k3=\E[4~:k4=\E[5~:k5=\E[6~:\ + :k6=\E[OP:k7=\E[OQ:k8=\E[OR:k9=\E[OS:\ + :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ + :kh=\E[H:pt:sr=\EM:xn:\ + :dl=\E[M:dc=\E[P:ei=\E[4l:al=\E[L:im=\E[4h:mi: +# From ucbvax!faletti (Faletti@Berkeley) +# FREEDOM 100 by Liberty Electronics USA, SF. +# :kh=^^: left out because it precludes using change-to-alternate-file in vi. +# Basic Freedom 100 entry, works with VI at 1200 baud. +f100|freedom100|freedom|freedom 100 no padding:\ + :am:bs:bw:mi:ms:pt:co#80:kn#20:li#24:\ + :ct=\E3:st=\E1:is=\Eg\Ef\r\Ed:kr=^L:\ + :cl=^Z:do=^J:ho=^^:kb=^H:kl=^H:\:kd=^V:\ + :ko=dc,al,dl,cl,bt,ce,cd:ku=^K:le=^H:nd=^L:\ + :ch=\E]%+ :cm=\E=%+ %+ :cv=\E[%+ :sr=\Ej:up=^K:\ + :al=\EE:bt=\EI:cd=\EY:ce=\ET:dc=\EW:dl=\ER:ei=\Er:im=\Eq:\ + :se=\EG0:so=\EG4:ue=\EG0:us=\EG8:as=\E$:ae=\E%:\ + :vb=\Eb\200\200\Ed:\ + :k1=^A@\r:k2=^AA\r:k3=^AB\r:k4=^AC\r:k5=^AD\r:\ + :k6=^AE\r:k7=^AF\r:k8=^AG\r:k9=^AH\r:k0=^AI\r:\ + :hs:ts=\Eg\Ef:fs=\r:ds=\Eg\Ef\r: +f100-rv|freedom100-rv|freedom-rv|freedom100 with reverse video at 1200:\ + :is=\Eg\Ef\r\Eb:vb=\Ed\200\200\Eb:tc=freedom100: +# VI at 9600 baud (or EMACS at 1200 -- but may be more than is needed for emacs) +f100-v|freedom100-v|freedom-v|freedom100 for 9600 vi or 1200 emacs:\ + :al=6.5*\EE:dl=11.5*\ER:\ + :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\ + :tc=freedom100: +f100-v-rv|freedom100-v-rv|freedom-v-rv|freedom100 rev. vid. for 9600 vi:\ + :al=6.5*\EE:dl=11.5*\ER:is=\Eg\Ef\r\Eb:\ + :vb=\Ed\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Eb:\ + :tc=freedom100: +# EMACS at 9600 baud -- this still needs some more work on the padding +f100-e|freedom100-e|freedom-e|freedom100 for 9600 emacs:\ + :al=8.5*\EE:dl=11.5*\ER:ip=6:\ + :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\ + :tc=freedom100: +f100-e-rv|freedom100-e-rv|freedom-e-rv|freedom100 rev. vid. for emacs 9600:\ + :al=8.5*\EE:dl=11.5*\ER:ip=6:is=\Eg\Ef\r\Eb:\ + :vb=\Ed\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Eb:\ + :tc=freedom100: +f110-v|freedom110-v|freedom110 for 9600 vi or 1200 emacs:\ + :is=\Eg\Ef\r\Ed\EO:dc=\EO\EW:im=\EO\Eq:\ + :al=6.5*\EE:dl=11.5*\ER:\ + :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\ + :tc=freedom100: +# (from kerch@lll-crg) +f200|freedom200| Freedom 200 VDT by Liberty Electronics :\ + :if=/usr/share/tabset/stdcrt:al=\EE:am:bs:bt=\EI:cd=\EY:\ + :ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:dc=\EW:dl=\ER:do=^V:\ + :ds=\Eh:ei=\Er:im=\Eq:is=\Eg\El\E\041\062:\ + :k1=^A@\r:k2=^AA\r:k3=^AB\r:k4=^AC\r:k5=^AD\r:\ + :k6=^AE\r:k7=^AE\r:k8=^AF\r:k9=^AG\r:kd=^V:kr=L:\ + :ku=^K:li#24:ms:nd=^L:se=\EG0:so=\EG4:sr=\Ej:\ + :te=\EJ\E\\2\E|\041\061^L^Y:ti=\E\\1\EK\E|\041\061L^Y:\ + :ts=\Ef:ue=\EG0:up=^K:us=\EG8:vb=\Eb\Ed:hs:i2=\E^O\Eg:\ + :ts=\Ef:fs=^M:ds=\E^N: +dg6053|data general 6053:\ + :do=^J:am:le=^H:bs:cm=^P%r%.%.:cl=^L:ho=^H:nd=^S:\ + :up=^W:ce=^K:co#80:li#24: +# dg450 and dg200 from cornell +dg450|dg6134|data general 6134:\ + :nd=\030:bs@:tc=dg200: +dg200|data general Dasher 200:\ + :am:bc=^Y:bs=0:ce=^K:cl=^L:cm=^P%r%+\200%+\200:co#80:do=^Z:\ + :ho=^H:li#24:\ + :ll=\036FP\017:se=\036E:so=\036D:up=^W:\ + :is=\036O\036FQ2\036FB000\036FE\036FA\036FQ2: +# Note: lesser Dasher terminals will not work with vi because vi insists upon +# having a command to move straight down from any position on the bottom line +# and scroll the screen up, or a direct vertical scroll command. The 460 and +# above have both, the D210/211, for instance, has neither. We must use ANSI +# mode rather than DG mode because standard UNIX tty drivers assume that ^H is +# backspace on all terminals. This is not so in DG mode. +dg460-ansi|Data General Dasher 460, ANSI-mode:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J:\ + :cm=\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:do=\E[B:\ + :ho=\E[H:ic=\E[@:ue=\E[05:ul:up=\E[A:us=\E[4m:is=\036F@:\ + :k0=\E[001z:k1=\E[002z:k2=\E[003z:k3=\E[004z:k4=\E[005z:k5=\E[006z:\ + :k6=\E[007z:k7=\E[008z:k8=\E[009z:k9=\E[00\:z:\ + :kb=\E[D:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:kn#6:\ + :l0=f1:l1=f2:l2=f3:l3=f4:l4=f5:l5=f6:l6=f7:l7=f8:l9=f10:\ + :le=^H:li#24:mb=\E[5m:me=\E[0m:mh=\E[2m:mr=\E[7m:ms:mu=\EW:\ + :nd=\E[C:nl=\ED:pt:se=\E[0m:sf=\E[S:so=\E[7m:sr=\E[T: +v603|visual603|603|Visual model 603:\ + :hs:ts=\EP2~:fs=\E\\:ds=\EP2;1~\E\\:\ + :im=\E[4h:ei=\E[4l:mi:dc=\E[P:al=\E[L:dl=\E[M:\ + :cs=\E[%i%d;%dr:sf=\ED:sr=\EM:sb=\EM:\ + :ce=\E[K:cl=\E[H\E[J:cd=\E[J:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ + :is=\E>\E[?3l\E[?4l\E[?7h\E[?8h\E[1;24r\E[24;1H:\ + :rs=\E>\E[?3l\E[?4l\E[?7h\E[?8h:\ + :tc=vt100: +cdi|cdi1203:\ + :am:le=^H:bs:hc:os:co#80:dC#200:do=^J: +# ^S is an arrow key! Boy is this guy in for a surprise on v7! +sol:\ + :do=^J:am:le=^Y:ho=^H:bs:cm=\E^1%.\E^2%.:cl=^K:ho=^N:co#64:li#16:\ + :nd=^S:up=^W:kl=^A:kr=^S:ku=^W:kd=^Z:ma=^A^H^S ^W^P^Z^N: +xl83|Cybernex XL-83:\ + :do=^J:am:le=^H:bs:cd=62^P:ce=3^O:cl=62^L:cm=^W%+ %+ :co#80:ho=^K:\ + :kd=^J:kl=^H:ku=^N:li#24:up=^N:nd=^I: +omron|Omron 8025AG:\ + :do=^J:al=\EL:am:le=^H:bs:cd=\ER:co#80:ce=\EK:cl=\EJ:\ + :da:db:dc=\EP:dl=\EM:ho=\EH:li#24:nd=\EC:se=\E4:sf=\ES:\ + :so=\Ef:sr=\ET:up=\EA:ve=:vs=\EN: +plasma|plasma panel:\ + :am:le=^H:bs:cl=^L:co#85:ho=^^:li#45:nd=\030:up=\026:do=^J: +pty|pseudo teletype:\ + :do=^J:co#80:li#24:am:cl=\EJ:le=^H:bs:cm=\EG%+ %+ :nd=\EC:\ + :up=\EA:ce=\EK:cd=\EL:al=\EP:dl=\EN:ic=\EO:\ + :so=\Ea$:se=\Eb$:us=\Ea!:ue=\Eb!: +remote|virtual remote terminal:\ + :co#79:am@:nl@:tc=virtual: +swtp|ct82|southwest technical products ct82:\ + :do=^J:am:le=^d:bc=^d:\ + :al=^\^y:cd=^v:ce=^F:cl=^L:cm=%r^k%.%.:co#82:li#20:\ + :dl=^z:nd=^s:up=^a:so=^^^v:se=^^^F:dc=^\^h:ic=^\^x:ho=^p:\ + :sf=^n:sr=^o:ll=^c:\ + :is=^\^r^^^s^^^d^]^w^i^s^^^]^^^o^]^w^r^i: +terak|Terak emulating Datamedia 1520:\ + :tc=dm1520: +# :is resets scrolling region in case a previous user had used "tset vt100" +sun|Sun Microsystems Workstation console:\ + :li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :am:bs:mi:ms:pt:km:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:is=\E[1r:rs=\E[1r:\ + :kd=\E[B:kl=\E[D:ku=\E[A:kr=\E[C:kh=\E[H:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:\ + :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP: +# From john@ucbrenoir Tue Sep 24 13:14:44 1985 +sun-s|Sun Microsystems Workstation window with status line:\ + :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun: +sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs:\ + :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun-e: +sun-48|Sun 48-line window:\ + :li#48:co#80:tc=sun: +sun-34|Sun 34-line window:\ + :li#34:co#80:tc=sun: +sun-24|Sun 24-line window:\ + :li#24:co#80:tc=sun: +sun-17|Sun 17-line window:\ + :li#17:co#80:tc=sun: +sun-12|Sun 12-line window:\ + :li#12:co#80:tc=sun: +sun-1|Sun 1-line window for sysline:\ + :li#1:co#80:es:hs:ts=\r:fs=\E[K:ds=^L:tc=sun: +sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character:\ + :ic@:im@:ei@:tc=sun: +sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history:\ + :te=\E[>4h:ti=\E[>4l:tc=sun: +# The terminal mvterm is a full color terminal emulation that seems to be +# specific to a terminal program on Sun workstations called SwitchTerm. It +# is vt100 compatible with minor changes. +# Daniel Rudy +mvterm|vv100|mvterm emulator with ANSI colors:\ + :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[100m:tc=vt102: +# For NeWS's psterm from Eric Messick & Hugh Daniel +psterm|psterm-basic|psterm-80x34:\ + :am:bs:al=\EA:cd=\EB:ce=\EC:cl=^L:cm=\E%d;%d;:cs=\EE%d;%d;:\ + :dc=\EF:dl=\EK:do=\EP:ei=\ENi:el=\ENl:fs=\ENl:\ + :ho=\ER:hs:im=\EOi:is=\EN*:km:kd=\E[B:ku=\E[A:kr=\E[C:kl=\E[D:\ + :mb=\EOb:md=\EOd:me=\EN*:mr=\EOr:nd=\EV:pt:rc=\034:rs=\EN*:sc=\035:\ + :se=\ENo:sf=\EW:sl=\EOl:so=\EOo:sr=\EX:te=\ENt:ti=\EOt:ts=\EOl:\ + :ue=\ENu:le=\ET:ll=\EU:ul:up=\EY:us=\EOu:vb=\EZ:co#80:li#34: +psterm-96x48:\ + :co#96:li#48:tc=psterm-basic: +psterm-90x28:\ + :co#90:li#28:tc=psterm-basic: +psterm-80x24:\ + :co#80:li#24:tc=psterm-basic: +# This is a faster termcap for psterm. Warning: if you use this termcap, +# some control characters you type will do strange things to the screen. +psterm-fast:\ + :am:bs:al=^A:cd=^B:ce=^C:cl=^L:cm=^D%d;%d;:cs=^E%d;%d;:\ + :dc=^F:dl=^K:do=^P:ei=^Ni:el=^Nl:fs=^Nl:\ + :ho=^R:hs:im=^Oi:is=^N*:km:kd=\E[B:ku=\E[A:kr=\E[C:kl=\E[D:\ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 18:39:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53BB4108; Sun, 11 Jan 2015 18:39:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEA2AF; Sun, 11 Jan 2015 18:39:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BIdSVg074334; Sun, 11 Jan 2015 18:39:28 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BIdSGw074333; Sun, 11 Jan 2015 18:39:28 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201501111839.t0BIdSGw074333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sun, 11 Jan 2015 18:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276992 - stable/10/contrib/ntp/ntpd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:39:28 -0000 Author: ume Date: Sun Jan 11 18:39:27 2015 New Revision: 276992 URL: https://svnweb.freebsd.org/changeset/base/276992 Log: Correct comparison of IPv6 wildcard address. MFH: r276814 Modified: stable/10/contrib/ntp/ntpd/ntp_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_io.c Sun Jan 11 18:13:56 2015 (r276991) +++ stable/10/contrib/ntp/ntpd/ntp_io.c Sun Jan 11 18:39:27 2015 (r276992) @@ -1124,7 +1124,7 @@ is_wildcard_addr(struct sockaddr_storage #ifdef INCLUDE_IPV6_SUPPORT if (sas->ss_family == AF_INET6 && memcmp(&((struct sockaddr_in6*)sas)->sin6_addr, &in6addr_any, - sizeof(in6addr_any) == 0)) + sizeof(in6addr_any)) == 0) return 1; #endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 18:43:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FF0B259; Sun, 11 Jan 2015 18:43:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22B8D155; Sun, 11 Jan 2015 18:43:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BIhkqj078317; Sun, 11 Jan 2015 18:43:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BIhjrs078316; Sun, 11 Jan 2015 18:43:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501111843.t0BIhjrs078316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Jan 2015 18:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276993 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:43:46 -0000 Author: adrian Date: Sun Jan 11 18:43:45 2015 New Revision: 276993 URL: https://svnweb.freebsd.org/changeset/base/276993 Log: Switch around the order of static inline to be in line with how it's used elsewhere, and to keep gcc-4.7 happy. This is a request from the DragonflyBSD project. Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Sun Jan 11 18:39:27 2015 (r276992) +++ head/sys/net80211/ieee80211_ratectl.h Sun Jan 11 18:43:45 2015 (r276993) @@ -62,13 +62,13 @@ void ieee80211_ratectl_set(struct ieee80 MALLOC_DECLARE(M_80211_RATECTL); -static void __inline +static __inline void ieee80211_ratectl_deinit(struct ieee80211vap *vap) { vap->iv_rate->ir_deinit(vap); } -static void __inline +static __inline void ieee80211_ratectl_node_init(struct ieee80211_node *ni) { const struct ieee80211vap *vap = ni->ni_vap; @@ -76,7 +76,7 @@ ieee80211_ratectl_node_init(struct ieee8 vap->iv_rate->ir_node_init(ni); } -static void __inline +static __inline void ieee80211_ratectl_node_deinit(struct ieee80211_node *ni) { const struct ieee80211vap *vap = ni->ni_vap; @@ -92,14 +92,14 @@ ieee80211_ratectl_rate(struct ieee80211_ return vap->iv_rate->ir_rate(ni, arg, iarg); } -static void __inline +static __inline void ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap, const struct ieee80211_node *ni, int status, void *arg1, void *arg2) { vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2); } -static void __inline +static __inline void ieee80211_ratectl_tx_update(const struct ieee80211vap *vap, const struct ieee80211_node *ni, void *arg1, void *arg2, void *arg3) { @@ -108,7 +108,7 @@ ieee80211_ratectl_tx_update(const struct vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3); } -static void __inline +static __inline void ieee80211_ratectl_setinterval(const struct ieee80211vap *vap, int msecs) { if (vap->iv_rate->ir_setinterval == NULL) From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 18:50:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52D5F40E; Sun, 11 Jan 2015 18:50:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F426198; Sun, 11 Jan 2015 18:50:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BIooaX079917; Sun, 11 Jan 2015 18:50:50 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BIooSe079916; Sun, 11 Jan 2015 18:50:50 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201501111850.t0BIooSe079916@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sun, 11 Jan 2015 18:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276994 - stable/9/contrib/ntp/ntpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:50:50 -0000 Author: ume Date: Sun Jan 11 18:50:49 2015 New Revision: 276994 URL: https://svnweb.freebsd.org/changeset/base/276994 Log: Correct comparison of IPv6 wildcard address. MFH: r276814 Modified: stable/9/contrib/ntp/ntpd/ntp_io.c Directory Properties: stable/9/contrib/ntp/ (props changed) Modified: stable/9/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_io.c Sun Jan 11 18:43:45 2015 (r276993) +++ stable/9/contrib/ntp/ntpd/ntp_io.c Sun Jan 11 18:50:49 2015 (r276994) @@ -1124,7 +1124,7 @@ is_wildcard_addr(struct sockaddr_storage #ifdef INCLUDE_IPV6_SUPPORT if (sas->ss_family == AF_INET6 && memcmp(&((struct sockaddr_in6*)sas)->sin6_addr, &in6addr_any, - sizeof(in6addr_any) == 0)) + sizeof(in6addr_any)) == 0) return 1; #endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 18:56:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C425643; Sun, 11 Jan 2015 18:56:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48739256; Sun, 11 Jan 2015 18:56:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BIuHaf083545; Sun, 11 Jan 2015 18:56:17 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BIuHM9083544; Sun, 11 Jan 2015 18:56:17 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201501111856.t0BIuHM9083544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sun, 11 Jan 2015 18:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r276995 - stable/8/contrib/ntp/ntpd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:56:17 -0000 Author: ume Date: Sun Jan 11 18:56:16 2015 New Revision: 276995 URL: https://svnweb.freebsd.org/changeset/base/276995 Log: Correct comparison of IPv6 wildcard address. MFH: r276814 Modified: stable/8/contrib/ntp/ntpd/ntp_io.c Directory Properties: stable/8/contrib/ntp/ (props changed) Modified: stable/8/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_io.c Sun Jan 11 18:50:49 2015 (r276994) +++ stable/8/contrib/ntp/ntpd/ntp_io.c Sun Jan 11 18:56:16 2015 (r276995) @@ -1093,7 +1093,7 @@ is_wildcard_addr(struct sockaddr_storage #ifdef INCLUDE_IPV6_SUPPORT if (sas->ss_family == AF_INET6 && memcmp(&((struct sockaddr_in6*)sas)->sin6_addr, &in6addr_any, - sizeof(in6addr_any) == 0)) + sizeof(in6addr_any)) == 0) return 1; #endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4585579A; Sun, 11 Jan 2015 19:00:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 323C826F; Sun, 11 Jan 2015 19:00:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0aM2086562; Sun, 11 Jan 2015 19:00:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0aeL086561; Sun, 11 Jan 2015 19:00:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0aeL086561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276996 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:36 -0000 Author: gjb Date: Sun Jan 11 19:00:35 2015 New Revision: 276996 URL: https://svnweb.freebsd.org/changeset/base/276996 Log: Document r274085, vt(4) is now default. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 18:56:16 2015 (r276995) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:35 2015 (r276996) @@ -195,6 +195,14 @@ device, providing access to HPET from userspace. + The &man.vt.4; driver has been made the + default system console driver. The &man.syscons.4; driver is + still available, and can be enabled by adding + kern.vty=sc in &man.loader.conf.5;. + Alternatively, &man.syscons.4; can be enabled at boot time by + entering set kern.vty=sc at the + &man.loader.8; prompt. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A37738E5; Sun, 11 Jan 2015 19:00:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FC2C270; Sun, 11 Jan 2015 19:00:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0dnY086612; Sun, 11 Jan 2015 19:00:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0dxL086610; Sun, 11 Jan 2015 19:00:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0dxL086610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276997 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:39 -0000 Author: gjb Date: Sun Jan 11 19:00:38 2015 New Revision: 276997 URL: https://svnweb.freebsd.org/changeset/base/276997 Log: Document r274246, gre(4) overhaul, me(4) addition. Add Yandex LLC to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:35 2015 (r276996) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:38 2015 (r276997) @@ -319,6 +319,11 @@ driver is analogous to &man.vlan.4;, but is designed to be better suited for large, multiple-tenant datacenter environments. + + The &man.gre.4; driver has been + significantly overhauled, and has been split into two + separate modules, &man.gre.4; and &man.me.4;. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:00:35 2015 (r276996) +++ head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:00:38 2015 (r276997) @@ -29,3 +29,5 @@ + + From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92BDA9D3; Sun, 11 Jan 2015 19:00:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F85C271; Sun, 11 Jan 2015 19:00:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0gSv086662; Sun, 11 Jan 2015 19:00:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0g9e086661; Sun, 11 Jan 2015 19:00:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0g9e086661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276998 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:42 -0000 Author: gjb Date: Sun Jan 11 19:00:41 2015 New Revision: 276998 URL: https://svnweb.freebsd.org/changeset/base/276998 Log: Document r274386, apci(4) and pci(4) fix for ACPI S3 state. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:38 2015 (r276997) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:41 2015 (r276998) @@ -203,6 +203,11 @@ entering set kern.vty=sc at the &man.loader.8; prompt. + An issue that could cause a system to + hang when entering ACPI S3 + state (suspend to RAM) has been corrected + in the &man.acpi.4; and &man.pci.4; drivers. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48132B07; Sun, 11 Jan 2015 19:00:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35415272; Sun, 11 Jan 2015 19:00:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0jV2086713; Sun, 11 Jan 2015 19:00:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0jWg086712; Sun, 11 Jan 2015 19:00:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0jWg086712@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276999 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:45 -0000 Author: gjb Date: Sun Jan 11 19:00:44 2015 New Revision: 276999 URL: https://svnweb.freebsd.org/changeset/base/276999 Log: Document r274394, bsdconfig(8) skips initial tzetup(8) screen if run within a VM. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:41 2015 (r276998) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:44 2015 (r276999) @@ -606,6 +606,13 @@ applications to work over compatible NICs. + The &man.bsdconfig.8; utility has been + updated to skip the initial &man.tzsetup.8; + UTC versus wall-clock time prompt when run + in a virtual machine, determined when the + kern.vm_guest &man.sysctl.8; is set to + 1. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0061C22; Sun, 11 Jan 2015 19:00:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD67A275; Sun, 11 Jan 2015 19:00:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0l5G087313; Sun, 11 Jan 2015 19:00:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0l09087312; Sun, 11 Jan 2015 19:00:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0l09087312@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277000 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:48 -0000 Author: gjb Date: Sun Jan 11 19:00:47 2015 New Revision: 277000 URL: https://svnweb.freebsd.org/changeset/base/277000 Log: Document r274733, PMU power-button event support for certain PowerBooks. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:44 2015 (r276999) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:47 2015 (r277000) @@ -208,6 +208,11 @@ state (suspend to RAM) has been corrected in the &man.acpi.4; and &man.pci.4; drivers. + The power management unit + subsystem has been updated to support power button events on + certain &arch.powerpc; hardware, such as aluminum + PowerBook ®. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD080E2B; Sun, 11 Jan 2015 19:00:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A653276; Sun, 11 Jan 2015 19:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0ocX087365; Sun, 11 Jan 2015 19:00:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0oiI087364; Sun, 11 Jan 2015 19:00:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0oiI087364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277001 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:50 -0000 Author: gjb Date: Sun Jan 11 19:00:49 2015 New Revision: 277001 URL: https://svnweb.freebsd.org/changeset/base/277001 Log: Document r274960, elfdump(1) cap_limits support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:47 2015 (r277000) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:49 2015 (r277001) @@ -618,6 +618,10 @@ kern.vm_guest &man.sysctl.8; is set to 1. + The &man.elfdump.1; utility has been + updated to support capability mode provided by + &man.capsicum.4;. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 846C7F4D; Sun, 11 Jan 2015 19:00:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71CCB27B; Sun, 11 Jan 2015 19:00:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0rRa087415; Sun, 11 Jan 2015 19:00:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0rnr087414; Sun, 11 Jan 2015 19:00:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0rnr087414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277002 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:53 -0000 Author: gjb Date: Sun Jan 11 19:00:52 2015 New Revision: 277002 URL: https://svnweb.freebsd.org/changeset/base/277002 Log: Document r274987, gpio(3) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:49 2015 (r277001) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:52 2015 (r277002) @@ -622,6 +622,10 @@ updated to support capability mode provided by &man.capsicum.4;. + The &man.gpio.3; library has been added, + providing a wrapper around the &man.gpio.4; kernel + interface. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36CD110C; Sun, 11 Jan 2015 19:00:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 237CF282; Sun, 11 Jan 2015 19:00:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0uMM087469; Sun, 11 Jan 2015 19:00:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0u04087468; Sun, 11 Jan 2015 19:00:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0u04087468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277003 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:56 -0000 Author: gjb Date: Sun Jan 11 19:00:55 2015 New Revision: 277003 URL: https://svnweb.freebsd.org/changeset/base/277003 Log: Document r275171, r275190: hpwmc(4) performance counter sampling fixes for G4 and G5 class processors. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:52 2015 (r277002) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:55 2015 (r277003) @@ -213,6 +213,10 @@ certain &arch.powerpc; hardware, such as aluminum PowerBook ®. + The &man.hwpmc.4; + driver has been updated to correct performance counter sampling + on G4 (MPC74xxx) and G5 class processors. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:00:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 080DB1FF; Sun, 11 Jan 2015 19:00:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9AF3285; Sun, 11 Jan 2015 19:00:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ0wnV087537; Sun, 11 Jan 2015 19:00:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0wCK087536; Sun, 11 Jan 2015 19:00:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0wCK087536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277004 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:59 -0000 Author: gjb Date: Sun Jan 11 19:00:58 2015 New Revision: 277004 URL: https://svnweb.freebsd.org/changeset/base/277004 Log: Document r275299, mrouted rc(8) script removal from base. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:55 2015 (r277003) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:58 2015 (r277004) @@ -649,6 +649,11 @@ class="directory">${LOCALBASE}/etc/rc.conf.d/. If LOCALBASE is unset, it defaults to /usr/local. + + The mrouted + &man.rc.8; script has been removed from the base system. An + equivalent script is available from the net/mrouted port. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D1983BB; Sun, 11 Jan 2015 19:01:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59F5D287; Sun, 11 Jan 2015 19:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ120h087606; Sun, 11 Jan 2015 19:01:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ111c087604; Sun, 11 Jan 2015 19:01:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ111c087604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277005 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:02 -0000 Author: gjb Date: Sun Jan 11 19:01:01 2015 New Revision: 277005 URL: https://svnweb.freebsd.org/changeset/base/277005 Log: Document r275461, CTL port/LUN limits increased. Add iXsystems to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:58 2015 (r277004) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:01 2015 (r277005) @@ -433,6 +433,12 @@ The asr(4) driver has been removed, and is no longer supported. + + The + &man.ctl.4; subsystem has been updated, increasing the ports + limit from 128 to 256, + and LUN limit from 256 + to 1024. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:00:58 2015 (r277004) +++ head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:01:01 2015 (r277005) @@ -23,6 +23,8 @@ + + From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 446994AC; Sun, 11 Jan 2015 19:01:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 318F328C; Sun, 11 Jan 2015 19:01:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ15mi087656; Sun, 11 Jan 2015 19:01:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ15sG087655; Sun, 11 Jan 2015 19:01:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ15sG087655@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277006 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:05 -0000 Author: gjb Date: Sun Jan 11 19:01:04 2015 New Revision: 277006 URL: https://svnweb.freebsd.org/changeset/base/277006 Log: Document r275680, fstyp(8) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:01 2015 (r277005) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:04 2015 (r277006) @@ -636,6 +636,10 @@ providing a wrapper around the &man.gpio.4; kernel interface. + The + &man.fstyp.8; utility has been added, which is used to determine + the filesystem on a specified device. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2F865E0; Sun, 11 Jan 2015 19:01:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFAFD29A; Sun, 11 Jan 2015 19:01:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ17CP087708; Sun, 11 Jan 2015 19:01:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ17ow087707; Sun, 11 Jan 2015 19:01:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ17ow087707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277007 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:08 -0000 Author: gjb Date: Sun Jan 11 19:01:07 2015 New Revision: 277007 URL: https://svnweb.freebsd.org/changeset/base/277007 Log: Fix indentation for r270096 entry. While here, remove the leading 'r' from the revision tag. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:04 2015 (r277006) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:07 2015 (r277007) @@ -444,15 +444,15 @@ File Systems - The - new filesystem automount facility, &man.autofs.5;, has been - added. The new &man.autofs.5; facility is similar to that - found in other &unix;-like operating systems, such as - OS X™ and Solaris™. The &man.autofs.5; - facility uses a &sun;-compatible &man.auto.master.5; - configuration file, and is administered with the - &man.automount.8; userland utility, and the - &man.automountd.8; and &man.autounmountd.8; daemons. + The + new filesystem automount facility, &man.autofs.5;, has been + added. The new &man.autofs.5; facility is similar to that + found in other &unix;-like operating systems, such as + OS X™ and Solaris™. The &man.autofs.5; + facility uses a &sun;-compatible &man.auto.master.5; + configuration file, and is administered with the + &man.automount.8; userland utility, and the &man.automountd.8; + and &man.autounmountd.8; daemons. ZFS From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F482716; Sun, 11 Jan 2015 19:01:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C5D329C; Sun, 11 Jan 2015 19:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1ATD087754; Sun, 11 Jan 2015 19:01:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1AI2087753; Sun, 11 Jan 2015 19:01:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1AI2087753@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277008 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:10 -0000 Author: gjb Date: Sun Jan 11 19:01:09 2015 New Revision: 277008 URL: https://svnweb.freebsd.org/changeset/base/277008 Log: Document r275718, binutils PowerPC relocations update. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:07 2015 (r277007) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:09 2015 (r277008) @@ -719,6 +719,10 @@ OpenSSL has been updated to version 1.0.1j. + + The binutils + suite of utilities has been updated to include upstream patches + that add new relocations for &arch.powerpc; support. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D0A384A; Sun, 11 Jan 2015 19:01:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A8612A6; Sun, 11 Jan 2015 19:01:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1DwJ087810; Sun, 11 Jan 2015 19:01:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1DXt087809; Sun, 11 Jan 2015 19:01:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1DXt087809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277009 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:13 -0000 Author: gjb Date: Sun Jan 11 19:01:12 2015 New Revision: 277009 URL: https://svnweb.freebsd.org/changeset/base/277009 Log: Document r275732, OpenCrypto support for AES-ICM and AES-GCM. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:09 2015 (r277008) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:12 2015 (r277009) @@ -217,6 +217,13 @@ driver has been updated to correct performance counter sampling on G4 (MPC74xxx) and G5 class processors. + The + OpenCrypto framework has been updated + to include AES-ICM and + AES-GCM modes, both of which have also been + added to the &man.aesni.4; driver. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2D2598D; Sun, 11 Jan 2015 19:01:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCCB32A9; Sun, 11 Jan 2015 19:01:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1Fub087870; Sun, 11 Jan 2015 19:01:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1Fk2087869; Sun, 11 Jan 2015 19:01:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1Fk2087869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277010 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:16 -0000 Author: gjb Date: Sun Jan 11 19:01:15 2015 New Revision: 277010 URL: https://svnweb.freebsd.org/changeset/base/277010 Log: Document r275748, arc_meta_limit now exposed through kernel statistics. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:12 2015 (r277009) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:15 2015 (r277010) @@ -464,7 +464,13 @@ ZFS -   + The arc_meta_limit + statistics are now visible through the + kstat &man.sysctl.8;. As a result of + this change, the vfs.zfs.arc_meta_used + &man.sysctl.8; has been removed, and replaced with the + kstat.zfs.misc.arcstats.arc_meta_used + &man.sysctl.8;. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BFC6AE9; Sun, 11 Jan 2015 19:01:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 754292AE; Sun, 11 Jan 2015 19:01:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1Igd087928; Sun, 11 Jan 2015 19:01:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1IwE087927; Sun, 11 Jan 2015 19:01:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1IwE087927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277011 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:18 -0000 Author: gjb Date: Sun Jan 11 19:01:17 2015 New Revision: 277011 URL: https://svnweb.freebsd.org/changeset/base/277011 Log: Document r275874, bsdinstall(8) now uses dpv(3) when extracting the distribution packages. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:15 2015 (r277010) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:17 2015 (r277011) @@ -653,6 +653,10 @@ &man.fstyp.8; utility has been added, which is used to determine the filesystem on a specified device. + The &man.bsdinstall.8; utility has been + updated to use the new &man.dpv.3; library to display progress + when extracting the &os; distributions. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52095C06; Sun, 11 Jan 2015 19:01:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F561340; Sun, 11 Jan 2015 19:01:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1LMQ087973; Sun, 11 Jan 2015 19:01:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1LHh087972; Sun, 11 Jan 2015 19:01:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1LHh087972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277012 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:21 -0000 Author: gjb Date: Sun Jan 11 19:01:20 2015 New Revision: 277012 URL: https://svnweb.freebsd.org/changeset/base/277012 Log: Document r275963, CPU frequency/voltage control driver for RPI. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:17 2015 (r277011) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:20 2015 (r277012) @@ -275,6 +275,11 @@ An issue that could cause instability when detecting SD cards on the Raspberry Pi SOC has been fixed. + + The bcm2835_cpufreq + driver has been added, which supports CPU + frequency and voltage control on the Raspberry Pi + SOC. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28335D7D; Sun, 11 Jan 2015 19:01:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15812354; Sun, 11 Jan 2015 19:01:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1NR3088034; Sun, 11 Jan 2015 19:01:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1NGC088033; Sun, 11 Jan 2015 19:01:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1NGC088033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277013 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:24 -0000 Author: gjb Date: Sun Jan 11 19:01:23 2015 New Revision: 277013 URL: https://svnweb.freebsd.org/changeset/base/277013 Log: Document r276551, texinfo and info page removal. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:20 2015 (r277012) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:23 2015 (r277013) @@ -745,6 +745,13 @@ The binutils suite of utilities has been updated to include upstream patches that add new relocations for &arch.powerpc; support. + + The texinfo + utility and info pages were removed from the + base system. The print/texinfo port should be + installed on systems where info pages are + needed. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB7FAEB1; Sun, 11 Jan 2015 19:01:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98F64356; Sun, 11 Jan 2015 19:01:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1QPY088079; Sun, 11 Jan 2015 19:01:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1QVo088078; Sun, 11 Jan 2015 19:01:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1QVo088078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277014 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:26 -0000 Author: gjb Date: Sun Jan 11 19:01:25 2015 New Revision: 277014 URL: https://svnweb.freebsd.org/changeset/base/277014 Log: Add a comment in the release notes XML file to note the last revision, to make it easier to keep track of where the last update(s) left off. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:23 2015 (r277013) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:25 2015 (r277014) @@ -15,6 +15,8 @@ $FreeBSD$ + + 2015 The &os; Documentation From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:01:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4632EFCD; Sun, 11 Jan 2015 19:01:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31E6F35A; Sun, 11 Jan 2015 19:01:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJ1TvK088133; Sun, 11 Jan 2015 19:01:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1TCR088132; Sun, 11 Jan 2015 19:01:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1TCR088132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277015 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:29 -0000 Author: gjb Date: Sun Jan 11 19:01:28 2015 New Revision: 277015 URL: https://svnweb.freebsd.org/changeset/base/277015 Log: Fix the release notes article.xml file to confirm with FDP style, specifically reindenting the entire file for tag alignment, rewrapping lines where necessary. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:25 2015 (r277014) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:28 2015 (r277015) @@ -8,365 +8,586 @@ %vendor; ]> -
- &os; &release.current; Release Notes +
- The &os; Project + + &os; &release.current; Release Notes - $FreeBSD$ + The &os; Project - + $FreeBSD$ + + + + + 2015 + The &os; Documentation + Project + + + + &tm-attrib.freebsd; + &tm-attrib.ibm; + &tm-attrib.ieee; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + The release notes for &os; &release.current; contain + a summary of the changes made to the &os; base system on the + &release.branch; development line. This document lists + applicable security advisories that were issued since the last + release, as well as significant changes to the &os; kernel and + userland. Some brief remarks on upgrading are also + presented. + + + + + Introduction + + This document contains the release notes for &os; + &release.current;. It describes recently added, changed, or + deleted features of &os;. It also provides some notes on + upgrading from previous versions of &os;. + + The &release.type; distribution to + which these release notes apply represents the latest point + along the &release.branch; development branch since + &release.branch; was created. Information regarding pre-built, + binary &release.type; distributions along this branch can be + found at &release.url;. + + The &release.type; distribution to + which these release notes apply represents a point along the + &release.branch; development branch between &release.prev; and + the future &release.next;. Information regarding pre-built, + binary &release.type; distributions along this branch can be + found at &release.url;. + + This distribution of &os; + &release.current; is a &release.type; distribution. It can be + found at &release.url; or + any of its mirrors. More information on obtaining this (or + other) &release.type; distributions of &os; can be found in the + Obtaining + &os; appendix to the &os; + Handbook. + + All users are encouraged to consult the release errata + before installing &os;. The errata document is updated with + late-breaking information discovered late in the + release cycle or after the release. Typically, it contains + information on known bugs, security advisories, and corrections + to documentation. An up-to-date copy of the errata for &os; + &release.current; can be found on the &os; Web site. + + + + What's New + + This section describes the most user-visible new or changed + features in &os; since &release.prev;. In general, changes + described here are unique to the &release.branch; branch unless + specifically marked as &merged; features. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. + + + Security Advisories + + No advisories. + + + + + Kernel Changes + + Support for GPS ports has been added to + &man.uhso.4;. + + The if_nf10bmac(4) + device has been added, providing support for NetFPGA-10G + Embedded CPU Ethernet Core. + + + The if_nf10bmac(4) driver operates on + the FPGA, and is not suited for the PCI host + interface. + + + The &man.full.4; device has been added, + and the lindev(4) device has been removed. + Prior to this change, lindev(4) provided + only the /dev/full character device, + returning ENOSPC on write attempts. As + this device is not specific to &linux;, a native &os; version + has been added. + + The &man.mpr.4; + device has been added, providing support for LSI Fusion-MPT + 3 12Gb SCSI/SATA controllers. + + The &man.mrsas.4; driver has been added, + providing support for LSI MegaRAID SAS controllers. The + &man.mfi.4; driver will attach to the controller, by default. + To enable &man.mrsas.4; add + hw.mfi.mrsas_enable=1 to + /boot/loader.conf, which turns off + &man.mfi.4; device probing. + + + At this time, the &man.mfiutil.8; utility and the &os; + version of MegaCLI and + StorCli do not work with + &man.mrsas.4;. + + + A kernel bug that inhibited proper + functionality of the dev.cpu.0.freq + &man.sysctl.8; on &intel; processors with Turbo + Boost ™ enabled has been fixed. + + The IMAGACT_BINMISC + kernel configuration option has been enabled by default, + which enables application execution through emulators, such + as Qemu. + + Support for the &man.cxgbe.4; Terminator + 5 (T5) 10G/40G cards has been added to &man.netmap.4;. + + The VT kernel + configuration file has been removed, and the &man.vt.4; + driver is included in the GENERIC kernel. + To enable &man.vt.4;, enter set kern.vty=vt + at the &man.loader.8; prompt during boot, or add + kern.vty=vt to &man.loader.conf.5; and + reboot the system. + + Support for + &man.dtrace.1; stack tracing has been fixed for + &os;/&arch.powerpc;, using the trapexit() + and asttrapexit() functions instead of + checking within addressed kernel space. + + Hardware context support has been + added to the drm/i915 driver, adding + support for Mesa 9.2 and + later. + + The &man.vt.4; driver has been updated, + replacing the bitmapped kern.vt.spclkeys + &man.sysctl.8; with individual + kern.vt.kbd_* variants. + + The &man.hpet.4; driver has been updated + to create a + /dev/hpetN + device, providing access to HPET from + userspace. + + The &man.vt.4; driver has been made the + default system console driver. The &man.syscons.4; driver is + still available, and can be enabled by adding + kern.vty=sc in &man.loader.conf.5;. + Alternatively, &man.syscons.4; can be enabled at boot time by + entering set kern.vty=sc at the + &man.loader.8; prompt. + + An issue that could cause a system to + hang when entering ACPI + S3 state (suspend to + RAM) has been corrected in the &man.acpi.4; + and &man.pci.4; drivers. + + The power management unit + subsystem has been updated to support power button events on + certain &arch.powerpc; hardware, such as aluminum + PowerBook ®. + + The &man.hwpmc.4; + driver has been updated to correct performance counter + sampling on G4 (MPC74xxx) and G5 class processors. + + The + OpenCrypto framework has been + updated to include AES-ICM and + AES-GCM modes, both of which have also been + added to the &man.aesni.4; driver. + + + Virtualization Support + + Support for the Virtual + Interrupt Delivery feature of &intel; VT-x is + enabled if supported by the CPU. This feature can be + disabled by running sysctl + hw.vmm.vmx.use_apic_vid=0. Additionally, to + persist this setting across reboots, add + hw.vmm.vmx.use_apic_vid=0 to + /etc/sysctl.conf. + + Support for Posted Interrupt + Processing is enabled if supported by the CPU. + This feature can be disabled by running sysctl + hw.vmm.vmx.use_apic_pir=0. Additionally, to + persist this setting across reboots, add + hw.vmm.vmx.use_apic_pir=0 to + /etc/sysctl.conf. + + Unmapped IO support has been added to + &man.virtio_blk.4;. + + Unmapped IO support has been added to + &man.virtio_scsi.4;. + + The &man.virtio_random.4; driver has + been added to harvest entropy from the host system. + + Support for running + a &os;/&arch.amd64; Xen guest + instance as PVH guest has been added. + PVH mode, short for + Para-Virtualized Hardware, uses + para-virtualized drivers for boot and I/O, and uses hardware + virtualization extensions for all other tasks, without the + need for emulation. + + The &man.virtio.console.4; driver has + been added, which provides an interface to VirtIO console + devices through a &man.tty.4; device. + + + + ARM Support + + The &man.nand.4; device is enabled for + ARM devices by default. + + An issue that could cause + instability when detecting SD cards on + the Raspberry Pi SOC has been + fixed. + + The bcm2835_cpufreq + driver has been added, which supports CPU + frequency and voltage control on the Raspberry Pi + SOC. + - - 2015 - The &os; Documentation - Project - - - - &tm-attrib.freebsd; - &tm-attrib.ibm; - &tm-attrib.ieee; - &tm-attrib.intel; - &tm-attrib.sparc; - &tm-attrib.general; - - - - The release notes for &os; &release.current; contain - a summary of the changes made to the &os; base system on the - &release.branch; development line. This document lists - applicable security advisories that were issued since the last - release, as well as significant changes to the &os; kernel and - userland. Some brief remarks on upgrading are also - presented. - - - - - Introduction - - This document contains the release notes for &os; - &release.current;. It describes recently added, changed, or - deleted features of &os;. It also provides some notes on - upgrading from previous versions of &os;. - - The &release.type; distribution to which - these release notes apply represents the latest point along the - &release.branch; development branch since &release.branch; was - created. Information regarding pre-built, binary &release.type; - distributions along this branch can be found at &release.url;. - - The &release.type; distribution to - which these release notes apply represents a point along the - &release.branch; development branch between &release.prev; and the - future &release.next;. Information regarding pre-built, binary - &release.type; distributions along this branch can be found at - &release.url;. - - This distribution of &os; - &release.current; is a &release.type; distribution. It can be - found at &release.url; or - any of its mirrors. More information on obtaining this (or other) - &release.type; distributions of &os; can be found in the Obtaining - &os; appendix to the &os; Handbook. - - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with - late-breaking information discovered late in the - release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. - - - - What's New - - This section describes the most user-visible new or changed - features in &os; since &release.prev;. In general, changes - described here are unique to the &release.branch; branch unless - specifically marked as &merged; features. - - Typical release note items document recent security advisories - issued after &release.prev;, new drivers or hardware support, new - commands or options, major bug fixes, or contributed software - upgrades. They may also list changes to major ports/packages or - release engineering practices. Clearly the release notes cannot - list every single change made to &os; between releases; this - document focuses primarily on security advisories, user-visible - changes, and major architectural improvements. - - - Security Advisories - - No advisories. - - - - - Kernel Changes - - Support for GPS ports has been added to - &man.uhso.4;. - - The if_nf10bmac(4) - device has been added, providing support for NetFPGA-10G - Embedded CPU Ethernet Core. - - - The if_nf10bmac(4) driver operates on - the FPGA, and is not suited for the PCI host interface. - - - The &man.full.4; device has been added, - and the lindev(4) device has been removed. - Prior to this change, lindev(4) provided only - the /dev/full character device, returning - ENOSPC on write attempts. As this device is - not specific to &linux;, a native &os; version has been - added. - - The &man.mpr.4; - device has been added, providing support for LSI Fusion-MPT - 3 12Gb SCSI/SATA controllers. - - The &man.mrsas.4; driver has been added, - providing support for LSI MegaRAID SAS controllers. The - &man.mfi.4; driver will attach to the controller, by default. - To enable &man.mrsas.4; add - hw.mfi.mrsas_enable=1 to - /boot/loader.conf, which turns off - &man.mfi.4; device probing. - - - At this time, the &man.mfiutil.8; utility and - the &os; version of - MegaCLI and - StorCli do not work with - &man.mrsas.4;. - - - A kernel bug that inhibited proper - functionality of the dev.cpu.0.freq - &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed. - - The IMAGACT_BINMISC - kernel configuration option has been enabled by default, - which enables application execution through emulators, such - as Qemu. - - Support for the &man.cxgbe.4; Terminator 5 - (T5) 10G/40G cards has been added to &man.netmap.4;. - - The VT kernel - configuration file has been removed, and the &man.vt.4; - driver is included in the GENERIC kernel. - To enable &man.vt.4;, enter set kern.vty=vt - at the &man.loader.8; prompt during boot, or add - kern.vty=vt to &man.loader.conf.5; and - reboot the system. - - Support for &man.dtrace.1; - stack tracing has been fixed for &os;/&arch.powerpc;, using the - trapexit() and - asttrapexit() functions instead of checking - within addressed kernel space. - - Hardware context support has been - added to the drm/i915 driver, adding - support for Mesa 9.2 and - later. - - The &man.vt.4; driver has been updated, - replacing the bitmapped kern.vt.spclkeys - &man.sysctl.8; with individual kern.vt.kbd_* - variants. - - The &man.hpet.4; driver has been updated - to create a - /dev/hpetN - device, providing access to HPET from - userspace. - - The &man.vt.4; driver has been made the - default system console driver. The &man.syscons.4; driver is - still available, and can be enabled by adding - kern.vty=sc in &man.loader.conf.5;. - Alternatively, &man.syscons.4; can be enabled at boot time by - entering set kern.vty=sc at the - &man.loader.8; prompt. - - An issue that could cause a system to - hang when entering ACPI S3 - state (suspend to RAM) has been corrected - in the &man.acpi.4; and &man.pci.4; drivers. - - The power management unit - subsystem has been updated to support power button events on - certain &arch.powerpc; hardware, such as aluminum - PowerBook ®. - - The &man.hwpmc.4; - driver has been updated to correct performance counter sampling - on G4 (MPC74xxx) and G5 class processors. - - The - OpenCrypto framework has been updated - to include AES-ICM and - AES-GCM modes, both of which have also been - added to the &man.aesni.4; driver. - - - Virtualization Support - - Support for the Virtual Interrupt - Delivery feature of &intel; VT-x is enabled if - supported by the CPU. This feature can be disabled by running - sysctl hw.vmm.vmx.use_apic_vid=0. - Additionally, to persist this setting across reboots, add - hw.vmm.vmx.use_apic_vid=0 to - /etc/sysctl.conf. - - Support for Posted Interrupt - Processing is enabled if supported by the CPU. This - feature can be disabled by running sysctl - hw.vmm.vmx.use_apic_pir=0. Additionally, to - persist this setting across reboots, add - hw.vmm.vmx.use_apic_pir=0 to - /etc/sysctl.conf. - - Unmapped IO support has been added to - &man.virtio_blk.4;. - - Unmapped IO support has been added to - &man.virtio_scsi.4;. - - The &man.virtio_random.4; driver has - been added to harvest entropy from the host system. - - Support for running a &os;/&arch.amd64; - Xen guest instance as - PVH guest has been added. - PVH mode, short for Para-Virtualized - Hardware, uses para-virtualized drivers for boot - and I/O, and uses hardware virtualization extensions for all - other tasks, without the need for emulation. - - The &man.virtio.console.4; driver has - been added, which provides an interface to VirtIO console - devices through a &man.tty.4; device. - - - - ARM Support - - The &man.nand.4; device is enabled for - ARM devices by default. - - An issue that could cause - instability when detecting SD cards on the - Raspberry Pi SOC has been fixed. - - The bcm2835_cpufreq - driver has been added, which supports CPU - frequency and voltage control on the Raspberry Pi - SOC. - - - - Boot Loader Changes - -   - - - - Hardware Support - - The &man.asmc.4; driver has been updated - to support the &apple; MacMini 3,1. - - Support for &os;/ia64 has been dropped - as of &os; 11. - - - Multimedia Support + + Boot Loader Changes   - + + + + Hardware Support - - Network Interface Support + The &man.asmc.4; driver has been + updated to support the &apple; MacMini 3,1. - Support for Broadcom chipsets - BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has - been added to &man.bge.4;. - - Support for the &intel; - Centrino™ Wireless-N 135 chipset has been - added. - - Firmware for &intel; - Centrino™ Wireless-N 105 devices has been added - to the base system. - - The deprecated nve(4) driver has been - removed. Users of NVIDIA nForce MCP network adapters are - advised to use the &man.nfe.4; driver instead, which has been - the default driver for this hardware since &os; 7.0. - - The &man.ath.hal.4; driver has been - updated to support the Atheros AR1111 chipset. - - Support for the &intel; - Centrino™ Wireless-N 105 chipset has been - added. - - A bug in &man.ipfw.4; that could - potentially lead to a kernel panic when using - &man.dummynet.4; at layer 2 has been fixed. - - The &man.alc.4; driver has been - updated to support AR816x and AR817x ethernet - controllers. - - The &man.vxlan.4; driver has been - added, which creates a virtual Layer 2 (Ethernet) network - overlaid in a Layer 3 (IP/UDP) network. The &man.vxlan.4; - driver is analogous to &man.vlan.4;, but is designed to be - better suited for large, multiple-tenant datacenter - environments. - - The &man.gre.4; driver has been - significantly overhauled, and has been split into two - separate modules, &man.gre.4; and &man.me.4;. - - - - - Network Protocols - - Support for the IPX network transport - protocol has been removed, and will not be supported in - &os; 11 and later releases. - - Support for PLPMTUD - blackhole detection (RFC 4821) has been - added to the &man.tcp.4; stack, disabled by default. New - control tunables have been added: + Support for &os;/ia64 has been dropped + as of &os; 11. + + + Multimedia Support + +   + + + + Network Interface Support + + Support for Broadcom chipsets + BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has + been added to &man.bge.4;. + + Support for the &intel; + Centrino™ Wireless-N 135 chipset has been + added. + + Firmware for &intel; Centrino™ + Wireless-N 105 devices has been added to the base + system. + + The deprecated nve(4) driver has + been removed. Users of NVIDIA nForce MCP network adapters + are advised to use the &man.nfe.4; driver instead, which + has been the default driver for this hardware since + &os; 7.0. + + The &man.ath.hal.4; driver has been + updated to support the Atheros AR1111 chipset. + + Support for the &intel; + Centrino™ Wireless-N 105 chipset has been + added. + + A bug in &man.ipfw.4; that could + potentially lead to a kernel panic when using + &man.dummynet.4; at layer 2 has been fixed. + + The &man.alc.4; driver has been + updated to support AR816x and AR817x ethernet + controllers. + + The &man.vxlan.4; driver has been + added, which creates a virtual Layer 2 (Ethernet) network + overlaid in a Layer 3 (IP/UDP) network. The &man.vxlan.4; + driver is analogous to &man.vlan.4;, but is designed to be + better suited for large, multiple-tenant datacenter + environments. + + The &man.gre.4; driver has been + significantly overhauled, and has been split into two + separate modules, &man.gre.4; and &man.me.4;. + + + + + Network Protocols + + Support for the IPX network transport + protocol has been removed, and will not be supported in + &os; 11 and later releases. + + Support for PLPMTUD + blackhole detection (RFC 4821) has been + added to the &man.tcp.4; stack, disabled by default. New + control tunables have been added: + + + + + + + + Tunable + Description + + + + + + net.inet.tcp.pmtud_blackhole_detection + Enables or disables PLPMTUD + blackhole detection + + + + net.inet.tcp.pmtud_blackhole_mss + MSS to try for IPv4 + + + + net.inet.tcp.v6pmtud_blackhole_mss + MSS to try for IPv6 + + + + + + New monitoring &man.sysctl.8;s haven been added: + + + + + + + + Tunable + Description + + + + + + net.inet.tcp.pmtud_blackhole_activated + Number of times the code was activated to + attempt downshifting the + MSS + + + + net.inet.tcp.pmtud_blackhole_min_activated + Number of times the blackhole + MSS was used in an attempt to + downshift + + + + net.inet.tcp.pmtud_blackhole_failed + Number of times that the blackhole failed to + connect after downshifting the + MSS + + + + + + + + Disks and Storage + + Support for the + disklabel64 partitioning scheme has been + added to &man.gpart.8;. + + The asr(4) driver + has been removed, and is no longer supported. + + The + &man.ctl.4; subsystem has been updated, increasing the ports + limit from 128 to 256, + and LUN limit from 256 + to 1024. + + + + File Systems + + The + new filesystem automount facility, &man.autofs.5;, has been + added. The new &man.autofs.5; facility is similar to that + found in other &unix;-like operating systems, such as + OS X™ and Solaris™. The &man.autofs.5; + facility uses a &sun;-compatible &man.auto.master.5; + configuration file, and is administered with the + &man.automount.8; userland utility, and the + &man.automountd.8; and &man.autounmountd.8; daemons. + + + ZFS + + The + arc_meta_limit statistics are now + visible through the kstat + &man.sysctl.8;. As a result of this change, the + vfs.zfs.arc_meta_used &man.sysctl.8; + has been removed, and replaced with the + kstat.zfs.misc.arcstats.arc_meta_used + &man.sysctl.8;. + + + + + + Userland Changes + + The &man.casperd.8; daemon has been + added, which provides access to functionality that is not + available in the capability mode + sandbox. + + When unable to load a kernel module with + &man.kldload.8;, a message informing to view output of + &man.dmesg.8; is now printed, opposed to the previous output + Exec format error.. + + Allow &man.pciconf.8; to identify PCI + devices that are attached to a driver to be identified by + their device name instead of just the selector. Additionally, + an optional device argument to the -l flag + to restrict the output to only listing details about a single + device. + + A new flag, onifconsole + has been added to /etc/ttys. This allows + the system to provide a login prompt via serial console if the + device is an active kernel console, otherwise it is equivalent + to off. + + Support for displaying VPD for PCI + devices via &man.pciconf.8; has been added. + + &man.ping.8; protects against malicious + network packets using the Capsicum framework to drop + privileges. + + &os;/&arch.i386; guests can be run under + bhyve. + + The &man.ps.1; utility has been + updated to include the -J flag, used to + filter output by matching &man.jail.8; IDs and names. + Additionally, argument 0 can be used to + -J to only list processes running on the + host system. + + The &man.top.1; utility has been updated + to filter by &man.jail.8; ID or name, in followup to the + &man.ps.1; change in r265229. + + The Blowfish &man.crypt.3; default + format has been changed to + $2b$. + + The &man.pmcstat.8; utility has been + updated to include a new flag, -l, which + ends event collection after the specified number of + seconds. + + The default &man.newsyslog.conf.5; now + includes files in the + /etc/newsyslog.conf.d/ and + /usr/local/etc/newsyslog.conf.d/ + directories by default for &man.newsyslog.8;. + + The &man.readline.3; library is now + statically linked in software within the base system, and the + shared library is no longer installed, allowing the Ports + Collection to use a modern version of the library. + + The &man.mailwrapper.8; utility has been + updated to use &man.mailer.conf.5; from the + LOCALBASE environment variable, which + defaults to /usr/local + if unset. + + The &man.ps.1; utility has been updated + to include a new keyword, tracer, which + displays the PID of the tracing + process. + + Support for adding empty partitions has + been added to the &man.mkimg.1; utility. + + The &man.primes.6; utility has been + updated to correctly enumerate prime numbers between + 4295098369 and + 3825123056546413050, which prior to this + change, it would be possible for returned values to be + incorrectly identified as prime numbers. + + The &man.mkimg.1; utility has been + updated to include three options used to print information + about &man.mkimg.1; itself: @@ -374,426 +595,224 @@ - Tunable - Description + Option + Output - net.inet.tcp.pmtud_blackhole_detection - Enables or disables PLPMTUD - blackhole detection + --version + The current version of the &man.mkimg.1; + utility - net.inet.tcp.pmtud_blackhole_mss - MSS to try for IPv4 + --formats + The disk image file formats supported by + &man.mkimg.1; - net.inet.tcp.v6pmtud_blackhole_mss - MSS to try for IPv6 + --schemes + The partition schemes supported by + &man.mkimg.1; - New monitoring &man.sysctl.8;s haven been added: + The &man.strptime.3; library has been + updated to add support for POSIX-2001 + features %U and + %W. + + The &os; installation utility, + &man.bsdinstall.8;, has been updated to set the + canmount &man.zfs.8; property to + off for the /var dataset, preventing the + contents of directories within /var from conflicting when + using multiple boot environments, such as that provided by + sysutils/beadm. + + The MK_ARM_EABI + &man.src.conf.5; option has been removed. + + Userland &man.ctf.5; support in *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:15:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDDF43B7; Sun, 11 Jan 2015 19:15:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C968F672; Sun, 11 Jan 2015 19:15:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJFTgZ094162; Sun, 11 Jan 2015 19:15:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJFTnN094156; Sun, 11 Jan 2015 19:15:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501111915.t0BJFTnN094156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 11 Jan 2015 19:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277016 - in stable/10: lib/libc/stdio tools/regression/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:15:30 -0000 Author: ngie Date: Sun Jan 11 19:15:28 2015 New Revision: 277016 URL: https://svnweb.freebsd.org/changeset/base/277016 Log: MFC discussed with: jilles, -developers MFC r266971: - Return NULL and set errno to EINVAL if size is 0 (as required by POSIX). Update the manpage to reflect this change. - Always set the current position to the first null-byte when opening in append mode. This makes the implementation compatible with glibc's. Update the test suite. Reported by: pho Approved by: cognet Modified: stable/10/lib/libc/stdio/fmemopen.c stable/10/lib/libc/stdio/fopen.3 stable/10/tools/regression/lib/libc/stdio/test-fmemopen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/fmemopen.c ============================================================================== --- stable/10/lib/libc/stdio/fmemopen.c Sun Jan 11 19:01:28 2015 (r277015) +++ stable/10/lib/libc/stdio/fmemopen.c Sun Jan 11 19:15:28 2015 (r277016) @@ -57,6 +57,14 @@ fmemopen(void * __restrict buf, size_t s int flags, rc; /* + * POSIX says we shall return EINVAL if size is 0. + */ + if (size == 0) { + errno = EINVAL; + return (NULL); + } + + /* * Retrieve the flags as used by open(2) from the mode argument, and * validate them. */ @@ -119,14 +127,7 @@ fmemopen(void * __restrict buf, size_t s */ switch (mode[0]) { case 'a': - if (ck->bin) { - /* - * This isn't useful, since the buffer isn't allowed - * to grow. - */ - ck->off = ck->len = size; - } else - ck->off = ck->len = strnlen(ck->buf, ck->size); + ck->off = ck->len = strnlen(ck->buf, ck->size); break; case 'r': ck->len = size; Modified: stable/10/lib/libc/stdio/fopen.3 ============================================================================== --- stable/10/lib/libc/stdio/fopen.3 Sun Jan 11 19:01:28 2015 (r277015) +++ stable/10/lib/libc/stdio/fopen.3 Sun Jan 11 19:15:28 2015 (r277016) @@ -302,6 +302,15 @@ for any of the errors specified for the .Xr fclose 3 and .Xr fflush 3 . +.Pp +The +.Fn fmemopen +function +may also fail and set +.Va errno +if the +.Fa size +argument is 0. .Sh SEE ALSO .Xr open 2 , .Xr fclose 3 , Modified: stable/10/tools/regression/lib/libc/stdio/test-fmemopen.c ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/test-fmemopen.c Sun Jan 11 19:01:28 2015 (r277015) +++ stable/10/tools/regression/lib/libc/stdio/test-fmemopen.c Sun Jan 11 19:15:28 2015 (r277016) @@ -138,6 +138,13 @@ test_autoalloc() /* Close the FILE *. */ rc = fclose(fp); assert(rc == 0); + + /* Open a FILE * using a wrong mode */ + fp = fmemopen(NULL, 512, "r"); + assert(fp == NULL); + + fp = fmemopen(NULL, 512, "w"); + assert(fp == NULL); } void @@ -241,6 +248,44 @@ test_binary() assert(rc == 0); } +void +test_append_binary_pos() +{ + /* + * For compatibility with other implementations (glibc), we set the + * position to 0 when opening an automatically allocated binary stream + * for appending. + */ + + FILE *fp; + + fp = fmemopen(NULL, 16, "ab+"); + assert(ftell(fp) == 0L); + fclose(fp); + + /* + * Make sure that a pre-allocated buffer behaves correctly. + */ + char buf[] = "Hello"; + fp = fmemopen(buf, sizeof(buf), "ab+"); + assert(ftell(fp) == 5); + fclose(fp); +} + +void +test_size_0() +{ + /* + * POSIX mandates that we return EINVAL if size is 0 + */ + + FILE *fp; + + fp = fmemopen(NULL, 0, "r+"); + assert(fp == NULL); + assert(errno == EINVAL); +} + int main(void) { @@ -248,5 +293,7 @@ main(void) test_preexisting(); test_data_length(); test_binary(); + test_append_binary_pos(); + test_size_0(); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 19:28:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C1F769B; Sun, 11 Jan 2015 19:28:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 567717BF; Sun, 11 Jan 2015 19:28:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BJScOi099338; Sun, 11 Jan 2015 19:28:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJSbNd099333; Sun, 11 Jan 2015 19:28:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501111928.t0BJSbNd099333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 11 Jan 2015 19:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277017 - in stable/9/share: doc/IPv6 termcap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:28:38 -0000 Author: ngie Date: Sun Jan 11 19:28:37 2015 New Revision: 277017 URL: https://svnweb.freebsd.org/changeset/base/277017 Log: MFC r228993 (by uqs): Spelling fixes for share/ Modified: stable/9/share/doc/IPv6/IMPLEMENTATION stable/9/share/termcap/termcap.src Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/doc/ (props changed) stable/9/share/termcap/ (props changed) Modified: stable/9/share/doc/IPv6/IMPLEMENTATION ============================================================================== --- stable/9/share/doc/IPv6/IMPLEMENTATION Sun Jan 11 19:15:28 2015 (r277016) +++ stable/9/share/doc/IPv6/IMPLEMENTATION Sun Jan 11 19:28:37 2015 (r277017) @@ -1404,7 +1404,7 @@ both definitions. As an userland progra dealing with it is to: (1) ensure ss_family and/or ss_len are available on the platform, by using GNU autoconf, -(2) have -Dss_family=__ss_family to unify all occurences (including header +(2) have -Dss_family=__ss_family to unify all occurrences (including header file) into __ss_family, or (3) never touch __ss_family. cast to sockaddr * and use sa_family like: struct sockaddr_storage ss; @@ -1414,7 +1414,7 @@ dealing with it is to: Some of IPv6 transition technologies embed IPv4 address into IPv6 address. These specifications themselves are fine, however, there can be certain -set of attacks enabled by these specifications. Recent speicifcation +set of attacks enabled by these specifications. Recent specification documents covers up those issues, however, there are already-published RFCs that does not have protection against those (like using source address of ::ffff:127.0.0.1 to bypass "reject packet from remote" filter). @@ -1441,7 +1441,7 @@ compatible is very rare. You should tak If we see IPv6 packets with IPv4 mapped address (::ffff:0.0.0.0/96) in the header in dual-stack environment (not in SIIT environment), they indicate -that someone is trying to inpersonate IPv4 peer. The packet should be dropped. +that someone is trying to impersonate IPv4 peer. The packet should be dropped. IPv6 specifications do not talk very much about IPv6 unspecified address (::) in the IPv6 source address field. Clarification is in progress. @@ -1456,10 +1456,10 @@ Here are couple of comments: - The following examples are seemingly illegal. It seems that there's general consensus among ipngwg for those. (1) Mobile IPv6 home address option, (2) offlink packets (so routers should not forward them). - KAME implmements (2) already. + KAME implements (2) already. KAME code is carefully written to avoid such incidents. More specifically, -KAME kernel will reject packets with certain source/dstination address in IPv6 +KAME kernel will reject packets with certain source/destination address in IPv6 base header, or IPv6 routing header. Also, KAME default configuration file is written carefully, to avoid those attacks. @@ -1552,7 +1552,7 @@ KAME implementation treats them as follo 1.17 DNS resolver KAME ships with modified DNS resolver, in libinet6.a. -libinet6.a has a comple of extensions against libc DNS resolver: +libinet6.a has a couple of extensions against libc DNS resolver: - Can take "options insecure1" and "options insecure2" in /etc/resolv.conf, which toggles RES_INSECURE[12] option flag bit. - EDNS0 receive buffer size notification support. It can be enabled by @@ -1870,7 +1870,7 @@ Tunnel mode works basically fine, but co - Path MTU discovery does not work across IPv6 IPsec tunnel gateway due to insufficient code. -AH specificaton does not talk much about "multiple AH on a packet" case. +AH specification does not talk much about "multiple AH on a packet" case. We incrementally compute AH checksum, from inside to outside. Also, we treat inner AH to be immutable. For example, if we are to create the following packet: @@ -1890,8 +1890,8 @@ to randomly pad packets shorter than N b or equal to N. Note that N does not include ESP authentication data length. Also note that the random padding is not included in TCP segment size computation. Negative value will turn off the functionality. -Recommeded value for N is like 128, or 256. If you use a too big number -as N, you may experience inefficiency due to fragmented packtes. +Recommended value for N is like 128, or 256. If you use a too big number +as N, you may experience inefficiency due to fragmented packets. 4.4 IPComp handling @@ -2097,7 +2097,7 @@ RFC2401 defines IPsec tunnel mode, withi defines tunnel mode packet encapsulation/decapsulation on its own, and does not refer other tunnelling specifications. Since RFC2401 advocates filter-based SPD database matches, it would be natural for us to implement -IPsec IPsec tunnel mode as filters - not as pseudo interfaces. +IPsec tunnel mode as filters - not as pseudo interfaces. There are some people who are trying to separate IPsec "tunnel mode" from the IPsec itself. They would like to implement IPsec transport mode only, @@ -2110,7 +2110,7 @@ interpretation. The KAME stack implements can be configured in two ways. You may need to recompile your kernel to switch the behavior. -- RFC2401 IPsec tunnel mode appraoch (4.8.1) +- RFC2401 IPsec tunnel mode approach (4.8.1) - draft-touch-ipsec-vpn approach (4.8.2) Works in all kernel configuration, but racoon(8) may not interoperate. @@ -2226,7 +2226,7 @@ ALTQ occupies single character device nu allocated. For OpenBSD and NetBSD, we use the number which is not currently allocated (will eventually get an official number). The character device is enabled for i386 architecture only. To enable and -compile ALTQ-ready kernel for other archititectures, take the following steps: +compile ALTQ-ready kernel for other architectures, take the following steps: - assume that your architecture is FOOBAA. - modify sys/arch/FOOBAA/FOOBAA/conf.c (or somewhere that defines cdevsw), to include a line for ALTQ. look at sys/arch/i386/i386/conf.c for @@ -2243,7 +2243,7 @@ compile ALTQ-ready kernel for other arch 6.1 KAME node as correspondent node Default installation recognizes home address option (in destination -options header). No sub-options are supported. interaction with +options header). No sub-options are supported. Interaction with IPsec, and/or 2292bis API, needs further study. 6.2 KAME node as home agent/mobile node @@ -2262,7 +2262,7 @@ are other implementations available: The KAME developers basically do not make a bother about coding style. However, there is still some agreement on the style, in order -to make the distributed develoment smooth. +to make the distributed development smooth. - follow *BSD KNF where possible. note: there are multiple KNF standards. - the tab character should be 8 columns wide (tabstops are at 8, 16, 24, ... @@ -2291,13 +2291,13 @@ to make the distributed develoment smoot where "(dollar)" is the dollar character ($), and around "$" are tabs. (this is for C. For other language, you should use its own comment line.) - Once commited to the CVS repository, this line will contain its + Once committed to the CVS repository, this line will contain its version number (see, for example, at the top of this file). This would make it easy to report a bug. - when creating a new file with the WIDE copyright, tap "make copyright.c" at the top-level, and use copyright.c as a template. KAME RCS tag will be included automatically. -- when editting a third-party package, keep its own coding style as +- when editing a third-party package, keep its own coding style as much as possible, even if the style does not follow the items above. - it is recommended to always wrap an expression containing bitwise operators by parentheses, especially when the expression is @@ -2384,7 +2384,7 @@ is free of IPR infringement, you MUST ch KAME into your product (or whatever): READ CAREFULLY: Several countries have legal enforcement for export/import/use of cryptographic software. Check it before playing - with the kit. We do not intend to be your legalease clearing house + with the kit. We do not intend to be your legalese clearing house (NO WARRANTY). If you intend to include KAME stack into your product, you'll need to check if the licenses on each file fit your situations, and/or possible intellectual property right issues. Modified: stable/9/share/termcap/termcap.src ============================================================================== --- stable/9/share/termcap/termcap.src Sun Jan 11 19:15:28 2015 (r277016) +++ stable/9/share/termcap/termcap.src Sun Jan 11 19:28:37 2015 (r277017) @@ -4409,11 +4409,11 @@ yterm10|yterm 1.0 UCB ascii.kbd:\ :ku=^K:kd=^J:kl=^H:kr=^L:kh=^^:ma=^Hh\012j^Kk^Ll^^H:\ :k0=\E0:k1=\E1:k2=\E2:k3=\E3:k4=\E4:k5=\E5:k6=\E6:k7=\E7:k8=\E8:k9=\E9:\ :vs=^O\E[7i\E[m\E[?7h\E[?3g\r\EHY0 \EH \EH \EH \EH \EH \EH \EH \EH \EH\r: -# YTERM varient version 1.1. (gts 9-13-84) Version 1.1 has :xn:. +# YTERM variant version 1.1. (gts 9-13-84) Version 1.1 has :xn:. yterm11|yterm 1.1 UCB ascii.kbd:\ :xn:is=^O\E[7i\E[m\E[?7h\E[?3g\r\EHY1 for \EHYTERM 1.\EH1 with A\EHSCII.KBD\EH 9-13-84\EH \EH \EH \EH \EH\n:\ :tc=yterm10: -# YTERM 1.0 varient no autowrap or tabs +# YTERM 1.0 variant no autowrap or tabs # X does not remember autowrap or tabs when T is deleted and restarted. yterm10nat|yterm 1.0 UCB ascii.kbd no autowrap or tabs:\ :am@:pt@:vs=^O\E[7i\E[m\E[?7l\E[?3g\rY2\r:\ @@ -4475,7 +4475,7 @@ h19k|h19kermit|heathkit emulation provid :am@:ta@:pt@:xt:da:db:tc=h19-u: # Amiga termcap by Kent Polk, kent@swrinde.nde.swri.edu (30 May 90) # Added a few more entries, converted caret-type control sequence (^x) entries -# to '\0xx' entries since a couple of people mentioned loosing '^x' sequences. +# to '\0xx' entries since a couple of people mentioned losing '^x' sequences. # # :as, :ae Support for alternate character sets. # :ve=\E[\040p:vi=\E[\060\040p cursor visible/invisible. From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 20:04:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B18F0CA5; Sun, 11 Jan 2015 20:04:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E06AAF0; Sun, 11 Jan 2015 20:04:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BK4anF018041; Sun, 11 Jan 2015 20:04:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BK4ago018040; Sun, 11 Jan 2015 20:04:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501112004.t0BK4ago018040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 20:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277019 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:04:36 -0000 Author: gjb Date: Sun Jan 11 20:04:35 2015 New Revision: 277019 URL: https://svnweb.freebsd.org/changeset/base/277019 Log: Document r271539, bsdinstall(8) parition editor and sade(8) now support ZFS natively. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:41:52 2015 (r277018) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 20:04:35 2015 (r277019) @@ -681,6 +681,10 @@ updated to use the new &man.dpv.3; library to display progress when extracting the &os; distributions. + The &man.bsdinstall.8; partition editor + and &man.sade.8; utility have been updated to include native + ZFS support. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 20:07:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41ADDE0B; Sun, 11 Jan 2015 20:07:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E47BB0D; Sun, 11 Jan 2015 20:07:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BK78hd018410; Sun, 11 Jan 2015 20:07:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BK78lK018409; Sun, 11 Jan 2015 20:07:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501112007.t0BK78lK018409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 20:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277020 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:07:08 -0000 Author: gjb Date: Sun Jan 11 20:07:07 2015 New Revision: 277020 URL: https://svnweb.freebsd.org/changeset/base/277020 Log: Fix ordering by SVN revision. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 20:04:35 2015 (r277019) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 20:07:07 2015 (r277020) @@ -578,6 +578,10 @@ Support for adding empty partitions has been added to the &man.mkimg.1; utility. + The &man.bsdinstall.8; partition editor + and &man.sade.8; utility have been updated to include native + ZFS support. + The &man.primes.6; utility has been updated to correctly enumerate prime numbers between 4295098369 and @@ -681,10 +685,6 @@ updated to use the new &man.dpv.3; library to display progress when extracting the &os; distributions. - The &man.bsdinstall.8; partition editor - and &man.sade.8; utility have been updated to include native - ZFS support. - <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 20:22:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4659479; Sun, 11 Jan 2015 20:22:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F3ECCD7; Sun, 11 Jan 2015 20:22:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BKMDJ5027349; Sun, 11 Jan 2015 20:22:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKMCoq027342; Sun, 11 Jan 2015 20:22:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501112022.t0BKMCoq027342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 11 Jan 2015 20:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277022 - stable/9/share/termcap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:22:13 -0000 Author: ngie Date: Sun Jan 11 20:22:12 2015 New Revision: 277022 URL: https://svnweb.freebsd.org/changeset/base/277022 Log: MFC r276991: MFC r275687,r275692: Relnotes: yes r275687: Remove termcap entry reordering; install the file verbatim instead termcap entry reordering requires ex (which is available via usr.bin/vi), which breaks on build hosts where installworld is run with MK_VI == no (or when make delete-old is run on ^/projects/building-blocks as vi, et al, are removed on the branch when the knob is tweaked to => "no") Reordering termcap was believed to improve performance, but the file is now accessed via /etc/termcap.db, so /etc/termcap (and /usr/share/misc/termcap by proxy) access is less preferred. Reordering the file broke the historical comment <-> entry mapping as well, which could muddle the purpose of entries in the file, so it could be potentially harmful to readers in its reordered state. Discussion took place on hackers@ here: https://lists.freebsd.org/pipermail/freebsd-hackers/2014-December/046657.html Discussed with: -hackers, mp Sponsored by: EMC / Isilon Storage Division r275692: Fix building termcap.db when make obj is run beforehand from a clean tree by using make variables for the filenames, which helps resolve pathing appropriately when running cap_mkdb Pointyhat to: me Added: stable/9/share/termcap/termcap - copied unchanged from r276991, stable/10/share/termcap/termcap Deleted: stable/9/share/termcap/reorder stable/9/share/termcap/termcap.src Modified: stable/9/share/termcap/Makefile stable/9/share/termcap/README Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/termcap/ (props changed) Modified: stable/9/share/termcap/Makefile ============================================================================== --- stable/9/share/termcap/Makefile Sun Jan 11 20:16:14 2015 (r277021) +++ stable/9/share/termcap/Makefile Sun Jan 11 20:22:12 2015 (r277022) @@ -9,10 +9,7 @@ MAN= termcap.5 FILES= termcap termcap.db FILESDIR= ${BINDIR}/misc -CLEANFILES+= termcap termcap.db - -termcap: reorder termcap.src - TERM=dumb TERMCAP=dumb: ex - ${.CURDIR}/termcap.src < ${.CURDIR}/reorder +CLEANFILES+= termcap.db .include .if ${TARGET_ENDIANNESS} == "1234" @@ -24,7 +21,7 @@ CAP_MKDB_ENDIAN= .endif termcap.db: termcap - cap_mkdb ${CAP_MKDB_ENDIAN} termcap + cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} etc-termcap: ln -fs ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap Modified: stable/9/share/termcap/README ============================================================================== --- stable/9/share/termcap/README Sun Jan 11 20:16:14 2015 (r277021) +++ stable/9/share/termcap/README Sun Jan 11 20:22:12 2015 (r277022) @@ -1,4 +1,6 @@ # @(#)README 8.1 (Berkeley) 6/8/93 +# +# $FreeBSD$ << 12 May 1983 >> To install this directory on your system: @@ -19,7 +21,7 @@ common and really should go near the fro Third, if you are not a super user and cannot create the directory /usr/lib/tabset, make a corresponding directory somewhere you can and add a line to reorder to globally change all /usr/lib/tabset's to your own -path name. This change is better than just changing the termcap.src file +path name. This change is better than just changing the termcap file because it makes it easier to diff it from newer distributed versions. Try to keep the source as is whenever possible, and put mungings into reorder. Copied: stable/9/share/termcap/termcap (from r276991, stable/10/share/termcap/termcap) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/termcap/termcap Sun Jan 11 20:22:12 2015 (r277022, copy of r276991, stable/10/share/termcap/termcap) @@ -0,0 +1,4667 @@ +# Copyright (c) 1980, 1985, 1989, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)termcap.src 8.2 (Berkeley) 11/17/93 +# $FreeBSD$ + +# Termcap source file +# John Kunze, Berkeley +# Craig Leres, Berkeley +# +# Please submit changes via https://bugs.freebsd.org/submit/ +# +# << EOH - after reordering, above header lines survive and this line dies >> +# +# DESCRIPTION: +# This file describes capabilities of various terminals, as needed by +# software such as screen editors. It does not attempt to describe +# printing terminals very well, nor graphics terminals. Someday. +# See termcap(5) in the Unix Programmers Manual for documentation. +# +# Conventions: First entry is canonical name for model or mode, last entry +# is verbose description. Others are mnemonic synonyms for the terminal. +# +# Terminal naming conventions: +# Terminal names look like - +# Certain abbreviations (e.g. c100 for concept100) are also allowed +# for upward compatibility. The part to the left of the dash, if a +# dash is present, describes the particular hardware of the terminal. +# The part to the right can be used for flags indicating special ROM's, +# extra memory, particular terminal modes, or user preferences. +# All names should be in lower case, for consistency in typing. +# +# The following are conventionally used flags: +# rv Terminal in reverse video mode (black on white) +# 2p Has two pages of memory. Likewise 4p, 8p, etc. +# w Wide - in 132 column mode. +# pp Has a printer port which is used. +# na No arrow keys - termcap ignores arrow keys which are +# actually there on the terminal, so the user can use +# the arrow keys locally. +# +# To easily test a new terminal description, put it in $HOME/.termcap +# and programs will look there before looking in /etc/termcap. +# You can also setenv TERMPATH to a list of full pathnames (separated +# by spaces or colons) to be searched by tgetent() in the order listed. +# The TERMCAP environment variable is usually set to the termcap +# entry itself to avoid reading files when starting up a program. +# +# If you absolutely MUST check for a specific terminal (this is discouraged) +# check for the 2nd entry (the canonical form) since all other codes are +# subject to change. We would much rather put in special capabilities +# to describe your terminal than have you key on the name. +# +# Special manufacturer codes: +# A: hardcopy daisy wheel terminals +# M: Misc. (with only a few terminals) +# q: Homemade +# s: special (dialup, etc.) +# +# Comments in this file begin with # - they cannot appear in the middle +# of a termcap entry. Individual entries are commented out by +# placing a period between the colon and the capability name. +# +# To add a termcap entry under FreeBSD for a new terminal type, insert +# the entry in the appropriate location in /etc/termcap then issue this +# command: +# +# cap_mkdb -f /usr/share/misc/termcap /etc/termcap +# +# Terminfo source entries can be converted to termcap entries with the +# tic program that is part of the ncurses distribution, see the ports +# section. +# +# +# This file is to be installed with an editor script (reorder) +# that moves the most common terminals to the front of the file. +# # -------------------------------- +# +# A: DAISY WHEEL PRINTERS +# +# The A manufacturer represents Diablo, DTC, Xerox, Qume, and other Daisy +# wheel terminals until such time as termcap distinguishes between them +# enough to justify separate codes. +# This is an "experimental" entry for the SRI Agiles. +# It has been tried in a minimal way -- the Agile did not blow up! +# However, it has not been exhaustively tested. +# Anyone who tries it and finds it wanting should get in touch with: +# Ralph Keirstead (ralph@sri-unix); +# EK352; SRI International; 333 Ravenswood Avenue; Menlo Park, CA 94025 +agile|agiles|sri agiles:\ + :bs:hc:os:pl:co#132:do=^J:kb=^H:up=\E\n:\ + :hu=\E0:hd=\E9:if=/usr/share/tabset/std:is=\EE\EF\EJ: +1620|1720|450|ipsi|diablo 1620:\ + :do=^J:ct=\E2:st=\E1:ch=\E\t%i%.:\ + :if=/usr/share/tabset/xerox1720:\ + :kb=^H:le=^H:bs:co#132:hc:hu=\EU:hd=\ED:os:pt:up=\E\n: +1620-m8|1640-m8|diablo 1620 w/8 column left margin:\ + :do=^J:co#124:is=\r \E9:tc=1620: +1640|1740|630|1730|x1700|diablo|xerox|diablo 1640:\ + :if=/usr/share/tabset/xerox1730:\ + :us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620: +1640-lm|1740-lm|630-lm|1730-lm|x1700-lm|diablo-lm|xerox-lm|\ + diablo 1640 with indented left margin:\ + :if=/usr/share/tabset/xerox1730-lm:\ + :co#124:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620: +# DTC 382 with VDU. Has no cd so we fake it with ce. Standout works but +# won't go away without dynamite. The terminal has tabs, but I'm getting +# tired of fighting the braindamage. If no tab is set or the terminal's +# in a bad mood, it glitches the screen around all of memory. Note that +# return puts a blank ("a return character") in the space the cursor was +# at, so we use ^P return (and thus ^P newline for newline). Note also +# that if you turn off pt and let Unix expand tabs, curses won't work +# (current version) because it doesn't turn off this bit, and cursor +# addressing sends a tab for row/column 9. What a losing terminal! I +# have been unable to get tabs set in all 96 lines - it always leaves at +# least one line with no tabs in it, and once you tab through that line, +# it completely weirds out. +dtc|ps|dtc382|382:\ + :do=^J:al=^P^Z:am:le=^H:\ + :bs:co#80:ce=^P^U:cl=20^P^]:cm=%r^P^Q%.%.:dc=^X:\ + :dl=^P^S:ei=^Pi:ho=^P^R:im=^PI:ve=^Pb:vs=^PB:pc=\177:te=20^P^]:\ + :li#24:nd=^PR:.se=^P \200:.so=^P \002^PF:us=^P \020:ue=^P \200:\ + :up=^P^L:nc:xr:xs:da:db:.pt:cr=^P^M:cd=^P^U^P^S^P^S:\ + :if=/usr/share/tabset/dtc382: +dtc300s|300|300s|dtc 300s:\ + :ct=\E3:st=\E1:do=^J:\ + :kb=^h:le=^H:bs:co#132:hc:hu=\EH:hd=\Eh:os:pt:up=^Z: +gsi:\ + :le=^H:bs:co#132:hc:hd=\Eh:hu=\EH:os:pt:up=^Z:do=^J: +# This used to have :pl: - maybe they meant :pt:? +aj830|aj832|aj|anderson jacobson:\ + :do=^J:le=^H:bs:hc:hd=\E9:hu=\E8:os:up=\E7: +# From Chris Torek Thu, 7 Nov 85 18:21:58 EST +aj510|AJ510|Anderson-Jacobson model 510:\ + :ip=.1*:so=\E"I:us=\E"U:cd=\E'P:ce=\E'L:cl=^L:cm=\E#%+ %+ :\ + :dl=2*\E&D:ue=\E"U:co#80:li#24:se=\E"I:al=2*\E&I:im=\E'I:ei=\E'J:\ + :dc=.1*\E'D:up=\EY:nd=\EX:bs:am:mi:ti=\E"N:te=\E"N:\ + :ku=\EY:kd=\EZ:kl=\EW:kr=\EX:pc=\177: +# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981 +# This is incomplete, but it's a start. +5520|nec|spinwriter|nec 5520:\ + :ct=\E3:st=\E1:do=^J:kb=^h:le=^H:bs:co#132:hc:hu=\E]s\E9\E]W:\ + :hd=\E]s\n\E]W:os:pt:up=\E9: +qume5|qume|Qume Sprint 5:\ + :ct=\E3:st=\E1:do=^J:\ + :kb=^h:le=^H:bs:co#80:hc:hu=\EH:hd=\Eh:os:pt:up=^Z: +q102|qume102|Qume 102:\ + :al=\EE:am:bs:bt=\EI:\ + :cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:ct=\E3:\ + :dc=\EW:dl=\ER:do=^J:ho=^^:ic=\EQ:\ + :k0=^A@\r:k1=^AA\r:k2=^AB\r:k3=^AC\r:kd=^J:kl=^H:kr=^L:ku=^K:\ + :le=^H:li#24:ma=^K^P^L :nd=^L:\ + :se=\EG0:sg#1:so=\EG4:st=\E1:\ + :ue=\EG0:ug#1:up=^K:us=\EG8: +# From ucbvax!mtxinu!sybase!tim (Tim Wood) Fri Sep 27 10:25:24 PDT 1985 +# This entry supports line and character insert and delete, scroll up and +# down and the arrow keys. To use it, perform the following on your qvt-101 +# 1) enter SET-UP mode, select the SET 3 line; +# 2) move the cursor to the EMULATION item and hit SPACE +# until QVT-101B appears +# 3) enter SHIFT-S +# 4) exit SET-UP - the terminal is now configured +q101|qvt101|qvt-101|Qume 101 $310 special:\ + :al=\EE:am:bt=\EI:ce=\Et:cl=\E*:dc=\EW:\ + :dl=\ER:do=^J:ic=\EQ:md=\E(:me=\EG0:mh=\E):\ + :le=^H:bs:cm=\E=%+ %+ :cl=1^Z:co#80:ho=^^:li#24:ma=^K^P:nd=^L:ku=^K:\ + :vs=\EM4\040\200\200\200:mr=\EG4:ms:so=\EG4:se=\EG1: +# I suspect the xerox1720 is the same as the diablo 1620. +x1720|1700|x1750|xerox 1720:\ + :co#132:le=^H:bs:hc:os:pt:do=^J:ct=\E2:st=\E1: +# # -------------------------------- +# +# B: AT&T ATT +# +# AT&T Teletype 5410 Terminal (a.k.a. 4410) +# From: carvalho%kepler@Berkeley.EDU (Marcio de Carvalho) +# Date: Thu, 26 Feb 87 09:16:50 PST +# +# Although the 5410 supports labels, it blanks the screen after +# each label is programmed creating to much visual activity. +# To use the labels, use FL=\E[%d;00q%-16s +# +5410|4410|tty5410|att4410|AT&T Teletype 5410 terminal with 80 columns:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\ + :cm=5\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:ic=\E[@:\ + :kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\ + :li#24:nd=\E[C:se=\E[m:so=\E[2;7m:sr=\EM:\ + :ue=\E[m:up=\E[A:us=\E[4m:EE=\E[m:BO=\E[0;7m:DS=\E[2m:\ + :KM=/usr/lib/ua/kmap.5410:is=\E[0m^O\E[?6l:kn#8:\ + :k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k4=\EOg:k6=\EOh:\ + :k7=\EOi:k8=\EOj:ko=nd,up,ho: +# AT&T 630 MTG DMD from muller%sdcc7@ucsd.edu (Keith Muller) +att630|dmd630|ATT630|630DMD|630dmd|630MTG|AT&T 630 windowing terminal:\ + :am:da:db:ms:bs:co#80:it#8:li#60:lm#0:\ + :up=\E[A:do=\E[B:nd=\E[C:le=\b:UP=\E[%dA:DO=\E[%dB:RI=\E[%dC:\ + :LE=\E[%dD:cm=\E[%i%d;%dH:ho=\E[H:bt=\E[Z:\ + :sf=\n:sr=\EM:SF=\E[%dS:SR=\E[%dT:us=\E[4m:ue=\E[m:so=\E[7m:se=\E[m:\ + :mr=\E[7m:mh=\E[2m:mb=\E[5m:me=\E[m:ce=\E[K:cd=\E[J:cl=\E[H\E[J:\ + :dc=\E[P:dl=\E[M:al=\E[L:DC=\E[%dP:DL=\E[%dM:AL=\E[%dL:\ + :ic=\E[@:IC=\E[%d@:sc=\E7:rc=\E8:i2=\E[m:rs=\Ec:\ + :pf=\E[?4i:po=\E[?5i:\ + :kb=\b:kC=\E[2J:kh=\E[H:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D: +dmd630-24|att630-24|ATT630-24|630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines:\ + :li#24:tc=att630: +dmd615|att615|ATT615|615DMD|615MTG|AT&T 615 windowing terminal 80 column:\ + :li#24:tc=att630: +dmd615-w|att615-w|ATT615-w|615DMD-w|615MTG-w|AT&T 615 windowing terminal 132 column:\ + :li#24:co#132:tc=att630: +dmd620|att620|ATT620|620DMD|620MTG|AT&T 620 windowing terminal 80 column:\ + :li#24:tc=att630: +dmd620-w|att620-w|ATT620-w|620DMD-w|620MTG-w|AT&T 620 windowing terminal 132 column:\ + :li#24:co#132:tc=att630: +# AT&T Teletype 5420 Terminal (a.k.a. 4415) June 5, 1985 +5420|4415|tty5420|att4415|AT&T Teletype 5420 terminal:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\ + :cm=\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:im=\E[4h:ei=\E[4l:\ + :kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\ + :li#24:nd=\E[C:se=\E[m:so=\E[2;7m:sr=\EM:\ + :ue=\E[m:up=\E[A:us=\E[4m:EE=\E[m:BO=\E[0;7m:DS=\E[2m:\ + :KM=/usr/lib/ua/kmap.5420:\ + :is=\E[0m^O\E[1;2;3;4;6l\E[12;13;14;20l\E[?6;97;99l\E[?7h\E[4i\Ex\E[25;1j\212\E[8;0j\E[9;0j\E[10;0j\E[19;1j:\ + :db:mi:pt:kn#8:k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k5=\EOg:k6=\EOh:\ + :k7=\EOi:k8=\EOj:ve=\E[11;0j:\ + :vs=\E[11;1j:ko=bt,nd,up,dc,dl,ho,im,al: +# AT&T Teletype 5425 Terminal (a.k.a 4425) June 5, 1985 +5425|4425|tty5425|att4425|AT&T Teletype 5425:\ + :FL=\E[%d;00q%-16s\E~:FE=\E|:KM=/usr/lib/ua/kmap.5425:\ + :is=\E[0m^O\E[1;2;3;4;6l\E[12;13;14;20l\E[?6l\E[?7h\E[4i\E[9;0j\E[10;0j\E[11;0j\E[21;1j\E[25;1j\212:\ + :ve=\E[12;0j:vs=\E[12;1j:tc=5420: +t4|4420|tty4420|Teletype 4420:\ + :vs=\ER:ve=\ER:am:da:db:mi:cr=\EG:\ + :nl=\EG\EB:li#23:\ + :co#80:cl=\EH\EJ:cd=\EJ:cm=\EY%+ %+ :\ + :bs:up=\E7:do=\EB:nd=\EC:al=\EL:\ + :dl=\EM:dc=\EP:ic=\E\136:sf=\EH\EM\EY5 :sr=\ET:kb=^H: +pc6300plus|6300|6300plus:\ + :al=\E[1L:am:bs:cd=\E[0J:ce=\E[0K:cl=\E[2J\E[H:cm=\E[%i%2;%2H:co#80:\ + :dc=\E[1P:dl=\E[1M:do=\E[B:ho=\E[H:\ + :ic=\E[1@:kb=\10:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:li#24:\ + :k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k5=\EOg:k6=\EOh:k7=\EOi:k8=\EOj:\ + :k9=\EOk:k10=\EOu:nd=\E[C:se=\E[m:so=\E[7m:ue=\E[m:up=\E[A:us=\E[4m:\ + :EE=\E[m:BO=\E[0;7m:CV=\E[=C:CI=\E[=1C:KM=/usr/lib/ua/kmap.s5: +# AT&T 6386 decompiled and hacked from SVR3.1 terminfo +# From: caron@polya.Stanford.EDU (Ilan G. Caron) +# Problems: (1) The mode lines are screwed up - they're not in standout +# (an extraneous ESC-RD sequence is prepended to each mode line). +# (2) Cursor addressing into the mode line is often off-by-one, +# in particular, when the percentage indicator is updated. +# (3) When reverting to a single window (C-x 1), the display +# needs refreshing (an extraneous ESC-S seems to be generated). +# (The above 3 might be manifestations of the same problem). +# (4) Deletes sometime don't, especially when done fast - does this +# suggest that I need to pad something? +AT386|at386|386AT|386at|at/386 console:\ + :am:bw:eo:xo:Co#8:NC#3:co#80:li#25:pa#64:kn#6:\ + :@7=\E[Y:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:\ + :F1=\EOZ:F2=\EOA:IC=\E[%d@:LE=\E[%dD:RI=\E[%dC:\ + :SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\ + :ac=``a1fxgqh0jYk?lZm@nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~:\ + :ae=\E[10m:al=\E[1L:as=\E[12m:bl=^G:cd=\E[J:ce=\E[K:\ + :cl=\E[2J\E[H:cm=\E[%i%2;%2H:cr=\r:dc=\E[P:dl=\E[1M:\ + :do=\E[B:ho=\E[H:ic=\E[1@:is=\E[0;10;39m:k1=\EOP:\ + :k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:k6=\EOU:k7=\EOV:\ + :k8=\EOW:k9=\EOX:k;=\EOY:kB=^]:kC=\E[2J:kD=\E[P:\ + :kI=\E[@:kM=\E0:kN=\E[U:kP=\E[V:kb=\b:kd=\E[B:kh=\E[H:\ + :kl=\E[D:kr=\E[C:ku=\E[A:le=\E[D:mb=\E[5m:md=\E[1m:\ + :me=\E[0;10m:mk=\E[9m:mr=\E[7m:nd=\E[C:op=\E[0m:\ + :se=\E[m:sf=\E[S:so=\E[43;30m:ta=\t:ue=\E[m:up=\E[A:\ + :sr=\E[T:TC=\E[%d@:IC=\E[%d@:\ + :us=\E[4m:vb=^G:bc=\E[D: +s4|PC7300|unixpc|pc7300|7300|3b1|Safari 4:\ + :so=\E[2;7m:DS=\E[2m:XS=\E[9m:KM=/usr/lib/ua/kmap.s4:tc=pc6300plus: +# AT&T Teletype 610 Terminal +b610|610|610bct|tty610:\ + :CV=\E[25h:CI=\E[25l:KM=/usr/lib/ua/kmap.s4:\ + :FL=\E[%d;00q%-16s\E[0p:FE=\E[2p:cl=\E[1;1H\E[J:\ + :is=\E[0m^O\E[25;1|^J\E[8;0|\E[4;13;20l\E[?5l\E[12h\E[?7h\E[?4i:\ + :ve=\E[?12l:vs=\E[?12h:tc=5420: +# # -------------------------------- +# +# C: CONTROL DATA +# +cdc456|cdc:\ + :do=^J:li#24:co#80:cl=^Y^X:nd=^L:up=^Z:le=^H:bs:\ + :cm=\E1%+ %+ :ho=^Y:al=\E\114:dl=\E\112:ce=^V:cd=^X:am: +cdc456tst:\ + :do=^J:li#24:co#80:cl=^y^x:le=^H:bs:cm=\E1%+ %+ :am: +# # -------------------------------- +# +# D: DATAMEDIA +# +dm1520|dm1521|1521|1520|datamedia 1520:\ + :do=^J:am:le=^H:bs:cd=^K:ce=^]:cl=^L:cm=^^%r%+ %+ :co#80:ho=^Y:\ + :ku=^_:kd=^J:kl=^H:kr=^\:kh=^Y:\ + :li#24:nd=^\:up=^_:xn:ma=^\ ^_^P^YH:pt: +dm2500|datamedia2500|2500|datamedia 2500:\ + :do=^J:al=15^P\n^X^]^X^]:le=^H:bs:ce=^W:cl=^^^^\177:\ + :cm=^L%r%n%.%.:co#80:dc=10*^P\b^X^]:dl=10*^P^Z^X^]:\ + :dm=^P:ed=^X^]:ei=10\377\377^X^]:ho=^B:ic=10*^P^\^X^]:\ + :im=^P:li#24:nc:nd=^\:pc=\377:so@=^N:se=^X^]:up=^Z: +dm3025|datamedia 3025a:\ + :MT:is=\EQ\EU\EV:do=^J:\ + :al=130\EP\n\EQ:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :\ + :co#80:dc=6\b:dl=130\EP\EA\EQ:dm=\EP:ed=\EQ:ei=\EQ:ho=\EH:\ + :im=\EP:ip=6:li#24:nd=\EC:pt:so=\EO1:se=\EO0:up=\EA: +3045|dm3045|datamedia 3045a:\ + :is=\EU\EV:do=^J:\ + :am:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :co#80:\ + :dc=6\EB:ei=\EP:ho=\EH:im=\EP:ip=6:\ + :k0=\Ey\r:k1=\Ep\r:k2=\Eq\r:k3=\Er\r:k4=\Es\r:\ + :k5=\Et\r:k6=\Eu\r:k7=\Ev\r:k8=\Ew\r:k9=\Ex\r:\ + :kh=\EH:ku=\EA:kr=\EC:li#24:nd=\EC:pc=\177:pt:eo:ul:up=\EA:xn: +# dt80/1 is a vt100 lookalike, but it doesn't seem to need any padding. +dt80|dmdt80|dm80|datamedia dt80/1:\ + :do=^J:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=%i\E[%d;%dH:ho=\E[H:\ + :nd=\E[C:sr=\EM:so=\E[7m:se=\E[m:up=\E[A:us=\E[4m:ue=\E[m:tc=vt100: +# except in 132 column mode, where it needs a little padding. +# This is still less padding than the vt100, and you can always turn on +# the ^S/^Q handshaking, so you can use vt100 flavors for things like +# reverse video. +dt80w|dmdt80w|dm80w|datamedia dt80/1 in 132 char mode:\ + :do=^J:cd=20\E[0J:co#132:ce=20\E[0K:\ + :cm=5\E[%i%d;%dH:cl=50\E[H\E[2J:up=5\E[A:tc=dmdt80: +# # -------------------------------- +# +# H: HAZELTINE +# +# Since nd is blank, when you want to erase something you +# are out of luck. You will have to do ^L's a lot to +# redraw the screen. h1000 is untested. It doesn't work in +# vi - this terminal is too dumb for even vi. (The code is +# there but it isn't debugged for this case.) +h1000|hazeltine 1000:\ + :le=^H:bs:ho=^K:cl=^L:nd= :co#80:li#12:do=^J: +# Note: the h1552 appears to be the first Hazeltine terminal which +# is not braindamaged. It has tildes and backprimes and everything! +# Be sure the auto lf/cr switch is set to cr. +h1552|hazeltine 1552:\ + :do=^J:al=\EE:dl=\EO:k1=\EP:l1=blue:k2=\EQ:\ + :l2=red:k3=\ER:l3=green:tc=vt52: +h1552rv|hazeltine 1552 reverse video:\ + :do=^J:so=\ES:se=\ET:tc=h1552: +# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981 +h1420|hazeltine 1420:\ + :do=^J:le=^H:bs:am:li#24:co#80:al=\E^Z:dl=\E^S:cd=\E^X:cl=\E\034:\ + :up=\E^L:nd=^P:ce=\E^O:ta=^N:cm=\E^Q%r%.%+ :so=\E\037:se=\E^Y: +# New "safe" cursor movement (11/87) from cgs@umd5. Prevents freakout with +# out-of-range args and tn3270. No hz since it needs to receive ~'s. +h1500|hazeltine 1500:\ + :al=40~^Z:am:bs:cd=10~^X:ce=~^O:cl=~^\:cm=~^Q%r%>^^ %+`%+`:\ + :co#80:dl=40~^S:do=~^K:ho=~^R:kh=~^R:kr=^P:ku=~^L:kd=^J:kl=^H:\ + :le=^H:li#24:nd=^P:so=~^_:se=~^Y:up=~^L:.cm=~^Q%r%.%.: +# h1510 assumed to be in sane escape mode. Else use h1500. +h1510|hazeltine 1510:\ + :do=^J:al=\E^Z:am:le=^H:bs:cd=\E^X:ce=\E^O:cl=\E^\:cm=\E^Q%r%.%.:\ + :co#80:dl=\E^S:do=\E^K:hz:li#24:nd=^P:.se=\E^_:.so=\E^Y:up=\E^L: +h1520|hazeltine 1520:\ + :do=^J:al=~^Z:am:le=^H:bs:cd=~^X:ce=~^O:cl=~\034:cm=~^Q%r%.%.\200:\ + :co#80:dl=~^S:do=~^K:hz:li#24:nd=^P:se=~^Y:so=~\037:up=~^L:ho=~^R: +# Note: h2000 won't work well because of a clash between upper case and ~'s. +h2000|hazeltine 2000:\ + :do=^J:al=6~^z:am:le=^H:bs:cl=6~^\:cm=~^q%r%.%.:co#74:\ + :dl=6~^s:ho=~^r:li#27:nc:pc=\177: +# Hazeltine esprit entries from Univ of Utah Tue Feb 1 06:39:37 1983 +# J.Lepreau, lepreau@utah-cs, harpo!utah-cs!lepreau +esprit|hazeltine esprit:\ + :al=40\E^Z:bs:cd=5\E^X:ce=\E^O:cl=\E^\:cm=\E^Q%r%>^^ %+`%+`:co#80:\ + :dl=40\E^S:do=\E^K:ho=\E^R:li#24:nd=^P:se=\E^Y:so=\E^_:up=\E^L: +esprit-am|hazeltine esprit auto-margin:\ + :am:tc=esprit: +# # -------------------------------- +# +# I: IBM +# +# ibm61 and ibm63 from Warren Gish (cswarren@violet.berkeley.edu). +# installed 12-17-86. +# 3161 only opens a new line if a null line exists on the screen. +# To ensure a null line exists, an SBA is performed, positioning the +# Buffer Address in column 0 of the last line. The last line is then +# cleared to nulls, BA mode is canceled, and the new line is opened +# at the cursor position. +ibm61|ibm3161|3161|IBM 3161-11:\ + :am:bs:bw:cl=\EL:li#24:co#80:cd=\EJ:al=\EX7 \EI\E Z\EN:\ + :ce=\EI:cm=\EY%+\040%+\040:nd=\EC:up=\EA:do=\EB:\ + :dl=\EO:dc=\EQ:kd=\EB:ku=\EA:kl=\ED:kr=\EC:kh=\EH:\ + :us=\E4\102:ue=\E4\100:so=\E4\110:se=\E4\100: +# From seth@sirius.ctr.columbia.edu Sun May 20 11:02:34 1990 +ibm3163|ibm63|i3163|3163|IBM 3163:\ + :al=\EN:am:bs:bt=\E2:cd=\EJ:ce=\EI:cl=\EL:\ + :cm=\EY%+\040%+\040:co#80:ct=\E 1:dc=\EQ:\ + :dl=\EO:do=\EB:ds=\E#\072:es:fs=\E=:ho=\EH:\ + :hs:ic=\EP:kA=\EN:kB=\E2:kC=\EQ:\ + :kD=\EQ:kE=\EI:kI=\EI:kL=\EO:kS=\EJ:\ + :kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:kh=\EH:\ + :le=\ED:li#24:mb=\E4D:md=\E4H:me=\E4@:\ + :mk=\E4P:mr=\E4A:nd=\EC:\ + :ds=\E#\::es:fs=\E=\E#;:hs:ts=\E=:ws#80:\ + :se=\E4@:so=\E4I:ue=\E4@:up=\EA:us=\E4B: +ibm|ibm3101|3101|i3101|IBM 3101-10:\ + :do=^J:ct=\EH:st=\E0:\ + :if=/usr/share/tabset/ibm3101:\ + :am:le=^H:bs:cl=\EK:li#24:co#80:nd=\EC:up=\EA:cd=\EJ:ce=\EI:\ + :kd=\EB:kl=\ED:kr=\EC:ku=\EA:ho=\EH:cm=\EY%+\40%+\40:pt: +ibm327-789|ibm-3277-2|ibm-3278-2|ibm-3278-3|ibm-3278-4|ibm-3278-5|ibm-3279-2|ibm-3279-3:\ + :tc=ibm327-56: +ibm327-56|ibm-3275-2|ibm-3276-2|ibm-3276-3|ibm-3276-4|line mode IBM 3270 style:\ + :gn:ce=\r:cl=\r\n:ho=\r: +ibm-apl|apl|IBM apl terminal simulator:\ + :li#25:tc=dm1520: +# ibmapa* and ibmmono entries come from ACIS 4.3 distribution +rtpc|ibmapa16|ibm6155|IBM 6155 Extended Monochrome Graphics Display:\ + :ts=\Ej\EY@%+ \Eo:ds=\Ej\EY@\40\EI\Ek:li#32:tc=ibmconsole: +# Advanced Monochrome (6153) and Color (6154) Graphics Display: +ibmapa8c|ibmapa8|ibm6154|ibm6153|IBM 6153/4 Advanced Graphics Display:\ + :ts=\Ej\EY?%+ \Eo:ds=\Ej\EY?\40\EI\Ek:li#31:tc=ibmconsole: +ibmapa8c-c|ibm6154-c|IBM 6154 Advanced Color Graphics Display color termcap:\ + :ts=\Ej\EY?%+ \Eo:ds=\Ej\EY?\40\EI\Ek:li#31:mh=\EF\Ef7;:tc=ibmega-c: +ibmmono|ibmconsole|ibm5151|IBM workstation monochrome:\ + :se=\Ez:so=\EZ:sr=\EA:al=\EL:dl=\EM:\ + :kb=^H:us=\EW:ue=\Ew:\ + :k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:k6=\EP:k7=\EQ:k8=\ER:k9=\EY:\ + :k0=\E<:I0=f10:kI=\000:kh=\EH:kR=\EG:kP=\Eg:kF=\EE:kN=\EE:\ + :md=\EZ:me=\Ew\Eq\Ez\EB:mk=\EF\Ef0;\Eb0;:mr=\Ep:\ + :ts=\Ej\EY8%+ \Eo:fs=\Ek:ds=\Ej\EY8\40\EI\Ek:es:hs:sb:tc=ibm3101: +ibmega-c|ibm5154-c|IBM Enhanced Color Display color termcap:\ + :se=\EB:so=\EF\Ef3;:ue=\EB:us=\EF\Ef2;:tc=ibmconsole: +# from marc pawliger--marc@ibminet.awdpa.ibm.com +# also in /usr/lpp/bos/bsdsysadmin. +hft-c|ibm8512|ibm8513|IBM High Function Terminal:\ + :co#80:li#25:am:ht:\ + :cm=\E[%i%d;%dH:ti=\E[20;4l\E[?7h\Eb:te=\E[20h:\ + :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\ + :ec=\E[%dX:\ + :cl=\E[H\E[J:cd=\E[J:el=\E[K:\ + :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\ + :im=\E[4h:ei=\E[4l:mi:\ + :dm=\E[4h:ed=\E[4l:\ + :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:ms:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ + :as=^N:ae=^O:sc=\E[s:rc=\E[u:\ + :kb=\E[D:kf=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\ + :k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\ + :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\ + :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J: +hft|AIWS High Function Terminal:\ + :al=\E[L:cr=^M:do=^J:sf=^J:bl=^G:am:le=^H:cd=\E[J:\ + :ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:co#80:li#25:\ + :dc=\E[P:dl=\E[M:ho=\E[H:\ + :ic=\E[@:im=\E6:ei=\E6:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:mk=\E[8m:me=\E[0m:\ + :ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:kh=\E[H:kb=^H:\ + :nd=\E[C:ta=^I:up=\E[A:xo:\ + :ue=\E[m:us=\E[4m:se=\E[m:so=\E[7m:\ + :kP=\E[159q:kN=\E[153q:\ + :k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:\ + :k5=\E[005q:k6=\E[006q:k7=\E[007q:k8=\E[008q:\ + :k9=\E[009q:ka=\E[010q: +# From pryor@math.berkeley.edu +ibm5081|ibmmpel|IBM 5081 1024x1024 256/4096 color display:\ + :ts=\Ej\EYA%+ \Eo:fs=\Ek:ds=\Ej\EYA\40\EI\Ek:es:hs:\ + :li#33:tc=ibmconsole: +ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 enhanced color display:\ + :ts=\Ej\EYA%+ \Eo:fs=\Ek:ds=\Ej\EYA\40\EI\Ek:es:hs:\ + :li#33:tc=ibmega-c: +# ibm3151 and ibm3151-25 are modified from a Usenet posting +# from http://www.cs.utk.edu/~shuford/terminal/ibm_3161.termcap.txt +# Newsgroups: comp.terminals Message-ID: <1rkqgnINNdso@uwm.edu> +ibm3151|ibm3152|ibm3162|Ibm3162|ibm3151-pc:\ + :am:mi:ms:\ + :co#80:li#24:kn#9:\ + :cd=\EJ:ce=\EI:cl=\EH\EJ:cm=\EY%+ %+ :dc=\EQ:dl=\EO:\ + :ho=\EH:k1=\Ea\n:k2=\Eb\n:k3=\Ec\n:k4=\Ed\n:k5=\Ee\n:\ + :k6=\Ef\n:k7=\Eg\n:k8=\Eh\n:k9=\Ei\n:kb=\b:kd=\EB:\ + :kh=\EH:kl=\ED:kr=\EC:ku=\EA:nd=\EC:se=\E4>b:so=\E4!a:\ + :te=\E>A:ti=\E>B:ue=\E4=b:up=\EA:us=\E4"a:bc=\ED:\ + :U8=\Eb:so=\E4!a:\ + :te=\E>A:ti=\E>B:ue=\E4=b:up=\EA:us=\E4"a:bc=\ED:\ + :U8=\E\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ + :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\ + :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: +# luna's BMC terminal emulator +luna|luna68k|LUNA68K Bitmap console:\ + :li#46:co#88:tc=ansi: +# SCO console and SOS-Syscons console for 386bsd +scoansi|SCO Extended ANSI standard crt:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%d;%dH:co#80:\ + :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:\ + :nd=\E[C:pt:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:up=\E[A:\ + :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:\ + :k7=\E[S:k8=\E[T:k9=\E[U:k0=\E[V:\ + :kb=^h:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:eo:sf=\E[S:sr=\E[T:\ + :mb=\E[5m:md=\E[1m:me=\E[m:\ + :GS=\E[12m:GE=\E[10m:GV=\63:GH=D:\ + :GC=E:GL=\64:GR=C:RT=^J:G1=?:G2=Z:G3=@:G4=Y:G5=;:G6=I:G7=H:G8=<:\ + :GU=A:GD=B:\ + :CW=\E[M:NU=\E[N:RF=\E[O:RC=\E[P:\ + :WL=\E[S:WR=\E[T:CL=\E[U:CR=\E[V:\ + :HM=\E[H:EN=\E[F:PU=\E[I:PD=\E[G:\ + :Gc=N:Gd=K:Gh=M:Gl=L:Gu=J:Gv=\072: +trs80|trs-80|radio shack trs-80 Model I:\ + :do=^J:am:le=^H:bs:co#64:li#16: +d800|Direct 800/A:\ + :do=^J:co#80:li#24:am:cl=\E[1;1H\E[2J:le=^H:bs:cm=\E[%i%d;%dH:\ + :nd=\E[C:up=\E[A:ce=\E[K:cd=\E[J:\ + :so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:xs:vs=\E[>12l:ve=\E[>12h:\ + :sf=\ED:sr=\EM:da:db:as=\E[1m:ae=\E[0m:ms:pt:\ + :kl=\E[D:kr=\E[C:ku=\E[A:kd=\E[B:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :k5=\EOT:k6=\EOU:k7=\EOV:k8=\EOW: +vc404|volker-craig 404:\ + :do=^J:am:le=^H:bs:cd=40^W:ce=20^V:cl=40^X:cm=^P%+ %+ :co#80:\ + :ho=40^Y:kd=^J:kl=^H:kr=^U:ku=^Z:li#24:ma=^Z^P^U :nd=^U:up=^Z: +vc404-s|volker-craig 404 w/standout mode:\ + :do=^J:se=^O:so=^N:tc=vc404: +vc404-na|volker-craig 404 w/no arrow keys:\ + :ma@:kr@:ku@:tc=vc404: +vc404-s-na|volker-craig 404 w/standout mode and no arrow keys:\ + :se=^O:so=^N:tc=vc404-na: +# From: wolfgang@cs.sfu.ca +vc414|vc414h|Volker-Craig 414H in sane escape mode.:\ + :am:ic=\E\072:dc=\E\063:so=\E\031:se=\E\037:\ + :kl=^H:kr=^P:ku=\E^L:kd=\E^K:kh=\E^R:\ + :k0=\EA:k1=\EB:k2=\EC:k3=\ED:k4=\EE:k5=\EF:k6=\EG:k7=\EH:\ + :l0=PF1:l1=PF2:l2=PF3:l3=PF4:l4=PF5:l5=PF6:l6=PF7:l7=PF8:\ + :al=40\E^Z:bs:cd=\E^X:ce=10\E^O:cl=40\E^\:co#80:\ + :do=\E^K:li#24:nd=^P:up=\E^L: +vc414h-noxon:\ + :dl=40\E^S:cm=40\E^Q%r%.%.:ho=\E^R:\ + :tc=vc414h: +# missing in vc303a and vc303 descriptions: they scroll 2 lines at a time +vc303a|vc403a|volker-craig 303a:\ + :do=^J:am:le=^H:bs:ce=20^V:cl=40^X:co#80:ho=40^Y:kd=^J:kl=^H::kr=^U:\ + :ku=^Z:li#24:ll=^P^@W:nd=^U:ns:up=^Z: +vc303|vc103|vc203|volker-craig 303:\ + :do=^J:am:le=^H:bs:cl=40^L:co#80:ho=40^K:kd=^J:kl=^H:\ + :kr=^I:ku=^N:li#24:ll=^O\200W:nd=^I:ns:up=^N: +# Test version for Falco ts-1. See "arpavax.hickman@ucb" for info +falco|ts1|ts-1|falco ts-1:is=\Eu\E3:\ + :do=^J:al=\EE:am:bs:ce=\ET\EG0^h:cm=\E=%+ %+ :cl=\E*:cd=\EY:co#80:\ + :dc=\EW:dl=\ER:ei=\Er:ho=^^:im=\Eq:k0=^A0\r:kd=^J:kl=^H:pt:\ + :kr=^L:ku=^K:li#24:nd=^L:se=\Eg0:so=\Eg1:up=^K:us=\Eg1:ue=\Eg0: +falco-p|falco ts-1sp|falco with paging option:\ + :is=\EZ\E3\E_c:\ + :al=\EE:am:bs:ce=\ET\EG0^H\Eg0:cl=\E*:cd=\EY:co#80:dc=\EW:\ + :dl=\ER:kd=\E[B:kl=\E[D:ei=\Er:im=\Eq:pt:db:\ + :kr=\E[C:ku=\E[A:li#24:nd=\E[C:se=\Eg0:so=\Eg4:\ + :up=\E[A:us=\Eg1:ti=\E_d:te=\E_b:\ + :ue=\Eg0:do=\E[B:cm=\E=%+ %+ :ms:kh=\E[H:da:mi:bt=\EI: +# NOTE: bg can scroll, it just would rather not (ns) - rwells 3/13/81. +# (Shouldn't you take out ns and put in an nl instead? - mrh) +bitgraph|BBN BitGraph terminal:\ + :do=^J:al=2*\E[L:bs:cd=150\E[J:ce=2\E[K:\ + :cl=150\E[H\E[J:cm=%i\E[%d;%dH:co#85:\ + :dl=2*\E[M:k0=\EP:k1=\EQ:k2=\ER:k3=\ES:kd=\EB:ke=\E>:kl=\ED:kr=\EC:\ + :ks=\E=:ku=\EA:li#64:nd=\E[C:ns:pt:se=\E[0m:so=\E[7m:up=\E[A:sf=280\n: +d132|datagraphix|datagraphix 132a:\ + :do=^J:co#80:li#30:cl=^l:ho=\Et:da:db:sf=\Ev:sr=\Ew:\ + :up=\Ek:nd=\El:vs=\ex:ve=\Em\En:\ + :al=\E3:ic=\E5:dc=\E6:in:ic=\E5: +soroc|Soroc 120:\ + :do=^J:cd=\EY:ce=\ET:cl=2\E*:ma=^K^P^R^L^L :\ + :kl=^H:ku=^K:kr=^L:kd=^J:tc=adm3a: +# From: ma179abu%sdcc3@sdcsvax.ucsd.edu (Bill Houle) +iq140|soroc140|Soroc IQ140 with inverse & dim:\ + :ic=\EQ:dc=\EW:al=\EE:dl=\ER:ce=\ET:cd=\EY:cl=\E+:cm=\E=%+ %+ :\ + :up=^K:do=^J:le=^H:nd=^L:ho=^^:ta=\Ei:ma=^Kk^Jj^Hh^Ll^^h:am:bs:\ + :co#80:li#24:kb=^H:kh=^^:ku=^K:kd=^J:kl=^H:kr=^L:\ + :k0=^AI:k1=^A@:k2=^AA:k3=^AB:k4=^AC:k5=^AD:k6=^AE:k7=^AF:\ + :k8=^AG:k9=^AH:se=\E^?:so=\E^?:us=\E):ue=\E(: +# tec is untested, and taken from CB/Unix virtual terminal driver. +# Upper case terminal, uses lower case for control sequences!!! +# The driver shows the C ~ operator used on CM coordinates. +# Without the terminal in front of me, I can't figure out what's +# going on, so I've dotted out the cm. Note there is no ~ in tgoto. +tec400|tec scope:\ + :do=^J:.cm=l%r%.%.:up=x:do=h:nd=g:le=w:ho=i:so={:se=|:sg#1:\ + :cl=f:al=e:dl=u:ic=d:dc=t:ce=c:cd=s: +# From ucbvax!geoff Mon Sep 21 21:15:45 1981 +# This entry has been tested. +tec500|tec 500:\ + :do=^J:am:le=^H:bs:cm=\E=%+ %+ :cl=20^Z:\ + :co#80:ho=^^:li#24:nd=^L:up=^K:so=^]:se=^\: +# I would appreciate more information on this terminal, such as the +# manufacturer and the model number. There are too many tecs in here. +tec:\ + :li#24:co#80:cl=^l:up=^k:nd=\037:\ + :am:le=^H:bs:ho=\036:ma=^K^P^_ :do=^J: +teletec|Teletec Datascreen:\ + :do=^J:am:le=^H:bs:co#80:cl=^l:ho=^^:li#24:nd=^_:up=^k: +# From cbosg!ucbvax!SRC:george Fri Sep 11 22:38:32 1981 +ampex|d80|dialogue|dialogue80|ampex dialogue 80:\ + :ct=\E3:st=\E1:do=^J:is=\EA:us=\El:ue=\Em:\ + :am:le=^H:bs:pt:cl=75\E*:cm=\E=%+ %+ :\ + :al=5*\EE:bt=\EI:ic=\EQ:dl=5*\ER:dc=\EW:\ + :ce=\Et:cd=\Ey:so=\Ej:se=\Ek:li#24:co#80:nd=^L:up=^K: +# From: atd!dsd!rcb@ucbvax.berkeley.edu (Richard Bascove) +a210|210|ampex210|ampex a210:\ + :am:bs:cl=\E*:cm=\E=%+ %+ :al=\EE:bt=\EI:ic=\EQ:\ + :dl=\ER:dc=\EW:ho=^^:xn:ce=\Et:cd=\Ey:li#24:co#80:nd=^L:up=^K:\ + :pt:if=/usr/share/tabset/std:is=\EC\Eu\E'\E(\El\EA\E%\E{\E.2\EG0\Ed\En:\ + :kl=^H:kr=^L:kd=^V:ku=^K:kh=^^:hs:ts=\E.0\Eg\E}\Ef:fs=\E.2:\ + :kn#10:k0=^A0^M:k1=^A1^M:k2=^A2^M:k3=^A3^M:k4=^A4^M:k5=^A5^M:\ + :vb=\EU\EX\EU\EX\EU\EX\EU\EX:k6=^A6^M:k7=^A7^M:k8=^A8^M:k9=^A9^M:\ + :so=\EG4:se=\EG0:us=\EG8:ue=\EG0:ug#1:sg#1: +digilog|333|digilog 333:\ + :le=^H:bs:co#80:ce=\030:ho=^n:li#16:nd=^i:up=^o:do=^J: +ep48|ep4080|execuport 4080:\ + :am:le=^H:bs:os:co#80:hu=\036:hd=\034:do=^J: +ep40|ep4000|execuport 4000:\ + :am:le=^H:bs:os:co#136:hu=\036:hd=\034:do=^J: +terminet1200|terminet300|tn1200|tn300|terminet|GE terminet 1200:\ + :co#120:hc:os:do=^J: +# AED 512 +# by giles Billingsley (gilesb%ucbcad@berkeley) +# rewritten 8/82 for newer AEDs and better operation of vi,etc. +aed|AED|aed512|AED512|aed 512:\ + :db:co#64:li#40:cl=^L:bs:nd=\Ei0800\001:\ + :up=^K:ve=\E\E\E\E\E\E\E\072004=000200??\001:\ + :vb=\EK0001??0000K0001202080\001:\ + :us=\E\07200>8000140\001:ue=\E\07200>8000100\001:\ + :uc=\Ei???>l0800i0102\001:\ + :ti=\E\07200>8000140{<04<0??00001010L<0\072004=0002??00\001:\ + :te=\E\07200>8000100{804<0??00001000L80\072004=000200??\001:\ + :so=\E\07200>8000140[80C00\001:se=\E[00C80\001:\ + :is=\EG1MMM.`40K0001202080K8001????00^L\EC80L80{80^L\EK010100????K0601??0000c818100\EG1HHH.\07210000019A27FD006A280D002A200A52429FE8524861086118612861360N031B4C3F3F1800N041B0C1B4C38301800N001B3B313030301800N011B3B313030341800N021B3B313030381800N050800N061B3B313335301800\07211000015A58E8D5011A58F8D5111A5908D5211A5918D531160\07212000015AD5011858EAD5111858FAD52118590AD5311859160\0721300004B2071C5858E0A18658E0A0A858EA900858F268FA5278590A50A29018591A9F51865908590A90165918591A59038E58E8590A591E58F290185912071C5180A0A0A0901858EA900858F268F60\0721350000BA9472031DEA9502031DE60\E\E\E\EG1MMM.^A: +aed-ucb|AED-UCB|aed512-ucb|AED512-UCB|aed 512 w/o UCB ROM:\ + :db:co#64:li#40:cl=^L:bs:nd=\Ei0800\001:up=^K:\ + :ve=\E\E\E\E\E\E\E\072004=000200??\001:\ + :vb=\EK0001??0000K0001202080\001:\ + :us=\E\07200>8000140\001:ue=\E\07200>8000100\001:\ + :uc=\Ei???>l0800i0102\001:\ + :ti=\E\07200>8000140{<04<0??00001010L<0\072004=0002??00\001:\ + :te=\E\07200>8000100{804<0??00001000L80\072004=000200??\001:\ + :so=\E\07200>8000140[80C00\001:se=\E[00C80\001:\ + :if=/usr/share/tabset/aed512: +# CIT 80 - vt 100 emulator, the termcap has been modified to remove +# the delay times and do an auto tab set rather than the indirect +# file used in vt100. +cit80|cit 80|Citoh 80:\ + :co#80:li#24:am:cl=\E[;H\EJ:bs:cm=\E[%i%2;%2H:nd=\E[C:up=\E[A:\ + :ce=\EK:cd=\EJ:is=\E>:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD: +# From mtxinu!sybase!tim (Tim Wood) Fri Sep 27 09:39:12 PDT 1985 +# Alternate cit101 (vt100 em) file used in vt100. +# Uses 23 lines so can run citsys (like h19sys). +# 24 May 85 (mtxinu!sybase!tim) - removed 2-byte limit on 'cm' cursor +# coordinates otherwise there is garbling on long lines in +# co#132 mode; also added support for multipage memory on the Itoh. +citc|Citoh fast vt100:\ + :co#80:li#23:am:cl=\E[;H\E[2J:bs:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g:\ + :ks=\E[?1h\E=:ke=\E[?1l\E>:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\ + :vb=\E[?5h\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\E[?5l:\ + :dc=\E[P:al=\E[L:dl=\E[M:ic=\E[@:vs=\E7\E[U:ve=\E[V\E8:xn: +cita:\ + :co#80:li#23:am:cl=\E[;H\E[2J:bs:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g:\ + :ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:vs=\E7\E[U:ve=\E[V\E8:\ + :vb=\E[?5h\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\E[?5l:xn: +cit101:li#24:vb@:tc=citc: +cit101b:li#24:tc=citc: +cit500|cit-500|cit 500:\ + :co#80:li#40:cl=50\E[;H\E[2J:bs:am:cm=5\E[%i%2;%2H:nd=2\E[C:up=2\E[A:\ + :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ + :is=\E(B\E)0\E>\E[?3l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :if=/usr/share/tabset/vt100:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\ + :kh=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:xn:\ + :do=\ED:al=\E[L:dc=\E[P:dl=\E[M: +# Note several versions of blit. I don't know exactly what is what +# so please send me any corrections to this -- mrh +# From research!ikeya!rob Tue Aug 31 23:41 EDT 1982 +blit|jerq|blit-pb|blit running teletype rom:\ + :do=^J:IC=\Ef%+ :DC=\Ee%+ :AL=\EF%+ :DL=\EE%+ :\ + :mi:dl=\EE!:ic=\Ef!:dc=\Ee!:al=\EF!:\ + :ce=\EK:cl=^L:cm=\EY%r%+ %+ :co#87:li#72:nd=\EC:\ + :up=\EA:ku=\EA:kd=\EB:kr=\EC:kl=\ED:kb=^H:am:ul:pt:eo: +cbblit|columbus enhanced tty blit:\ + :vb=\E^G:so=\EU!:se=\EV!:us=\EU":ue=\EV":cd=\EJ:\ + :im=\EQ:ei=\ER:ic@:co#88:sf=\EG:tc=blit: +oblit|ojerq|first version of blit rom:\ + :do=^J:AL=\Ef%+ :DL=\Ee%+ :mi:dl=\EE:ei=\ER:im=\EQ:dc=\EO:da:db:\ + :al=\EF:cd=\EJ:ce=\EK:cl=^L:cm=\EY%r%+ %+ :co#88:li#72:nd=\EC:\ + :up=\EA:vb=\E^G:am:ul:pt:eo: +daleblit|daleterm|blit running Dale DeJager's ROM:\ + :ku=\EA:kd=\EB:kr=\EC:kl=\ED:so=\EU!:se=\EV!:us=\EU":ue=\EV":\ + :da@:db@:tc=oblit: +datapoint|dp3|dp3360|datapoint 3360:\ + :do=^J:am:le=^H:bs:cd=^_:ce=^^:cl=^]^_:co#82:ho=^]:li#25:nd=^x:up=^z: +# From: cbosgd!utcs!romwa@ucbvax.berkeley.edu (mark dornfeld) +# This termcap is for the LANPAR Technologies VISION 3220 +# terminal. The function key definitions k0-k5 represent the +# edit keypad: FIND, INSERT HERE, REMOVE, SELECT, PREV SCREEN, +# NEXT SCREEN. The key definitions k6-k9 represent the PF1 to +# PF4 keys. +v3220|LANPAR Vision II model 3220/3221/3222:\ + :co#80:li#24:cl=\E[H\E[J:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :is=\E>\E[?3l\E[?7h\E[?8h\E[p:ks=\E=:ke=\E>:\ + :kn#10:k0=\E[1~:k1=\E[2~:k2=\E[3~:k3=\E[4~:k4=\E[5~:k5=\E[6~:\ + :k6=\E[OP:k7=\E[OQ:k8=\E[OR:k9=\E[OS:\ + :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ + :kh=\E[H:pt:sr=\EM:xn:\ + :dl=\E[M:dc=\E[P:ei=\E[4l:al=\E[L:im=\E[4h:mi: +# From ucbvax!faletti (Faletti@Berkeley) +# FREEDOM 100 by Liberty Electronics USA, SF. +# :kh=^^: left out because it precludes using change-to-alternate-file in vi. +# Basic Freedom 100 entry, works with VI at 1200 baud. +f100|freedom100|freedom|freedom 100 no padding:\ + :am:bs:bw:mi:ms:pt:co#80:kn#20:li#24:\ + :ct=\E3:st=\E1:is=\Eg\Ef\r\Ed:kr=^L:\ + :cl=^Z:do=^J:ho=^^:kb=^H:kl=^H:\:kd=^V:\ + :ko=dc,al,dl,cl,bt,ce,cd:ku=^K:le=^H:nd=^L:\ + :ch=\E]%+ :cm=\E=%+ %+ :cv=\E[%+ :sr=\Ej:up=^K:\ + :al=\EE:bt=\EI:cd=\EY:ce=\ET:dc=\EW:dl=\ER:ei=\Er:im=\Eq:\ + :se=\EG0:so=\EG4:ue=\EG0:us=\EG8:as=\E$:ae=\E%:\ + :vb=\Eb\200\200\Ed:\ + :k1=^A@\r:k2=^AA\r:k3=^AB\r:k4=^AC\r:k5=^AD\r:\ + :k6=^AE\r:k7=^AF\r:k8=^AG\r:k9=^AH\r:k0=^AI\r:\ + :hs:ts=\Eg\Ef:fs=\r:ds=\Eg\Ef\r: +f100-rv|freedom100-rv|freedom-rv|freedom100 with reverse video at 1200:\ + :is=\Eg\Ef\r\Eb:vb=\Ed\200\200\Eb:tc=freedom100: +# VI at 9600 baud (or EMACS at 1200 -- but may be more than is needed for emacs) +f100-v|freedom100-v|freedom-v|freedom100 for 9600 vi or 1200 emacs:\ + :al=6.5*\EE:dl=11.5*\ER:\ + :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\ + :tc=freedom100: +f100-v-rv|freedom100-v-rv|freedom-v-rv|freedom100 rev. vid. for 9600 vi:\ + :al=6.5*\EE:dl=11.5*\ER:is=\Eg\Ef\r\Eb:\ + :vb=\Ed\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Eb:\ + :tc=freedom100: +# EMACS at 9600 baud -- this still needs some more work on the padding +f100-e|freedom100-e|freedom-e|freedom100 for 9600 emacs:\ + :al=8.5*\EE:dl=11.5*\ER:ip=6:\ + :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\ + :tc=freedom100: +f100-e-rv|freedom100-e-rv|freedom-e-rv|freedom100 rev. vid. for emacs 9600:\ + :al=8.5*\EE:dl=11.5*\ER:ip=6:is=\Eg\Ef\r\Eb:\ + :vb=\Ed\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Eb:\ + :tc=freedom100: +f110-v|freedom110-v|freedom110 for 9600 vi or 1200 emacs:\ + :is=\Eg\Ef\r\Ed\EO:dc=\EO\EW:im=\EO\Eq:\ + :al=6.5*\EE:dl=11.5*\ER:\ + :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\ + :tc=freedom100: +# (from kerch@lll-crg) +f200|freedom200| Freedom 200 VDT by Liberty Electronics :\ + :if=/usr/share/tabset/stdcrt:al=\EE:am:bs:bt=\EI:cd=\EY:\ + :ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:dc=\EW:dl=\ER:do=^V:\ + :ds=\Eh:ei=\Er:im=\Eq:is=\Eg\El\E\041\062:\ + :k1=^A@\r:k2=^AA\r:k3=^AB\r:k4=^AC\r:k5=^AD\r:\ + :k6=^AE\r:k7=^AE\r:k8=^AF\r:k9=^AG\r:kd=^V:kr=L:\ + :ku=^K:li#24:ms:nd=^L:se=\EG0:so=\EG4:sr=\Ej:\ + :te=\EJ\E\\2\E|\041\061^L^Y:ti=\E\\1\EK\E|\041\061L^Y:\ + :ts=\Ef:ue=\EG0:up=^K:us=\EG8:vb=\Eb\Ed:hs:i2=\E^O\Eg:\ + :ts=\Ef:fs=^M:ds=\E^N: +dg6053|data general 6053:\ + :do=^J:am:le=^H:bs:cm=^P%r%.%.:cl=^L:ho=^H:nd=^S:\ + :up=^W:ce=^K:co#80:li#24: +# dg450 and dg200 from cornell +dg450|dg6134|data general 6134:\ + :nd=\030:bs@:tc=dg200: +dg200|data general Dasher 200:\ + :am:bc=^Y:bs=0:ce=^K:cl=^L:cm=^P%r%+\200%+\200:co#80:do=^Z:\ + :ho=^H:li#24:\ + :ll=\036FP\017:se=\036E:so=\036D:up=^W:\ + :is=\036O\036FQ2\036FB000\036FE\036FA\036FQ2: +# Note: lesser Dasher terminals will not work with vi because vi insists upon +# having a command to move straight down from any position on the bottom line +# and scroll the screen up, or a direct vertical scroll command. The 460 and +# above have both, the D210/211, for instance, has neither. We must use ANSI +# mode rather than DG mode because standard UNIX tty drivers assume that ^H is +# backspace on all terminals. This is not so in DG mode. +dg460-ansi|Data General Dasher 460, ANSI-mode:\ + :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J:\ + :cm=\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:do=\E[B:\ + :ho=\E[H:ic=\E[@:ue=\E[05:ul:up=\E[A:us=\E[4m:is=\036F@:\ + :k0=\E[001z:k1=\E[002z:k2=\E[003z:k3=\E[004z:k4=\E[005z:k5=\E[006z:\ + :k6=\E[007z:k7=\E[008z:k8=\E[009z:k9=\E[00\:z:\ + :kb=\E[D:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:kn#6:\ + :l0=f1:l1=f2:l2=f3:l3=f4:l4=f5:l5=f6:l6=f7:l7=f8:l9=f10:\ + :le=^H:li#24:mb=\E[5m:me=\E[0m:mh=\E[2m:mr=\E[7m:ms:mu=\EW:\ + :nd=\E[C:nl=\ED:pt:se=\E[0m:sf=\E[S:so=\E[7m:sr=\E[T: +v603|visual603|603|Visual model 603:\ + :hs:ts=\EP2~:fs=\E\\:ds=\EP2;1~\E\\:\ + :im=\E[4h:ei=\E[4l:mi:dc=\E[P:al=\E[L:dl=\E[M:\ + :cs=\E[%i%d;%dr:sf=\ED:sr=\EM:sb=\EM:\ + :ce=\E[K:cl=\E[H\E[J:cd=\E[J:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ + :is=\E>\E[?3l\E[?4l\E[?7h\E[?8h\E[1;24r\E[24;1H:\ + :rs=\E>\E[?3l\E[?4l\E[?7h\E[?8h:\ + :tc=vt100: +cdi|cdi1203:\ + :am:le=^H:bs:hc:os:co#80:dC#200:do=^J: +# ^S is an arrow key! Boy is this guy in for a surprise on v7! +sol:\ + :do=^J:am:le=^Y:ho=^H:bs:cm=\E^1%.\E^2%.:cl=^K:ho=^N:co#64:li#16:\ + :nd=^S:up=^W:kl=^A:kr=^S:ku=^W:kd=^Z:ma=^A^H^S ^W^P^Z^N: +xl83|Cybernex XL-83:\ + :do=^J:am:le=^H:bs:cd=62^P:ce=3^O:cl=62^L:cm=^W%+ %+ :co#80:ho=^K:\ + :kd=^J:kl=^H:ku=^N:li#24:up=^N:nd=^I: +omron|Omron 8025AG:\ + :do=^J:al=\EL:am:le=^H:bs:cd=\ER:co#80:ce=\EK:cl=\EJ:\ + :da:db:dc=\EP:dl=\EM:ho=\EH:li#24:nd=\EC:se=\E4:sf=\ES:\ + :so=\Ef:sr=\ET:up=\EA:ve=:vs=\EN: +plasma|plasma panel:\ + :am:le=^H:bs:cl=^L:co#85:ho=^^:li#45:nd=\030:up=\026:do=^J: +pty|pseudo teletype:\ + :do=^J:co#80:li#24:am:cl=\EJ:le=^H:bs:cm=\EG%+ %+ :nd=\EC:\ + :up=\EA:ce=\EK:cd=\EL:al=\EP:dl=\EN:ic=\EO:\ + :so=\Ea$:se=\Eb$:us=\Ea!:ue=\Eb!: +remote|virtual remote terminal:\ + :co#79:am@:nl@:tc=virtual: +swtp|ct82|southwest technical products ct82:\ + :do=^J:am:le=^d:bc=^d:\ + :al=^\^y:cd=^v:ce=^F:cl=^L:cm=%r^k%.%.:co#82:li#20:\ + :dl=^z:nd=^s:up=^a:so=^^^v:se=^^^F:dc=^\^h:ic=^\^x:ho=^p:\ + :sf=^n:sr=^o:ll=^c:\ + :is=^\^r^^^s^^^d^]^w^i^s^^^]^^^o^]^w^r^i: +terak|Terak emulating Datamedia 1520:\ + :tc=dm1520: +# :is resets scrolling region in case a previous user had used "tset vt100" +sun|Sun Microsystems Workstation console:\ + :li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :am:bs:mi:ms:pt:km:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:is=\E[1r:rs=\E[1r:\ + :kd=\E[B:kl=\E[D:ku=\E[A:kr=\E[C:kh=\E[H:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:\ + :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP: +# From john@ucbrenoir Tue Sep 24 13:14:44 1985 +sun-s|Sun Microsystems Workstation window with status line:\ + :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun: +sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs:\ + :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun-e: +sun-48|Sun 48-line window:\ + :li#48:co#80:tc=sun: +sun-34|Sun 34-line window:\ + :li#34:co#80:tc=sun: +sun-24|Sun 24-line window:\ + :li#24:co#80:tc=sun: +sun-17|Sun 17-line window:\ + :li#17:co#80:tc=sun: +sun-12|Sun 12-line window:\ + :li#12:co#80:tc=sun: +sun-1|Sun 1-line window for sysline:\ + :li#1:co#80:es:hs:ts=\r:fs=\E[K:ds=^L:tc=sun: +sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character:\ + :ic@:im@:ei@:tc=sun: +sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history:\ + :te=\E[>4h:ti=\E[>4l:tc=sun: +# The terminal mvterm is a full color terminal emulation that seems to be +# specific to a terminal program on Sun workstations called SwitchTerm. It +# is vt100 compatible with minor changes. +# Daniel Rudy +mvterm|vv100|mvterm emulator with ANSI colors:\ + :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[100m:tc=vt102: +# For NeWS's psterm from Eric Messick & Hugh Daniel +psterm|psterm-basic|psterm-80x34:\ + :am:bs:al=\EA:cd=\EB:ce=\EC:cl=^L:cm=\E%d;%d;:cs=\EE%d;%d;:\ + :dc=\EF:dl=\EK:do=\EP:ei=\ENi:el=\ENl:fs=\ENl:\ + :ho=\ER:hs:im=\EOi:is=\EN*:km:kd=\E[B:ku=\E[A:kr=\E[C:kl=\E[D:\ + :mb=\EOb:md=\EOd:me=\EN*:mr=\EOr:nd=\EV:pt:rc=\034:rs=\EN*:sc=\035:\ + :se=\ENo:sf=\EW:sl=\EOl:so=\EOo:sr=\EX:te=\ENt:ti=\EOt:ts=\EOl:\ + :ue=\ENu:le=\ET:ll=\EU:ul:up=\EY:us=\EOu:vb=\EZ:co#80:li#34: +psterm-96x48:\ + :co#96:li#48:tc=psterm-basic: +psterm-90x28:\ + :co#90:li#28:tc=psterm-basic: +psterm-80x24:\ + :co#80:li#24:tc=psterm-basic: +# This is a faster termcap for psterm. Warning: if you use this termcap, +# some control characters you type will do strange things to the screen. +psterm-fast:\ + :am:bs:al=^A:cd=^B:ce=^C:cl=^L:cm=^D%d;%d;:cs=^E%d;%d;:\ + :dc=^F:dl=^K:do=^P:ei=^Ni:el=^Nl:fs=^Nl:\ + :ho=^R:hs:im=^Oi:is=^N*:km:kd=\E[B:ku=\E[A:kr=\E[C:kl=\E[D:\ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 20:27:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEEA17F6; Sun, 11 Jan 2015 20:27:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D08F8D05; Sun, 11 Jan 2015 20:27:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BKRGSC028262; Sun, 11 Jan 2015 20:27:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKRF0A028255; Sun, 11 Jan 2015 20:27:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501112027.t0BKRF0A028255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Jan 2015 20:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277023 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:27:17 -0000 Author: kib Date: Sun Jan 11 20:27:15 2015 New Revision: 277023 URL: https://svnweb.freebsd.org/changeset/base/277023 Log: Right now, for non-coherent DMARs, page table update code flushes the cache for whole page containing modified pte, and more, only last page in the series of the consequtive pages is flushed (i.e. the affected mappings should be larger than 2MB). Avoid excessive flushing and do missed neccessary flushing, by splitting invalidation and unmapping. For now, flush exactly the range of the changed pte. This is still somewhat bigger than neccessary, since pte is 8 bytes, while cache flush line is at least 32 bytes. The originator of the issue reports that after the change, 'dmar_bus_dmamap_unload went from 13,288 cycles down to 3,257. dmar_bus_dmamap_load_buffer went from 9,686 cycles down to 3,517. and I am now able to get line 1GbE speed with Netperf TCP (even with 1K message size).' Diagnosed and tested by: Nadav Amit Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_idpgtbl.c head/sys/x86/iommu/intel_utils.c Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_ctx.c Sun Jan 11 20:27:15 2015 (r277023) @@ -97,7 +97,8 @@ dmar_ensure_ctx_page(struct dmar_unit *d re += bus; dmar_pte_store(&re->r1, DMAR_ROOT_R1_P | (DMAR_ROOT_R1_CTP_MASK & VM_PAGE_TO_PHYS(ctxm))); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_flush_root_to_ram(dmar, re); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; } @@ -158,6 +159,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, (DMAR_CTX1_ASR_MASK & VM_PAGE_TO_PHYS(ctx_root)) | DMAR_CTX1_P); } + dmar_flush_ctx_to_ram(unit, ctxp); } static int @@ -364,7 +366,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev ctx->domain = alloc_unrl(dmar->domids); if (ctx->domain == -1) { DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf, true); + dmar_unmap_pgtbl(sf); dmar_ctx_dtr(ctx, true, true); TD_PINNED_ASSERT; return (NULL); @@ -389,7 +391,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev } else { dmar_ctx_dtr(ctx1, true, true); } - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); } ctx->refs++; if ((ctx->flags & DMAR_CTX_RMRR) != 0) @@ -480,7 +482,7 @@ dmar_free_ctx_locked(struct dmar_unit *d if (ctx->refs > 1) { ctx->refs--; DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; return; } @@ -496,6 +498,7 @@ dmar_free_ctx_locked(struct dmar_unit *d */ dmar_pte_clear(&ctxp->ctx1); ctxp->ctx2 = 0; + dmar_flush_ctx_to_ram(dmar, ctxp); dmar_inv_ctx_glob(dmar); if ((dmar->hw_ecap & DMAR_ECAP_DI) != 0) { if (dmar->qi_enabled) @@ -513,7 +516,7 @@ dmar_free_ctx_locked(struct dmar_unit *d taskqueue_drain(dmar->delayed_taskqueue, &ctx->unload_task); KASSERT(TAILQ_EMPTY(&ctx->unload_entries), ("unfinished unloads %p", ctx)); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); free_unr(dmar->domids, ctx->domain); dmar_ctx_dtr(ctx, true, true); TD_PINNED_ASSERT; Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_dmar.h Sun Jan 11 20:27:15 2015 (r277023) @@ -228,11 +228,14 @@ struct vm_page *dmar_pgalloc(vm_object_t void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, struct sf_buf **sf); -void dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent); +void dmar_unmap_pgtbl(struct sf_buf *sf); int dmar_load_root_entry_ptr(struct dmar_unit *unit); int dmar_inv_ctx_glob(struct dmar_unit *unit); int dmar_inv_iotlb_glob(struct dmar_unit *unit); int dmar_flush_write_bufs(struct dmar_unit *unit); +void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst); +void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst); +void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); int dmar_enable_translation(struct dmar_unit *unit); int dmar_disable_translation(struct dmar_unit *unit); bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); Modified: head/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- head/sys/x86/iommu/intel_idpgtbl.c Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_idpgtbl.c Sun Jan 11 20:27:15 2015 (r277023) @@ -146,7 +146,7 @@ ctx_idmap_nextlvl(struct idpgtbl *tbl, i } } /* ctx_get_idmap_pgtbl flushes CPU cache if needed. */ - dmar_unmap_pgtbl(sf, true); + dmar_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -361,7 +361,7 @@ ctx_pgtbl_map_pte(struct dmar_ctx *ctx, pte = (dmar_pte_t *)sf_buf_kva(*sf); } else { if (*sf != NULL) - dmar_unmap_pgtbl(*sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(*sf); *idxp = idx; retry: pte = dmar_map_pgtbl(ctx->pgtbl_obj, idx, flags, sf); @@ -397,9 +397,10 @@ retry: } dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | VM_PAGE_TO_PHYS(m)); + dmar_flush_pte_to_ram(ctx->dmar, ptep); sf_buf_page(sfp)->wire_count += 1; m->wire_count--; - dmar_unmap_pgtbl(sfp, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; } @@ -467,20 +468,19 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, if (pte == NULL) { KASSERT((flags & DMAR_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", ctx)); - if (sf != NULL) { - dmar_unmap_pgtbl(sf, - DMAR_IS_COHERENT(ctx->dmar)); - } + if (sf != NULL) + dmar_unmap_pgtbl(sf); ctx_unmap_buf_locked(ctx, base1, base - base1, flags); TD_PINNED_ASSERT; return (ENOMEM); } dmar_pte_store(&pte->pte, VM_PAGE_TO_PHYS(ma[pi]) | pflags | (superpage ? DMAR_PTE_SP : 0)); + dmar_flush_pte_to_ram(ctx->dmar, pte); sf_buf_page(sf)->wire_count += 1; } if (sf != NULL) - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; return (0); } @@ -567,9 +567,10 @@ ctx_unmap_clear_pte(struct dmar_ctx *ctx vm_page_t m; dmar_pte_clear(&pte->pte); + dmar_flush_pte_to_ram(ctx->dmar, pte); m = sf_buf_page(*sf); if (free_sf) { - dmar_unmap_pgtbl(*sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(*sf); *sf = NULL; } m->wire_count--; @@ -651,7 +652,7 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); } if (sf != NULL) - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sf); /* * See 11.1 Write Buffer Flushing for an explanation why RWBF * can be ignored there. Modified: head/sys/x86/iommu/intel_utils.c ============================================================================== --- head/sys/x86/iommu/intel_utils.c Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_utils.c Sun Jan 11 20:27:15 2015 (r277023) @@ -354,20 +354,46 @@ dmar_map_pgtbl(vm_object_t obj, vm_pinde } void -dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent) +dmar_unmap_pgtbl(struct sf_buf *sf) { - vm_page_t m; - m = sf_buf_page(sf); sf_buf_free(sf); sched_unpin(); +} + +static void +dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) +{ + if (DMAR_IS_COHERENT(unit)) + return; /* * If DMAR does not snoop paging structures accesses, flush * CPU cache to memory. */ - if (!coherent) - pmap_invalidate_cache_pages(&m, 1); + pmap_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz, + TRUE); +} + +void +dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); +} + +void +dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); +} + +void +dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); } /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 20:48:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E731AD10; Sun, 11 Jan 2015 20:48:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D493EEA9; Sun, 11 Jan 2015 20:48:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BKmU6k038088; Sun, 11 Jan 2015 20:48:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKmUEG038087; Sun, 11 Jan 2015 20:48:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112048.t0BKmUEG038087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 20:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277025 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:48:31 -0000 Author: ian Date: Sun Jan 11 20:48:29 2015 New Revision: 277025 URL: https://svnweb.freebsd.org/changeset/base/277025 Log: Fix an off by one in ppsratecheck(). If you asked for N=1 you'd get one, but for any N>1 you'd get N-1 packets/events per second. Modified: head/sys/kern/kern_time.c Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Sun Jan 11 20:35:34 2015 (r277024) +++ head/sys/kern/kern_time.c Sun Jan 11 20:48:29 2015 (r277025) @@ -982,7 +982,7 @@ ppsratecheck(struct timeval *lasttime, i return (maxpps != 0); } else { (*curpps)++; /* NB: ignore potential overflow */ - return (maxpps < 0 || *curpps < maxpps); + return (maxpps < 0 || *curpps <= maxpps); } } From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 20:55:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B13A4EBC; Sun, 11 Jan 2015 20:55:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E6B4F6D; Sun, 11 Jan 2015 20:55:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BKtHl7042531; Sun, 11 Jan 2015 20:55:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKtHVJ042530; Sun, 11 Jan 2015 20:55:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112055.t0BKtHVJ042530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 20:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277026 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:55:17 -0000 Author: ian Date: Sun Jan 11 20:55:16 2015 New Revision: 277026 URL: https://svnweb.freebsd.org/changeset/base/277026 Log: Rate-limit error logging to 5 lines per second, so that when an sdcard goes bad it doesn't lock up the console with continuous output. Modified: head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Sun Jan 11 20:48:29 2015 (r277025) +++ head/sys/dev/mmc/mmcsd.c Sun Jan 11 20:55:16 2015 (r277026) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -86,6 +87,8 @@ struct mmcsd_softc { daddr_t eblock, eend; /* Range remaining after the last erase. */ int running; int suspend; + int log_count; + struct timeval log_time; }; static const char *errmsg[] = @@ -99,6 +102,8 @@ static const char *errmsg[] = "NO MEMORY" }; +#define LOG_PPS 5 /* Log no more than 5 errors per second. */ + /* bus entry points */ static int mmcsd_attach(device_t dev); static int mmcsd_detach(device_t dev); @@ -389,8 +394,10 @@ mmcsd_rw(struct mmcsd_softc *sc, struct } MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { - device_printf(dev, "Error indicated: %d %s\n", - req.cmd->error, mmcsd_errmsg(req.cmd->error)); + if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { + device_printf(dev, "Error indicated: %d %s\n", + req.cmd->error, mmcsd_errmsg(req.cmd->error)); + } break; } block += numblocks; From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 21:25:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 025BF5E1; Sun, 11 Jan 2015 21:25:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9B792B5; Sun, 11 Jan 2015 21:25:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BLP4v8057008; Sun, 11 Jan 2015 21:25:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLP4mx057006; Sun, 11 Jan 2015 21:25:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112125.t0BLP4mx057006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 21:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277027 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:25:05 -0000 Author: ian Date: Sun Jan 11 21:25:03 2015 New Revision: 277027 URL: https://svnweb.freebsd.org/changeset/base/277027 Log: Handle the possibility that SDHCI_PLATFORM_START_TRANSFER() can fail, by moving the handling of curcmd->error != 0 to the end of the interrupt handler. Also make sdhci_finish_data() idempotent by moving the setting of slot->data_done = 1 down past the point where the busdma buffer is unmapped. This allows for the possibility that the finish routine can get called from multiple places when handling errors. Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sun Jan 11 20:55:16 2015 (r277026) +++ head/sys/dev/sdhci/sdhci.c Sun Jan 11 21:25:03 2015 (r277027) @@ -984,7 +984,6 @@ sdhci_finish_data(struct sdhci_slot *slo { struct mmc_data *data = slot->curcmd->data; - slot->data_done = 1; /* Interrupt aggregation: Restore command interrupt. * Auxiliary restore point for the case when data interrupt * happened first. */ @@ -993,7 +992,7 @@ sdhci_finish_data(struct sdhci_slot *slo slot->intmask |= SDHCI_INT_RESPONSE); } /* Unload rest of data from DMA buffer. */ - if (slot->flags & SDHCI_USE_DMA) { + if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { if (data->flags & MMC_DATA_READ) { size_t left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, @@ -1004,6 +1003,7 @@ sdhci_finish_data(struct sdhci_slot *slo bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTWRITE); } + slot->data_done = 1; /* If there was error - reset the host. */ if (slot->curcmd->error) { sdhci_reset(slot, SDHCI_RESET_CMD); @@ -1171,12 +1171,7 @@ sdhci_data_irq(struct sdhci_slot *slot, } if (slot->curcmd->error) { /* No need to continue after any error. */ - if (slot->flags & PLATFORM_DATA_STARTED) { - slot->flags &= ~PLATFORM_DATA_STARTED; - SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); - } else - sdhci_finish_data(slot); - return; + goto done; } /* Handle PIO interrupt. */ @@ -1233,6 +1228,15 @@ sdhci_data_irq(struct sdhci_slot *slot, } else sdhci_finish_data(slot); } +done: + if (slot->curcmd != NULL && slot->curcmd->error != 0) { + if (slot->flags & PLATFORM_DATA_STARTED) { + slot->flags &= ~PLATFORM_DATA_STARTED; + SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); + } else + sdhci_finish_data(slot); + return; + } } static void From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 21:27:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AD8578D; Sun, 11 Jan 2015 21:27:51 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73B732DF; Sun, 11 Jan 2015 21:27:50 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0BLRiqK029766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jan 2015 23:27:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0BLRiqK029766 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0BLRiZY029765; Sun, 11 Jan 2015 23:27:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Jan 2015 23:27:44 +0200 From: Konstantin Belousov To: Baptiste Daroussin Subject: Re: svn commit: r276962 - head/lib/liblzma Message-ID: <20150111212744.GE42409@kib.kiev.ua> References: <201501110925.t0B9P2Sg005368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501110925.t0B9P2Sg005368@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:27:51 -0000 On Sun, Jan 11, 2015 at 09:25:02AM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Jan 11 09:25:01 2015 > New Revision: 276962 > URL: https://svnweb.freebsd.org/changeset/base/276962 > > Log: > Do not regenerate and install liblzma.pc when only build libraries > aka do not regenerate while generating 32bits libs > > Reported by: antoine > > Modified: > head/lib/liblzma/Makefile > > Modified: head/lib/liblzma/Makefile > ============================================================================== > --- head/lib/liblzma/Makefile Sun Jan 11 08:40:01 2015 (r276961) > +++ head/lib/liblzma/Makefile Sun Jan 11 09:25:01 2015 (r276962) > @@ -148,12 +148,13 @@ CFLAGS+= -DSYMBOL_VERSIONING > > CLEANFILES+= liblzma.pc > > +.if !defined(LIBRARIES_ONLY) > all: liblzma.pc I think that much better define to differentiate on would be COMPAT_32BIT. That said, head and stable/10 should be almost clean now for allowing ports and third-party software to work with cc -m32. I think that this commit makes it in other direction. Could the .pc files for base system provided by some port ? > liblzma.pc: liblzma.pc.in > @sed -e 's,@prefix@,/usr,g ; \ > s,@exec_prefix@,/usr,g ; \ > - s,@libdir@,${LIBDIR},g ; \ > - s,@includedir@,${INCLUDEDIR},g ; \ > + s,@libdir@,/usr/lib,g ; \ > + s,@includedir@,/usr/include,g ; \ > s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ > s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ > s,@PTHREAD_CFLAGS@,,g ; \ > @@ -162,5 +163,6 @@ liblzma.pc: liblzma.pc.in > beforeinstall: > @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig > +.endif > > .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 21:27:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00A90772; Sun, 11 Jan 2015 21:27:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77AE2DE; Sun, 11 Jan 2015 21:27:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BLRleQ057369; Sun, 11 Jan 2015 21:27:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLRlk1057368; Sun, 11 Jan 2015 21:27:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112127.t0BLRlk1057368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 21:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277028 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:27:48 -0000 Author: ian Date: Sun Jan 11 21:27:46 2015 New Revision: 277028 URL: https://svnweb.freebsd.org/changeset/base/277028 Log: Check for and handle failures of bus_dmamap_load(). The driver currently requires that each 512 byte IO be in a single contiguous buffer, but if a buffer crosses a page boundary and the physical pages aren't contiguous you can get an EFBIG failure (too many segments). The driver really should handle multiple segment IO, but before adding that I wanted to make sure that it's handling failure properly while the failure is easily recreatable. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 11 21:25:03 2015 (r277027) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 11 21:27:46 2015 (r277028) @@ -125,6 +125,10 @@ struct bcm_sdhci_softc { bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; uint32_t cmd_and_mode; + bus_addr_t dmamap_seg_addrs[1]; + bus_size_t dmamap_seg_sizes[1]; + int dmamap_seg_count; + int dmamap_status; }; static int bcm_sdhci_probe(device_t); @@ -141,16 +145,19 @@ static void bcm_sdhci_dma_intr(int ch, v mtx_unlock(&_sc->sc_mtx); static void -bcm_dmamap_cb(void *arg, bus_dma_segment_t *segs, - int nseg, int err) +bcm_sdhci_dmacb(void *arg, bus_dma_segment_t *segs, int nseg, int err) { - bus_addr_t *addr; + struct bcm_sdhci_softc *sc = arg; + int i; - if (err) - return; + sc->dmamap_status = err; + sc->dmamap_seg_count = nseg; - addr = (bus_addr_t*)arg; - *addr = segs[0].ds_addr; + /* Note nseg is guaranteed to be zero if err is non-zero. */ + for (i = 0; i < nseg; i++) { + sc->dmamap_seg_addrs[i] = segs[i].ds_addr; + sc->dmamap_seg_sizes[i] = segs[i].ds_len; + } } static int @@ -426,7 +433,6 @@ bcm_sdhci_dma_intr(int ch, void *arg) struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg; struct sdhci_slot *slot = &sc->sc_slot; uint32_t reg, mask; - bus_addr_t pmem; vm_paddr_t pdst, psrc; size_t len; int left, sync_op; @@ -476,22 +482,31 @@ bcm_sdhci_dma_intr(int ch, void *arg) SDHCI_INT_STATUS, mask); /* continue next DMA transfer */ - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + - slot->offset, left, bcm_dmamap_cb, &pmem, 0); - if (slot->curcmd->data->flags & MMC_DATA_READ) { - psrc = sc->sc_sdhci_buffer_phys; - pdst = pmem; - sync_op = BUS_DMASYNC_PREREAD; + slot->offset, left, bcm_sdhci_dmacb, sc, + BUS_DMA_NOWAIT) != 0 || sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + sdhci_finish_data(slot); } else { - psrc = pmem; - pdst = sc->sc_sdhci_buffer_phys; - sync_op = BUS_DMASYNC_PREWRITE; - } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); - if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, left)) { - /* XXX stop xfer, other error recovery? */ - device_printf(sc->sc_dev, "failed DMA start\n"); + if (slot->curcmd->data->flags & MMC_DATA_READ) { + psrc = sc->sc_sdhci_buffer_phys; + pdst = sc->dmamap_seg_addrs[0]; + sync_op = BUS_DMASYNC_PREREAD; + } else { + psrc = sc->dmamap_seg_addrs[0]; + pdst = sc->sc_sdhci_buffer_phys; + sync_op = BUS_DMASYNC_PREWRITE; + } + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, + sync_op); + if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, + left)) { + device_printf(sc->sc_dev, + "failed DMA start\n"); + slot->curcmd->error = MMC_ERR_FAILED; + sdhci_finish_data(slot); + } } } else { /* wait for next data by INT */ @@ -508,67 +523,75 @@ bcm_sdhci_dma_intr(int ch, void *arg) } static void -bcm_sdhci_read_dma(struct sdhci_slot *slot) +bcm_sdhci_read_dma(device_t dev, struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - bus_addr_t paddr; if (sc->sc_dma_inuse) { device_printf(sc->sc_dev, "DMA in use\n"); return; } - sc->sc_dma_inuse = 1; - left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + (uint8_t *)slot->curcmd->data->data + slot->offset, left, + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } + + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, + BUS_DMASYNC_PREREAD); + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, BCM_DMA_INC_ADDR, (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, - (uint8_t *)slot->curcmd->data->data + slot->offset, left, - bcm_dmamap_cb, &paddr, 0); + /* Disable INT */ + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); + sc->sc_dma_inuse = 1; /* DMA start */ if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - paddr, left) != 0) + sc->dmamap_seg_addrs[0], left) != 0) device_printf(sc->sc_dev, "failed DMA start\n"); } static void -bcm_sdhci_write_dma(struct sdhci_slot *slot) +bcm_sdhci_write_dma(device_t dev, struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - bus_addr_t paddr; if (sc->sc_dma_inuse) { device_printf(sc->sc_dev, "DMA in use\n"); return; } - sc->sc_dma_inuse = 1; - left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + slot->offset, left, - bcm_dmamap_cb, &paddr, 0); + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, BCM_DMA_INC_ADDR, @@ -579,8 +602,14 @@ bcm_sdhci_write_dma(struct sdhci_slot *s bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, BUS_DMASYNC_PREWRITE); + /* Disable INT */ + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); + + sc->sc_dma_inuse = 1; + /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, paddr, + if (bcm_dma_start(sc->sc_dma_ch, sc->dmamap_seg_addrs[0], sc->sc_sdhci_buffer_phys, left) != 0) device_printf(sc->sc_dev, "failed DMA start\n"); } @@ -609,15 +638,11 @@ bcm_sdhci_start_transfer(device_t dev, s uint32_t *intmask) { - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - /* DMA transfer FIFO 1KB */ if (slot->curcmd->data->flags & MMC_DATA_READ) - bcm_sdhci_read_dma(slot); + bcm_sdhci_read_dma(dev, slot); else - bcm_sdhci_write_dma(slot); + bcm_sdhci_write_dma(dev, slot); } static void From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 21:44:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7280CCA7; Sun, 11 Jan 2015 21:44:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF05664; Sun, 11 Jan 2015 21:44:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BLivb3066575; Sun, 11 Jan 2015 21:44:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLivEg066574; Sun, 11 Jan 2015 21:44:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112144.t0BLivEg066574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 21:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277030 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:44:57 -0000 Author: tuexen Date: Sun Jan 11 21:44:56 2015 New Revision: 277030 URL: https://svnweb.freebsd.org/changeset/base/277030 Log: Remove dead code. Reported by: Coverity CID: 748666 MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Jan 11 21:39:28 2015 (r277029) +++ head/sys/netinet/sctp_pcb.c Sun Jan 11 21:44:56 2015 (r277030) @@ -2166,11 +2166,6 @@ sctp_findassoc_by_vtag(struct sockaddr * SCTP_INP_INFO_RLOCK(); head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(vtag, SCTP_BASE_INFO(hashasocmark))]; - if (head == NULL) { - /* invalid vtag */ - SCTP_INP_INFO_RUNLOCK(); - return (NULL); - } LIST_FOREACH(stcb, head, sctp_asocs) { SCTP_INP_RLOCK(stcb->sctp_ep); if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) { @@ -6751,10 +6746,6 @@ sctp_is_vtag_good(uint32_t tag, uint16_t SCTP_INP_INFO_RLOCK(); head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(tag, SCTP_BASE_INFO(hashasocmark))]; - if (head == NULL) { - /* invalid vtag */ - goto skip_vtag_check; - } LIST_FOREACH(stcb, head, sctp_asocs) { /* * We choose not to lock anything here. TCB's can't be @@ -6778,8 +6769,6 @@ sctp_is_vtag_good(uint32_t tag, uint16_t return (0); } } -skip_vtag_check: - chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; /* Now what about timed wait ? */ LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 21:55:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C4C9F1E; Sun, 11 Jan 2015 21:55:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48E9279D; Sun, 11 Jan 2015 21:55:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BLtVjZ071361; Sun, 11 Jan 2015 21:55:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLtVY8071359; Sun, 11 Jan 2015 21:55:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112155.t0BLtVY8071359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 21:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277031 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:55:31 -0000 Author: tuexen Date: Sun Jan 11 21:55:30 2015 New Revision: 277031 URL: https://svnweb.freebsd.org/changeset/base/277031 Log: Remove dead code. Reported by: Coverity CID: 748665 MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Jan 11 21:44:56 2015 (r277030) +++ head/sys/netinet/sctp_pcb.c Sun Jan 11 21:55:30 2015 (r277031) @@ -1441,9 +1441,6 @@ sctp_findassociation_ep_addr(struct sctp } head = &inp->sctp_tcbhash[SCTP_PCBHASH_ALLADDR(rport, inp->sctp_hashmark)]; - if (head == NULL) { - goto null_return; - } LIST_FOREACH(stcb, head, sctp_tcbhash) { if (stcb->rport != rport) { /* remote port does not match */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 22:02:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEBF513A; Sun, 11 Jan 2015 22:02:28 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EB9E85E; Sun, 11 Jan 2015 22:02:28 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id h11so11210463wiw.1; Sun, 11 Jan 2015 14:02:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gnF/H7JYZ6zsSXnK+SmzXUxFToFU+ioi0QwRQR315Qc=; b=t5ZQqL/3Yjb2NOgID8c7sN8kOyj56ofUfDD06oc7Ohv+B/tIJspU1NmzCJ9542pRMO 4FkwUbWZFDH6sOt5QWnr9O/N6c39ILWQG3bICyip5FliQfEYbNLTVHCLsbahLGmx6mvT FVMZ+7tsE77OWnuD3YoBs/W3hNMZUVuPlY8zQJPQe5XarkQK/THKVCrFZaf3tW7eMgTj dJdFeJyH2BxVehhjQxEdMBv81p9v/R51VNf6po49f0/KNqJ6a2aKvaZmDjRoShPq54JC Iu5NB+LRqdpD/udhDPBfKrQ/5d65xHbDo94OErqRKkctOtdfpRxjL52zw635+n6TxC/Z TcbA== X-Received: by 10.180.93.1 with SMTP id cq1mr24292320wib.2.1421013747012; Sun, 11 Jan 2015 14:02:27 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id r3sm7704101wic.10.2015.01.11.14.02.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 14:02:26 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 11 Jan 2015 23:02:24 +0100 From: Baptiste Daroussin To: Konstantin Belousov Subject: Re: svn commit: r276962 - head/lib/liblzma Message-ID: <20150111220223.GB17273@ivaldir.etoilebsd.net> References: <201501110925.t0B9P2Sg005368@svn.freebsd.org> <20150111212744.GE42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E39vaYmALEf/7YXx" Content-Disposition: inline In-Reply-To: <20150111212744.GE42409@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:02:29 -0000 --E39vaYmALEf/7YXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 11, 2015 at 11:27:44PM +0200, Konstantin Belousov wrote: > On Sun, Jan 11, 2015 at 09:25:02AM +0000, Baptiste Daroussin wrote: > > Author: bapt > > Date: Sun Jan 11 09:25:01 2015 > > New Revision: 276962 > > URL: https://svnweb.freebsd.org/changeset/base/276962 > >=20 > > Log: > > Do not regenerate and install liblzma.pc when only build libraries > > aka do not regenerate while generating 32bits libs > > =20 > > Reported by: antoine > >=20 > > Modified: > > head/lib/liblzma/Makefile > >=20 > > Modified: head/lib/liblzma/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/lib/liblzma/Makefile Sun Jan 11 08:40:01 2015 (r276961) > > +++ head/lib/liblzma/Makefile Sun Jan 11 09:25:01 2015 (r276962) > > @@ -148,12 +148,13 @@ CFLAGS+=3D -DSYMBOL_VERSIONING > > =20 > > CLEANFILES+=3D liblzma.pc > > =20 > > +.if !defined(LIBRARIES_ONLY) > > all: liblzma.pc > I think that much better define to differentiate on would be COMPAT_32BIT. >=20 > That said, head and stable/10 should be almost clean now for allowing > ports and third-party software to work with cc -m32. I think > that this commit makes it in other direction. >=20 > Could the .pc files for base system provided by some port ? >=20 I think the best would probably be to create a bsd.pc.mk which act a bit li= ke bsd.incs.mk Concerning pushing all of those .pc files into a port, I'm not against it, actually it would be even simpler for ports as it will affect all the ports= at once. But on the other hands that would mean on port with different content based on OSVERSIONS, I think keeping it in base would be more accurate. Best regards, Bapt --E39vaYmALEf/7YXx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlSy8uwACgkQ8kTtMUmk6ExuTgCfTcaURcUPyfcMSiqi8fdQYKPD CUgAniUtyx7rfNo2nZONj2d08Ym1dQOp =WDgi -----END PGP SIGNATURE----- --E39vaYmALEf/7YXx-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 22:16:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0267640A; Sun, 11 Jan 2015 22:16:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E08A9968; Sun, 11 Jan 2015 22:16:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BMGa3k080875; Sun, 11 Jan 2015 22:16:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BMGWwq080852; Sun, 11 Jan 2015 22:16:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501112216.t0BMGWwq080852@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Jan 2015 22:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277032 - in head/lib: libc/compat-43 libc/gen libc/include libc/sys libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:16:37 -0000 Author: kib Date: Sun Jan 11 22:16:31 2015 New Revision: 277032 URL: https://svnweb.freebsd.org/changeset/base/277032 Log: Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. Translate some syscalls into their more generic counterpart, and remove translated syscalls from the table. List of the affected syscalls: creat, open -> openat raise -> thr_kill sleep, usleep -> nanosleep pause -> sigsuspend wait, wait3, waitpid -> wait4 Suggested and reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/compat-43/Symbol.map head/lib/libc/compat-43/creat.c head/lib/libc/gen/Symbol.map head/lib/libc/gen/pause.c head/lib/libc/gen/raise.c head/lib/libc/gen/sleep.c head/lib/libc/gen/usleep.c head/lib/libc/gen/wait.c head/lib/libc/gen/wait3.c head/lib/libc/gen/waitpid.c head/lib/libc/include/libc_private.h head/lib/libc/sys/interposing_table.c head/lib/libc/sys/open.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_sig.c head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libc/compat-43/Symbol.map ============================================================================== --- head/lib/libc/compat-43/Symbol.map Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/compat-43/Symbol.map Sun Jan 11 22:16:31 2015 (r277032) @@ -28,5 +28,4 @@ FBSD_1.2 { FBSDprivate_1.0 { __creat; _creat; - __libc_creat; }; Modified: head/lib/libc/compat-43/creat.c ============================================================================== --- head/lib/libc/compat-43/creat.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/compat-43/creat.c Sun Jan 11 22:16:31 2015 (r277032) @@ -38,21 +38,16 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" -__weak_reference(__libc_creat, __creat); -__weak_reference(__libc_creat, _creat); +__weak_reference(__creat, creat); +__weak_reference(__creat, _creat); #pragma weak creat int -creat(const char *path, mode_t mode) +__creat(const char *path, mode_t mode) { - return (((int (*)(const char *, mode_t)) - __libc_interposing[INTERPOS_creat])(path, mode)); + return (((int (*)(int, const char *, int, ...)) + __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, O_WRONLY | + O_CREAT | O_TRUNC, mode)); } -int -__libc_creat(const char *path, mode_t mode) -{ - - return(__sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); -} Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/Symbol.map Sun Jan 11 22:16:31 2015 (r277032) @@ -533,14 +533,7 @@ FBSDprivate_1.0 { _libc_sem_post_compat; _libc_sem_getvalue_compat; - __libc_pause; - __libc_raise; - __libc_sleep; __libc_tcdrain; - __libc_usleep; - __libc_wait; - __libc_wait3; - __libc_waitpid; __elf_aux_vector; __pthread_map_stacks_exec; Modified: head/lib/libc/gen/pause.c ============================================================================== --- head/lib/libc/gen/pause.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/pause.c Sun Jan 11 22:16:31 2015 (r277032) @@ -33,10 +33,8 @@ static char sccsid[] = "@(#)pause.c 8.1 #include __FBSDID("$FreeBSD$"); -#include "namespace.h" #include #include -#include "un-namespace.h" #include "libc_private.h" @@ -44,23 +42,14 @@ __FBSDID("$FreeBSD$"); * Backwards compatible pause. */ int -__libc_pause(void) +__pause(void) { sigset_t oset; - if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1) + if (sigprocmask(SIG_BLOCK, NULL, &oset) == -1) return (-1); - return (_sigsuspend(&oset)); + return (sigsuspend(&oset)); } -#pragma weak pause -int -pause(void) -{ - - return (((int (*)(void)) - __libc_interposing[INTERPOS_pause])()); -} - -__weak_reference(__libc_pause, __pause); -__weak_reference(__libc_pause, _pause); +__weak_reference(__pause, pause); +__weak_reference(__pause, _pause); Modified: head/lib/libc/gen/raise.c ============================================================================== --- head/lib/libc/gen/raise.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/raise.c Sun Jan 11 22:16:31 2015 (r277032) @@ -38,21 +38,15 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -__weak_reference(__libc_raise, __raise); -__weak_reference(__libc_raise, _raise); +__weak_reference(__raise, raise); +__weak_reference(__raise, _raise); -#pragma weak raise int -raise(int s) +__raise(int s) { + long id; - return (((int (*)(int)) - __libc_interposing[INTERPOS_raise])(s)); -} - -int -__libc_raise(int s) -{ - - return (kill(getpid(), s)); + if (__sys_thr_self(&id) == -1) + return (-1); + return (__sys_thr_kill(id, s)); } Modified: head/lib/libc/gen/sleep.c ============================================================================== --- head/lib/libc/gen/sleep.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/sleep.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,17 +42,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak sleep unsigned int -sleep(unsigned int seconds) -{ - - return (((unsigned int (*)(unsigned int)) - __libc_interposing[INTERPOS_sleep])(seconds)); -} - -unsigned int -__libc_sleep(unsigned int seconds) +__sleep(unsigned int seconds) { struct timespec time_to_sleep; struct timespec time_remaining; @@ -62,17 +53,19 @@ __libc_sleep(unsigned int seconds) * the maximum value for a time_t is >= INT_MAX. */ if (seconds > INT_MAX) - return (seconds - INT_MAX + __libc_sleep(INT_MAX)); + return (seconds - INT_MAX + __sleep(INT_MAX)); time_to_sleep.tv_sec = seconds; time_to_sleep.tv_nsec = 0; - if (_nanosleep(&time_to_sleep, &time_remaining) != -1) + if (((int (*)(const struct timespec *, struct timespec *)) + __libc_interposing[INTERPOS_nanosleep])( + &time_to_sleep, &time_remaining) != -1) return (0); if (errno != EINTR) return (seconds); /* best guess */ return (time_remaining.tv_sec + - (time_remaining.tv_nsec != 0)); /* round up */ + (time_remaining.tv_nsec != 0)); /* round up */ } -__weak_reference(__libc_sleep, __sleep); -__weak_reference(__libc_sleep, _sleep); +__weak_reference(__sleep, sleep); +__weak_reference(__sleep, _sleep); Modified: head/lib/libc/gen/usleep.c ============================================================================== --- head/lib/libc/gen/usleep.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/usleep.c Sun Jan 11 22:16:31 2015 (r277032) @@ -40,24 +40,16 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak usleep int -usleep(useconds_t useconds) -{ - - return (((int (*)(useconds_t)) - __libc_interposing[INTERPOS_usleep])(useconds)); -} - -int -__libc_usleep(useconds_t useconds) +__usleep(useconds_t useconds) { struct timespec time_to_sleep; time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; time_to_sleep.tv_sec = useconds / 1000000; - return (_nanosleep(&time_to_sleep, NULL)); + return (((int (*)(const struct timespec *, struct timespec *)) + __libc_interposing[INTERPOS_nanosleep])(&time_to_sleep, NULL)); } -__weak_reference(__libc_usleep, __usleep); -__weak_reference(__libc_usleep, _usleep); +__weak_reference(__usleep, usleep); +__weak_reference(__usleep, _usleep); Modified: head/lib/libc/gen/wait.c ============================================================================== --- head/lib/libc/gen/wait.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/wait.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,21 +42,13 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak wait pid_t -wait(int *istat) +__wait(int *istat) { - return (((pid_t (*)(int *)) - __libc_interposing[INTERPOS_wait])(istat)); + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL)); } -pid_t -__libc_wait(int *istat) -{ - - return (__sys_wait4(WAIT_ANY, istat, 0, NULL)); -} - -__weak_reference(__libc_wait, __wait); -__weak_reference(__libc_wait, _wait); +__weak_reference(__wait, wait); +__weak_reference(__wait, _wait); Modified: head/lib/libc/gen/wait3.c ============================================================================== --- head/lib/libc/gen/wait3.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/wait3.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,20 +42,12 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak wait3 pid_t -wait3(int *istat, int options, struct rusage *rup) +__wait3(int *istat, int options, struct rusage *rup) { - return (((pid_t (*)(int *, int, struct rusage *)) - __libc_interposing[INTERPOS_wait3])(istat, options, rup)); + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, options, rup)); } -__weak_reference(__libc_wait3, __wait3); - -pid_t -__libc_wait3(int *istat, int options, struct rusage *rup) -{ - - return (__sys_wait4(WAIT_ANY, istat, options, rup)); -} +__weak_reference(__wait3, wait3); Modified: head/lib/libc/gen/waitpid.c ============================================================================== --- head/lib/libc/gen/waitpid.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/waitpid.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,21 +42,13 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak waitpid pid_t -waitpid(pid_t pid, int *istat, int options) +__waitpid(pid_t pid, int *istat, int options) { - return (((pid_t (*)(pid_t, int *, int)) - __libc_interposing[INTERPOS_waitpid])(pid, istat, options)); + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(pid, istat, options, NULL)); } -pid_t -__libc_waitpid(pid_t pid, int *istat, int options) -{ - - return (__sys_wait4(pid, istat, options, NULL)); -} - -__weak_reference(__libc_waitpid, __waitpid); -__weak_reference(__libc_waitpid, _waitpid); +__weak_reference(__waitpid, waitpid); +__weak_reference(__waitpid, _waitpid); Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/include/libc_private.h Sun Jan 11 22:16:31 2015 (r277032) @@ -187,17 +187,14 @@ enum { INTERPOS_aio_suspend, INTERPOS_close, INTERPOS_connect, - INTERPOS_creat, INTERPOS_fcntl, INTERPOS_fsync, INTERPOS_fork, INTERPOS_msync, INTERPOS_nanosleep, - INTERPOS_open, INTERPOS_openat, INTERPOS_poll, INTERPOS_pselect, - INTERPOS_raise, INTERPOS_recvfrom, INTERPOS_recvmsg, INTERPOS_select, @@ -212,16 +209,10 @@ enum { INTERPOS_sigwaitinfo, INTERPOS_swapcontext, INTERPOS_system, - INTERPOS_sleep, INTERPOS_tcdrain, - INTERPOS_usleep, - INTERPOS_pause, INTERPOS_read, INTERPOS_readv, - INTERPOS_wait, - INTERPOS_wait3, INTERPOS_wait4, - INTERPOS_waitpid, INTERPOS_write, INTERPOS_writev, INTERPOS__pthread_mutex_init_calloc_cb, @@ -353,23 +344,17 @@ int __sys_sigwait(const __sigset_t *, i int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *); int __sys_swapcontext(struct __ucontext *, const struct __ucontext *); +int __sys_thr_kill(long, int); +int __sys_thr_self(long *); int __sys_truncate(const char *, __off_t); __pid_t __sys_wait4(__pid_t, int *, int, struct rusage *); __ssize_t __sys_write(int, const void *, __size_t); __ssize_t __sys_writev(int, const struct iovec *, int); -int __libc_creat(const char *path, __mode_t mode); -int __libc_pause(void); -int __libc_raise(int); int __libc_sigwait(const __sigset_t * __restrict, int * restrict sig); int __libc_system(const char *); -unsigned int __libc_sleep(unsigned int); int __libc_tcdrain(int); -int __libc_usleep(__useconds_t); -__pid_t __libc_wait(int *); -__pid_t __libc_wait3(int *, int, struct rusage *); -__pid_t __libc_waitpid(__pid_t, int *, int); int __fcntl_compat(int fd, int cmd, ...); /* execve() with PATH processing to implement posix_spawnp() */ Modified: head/lib/libc/sys/interposing_table.c ============================================================================== --- head/lib/libc/sys/interposing_table.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/sys/interposing_table.c Sun Jan 11 22:16:31 2015 (r277032) @@ -44,17 +44,14 @@ interpos_func_t __libc_interposing[INTER SLOT(aio_suspend, __sys_aio_suspend), SLOT(close, __sys_close), SLOT(connect, __sys_connect), - SLOT(creat, __libc_creat), SLOT(fcntl, __fcntl_compat), SLOT(fsync, __sys_fsync), SLOT(fork, __sys_fork), SLOT(msync, __sys_msync), SLOT(nanosleep, __sys_nanosleep), - SLOT(open, __sys_open), SLOT(openat, __sys_openat), SLOT(poll, __sys_poll), SLOT(pselect, __sys_pselect), - SLOT(raise, __libc_raise), SLOT(read, __sys_read), SLOT(readv, __sys_readv), SLOT(recvfrom, __sys_recvfrom), @@ -71,14 +68,8 @@ interpos_func_t __libc_interposing[INTER SLOT(sigwaitinfo, __sys_sigwaitinfo), SLOT(swapcontext, __sys_swapcontext), SLOT(system, __libc_system), - SLOT(sleep, __libc_sleep), SLOT(tcdrain, __libc_tcdrain), - SLOT(usleep, __libc_usleep), - SLOT(pause, __libc_pause), - SLOT(wait, __libc_wait), - SLOT(wait3, __libc_wait3), SLOT(wait4, __sys_wait4), - SLOT(waitpid, __libc_waitpid), SLOT(write, __sys_write), SLOT(writev, __sys_writev), SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), Modified: head/lib/libc/sys/open.c ============================================================================== --- head/lib/libc/sys/open.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/sys/open.c Sun Jan 11 22:16:31 2015 (r277032) @@ -54,6 +54,6 @@ open(const char *path, int flags, ...) } else { mode = 0; } - return (((int (*)(const char *, int, ...)) - __libc_interposing[INTERPOS_open])(path, flags, mode)); + return (((int (*)(int, const char *, int, ...)) + __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, flags, mode)); } Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libthr/thread/thr_private.h Sun Jan 11 22:16:31 2015 (r277032) @@ -917,8 +917,6 @@ void _thr_stack_fix_protection(struct pt int *__error_threaded(void) __hidden; void __thr_interpose_libc(void) __hidden; pid_t __thr_fork(void); -int __thr_pause(void) __hidden; -int __thr_raise(int sig); int __thr_setcontext(const ucontext_t *ucp); int __thr_sigaction(int sig, const struct sigaction *act, struct sigaction *oact) __hidden; Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libthr/thread/thr_sig.c Sun Jan 11 22:16:31 2015 (r277032) @@ -515,23 +515,6 @@ _thr_signal_deinit(void) } int -__thr_pause(void) -{ - sigset_t oset; - - if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1) - return (-1); - return (__thr_sigsuspend(&oset)); -} - -int -__thr_raise(int sig) -{ - - return (_thr_send_sig(_get_curthread(), sig)); -} - -int __thr_sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { struct sigaction newact, oldact, oldact2; Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libthr/thread/thr_syscalls.c Sun Jan 11 22:16:31 2015 (r277032) @@ -99,10 +99,6 @@ __FBSDID("$FreeBSD$"); extern int __fcntl_compat(int, int, ...); #endif -/* - * Cancellation behavior: - * If thread is canceled, no socket is created. - */ static int __thr_accept(int s, struct sockaddr *addr, socklen_t *addrlen) { @@ -189,25 +185,6 @@ __thr_connect(int fd, const struct socka return (ret); } - -/* - * Cancellation behavior: - * If thread is canceled, file is not created. - */ -static int -__thr_creat(const char *path, mode_t mode) -{ - struct pthread *curthread; - int ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_creat(path, mode); - _thr_cancel_leave(curthread, ret == -1); - - return (ret); -} - /* * Cancellation behavior: * According to specification, only F_SETLKW is a cancellation point. @@ -300,35 +277,6 @@ __thr_nanosleep(const struct timespec *t * If the thread is canceled, file is not opened. */ static int -__thr_open(const char *path, int flags,...) -{ - struct pthread *curthread; - int mode, ret; - va_list ap; - - /* Check if the file is being created: */ - if ((flags & O_CREAT) != 0) { - /* Get the creation mode: */ - va_start(ap, flags); - mode = va_arg(ap, int); - va_end(ap); - } else { - mode = 0; - } - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __sys_open(path, flags, mode); - _thr_cancel_leave(curthread, ret == -1); - - return (ret); -} - -/* - * Cancellation behavior: - * If the thread is canceled, file is not opened. - */ -static int __thr_openat(int fd, const char *path, int flags, ...) { struct pthread *curthread; @@ -523,19 +471,6 @@ __thr_sendto(int s, const void *m, size_ return (ret); } -static unsigned int -__thr_sleep(unsigned int seconds) -{ - struct pthread *curthread; - unsigned int ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_sleep(seconds); - _thr_cancel_leave(curthread, 1); - return (ret); -} - static int __thr_system(const char *string) { @@ -567,55 +502,6 @@ __thr_tcdrain(int fd) return (ret); } -static int -__thr_usleep(useconds_t useconds) -{ - struct pthread *curthread; - int ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_usleep(useconds); - _thr_cancel_leave(curthread, 1); - return (ret); -} - -/* - * Cancellation behavior: - * Thread may be canceled at start, but if the system call returns - * a child pid, the thread is not canceled. - */ -static pid_t -__thr_wait(int *istat) -{ - struct pthread *curthread; - pid_t ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_wait(istat); - _thr_cancel_leave(curthread, ret <= 0); - return (ret); -} - -/* - * Cancellation behavior: - * Thread may be canceled at start, but if the system call returns - * a child pid, the thread is not canceled. - */ -static pid_t -__thr_wait3(int *status, int options, struct rusage *rusage) -{ - struct pthread *curthread; - pid_t ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_wait3(status, options, rusage); - _thr_cancel_leave(curthread, ret <= 0); - return (ret); -} - /* * Cancellation behavior: * Thread may be canceled at start, but if the system call returns @@ -636,24 +522,6 @@ __thr_wait4(pid_t pid, int *status, int /* * Cancellation behavior: - * Thread may be canceled at start, but if the system call returns - * a child pid, the thread is not canceled. - */ -static pid_t -__thr_waitpid(pid_t wpid, int *status, int options) -{ - struct pthread *curthread; - pid_t ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_waitpid(wpid, status, options); - _thr_cancel_leave(curthread, ret <= 0); - return (ret); -} - -/* - * Cancellation behavior: * Thread may be canceled at start, but if the thread wrote some data, * it is not canceled. */ @@ -701,17 +569,14 @@ __thr_interpose_libc(void) SLOT(aio_suspend); SLOT(close); SLOT(connect); - SLOT(creat); SLOT(fcntl); SLOT(fsync); SLOT(fork); SLOT(msync); SLOT(nanosleep); - SLOT(open); SLOT(openat); SLOT(poll); SLOT(pselect); - SLOT(raise); SLOT(read); SLOT(readv); SLOT(recvfrom); @@ -728,14 +593,8 @@ __thr_interpose_libc(void) SLOT(sigwaitinfo); SLOT(swapcontext); SLOT(system); - SLOT(sleep); SLOT(tcdrain); - SLOT(usleep); - SLOT(pause); - SLOT(wait); - SLOT(wait3); SLOT(wait4); - SLOT(waitpid); SLOT(write); SLOT(writev); #undef SLOT From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 22:23:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F215E5A5; Sun, 11 Jan 2015 22:23:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDF08A36; Sun, 11 Jan 2015 22:23:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BMNdnx085174; Sun, 11 Jan 2015 22:23:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BMNdAY085173; Sun, 11 Jan 2015 22:23:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112223.t0BMNdAY085173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 22:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277033 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:23:40 -0000 Author: tuexen Date: Sun Jan 11 22:23:39 2015 New Revision: 277033 URL: https://svnweb.freebsd.org/changeset/base/277033 Log: Remove dead code. Reported by: Coverity CID: 748660, 748661 MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sun Jan 11 22:16:31 2015 (r277032) +++ head/sys/netinet/sctp_asconf.c Sun Jan 11 22:23:39 2015 (r277033) @@ -1419,7 +1419,6 @@ sctp_asconf_queue_sa_delete(struct sctp_ { struct sctp_ifa *ifa; struct sctp_asconf_addr *aa, *aa_next; - uint32_t vrf_id; if (stcb == NULL) { return (-1); @@ -1451,12 +1450,7 @@ sctp_asconf_queue_sa_delete(struct sctp_ } /* for each aa */ /* find any existing ifa-- NOTE ifa CAN be allowed to be NULL */ - if (stcb) { - vrf_id = stcb->asoc.vrf_id; - } else { - vrf_id = SCTP_DEFAULT_VRFID; - } - ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); + ifa = sctp_find_ifa_by_addr(sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED); /* adding new request to the queue */ SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), @@ -2782,7 +2776,6 @@ sctp_process_initack_addresses(struct sc struct sctp_ipv4addr_param addr4_store; #endif - uint32_t vrf_id; SCTPDBG(SCTP_DEBUG_ASCONF2, "processing init-ack addresses\n"); if (stcb == NULL) /* Un-needed check for SA */ @@ -2850,12 +2843,7 @@ sctp_process_initack_addresses(struct sc } /* see if this address really (still) exists */ - if (stcb) { - vrf_id = stcb->asoc.vrf_id; - } else { - vrf_id = SCTP_DEFAULT_VRFID; - } - sctp_ifa = sctp_find_ifa_by_addr(&store.sa, vrf_id, + sctp_ifa = sctp_find_ifa_by_addr(&store.sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED); if (sctp_ifa == NULL) { /* address doesn't exist anymore */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 22:49:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 392E697B; Sun, 11 Jan 2015 22:49:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24E77BEC; Sun, 11 Jan 2015 22:49:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0BMnLv2095145; Sun, 11 Jan 2015 22:49:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BMnK9G095144; Sun, 11 Jan 2015 22:49:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112249.t0BMnK9G095144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 22:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277034 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:49:21 -0000 Author: tuexen Date: Sun Jan 11 22:49:20 2015 New Revision: 277034 URL: https://svnweb.freebsd.org/changeset/base/277034 Log: Remove dead code. Reported by: Coverity CID: 748663 MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jan 11 22:23:39 2015 (r277033) +++ head/sys/netinet/sctp_input.c Sun Jan 11 22:49:20 2015 (r277034) @@ -2595,7 +2595,7 @@ sctp_handle_cookie_echo(struct mbuf *m, /* This should not happen */ return (NULL); } - if ((*stcb == NULL) && to) { + if (*stcb == NULL) { /* Yep, lets check */ *stcb = sctp_findassociation_ep_addr(inp_p, to, netp, dst, NULL); if (*stcb == NULL) { @@ -2634,9 +2634,6 @@ sctp_handle_cookie_echo(struct mbuf *m, } } } - if (to == NULL) { - return (NULL); - } cookie_len -= SCTP_SIGNATURE_SIZE; if (*stcb == NULL) { /* this is the "normal" case... get a new TCB */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 02:08:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52D6FC52; Mon, 12 Jan 2015 02:08:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EB63EC7; Mon, 12 Jan 2015 02:08:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C28E0T088406; Mon, 12 Jan 2015 02:08:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C28ETl088405; Mon, 12 Jan 2015 02:08:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501120208.t0C28ETl088405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 12 Jan 2015 02:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277035 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:08:14 -0000 Author: gjb Date: Mon Jan 12 02:08:13 2015 New Revision: 277035 URL: https://svnweb.freebsd.org/changeset/base/277035 Log: Document r276881, libedit UTF-8 support and sh(1) unicode support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 22:49:20 2015 (r277034) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:08:13 2015 (r277035) @@ -685,6 +685,10 @@ updated to use the new &man.dpv.3; library to display progress when extracting the &os; distributions. + The libedit library + has been updated to support UTF-8, which + additionally provides unicode support to &man.sh.1;. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 02:10:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD2F4DDC; Mon, 12 Jan 2015 02:10:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99E5BED4; Mon, 12 Jan 2015 02:10:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C2AkqJ089407; Mon, 12 Jan 2015 02:10:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2Akwo089406; Mon, 12 Jan 2015 02:10:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501120210.t0C2Akwo089406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 12 Jan 2015 02:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277036 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:10:46 -0000 Author: gjb Date: Mon Jan 12 02:10:45 2015 New Revision: 277036 URL: https://svnweb.freebsd.org/changeset/base/277036 Log: Split the tag out of being a single-line. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:08:13 2015 (r277035) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:10:45 2015 (r277036) @@ -14,7 +14,9 @@ &os; &release.current; Release Notes - The &os; Project + + The &os; Project + $FreeBSD$ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 02:29:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB6D31EA; Mon, 12 Jan 2015 02:29:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 982E610A; Mon, 12 Jan 2015 02:29:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C2TOcN097849; Mon, 12 Jan 2015 02:29:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2TO14097848; Mon, 12 Jan 2015 02:29:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501120229.t0C2TO14097848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 12 Jan 2015 02:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277037 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:29:24 -0000 Author: ian Date: Mon Jan 12 02:29:23 2015 New Revision: 277037 URL: https://svnweb.freebsd.org/changeset/base/277037 Log: Enable ALT_BREAK_TO_DEBUGGER for rpi. Modified: head/sys/arm/conf/RPI-B Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Mon Jan 12 02:10:45 2015 (r277036) +++ head/sys/arm/conf/RPI-B Mon Jan 12 02:29:23 2015 (r277037) @@ -60,6 +60,7 @@ options VFP # Enable floating point h # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 02:42:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED3143A1; Mon, 12 Jan 2015 02:42:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF83926E; Mon, 12 Jan 2015 02:42:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C2gY3p006295; Mon, 12 Jan 2015 02:42:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2gYcp006294; Mon, 12 Jan 2015 02:42:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501120242.t0C2gYcp006294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 12 Jan 2015 02:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277038 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:42:35 -0000 Author: ian Date: Mon Jan 12 02:42:33 2015 New Revision: 277038 URL: https://svnweb.freebsd.org/changeset/base/277038 Log: Handle dma mappings with more than one segment for rpi sdhci. The driver inherently does dma in 512 byte chunks, but it's possible that such a buffer can span two physically discontiguous pages (such as when a userland program does IO on the raw /dev/mmcsdN devices). Now the driver can handle a buffer that's split across two pages. It could in theory handle any number of segments now, but as long as IO is being done in 512 byte blocks it will never need more than two. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Jan 12 02:29:23 2015 (r277037) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Jan 12 02:42:33 2015 (r277038) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #define BCM2835_DEFAULT_SDHCI_FREQ 50 #define BCM_SDHCI_BUFFER_SIZE 512 +#define NUM_DMA_SEGS 2 #ifdef DEBUG #define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ @@ -97,10 +98,6 @@ TUNABLE_INT("hw.bcm2835.sdhci.min_freq", TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); -struct bcm_sdhci_dmamap_arg { - bus_addr_t sc_dma_busaddr; -}; - struct bcm_sdhci_softc { device_t sc_dev; struct mtx sc_mtx; @@ -125,9 +122,10 @@ struct bcm_sdhci_softc { bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; uint32_t cmd_and_mode; - bus_addr_t dmamap_seg_addrs[1]; - bus_size_t dmamap_seg_sizes[1]; + bus_addr_t dmamap_seg_addrs[NUM_DMA_SEGS]; + bus_size_t dmamap_seg_sizes[NUM_DMA_SEGS]; int dmamap_seg_count; + int dmamap_seg_index; int dmamap_status; }; @@ -255,7 +253,7 @@ bcm_sdhci_attach(device_t dev) err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - BCM_SDHCI_BUFFER_SIZE, 1, BCM_SDHCI_BUFFER_SIZE, + BCM_SDHCI_BUFFER_SIZE, NUM_DMA_SEGS, BCM_SDHCI_BUFFER_SIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->sc_dma_tag); @@ -428,18 +426,79 @@ bcm_sdhci_min_freq(device_t dev, struct } static void +bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc) +{ + struct sdhci_slot *slot; + vm_paddr_t pdst, psrc; + int err, idx, len, sync_op; + + slot = &sc->sc_slot; + idx = sc->dmamap_seg_index++; + len = sc->dmamap_seg_sizes[idx]; + slot->offset += len; + + if (slot->curcmd->data->flags & MMC_DATA_READ) { + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, + BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); + bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, + BCM_DMA_INC_ADDR, + (len & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + psrc = sc->sc_sdhci_buffer_phys; + pdst = sc->dmamap_seg_addrs[idx]; + sync_op = BUS_DMASYNC_PREREAD; + } else { + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, + BCM_DMA_INC_ADDR, + (len & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, + BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); + psrc = sc->dmamap_seg_addrs[idx]; + pdst = sc->sc_sdhci_buffer_phys; + sync_op = BUS_DMASYNC_PREWRITE; + } + + /* + * When starting a new DMA operation do the busdma sync operation, and + * disable SDCHI data interrrupts because we'll be driven by DMA + * interrupts (or SDHCI error interrupts) until the IO is done. + */ + if (idx == 0) { + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | + SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(sc->sc_dev, &sc->sc_slot, SDHCI_SIGNAL_ENABLE, + slot->intmask); + } + + /* + * Start the DMA transfer. Only programming errors (like failing to + * allocate a channel) cause a non-zero return from bcm_dma_start(). + */ + err = bcm_dma_start(sc->sc_dma_ch, psrc, pdst, len); + KASSERT((err == 0), ("bcm2835_sdhci: failed DMA start")); +} + +static void bcm_sdhci_dma_intr(int ch, void *arg) { struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg; struct sdhci_slot *slot = &sc->sc_slot; uint32_t reg, mask; - vm_paddr_t pdst, psrc; - size_t len; int left, sync_op; mtx_lock(&slot->mtx); - len = bcm_dma_length(sc->sc_dma_ch); + /* + * If there are more segments for the current dma, start the next one. + * Otherwise unload the dma map and decide what to do next based on the + * status of the sdhci controller and whether there's more data left. + */ + if (sc->dmamap_seg_index < sc->dmamap_seg_count) { + bcm_sdhci_start_dma_seg(sc); + mtx_unlock(&slot->mtx); + return; + } + if (slot->curcmd->data->flags & MMC_DATA_READ) { sync_op = BUS_DMASYNC_POSTREAD; mask = SDHCI_INT_DATA_AVAIL; @@ -450,8 +509,8 @@ bcm_sdhci_dma_intr(int ch, void *arg) bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); bus_dmamap_unload(sc->sc_dma_tag, sc->sc_dma_map); - slot->offset += len; - sc->sc_dma_inuse = 0; + sc->dmamap_seg_count = 0; + sc->dmamap_seg_index = 0; left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); @@ -475,7 +534,6 @@ bcm_sdhci_dma_intr(int ch, void *arg) else { /* already available? */ if (reg & mask) { - sc->sc_dma_inuse = 1; /* ACK for DATA_AVAIL or SPACE_AVAIL */ bcm_sdhci_write_4(slot->bus, slot, @@ -489,24 +547,7 @@ bcm_sdhci_dma_intr(int ch, void *arg) slot->curcmd->error = MMC_ERR_NO_MEMORY; sdhci_finish_data(slot); } else { - if (slot->curcmd->data->flags & MMC_DATA_READ) { - psrc = sc->sc_sdhci_buffer_phys; - pdst = sc->dmamap_seg_addrs[0]; - sync_op = BUS_DMASYNC_PREREAD; - } else { - psrc = sc->dmamap_seg_addrs[0]; - pdst = sc->sc_sdhci_buffer_phys; - sync_op = BUS_DMASYNC_PREWRITE; - } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - sync_op); - if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, - left)) { - device_printf(sc->sc_dev, - "failed DMA start\n"); - slot->curcmd->error = MMC_ERR_FAILED; - sdhci_finish_data(slot); - } + bcm_sdhci_start_dma_seg(sc); } } else { /* wait for next data by INT */ @@ -528,7 +569,7 @@ bcm_sdhci_read_dma(device_t dev, struct struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - if (sc->sc_dma_inuse) { + if (sc->dmamap_seg_count != 0) { device_printf(sc->sc_dev, "DMA in use\n"); return; } @@ -547,25 +588,8 @@ bcm_sdhci_read_dma(device_t dev, struct return; } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); - - bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, - BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); - bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, - BCM_DMA_INC_ADDR, - (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - - sc->sc_dma_inuse = 1; - /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - sc->dmamap_seg_addrs[0], left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static void @@ -574,7 +598,7 @@ bcm_sdhci_write_dma(device_t dev, struct struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - if (sc->sc_dma_inuse) { + if (sc->dmamap_seg_count != 0) { device_printf(sc->sc_dev, "DMA in use\n"); return; } @@ -593,25 +617,8 @@ bcm_sdhci_write_dma(device_t dev, struct return; } - bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, - BCM_DMA_INC_ADDR, - (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, - BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); - - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREWRITE); - - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - - sc->sc_dma_inuse = 1; - /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->dmamap_seg_addrs[0], - sc->sc_sdhci_buffer_phys, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static int From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 02:50:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3504F56F; Mon, 12 Jan 2015 02:50:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2010F2B6; Mon, 12 Jan 2015 02:50:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C2oMfZ009050; Mon, 12 Jan 2015 02:50:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2oMai009049; Mon, 12 Jan 2015 02:50:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501120250.t0C2oMai009049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 12 Jan 2015 02:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277039 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:50:23 -0000 Author: gjb Date: Mon Jan 12 02:50:22 2015 New Revision: 277039 URL: https://svnweb.freebsd.org/changeset/base/277039 Log: Document r276986, hint.acpi_throttle.0.disabled="1" and hint.p4tcc.0.disabled="1" by default. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:42:33 2015 (r277038) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:50:22 2015 (r277039) @@ -20,6 +20,8 @@ $FreeBSD$ + + 2015 The &os; Documentation @@ -116,7 +118,9 @@ Kernel Changes -   + Throttling via ACPI + and P4TCC via &man.device.hints.5; have + been turned off by default. Virtualization Support From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 03:06:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF5FEA5F; Mon, 12 Jan 2015 03:06:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB6C47B2; Mon, 12 Jan 2015 03:06:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C36Tcj017120; Mon, 12 Jan 2015 03:06:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C36TiX017119; Mon, 12 Jan 2015 03:06:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501120306.t0C36TiX017119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 03:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277040 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:06:29 -0000 Author: emaste Date: Mon Jan 12 03:06:29 2015 New Revision: 277040 URL: https://svnweb.freebsd.org/changeset/base/277040 Log: Add ELF Tool Chain release notes Most recent import in r276398 and switch to ELF Tool Chain tools by default in r276796. Reviewed by: gjb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1501 Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:50:22 2015 (r277039) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 03:06:29 2015 (r277040) @@ -777,12 +777,26 @@ patches that add new relocations for &arch.powerpc; support. + The + ELF Tool Chain has been updated to + upstream revision r3136. + The texinfo utility and info pages were removed from the base system. The print/texinfo port should be installed on systems where info pages are needed. + + The ELF + object manipulation tools + addr2line, + elfcopy (strip), + nm, + size, and + strings were switched to the + versions from the ELF Tool Chain project. + From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 03:14:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F9C8E8A; Mon, 12 Jan 2015 03:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BA038E5; Mon, 12 Jan 2015 03:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C3EsCq021598; Mon, 12 Jan 2015 03:14:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C3EsBD021597; Mon, 12 Jan 2015 03:14:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501120314.t0C3EsBD021597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 12 Jan 2015 03:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277041 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:14:55 -0000 Author: gjb Date: Mon Jan 12 03:14:54 2015 New Revision: 277041 URL: https://svnweb.freebsd.org/changeset/base/277041 Log: Document r276991, Remove termcap(5) entry reordering; install termcap(5) verbatim instead. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 03:06:29 2015 (r277040) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 03:14:54 2015 (r277041) @@ -20,7 +20,7 @@ $FreeBSD$ - + 2015 @@ -206,6 +206,13 @@ updated to support capability mode provided by &man.capsicum.4;. + The &man.termcap.5; file is installed + as-is from sources, instead of reordering, creating + /etc/termcap.db by default, providing + a performance improvements to applications that use the + &man.termcap.5; database, such as &man.vi.1; and + &man.ncurses.3;. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 03:23:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2834731C; Mon, 12 Jan 2015 03:23:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1329D9B2; Mon, 12 Jan 2015 03:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C3NJcv026519; Mon, 12 Jan 2015 03:23:19 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C3NG0p026506; Mon, 12 Jan 2015 03:23:16 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501120323.t0C3NG0p026506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 12 Jan 2015 03:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277042 - in head/sys: arm/conf arm/ti arm/ti/am335x boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:23:19 -0000 Author: loos Date: Mon Jan 12 03:23:16 2015 New Revision: 277042 URL: https://svnweb.freebsd.org/changeset/base/277042 Log: Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p. To cut off the power we need to start the shutdown sequence by writing the OFF bit on PMIC. Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE pin when it is ready for the PMIC to cut off the power. This is done by triggering the ALARM2 interrupt on SoC RTC. The RTC driver only works in power management mode which means it won't provide any kind of time keeping functionality. It only implements a way to trigger the ALARM2 interrupt when requested. Differential Revision: https://reviews.freebsd.org/D1489 Reviewed by: rpaulo MFC after: 2 weeks Added: head/sys/arm/ti/am335x/am335x_rtc.c (contents, props changed) head/sys/arm/ti/am335x/am335x_rtcreg.h (contents, props changed) head/sys/arm/ti/am335x/am335x_rtcvar.h (contents, props changed) Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/am335x/am335x_pmic.c head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/ti_prcm.h head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/conf/BEAGLEBONE Mon Jan 12 03:23:16 2015 (r277042) @@ -101,6 +101,8 @@ device iic device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) +device am335x_rtc # RTC support (power management only) + # Console and misc device uart device uart_ns8250 Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/am335x/am335x_pmic.c Mon Jan 12 03:23:16 2015 (r277042) @@ -31,11 +31,13 @@ __FBSDID("$FreeBSD$"); */ #include #include +#include #include #include #include #include #include +#include #include #include @@ -46,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "iicbus_if.h" #define TPS65217A 0x7 @@ -56,6 +60,10 @@ __FBSDID("$FreeBSD$"); /* TPS65217 Reisters */ #define TPS65217_CHIPID_REG 0x00 #define TPS65217_STATUS_REG 0x0A +#define TPS65217_STATUS_OFF (1U << 7) +#define TPS65217_STATUS_ACPWR (1U << 3) +#define TPS65217_STATUS_USBPWR (1U << 2) +#define TPS65217_STATUS_BT (1U << 0) #define MAX_IIC_DATA_SIZE 2 @@ -66,6 +74,8 @@ struct am335x_pmic_softc { struct intr_config_hook enum_hook; }; +static void am335x_pmic_shutdown(void *, int); + static int am335x_pmic_read(device_t dev, uint8_t addr, uint8_t *data, uint8_t size) { @@ -77,7 +87,6 @@ am335x_pmic_read(device_t dev, uint8_t a return (iicbus_transfer(dev, msg, 2)); } -#ifdef notyet static int am335x_pmic_write(device_t dev, uint8_t address, uint8_t *data, uint8_t size) { @@ -95,7 +104,6 @@ am335x_pmic_write(device_t dev, uint8_t return (iicbus_transfer(dev, msg, 1)); } -#endif static int am335x_pmic_probe(device_t dev) @@ -146,6 +154,9 @@ am335x_pmic_start(void *xdev) am335x_pmic_read(dev, TPS65217_STATUS_REG, ®, 1); device_printf(dev, "%s powered by %s\n", name, pwr[(reg>>2)&0x03]); + EVENTHANDLER_REGISTER(shutdown_final, am335x_pmic_shutdown, dev, + SHUTDOWN_PRI_LAST); + config_intrhook_disestablish(&sc->enum_hook); } @@ -165,6 +176,22 @@ am335x_pmic_attach(device_t dev) return (0); } +static void +am335x_pmic_shutdown(void *xdev, int howto) +{ + device_t dev; + uint8_t reg; + + if (!(howto & RB_POWEROFF)) + return; + dev = (device_t)xdev; + /* Set the OFF bit on status register to start the shutdown sequence. */ + reg = TPS65217_STATUS_OFF; + am335x_pmic_write(dev, TPS65217_STATUS_REG, ®, 1); + /* Toggle pmic_pwr_enable to shutdown the PMIC. */ + am335x_rtc_pmic_pwr_toggle(); +} + static device_method_t am335x_pmic_methods[] = { DEVMETHOD(device_probe, am335x_pmic_probe), DEVMETHOD(device_attach, am335x_pmic_attach), Modified: head/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_prcm.c Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/am335x/am335x_prcm.c Mon Jan 12 03:23:16 2015 (r277042) @@ -118,6 +118,10 @@ __FBSDID("$FreeBSD$"); #define CLKSEL_TIMER6_CLK (CM_DPLL + 0x01C) #define CLKSEL_PRUSS_OCP_CLK (CM_DPLL + 0x030) +#define CM_RTC 0x800 +#define CM_RTC_RTC_CLKCTRL (CM_RTC + 0x000) +#define CM_RTC_CLKSTCTRL (CM_RTC + 0x004) + #define PRM_PER 0xC00 #define PRM_PER_RSTCTRL (PRM_PER + 0x00) @@ -295,7 +299,8 @@ struct ti_clock_dev ti_am335x_clk_devmap .clk_get_source_freq = NULL, }, - + /* RTC */ + AM335X_GENERIC_CLOCK_DEV(RTC_CLK), { INVALID_CLK_IDENT, NULL, NULL, NULL, NULL } }; @@ -363,6 +368,9 @@ static struct am335x_clk_details g_am335 _CLK_DETAIL(MAILBOX0_CLK, CM_PER_MAILBOX0_CLKCTRL, 0), _CLK_DETAIL(SPINLOCK0_CLK, CM_PER_SPINLOCK0_CLKCTRL, 0), + /* RTC module */ + _CLK_DETAIL(RTC_CLK, CM_RTC_RTC_CLKCTRL, 0), + { INVALID_CLK_IDENT, 0}, }; Added: head/sys/arm/ti/am335x/am335x_rtc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_rtc.c Mon Jan 12 03:23:16 2015 (r277042) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2015 Luiz Otavio O Souza + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#define RTC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define RTC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define RTC_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "am335x_rtc", MTX_DEF) +#define RTC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) + +#define RTC_READ4(_sc, reg) \ + bus_read_4((_sc)->sc_mem_res, reg) +#define RTC_WRITE4(_sc, reg, value) \ + bus_write_4((_sc)->sc_mem_res, reg, value) + +#define RTC_MAXIRQS 2 + +struct am335x_rtc_softc { + device_t sc_dev; + struct mtx sc_mtx; + struct resource *sc_irq_res[RTC_MAXIRQS]; + struct resource *sc_mem_res; +}; + +static struct am335x_rtc_softc *rtc_sc = NULL; +static struct resource_spec am335x_rtc_irq_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static int +am335x_rtc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,da830-rtc")) + return (ENXIO); + device_set_desc(dev, "AM335x RTC (power management mode)"); + + return (BUS_PROBE_DEFAULT); +} + +static int +am335x_rtc_attach(device_t dev) +{ + int rid; + struct am335x_rtc_softc *sc; + uint32_t rev; + + if (rtc_sc != NULL) + return (ENXIO); + rtc_sc = sc = device_get_softc(dev); + sc->sc_dev = dev; + rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->sc_mem_res) { + device_printf(dev, "cannot allocate memory resources\n"); + return (ENXIO); + } + if (bus_alloc_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res) != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + device_printf(dev, "cannot allocate irq resources\n"); + return (ENXIO); + } + RTC_LOCK_INIT(sc); + + /* Enable the RTC module. */ + ti_prcm_clk_enable(RTC_CLK); + rev = RTC_READ4(sc, RTC_REVISION); + device_printf(dev, "AM335X RTC v%d.%d.%d\n", + (rev >> 8) & 0x7, (rev >> 6) & 0x3, rev & 0x3f); + /* Unlock the RTC. */ + RTC_WRITE4(sc, RTC_KICK0R, RTC_KICK0R_PASS); + RTC_WRITE4(sc, RTC_KICK1R, RTC_KICK1R_PASS); + /* Stop the RTC, we don't need it right now. */ + RTC_WRITE4(sc, RTC_CTRL, 0); + /* Disable interrupts. */ + RTC_WRITE4(sc, RTC_INTR, 0); + /* Ack any pending interrupt. */ + RTC_WRITE4(sc, RTC_STATUS, RTC_STATUS_ALARM2 | RTC_STATUS_ALARM); + /* Enable external clock (xtal) and 32 kHz clock. */ + RTC_WRITE4(sc, RTC_OSC, RTC_OSC_32KCLK_EN | RTC_OSC_32KCLK_SEL); + /* Enable pmic_pwr_enable. */ + RTC_WRITE4(sc, RTC_PMIC, PMIC_PWR_ENABLE); + + return (0); +} + +static int +am335x_rtc_detach(device_t dev) +{ + struct am335x_rtc_softc *sc; + + sc = device_get_softc(dev); + if (sc->sc_irq_res) + bus_release_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + RTC_LOCK_DESTROY(sc); + + return (0); +} + +void +am335x_rtc_pmic_pwr_toggle(void) +{ + int timeout; + struct clocktime ct; + struct timespec ts; + + /* + * We stop the RTC so we don't need to check the STATUS.BUSY bit + * before update ALARM2 registers. + */ + timeout = 10; + RTC_WRITE4(rtc_sc, RTC_CTRL, 0); + while (--timeout && RTC_READ4(rtc_sc, RTC_STATUS) & RTC_STATUS_RUN) + DELAY(100); + if (timeout == 0) { + device_printf(rtc_sc->sc_dev, "RTC does not stop.\n"); + return; + } + /* Program the ALARM2 to fire in 2 seconds. */ + ct.dow = 0; + ct.nsec = 0; + ct.sec = FROMBCD(RTC_READ4(rtc_sc, RTC_SECONDS) & 0x7f); + ct.min = FROMBCD(RTC_READ4(rtc_sc, RTC_MINUTES) & 0x7f); + ct.hour = FROMBCD(RTC_READ4(rtc_sc, RTC_HOURS) & 0x3f); + ct.day = FROMBCD(RTC_READ4(rtc_sc, RTC_DAYS) & 0x3f); + ct.mon = FROMBCD(RTC_READ4(rtc_sc, RTC_MONTHS) & 0x1f); + ct.year = FROMBCD(RTC_READ4(rtc_sc, RTC_YEARS) & 0xff); + ct.year += POSIX_BASE_YEAR; + clock_ct_to_ts(&ct, &ts); + ts.tv_sec += 2; + clock_ts_to_ct(&ts, &ct); + RTC_WRITE4(rtc_sc, RTC_ALARM2_SECONDS, TOBCD(ct.sec)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_MINUTES, TOBCD(ct.min)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_HOURS, TOBCD(ct.hour)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_DAYS, TOBCD(ct.day)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_MONTHS, TOBCD(ct.mon)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_YEARS, TOBCD(ct.year - POSIX_BASE_YEAR)); + /* Enable ALARM2 interrupt. */ + RTC_WRITE4(rtc_sc, RTC_INTR, RTC_INTR_ALARM2); + /* Start count. */ + RTC_WRITE4(rtc_sc, RTC_CTRL, RTC_CTRL_RUN); +} + +static device_method_t am335x_rtc_methods[] = { + DEVMETHOD(device_probe, am335x_rtc_probe), + DEVMETHOD(device_attach, am335x_rtc_attach), + DEVMETHOD(device_detach, am335x_rtc_detach), + + DEVMETHOD_END +}; + +static driver_t am335x_rtc_driver = { + "am335x_rtc", + am335x_rtc_methods, + sizeof(struct am335x_rtc_softc), +}; + +static devclass_t am335x_rtc_devclass; + +DRIVER_MODULE(am335x_rtc, simplebus, am335x_rtc_driver, am335x_rtc_devclass, 0, 0); +MODULE_VERSION(am335x_rtc, 1); +MODULE_DEPEND(am335x_rtc, simplebus, 1, 1, 1); Added: head/sys/arm/ti/am335x/am335x_rtcreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_rtcreg.h Mon Jan 12 03:23:16 2015 (r277042) @@ -0,0 +1,76 @@ +/*- + * Copyright 2015 Luiz Otavio O Souza + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _AM335X_RTCREG_H_ +#define _AM335X_RTCREG_H_ + +#define RTC_SECONDS 0x00 +#define RTC_MINUTES 0x04 +#define RTC_HOURS 0x08 +#define RTC_DAYS 0x0c +#define RTC_MONTHS 0x10 +#define RTC_YEARS 0x14 +#define RTC_WEEK 0x18 +#define RTC_CTRL 0x40 +#define RTC_CTRL_DISABLE (1U << 6) +#define RTC_CTRL_RUN (1U << 0) +#define RTC_STATUS 0x44 +#define RTC_STATUS_ALARM2 (1U << 7) +#define RTC_STATUS_ALARM (1U << 6) +#define RTC_STATUS_1D_EVENT (1U << 5) +#define RTC_STATUS_1H_EVENT (1U << 4) +#define RTC_STATUS_1M_EVENT (1U << 3) +#define RTC_STATUS_1S_EVENT (1U << 2) +#define RTC_STATUS_RUN (1U << 1) +#define RTC_STATUS_BUSY (1U << 0) +#define RTC_INTR 0x48 +#define RTC_INTR_ALARM2 (1U << 4) +#define RTC_INTR_ALARM (1U << 3) +#define RTC_INTR_TIMER (1U << 2) +#define RTC_OSC 0x54 +#define RTC_OSC_32KCLK_EN (1U << 6) +#define RTC_OSC_OSC32K_GZ (1U << 4) +#define RTC_OSC_32KCLK_SEL (1U << 3) +#define RTC_OSC_RES_SELECT (1U << 2) +#define RTC_OSC_SW2 (1U << 1) +#define RTC_OSC_SW1 (1U << 0) +#define RTC_KICK0R 0x6c +#define RTC_KICK0R_PASS 0x83e70b13 +#define RTC_KICK1R 0x70 +#define RTC_KICK1R_PASS 0x95a4f1e0 +#define RTC_REVISION 0x74 +#define RTC_ALARM2_SECONDS 0x80 +#define RTC_ALARM2_MINUTES 0x84 +#define RTC_ALARM2_HOURS 0x88 +#define RTC_ALARM2_DAYS 0x8c +#define RTC_ALARM2_MONTHS 0x90 +#define RTC_ALARM2_YEARS 0x94 +#define RTC_PMIC 0x98 +#define PMIC_PWR_ENABLE (1U << 16) + +#endif /* _AM335X_RTCREG_H_ */ Added: head/sys/arm/ti/am335x/am335x_rtcvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_rtcvar.h Mon Jan 12 03:23:16 2015 (r277042) @@ -0,0 +1,34 @@ +/*- + * Copyright 2015 Luiz Otavio O Souza + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _AM335X_RTCVAR_H_ +#define _AM335X_RTCVAR_H_ + +void am335x_rtc_pmic_pwr_toggle(void); + +#endif /* _AM335X_RTCVAR_H_ */ Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/am335x/files.am335x Mon Jan 12 03:23:16 2015 (r277042) @@ -9,6 +9,7 @@ arm/ti/am335x/am335x_lcd_syscons.c optio arm/ti/am335x/am335x_pmic.c optional am335x_pmic arm/ti/am335x/am335x_prcm.c standard arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_rtc.c optional am335x_rtc arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_usbss.c optional musb fdt Modified: head/sys/arm/ti/ti_prcm.h ============================================================================== --- head/sys/arm/ti/ti_prcm.h Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/ti_prcm.h Mon Jan 12 03:23:16 2015 (r277042) @@ -164,6 +164,9 @@ typedef enum { TSC_ADC_CLK = 1800, + /* RTC module */ + RTC_CLK = 1900, + INVALID_CLK_IDENT } clk_ident_t; Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 12 03:23:16 2015 (r277042) @@ -75,6 +75,13 @@ interrupt-parent = <&AINTC>; }; + rtc: rtc@44E3E000 { + compatible = "ti,da830-rtc"; + reg = <0x44E3E000 0x1000>; + interrupts = < 75 76 >; + interrupt-parent = <&AINTC>; + }; + adc0: adc@44E0D000 { compatible = "ti,adc"; reg = <0x44E0D000 0x2000>; From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 03:39:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1AAB6FF; Mon, 12 Jan 2015 03:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EC22ADF; Mon, 12 Jan 2015 03:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C3dvxZ032091; Mon, 12 Jan 2015 03:39:57 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C3dvF8032090; Mon, 12 Jan 2015 03:39:57 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201501120339.t0C3dvF8032090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 12 Jan 2015 03:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277043 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:39:57 -0000 Author: grehan Date: Mon Jan 12 03:39:56 2015 New Revision: 277043 URL: https://svnweb.freebsd.org/changeset/base/277043 Log: Add PCI ID for the Oxford Semiconductor OXPCIe952 device. Seen on the StarTech "1 Port Native ExpressCard RS232 Serial AdapterCard with 16950 UART" Reported and tested by: Michael Dexter MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Mon Jan 12 03:23:16 2015 (r277042) +++ head/sys/dev/uart/uart_bus_pci.c Mon Jan 12 03:39:56 2015 (r277043) @@ -112,6 +112,8 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0xffff, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 06:34:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 347E3C0A; Mon, 12 Jan 2015 06:34:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16C76C54; Mon, 12 Jan 2015 06:34:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C6YOd6015476; Mon, 12 Jan 2015 06:34:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C6YOfN015470; Mon, 12 Jan 2015 06:34:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501120634.t0C6YOfN015470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 12 Jan 2015 06:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277044 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 06:34:25 -0000 Author: hselasky Date: Mon Jan 12 06:34:23 2015 New Revision: 277044 URL: https://svnweb.freebsd.org/changeset/base/277044 Log: Increase the maximum number of dynamic USB quirks. USB memory stick devices which don't support the synchronize cache SCSI command are likely to also not support the prevent-allow medium removal SCSI command. PR: 185747 MFC after: 1 week Modified: head/sys/dev/usb/usb_freebsd.h head/sys/dev/usb/usb_freebsd_loader.h head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_freebsd.h ============================================================================== --- head/sys/dev/usb/usb_freebsd.h Mon Jan 12 03:39:56 2015 (r277043) +++ head/sys/dev/usb/usb_freebsd.h Mon Jan 12 06:34:23 2015 (r277044) @@ -88,7 +88,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: head/sys/dev/usb/usb_freebsd_loader.h ============================================================================== --- head/sys/dev/usb/usb_freebsd_loader.h Mon Jan 12 03:39:56 2015 (r277043) +++ head/sys/dev/usb/usb_freebsd_loader.h Mon Jan 12 06:34:23 2015 (r277044) @@ -83,7 +83,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Mon Jan 12 03:39:56 2015 (r277043) +++ head/sys/dev/usb/usb_msctest.c Mon Jan 12 06:34:23 2015 (r277044) @@ -718,10 +718,11 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -748,10 +749,13 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache\n"); + "handle synchronize cache nor" + "prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; @@ -795,6 +799,7 @@ error: DPRINTF("Device did not respond, enabling all quirks\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY); /* Need to re-enumerate the device */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:24:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06D56373; Mon, 12 Jan 2015 07:24:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5E4D10A; Mon, 12 Jan 2015 07:24:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7O4MA038631; Mon, 12 Jan 2015 07:24:04 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7O1ha038613; Mon, 12 Jan 2015 07:24:01 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501120724.t0C7O1ha038613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 12 Jan 2015 07:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277045 - in vendor/unbound/dist: . daemon doc services smallapp util X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:24:05 -0000 Author: des Date: Mon Jan 12 07:24:01 2015 New Revision: 277045 URL: https://svnweb.freebsd.org/changeset/base/277045 Log: Merge upstream version of the local socket patch (upstream svn revisions 3304 through 3309). Modified: vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/listen_dnsport.h vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h Modified: vendor/unbound/dist/config.h.in ============================================================================== --- vendor/unbound/dist/config.h.in Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/config.h.in Mon Jan 12 07:24:01 2015 (r277045) @@ -350,6 +350,9 @@ /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST +/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ +#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN + /* Define if you have Swig libraries and header files. */ #undef HAVE_SWIG Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/configure Mon Jan 12 07:24:01 2015 (r277045) @@ -13713,7 +13713,7 @@ CC="$lt_save_CC" # Checks for header files. -for ac_header in stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h +for ac_header in stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default @@ -17820,6 +17820,22 @@ fi fi +ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" " +$ac_includes_default +#ifdef HAVE_SYS_UN_H +#include +#endif + +" +if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1 +_ACEOF + + +fi + ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" " $ac_includes_default #if HAVE_SYS_PARAM_H Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/configure.ac Mon Jan 12 07:24:01 2015 (r277045) @@ -938,6 +938,12 @@ if test $ac_cv_func_daemon = yes; then ]) fi +AC_CHECK_MEMBERS([struct sockaddr_un.sun_len],,,[ +AC_INCLUDES_DEFAULT +#ifdef HAVE_SYS_UN_H +#include +#endif +]) AC_CHECK_MEMBERS([struct in_pktinfo.ipi_spec_dst],,,[ AC_INCLUDES_DEFAULT #if HAVE_SYS_PARAM_H Modified: vendor/unbound/dist/daemon/remote.c ============================================================================== --- vendor/unbound/dist/daemon/remote.c Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/daemon/remote.c Mon Jan 12 07:24:01 2015 (r277045) @@ -142,6 +142,7 @@ timeval_divide(struct timeval* avg, cons * The following function was generated using the openssl utility, using * the command : "openssl dhparam -dsaparam -C 512" */ +#ifndef S_SPLINT_S DH *get_dh512() { static unsigned char dh512_p[]={ @@ -170,6 +171,7 @@ DH *get_dh512() dh->length = 160; return(dh); } +#endif /* SPLINT */ struct daemon_remote* daemon_remote_create(struct config_file* cfg) @@ -299,6 +301,7 @@ void daemon_remote_delete(struct daemon_ * @param nr: port nr * @param list: list head * @param noproto_is_err: if lack of protocol support is an error. + * @param cfg: config with username for chown of unix-sockets. * @return false on failure. */ static int @@ -326,7 +329,7 @@ add_open(const char* ip, int nr, struct if(fd != -1) { if (cfg->username && cfg->username[0]) chown(ip, cfg->uid, cfg->gid); - chmod(ip, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); + chmod(ip, (mode_t)(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)); } } else { hints.ai_socktype = SOCK_STREAM; Modified: vendor/unbound/dist/daemon/unbound.c ============================================================================== --- vendor/unbound/dist/daemon/unbound.c Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/daemon/unbound.c Mon Jan 12 07:24:01 2015 (r277045) @@ -441,8 +441,6 @@ static void perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode, const char** cfgfile) { - log_assert(cfg); - #ifdef HAVE_GETPWNAM struct passwd *pwd = NULL; @@ -653,6 +651,7 @@ run_daemon(const char* cfgfile, int cmdl log_warn("Continuing with default config settings"); } apply_settings(daemon, cfg, cmdline_verbose, debug_mode); + config_lookup_uid(cfg); /* prepare */ if(!daemon_open_shared_ports(daemon)) Modified: vendor/unbound/dist/doc/Changelog ============================================================================== --- vendor/unbound/dist/doc/Changelog Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/doc/Changelog Mon Jan 12 07:24:01 2015 (r277045) @@ -1,6 +1,11 @@ 8 December 2014: Wouter - Fix CVE-2014-8602: denial of service by making resolver chase endless series of delegations. + - patch for remote control over local sockets, from Dag-Erling + Smorgrav, Ilya Bakulin. Use control-interface: /path/sock and + control-use-cert: no. + - Fixup that patch and uid lookup (only for daemon). + - coded the default of control-use-cert, to yes. 1 December 2014: Wouter - Fix bug#632: unbound fails to build on AArch64, protects Modified: vendor/unbound/dist/doc/unbound.conf.5.in ============================================================================== --- vendor/unbound/dist/doc/unbound.conf.5.in Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/doc/unbound.conf.5.in Mon Jan 12 07:24:01 2015 (r277045) @@ -976,7 +976,7 @@ default is 8953. If you change this and permissions have been dropped, you must restart the server for the change to take effect. .TP 5 -.B control-use-cert: \fI +.B control\-use\-cert: \fI Whether to require certificate authentication of control connections. The default is "yes". This should not be changed unless there are other mechanisms in place Modified: vendor/unbound/dist/services/listen_dnsport.c ============================================================================== --- vendor/unbound/dist/services/listen_dnsport.c Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/services/listen_dnsport.c Mon Jan 12 07:24:01 2015 (r277045) @@ -576,15 +576,19 @@ create_tcp_accept_sock(struct addrinfo * } int -create_local_accept_sock(char *path, int* noproto) +create_local_accept_sock(const char *path, int* noproto) { #ifdef HAVE_SYS_UN_H int s; struct sockaddr_un sun; - sun.sun_len = sizeof(sun); +#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN + /* this member exists on BSDs, not Linux */ + sun.sun_len = (sa_family_t)sizeof(sun); +#endif sun.sun_family = AF_LOCAL; - strlcpy(sun.sun_path, path, 104); + /* length is 92-108, 104 on FreeBSD */ + (void)strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); if ((s = socket(PF_LOCAL, SOCK_STREAM, 0)) == -1) { log_err("Cannot create local socket %s (%s)", @@ -600,7 +604,7 @@ create_local_accept_sock(char *path, int } if (bind(s, (struct sockaddr *)&sun, - sizeof(struct sockaddr_un)) == -1) { + (socklen_t)sizeof(struct sockaddr_un)) == -1) { log_err("Cannot bind local socket %s (%s)", path, strerror(errno)); return -1; @@ -616,6 +620,7 @@ create_local_accept_sock(char *path, int return -1; } + (void)noproto; /*unused*/ return s; #else log_err("Local sockets are not supported"); Modified: vendor/unbound/dist/services/listen_dnsport.h ============================================================================== --- vendor/unbound/dist/services/listen_dnsport.h Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/services/listen_dnsport.h Mon Jan 12 07:24:01 2015 (r277045) @@ -214,6 +214,6 @@ int create_tcp_accept_sock(struct addrin * are not supported. * @return: the socket. -1 on error. */ -int create_local_accept_sock(char* path, int* noproto); +int create_local_accept_sock(const char* path, int* noproto); #endif /* LISTEN_DNSPORT_H */ Modified: vendor/unbound/dist/smallapp/unbound-control.c ============================================================================== --- vendor/unbound/dist/smallapp/unbound-control.c Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/smallapp/unbound-control.c Mon Jan 12 07:24:01 2015 (r277045) @@ -140,7 +140,7 @@ static void ssl_err(const char* s) static SSL_CTX* setup_ctx(struct config_file* cfg) { - char* s_cert, *c_key, *c_cert; + char* s_cert=NULL, *c_key=NULL, *c_cert=NULL; SSL_CTX* ctx; if(cfg->remote_control_use_cert) { @@ -206,9 +206,11 @@ contact_server(const char* svr, struct c } else if(svr[0] == '/') { struct sockaddr_un* sun = (struct sockaddr_un *) &addr; sun->sun_family = AF_LOCAL; - sun->sun_len = sizeof(sun); - strlcpy(sun->sun_path, svr, 104); - addrlen = sizeof(struct sockaddr_un); +#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN + sun->sun_len = (sa_family_t)sizeof(sun); +#endif + (void)strlcpy(sun->sun_path, svr, sizeof(sun->sun_path)); + addrlen = (socklen_t)sizeof(struct sockaddr_un); addrfamily = AF_LOCAL; #endif } else { Modified: vendor/unbound/dist/util/config_file.c ============================================================================== --- vendor/unbound/dist/util/config_file.c Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/util/config_file.c Mon Jan 12 07:24:01 2015 (r277045) @@ -201,6 +201,7 @@ config_create(void) cfg->remote_control_enable = 0; cfg->control_ifs = NULL; cfg->control_port = UNBOUND_CONTROL_PORT; + cfg->remote_control_use_cert = 1; cfg->minimal_responses = 0; cfg->rrset_roundrobin = 0; cfg->max_udp_size = 4096; @@ -805,16 +806,6 @@ config_read(struct config_file* cfg, con return 0; } -#ifdef HAVE_GETPWNAM - /* translate username into uid and gid */ - if(cfg->username && cfg->username[0]) { - struct passwd *pwd; - if((pwd = getpwnam(cfg->username)) == NULL) - log_err("user '%s' does not exist.", cfg->username); - cfg->uid = pwd->pw_uid; - cfg->gid = pwd->pw_gid; - } -#endif return 1; } @@ -1203,6 +1194,20 @@ config_apply(struct config_file* config) log_set_time_asc(config->log_time_ascii); } +void config_lookup_uid(struct config_file* cfg) +{ +#ifdef HAVE_GETPWNAM + /* translate username into uid and gid */ + if(cfg->username && cfg->username[0]) { + struct passwd *pwd; + if((pwd = getpwnam(cfg->username)) == NULL) + log_err("user '%s' does not exist.", cfg->username); + cfg->uid = pwd->pw_uid; + cfg->gid = pwd->pw_gid; + } +#endif +} + /** * Calculate string length of full pathname in original filesys * @param fname: the path name to convert. Modified: vendor/unbound/dist/util/config_file.h ============================================================================== --- vendor/unbound/dist/util/config_file.h Mon Jan 12 06:34:23 2015 (r277044) +++ vendor/unbound/dist/util/config_file.h Mon Jan 12 07:24:01 2015 (r277045) @@ -427,6 +427,12 @@ void config_delete(struct config_file* c void config_apply(struct config_file* config); /** + * Find username, sets uid and gid. + * @param config: the config structure. + */ +void config_lookup_uid(struct config_file* config); + +/** * Set the given keyword to the given value. * @param config: where to store config * @param option: option name, including the ':' character. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:29:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B70B64EB; Mon, 12 Jan 2015 07:29:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A372613A; Mon, 12 Jan 2015 07:29:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7Tag2039333; Mon, 12 Jan 2015 07:29:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7Ta8C039332; Mon, 12 Jan 2015 07:29:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501120729.t0C7Ta8C039332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 12 Jan 2015 07:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277046 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:29:36 -0000 Author: tuexen Date: Mon Jan 12 07:29:35 2015 New Revision: 277046 URL: https://svnweb.freebsd.org/changeset/base/277046 Log: Remove dead code. Reported by: Coverity CID: 1018053 MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Mon Jan 12 07:24:01 2015 (r277045) +++ head/sys/netinet/sctp_asconf.c Mon Jan 12 07:29:35 2015 (r277046) @@ -596,7 +596,7 @@ sctp_handle_asconf(struct mbuf *m, unsig uint32_t serial_num; struct mbuf *n, *m_ack, *m_result, *m_tail; struct sctp_asconf_ack_chunk *ack_cp; - struct sctp_asconf_paramhdr *aph, *ack_aph; + struct sctp_asconf_paramhdr *aph; struct sctp_ipv6addr_param *p_addr; unsigned int asconf_limit, cnt; int error = 0; /* did an error occur? */ @@ -679,13 +679,6 @@ sctp_handle_asconf(struct mbuf *m, unsig } /* param_length is already validated in process_control... */ offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */ - - /* get pointer to first asconf param in ASCONF-ACK */ - ack_aph = (struct sctp_asconf_paramhdr *)(mtod(m_ack, caddr_t)+sizeof(struct sctp_asconf_ack_chunk)); - if (ack_aph == NULL) { - SCTPDBG(SCTP_DEBUG_ASCONF1, "Gak in asconf2\n"); - return; - } /* get pointer to first asconf param in ASCONF */ aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *) & aparam_buf); if (aph == NULL) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:36:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3869168C; Mon, 12 Jan 2015 07:36:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 247AA204; Mon, 12 Jan 2015 07:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7aRPn043679; Mon, 12 Jan 2015 07:36:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7aPxW043673; Mon, 12 Jan 2015 07:36:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120736.t0C7aPxW043673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 07:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277047 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:36:27 -0000 Author: kib Date: Mon Jan 12 07:36:25 2015 New Revision: 277047 URL: https://svnweb.freebsd.org/changeset/base/277047 Log: For x86, read MAXPHYADDR, defined in SDM vol 3 4.1.4 Enumeration of Paging Features by CPUID as CPUID.80000008H:EAX[7:0], into variable cpu_maxphyaddr. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/include/md_var.h head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/amd64/amd64/initcpu.c Mon Jan 12 07:36:25 2015 (r277047) @@ -78,6 +78,7 @@ u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ +u_int cpu_maxphyaddr; /* Max phys addr width in bits */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/amd64/include/md_var.h Mon Jan 12 07:36:25 2015 (r277047) @@ -61,6 +61,7 @@ extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_maxphyaddr; extern char ctx_switch_xsave[]; extern u_int hv_high; extern char hv_vendor[]; Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/i386/i386/initcpu.c Mon Jan 12 07:36:25 2015 (r277047) @@ -107,6 +107,7 @@ u_int cpu_mon_mwait_flags; /* MONITOR/MW u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ u_int cyrix_did; /* Device ID of Cyrix CPU */ +u_int cpu_maxphyaddr; /* Max phys addr width in bits */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/i386/include/md_var.h Mon Jan 12 07:36:25 2015 (r277047) @@ -61,6 +61,7 @@ extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_maxphyaddr; extern u_int cyrix_did; #if defined(I586_CPU) && !defined(NO_F00F_HACK) extern int has_f00f_bug; Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/x86/x86/identcpu.c Mon Jan 12 07:36:25 2015 (r277047) @@ -1393,7 +1393,10 @@ identify_cpu(void) } if (cpu_exthigh >= 0x80000008) { do_cpuid(0x80000008, regs); + cpu_maxphyaddr = regs[0] & 0xff; cpu_procinfo2 = regs[2]; + } else { + cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32; } #ifdef __i386__ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:37:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDD747CA; Mon, 12 Jan 2015 07:37:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C897920D; Mon, 12 Jan 2015 07:37:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7b7xE043810; Mon, 12 Jan 2015 07:37:07 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7b7XH043809; Mon, 12 Jan 2015 07:37:07 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201501120737.t0C7b7XH043809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Mon, 12 Jan 2015 07:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277048 - head/sys/dev/sis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:37:08 -0000 Author: yongari Date: Mon Jan 12 07:37:06 2015 New Revision: 277048 URL: https://svnweb.freebsd.org/changeset/base/277048 Log: Enable receive filter in sis_rxfilter(). While I'm here add a check for driver running state for multicast filter handling. Suggested by: brad@OpenBSD.org Modified: head/sys/dev/sis/if_sis.c Modified: head/sys/dev/sis/if_sis.c ============================================================================== --- head/sys/dev/sis/if_sis.c Mon Jan 12 07:36:25 2015 (r277047) +++ head/sys/dev/sis/if_sis.c Mon Jan 12 07:37:06 2015 (r277048) @@ -758,7 +758,8 @@ sis_rxfilter_ns(struct sis_softc *sc) if_maddr_runlock(ifp); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + /* Turn the receive filter on */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } @@ -820,7 +821,8 @@ sis_rxfilter_sis(struct sis_softc *sc) CSR_WRITE_4(sc, SIS_RXFILT_DATA, hashes[i]); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + /* Turn the receive filter on */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } @@ -2015,8 +2017,6 @@ sis_initl(struct sis_softc *sc) } sis_rxfilter(sc); - /* Turn the receive filter on */ - SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ENABLE); /* * Load the address of the RX and TX lists. @@ -2138,7 +2138,8 @@ sis_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: SIS_LOCK(sc); - sis_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + sis_rxfilter(sc); SIS_UNLOCK(sc); break; case SIOCGIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:39:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC6C593D; Mon, 12 Jan 2015 07:39:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8E5E219; Mon, 12 Jan 2015 07:39:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7dqDT044153; Mon, 12 Jan 2015 07:39:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7dqqJ044152; Mon, 12 Jan 2015 07:39:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501120739.t0C7dqqJ044152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 12 Jan 2015 07:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277049 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:39:53 -0000 Author: tuexen Date: Mon Jan 12 07:39:52 2015 New Revision: 277049 URL: https://svnweb.freebsd.org/changeset/base/277049 Log: Remove dead code. Reported by: Coverity CID: 1018052 MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Jan 12 07:37:06 2015 (r277048) +++ head/sys/netinet/sctputil.c Mon Jan 12 07:39:52 2015 (r277049) @@ -5047,7 +5047,6 @@ sctp_find_ifa_by_addr(struct sockaddr *a vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { -stage_right: if (holds_lock == 0) SCTP_IPI_ADDR_RUNLOCK(); return (NULL); @@ -5067,15 +5066,6 @@ stage_right: return (NULL); } LIST_FOREACH(sctp_ifap, hash_head, next_bucket) { - if (sctp_ifap == NULL) { -#ifdef INVARIANTS - panic("Huh LIST_FOREACH corrupt"); - goto stage_right; -#else - SCTP_PRINTF("LIST corrupt of sctp_ifap's?\n"); - goto stage_right; -#endif - } if (addr->sa_family != sctp_ifap->address.sa.sa_family) continue; #ifdef INET From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:43:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0975B3C; Mon, 12 Jan 2015 07:43:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA2F2F1; Mon, 12 Jan 2015 07:43:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7hKTZ048037; Mon, 12 Jan 2015 07:43:20 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7hKvK048036; Mon, 12 Jan 2015 07:43:20 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201501120743.t0C7hKvK048036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Mon, 12 Jan 2015 07:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277050 - head/sys/dev/nge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:43:20 -0000 Author: yongari Date: Mon Jan 12 07:43:19 2015 New Revision: 277050 URL: https://svnweb.freebsd.org/changeset/base/277050 Log: Receive filter configuration is done in nge_rxfilter(). Remove unnecessary filter configuration code in nge_init_locked(). While I'm here add a check for driver running state for multicast filter handling. Also remove unnecessary assignment to error variable since it is cleared in the function entry. Suggested by: brad@OpenBSD.org Modified: head/sys/dev/nge/if_nge.c Modified: head/sys/dev/nge/if_nge.c ============================================================================== --- head/sys/dev/nge/if_nge.c Mon Jan 12 07:39:52 2015 (r277049) +++ head/sys/dev/nge/if_nge.c Mon Jan 12 07:43:19 2015 (r277050) @@ -2102,27 +2102,6 @@ nge_init_locked(struct nge_softc *sc) */ nge_list_tx_init(sc); - /* - * For the NatSemi chip, we have to explicitly enable the - * reception of ARP frames, as well as turn on the 'perfect - * match' filter where we store the station address, otherwise - * we won't receive unicasts meant for this host. - */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ARP); - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_PERFECT); - - /* - * Set the capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) { - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_BROAD); - } else { - NGE_CLRBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_BROAD); - } - - /* Turn the receive filter on. */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ENABLE); - /* Set Rx filter. */ nge_rxfilter(sc); @@ -2335,9 +2314,9 @@ nge_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: NGE_LOCK(sc); - nge_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + nge_rxfilter(sc); NGE_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:48:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CB1CCB7; Mon, 12 Jan 2015 07:48:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E867314; Mon, 12 Jan 2015 07:48:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7mMZ5048708; Mon, 12 Jan 2015 07:48:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7mMWc048707; Mon, 12 Jan 2015 07:48:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120748.t0C7mMWc048707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 07:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277051 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:48:23 -0000 Author: kib Date: Mon Jan 12 07:48:22 2015 New Revision: 277051 URL: https://svnweb.freebsd.org/changeset/base/277051 Log: Fix several issues with /dev/mem and /dev/kmem devices on amd64. For /dev/mem, when requested physical address is not accessible by the direct map, do temporal remaping with the caching attribute 'uncached'. Limit the accessible addresses by MAXPHYADDR, since the architecture disallowes writing non-zero into reserved bits of ptes (or setting garbage into NX). For /dev/kmem, only access existing kernel mappings for direct map region. For all other addresses, obtain a physical address of the mapping and fall back to the /dev/mem mechanism. This ensures that /dev/kmem i/o does not fault even if the accessed region is changed in parallel, by using either direct map or temporal mapping. For both devices, operate on one page by iteration. Do not return error if any bytes were moved around, return the (partial) bytes count to userspace. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/mem.c Modified: head/sys/amd64/amd64/mem.c ============================================================================== --- head/sys/amd64/amd64/mem.c Mon Jan 12 07:43:19 2015 (r277050) +++ head/sys/amd64/amd64/mem.c Mon Jan 12 07:48:22 2015 (r277051) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -77,13 +78,15 @@ int memrw(struct cdev *dev, struct uio *uio, int flags) { struct iovec *iov; - u_long c, v, vd; - int error, o, sflags; - vm_offset_t addr, eaddr; + void *p; + ssize_t orig_resid; + u_long v, vd; + u_int c; + int error, sflags; error = 0; - c = 0; sflags = curthread_pflags_set(TDP_DEVMEMIO); + orig_resid = uio->uio_resid; while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -93,63 +96,68 @@ memrw(struct cdev *dev, struct uio *uio, panic("memrw"); continue; } - if (dev2unit(dev) == CDEV_MINOR_MEM) { - v = uio->uio_offset; -kmemphys: - o = v & PAGE_MASK; - c = min(uio->uio_resid, (u_int)(PAGE_SIZE - o)); - vd = PHYS_TO_DMAP_RAW(v); - if (vd < DMAP_MIN_ADDRESS || - (vd > DMAP_MIN_ADDRESS + dmaplimit && - vd <= DMAP_MAX_ADDRESS) || - (pmap_kextract(vd) == 0 && (v & PG_FRAME) != 0)) { - error = EFAULT; - goto ret; - } - error = uiomove((void *)vd, (int)c, uio); - continue; - } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { - v = uio->uio_offset; + v = uio->uio_offset; + c = ulmin(iov->iov_len, PAGE_SIZE - (u_int)(v & PAGE_MASK)); - if (v >= DMAP_MIN_ADDRESS && v < DMAP_MAX_ADDRESS) { - v = DMAP_TO_PHYS_RAW(v); - goto kmemphys; + switch (dev2unit(dev)) { + case CDEV_MINOR_KMEM: + /* + * Since c is clamped to be less or equal than + * PAGE_SIZE, the uiomove() call does not + * access past the end of the direct map. + */ + if (v >= DMAP_MIN_ADDRESS && + v < DMAP_MIN_ADDRESS + dmaplimit) { + error = uiomove((void *)v, c, uio); + break; } - c = iov->iov_len; + if (!kernacc((void *)v, c, uio->uio_rw == UIO_READ ? + VM_PROT_READ : VM_PROT_WRITE)) { + error = EFAULT; + break; + } /* - * Make sure that all of the pages are currently - * resident so that we don't create any zero-fill - * pages. + * If the extracted address is not accessible + * through the direct map, then we make a + * private (uncached) mapping because we can't + * depend on the existing kernel mapping + * remaining valid until the completion of + * uiomove(). + * + * XXX We cannot provide access to the + * physical page 0 mapped into KVA. */ - addr = trunc_page(v); - eaddr = round_page(v + c); - - if (addr < VM_MIN_KERNEL_ADDRESS) { + v = pmap_extract(kernel_pmap, v); + if (v == 0) { error = EFAULT; - goto ret; + break; } - for (; addr < eaddr; addr += PAGE_SIZE) { - if (pmap_extract(kernel_pmap, addr) == 0) { - error = EFAULT; - goto ret; - } + /* FALLTHROUGH */ + case CDEV_MINOR_MEM: + if (v < dmaplimit) { + vd = PHYS_TO_DMAP(v); + error = uiomove((void *)vd, c, uio); + break; } - if (!kernacc((caddr_t)(long)v, c, - uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) { + if (v >= (1ULL << cpu_maxphyaddr)) { error = EFAULT; - goto ret; + break; } - - error = uiomove((caddr_t)(long)v, (int)c, uio); - continue; + p = pmap_mapdev(v, PAGE_SIZE); + error = uiomove(p, c, uio); + pmap_unmapdev((vm_offset_t)p, PAGE_SIZE); + break; } - /* else panic! */ } -ret: curthread_pflags_restore(sflags); + /* + * Don't return error if any byte was written. Read and write + * can return error only if no i/o was performed. + */ + if (uio->uio_resid != orig_resid) + error = 0; return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:50:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81559E45; Mon, 12 Jan 2015 07:50:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D2D5340; Mon, 12 Jan 2015 07:50:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7ouuN050616; Mon, 12 Jan 2015 07:50:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7ouIx050615; Mon, 12 Jan 2015 07:50:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120750.t0C7ouIx050615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 07:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277052 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:50:56 -0000 Author: kib Date: Mon Jan 12 07:50:55 2015 New Revision: 277052 URL: https://svnweb.freebsd.org/changeset/base/277052 Log: Revert r276600: PHYS_TO_DMAP_RAW() and DMAP_TO_PHYS_RAW() are no longer used, remove them. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Mon Jan 12 07:48:22 2015 (r277051) +++ head/sys/amd64/include/vmparam.h Mon Jan 12 07:50:55 2015 (r277052) @@ -183,8 +183,6 @@ #define VM_MAX_ADDRESS UPT_MAX_ADDRESS #define VM_MIN_ADDRESS (0) -#define PHYS_TO_DMAP_RAW(x) ((x) | DMAP_MIN_ADDRESS) -#define DMAP_TO_PHYS_RAW(x) ((x) & ~DMAP_MIN_ADDRESS) /* * XXX Allowing dmaplimit == 0 is a temporary workaround for vt(4) efifb's * early use of PHYS_TO_DMAP before the mapping is actually setup. This works @@ -195,14 +193,14 @@ KASSERT(dmaplimit == 0 || (x) < dmaplimit, \ ("physical address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ - PHYS_TO_DMAP_RAW(x); }) + (x) | DMAP_MIN_ADDRESS; }) #define DMAP_TO_PHYS(x) ({ \ KASSERT((x) < (DMAP_MIN_ADDRESS + dmaplimit) && \ (x) >= DMAP_MIN_ADDRESS, \ ("virtual address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ - DMAP_TO_PHYS_RAW(x); }) + (x) & ~DMAP_MIN_ADDRESS; }) /* * How many physical pages per kmem arena virtual page. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 07:55:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE12CFB7; Mon, 12 Jan 2015 07:55:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAB903F8; Mon, 12 Jan 2015 07:55:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C7tHGY053042; Mon, 12 Jan 2015 07:55:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7tHKQ053041; Mon, 12 Jan 2015 07:55:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501120755.t0C7tHKQ053041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 12 Jan 2015 07:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277053 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:55:17 -0000 Author: tuexen Date: Mon Jan 12 07:55:16 2015 New Revision: 277053 URL: https://svnweb.freebsd.org/changeset/base/277053 Log: Remove dead code. Reported by: Coverity CID: 748664 MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jan 12 07:50:55 2015 (r277052) +++ head/sys/netinet/sctp_output.c Mon Jan 12 07:55:16 2015 (r277053) @@ -8917,12 +8917,11 @@ sctp_send_cookie_echo(struct mbuf *m, struct sctp_tmit_chunk *chk; uint16_t ptype, plen; + SCTP_TCB_LOCK_ASSERT(stcb); /* First find the cookie in the param area */ cookie = NULL; at = offset + sizeof(struct sctp_init_chunk); - - SCTP_TCB_LOCK_ASSERT(stcb); - do { + for (;;) { phdr = sctp_get_next_param(m, at, &parm, sizeof(parm)); if (phdr == NULL) { return (-3); @@ -8949,13 +8948,8 @@ sctp_send_cookie_echo(struct mbuf *m, break; } at += SCTP_SIZE32(plen); - } while (phdr); - if (cookie == NULL) { - /* Did not find the cookie */ - return (-3); } /* ok, we got the cookie lets change it into a cookie echo chunk */ - /* first the change from param to cookie */ hdr = mtod(cookie, struct sctp_chunkhdr *); hdr->chunk_type = SCTP_COOKIE_ECHO; From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 08:33:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A384E4; Mon, 12 Jan 2015 08:33:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1ADFD9A0; Mon, 12 Jan 2015 08:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C8X7Lq071481; Mon, 12 Jan 2015 08:33:07 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C8X53s071470; Mon, 12 Jan 2015 08:33:05 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201501120833.t0C8X53s071470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 12 Jan 2015 08:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 08:33:07 -0000 Author: hiren Date: Mon Jan 12 08:33:04 2015 New Revision: 277054 URL: https://svnweb.freebsd.org/changeset/base/277054 Log: DCTCP (Data Center TCP) implementation. DCTCP congestion control algorithm aims to maximise throughput and minimise latency in data center networks by utilising the proportion of Explicit Congestion Notification (ECN) marked packets received from capable hardware as a congestion signal. Highlights: Implemented as a mod_cc(4) module. ECN (Explicit congestion notification) processing is done differently from RFC3168. Takes one-sided DCTCP into consideration where only one of the sides is using DCTCP and other is using standard ECN. IETF draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00 Thesis report by Midori Kato: https://eggert.org/students/kato-thesis.pdf Submitted by: Midori Kato and Lars Eggert with help and modifications from hiren Differential Revision: https://reviews.freebsd.org/D604 Reviewed by: gnn Added: head/share/man/man4/cc_dctcp.4 (contents, props changed) head/sys/modules/cc/cc_dctcp/ head/sys/modules/cc/cc_dctcp/Makefile (contents, props changed) head/sys/netinet/cc/cc_dctcp.c (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/mod_cc.4 head/sys/modules/cc/Makefile head/sys/netinet/cc.h head/sys/netinet/tcp_input.c Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jan 12 07:55:16 2015 (r277053) +++ head/share/man/man4/Makefile Mon Jan 12 08:33:04 2015 (r277054) @@ -86,6 +86,7 @@ MAN= aac.4 \ cc_cdg.4 \ cc_chd.4 \ cc_cubic.4 \ + cc_dctcp.4 \ cc_hd.4 \ cc_htcp.4 \ cc_newreno.4 \ Added: head/share/man/man4/cc_dctcp.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/cc_dctcp.4 Mon Jan 12 08:33:04 2015 (r277054) @@ -0,0 +1,127 @@ +.\" +.\" Copyright (c) 2014 Midori Kato +.\" Copyright (c) 2014 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at Keio University, Japan. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 12, 2015 +.Dt CC_DCTCP 4 +.Os +.Sh NAME +.Nm cc_dctcp +.Nd DCTCP Congestion Control Algorithm +.Sh DESCRIPTION +The DCTCP (data center TCP) congestion control algorithm aims to maximise +throughput and minimise latency in data center networks by utilising the +proportion of Explicit Congestion Notification (ECN) marks received from capable +hardware as a congestion signal. +.Pp +DCTCP uses fraction of ECN marked packets to update congestion window. The +window reduction ratio is always <= 1/2. Only when all of the packets are +marked, congestion window is halved. +.Pp +In order to keep the accuracy of the ECN marked fraction, a DCTCP receiver +mirrors back incoming (or missing) CE marks by setting (or clearing) ECE marks. +This feedback methodology is also adopted when the receiver uses delayed ACK. +.Pp +FreeBSD DCTCP implementation includes two minor modifications for the one-sided +deployment. Considering the situation that DCTCP is used as sender and classic +ECN is used as receiver, DCTCP sets the CWR flag as the reaction to the ECE +flag. In addition, when classic ECN is used as sender and DCTCP is used as +receiver, DCTCP avoids to mirror back ACKs only when the CWR flag is +set in the incoming packet. +.Pp +The other specifications are based on the paper and Internet Draft referenced +in the +.Sx SEE ALSO +section below. +.Sh MIB Variables +The algorithm exposes the following tunable variables in the +.Va net.inet.tcp.cc.dctcp +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va alpha" +.It Va alpha +An initial estimator of the congestion on the link. +Default is 0. +.It Va dctcp_shift_g +An estimation gain in the alpha calculation. +Default is 16. +.It Va slowstart +A trigger to halve congestion window after slow start. +Default does nothing to halve window. +.Sh SEE ALSO +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr mod_cc 4 , +.Xr tcp 4 , +.Xr mod_cc 9 +.Rs +.%A "Mohammad Alizadeh" +.%A "Albert Greenberg" +.%A "David A. Maltz" +.%A "Jitendra Padhye" +.%A "Parveen Patel" +.%A "Balaji Prabhakar" +.%A "Sudipta Sengupta" +.%A "Murari Sridharan" +.%T "Data Center TCP (DCTCP)" +.%U "http://research.microsoft.com/pubs/121386/dctcp-public.pdf" +.%J "ACM SIGCOMM 2010" +.%D "July 2010" +.%P "63-74" +.Re +.Rs +.%A "Stephen Bensley" +.%A "Lars Eggert" +.%A "Dave Thaler" +.%T "Microsoft's Datacenter TCP (DCTCP): TCP Congestion Control for Datacenters" +.%U "http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-01" +.Re +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 11.0 . +.Pp +The module was first released in 2014 by Midori Kato studying at Keio +University, Japan. +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module and this manual page were written by +.An Midori Kato katoon@sfc.wide.ad.jp +and +.An Lars Eggert lars@netapp.com +with help and modifications from +.An Hiren Panchasara hiren@FreeBSD.org Modified: head/share/man/man4/mod_cc.4 ============================================================================== --- head/share/man/man4/mod_cc.4 Mon Jan 12 07:55:16 2015 (r277053) +++ head/share/man/man4/mod_cc.4 Mon Jan 12 08:33:04 2015 (r277054) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2014 +.Dd January 12, 2015 .Dt MOD_CC 4 .Os .Sh NAME @@ -78,6 +78,7 @@ MIB variable. .Xr cc_cdg 4 , .Xr cc_chd 4 , .Xr cc_cubic 4 , +.Xr cc_dctcp 4 , .Xr cc_hd 4 , .Xr cc_htcp 4 , .Xr cc_newreno 4 , Modified: head/sys/modules/cc/Makefile ============================================================================== --- head/sys/modules/cc/Makefile Mon Jan 12 07:55:16 2015 (r277053) +++ head/sys/modules/cc/Makefile Mon Jan 12 08:33:04 2015 (r277054) @@ -3,6 +3,7 @@ SUBDIR= cc_cdg \ cc_chd \ cc_cubic \ + cc_dctcp \ cc_hd \ cc_htcp \ cc_vegas Added: head/sys/modules/cc/cc_dctcp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/cc/cc_dctcp/Makefile Mon Jan 12 08:33:04 2015 (r277054) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../netinet/cc +KMOD= cc_dctcp +SRCS= cc_dctcp.c + +.include Modified: head/sys/netinet/cc.h ============================================================================== --- head/sys/netinet/cc.h Mon Jan 12 07:55:16 2015 (r277053) +++ head/sys/netinet/cc.h Mon Jan 12 08:33:04 2015 (r277054) @@ -90,6 +90,10 @@ struct cc_var { /* cc_var flags. */ #define CCF_ABC_SENTAWND 0x0001 /* ABC counted cwnd worth of bytes? */ #define CCF_CWND_LIMITED 0x0002 /* Are we currently cwnd limited? */ +#define CCF_DELACK 0x0004 /* Is this ack delayed? */ +#define CCF_ACKNOW 0x0008 /* Will this ack be sent now? */ +#define CCF_IPHDR_CE 0x0010 /* Does this packet set CE bit? */ +#define CCF_TCPHDR_CWR 0x0020 /* Does this packet set CWR bit? */ /* ACK types passed to the ack_received() hook. */ #define CC_ACK 0x0001 /* Regular in sequence ACK. */ @@ -143,6 +147,9 @@ struct cc_algo { /* Called when data transfer resumes after an idle period. */ void (*after_idle)(struct cc_var *ccv); + /* Called for an additional ECN processing apart from RFC3168. */ + void (*ecnpkt_handler)(struct cc_var *ccv); + STAILQ_ENTRY (cc_algo) entries; }; Added: head/sys/netinet/cc/cc_dctcp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/cc/cc_dctcp.c Mon Jan 12 08:33:04 2015 (r277054) @@ -0,0 +1,474 @@ +/*- + * Copyright (c) 2007-2008 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2009-2010 Lawrence Stewart + * Copyright (c) 2014 Midori Kato + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * An implementation of the DCTCP algorithm for FreeBSD, based on + * "Data Center TCP (DCTCP)" by M. Alizadeh, A. Greenberg, D. A. Maltz, + * J. Padhye, P. Patel, B. Prabhakar, S. Sengupta, and M. Sridharan., + * in ACM Conference on SIGCOMM 2010, New York, USA, + * Originally released as the contribution of Microsoft Research project. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include + +#define CAST_PTR_INT(X) (*((int*)(X))) + +#define MAX_ALPHA_VALUE 1024 +static VNET_DEFINE(uint32_t, dctcp_alpha) = 0; +#define V_dctcp_alpha VNET(dctcp_alpha) +static VNET_DEFINE(uint32_t, dctcp_shift_g) = 4; +#define V_dctcp_shift_g VNET(dctcp_shift_g) +static VNET_DEFINE(uint32_t, dctcp_slowstart) = 0; +#define V_dctcp_slowstart VNET(dctcp_slowstart) + +struct dctcp { + int bytes_ecn; /* # of marked bytes during a RTT */ + int bytes_total; /* # of acked bytes during a RTT */ + int alpha; /* the fraction of marked bytes */ + int ce_prev; /* CE state of the last segment */ + int save_sndnxt; /* end sequence number of the current window */ + int ece_curr; /* ECE flag in this segment */ + int ece_prev; /* ECE flag in the last segment */ + uint32_t num_cong_events; /* # of congestion events */ +}; + +static MALLOC_DEFINE(M_dctcp, "dctcp data", + "Per connection data required for the dctcp algorithm"); + +static void dctcp_ack_received(struct cc_var *ccv, uint16_t type); +static void dctcp_after_idle(struct cc_var *ccv); +static void dctcp_cb_destroy(struct cc_var *ccv); +static int dctcp_cb_init(struct cc_var *ccv); +static void dctcp_cong_signal(struct cc_var *ccv, uint32_t type); +static void dctcp_conn_init(struct cc_var *ccv); +static void dctcp_post_recovery(struct cc_var *ccv); +static void dctcp_ecnpkt_handler(struct cc_var *ccv); +static void dctcp_update_alpha(struct cc_var *ccv); + +struct cc_algo dctcp_cc_algo = { + .name = "dctcp", + .ack_received = dctcp_ack_received, + .cb_destroy = dctcp_cb_destroy, + .cb_init = dctcp_cb_init, + .cong_signal = dctcp_cong_signal, + .conn_init = dctcp_conn_init, + .post_recovery = dctcp_post_recovery, + .ecnpkt_handler = dctcp_ecnpkt_handler, + .after_idle = dctcp_after_idle, +}; + +static void +dctcp_ack_received(struct cc_var *ccv, uint16_t type) +{ + struct dctcp *dctcp_data; + int bytes_acked = 0; + + dctcp_data = ccv->cc_data; + + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) { + /* + * DCTCP doesn't treat receipt of ECN marked packet as a + * congestion event. Thus, DCTCP always executes the ACK + * processing out of congestion recovery. + */ + if (IN_CONGRECOVERY(CCV(ccv, t_flags))) { + EXIT_CONGRECOVERY(CCV(ccv, t_flags)); + newreno_cc_algo.ack_received(ccv, type); + ENTER_CONGRECOVERY(CCV(ccv, t_flags)); + } else + newreno_cc_algo.ack_received(ccv, type); + + if (type == CC_DUPACK) + bytes_acked = CCV(ccv, t_maxseg); + + if (type == CC_ACK) + bytes_acked = ccv->bytes_this_ack; + + /* Update total bytes. */ + dctcp_data->bytes_total += bytes_acked; + + /* Update total marked bytes. */ + if (dctcp_data->ece_curr) { + if (!dctcp_data->ece_prev + && bytes_acked > CCV(ccv, t_maxseg)) { + dctcp_data->bytes_ecn += + (bytes_acked - CCV(ccv, t_maxseg)); + } else + dctcp_data->bytes_ecn += bytes_acked; + dctcp_data->ece_prev = 1; + } else { + if (dctcp_data->ece_prev + && bytes_acked > CCV(ccv, t_maxseg)) + dctcp_data->bytes_ecn += CCV(ccv, t_maxseg); + dctcp_data->ece_prev = 0; + } + dctcp_data->ece_curr = 0; + + /* + * Update the fraction of marked bytes at the end of + * current window size. + */ + if ((IN_FASTRECOVERY(CCV(ccv, t_flags)) && + SEQ_GEQ(ccv->curack, CCV(ccv, snd_recover))) || + (!IN_FASTRECOVERY(CCV(ccv, t_flags)) && + SEQ_GT(ccv->curack, dctcp_data->save_sndnxt))) + dctcp_update_alpha(ccv); + } else + newreno_cc_algo.ack_received(ccv, type); +} + +static void +dctcp_after_idle(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + + dctcp_data = ccv->cc_data; + + /* Initialize internal parameters after idle time */ + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); + dctcp_data->alpha = V_dctcp_alpha; + dctcp_data->ece_curr = 0; + dctcp_data->ece_prev = 0; + dctcp_data->num_cong_events = 0; + + dctcp_cc_algo.after_idle = newreno_cc_algo.after_idle; +} + +static void +dctcp_cb_destroy(struct cc_var *ccv) +{ + if (ccv->cc_data != NULL) + free(ccv->cc_data, M_dctcp); +} + +static int +dctcp_cb_init(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + + dctcp_data = malloc(sizeof(struct dctcp), M_dctcp, M_NOWAIT|M_ZERO); + + if (dctcp_data == NULL) + return (ENOMEM); + + /* Initialize some key variables with sensible defaults. */ + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + /* + * When alpha is set to 0 in the beggining, DCTCP sender transfers as + * much data as possible until the value converges which may expand the + * queueing delay at the switch. When alpha is set to 1, queueing delay + * is kept small. + * Throughput-sensitive applications should have alpha = 0 + * Latency-sensitive applications should have alpha = 1 + * + * Note: DCTCP draft suggests initial alpha to be 1 but we've decided to + * keep it 0 as default. + */ + dctcp_data->alpha = V_dctcp_alpha; + dctcp_data->save_sndnxt = 0; + dctcp_data->ce_prev = 0; + dctcp_data->ece_curr = 0; + dctcp_data->ece_prev = 0; + dctcp_data->num_cong_events = 0; + + ccv->cc_data = dctcp_data; + return (0); +} + +/* + * Perform any necessary tasks before we enter congestion recovery. + */ +static void +dctcp_cong_signal(struct cc_var *ccv, uint32_t type) +{ + struct dctcp *dctcp_data; + u_int win, mss; + + dctcp_data = ccv->cc_data; + win = CCV(ccv, snd_cwnd); + mss = CCV(ccv, t_maxseg); + + switch (type) { + case CC_NDUPACK: + if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + CCV(ccv, snd_ssthresh) = mss * + max(win / 2 / mss, 2); + dctcp_data->num_cong_events++; + } else { + /* cwnd has already updated as congestion + * recovery. Reverse cwnd value using + * snd_cwnd_prev and recalculate snd_ssthresh + */ + win = CCV(ccv, snd_cwnd_prev); + CCV(ccv, snd_ssthresh) = + max(win / 2 / mss, 2) * mss; + } + ENTER_RECOVERY(CCV(ccv, t_flags)); + } + break; + case CC_ECN: + /* + * Save current snd_cwnd when the host encounters both + * congestion recovery and fast recovery. + */ + CCV(ccv, snd_cwnd_prev) = win; + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + if (V_dctcp_slowstart && + dctcp_data->num_cong_events++ == 0) { + CCV(ccv, snd_ssthresh) = + mss * max(win / 2 / mss, 2); + dctcp_data->alpha = MAX_ALPHA_VALUE; + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); + } else + CCV(ccv, snd_ssthresh) = max((win - ((win * + dctcp_data->alpha) >> 11)) / mss, 2) * mss; + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); + ENTER_CONGRECOVERY(CCV(ccv, t_flags)); + } + dctcp_data->ece_curr = 1; + break; + case CC_RTO: + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) { + CCV(ccv, t_flags) |= TF_ECN_SND_CWR; + dctcp_update_alpha(ccv); + dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); + dctcp_data->num_cong_events++; + } + break; + } +} + +static void +dctcp_conn_init(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + + dctcp_data = ccv->cc_data; + + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); +} + +/* + * Perform any necessary tasks before we exit congestion recovery. + */ +static void +dctcp_post_recovery(struct cc_var *ccv) +{ + dctcp_cc_algo.post_recovery = newreno_cc_algo.post_recovery; + + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) + dctcp_update_alpha(ccv); +} + +/* + * Execute an additional ECN processing using ECN field in IP header and the CWR + * bit in TCP header. + * + * delay_ack == 0 - Delayed ACK disabled + * delay_ack == 1 - Delayed ACK enabled + */ + +static void +dctcp_ecnpkt_handler(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + uint32_t ccflag; + int delay_ack; + + dctcp_data = ccv->cc_data; + ccflag = ccv->flags; + delay_ack = 1; + + /* + * DCTCP responses an ACK immediately when the CE state + * in between this segment and the last segment is not same. + */ + if (ccflag & CCF_IPHDR_CE) { + if (!dctcp_data->ce_prev && (ccflag & CCF_DELACK)) + delay_ack = 0; + dctcp_data->ce_prev = 1; + CCV(ccv, t_flags) |= TF_ECN_SND_ECE; + } else { + if (dctcp_data->ce_prev && (ccflag & CCF_DELACK)) + delay_ack = 0; + dctcp_data->ce_prev = 0; + CCV(ccv, t_flags) &= ~TF_ECN_SND_ECE; + } + + /* DCTCP sets delayed ack when this segment sets the CWR flag. */ + if ((ccflag & CCF_DELACK) && (ccflag & CCF_TCPHDR_CWR)) + delay_ack = 1; + + if (delay_ack == 0) + ccv->flags |= CCF_ACKNOW; + else + ccv->flags &= ~CCF_ACKNOW; +} + +/* + * Update the fraction of marked bytes represented as 'alpha'. + * Also initialize several internal parameters at the end of this function. + */ +static void +dctcp_update_alpha(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + int alpha_prev; + + dctcp_data = ccv->cc_data; + alpha_prev = dctcp_data->alpha; + dctcp_data->bytes_total = max(dctcp_data->bytes_total, 1); + + /* + * Update alpha: alpha = (1 - g) * alpha + g * F. + * Here: + * g is weight factor + * recommaded to be set to 1/16 + * small g = slow convergence between competitive DCTCP flows + * large g = impacts low utilization of bandwidth at switches + * F is fraction of marked segments in last RTT + * updated every RTT + * Alpha must be round to 0 - MAX_ALPHA_VALUE. + */ + dctcp_data->alpha = min(alpha_prev - (alpha_prev >> V_dctcp_shift_g) + + (dctcp_data->bytes_ecn << (10 - V_dctcp_shift_g)) / + dctcp_data->bytes_total, MAX_ALPHA_VALUE); + + /* Initialize internal parameters for next alpha calculation */ + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); +} + +static int +dctcp_alpha_handler(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + + new = V_dctcp_alpha; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else { + if (new > MAX_ALPHA_VALUE) + V_dctcp_alpha = MAX_ALPHA_VALUE; + else + V_dctcp_alpha = new; + } + } + + return (error); +} + +static int +dctcp_shift_g_handler(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + + new = V_dctcp_shift_g; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else + V_dctcp_shift_g = new; + } + + return (error); +} + +static int +dctcp_slowstart_handler(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + + new = V_dctcp_slowstart; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else + V_dctcp_slowstart = new; + } + + return (error); +} + +SYSCTL_DECL(_net_inet_tcp_cc_dctcp); +SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, dctcp, CTLFLAG_RW, NULL, + "dctcp congestion control related settings"); + +SYSCTL_PROC(_net_inet_tcp_cc_dctcp, OID_AUTO, alpha, + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(dctcp_alpha), 0, + &dctcp_alpha_handler, + "IU", "dctcp alpha parameter"); + +SYSCTL_PROC(_net_inet_tcp_cc_dctcp, OID_AUTO, shift_g, + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(dctcp_shift_g), 4, + &dctcp_shift_g_handler, + "IU", "dctcp shift parameter"); + +SYSCTL_PROC(_net_inet_tcp_cc_dctcp, OID_AUTO, slowstart, + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(dctcp_slowstart), 0, + &dctcp_slowstart_handler, + "IU", "half CWND reduction after the first slow start"); + +DECLARE_CC_MODULE(dctcp, &dctcp_cc_algo); Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Jan 12 07:55:16 2015 (r277053) +++ head/sys/netinet/tcp_input.c Mon Jan 12 08:33:04 2015 (r277054) @@ -498,6 +498,41 @@ do { \ (tlen <= tp->t_maxopd) && \ (V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN))) +static void inline +cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos) +{ + INP_WLOCK_ASSERT(tp->t_inpcb); + + if (CC_ALGO(tp)->ecnpkt_handler != NULL) { + switch (iptos & IPTOS_ECN_MASK) { + case IPTOS_ECN_CE: + tp->ccv->flags |= CCF_IPHDR_CE; + break; + case IPTOS_ECN_ECT0: + tp->ccv->flags &= ~CCF_IPHDR_CE; + break; + case IPTOS_ECN_ECT1: + tp->ccv->flags &= ~CCF_IPHDR_CE; + break; + } + + if (th->th_flags & TH_CWR) + tp->ccv->flags |= CCF_TCPHDR_CWR; + else + tp->ccv->flags &= ~CCF_TCPHDR_CWR; + + if (tp->t_flags & TF_DELACK) + tp->ccv->flags |= CCF_DELACK; + else + tp->ccv->flags &= ~CCF_DELACK; + + CC_ALGO(tp)->ecnpkt_handler(tp->ccv); + + if (tp->ccv->flags & CCF_ACKNOW) + tcp_timer_activate(tp, TT_DELACK, tcp_delacktime); + } +} + /* * TCP input handling is split into multiple parts: * tcp6_input is a thin wrapper around tcp_input for the extended @@ -1530,6 +1565,10 @@ tcp_do_segment(struct mbuf *m, struct tc TCPSTAT_INC(tcps_ecn_ect1); break; } + + /* Process a packet differently from RFC3168. */ + cc_ecnpkt_handler(tp, th, iptos); + /* Congestion experienced. */ if (thflags & TH_ECE) { cc_cong_signal(tp, th, CC_ECN); From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 08:58:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 186F895D; Mon, 12 Jan 2015 08:58:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0458EBAF; Mon, 12 Jan 2015 08:58:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C8w9hN081398; Mon, 12 Jan 2015 08:58:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C8w8JM081390; Mon, 12 Jan 2015 08:58:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120858.t0C8w8JM081390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 08:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277055 - in head/sys: amd64/amd64 kern sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 08:58:10 -0000 Author: kib Date: Mon Jan 12 08:58:07 2015 New Revision: 277055 URL: https://svnweb.freebsd.org/changeset/base/277055 Log: Revert r263475: TDP_DEVMEMIO no longer needed, since amd64 /dev/kmem does not access kernel mappings directly. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/mem.c head/sys/amd64/amd64/trap.c head/sys/kern/subr_trap.c head/sys/sys/proc.h head/sys/vm/vm_fault.c Modified: head/sys/amd64/amd64/mem.c ============================================================================== --- head/sys/amd64/amd64/mem.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/amd64/amd64/mem.c Mon Jan 12 08:58:07 2015 (r277055) @@ -82,10 +82,9 @@ memrw(struct cdev *dev, struct uio *uio, ssize_t orig_resid; u_long v, vd; u_int c; - int error, sflags; + int error; error = 0; - sflags = curthread_pflags_set(TDP_DEVMEMIO); orig_resid = uio->uio_resid; while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; @@ -151,7 +150,6 @@ memrw(struct cdev *dev, struct uio *uio, break; } } - curthread_pflags_restore(sflags); /* * Don't return error if any byte was written. Read and write * can return error only if no i/o was performed. Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/amd64/amd64/trap.c Mon Jan 12 08:58:07 2015 (r277055) @@ -774,12 +774,6 @@ nogo: frame->tf_rip = (long)curpcb->pcb_onfault; return (0); } - if ((td->td_pflags & TDP_DEVMEMIO) != 0) { - KASSERT(curpcb->pcb_onfault != NULL, - ("/dev/mem without pcb_onfault")); - frame->tf_rip = (long)curpcb->pcb_onfault; - return (0); - } trap_fatal(frame, eva); return (-1); } Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/kern/subr_trap.c Mon Jan 12 08:58:07 2015 (r277055) @@ -157,8 +157,6 @@ userret(struct thread *td, struct trapfr td->td_rw_rlocks)); KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, ("userret: Returning with pagefaults disabled")); - KASSERT((td->td_pflags & TDP_DEVMEMIO) == 0, - ("userret: Returning with /dev/mem i/o leaked")); KASSERT(td->td_no_sleeping == 0, ("userret: Returning with sleep disabled")); KASSERT(td->td_pinned == 0 || (td->td_pflags & TDP_CALLCHAIN) != 0, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/sys/proc.h Mon Jan 12 08:58:07 2015 (r277055) @@ -430,7 +430,7 @@ do { \ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ -#define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ +#define TDP_UNUSED29 0x20000000 /* --available-- */ #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/vm/vm_fault.c Mon Jan 12 08:58:07 2015 (r277055) @@ -334,10 +334,6 @@ RetryFault:; map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { - if ((curthread->td_pflags & TDP_DEVMEMIO) != 0) { - vm_map_unlock_read(fs.map); - return (KERN_FAILURE); - } panic("vm_fault: fault on nofault entry, addr: %lx", (u_long)vaddr); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 09:41:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBCF71B7; Mon, 12 Jan 2015 09:41:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D78D19E; Mon, 12 Jan 2015 09:41:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C9fDEC001707; Mon, 12 Jan 2015 09:41:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9fDNn001706; Mon, 12 Jan 2015 09:41:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501120941.t0C9fDNn001706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 09:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277056 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:41:14 -0000 Author: glebius Date: Mon Jan 12 09:41:12 2015 New Revision: 277056 URL: https://svnweb.freebsd.org/changeset/base/277056 Log: Remove incorrect layering violating code that: a) assumed that ifqueue length is measured in bytes, instead of packets b) assumed that any interface has working ifqueue c) incremented global counter instead of ifi_oqdrops Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_fastfwd.c Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Mon Jan 12 08:58:07 2015 (r277055) +++ head/sys/netinet/ip_fastfwd.c Mon Jan 12 09:41:12 2015 (r277056) @@ -495,17 +495,6 @@ passout: goto consumed; } -#ifndef ALTQ - /* - * Check if there is enough space in the interface queue - */ - if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= - ifp->if_snd.ifq_maxlen) { - IPSTAT_INC(ips_odropped); - goto drop; - } -#endif - /* * Check if media link state of interface is not down */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 09:46:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DCB4375; Mon, 12 Jan 2015 09:46:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 184C3E1; Mon, 12 Jan 2015 09:46:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C9kp7c004930; Mon, 12 Jan 2015 09:46:51 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9komV004926; Mon, 12 Jan 2015 09:46:50 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501120946.t0C9komV004926@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 12 Jan 2015 09:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277057 - in head/contrib/unbound: . daemon doc services smallapp util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:46:51 -0000 Author: des Date: Mon Jan 12 09:46:49 2015 New Revision: 277057 URL: https://svnweb.freebsd.org/changeset/base/277057 Log: MFV (r277045): merge upstream version of the local socket patch. Modified: head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Mon Jan 12 09:41:12 2015 (r277056) +++ head/contrib/unbound/config.h Mon Jan 12 09:46:49 2015 (r277057) @@ -351,6 +351,9 @@ /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ +/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ +#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1 + /* Define if you have Swig libraries and header files. */ /* #undef HAVE_SWIG */ Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Mon Jan 12 09:41:12 2015 (r277056) +++ head/contrib/unbound/config.h.in Mon Jan 12 09:46:49 2015 (r277057) @@ -350,6 +350,9 @@ /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST +/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ +#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN + /* Define if you have Swig libraries and header files. */ #undef HAVE_SWIG Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Mon Jan 12 09:41:12 2015 (r277056) +++ head/contrib/unbound/configure Mon Jan 12 09:46:49 2015 (r277057) @@ -1516,8 +1516,8 @@ Optional Packages: --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-pthreads use pthreads library, or --without-pthreads to disable threading support. --with-solaris-threads use solaris native thread library. @@ -6555,8 +6555,8 @@ esac -macro_version='2.4.2.418' -macro_revision='2.4.2.418' +macro_version='2.4.2' +macro_revision='1.3337' @@ -6570,7 +6570,7 @@ macro_revision='2.4.2.418' -ltmain=$ac_aux_dir/ltmain.sh +ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. @@ -6619,7 +6619,7 @@ func_echo_all () $ECHO "" } -case $ECHO in +case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -6812,19 +6812,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test yes = "$GCC"; then +if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw + # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -6838,7 +6838,7 @@ $as_echo_n "checking for ld used by $CC. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD=$ac_prog + test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. @@ -6849,7 +6849,7 @@ $as_echo_n "checking for ld used by $CC. with_gnu_ld=unknown ;; esac -elif test yes = "$with_gnu_ld"; then +elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -6860,32 +6860,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog + lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -6928,33 +6928,33 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM=$NM + lt_cv_path_NM="$NM" else - lt_nm_to_check=${ac_tool_prefix}nm + lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break 2 + break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break 2 + break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -6965,15 +6965,15 @@ else esac fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -7079,9 +7079,9 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" + DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: @@ -7089,8 +7089,8 @@ fi esac fi - if test : != "$DUMPBIN"; then - NM=$DUMPBIN + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm @@ -7141,7 +7141,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; the $as_echo_n "(cached) " >&6 else i=0 - teststring=ABCD + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -7181,7 +7181,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -7231,23 +7231,22 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do + for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough + test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -7265,7 +7264,7 @@ else fi -if test -n "$lt_cv_sys_max_cmd_len"; then +if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -7283,6 +7282,30 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -7405,13 +7428,13 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then + if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -7539,13 +7562,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. +# `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -7572,7 +7595,8 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -7608,6 +7632,10 @@ freebsd* | dragonfly*) fi ;; +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -7646,7 +7674,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -7668,8 +7696,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -7879,8 +7907,8 @@ else case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -7892,7 +7920,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac @@ -8046,7 +8074,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -eq "$ac_status"; then + if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -8054,7 +8082,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -ne "$ac_status"; then + if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi @@ -8067,7 +8095,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test no = "$lt_cv_ar_at_file"; then +if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -8284,7 +8312,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - bitrig* | openbsd*) + openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -8416,7 +8444,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; @@ -8449,44 +8477,14 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -8504,24 +8502,21 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -8569,11 +8564,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined __osf__ +#elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -8599,7 +8594,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -8619,13 +8614,13 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext + LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -8646,7 +8641,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then + if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= @@ -8699,16 +8694,6 @@ fi - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } @@ -8721,9 +8706,9 @@ fi lt_sysroot= -case $with_sysroot in #( +case ${with_sysroot} in #( yes) - if test yes = "$GCC"; then + if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -8733,8 +8718,8 @@ case $with_sysroot in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -8751,14 +8736,13 @@ if test "${enable_libtool_lock+set}" = s enableval=$enable_libtool_lock; fi -test no = "$enable_libtool_lock" || enable_libtool_lock=yes +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8767,25 +8751,24 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE=32 + HPUX_IA64_MODE="32" ;; *ELF-64*) - HPUX_IA64_MODE=64 + HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -8814,50 +8797,9 @@ ia64-*-hpux*) rm -rf conftest* ;; -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8871,14 +8813,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac + LD="${LD-ld} -m elf_i386" ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" @@ -8923,7 +8858,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS + SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -8963,14 +8898,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then + if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS + CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8982,7 +8916,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*|x86_64-*-solaris*) + i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -8991,7 +8925,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 + LD="${LD-ld}_sol2" fi ;; *) @@ -9007,7 +8941,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } ;; esac -need_locks=$enable_libtool_lock +need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -9118,7 +9052,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then +if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi @@ -9621,7 +9555,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then + if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -9639,7 +9573,7 @@ else cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -9678,7 +9612,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -9707,7 +9641,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -9720,32 +9654,32 @@ fi $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test yes = "$lt_cv_apple_cc_single_mod"; then + if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -9791,14 +9725,14 @@ if test "${enable_shared+set}" = set; th *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9822,14 +9756,14 @@ if test "${enable_static+set}" = set; th *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9853,14 +9787,14 @@ if test "${with_pic+set}" = set; then : *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9868,6 +9802,8 @@ else fi +test -z "$pic_mode" && pic_mode=default + @@ -9883,14 +9819,14 @@ if test "${enable_fast_install+set}" = s *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9908,7 +9844,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -9957,7 +9893,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}"; then +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi @@ -9996,7 +9932,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -10007,14 +9943,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 09:48:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29E634CC; Mon, 12 Jan 2015 09:48:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15A38F2; Mon, 12 Jan 2015 09:48:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C9mkF9005222; Mon, 12 Jan 2015 09:48:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9mkMx005218; Mon, 12 Jan 2015 09:48:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501120948.t0C9mkMx005218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 09:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277058 - in head: share/man/man4 sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:48:47 -0000 Author: glebius Date: Mon Jan 12 09:48:45 2015 New Revision: 277058 URL: https://svnweb.freebsd.org/changeset/base/277058 Log: Remove the support for NGM_CISCO_GET_IPADDR message from ng_iface(4). The legitimacy of removal is proved by the fact that implementation contained a critical bug: the response allocated was sizeof(pointer), while should had been 2*sizeof(struct ng_cisco_ipaddr). The reason for ng_iface(4) to support ng_cisco(4) message isn't explained anywhere, and code comes from original Whistle import. Sponsored by: Nginx, Inc. Modified: head/share/man/man4/ng_iface.4 head/sys/netgraph/ng_iface.c Modified: head/share/man/man4/ng_iface.4 ============================================================================== --- head/share/man/man4/ng_iface.4 Mon Jan 12 09:46:49 2015 (r277057) +++ head/share/man/man4/ng_iface.4 Mon Jan 12 09:48:45 2015 (r277058) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $ .\" -.Dd October 28, 2005 +.Dd January 12, 2015 .Dt NG_IFACE 4 .Os .Sh NAME @@ -111,12 +111,6 @@ The interface must not currently be up. .It Dv NGM_IFACE_BROADCAST Pq Ic broadcast Set the interface to broadcast mode. The interface must not currently be up. -.It Dv NGM_CISCO_GET_IPADDR Pq Ic getipaddr -This message is defined by the -.Xr ng_cisco 4 -node type; see -.Xr ng_cisco 4 -for a description. .El .Sh SHUTDOWN This node shuts down upon receipt of a Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Mon Jan 12 09:46:49 2015 (r277057) +++ head/sys/netgraph/ng_iface.c Mon Jan 12 09:48:45 2015 (r277058) @@ -83,7 +83,6 @@ #include #include #include -#include #ifdef NG_SEPARATE_MALLOC static MALLOC_DEFINE(M_NETGRAPH_IFACE, "netgraph_iface", "netgraph iface node"); @@ -144,14 +143,6 @@ static iffam_p get_iffam_from_hook(priv_ static iffam_p get_iffam_from_name(const char *name); static hook_p *get_hook_from_iffam(priv_p priv, iffam_p iffam); -/* Parse type for struct ng_cisco_ipaddr */ -static const struct ng_parse_struct_field ng_cisco_ipaddr_type_fields[] - = NG_CISCO_IPADDR_TYPE_INFO; -static const struct ng_parse_type ng_cisco_ipaddr_type = { - &ng_parse_struct_type, - &ng_cisco_ipaddr_type_fields -}; - /* List of commands and how to convert arguments to/from ASCII */ static const struct ng_cmdlist ng_iface_cmds[] = { { @@ -176,13 +167,6 @@ static const struct ng_cmdlist ng_iface_ NULL }, { - NGM_CISCO_COOKIE, - NGM_CISCO_GET_IPADDR, - "getipaddr", - NULL, - &ng_cisco_ipaddr_type - }, - { NGM_IFACE_COOKIE, NGM_IFACE_GET_IFINDEX, "getifindex", @@ -652,43 +636,6 @@ ng_iface_rcvmsg(node_p node, item_p item break; } break; - case NGM_CISCO_COOKIE: - switch (msg->header.cmd) { - case NGM_CISCO_GET_IPADDR: /* we understand this too */ - { - struct ifaddr *ifa; - - /* Return the first configured IP address */ - if_addr_rlock(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - struct ng_cisco_ipaddr *ips; - - if (ifa->ifa_addr->sa_family != AF_INET) - continue; - NG_MKRESPONSE(resp, msg, sizeof(ips), M_NOWAIT); - if (resp == NULL) { - error = ENOMEM; - break; - } - ips = (struct ng_cisco_ipaddr *)resp->data; - ips->ipaddr = ((struct sockaddr_in *) - ifa->ifa_addr)->sin_addr; - ips->netmask = ((struct sockaddr_in *) - ifa->ifa_netmask)->sin_addr; - break; - } - if_addr_runlock(ifp); - - /* No IP addresses on this interface? */ - if (ifa == NULL) - error = EADDRNOTAVAIL; - break; - } - default: - error = EINVAL; - break; - } - break; case NGM_FLOW_COOKIE: switch (msg->header.cmd) { case NGM_LINK_IS_UP: From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 09:50:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 869F862D; Mon, 12 Jan 2015 09:50:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72AA4192; Mon, 12 Jan 2015 09:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0C9ohfd006031; Mon, 12 Jan 2015 09:50:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9ohHJ006030; Mon, 12 Jan 2015 09:50:43 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501120950.t0C9ohHJ006030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 09:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277059 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:50:43 -0000 Author: glebius Date: Mon Jan 12 09:50:42 2015 New Revision: 277059 URL: https://svnweb.freebsd.org/changeset/base/277059 Log: When the node receives NGM_FLOW_COOKIE update the if_link_state, instead of playing with almost dead IFF_DRV_RUNNING flag. Sponsored by: Nginx, Inc. Modified: head/sys/netgraph/ng_iface.c Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Mon Jan 12 09:48:45 2015 (r277058) +++ head/sys/netgraph/ng_iface.c Mon Jan 12 09:50:42 2015 (r277059) @@ -639,10 +639,10 @@ ng_iface_rcvmsg(node_p node, item_p item case NGM_FLOW_COOKIE: switch (msg->header.cmd) { case NGM_LINK_IS_UP: - ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_UP); break; case NGM_LINK_IS_DOWN: - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); break; default: break; From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 10:02:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0B5386A; Mon, 12 Jan 2015 10:02:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB832DA; Mon, 12 Jan 2015 10:02:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CA2OFX013907; Mon, 12 Jan 2015 10:02:24 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CA2OnF013905; Mon, 12 Jan 2015 10:02:24 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501121002.t0CA2OnF013905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 12 Jan 2015 10:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277060 - stable/10/lib/libfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 10:02:24 -0000 Author: des Date: Mon Jan 12 10:02:23 2015 New Revision: 277060 URL: https://svnweb.freebsd.org/changeset/base/277060 Log: MFH (r273114, r273124): disable SSLv3 by default. Modified: stable/10/lib/libfetch/common.c stable/10/lib/libfetch/fetch.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Mon Jan 12 09:50:42 2015 (r277059) +++ stable/10/lib/libfetch/common.c Mon Jan 12 10:02:23 2015 (r277060) @@ -675,10 +675,14 @@ fetch_ssl_setup_transport_layer(SSL_CTX ssl_ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET; if (getenv("SSL_ALLOW_SSL2") == NULL) ssl_ctx_options |= SSL_OP_NO_SSLv2; - if (getenv("SSL_NO_SSL3") != NULL) + if (getenv("SSL_ALLOW_SSL3") == NULL) ssl_ctx_options |= SSL_OP_NO_SSLv3; if (getenv("SSL_NO_TLS1") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1; + if (getenv("SSL_NO_TLS1_1") != NULL) + ssl_ctx_options |= SSL_OP_NO_TLSv1_1; + if (getenv("SSL_NO_TLS1_2") != NULL) + ssl_ctx_options |= SSL_OP_NO_TLSv1_2; if (verbose) fetch_info("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); @@ -873,8 +877,8 @@ fetch_ssl(conn_t *conn, const struct url } if (verbose) { - fetch_info("SSL connection established using %s", - SSL_get_cipher(conn->ssl)); + fetch_info("%s connection established using %s", + SSL_get_version(conn->ssl), SSL_get_cipher(conn->ssl)); name = X509_get_subject_name(conn->ssl_cert); str = X509_NAME_oneline(name, 0, 0); fetch_info("Certificate subject: %s", str); Modified: stable/10/lib/libfetch/fetch.3 ============================================================================== --- stable/10/lib/libfetch/fetch.3 Mon Jan 12 09:50:42 2015 (r277059) +++ stable/10/lib/libfetch/fetch.3 Mon Jan 12 10:02:23 2015 (r277060) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2013 +.Dd October 15, 2014 .Dt FETCH 3 .Os .Sh NAME @@ -438,15 +438,17 @@ input (see .Pp By default .Nm libfetch -allows SSLv3 and TLSv1 when negotiating the connecting with the remote +allows TLSv1 and newer when negotiating the connecting with the remote peer. -You can change this behavior by setting the environment variable +You can change this behavior by setting the .Ev SSL_ALLOW_SSL2 -to allow SSLv2 (not recommended) and -.Ev SSL_NO_SSL3 -or -.Ev SSL_NO_TLS1 -to disable the respective methods. +and +.Ev SSL_ALLOW_SSL3 +environment variables to allow SSLv2 and SSLv3, respectively, and +.Ev SSL_NO_TLS1 , +.Ev SSL_NO_TLS1_1 and +.Ev SSL_NO_TLS1_2 +to disable TLS 1.0, 1.1 and 1.2 respectively. .Sh AUTHENTICATION Apart from setting the appropriate environment variables and specifying the user name and password in the URL or the @@ -646,6 +648,8 @@ Same as for compatibility. .It Ev SSL_ALLOW_SSL2 Allow SSL version 2 when negotiating the connection (not recommended). +.It Ev SSL_ALLOW_SSL3 +Allow SSL version 3 when negotiating the connection (not recommended). .It Ev SSL_CA_CERT_FILE CA certificate bundle containing trusted CA certificates. Default value: @@ -660,10 +664,12 @@ PEM encoded client key in case key and c are stored separately. .It Ev SSL_CRL_FILE File containing certificate revocation list. -.It Ev SSL_NO_SSL3 -Don't allow SSL version 3 when negotiating the connection. .It Ev SSL_NO_TLS1 -Don't allow TLV version 1 when negotiating the connection. +Do not allow TLS version 1.0 when negotiating the connection. +.It Ev SSL_NO_TLS1_1 +Do not allow TLS version 1.1 when negotiating the connection. +.It Ev SSL_NO_TLS1_2 +Do not allow TLS version 1.2 when negotiating the connection. .It Ev SSL_NO_VERIFY_HOSTNAME If set, do not verify that the hostname matches the subject of the certificate presented by the server. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 10:25:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A67B9B8D; Mon, 12 Jan 2015 10:25:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9146A6E0; Mon, 12 Jan 2015 10:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CAP8iu023657; Mon, 12 Jan 2015 10:25:08 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CAP83E023655; Mon, 12 Jan 2015 10:25:08 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501121025.t0CAP83E023655@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 12 Jan 2015 10:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277061 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 10:25:08 -0000 Author: smh Date: Mon Jan 12 10:25:07 2015 New Revision: 277061 URL: https://svnweb.freebsd.org/changeset/base/277061 Log: MFC r276012: Add a constant AHCI_MAX_IRQS removing magic number MFC r276013: Clamp ahci max irq's to AHCI_MAX_IRQS MFC r276016: Return the error from ahci_setup_interrupt in ahci_attach MFC r276019: style (9) nits Sponsored by: Multiplay Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Mon Jan 12 10:02:23 2015 (r277060) +++ stable/10/sys/dev/ahci/ahci.c Mon Jan 12 10:25:07 2015 (r277061) @@ -467,7 +467,7 @@ ahci_attach(device_t dev) ctlr->r_rid = PCIR_BAR(5); if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_rid, RF_ACTIVE))) - return ENXIO; + return (ENXIO); /* Setup our own memory management for channels. */ ctlr->sc_iomem.rm_start = rman_get_start(ctlr->r_mem); ctlr->sc_iomem.rm_end = rman_get_end(ctlr->r_mem); @@ -537,16 +537,16 @@ ahci_attach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); - return ENXIO; + return (ENXIO); } ahci_ctlr_setup(dev); /* Setup interrupts. */ - if (ahci_setup_interrupt(dev)) { + if ((error = ahci_setup_interrupt(dev)) != 0) { bus_dma_tag_destroy(ctlr->dma_tag); bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); - return ENXIO; + return (error); } i = 0; for (u = ctlr->ichannels; u != 0; u >>= 1) @@ -624,7 +624,7 @@ ahci_attach(device_t dev) device_set_ivars(child, (void *)(intptr_t)-1); } bus_generic_attach(dev); - return 0; + return (0); } static int @@ -674,7 +674,7 @@ ahci_ctlr_reset(device_t dev) } if (timeout == 0) { device_printf(dev, "AHCI controller reset failure\n"); - return ENXIO; + return (ENXIO); } /* Reenable AHCI mode */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); @@ -717,7 +717,7 @@ ahci_suspend(device_t dev) /* Disable interupts, so the state change(s) doesn't trigger */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, ATA_INL(ctlr->r_mem, AHCI_GHC) & (~AHCI_GHC_IE)); - return 0; + return (0); } static int @@ -763,6 +763,14 @@ ahci_setup_interrupt(device_t dev) device_printf(dev, "Falling back to one MSI\n"); ctlr->numirqs = 1; } + + /* Ensure we don't overrun irqs. */ + if (ctlr->numirqs > AHCI_MAX_IRQS) { + device_printf(dev, "Too many irqs %d > %d (clamping)\n", + ctlr->numirqs, AHCI_MAX_IRQS); + ctlr->numirqs = AHCI_MAX_IRQS; + } + /* Allocate all IRQs. */ for (i = 0; i < ctlr->numirqs; i++) { ctlr->irqs[i].ctlr = ctlr; @@ -777,7 +785,7 @@ ahci_setup_interrupt(device_t dev) if (!(ctlr->irqs[i].r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctlr->irqs[i].r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); - return ENXIO; + return (ENXIO); } if ((bus_setup_intr(dev, ctlr->irqs[i].r_irq, ATA_INTR_FLAGS, NULL, (ctlr->irqs[i].mode != AHCI_IRQ_MODE_ONE) ? ahci_intr : @@ -786,7 +794,7 @@ ahci_setup_interrupt(device_t dev) &ctlr->irqs[i], &ctlr->irqs[i].handle))) { /* SOS XXX release r_irq */ device_printf(dev, "unable to setup interrupt\n"); - return ENXIO; + return (ENXIO); } if (ctlr->numirqs > 1) { bus_describe_intr(dev, ctlr->irqs[i].r_irq, @@ -934,7 +942,7 @@ ahci_release_resource(device_t dev, devi return (0); case SYS_RES_IRQ: if (rid != ATA_IRQ_RID) - return ENOENT; + return (ENOENT); return (0); } return (EINVAL); Modified: stable/10/sys/dev/ahci/ahci.h ============================================================================== --- stable/10/sys/dev/ahci/ahci.h Mon Jan 12 10:02:23 2015 (r277060) +++ stable/10/sys/dev/ahci/ahci.h Mon Jan 12 10:25:07 2015 (r277061) @@ -143,6 +143,7 @@ #define AHCI_MAX_PORTS 32 #define AHCI_MAX_SLOTS 32 +#define AHCI_MAX_IRQS 16 /* SATA AHCI v1.0 register defines */ #define AHCI_CAP 0x00 @@ -485,7 +486,7 @@ struct ahci_controller { #define AHCI_IRQ_MODE_ALL 0 #define AHCI_IRQ_MODE_AFTER 1 #define AHCI_IRQ_MODE_ONE 2 - } irqs[16]; + } irqs[AHCI_MAX_IRQS]; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ uint32_t capsem; /* Controller capabilities */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 10:40:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47E55165; Mon, 12 Jan 2015 10:40:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BA518A4; Mon, 12 Jan 2015 10:40:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CAeSEH029269; Mon, 12 Jan 2015 10:40:28 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CAeS1i029268; Mon, 12 Jan 2015 10:40:28 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501121040.t0CAeS1i029268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Jan 2015 10:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277063 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 10:40:29 -0000 Author: brueffer Date: Mon Jan 12 10:40:28 2015 New Revision: 277063 URL: https://svnweb.freebsd.org/changeset/base/277063 Log: Mdoc markup and style cleanup. Modified: head/share/man/man4/cc_dctcp.4 Modified: head/share/man/man4/cc_dctcp.4 ============================================================================== --- head/share/man/man4/cc_dctcp.4 Mon Jan 12 10:33:00 2015 (r277062) +++ head/share/man/man4/cc_dctcp.4 Mon Jan 12 10:40:28 2015 (r277063) @@ -40,18 +40,23 @@ throughput and minimise latency in data proportion of Explicit Congestion Notification (ECN) marks received from capable hardware as a congestion signal. .Pp -DCTCP uses fraction of ECN marked packets to update congestion window. The -window reduction ratio is always <= 1/2. Only when all of the packets are +DCTCP uses fraction of ECN marked packets to update congestion window. +The window reduction ratio is always <= 1/2. +Only when all of the packets are marked, congestion window is halved. .Pp In order to keep the accuracy of the ECN marked fraction, a DCTCP receiver mirrors back incoming (or missing) CE marks by setting (or clearing) ECE marks. This feedback methodology is also adopted when the receiver uses delayed ACK. .Pp -FreeBSD DCTCP implementation includes two minor modifications for the one-sided -deployment. Considering the situation that DCTCP is used as sender and classic +The +.Fx +DCTCP implementation includes two minor modifications for the one-sided +deployment. +Considering the situation that DCTCP is used as sender and classic ECN is used as receiver, DCTCP sets the CWR flag as the reaction to the ECE -flag. In addition, when classic ECN is used as sender and DCTCP is used as +flag. +In addition, when classic ECN is used as sender and DCTCP is used as receiver, DCTCP avoids to mirror back ACKs only when the CWR flag is set in the incoming packet. .Pp @@ -75,6 +80,7 @@ Default is 16. .It Va slowstart A trigger to halve congestion window after slow start. Default does nothing to halve window. +.El .Sh SEE ALSO .Xr cc_chd 4 , .Xr cc_cubic 4 , @@ -120,8 +126,8 @@ University, Japan. The .Nm congestion control module and this manual page were written by -.An Midori Kato katoon@sfc.wide.ad.jp +.An Midori Kato Mt katoon@sfc.wide.ad.jp and -.An Lars Eggert lars@netapp.com +.An Lars Eggert Mt lars@netapp.com with help and modifications from -.An Hiren Panchasara hiren@FreeBSD.org +.An Hiren Panchasara Mt hiren@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 10:43:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4D852C1; Mon, 12 Jan 2015 10:43:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF49E94B; Mon, 12 Jan 2015 10:43:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CAhf9Z033063; Mon, 12 Jan 2015 10:43:41 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CAhfAq033061; Mon, 12 Jan 2015 10:43:41 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501121043.t0CAhfAq033061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Jan 2015 10:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277064 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 10:43:42 -0000 Author: brueffer Date: Mon Jan 12 10:43:40 2015 New Revision: 277064 URL: https://svnweb.freebsd.org/changeset/base/277064 Log: MFH: r276695 Add a very basic manpage for the Etherswitch framework. Added: stable/10/share/man/man4/etherswitch.4 - copied unchanged from r276695, head/share/man/man4/etherswitch.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon Jan 12 10:40:28 2015 (r277063) +++ stable/10/share/man/man4/Makefile Mon Jan 12 10:43:40 2015 (r277064) @@ -131,6 +131,7 @@ MAN= aac.4 \ esp.4 \ est.4 \ et.4 \ + etherswitch.4 \ eventtimers.4 \ exca.4 \ faith.4 \ Copied: stable/10/share/man/man4/etherswitch.4 (from r276695, head/share/man/man4/etherswitch.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/etherswitch.4 Mon Jan 12 10:43:40 2015 (r277064, copy of r276695, head/share/man/man4/etherswitch.4) @@ -0,0 +1,65 @@ +.\" Copyright (c) 2015 Christian Brueffer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 5, 2015 +.Dt ETHERSWITCH 4 +.Os +.Sh NAME +.Nm etherswitch +.Nd "Ethernet switch framework" +.Sh SYNOPSIS +To compile the framework into the kernel, +place the following lines in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device etherswitch" +.Cd "device miiproxy" +.Cd "device iicbus" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides a framework for Ethernet switch devices. +.Sh FILES +.Bl -tag -width ".Pa /dev/etherswitch?" -compact +.It Pa /dev/etherswitch? +.Nm +device nodes +.El +.Sh SEE ALSO +.Xr arswitch 4 , +.Xr iicbus 4 , +.Xr ip17x 4 , +.Xr rtl8366rb 4 , +.Xr ukswitch 4 , +.Xr etherswitchcfg 8 +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Stefan Bethke From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 13:59:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB0C9E99; Mon, 12 Jan 2015 13:59:35 +0000 (UTC) Received: from mail.jr-hosting.nl (mail.jr-hosting.nl [IPv6:2a01:4f8:210:34e4::25]) by mx1.freebsd.org (Postfix) with ESMTP id A51C5FC1; Mon, 12 Jan 2015 13:59:35 +0000 (UTC) Received: from [IPv6:2001:470:d701::4162:c374:cb35:4adf] (unknown [IPv6:2001:470:d701:0:4162:c374:cb35:4adf]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.jr-hosting.nl (Postfix) with ESMTPSA id 3C452261E; Mon, 12 Jan 2015 14:59:19 +0100 (CET) DMARC-Filter: OpenDMARC Filter v1.3.0 mail.jr-hosting.nl 3C452261E Authentication-Results: mail.jr-hosting.nl/3C452261E; dmarc=none header.from=FreeBSD.org Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Remko Lodder In-Reply-To: <201501120833.t0C8X53s071470@svn.freebsd.org> Date: Mon, 12 Jan 2015 14:59:18 +0100 Message-Id: References: <201501120833.t0C8X53s071470@svn.freebsd.org> To: Hiren Panchasara X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 13:59:36 -0000 --Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On 12 Jan 2015, at 09:33, Hiren Panchasara wrote: > > Author: hiren > Date: Mon Jan 12 08:33:04 2015 > New Revision: 277054 > URL: https://svnweb.freebsd.org/changeset/base/277054 > > Log: > DCTCP (Data Center TCP) implementation. Cool! Good work! -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News --Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJUs9M2AAoJEKjD27JZ84ywGI0P/idUx2kVQ8uapEa/vzU10qOJ p7CIHrvMEoI6eBwNPam+NcPLZxHKYDT3/pIppZC6kIDySJtgoYEJGAJ0/NE7YXeS ZxODc+N3/VjAC+ZFbiJu/2FKRKN0h/4sujR79AfE+2vcnoKIVZGikH3tdp8CM+AD FaE6/n2C0R5YckC+t2tAgK2Kal6ytERwRIrPLC2bzlURd4fQtxR9++QdaB5DCjHL HrHURfjFjqkxq8tNLnFlJOnKXMOxP3R2Mz3HQwsx6ED+/N74qrInDr+GAdtZNxLg 3KD3EIEtHzMGxNHS4ItlVgVMhMDASN1w03/scJzQpYWf4Nkex8hkcaIl4sRXhzeE /5MaXEymQiqwIOOd2HVObOOw8TgoMdY+X3ZPTmIAfU0FApj2ZztNKWMzxNameSMw shdUParl7MudzXh1ZIEIh+qKEyGvto+Mi0D4FG1WyzXruWmQZ7YUsxA3106CoxIR xdmg7IC/GkMoKDgfZXW38aCU2u4EwKcIqWuuJRiOT+GKg3V24kLH5DEd6Q+oS41i NJPM6P1sD6lcyCHoocRKNQhyCHXOa+su1UqoZnshGAp/aJbBoCyoI0VR2GqSVrM3 otn8T+QiCO0W8nd3hQpYVOd9/DQg+jo2QRDqWPDdWTqDVSJ793rQ/XsNkX+DqFgp WmtdPsFhTPuc9m5/yGBY =Z8yB -----END PGP SIGNATURE----- --Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 14:13:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51996289 for ; Mon, 12 Jan 2015 14:13:33 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 191A7219 for ; Mon, 12 Jan 2015 14:13:32 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C92E420892 for ; Mon, 12 Jan 2015 09:13:30 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Mon, 12 Jan 2015 09:13:30 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= x-sasl-enc:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=0fRK1t1dczxzBwd4Q4HtanNxKXw=; b=HFzX41r18T/zutuI3I BPDAtPE2rWOb6UWtxGqEJX9YtA1UXYEzo/vcnO6KInfmv6cFngXq+1YkGcb8V9i9 HiPb9pLyhZ2BTn0T6rH3XdKZ9Ec8I9+70O21h34PdfTCkcIun9Wh1MgV5GSxmTJ2 kCKY3q3k3oq/DvOEhWX+U4PNo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=0fRK1t1dczxzBwd4Q4Htan NxKXw=; b=Q0dKUsad4lVONYyROeFDpcKuVRJRLNrjdxzyyXj1yDJ6Sp2zr7/DbB FFB8wSu2Nhv9Pr4zzOLxpyEeXqdpeCkzEUpSUHStAdVO4I8h/PIl13+v5DtKsOMn MCMu1jkm9kCgKTINyzNW4N3S644OfUF+Eua+YRL0pgpeyGG8sr10M= X-Sasl-enc: DrE/wUzc2X6GJO7YvXOdJYG1ZT6Qz9fM1V+vfq62JlQB 1421072010 Received: from [192.168.1.81] (unknown [94.194.112.224]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C0446800F6; Mon, 12 Jan 2015 09:13:29 -0500 (EST) Message-ID: <54B3D689.1020608@fastmail.net> Date: Mon, 12 Jan 2015 14:13:29 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc References: <201501120833.t0C8X53s071470@svn.freebsd.org> In-Reply-To: <201501120833.t0C8X53s071470@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:13:33 -0000 On 12/01/2015 08:33, Hiren Panchasara wrote: > Log: > DCTCP (Data Center TCP) implementation. > Right On Commander! From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 14:39:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F93C7E5; Mon, 12 Jan 2015 14:39:13 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A4E6763F; Mon, 12 Jan 2015 14:39:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0CEdAUH020058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:39:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEdAwO020057; Mon, 12 Jan 2015 17:39:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:39:10 +0300 From: Gleb Smirnoff To: Luiz Otavio O Souza Subject: Re: svn commit: r276751 - head/sys/netinet Message-ID: <20150112143910.GL15484@FreeBSD.org> References: <201501061307.t06D7E0a001358@svn.freebsd.org> <20150107205203.GI15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:39:13 -0000 Luiz, On Fri, Jan 09, 2015 at 11:14:53AM -0200, Luiz Otavio O Souza wrote: L> On Wed, Jan 7, 2015 at 6:52 PM, Gleb Smirnoff wrote: L> > On Tue, Jan 06, 2015 at 01:07:14PM +0000, Luiz Otavio O Souza wrote: L> > L> Author: loos L> > L> Date: Tue Jan 6 13:07:13 2015 L> > L> New Revision: 276751 L> > L> URL: https://svnweb.freebsd.org/changeset/base/276751 L> > L> L> > L> Log: L> > L> Remove the check that prevent carp(4) advskew to be set to '0'. L> > L> L> > L> CARP devices are created with advskew set to '0' and once you set it to L> > L> any other value in the valid range (0..254) you can't set it back to zero. L> > L> L> > L> The code in question is also used to prevent that zeroed values overwrite L> > L> the CARP defaults when a new CARP device is created. Since advskew already L> > L> defaults to '0' for newly created devices and the new value is guaranteed L> > L> to be within the valid range, it is safe to overwrite it here. L> > L> L> > L> PR: 194672 L> > L> Reported by: cmb@pfsense.org L> > L> In collaboration with: garga L> > L> Tested by: garga L> > L> MFC after: 2 weeks L> > L> > Please correct me if I am wrong, but after this change any SIOCSVH will reset L> > the advskew to 0. L> > L> > For example, please try to: L> > L> > ifconfig igb0 vhid 1 advskew 100 L> > ifconfig igb0 vhid 1 pass foobar L> > L> > Now let's check the advskew: L> > L> > ifconfig igb0 L> L> Only if the SIOCSVH request is not initialized with data from SIOCGVH. L> L> ifconfig (at setcarp_callback()) will always read the existing values L> before issuing the SIOCSVH with the new values and this is what makes L> my change safe: L> L> # ifconfig em0 vhid 1 advskew 100 192.168.100.1/24 alias L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 1 advskew 100 L> # ifconfig em0 vhid 1 pass foobar L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 1 advskew 100 L> # ifconfig em0 vhid 1 advbase 5 L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 5 advskew 100 L> # ifconfig em0 vhid 1 advskew 0 L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 5 advskew 0 Thanks for checking that! Good that I was wrong. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 14:41:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B508E97B; Mon, 12 Jan 2015 14:41:39 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 33EE56E3; Mon, 12 Jan 2015 14:41:38 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0CEfaQI020075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:41:36 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEfaNG020074; Mon, 12 Jan 2015 17:41:36 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:41:36 +0300 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150112144136.GM15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:41:39 -0000 On Thu, Jan 08, 2015 at 12:49:45AM +0000, Bjoern A. Zeeb wrote: B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug B> > B> > and why couldn't it be fixed with having per-vnet thread? B> > B> B> > B> You don’t 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? B> > B> > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, B> > if you are speaking of "30000 whatever pf purging threads", then you B> > already mean “1 mln whatever processes". B> B> jail/VNETs can exist without a single process attached. B> B> But I guess the point is that there is only so much work we can do at the same time and we should be very careful in what we try to parallellellellize as with 5 vnets it might be fine, with a couple of thousand you may keep a system busy with itself. Let's admit that thousand of vnets all running pf is bizarre design and has no practical application. B> > Speaking of pf purging threads competing for resources. If someone wants B> > really independent pfs in vnets, then locks should be virtualized as well. B> B> No please don’t. The only places where we “virtualise†locks for VNETs is part of data structures which are vnet specific (virtualised). And the pf state tables (the data the purge threads work on) of course are vnet specific (virtualised). -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 14:52:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB25BD51; Mon, 12 Jan 2015 14:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96DE4858; Mon, 12 Jan 2015 14:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CEqinw050795; Mon, 12 Jan 2015 14:52:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CEqihQ050794; Mon, 12 Jan 2015 14:52:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501121452.t0CEqihQ050794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 14:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277072 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:52:44 -0000 Author: glebius Date: Mon Jan 12 14:52:43 2015 New Revision: 277072 URL: https://svnweb.freebsd.org/changeset/base/277072 Log: Do not go one layer down to check ifqueue length. First, not all drivers use ifqueue at all. Second, there is no point in this lockless check. Either positive or negative result of the check could be incorrect after a tick. Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) @@ -905,8 +905,6 @@ passout: u_int32_t id = htonl(ip6_randomid()); u_char nextproto; - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; - /* * Too large for the destination or interface; * fragment if possible. @@ -924,18 +922,6 @@ passout: } /* - * Verify that we have any chance at all of being able to queue - * the packet or packet fragments - */ - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) - < tlen /* - hlen */)) { - error = ENOBUFS; - IP6STAT_INC(ip6s_odropped); - goto bad; - } - - - /* * If the interface will not calculate checksums on * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 14:55:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12D60F89; Mon, 12 Jan 2015 14:55:19 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8ED0486D; Mon, 12 Jan 2015 14:55:17 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0CEtFiN020132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:55:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEtF67020131; Mon, 12 Jan 2015 17:55:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:55:15 +0300 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r276844 - head/sys/netinet6 Message-ID: <20150112145515.GN15484@FreeBSD.org> References: <201501081802.t08I26nA010368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501081802.t08I26nA010368@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:55:19 -0000 On Thu, Jan 08, 2015 at 06:02:06PM +0000, Alexander V. Chernikov wrote: A> Author: melifaro A> Date: Thu Jan 8 18:02:05 2015 A> New Revision: 276844 A> URL: https://svnweb.freebsd.org/changeset/base/276844 A> A> Log: A> * Use newly-created nd6_grab_holdchain() function to retrieve lle A> hold mbuf chain instead of calling full-blown nd6_output_lle() A> for each packet. This simplifies both callers and nd6_output_lle() A> implementation. A> * Make nd6_output_lle() static and remove now-unused lle and chain A> arguments. A> * Rename nd6_output_flush() -> nd6_flush_holdchain() to be consistent. A> * Move all pre-send transmit hooks to newly-created nd6_output_ifp(). A> Now nd6_output(), nd6_output_lle() and nd6_flush_holdchain() are using A> it to send mbufs to if_output. A> * Remove SeND hook from nd6_na_input() because it was implemented A> incorrectly since the beginning (r211501): A> - it tagged initial input mbuf (m) instead of m_hold A> - tagging _all_ mbufs in holdchain seems to be wrong anyway. Thanks that you gathered into one place all instances of ifp->if_output(origifp, ... ^^^ ^^^^^^^ But this extremely ugly place still needs to be fixed :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 15:05:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 534FB359; Mon, 12 Jan 2015 15:05:07 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C99E396A; Mon, 12 Jan 2015 15:05:06 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0CF54T4020191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 18:05:04 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CF54gW020190; Mon, 12 Jan 2015 18:05:04 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 18:05:04 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r276993 - head/sys/net80211 Message-ID: <20150112150504.GP15484@FreeBSD.org> References: <201501111843.t0BIhjrs078316@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501111843.t0BIhjrs078316@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 15:05:07 -0000 On Sun, Jan 11, 2015 at 06:43:45PM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Sun Jan 11 18:43:45 2015 A> New Revision: 276993 A> URL: https://svnweb.freebsd.org/changeset/base/276993 A> A> Log: A> Switch around the order of static inline to be in line with how it's A> used elsewhere, and to keep gcc-4.7 happy. A> A> This is a request from the DragonflyBSD project. I'd suggest to also do s/__inline/inline/ in such sweeps due to "inline" being a C99 keyword, while __inline is a GNU-ism from pre-99 times. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 15:11:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E510F73B; Mon, 12 Jan 2015 15:11:22 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8547A47; Mon, 12 Jan 2015 15:11:22 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1YAgeG-0009AB-PE; Mon, 12 Jan 2015 19:11:20 +0400 Message-ID: <54B3E3BE.7090302@FreeBSD.org> Date: Mon, 12 Jan 2015 18:09:50 +0300 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277072 - head/sys/netinet6 References: <201501121452.t0CEqihQ050794@svn.freebsd.org> In-Reply-To: <201501121452.t0CEqihQ050794@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 15:11:23 -0000 On 12.01.2015 17:52, Gleb Smirnoff wrote: > Author: glebius > Date: Mon Jan 12 14:52:43 2015 > New Revision: 277072 > URL: https://svnweb.freebsd.org/changeset/base/277072 > > Log: > Do not go one layer down to check ifqueue length. First, not all drivers > use ifqueue at all. Second, there is no point in this lockless check. > Either positive or negative result of the check could be incorrect after > a tick. Finally, no useless ifq_maxlen check! Thanks! > > Sponsored by: Nginx, Inc. > > Modified: > head/sys/netinet6/ip6_output.c > > Modified: head/sys/netinet6/ip6_output.c > ============================================================================== > --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) > +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) > @@ -905,8 +905,6 @@ passout: > u_int32_t id = htonl(ip6_randomid()); > u_char nextproto; > > - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; > - > /* > * Too large for the destination or interface; > * fragment if possible. > @@ -924,18 +922,6 @@ passout: > } > > /* > - * Verify that we have any chance at all of being able to queue > - * the packet or packet fragments > - */ > - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) > - < tlen /* - hlen */)) { > - error = ENOBUFS; > - IP6STAT_INC(ip6s_odropped); > - goto bad; > - } > - > - > - /* > * If the interface will not calculate checksums on > * fragmented packets, then do it here. > * XXX-BZ handle the hw offloading case. Need flags. > > From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 15:51:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1197FEC4; Mon, 12 Jan 2015 15:51:03 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9BE9E29; Mon, 12 Jan 2015 15:51:02 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 41256B94E; Mon, 12 Jan 2015 10:51:01 -0500 (EST) From: John Baldwin To: Bryan Venteicher Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 Date: Mon, 12 Jan 2015 10:51 -0500 Message-ID: <6173473.uE5Sr5nj0c@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 12 Jan 2015 10:51:01 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Nielsen , Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 15:51:03 -0000 On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery wrote: > > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > > > > > wrote: > > > Bryan- > > > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher > > > > > > wrote: > > > > Author: bryanv > > > > Date: Fri Oct 10 06:08:59 2014 > > > > New Revision: 272886 > > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > > > Log: > > > > Add context pointer and source address to the UDP tunnel callback > > > > > > > > These are needed for the forthcoming vxlan implementation. The > > > > context > > > > > > pointer means we do not have to use a spare pointer field in the > > > > inpcb, > > > > > > and the source address is required to populate vxlan's forwarding > > > > table. > > > > > > While I highly doubt there is an out of tree consumer of the UDP > > > > tunneling callback, this change may be a difficult to eventually > > > > MFC. > > > > > I noticed this comment while doing an MFC of vxlan to my local tree. > > > Do you think an MFC to 10-STABLE of this change (and vxlan > > > generally) will be feasible? Is there precedent for ABI changes like > > > this being sanctioned? Could symbol versioning help? > > > > > > I'd like to get some consensus on whether this commit is OK to MFC. With > > > this commit, vxlan should be an easy to MFC. > > > > Breaking ABI will potentially hurt packages. FreeBSD builds packages for > > the oldest supported release on a branch. If you break ABI in 10.2 while > > we are building packages for 10.1 then any packages using these > > interfaces may not work right or result in panics packages with kmods. > > Please consider that. > > The only user visible change of this commit would be the addition of a > field at the end of 'struct udpcb'. I don't think that is a problem, at > least a similar change didn't prevent the MFC of UDP Lite. > > The kernel part of this changes the UDP tunneling functions which I guess > there could be a 3rd party module out there, but I very highly doubt that, > based on how un-useful the previous interface was. Userland should not be impacted by this at all. (Nothing in userland cares about udpcb's internals.) I think there was only ever one consumer for the existing UDP tunneling code (bz@ knows what it is). I'm not sure where it lives. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:06:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2586524; Mon, 12 Jan 2015 16:06:04 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 967D6F7A; Mon, 12 Jan 2015 16:06:04 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YAhV4-0000es-BF; Mon, 12 Jan 2015 19:05:54 +0300 Date: Mon, 12 Jan 2015 19:05:54 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150112160554.GA2190@zxy.spb.ru> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> <20150112144136.GM15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20150112144136.GM15484@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , svn-src-head@freebsd.org, "Bjoern A. Zeeb" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:06:05 -0000 On Mon, Jan 12, 2015 at 05:41:36PM +0300, Gleb Smirnoff wrote: > On Thu, Jan 08, 2015 at 12:49:45AM +0000, Bjoern A. Zeeb wrote: > B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug > B> > B> > and why couldn't it be fixed with having per-vnet thread? > B> > B> > B> > B> You don't 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? > B> > > B> > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, > B> > if you are speaking of "30000 whatever pf purging threads", then you > B> > already mean "1 mln whatever processes". > B> > B> jail/VNETs can exist without a single process attached. > B> > B> But I guess the point is that there is only so much work we can do at the same time and we should be very careful in what we try to parallellellellize as with 5 vnets it might be fine, with a couple of thousand you may keep a system busy with itself. > > Let's admit that thousand of vnets all running pf is bizarre design > and has no practical application. Hosted firewall/NAT for ISP/Data centers. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:07:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 973A972A; Mon, 12 Jan 2015 16:07:56 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29724F9D; Mon, 12 Jan 2015 16:07:56 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id q58so19918476wes.4; Mon, 12 Jan 2015 08:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ae4n1ZMRWsAvKClLIWZ9CsF2E54Ktr3oLZbLGPRuPoE=; b=TTAXrBC1jrAYdVnkG61Zunj8DM2KmbKc0evq1YUAX7mMC/H2MG/z1z1IHOmdLT/40r pEKTWYdvpq/MizY9sJp07A39xQjUaB19vnxtlVduI44cwXyWF8EzbN1LMH9rv5pZQbxo DrUs4BpRTtNGKgtxk/TL9xsSiiqalSjZiCTBVMokY70V0cEsrD3IR3UJ5ySQvdMOHIDF /1TaFB5x7JHjdL8tG5+iOy/axCnfn8P4hCWI0KIFwOyGtXkrGqwlzPmmwfhgY0g90AJF 0KLv0SbS1QDTIPcCrGz1geTjKEGnn4ljPL0K8juR7M+zo33fMrPftjrfdwGj9j/tIcRT MgpQ== MIME-Version: 1.0 X-Received: by 10.194.108.9 with SMTP id hg9mr10882811wjb.68.1421078874512; Mon, 12 Jan 2015 08:07:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:07:54 -0800 (PST) In-Reply-To: <20150112150504.GP15484@FreeBSD.org> References: <201501111843.t0BIhjrs078316@svn.freebsd.org> <20150112150504.GP15484@FreeBSD.org> Date: Mon, 12 Jan 2015 08:07:54 -0800 X-Google-Sender-Auth: 6Yva0WFnSVthv3AhlwZUORs33-o Message-ID: Subject: Re: svn commit: r276993 - head/sys/net80211 From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:07:56 -0000 On 12 January 2015 at 07:05, Gleb Smirnoff wrote: > On Sun, Jan 11, 2015 at 06:43:45PM +0000, Adrian Chadd wrote: > A> Author: adrian > A> Date: Sun Jan 11 18:43:45 2015 > A> New Revision: 276993 > A> URL: https://svnweb.freebsd.org/changeset/base/276993 > A> > A> Log: > A> Switch around the order of static inline to be in line with how it's > A> used elsewhere, and to keep gcc-4.7 happy. > A> > A> This is a request from the DragonflyBSD project. > > I'd suggest to also do s/__inline/inline/ in such sweeps due to "inline" > being a C99 keyword, while __inline is a GNU-ism from pre-99 times. Sure thing. (I don't /think/ anyone tries compiling net80211 on anything pre-C99. Oh wait, crap, they do. Well, they can push me patches to create an INLINE #define or something.) -adrian > -- > Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:09:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21D568DB; Mon, 12 Jan 2015 16:09:23 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7841FB6; Mon, 12 Jan 2015 16:09:22 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id n12so20191682wgh.8; Mon, 12 Jan 2015 08:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=zCPESMgXVlyrOfGKDxk3N90Nb5WMcYJvXeuWaH0/iTc=; b=krCRb8gl2LQcg5GozWEjz9Xui5IkCQ5VvjIUF0ucsUWPPYdCKM9qrUBW9piANzKitQ JczTjbkPje44mFj4gs+OJQUTHYioK1BT/AfrZeYXoKBVegkVQspsJ7LynnoXsu7GvmZ5 i2y+8/i4hb5ZMnY6AFoC49iVcKCbRyAxhMLmr0cp89R34fx/9zfK9+c3M1FP9+rB5V/O olFdrse7qTftXW9fXV/NbzYJH6nNU7N3zi+c1A5B85DMlC/zM+tMkTiK4oHolYOvoyyt esUrsgMs7HiRGdjk5dtd7ohfk0tMgUGMub8Tnq2jigngp8toAQfzP4FYGEh97zTT3Yk7 WWQg== MIME-Version: 1.0 X-Received: by 10.180.87.36 with SMTP id u4mr31443290wiz.20.1421078958894; Mon, 12 Jan 2015 08:09:18 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:09:18 -0800 (PST) In-Reply-To: <54B3E3BE.7090302@FreeBSD.org> References: <201501121452.t0CEqihQ050794@svn.freebsd.org> <54B3E3BE.7090302@FreeBSD.org> Date: Mon, 12 Jan 2015 08:09:18 -0800 X-Google-Sender-Auth: AnpK01hhGdr_dKGJAp-8yJ6EfjI Message-ID: Subject: Re: svn commit: r277072 - head/sys/netinet6 From: Adrian Chadd To: "Alexander V. Chernikov" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:09:23 -0000 On 12 January 2015 at 07:09, Alexander V. Chernikov wrote: > On 12.01.2015 17:52, Gleb Smirnoff wrote: >> Author: glebius >> Date: Mon Jan 12 14:52:43 2015 >> New Revision: 277072 >> URL: https://svnweb.freebsd.org/changeset/base/277072 >> >> Log: >> Do not go one layer down to check ifqueue length. First, not all drivers >> use ifqueue at all. Second, there is no point in this lockless check. >> Either positive or negative result of the check could be incorrect after >> a tick. > Finally, no useless ifq_maxlen check! Yeah, I killed it in the ipv4 world. Well, commented it out. It's been bogus ever since kernels became re-entrant and SMP. :( -adrian > Thanks! >> >> Sponsored by: Nginx, Inc. >> >> Modified: >> head/sys/netinet6/ip6_output.c >> >> Modified: head/sys/netinet6/ip6_output.c >> ============================================================================== >> --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) >> +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) >> @@ -905,8 +905,6 @@ passout: >> u_int32_t id = htonl(ip6_randomid()); >> u_char nextproto; >> >> - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; >> - >> /* >> * Too large for the destination or interface; >> * fragment if possible. >> @@ -924,18 +922,6 @@ passout: >> } >> >> /* >> - * Verify that we have any chance at all of being able to queue >> - * the packet or packet fragments >> - */ >> - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) >> - < tlen /* - hlen */)) { >> - error = ENOBUFS; >> - IP6STAT_INC(ip6s_odropped); >> - goto bad; >> - } >> - >> - >> - /* >> * If the interface will not calculate checksums on >> * fragmented packets, then do it here. >> * XXX-BZ handle the hw offloading case. Need flags. >> >> > > From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:12:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F13DB2E; Mon, 12 Jan 2015 16:12:49 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6828510B; Mon, 12 Jan 2015 16:12:49 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rl12so25939981iec.12; Mon, 12 Jan 2015 08:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ye7R0MabxHymeg+QnTZElOxVgAYS+8YpNkuahHp2Lmw=; b=fadmfrfffSq3y6fFj/2zt0b0llkpGfKB/sXMWQr16VvfY8ps65/1FWpUr73vNT2Bad PqAJF7WRgfVxCXXidLGDaEgRYAoU01ZznQbCGcj853KO9LeL/E2KrhPBFc4uhLMCUxcY ZTCUZNroa5NrZHWBdILFE6asE3XsLMwKMS7SwUnRJfbj4omrjdXLl35wHGNosubPr40O fxg5xC2I6HkO3GF4W7my4LxhJhjaviOCC+k8/JTQ8rEdvWYevbw2cTUK+KfrMB+N+Of7 5GqRJc+lFRoZisOElSPj+m8/J2WxoahwzIMzKG8TKYsJPwaKUe2iJtEMaXx6wbtqjigp 7Kzw== X-Received: by 10.50.7.34 with SMTP id g2mr16089595iga.36.1421079168625; Mon, 12 Jan 2015 08:12:48 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.71.228 with HTTP; Mon, 12 Jan 2015 08:12:18 -0800 (PST) In-Reply-To: <6173473.uE5Sr5nj0c@ralph.baldwin.cx> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> From: Bryan Venteicher Date: Mon, 12 Jan 2015 10:12:18 -0600 X-Google-Sender-Auth: FBDzLg6aVUDQOZBFWAXJ25vj0x0 Message-ID: Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:12:49 -0000 On Mon, Jan 12, 2015 at 9:51 AM, John Baldwin wrote: > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > > On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery > wrote: > > > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > > > > > > > wrote: > > > > Bryan- > > > > > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher < > bryanv@freebsd.org > > > > > > > > > wrote: > > > > > Author: bryanv > > > > > Date: Fri Oct 10 06:08:59 2014 > > > > > New Revision: 272886 > > > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > > > > > Log: > > > > > Add context pointer and source address to the UDP tunnel > callback > > > > > > > > > > These are needed for the forthcoming vxlan implementation. The > > > > > > context > > > > > > > > pointer means we do not have to use a spare pointer field in > the > > > > > > inpcb, > > > > > > > > and the source address is required to populate vxlan's > forwarding > > > > > > table. > > > > > > > > While I highly doubt there is an out of tree consumer of the > UDP > > > > > tunneling callback, this change may be a difficult to > eventually > > > > > > MFC. > > > > > > > I noticed this comment while doing an MFC of vxlan to my local > tree. > > > > Do you think an MFC to 10-STABLE of this change (and vxlan > > > > generally) will be feasible? Is there precedent for ABI changes > like > > > > this being sanctioned? Could symbol versioning help? > > > > > > > > I'd like to get some consensus on whether this commit is OK to MFC. > With > > > > this commit, vxlan should be an easy to MFC. > > > > > > Breaking ABI will potentially hurt packages. FreeBSD builds packages > for > > > the oldest supported release on a branch. If you break ABI in 10.2 > while > > > we are building packages for 10.1 then any packages using these > > > interfaces may not work right or result in panics packages with kmods. > > > Please consider that. > > > > The only user visible change of this commit would be the addition of a > > field at the end of 'struct udpcb'. I don't think that is a problem, at > > least a similar change didn't prevent the MFC of UDP Lite. > > > > The kernel part of this changes the UDP tunneling functions which I guess > > there could be a 3rd party module out there, but I very highly doubt > that, > > based on how un-useful the previous interface was. > > Userland should not be impacted by this at all. (Nothing in userland cares > about udpcb's internals.) I think there was only ever one consumer for the > existing UDP tunneling code (bz@ knows what it is). I'm not sure where it > lives. > > The only in tree consumer is SCTP. > -- > John Baldwin > > From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:12:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 902ADC66; Mon, 12 Jan 2015 16:12:57 +0000 (UTC) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 305B910E; Mon, 12 Jan 2015 16:12:57 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id n12so20210045wgh.6; Mon, 12 Jan 2015 08:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=J+JFSwdqmPLZGD1y9mA5XPyQsHrWZHnlYvFnw5gMNU8=; b=KcQx57JldfxKEDSqEf6A4zvxkEKkf5zo94OBgo+Sn5a3Fl9dbfxriUF1C8DX1vNTmA b/cbchytXsNK9y04Ab/rkZxIwi/xr6xyz0+9jIsSGabPqKwbTyLEyqFr2TNCNR7KxEZq b2qRbefVxDIW3hTuQ7iOi1+FD0tIDgRc7fh1eO8JQxD2PBdMrCVUPOM3ES//oG8Fu1ze LzT17jXu39FdSqf/xmAvdifrzdBV3ekgO+NP89PsNa+t/UtreHf+hlzBTHzk/3Hw46Ux nAKDPCzWl5ra33dXrPusfDbZbu0JgWEFgaCXKP4/pcmZiBAhjy5RujKW5srztR8yOER7 /ztA== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr60548561wjf.15.1421079175497; Mon, 12 Jan 2015 08:12:55 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:12:55 -0800 (PST) In-Reply-To: <20150112160554.GA2190@zxy.spb.ru> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> <20150112144136.GM15484@FreeBSD.org> <20150112160554.GA2190@zxy.spb.ru> Date: Mon, 12 Jan 2015 08:12:55 -0800 X-Google-Sender-Auth: dQQ1iyPt-8tpZgSIqpLBkrBNVic Message-ID: Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: Adrian Chadd To: Slawa Olhovchenkov Content-Type: text/plain; charset=UTF-8 Cc: Craig Rodrigues , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Nikos Vassiliadis , Gleb Smirnoff , "svn-src-head@freebsd.org" , "Bjoern A. Zeeb" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:12:57 -0000 On 12 January 2015 at 08:05, Slawa Olhovchenkov wrote: > On Mon, Jan 12, 2015 at 05:41:36PM +0300, Gleb Smirnoff wrote: > >> On Thu, Jan 08, 2015 at 12:49:45AM +0000, Bjoern A. Zeeb wrote: >> B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug >> B> > B> > and why couldn't it be fixed with having per-vnet thread? >> B> > B> >> B> > B> You don't 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? >> B> > >> B> > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, >> B> > if you are speaking of "30000 whatever pf purging threads", then you >> B> > already mean "1 mln whatever processes". >> B> >> B> jail/VNETs can exist without a single process attached. >> B> >> B> But I guess the point is that there is only so much work we can do at the same time and we should be very careful in what we try to parallellellellize as with 5 vnets it might be fine, with a couple of thousand you may keep a system busy with itself. >> >> Let's admit that thousand of vnets all running pf is bizarre design >> and has no practical application. > > Hosted firewall/NAT for ISP/Data centers. Then let's bite the bullet and setup some per-"something" (maybe CPU, maybe RSS, etc) global taskqueues to run cooperative multitasked bits like this on. This isn't the only thing that we'll want to have potentially tens of thousands of, but not have tens of thousands of worker threads. -adrian From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:16:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B9ABE9C; Mon, 12 Jan 2015 16:16:51 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D3BE414F; Mon, 12 Jan 2015 16:16:49 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0CGGliW020854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 19:16:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CGGl4w020853; Mon, 12 Jan 2015 19:16:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 19:16:47 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r277072 - head/sys/netinet6 Message-ID: <20150112161647.GQ15484@FreeBSD.org> References: <201501121452.t0CEqihQ050794@svn.freebsd.org> <54B3E3BE.7090302@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "Alexander V. Chernikov" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:16:51 -0000 On Mon, Jan 12, 2015 at 08:09:18AM -0800, Adrian Chadd wrote: A> On 12 January 2015 at 07:09, Alexander V. Chernikov A> wrote: A> > On 12.01.2015 17:52, Gleb Smirnoff wrote: A> >> Author: glebius A> >> Date: Mon Jan 12 14:52:43 2015 A> >> New Revision: 277072 A> >> URL: https://svnweb.freebsd.org/changeset/base/277072 A> >> A> >> Log: A> >> Do not go one layer down to check ifqueue length. First, not all drivers A> >> use ifqueue at all. Second, there is no point in this lockless check. A> >> Either positive or negative result of the check could be incorrect after A> >> a tick. A> > Finally, no useless ifq_maxlen check! A> A> Yeah, I killed it in the ipv4 world. Well, commented it out. It's been A> bogus ever since kernels became re-entrant and SMP. :( Another one (even with extra mistake) left in ip_fastfwd.c until today. One still left in SCTP output code, waiting for maintainers to review it. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 16:21:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E318E349; Mon, 12 Jan 2015 16:21:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C4D6212; Mon, 12 Jan 2015 16:21:21 +0000 (UTC) Received: from new-host-4.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2AF70B915; Mon, 12 Jan 2015 11:21:19 -0500 (EST) Message-ID: <54B3F47E.5050206@baldwin.cx> Date: Mon, 12 Jan 2015 11:21:18 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Bryan Venteicher Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 12 Jan 2015 11:21:19 -0500 (EST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Nielsen , Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:21:22 -0000 On 1/12/15 11:12 AM, Bryan Venteicher wrote: > > > On Mon, Jan 12, 2015 at 9:51 AM, John Baldwin > wrote: > > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > > On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery > > wrote: > > > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > > > > > > > > >> wrote: > > > > Bryan- > > > > > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher > > > > > > > > > >> > wrote: > > > > > Author: bryanv > > > > > Date: Fri Oct 10 06:08:59 2014 > > > > > New Revision: 272886 > > > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > > > > > Log: > > > > > Add context pointer and source address to the UDP > tunnel callback > > > > > > > > > > These are needed for the forthcoming vxlan > implementation. The > > > > > > context > > > > > > > > pointer means we do not have to use a spare pointer > field in the > > > > > > inpcb, > > > > > > > > and the source address is required to populate > vxlan's forwarding > > > > > > table. > > > > > > > > While I highly doubt there is an out of tree consumer > of the UDP > > > > > tunneling callback, this change may be a difficult to > eventually > > > > > > MFC. > > > > > > > I noticed this comment while doing an MFC of vxlan to my > local tree. > > > > Do you think an MFC to 10-STABLE of this change (and vxlan > > > > generally) will be feasible? Is there precedent for ABI > changes like > > > > this being sanctioned? Could symbol versioning help? > > > > > > > > I'd like to get some consensus on whether this commit is OK > to MFC. With > > > > this commit, vxlan should be an easy to MFC. > > > > > > Breaking ABI will potentially hurt packages. FreeBSD builds > packages for > > > the oldest supported release on a branch. If you break ABI in > 10.2 while > > > we are building packages for 10.1 then any packages using these > > > interfaces may not work right or result in panics packages > with kmods. > > > Please consider that. > > > > The only user visible change of this commit would be the > addition of a > > field at the end of 'struct udpcb'. I don't think that is a > problem, at > > least a similar change didn't prevent the MFC of UDP Lite. > > > > The kernel part of this changes the UDP tunneling functions > which I guess > > there could be a 3rd party module out there, but I very highly > doubt that, > > based on how un-useful the previous interface was. > > Userland should not be impacted by this at all. (Nothing in > userland cares > about udpcb's internals.) I think there was only ever one > consumer for the > existing UDP tunneling code (bz@ knows what it is). I'm not sure > where it > lives. > > > > The only in tree consumer is SCTP. I thought there was some IPSEC use-case that was the original impetus for bz@ adding this? Bjoern really is the person to ask about that though. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 17:42:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F54D703; Mon, 12 Jan 2015 17:42:52 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BAB7FDFB; Mon, 12 Jan 2015 17:42:51 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 98D1825D3892; Mon, 12 Jan 2015 17:42:39 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D8E02C77058; Mon, 12 Jan 2015 17:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Bc6n-Fs87BCl; Mon, 12 Jan 2015 17:42:37 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E8DA9C77072; Mon, 12 Jan 2015 17:42:33 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 From: "Bjoern A. Zeeb" In-Reply-To: <6173473.uE5Sr5nj0c@ralph.baldwin.cx> Date: Mon, 12 Jan 2015 17:42:34 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 17:42:52 -0000 > On 12 Jan 2015, at 15:51 , John Baldwin wrote: >=20 > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: >> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery = wrote: >>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: >>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>=20 >>>> > wrote: >>>> Bryan- >>>>=20 >>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher = >>>=20 >>>> > wrote: >>>>> Author: bryanv >>>>> Date: Fri Oct 10 06:08:59 2014 >>>>> New Revision: 272886 >>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 >>>>>=20 >>>>> Log: >>>>> Add context pointer and source address to the UDP tunnel callback >>>>>=20 >>>>> These are needed for the forthcoming vxlan implementation. The >>>=20 >>> context >>>=20 >>>>> pointer means we do not have to use a spare pointer field in the >>>=20 >>> inpcb, >>>=20 >>>>> and the source address is required to populate vxlan's forwarding >>>=20 >>> table. >>>=20 >>>>> While I highly doubt there is an out of tree consumer of the UDP >>>>> tunneling callback, this change may be a difficult to eventually >>>=20 >>> MFC. >>>=20 >>>> I noticed this comment while doing an MFC of vxlan to my local = tree. >>>> Do you think an MFC to 10-STABLE of this change (and vxlan >>>> generally) will be feasible? Is there precedent for ABI changes = like >>>> this being sanctioned? Could symbol versioning help? >>>>=20 >>>> I'd like to get some consensus on whether this commit is OK to MFC. = With >>>> this commit, vxlan should be an easy to MFC. >>>=20 >>> Breaking ABI will potentially hurt packages. FreeBSD builds packages = for >>> the oldest supported release on a branch. If you break ABI in 10.2 = while >>> we are building packages for 10.1 then any packages using these >>> interfaces may not work right or result in panics packages with = kmods. >>> Please consider that. >>=20 >> The only user visible change of this commit would be the addition of = a >> field at the end of 'struct udpcb'. I don't think that is a problem, = at >> least a similar change didn't prevent the MFC of UDP Lite. >>=20 >> The kernel part of this changes the UDP tunneling functions which I = guess >> there could be a 3rd party module out there, but I very highly doubt = that, >> based on how un-useful the previous interface was. >=20 > Userland should not be impacted by this at all. (Nothing in userland = cares > about udpcb's internals.) I think there was only ever one consumer = for the=20 > existing UDP tunneling code (bz@ knows what it is). I'm not sure = where it=20 > lives. If you are talking about u_tun_func then it came from SCTP over UDP = tunneling. tuexen and rrs are your friends. I was wondering if it could be used similarly for IPsec UDPencap but I = think that went nowhere back then. =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:06:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E67C2EB2; Mon, 12 Jan 2015 18:06:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D278FCB; Mon, 12 Jan 2015 18:06:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CI6N2Q043821; Mon, 12 Jan 2015 18:06:23 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CI6NVx043820; Mon, 12 Jan 2015 18:06:23 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501121806.t0CI6NVx043820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 18:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277077 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:06:24 -0000 Author: glebius Date: Mon Jan 12 18:06:22 2015 New Revision: 277077 URL: https://svnweb.freebsd.org/changeset/base/277077 Log: Do not go one layer down to check ifqueue length. First, not all drivers use ifqueue at all. Second, there is no point in this lockless check. Either positive or negative result of the check could be incorrect after a tick. Reviewed by: tuexen Sponsored by: Nginx, Inc. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jan 12 16:18:34 2015 (r277076) +++ head/sys/netinet/sctp_output.c Mon Jan 12 18:06:22 2015 (r277077) @@ -7958,22 +7958,6 @@ again_one_more_time: } else { skip_data_for_this_net = 0; } - if ((net->ro.ro_rt) && (net->ro.ro_rt->rt_ifp)) { - /* - * if we have a route and an ifp check to see if we - * have room to send to this guy - */ - struct ifnet *ifp; - - ifp = net->ro.ro_rt->rt_ifp; - if ((ifp->if_snd.ifq_len + 2) >= ifp->if_snd.ifq_maxlen) { - SCTP_STAT_INCR(sctps_ifnomemqueued); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_MAXBURST_ENABLE) { - sctp_log_maxburst(stcb, net, ifp->if_snd.ifq_len, ifp->if_snd.ifq_maxlen, SCTP_MAX_IFP_APPLIED); - } - continue; - } - } switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:13:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C30172D7; Mon, 12 Jan 2015 18:13:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD5091F7; Mon, 12 Jan 2015 18:13:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CIDecs048194; Mon, 12 Jan 2015 18:13:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIDdI5048184; Mon, 12 Jan 2015 18:13:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501121813.t0CIDdI5048184@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 18:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277078 - in head/lib/libc: arm/gen gen mips/gen powerpc/gen powerpc64/gen sparc64/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:13:40 -0000 Author: emaste Date: Mon Jan 12 18:13:38 2015 New Revision: 277078 URL: https://svnweb.freebsd.org/changeset/base/277078 Log: Remove duplicate copies of trivial getcontextx.c Only i386 and amd64 provide a non-trivial __getcontextx(). Use a common trivial implementation in gen/ for other architectures, rather than copying the file to each MD subdirectory. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1472 Added: head/lib/libc/gen/trivial-getcontextx.c - copied unchanged from r277076, head/lib/libc/arm/gen/getcontextx.c Deleted: head/lib/libc/arm/gen/getcontextx.c head/lib/libc/mips/gen/getcontextx.c head/lib/libc/powerpc/gen/getcontextx.c head/lib/libc/powerpc64/gen/getcontextx.c head/lib/libc/sparc64/gen/getcontextx.c Modified: head/lib/libc/arm/gen/Makefile.inc head/lib/libc/mips/gen/Makefile.inc head/lib/libc/powerpc/gen/Makefile.inc head/lib/libc/powerpc64/gen/Makefile.inc head/lib/libc/sparc64/gen/Makefile.inc Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/arm/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -2,9 +2,10 @@ # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ - getcontextx.c infinity.c ldexp.c makecontext.c \ + infinity.c ldexp.c makecontext.c \ __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \ - arm_initfini.c + arm_initfini.c \ + trivial-getcontextx.c .if ${MACHINE_ARCH} == "armv6hf" SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ Copied: head/lib/libc/gen/trivial-getcontextx.c (from r277076, head/lib/libc/arm/gen/getcontextx.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/trivial-getcontextx.c Mon Jan 12 18:13:38 2015 (r277078, copy of r277076, head/lib/libc/arm/gen/getcontextx.c) @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2011 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +int +__getcontextx_size(void) +{ + + return (sizeof(ucontext_t)); +} + +int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int +__fillcontextx(char *ctx) +{ + ucontext_t *ucp; + + ucp = (ucontext_t *)ctx; + return (getcontext(ucp)); +} + +__weak_reference(__getcontextx, getcontextx); + +ucontext_t * +__getcontextx(void) +{ + char *ctx; + int error; + + ctx = malloc(__getcontextx_size()); + if (ctx == NULL) + return (NULL); + if (__fillcontextx(ctx) == -1) { + error = errno; + free(ctx); + errno = error; + return (NULL); + } + return ((ucontext_t *)ctx); +} Modified: head/lib/libc/mips/gen/Makefile.inc ============================================================================== --- head/lib/libc/mips/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/mips/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -6,5 +6,6 @@ SRCS+= infinity.c fabs.c ldexp.c # SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ # fpsetround.c fpsetsticky.c -SRCS+= _ctx_start.S _set_tp.c _setjmp.S getcontextx.c makecontext.c \ - setjmp.S signalcontext.c sigsetjmp.S +SRCS+= _ctx_start.S _set_tp.c _setjmp.S makecontext.c \ + setjmp.S signalcontext.c sigsetjmp.S \ + trivial-getcontextx.c Modified: head/lib/libc/powerpc/gen/Makefile.inc ============================================================================== --- head/lib/libc/powerpc/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/powerpc/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -1,9 +1,11 @@ # $FreeBSD$ SRCS += _ctx_start.S eabi.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \ + fpgetsticky.c fpsetmask.c fpsetround.c \ infinity.c ldexp.c makecontext.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ - _set_tp.c + _set_tp.c \ + trivial-getcontextx.c + Modified: head/lib/libc/powerpc64/gen/Makefile.inc ============================================================================== --- head/lib/libc/powerpc64/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/powerpc64/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -1,9 +1,10 @@ # $FreeBSD$ SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \ + fpgetsticky.c fpsetmask.c fpsetround.c \ infinity.c ldexp.c makecontext.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ - _set_tp.c + _set_tp.c \ + trivial-getcontextx.c Modified: head/lib/libc/sparc64/gen/Makefile.inc ============================================================================== --- head/lib/libc/sparc64/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/sparc64/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -2,5 +2,6 @@ SRCS+= _ctx_start.S _setjmp.S fabs.S fixunsdfsi.S flt_rounds.c fpgetmask.c \ fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c \ - getcontextx.c infinity.c ldexp.c makecontext.c \ - signalcontext.c setjmp.S sigsetjmp.S _set_tp.c + infinity.c ldexp.c makecontext.c \ + signalcontext.c setjmp.S sigsetjmp.S _set_tp.c \ + trivial-getcontextx.c From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:19:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49842848; Mon, 12 Jan 2015 18:19:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3546E26F; Mon, 12 Jan 2015 18:19:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CIJ8Rd049145; Mon, 12 Jan 2015 18:19:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIJ8rD049144; Mon, 12 Jan 2015 18:19:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501121819.t0CIJ8rD049144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 18:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277080 - stable/9/share/zoneinfo X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:19:08 -0000 Author: emaste Date: Mon Jan 12 18:19:07 2015 New Revision: 277080 URL: https://svnweb.freebsd.org/changeset/base/277080 Log: Avoid ./ in zoneinfo entries in METALOG Use of "find ." resulted in METALOG entries with an extra ./ -- e.g., ./usr/share/zoneinfo/./America/Toronto. Avoid this by using globbing via "find *" instead. MFC of r271047. Modified: stable/9/share/zoneinfo/Makefile Directory Properties: stable/9/share/zoneinfo/ (props changed) Modified: stable/9/share/zoneinfo/Makefile ============================================================================== --- stable/9/share/zoneinfo/Makefile Mon Jan 12 18:14:22 2015 (r277079) +++ stable/9/share/zoneinfo/Makefile Mon Jan 12 18:19:07 2015 (r277080) @@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA} beforeinstall: cd ${TZBUILDDIR} && \ - find . -type f -print -exec ${INSTALL} \ + find * -type f -print -exec ${INSTALL} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:20:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C33D4A5D; Mon, 12 Jan 2015 18:20:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF24428A; Mon, 12 Jan 2015 18:20:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CIKcWD050013; Mon, 12 Jan 2015 18:20:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIKcNM050012; Mon, 12 Jan 2015 18:20:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501121820.t0CIKcNM050012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 18:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277081 - stable/9/etc/mtree X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:20:38 -0000 Author: emaste Date: Mon Jan 12 18:20:37 2015 New Revision: 277081 URL: https://svnweb.freebsd.org/changeset/base/277081 Log: Add missing libexec/bsdconfig subdirectories MFC of r266902. Modified: stable/9/etc/mtree/BSD.usr.dist Directory Properties: stable/9/etc/ (props changed) stable/9/etc/mtree/ (props changed) Modified: stable/9/etc/mtree/BSD.usr.dist ============================================================================== --- stable/9/etc/mtree/BSD.usr.dist Mon Jan 12 18:19:07 2015 (r277080) +++ stable/9/etc/mtree/BSD.usr.dist Mon Jan 12 18:20:37 2015 (r277081) @@ -99,6 +99,10 @@ .. include .. + includes + include + .. + .. .. bsdinstall .. From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:32:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8C9A120; Mon, 12 Jan 2015 18:32:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C441F69C; Mon, 12 Jan 2015 18:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CIWkwR058071; Mon, 12 Jan 2015 18:32:46 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIWjd1058066; Mon, 12 Jan 2015 18:32:45 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501121832.t0CIWjd1058066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 12 Jan 2015 18:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277082 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:32:47 -0000 Author: jfv Date: Mon Jan 12 18:32:45 2015 New Revision: 277082 URL: https://svnweb.freebsd.org/changeset/base/277082 Log: Update to the shared code for Intel I40E drivers in preparation for the ixl 1.3.0 and ixlv 1.2.0 revisions. MFC after: 1 week Modified: head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.c head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_register.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h Modified: head/sys/dev/ixl/i40e_adminq.c ============================================================================== --- head/sys/dev/ixl/i40e_adminq.c Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq.c Mon Jan 12 18:32:45 2015 (r277082) @@ -589,10 +589,10 @@ enum i40e_status_code i40e_init_adminq(s if (ret_code != I40E_SUCCESS) goto init_adminq_free_asq; - if (i40e_is_vf(hw)) /* VF has no need of firmware */ - goto init_adminq_exit; - -/* There are some cases where the firmware may not be quite ready + /* VF has no need of firmware */ + if (i40e_is_vf(hw)) + goto init_adminq_exit; + /* There are some cases where the firmware may not be quite ready * for AdminQ operations, so we retry the AdminQ setup a few times * if we see timeouts in this first AQ call. */ @@ -600,6 +600,7 @@ enum i40e_status_code i40e_init_adminq(s ret_code = i40e_aq_get_firmware_version(hw, &hw->aq.fw_maj_ver, &hw->aq.fw_min_ver, + &hw->aq.fw_build, &hw->aq.api_maj_ver, &hw->aq.api_min_ver, NULL); @@ -625,7 +626,8 @@ enum i40e_status_code i40e_init_adminq(s /* pre-emptive resource lock release */ i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); - hw->aq.nvm_busy = FALSE; + hw->aq.nvm_release_on_done = FALSE; + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; ret_code = i40e_aq_set_hmc_resource_profile(hw, I40E_HMC_PROFILE_DEFAULT, @@ -767,12 +769,6 @@ enum i40e_status_code i40e_asq_send_comm goto asq_send_command_exit; } - if (i40e_is_nvm_update_op(desc) && hw->aq.nvm_busy) { - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQTX: NVM busy.\n"); - status = I40E_ERR_NVM; - goto asq_send_command_exit; - } - details = I40E_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); if (cmd_details) { i40e_memcpy(details, @@ -924,9 +920,6 @@ enum i40e_status_code i40e_asq_send_comm status = I40E_ERR_ADMIN_QUEUE_TIMEOUT; } - if (!status && i40e_is_nvm_update_op(desc)) - hw->aq.nvm_busy = TRUE; - asq_send_command_error: i40e_release_spinlock(&hw->aq.asq_spinlock); asq_send_command_exit: @@ -1042,7 +1035,6 @@ clean_arq_element_out: i40e_release_spinlock(&hw->aq.arq_spinlock); if (i40e_is_nvm_update_op(&e->desc)) { - hw->aq.nvm_busy = FALSE; if (hw->aq.nvm_release_on_done) { i40e_release_nvm(hw); hw->aq.nvm_release_on_done = FALSE; Modified: head/sys/dev/ixl/i40e_adminq.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq.h Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq.h Mon Jan 12 18:32:45 2015 (r277082) @@ -36,6 +36,7 @@ #define _I40E_ADMINQ_H_ #include "i40e_osdep.h" +#include "i40e_status.h" #include "i40e_adminq_cmd.h" #define I40E_ADMINQ_DESC(R, i) \ @@ -100,9 +101,9 @@ struct i40e_adminq_info { u16 asq_buf_size; /* send queue buffer size */ u16 fw_maj_ver; /* firmware major version */ u16 fw_min_ver; /* firmware minor version */ + u32 fw_build; /* firmware build number */ u16 api_maj_ver; /* api major version */ u16 api_min_ver; /* api minor version */ - bool nvm_busy; bool nvm_release_on_done; struct i40e_spinlock asq_spinlock; /* Send queue spinlock */ @@ -115,7 +116,7 @@ struct i40e_adminq_info { /* general information */ #define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 100 /* msecs */ +#define I40E_ASQ_CMD_TIMEOUT 250 /* msecs */ void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, u16 opcode); Modified: head/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq_cmd.h Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Mon Jan 12 18:32:45 2015 (r277082) @@ -263,6 +263,9 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_lldp_delete_tlv = 0x0A04, i40e_aqc_opc_lldp_stop = 0x0A05, i40e_aqc_opc_lldp_start = 0x0A06, + i40e_aqc_opc_get_cee_dcb_cfg = 0x0A07, + i40e_aqc_opc_lldp_set_local_mib = 0x0A08, + i40e_aqc_opc_lldp_stop_start_spec_agent = 0x0A09, /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, @@ -275,6 +278,8 @@ enum i40e_admin_queue_opc { /* OEM commands */ i40e_aqc_opc_oem_parameter_change = 0xFE00, i40e_aqc_opc_oem_device_status_change = 0xFE01, + i40e_aqc_opc_oem_ocsd_initialize = 0xFE02, + i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, /* debug commands */ i40e_aqc_opc_debug_get_deviceid = 0xFF00, @@ -283,7 +288,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_debug_write_reg = 0xFF04, i40e_aqc_opc_debug_modify_reg = 0xFF07, i40e_aqc_opc_debug_dump_internals = 0xFF08, - i40e_aqc_opc_debug_modify_internals = 0xFF09, }; /* command structures and indirect data structures */ @@ -417,6 +421,7 @@ struct i40e_aqc_list_capabilities_elemen #define I40E_AQ_CAP_ID_VSI 0x0017 #define I40E_AQ_CAP_ID_DCB 0x0018 #define I40E_AQ_CAP_ID_FCOE 0x0021 +#define I40E_AQ_CAP_ID_ISCSI 0x0022 #define I40E_AQ_CAP_ID_RSS 0x0040 #define I40E_AQ_CAP_ID_RXQ 0x0041 #define I40E_AQ_CAP_ID_TXQ 0x0042 @@ -461,8 +466,11 @@ struct i40e_aqc_arp_proxy_data { __le32 pfpm_proxyfc; __le32 ip_addr; u8 mac_addr[6]; + u8 reserved[2]; }; +I40E_CHECK_STRUCT_LEN(0x14, i40e_aqc_arp_proxy_data); + /* Set NS Proxy Table Entry Command (indirect 0x0105) */ struct i40e_aqc_ns_proxy_data { __le16 table_idx_mac_addr_0; @@ -488,6 +496,8 @@ struct i40e_aqc_ns_proxy_data { u8 ipv6_addr_1[16]; }; +I40E_CHECK_STRUCT_LEN(0x3c, i40e_aqc_ns_proxy_data); + /* Manage LAA Command (0x0106) - obsolete */ struct i40e_aqc_mng_laa { __le16 command_flags; @@ -498,6 +508,8 @@ struct i40e_aqc_mng_laa { u8 reserved2[6]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_mng_laa); + /* Manage MAC Address Read Command (indirect 0x0107) */ struct i40e_aqc_mac_address_read { __le16 command_flags; @@ -569,6 +581,8 @@ struct i40e_aqc_get_switch_config_header u8 reserved[12]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_switch_config_header_resp); + struct i40e_aqc_switch_config_element_resp { u8 element_type; #define I40E_AQ_SW_ELEM_TYPE_MAC 1 @@ -594,6 +608,8 @@ struct i40e_aqc_switch_config_element_re __le16 element_info; }; +I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_config_element_resp); + /* Get Switch Configuration (indirect 0x0200) * an array of elements are returned in the response buffer * the first in the array is the header, remainder are elements @@ -603,6 +619,8 @@ struct i40e_aqc_get_switch_config_resp { struct i40e_aqc_switch_config_element_resp element[1]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_get_switch_config_resp); + /* Add Statistics (direct 0x0201) * Remove Statistics (direct 0x0202) */ @@ -668,6 +686,8 @@ struct i40e_aqc_switch_resource_alloc_el u8 reserved2[6]; }; +I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp); + /* Add VSI (indirect 0x0210) * this indirect command uses struct i40e_aqc_vsi_properties_data * as the indirect buffer (128 bytes) @@ -1099,6 +1119,8 @@ struct i40e_aqc_remove_tag { u8 reserved[12]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_remove_tag); + /* Add multicast E-Tag (direct 0x0257) * del multicast E-Tag (direct 0x0258) only uses pv_seid and etag fields * and no external data @@ -1214,7 +1236,7 @@ struct i40e_aqc_add_remove_cloud_filters } ipaddr; __le16 flags; #define I40E_AQC_ADD_CLOUD_FILTER_SHIFT 0 -#define I40E_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \ +#define I40E_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \ I40E_AQC_ADD_CLOUD_FILTER_SHIFT) /* 0x0000 reserved */ #define I40E_AQC_ADD_CLOUD_FILTER_OIP 0x0001 @@ -1247,7 +1269,7 @@ struct i40e_aqc_add_remove_cloud_filters u8 reserved[4]; __le16 queue_number; #define I40E_AQC_ADD_CLOUD_QUEUE_SHIFT 0 -#define I40E_AQC_ADD_CLOUD_QUEUE_MASK (0x3F << \ +#define I40E_AQC_ADD_CLOUD_QUEUE_MASK (0x7FF << \ I40E_AQC_ADD_CLOUD_QUEUE_SHIFT) u8 reserved2[14]; /* response section */ @@ -1366,6 +1388,8 @@ struct i40e_aqc_configure_vsi_ets_sla_bw u8 reserved1[28]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_configure_vsi_ets_sla_bw_data); + /* Configure VSI Bandwidth Allocation per Traffic Type (indirect 0x0407) * responds with i40e_aqc_qs_handles_resp */ @@ -1377,6 +1401,8 @@ struct i40e_aqc_configure_vsi_tc_bw_data __le16 qs_handles[8]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_configure_vsi_tc_bw_data); + /* Query vsi bw configuration (indirect 0x0408) */ struct i40e_aqc_query_vsi_bw_config_resp { u8 tc_valid_bits; @@ -1390,6 +1416,8 @@ struct i40e_aqc_query_vsi_bw_config_resp u8 reserved3[23]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_query_vsi_bw_config_resp); + /* Query VSI Bandwidth Allocation per Traffic Type (indirect 0x040A) */ struct i40e_aqc_query_vsi_ets_sla_config_resp { u8 tc_valid_bits; @@ -1401,6 +1429,8 @@ struct i40e_aqc_query_vsi_ets_sla_config __le16 tc_bw_max[2]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_query_vsi_ets_sla_config_resp); + /* Configure Switching Component Bandwidth Limit (direct 0x0410) */ struct i40e_aqc_configure_switching_comp_bw_limit { __le16 seid; @@ -1428,6 +1458,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved2[96]; }; +I40E_CHECK_STRUCT_LEN(0x80, i40e_aqc_configure_switching_comp_ets_data); + /* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */ struct i40e_aqc_configure_switching_comp_ets_bw_limit_data { u8 tc_valid_bits; @@ -1439,6 +1471,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved1[28]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_configure_switching_comp_ets_bw_limit_data); + /* Configure Switching Component Bandwidth Allocation per Tc * (indirect 0x0417) */ @@ -1450,6 +1484,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved1[20]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_configure_switching_comp_bw_config_data); + /* Query Switching Component Configuration (indirect 0x0418) */ struct i40e_aqc_query_switching_comp_ets_config_resp { u8 tc_valid_bits; @@ -1460,6 +1496,8 @@ struct i40e_aqc_query_switching_comp_ets u8 reserved2[23]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_query_switching_comp_ets_config_resp); + /* Query PhysicalPort ETS Configuration (indirect 0x0419) */ struct i40e_aqc_query_port_ets_config_resp { u8 reserved[4]; @@ -1475,6 +1513,8 @@ struct i40e_aqc_query_port_ets_config_re u8 reserved3[32]; }; +I40E_CHECK_STRUCT_LEN(0x44, i40e_aqc_query_port_ets_config_resp); + /* Query Switching Component Bandwidth Allocation per Traffic Type * (indirect 0x041A) */ @@ -1489,6 +1529,8 @@ struct i40e_aqc_query_switching_comp_bw_ __le16 tc_bw_max[2]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_query_switching_comp_bw_config_resp); + /* Suspend/resume port TX traffic * (direct 0x041B and 0x041C) uses the generic SEID struct */ @@ -1502,6 +1544,8 @@ struct i40e_aqc_configure_partition_bw_d u8 max_bw[16]; /* bandwidth limit */ }; +I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data); + /* Get and set the active HMC resource profile and status. * (direct 0x0500) and (direct 0x0501) */ @@ -1584,6 +1628,8 @@ struct i40e_aqc_module_desc { u8 reserved2[8]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_module_desc); + struct i40e_aq_get_phy_abilities_resp { __le32 phy_type; /* bitmap using the above enum for offsets */ u8 link_speed; /* bitmap using the above enum bit patterns */ @@ -1612,6 +1658,8 @@ struct i40e_aq_get_phy_abilities_resp { struct i40e_aqc_module_desc qualified_module[I40E_AQ_PHY_MAX_QMS]; }; +I40E_CHECK_STRUCT_LEN(0x218, i40e_aq_get_phy_abilities_resp); + /* Set PHY Config (direct 0x0601) */ struct i40e_aq_set_phy_config { /* same bits as above in all */ __le32 phy_type; @@ -1795,12 +1843,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_updat /* NVM Config Read (indirect 0x0704) */ struct i40e_aqc_nvm_config_read { __le16 cmd_flags; -#define ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1 -#define ANVM_READ_SINGLE_FEATURE 0 -#define ANVM_READ_MULTIPLE_FEATURES 1 +#define I40E_AQ_ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1 +#define I40E_AQ_ANVM_READ_SINGLE_FEATURE 0 +#define I40E_AQ_ANVM_READ_MULTIPLE_FEATURES 1 __le16 element_count; - __le16 element_id; /* Feature/field ID */ - u8 reserved[2]; + __le16 element_id; /* Feature/field ID */ + __le16 element_id_msw; /* MSWord of field ID */ __le32 address_high; __le32 address_low; }; @@ -1818,21 +1866,31 @@ struct i40e_aqc_nvm_config_write { I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write); +/* Used for 0x0704 as well as for 0x0705 commands */ +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT 1 +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE 0 +#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT) struct i40e_aqc_nvm_config_data_feature { __le16 feature_id; - __le16 instance_id; +#define I40E_AQ_ANVM_FEATURE_OPTION_OEM_ONLY 0x01 +#define I40E_AQ_ANVM_FEATURE_OPTION_DWORD_MAP 0x08 +#define I40E_AQ_ANVM_FEATURE_OPTION_POR_CSR 0x10 __le16 feature_options; __le16 feature_selection; }; +I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature); + struct i40e_aqc_nvm_config_data_immediate_field { -#define ANVM_FEATURE_OR_IMMEDIATE_MASK 0x2 - __le16 field_id; - __le16 instance_id; + __le32 field_id; + __le32 field_value; __le16 field_options; - __le16 field_value; + __le16 reserved; }; +I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); + /* Send to PF command (indirect 0x0801) id is only used by PF * Send to VF command (indirect 0x0802) id is only used by PF * Send to Peer PF command (indirect 0x0803) @@ -1995,9 +2053,77 @@ struct i40e_aqc_lldp_start { I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start); -/* Apply MIB changes (0x0A07) - * uses the generic struc as it contains no data +/* Get CEE DCBX Oper Config (0x0A07) + * uses the generic descriptor struct + * returns below as indirect response + */ + +#define I40E_AQC_CEE_APP_FCOE_SHIFT 0x0 +#define I40E_AQC_CEE_APP_FCOE_MASK (0x7 << I40E_AQC_CEE_APP_FCOE_SHIFT) +#define I40E_AQC_CEE_APP_ISCSI_SHIFT 0x3 +#define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << I40E_AQC_CEE_APP_ISCSI_SHIFT) +#define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 +#define I40E_AQC_CEE_APP_FIP_MASK (0x7 << I40E_AQC_CEE_APP_FIP_SHIFT) +#define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 +#define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << I40E_AQC_CEE_PG_STATUS_SHIFT) +#define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 +#define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << I40E_AQC_CEE_PFC_STATUS_SHIFT) +#define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 +#define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << I40E_AQC_CEE_APP_STATUS_SHIFT) +struct i40e_aqc_get_cee_dcb_cfg_v1_resp { + u8 reserved1; + u8 oper_num_tc; + u8 oper_prio_tc[4]; + u8 reserved2; + u8 oper_tc_bw[8]; + u8 oper_pfc_en; + u8 reserved3; + __le16 oper_app_prio; + u8 reserved4; + __le16 tlv_status; +}; + +I40E_CHECK_STRUCT_LEN(0x18, i40e_aqc_get_cee_dcb_cfg_v1_resp); + +struct i40e_aqc_get_cee_dcb_cfg_resp { + u8 oper_num_tc; + u8 oper_prio_tc[4]; + u8 oper_tc_bw[8]; + u8 oper_pfc_en; + __le16 oper_app_prio; + __le32 tlv_status; + u8 reserved[12]; +}; + +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_get_cee_dcb_cfg_resp); + +/* Set Local LLDP MIB (indirect 0x0A08) + * Used to replace the local MIB of a given LLDP agent. e.g. DCBx + */ +struct i40e_aqc_lldp_set_local_mib { +#define SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT 0 +#define SET_LOCAL_MIB_AC_TYPE_DCBX_MASK (1 << SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT) + u8 type; + u8 reserved0; + __le16 length; + u8 reserved1[4]; + __le32 address_high; + __le32 address_low; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_set_local_mib); + +/* Stop/Start LLDP Agent (direct 0x0A09) + * Used for stopping/starting specific LLDP agent. e.g. DCBx */ +struct i40e_aqc_lldp_stop_start_specific_agent { +#define I40E_AQC_START_SPECIFIC_AGENT_SHIFT 0 +#define I40E_AQC_START_SPECIFIC_AGENT_MASK (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT) + u8 command; + u8 reserved[15]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop_start_specific_agent); /* Add Udp Tunnel command and completion (direct 0x0B00) */ struct i40e_aqc_add_udp_tunnel { @@ -2073,7 +2199,8 @@ struct i40e_aqc_oem_param_change { #define I40E_AQ_OEM_PARAM_TYPE_BW_CTL 1 #define I40E_AQ_OEM_PARAM_MAC 2 __le32 param_value1; - u8 param_value2[8]; + __le16 param_value2; + u8 reserved[6]; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_oem_param_change); @@ -2087,6 +2214,28 @@ struct i40e_aqc_oem_state_change { I40E_CHECK_CMD_LENGTH(i40e_aqc_oem_state_change); +/* Initialize OCSD (0xFE02, direct) */ +struct i40e_aqc_opc_oem_ocsd_initialize { + u8 type_status; + u8 reserved1[3]; + __le32 ocsd_memory_block_addr_high; + __le32 ocsd_memory_block_addr_low; + __le32 requested_update_interval; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_opc_oem_ocsd_initialize); + +/* Initialize OCBB (0xFE03, direct) */ +struct i40e_aqc_opc_oem_ocbb_initialize { + u8 type_status; + u8 reserved1[3]; + __le32 ocbb_memory_block_addr_high; + __le32 ocbb_memory_block_addr_low; + u8 reserved2[4]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_opc_oem_ocbb_initialize); + /* debug commands */ /* get device id (0xFF00) uses the generic structure */ Modified: head/sys/dev/ixl/i40e_common.c ============================================================================== --- head/sys/dev/ixl/i40e_common.c Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_common.c Mon Jan 12 18:32:45 2015 (r277082) @@ -95,47 +95,51 @@ void i40e_debug_aq(struct i40e_hw *hw, e { struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc; u16 len = LE16_TO_CPU(aq_desc->datalen); - u8 *aq_buffer = (u8 *)buffer; - u32 data[4]; - u32 i = 0; + u8 *buf = (u8 *)buffer; + u16 i = 0; if ((!(mask & hw->debug_mask)) || (desc == NULL)) return; i40e_debug(hw, mask, "AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n", - aq_desc->opcode, aq_desc->flags, aq_desc->datalen, - aq_desc->retval); + LE16_TO_CPU(aq_desc->opcode), + LE16_TO_CPU(aq_desc->flags), + LE16_TO_CPU(aq_desc->datalen), + LE16_TO_CPU(aq_desc->retval)); i40e_debug(hw, mask, "\tcookie (h,l) 0x%08X 0x%08X\n", - aq_desc->cookie_high, aq_desc->cookie_low); + LE32_TO_CPU(aq_desc->cookie_high), + LE32_TO_CPU(aq_desc->cookie_low)); i40e_debug(hw, mask, "\tparam (0,1) 0x%08X 0x%08X\n", - aq_desc->params.internal.param0, - aq_desc->params.internal.param1); + LE32_TO_CPU(aq_desc->params.internal.param0), + LE32_TO_CPU(aq_desc->params.internal.param1)); i40e_debug(hw, mask, "\taddr (h,l) 0x%08X 0x%08X\n", - aq_desc->params.external.addr_high, - aq_desc->params.external.addr_low); + LE32_TO_CPU(aq_desc->params.external.addr_high), + LE32_TO_CPU(aq_desc->params.external.addr_low)); if ((buffer != NULL) && (aq_desc->datalen != 0)) { - i40e_memset(data, 0, sizeof(data), I40E_NONDMA_MEM); i40e_debug(hw, mask, "AQ CMD Buffer:\n"); if (buf_len < len) len = buf_len; - for (i = 0; i < len; i++) { - data[((i % 16) / 4)] |= - ((u32)aq_buffer[i]) << (8 * (i % 4)); - if ((i % 16) == 15) { - i40e_debug(hw, mask, - "\t0x%04X %08X %08X %08X %08X\n", - i - 15, data[0], data[1], data[2], - data[3]); - i40e_memset(data, 0, sizeof(data), - I40E_NONDMA_MEM); - } + /* write the full 16-byte chunks */ + for (i = 0; i < (len - 16); i += 16) + i40e_debug(hw, mask, + "\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", + i, buf[i], buf[i+1], buf[i+2], buf[i+3], + buf[i+4], buf[i+5], buf[i+6], buf[i+7], + buf[i+8], buf[i+9], buf[i+10], buf[i+11], + buf[i+12], buf[i+13], buf[i+14], buf[i+15]); + /* write whatever's left over without overrunning the buffer */ + if (i < len) { + char d_buf[80]; + int j = 0; + + memset(d_buf, 0, sizeof(d_buf)); + j += sprintf(d_buf, "\t0x%04X ", i); + while (i < len) + j += sprintf(&d_buf[j], " %02X", buf[i++]); + i40e_debug(hw, mask, "%s\n", d_buf); } - if ((i % 16) != 0) - i40e_debug(hw, mask, "\t0x%04X %08X %08X %08X %08X\n", - i - (i % 16), data[0], data[1], data[2], - data[3]); } } @@ -546,6 +550,30 @@ struct i40e_rx_ptype_decoded i40e_ptype_ /** + * i40e_validate_mac_addr - Validate unicast MAC address + * @mac_addr: pointer to MAC address + * + * Tests a MAC address to ensure it is a valid Individual Address + **/ +enum i40e_status_code i40e_validate_mac_addr(u8 *mac_addr) +{ + enum i40e_status_code status = I40E_SUCCESS; + + DEBUGFUNC("i40e_validate_mac_addr"); + + /* Broadcast addresses ARE multicast addresses + * Make sure it is not a multicast address + * Reject the zero address + */ + if (I40E_IS_MULTICAST(mac_addr) || + (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && + mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)) + status = I40E_ERR_INVALID_MAC_ADDR; + + return status; +} + +/** * i40e_init_shared_code - Initialize the shared code * @hw: pointer to hardware structure * @@ -560,7 +588,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw) { enum i40e_status_code status = I40E_SUCCESS; - u32 reg; + u32 port, ari, func_rid; DEBUGFUNC("i40e_init_shared_code"); @@ -575,18 +603,17 @@ enum i40e_status_code i40e_init_shared_c hw->phy.get_link_info = TRUE; - /* Determine port number */ - reg = rd32(hw, I40E_PFGEN_PORTNUM); - reg = ((reg & I40E_PFGEN_PORTNUM_PORT_NUM_MASK) >> - I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT); - hw->port = (u8)reg; - - /* Determine the PF number based on the PCI fn */ - reg = rd32(hw, I40E_GLPCI_CAPSUP); - if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK) - hw->pf_id = (u8)((hw->bus.device << 3) | hw->bus.func); + /* Determine port number and PF number*/ + port = (rd32(hw, I40E_PFGEN_PORTNUM) & I40E_PFGEN_PORTNUM_PORT_NUM_MASK) + >> I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT; + hw->port = (u8)port; + ari = (rd32(hw, I40E_GLPCI_CAPSUP) & I40E_GLPCI_CAPSUP_ARI_EN_MASK) >> + I40E_GLPCI_CAPSUP_ARI_EN_SHIFT; + func_rid = rd32(hw, I40E_PF_FUNC_RID); + if (ari) + hw->pf_id = (u8)(func_rid & 0xff); else - hw->pf_id = (u8)hw->bus.func; + hw->pf_id = (u8)(func_rid & 0x7); status = i40e_init_nvm(hw); return status; @@ -728,25 +755,60 @@ void i40e_pre_tx_queue_cfg(struct i40e_h } /** - * i40e_validate_mac_addr - Validate unicast MAC address - * @mac_addr: pointer to MAC address + * i40e_read_pba_string - Reads part number string from EEPROM + * @hw: pointer to hardware structure + * @pba_num: stores the part number string from the EEPROM + * @pba_num_size: part number string buffer length * - * Tests a MAC address to ensure it is a valid Individual Address + * Reads the part number string from the EEPROM. **/ -enum i40e_status_code i40e_validate_mac_addr(u8 *mac_addr) +enum i40e_status_code i40e_read_pba_string(struct i40e_hw *hw, u8 *pba_num, + u32 pba_num_size) { enum i40e_status_code status = I40E_SUCCESS; + u16 pba_word = 0; + u16 pba_size = 0; + u16 pba_ptr = 0; + u16 i = 0; + + status = i40e_read_nvm_word(hw, I40E_SR_PBA_FLAGS, &pba_word); + if ((status != I40E_SUCCESS) || (pba_word != 0xFAFA)) { + DEBUGOUT("Failed to read PBA flags or flag is invalid.\n"); + return status; + } - DEBUGFUNC("i40e_validate_mac_addr"); + status = i40e_read_nvm_word(hw, I40E_SR_PBA_BLOCK_PTR, &pba_ptr); + if (status != I40E_SUCCESS) { + DEBUGOUT("Failed to read PBA Block pointer.\n"); + return status; + } - /* Broadcast addresses ARE multicast addresses - * Make sure it is not a multicast address - * Reject the zero address + status = i40e_read_nvm_word(hw, pba_ptr, &pba_size); + if (status != I40E_SUCCESS) { + DEBUGOUT("Failed to read PBA Block size.\n"); + return status; + } + + /* Subtract one to get PBA word count (PBA Size word is included in + * total size) */ - if (I40E_IS_MULTICAST(mac_addr) || - (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && - mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)) - status = I40E_ERR_INVALID_MAC_ADDR; + pba_size--; + if (pba_num_size < (((u32)pba_size * 2) + 1)) { + DEBUGOUT("Buffer to small for PBA data.\n"); + return I40E_ERR_PARAM; + } + + for (i = 0; i < pba_size; i++) { + status = i40e_read_nvm_word(hw, (pba_ptr + 1) + i, &pba_word); + if (status != I40E_SUCCESS) { + DEBUGOUT1("Failed to read PBA Block word %d.\n", i); + return status; + } + + pba_num[(i * 2)] = (pba_word >> 8) & 0xFF; + pba_num[(i * 2) + 1] = pba_word & 0xFF; + } + pba_num[(pba_size * 2)] = '\0'; return status; } @@ -799,7 +861,7 @@ static enum i40e_media_type i40e_get_med return media; } -#define I40E_PF_RESET_WAIT_COUNT 100 +#define I40E_PF_RESET_WAIT_COUNT 110 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure @@ -818,8 +880,9 @@ enum i40e_status_code i40e_pf_reset(stru * The grst delay value is in 100ms units, and we'll wait a * couple counts longer to be sure we don't just miss the end. */ - grst_del = rd32(hw, I40E_GLGEN_RSTCTL) & I40E_GLGEN_RSTCTL_GRSTDEL_MASK - >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; + grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & + I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> + I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; for (cnt = 0; cnt < grst_del + 2; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT); if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) @@ -1010,8 +1073,11 @@ static u32 i40e_led_is_mine(struct i40e_ return gpio_val; } -#define I40E_LED0 22 +#define I40E_COMBINED_ACTIVITY 0xA +#define I40E_FILTER_ACTIVITY 0xE #define I40E_LINK_ACTIVITY 0xC +#define I40E_MAC_ACTIVITY 0xD +#define I40E_LED0 22 /** * i40e_led_get - return current on/off mode @@ -1024,6 +1090,7 @@ static u32 i40e_led_is_mine(struct i40e_ **/ u32 i40e_led_get(struct i40e_hw *hw) { + u32 current_mode = 0; u32 mode = 0; int i; @@ -1036,6 +1103,20 @@ u32 i40e_led_get(struct i40e_hw *hw) if (!gpio_val) continue; + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + switch (current_mode) { + case I40E_COMBINED_ACTIVITY: + case I40E_FILTER_ACTIVITY: + case I40E_MAC_ACTIVITY: + continue; + default: + break; + } + mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT; break; @@ -1055,6 +1136,7 @@ u32 i40e_led_get(struct i40e_hw *hw) **/ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) { + u32 current_mode = 0; int i; if (mode & 0xfffffff0) @@ -1069,6 +1151,20 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (!gpio_val) continue; + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + switch (current_mode) { + case I40E_COMBINED_ACTIVITY: + case I40E_FILTER_ACTIVITY: + case I40E_MAC_ACTIVITY: + continue; + default: + break; + } + gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK; /* this & is a bit of paranoia, but serves as a range check */ gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) & @@ -1077,8 +1173,10 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (mode == I40E_LINK_ACTIVITY) blink = FALSE; - gpio_val |= (blink ? 1 : 0) << - I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT; + if (blink) + gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); + else + gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); break; @@ -1207,7 +1305,7 @@ enum i40e_status_code i40e_set_fc(struct return status; } - memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); + memset(&config, 0, sizeof(config)); /* clear the old pause settings */ config.abilities = abilities.abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) & ~(I40E_AQ_PHY_FLAG_PAUSE_RX); @@ -1230,14 +1328,14 @@ enum i40e_status_code i40e_set_fc(struct *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; } /* Update the link info */ - status = i40e_update_link_info(hw, TRUE); + status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); if (status) { /* Wait a little bit (on 40G cards it sometimes takes a really * long time for link to come back from the atomic reset) * and try once more */ i40e_msec_delay(1000); - status = i40e_update_link_info(hw, TRUE); + status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); } if (status) *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; @@ -1375,7 +1473,7 @@ enum i40e_status_code i40e_aq_get_link_i /* save off old link status information */ i40e_memcpy(&hw->phy.link_info_old, hw_link_info, - sizeof(struct i40e_link_status), I40E_NONDMA_TO_NONDMA); + sizeof(*hw_link_info), I40E_NONDMA_TO_NONDMA); /* update link status */ hw_link_info->phy_type = (enum i40e_aq_phy_type)resp->phy_type; @@ -1412,7 +1510,7 @@ enum i40e_status_code i40e_aq_get_link_i /* save link status information */ if (link) - i40e_memcpy(link, hw_link_info, sizeof(struct i40e_link_status), + i40e_memcpy(link, hw_link_info, sizeof(*hw_link_info), I40E_NONDMA_TO_NONDMA); /* flag cleared so helper functions don't call AQ again */ @@ -1423,36 +1521,6 @@ aq_get_link_info_exit: } /** - * i40e_update_link_info - * @hw: pointer to the hw struct - * @enable_lse: enable/disable LinkStatusEvent reporting - * - * Returns the link status of the adapter - **/ -enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw, - bool enable_lse) -{ - struct i40e_aq_get_phy_abilities_resp abilities; - enum i40e_status_code status; - - status = i40e_aq_get_link_info(hw, enable_lse, NULL, NULL); - if (status) - return status; - - status = i40e_aq_get_phy_capabilities(hw, FALSE, false, - &abilities, NULL); - if (status) - return status; - - if (abilities.abilities & I40E_AQ_PHY_AN_ENABLED) - hw->phy.link_info.an_enabled = TRUE; - else - hw->phy.link_info.an_enabled = FALSE; - - return status; -} - -/** * i40e_aq_set_phy_int_mask * @hw: pointer to the hw struct * @mask: interrupt mask to be set @@ -1904,6 +1972,7 @@ enum i40e_status_code i40e_aq_get_switch * @hw: pointer to the hw struct * @fw_major_version: firmware major version * @fw_minor_version: firmware minor version + * @fw_build: firmware build number * @api_major_version: major queue version * @api_minor_version: minor queue version * @cmd_details: pointer to command details structure or NULL @@ -1912,6 +1981,7 @@ enum i40e_status_code i40e_aq_get_switch **/ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw, u16 *fw_major_version, u16 *fw_minor_version, + u32 *fw_build, u16 *api_major_version, u16 *api_minor_version, struct i40e_asq_cmd_details *cmd_details) { @@ -1929,6 +1999,8 @@ enum i40e_status_code i40e_aq_get_firmwa *fw_major_version = LE16_TO_CPU(resp->fw_major); if (fw_minor_version != NULL) *fw_minor_version = LE16_TO_CPU(resp->fw_minor); + if (fw_build != NULL) + *fw_build = LE32_TO_CPU(resp->fw_build); if (api_major_version != NULL) *api_major_version = LE16_TO_CPU(resp->api_major); if (api_minor_version != NULL) @@ -1969,7 +2041,7 @@ enum i40e_status_code i40e_aq_send_drive i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_driver_version); - desc.flags |= CPU_TO_LE16(I40E_AQ_FLAG_SI); + desc.flags |= CPU_TO_LE16(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD); cmd->driver_major_ver = dv->major_version; cmd->driver_minor_ver = dv->minor_version; cmd->driver_build_ver = dv->build_version; @@ -2173,7 +2245,7 @@ enum i40e_status_code i40e_aq_add_macvla if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_macvlan_element_data); + buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); @@ -2215,7 +2287,7 @@ enum i40e_status_code i40e_aq_remove_mac if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_remove_macvlan_element_data); + buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); @@ -2255,7 +2327,7 @@ enum i40e_status_code i40e_aq_add_vlan(s if (count == 0 || !v_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_remove_vlan_element_data); + buf_size = count * sizeof(*v_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_vlan); @@ -2295,7 +2367,7 @@ enum i40e_status_code i40e_aq_remove_vla if (count == 0 || !v_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_remove_vlan_element_data); + buf_size = count * sizeof(*v_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_vlan); @@ -2353,6 +2425,41 @@ enum i40e_status_code i40e_aq_send_msg_t } /** + * i40e_aq_debug_read_register *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:38:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9F4F3F6; Mon, 12 Jan 2015 18:38:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB29A7A1; Mon, 12 Jan 2015 18:38:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CIcAQ3063452; Mon, 12 Jan 2015 18:38:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIcAKo063451; Mon, 12 Jan 2015 18:38:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501121838.t0CIcAKo063451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 18:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277083 - stable/9/sys/dev/vt/hw/fb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:38:11 -0000 Author: emaste Date: Mon Jan 12 18:38:09 2015 New Revision: 277083 URL: https://svnweb.freebsd.org/changeset/base/277083 Log: Avoid crash in vt_blank() and improve performance MFC of r268771 (partial), r268796 PR: 196510 Reported by: Andre Albsmeier Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/9/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 12 18:32:45 2015 (r277082) +++ stable/9/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 12 18:38:09 2015 (r277083) @@ -143,41 +143,42 @@ vt_fb_blank(struct vt_device *vd, term_c { struct fb_info *info; uint32_t c; - u_int o; + u_int o, h; info = vd->vd_softc; c = info->fb_cmap[color]; switch (FBTYPE_GET_BYTESPP(info)) { case 1: - for (o = 0; o < info->fb_stride; o++) - info->wr1(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o++) + info->wr1(info, h*info->fb_stride + o, c); break; case 2: - for (o = 0; o < info->fb_stride; o += 2) - info->wr2(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 2) + info->wr2(info, h*info->fb_stride + o, c); break; case 3: - /* line 0 */ - for (o = 0; o < info->fb_stride; o += 3) { - info->wr1(info, o, (c >> 16) & 0xff); - info->wr1(info, o + 1, (c >> 8) & 0xff); - info->wr1(info, o + 2, c & 0xff); - } + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 3) { + info->wr1(info, h*info->fb_stride + o, + (c >> 16) & 0xff); + info->wr1(info, h*info->fb_stride + o + 1, + (c >> 8) & 0xff); + info->wr1(info, h*info->fb_stride + o + 2, + c & 0xff); + } break; case 4: - for (o = 0; o < info->fb_stride; o += 4) - info->wr4(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 4) + info->wr4(info, h*info->fb_stride + o, c); break; default: /* panic? */ return; } - /* Copy line0 to all other lines. */ - /* XXX will copy with borders. */ - for (o = info->fb_stride; o < info->fb_size; o += info->fb_stride) { - info->copy(info, o, 0, info->fb_stride); - } } void From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:43:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FCC26DD; Mon, 12 Jan 2015 18:43:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD2F892; Mon, 12 Jan 2015 18:43:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CIhaMB067583; Mon, 12 Jan 2015 18:43:36 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIhYnW067569; Mon, 12 Jan 2015 18:43:34 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501121843.t0CIhYnW067569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 12 Jan 2015 18:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:43:36 -0000 Author: jfv Date: Mon Jan 12 18:43:34 2015 New Revision: 277084 URL: https://svnweb.freebsd.org/changeset/base/277084 Log: Intel I40E driver updates: if_ixl to version 1.3.0, if_ixlv to version 1.2.0 - Major change in both drivers is to add RSS support - In ixl fix some interface speed related issues, dual speed was not changing correctly, KR/X media was not displaying correctly (this has a workaround until a more robust media handling is in place) - Add a warning when using Dell NPAR and the speed is less than 10G - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, and without tuning can display excessively MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_txrx.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/if_ixl.c Mon Jan 12 18:43:34 2015 (r277084) @@ -34,13 +34,14 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" #include "ixl_pf.h" /********************************************************************* * Driver version *********************************************************************/ -char ixl_driver_version[] = "1.2.8"; +char ixl_driver_version[] = "1.3.0"; /********************************************************************* * PCI Device ID Table @@ -174,7 +175,7 @@ static void ixl_stat_update48(struct i40 static void ixl_stat_update32(struct i40e_hw *, u32, bool, u64 *, u64 *); -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); @@ -427,7 +428,7 @@ ixl_attach(device_t dev) OID_AUTO, "dynamic_tx_itr", CTLFLAG_RW, &ixl_dynamic_tx_itr, 0, "Dynamic TX ITR"); -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "link_status", CTLTYPE_STRING | CTLFLAG_RD, @@ -662,8 +663,9 @@ ixl_attach(device_t dev) /* Reset port's advertised speeds */ if (!i40e_is_40G_device(hw->device_id)) { - pf->advertised_speed = 0x7; - ixl_set_advertised_speeds(pf, 0x7); + pf->advertised_speed = + (hw->device_id == I40E_DEV_ID_10G_BASE_T) ? 0x7 : 0x6; + ixl_set_advertised_speeds(pf, pf->advertised_speed); } /* Register for VLAN events */ @@ -1407,6 +1409,12 @@ ixl_media_status(struct ifnet * ifp, str case I40E_PHY_TYPE_10GBASE_SFPP_CU: ifmr->ifm_active |= IFM_10G_TWINAX; break; + case I40E_PHY_TYPE_10GBASE_KR: + /* + ** this is not technically correct + ** but FreeBSD does not have the media + ** type defined yet, so its a compromise. + */ case I40E_PHY_TYPE_10GBASE_SR: ifmr->ifm_active |= IFM_10G_SR; break; @@ -1721,8 +1729,10 @@ ixl_local_timer(void *arg) vsi->active_queues |= ((u64)1 << que->me); } if (que->busy >= IXL_MAX_TX_BUSY) { +#ifdef IXL_DEBUG device_printf(dev,"Warning queue %d " "appears to be hung!\n", i); +#endif que->busy = IXL_QUEUE_HUNG; ++hung; } @@ -1765,6 +1775,15 @@ ixl_update_link_status(struct ixl_pf *pf "Full Duplex", ixl_fc_string[fc]); } vsi->link_active = TRUE; + /* + ** Warn user if link speed on NPAR enabled + ** partition is not at least 10GB + */ + if (hw->func_caps.npar_enable && + (hw->phy.link_info.link_speed == I40E_LINK_SPEED_1GB || + hw->phy.link_info.link_speed == I40E_LINK_SPEED_100MB)) + device_printf(dev, "The partition detected link" + "speed that is less than 10Gbps\n"); if_link_state_change(ifp, LINK_STATE_UP); } } else { /* Link down */ @@ -1901,6 +1920,7 @@ ixl_assign_vsi_msix(struct ixl_pf *pf) /* Now set up the stations */ for (int i = 0; i < vsi->num_queues; i++, vector++, que++) { + int cpu_id = i; rid = vector + 1; txr = &que->txr; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -1921,14 +1941,23 @@ ixl_assign_vsi_msix(struct ixl_pf *pf) } bus_describe_intr(dev, que->res, que->tag, "q%d", i); /* Bind the vector to a CPU */ - bus_bind_intr(dev, que->res, i); +#ifdef RSS + cpu_id = rss_getcpu(i % rss_getnumbuckets()); +#endif + bus_bind_intr(dev, que->res, cpu_id); que->msix = vector; TASK_INIT(&que->tx_task, 0, ixl_deferred_mq_start, que); TASK_INIT(&que->task, 0, ixl_handle_que, que); que->tq = taskqueue_create_fast("ixl_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); - taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", - device_get_nameunit(pf->dev)); +#ifdef RSS + taskqueue_start_threads_pinned(&que->tq, 1, PI_NET, + cpu_id, "%s (bucket %d)", + device_get_nameunit(dev), cpu_id); +#else + taskqueue_start_threads(&que->tq, 1, PI_NET, + "%s que", device_get_nameunit(dev)); +#endif } return (0); @@ -1995,6 +2024,12 @@ ixl_init_msix(struct ixl_pf *pf) if ((ixl_max_queues != 0) && (ixl_max_queues <= queues)) queues = ixl_max_queues; +#ifdef RSS + /* If we're doing RSS, clamp at the number of RSS buckets */ + if (queues > rss_getnumbuckets()) + queues = rss_getnumbuckets(); +#endif + /* ** Want one vector (RX/TX pair) per queue ** plus an additional for the admin queue. @@ -2015,6 +2050,25 @@ ixl_init_msix(struct ixl_pf *pf) "Using MSIX interrupts with %d vectors\n", vectors); pf->msix = vectors; pf->vsi.num_queues = queues; +#ifdef RSS + /* + * If we're doing RSS, the number of queues needs to + * match the number of RSS buckets that are configured. + * + * + If there's more queues than RSS buckets, we'll end + * up with queues that get no traffic. + * + * + If there's more RSS buckets than queues, we'll end + * up having multiple RSS buckets map to the same queue, + * so there'll be some contention. + */ + if (queues != rss_getnumbuckets()) { + device_printf(dev, + "%s: queues (%d) != RSS buckets (%d)" + "; performance will be impacted.\n", + __func__, queues, rss_getnumbuckets()); + } +#endif return (vectors); } msi: @@ -2383,7 +2437,8 @@ ixl_setup_interface(device_t dev, struct if (aq_error == I40E_ERR_UNKNOWN_PHY) { /* Need delay to detect fiber correctly */ i40e_msec_delay(200); - aq_error = i40e_aq_get_phy_capabilities(hw, FALSE, TRUE, &abilities_resp, NULL); + aq_error = i40e_aq_get_phy_capabilities(hw, FALSE, + TRUE, &abilities_resp, NULL); if (aq_error == I40E_ERR_UNKNOWN_PHY) device_printf(dev, "Unknown PHY type detected!\n"); else @@ -3043,7 +3098,6 @@ ixl_add_sysctls_eth_stats(struct sysctl_ "Multicast Packets Transmitted"}, {ð_stats->tx_broadcast, "bcast_pkts_txd", "Broadcast Packets Transmitted"}, - {ð_stats->tx_discards, "tx_discards", "Discarded TX packets"}, // end {0,0,0} }; @@ -3126,19 +3180,45 @@ static void ixl_config_rss(struct ixl_vs struct ixl_pf *pf = (struct ixl_pf *)vsi->back; struct i40e_hw *hw = vsi->hw; u32 lut = 0; - u64 set_hena, hena; - int i, j; + u64 set_hena = 0, hena; + int i, j, que_id; +#ifdef RSS + u32 rss_hash_config; + u32 rss_seed[IXL_KEYSZ]; +#else + u32 rss_seed[IXL_KEYSZ] = {0x41b01687, + 0x183cfd8c, 0xce880440, 0x580cbc3c, + 0x35897377, 0x328b25e1, 0x4fa98922, + 0xb7d90c14, 0xd5bad70d, 0xcd15a2c1}; +#endif - static const u32 seed[I40E_PFQF_HKEY_MAX_INDEX + 1] = {0x41b01687, - 0x183cfd8c, 0xce880440, 0x580cbc3c, 0x35897377, - 0x328b25e1, 0x4fa98922, 0xb7d90c14, 0xd5bad70d, - 0xcd15a2c1, 0xe8580225, 0x4a1e9d11, 0xfe5731be}; +#ifdef RSS + /* Fetch the configured RSS key */ + rss_getkey((uint8_t *) &rss_seed); +#endif /* Fill out hash function seed */ - for (i = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) - wr32(hw, I40E_PFQF_HKEY(i), seed[i]); + for (i = 0; i < IXL_KEYSZ; i++) + wr32(hw, I40E_PFQF_HKEY(i), rss_seed[i]); /* Enable PCTYPES for RSS: */ +#ifdef RSS + rss_hash_config = rss_gethashconfig(); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) + set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; +#else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | @@ -3151,7 +3231,7 @@ static void ixl_config_rss(struct ixl_vs ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6) | ((u64)1 << I40E_FILTER_PCTYPE_L2_PAYLOAD); - +#endif hena = (u64)rd32(hw, I40E_PFQF_HENA(0)) | ((u64)rd32(hw, I40E_PFQF_HENA(1)) << 32); hena |= set_hena; @@ -3162,8 +3242,19 @@ static void ixl_config_rss(struct ixl_vs for (i = j = 0; i < pf->hw.func_caps.rss_table_size; i++, j++) { if (j == vsi->num_queues) j = 0; +#ifdef RSS + /* + * Fetch the RSS bucket id for the given indirection entry. + * Cap it at the number of configured buckets (which is + * num_queues.) + */ + que_id = rss_get_indirection_to_bucket(i); + que_id = que_id % adapter->num_queues; +#else + que_id = j; +#endif /* lut = 4-byte sliding window of 4 lut entries */ - lut = (lut << 8) | (j & + lut = (lut << 8) | (que_id & ((0x1 << pf->hw.func_caps.rss_table_entry_width) - 1)); /* On i = 3, we have 4 entries in lut; write to the register */ if ((i & 3) == 3) @@ -3401,7 +3492,7 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, a = malloc(sizeof(struct i40e_aqc_add_macvlan_element_data) * cnt, M_DEVBUF, M_NOWAIT | M_ZERO); if (a == NULL) { - device_printf(dev, "add hw filter failed to get memory\n"); + device_printf(dev, "add_hw_filters failed to get memory\n"); return; } @@ -3426,8 +3517,8 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, if (j > 0) { err = i40e_aq_add_macvlan(hw, vsi->seid, a, j, NULL); if (err) - device_printf(dev, "aq_add_macvlan failure %d\n", - hw->aq.asq_last_status); + device_printf(dev, "aq_add_macvlan err %d, aq_error %d\n", + err, hw->aq.asq_last_status); else vsi->hw_filters_add += j; } @@ -3476,6 +3567,7 @@ ixl_del_hw_filters(struct ixl_vsi *vsi, err = i40e_aq_remove_macvlan(hw, vsi->seid, d, j, NULL); /* NOTE: returns ENOENT every time but seems to work fine, so we'll ignore that specific error. */ + // TODO: Does this still occur on current firmwares? if (err && hw->aq.asq_last_status != I40E_AQ_RC_ENOENT) { int sc = 0; for (int i = 0; i < j; i++) @@ -3828,29 +3920,6 @@ ixl_update_stats_counters(struct ixl_pf pf->stat_offsets_loaded, &osd->link_xoff_tx, &nsd->link_xoff_tx); - /* Priority flow control stats */ -#if 0 - for (int i = 0; i < 8; i++) { - ixl_stat_update32(hw, I40E_GLPRT_PXONRXC(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xon_rx[i], - &nsd->priority_xon_rx[i]); - ixl_stat_update32(hw, I40E_GLPRT_PXONTXC(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xon_tx[i], - &nsd->priority_xon_tx[i]); - ixl_stat_update32(hw, I40E_GLPRT_PXOFFTXC(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xoff_tx[i], - &nsd->priority_xoff_tx[i]); - ixl_stat_update32(hw, - I40E_GLPRT_RXON2OFFCNT(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xon_2_xoff[i], - &nsd->priority_xon_2_xoff[i]); - } -#endif - /* Packet size stats rx */ ixl_stat_update48(hw, I40E_GLPRT_PRC64H(hw->port), I40E_GLPRT_PRC64L(hw->port), @@ -4377,6 +4446,15 @@ ixl_set_advertised_speeds(struct ixl_pf return (EAGAIN); } + /* + ** This seems a bit heavy handed, but we + ** need to get a reinit on some devices + */ + IXL_PF_LOCK(pf); + ixl_stop(pf); + ixl_init_locked(pf); + IXL_PF_UNLOCK(pf); + return (0); } @@ -4521,7 +4599,7 @@ ixl_sysctl_show_fw(SYSCTL_HANDLER_ARGS) } -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS) { @@ -4630,6 +4708,16 @@ ixl_sysctl_sw_filter_list(SYSCTL_HANDLER #define IXL_SW_RES_SIZE 0x14 static int +ixl_res_alloc_cmp(const void *a, const void *b) +{ + const struct i40e_aqc_switch_resource_alloc_element_resp *one, *two; + one = (struct i40e_aqc_switch_resource_alloc_element_resp *)a; + two = (struct i40e_aqc_switch_resource_alloc_element_resp *)b; + + return ((int)one->resource_type - (int)two->resource_type); +} + +static int ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_ARGS) { struct ixl_pf *pf = (struct ixl_pf *)arg1; @@ -4647,6 +4735,7 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A return (ENOMEM); } + bzero(resp, sizeof(resp)); error = i40e_aq_get_switch_resource_alloc(hw, &num_entries, resp, IXL_SW_RES_SIZE, @@ -4657,9 +4746,14 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A sbuf_delete(buf); return error; } - device_printf(dev, "Num_entries: %d\n", num_entries); + + /* Sort entries by type for display */ + qsort(resp, num_entries, + sizeof(struct i40e_aqc_switch_resource_alloc_element_resp), + &ixl_res_alloc_cmp); sbuf_cat(buf, "\n"); + sbuf_printf(buf, "# of entries: %d\n", num_entries); sbuf_printf(buf, "Type | Guaranteed | Total | Used | Un-allocated\n" " | (this) | (all) | (this) | (all) \n"); @@ -4864,5 +4958,5 @@ ixl_sysctl_dump_txd(SYSCTL_HANDLER_ARGS) sbuf_delete(buf); return error; } -#endif +#endif /* IXL_DEBUG_SYSCTL */ Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/if_ixlv.c Mon Jan 12 18:43:34 2015 (r277084) @@ -34,13 +34,14 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" #include "ixlv.h" /********************************************************************* * Driver version *********************************************************************/ -char ixlv_driver_version[] = "1.1.18"; +char ixlv_driver_version[] = "1.2.0"; /********************************************************************* * PCI Device ID Table @@ -1161,7 +1162,11 @@ ixlv_init_msix(struct ixlv_sc *sc) /* Override with hardcoded value if sane */ if ((ixlv_max_queues != 0) && (ixlv_max_queues <= queues)) queues = ixlv_max_queues; - +#ifdef RSS + /* If we're doing RSS, clamp at the number of RSS buckets */ + if (queues > rss_getnumbuckets()) + queues = rss_getnumbuckets(); +#endif /* Enforce the VF max value */ if (queues > IXLV_MAX_QUEUES) queues = IXLV_MAX_QUEUES; @@ -1181,6 +1186,26 @@ ixlv_init_msix(struct ixlv_sc *sc) goto fail; } +#ifdef RSS + /* + * If we're doing RSS, the number of queues needs to + * match the number of RSS buckets that are configured. + * + * + If there's more queues than RSS buckets, we'll end + * up with queues that get no traffic. + * + * + If there's more RSS buckets than queues, we'll end + * up having multiple RSS buckets map to the same queue, + * so there'll be some contention. + */ + if (queues != rss_getnumbuckets()) { + device_printf(dev, + "%s: queues (%d) != RSS buckets (%d)" + "; performance will be impacted.\n", + __func__, queues, rss_getnumbuckets()); + } +#endif + if (pci_alloc_msix(dev, &vectors) == 0) { device_printf(sc->dev, "Using MSIX interrupts with %d vectors\n", vectors); @@ -1352,6 +1377,7 @@ ixlv_assign_msix(struct ixlv_sc *sc) int error, rid, vector = 1; for (int i = 0; i < vsi->num_queues; i++, vector++, que++) { + int cpu_id = i; rid = vector + 1; txr = &que->txr; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -1372,15 +1398,25 @@ ixlv_assign_msix(struct ixlv_sc *sc) } bus_describe_intr(dev, que->res, que->tag, "que %d", i); /* Bind the vector to a CPU */ - bus_bind_intr(dev, que->res, i); +#ifdef RSS + cpu_id = rss_getcpu(i % rss_getnumbuckets()); +#endif + bus_bind_intr(dev, que->res, cpu_id); que->msix = vector; vsi->que_mask |= (u64)(1 << que->msix); TASK_INIT(&que->tx_task, 0, ixl_deferred_mq_start, que); TASK_INIT(&que->task, 0, ixlv_handle_que, que); que->tq = taskqueue_create_fast("ixlv_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); - taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", - device_get_nameunit(sc->dev)); +#ifdef RSS + taskqueue_start_threads_pinned(&que->tq, 1, PI_NET, + cpu_id, "%s (bucket %d)", + device_get_nameunit(dev), cpu_id); +#else + taskqueue_start_threads(&que->tq, 1, PI_NET, + "%s que", device_get_nameunit(dev)); +#endif + } return (0); @@ -2521,16 +2557,18 @@ ixlv_config_rss(struct ixlv_sc *sc) struct i40e_hw *hw = &sc->hw; struct ixl_vsi *vsi = &sc->vsi; u32 lut = 0; - u64 set_hena, hena; - int i, j; - - /* set up random bits */ - static const u32 seed[I40E_VFQF_HKEY_MAX_INDEX + 1] = { - 0x794221b4, 0xbca0c5ab, 0x6cd5ebd9, 0x1ada6127, - 0x983b3aa1, 0x1c4e71eb, 0x7f6328b2, 0xfcdc0da0, - 0xc135cafa, 0x7a6f7e2d, 0xe7102d28, 0x163cd12e, - 0x4954b126 }; - + u64 set_hena = 0, hena; + int i, j, que_id; +#ifdef RSS + u32 rss_hash_config; + u32 rss_seed[IXL_KEYSZ]; +#else + u32 rss_seed[IXL_KEYSZ] = {0x41b01687, + 0x183cfd8c, 0xce880440, 0x580cbc3c, + 0x35897377, 0x328b25e1, 0x4fa98922, + 0xb7d90c14, 0xd5bad70d, 0xcd15a2c1}; +#endif + /* Don't set up RSS if using a single queue */ if (vsi->num_queues == 1) { wr32(hw, I40E_VFQF_HENA(0), 0); @@ -2539,11 +2577,32 @@ ixlv_config_rss(struct ixlv_sc *sc) return; } +#ifdef RSS + /* Fetch the configured RSS key */ + rss_getkey((uint8_t *) &rss_seed); +#endif /* Fill out hash function seed */ - for (i = 0; i <= I40E_VFQF_HKEY_MAX_INDEX; i++) - wr32(hw, I40E_VFQF_HKEY(i), seed[i]); + for (i = 0; i <= IXL_KEYSZ; i++) + wr32(hw, I40E_VFQF_HKEY(i), rss_seed[i]); /* Enable PCTYPES for RSS: */ +#ifdef RSS + rss_hash_config = rss_gethashconfig(); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) + set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; +#else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | @@ -2556,7 +2615,7 @@ ixlv_config_rss(struct ixlv_sc *sc) ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6) | ((u64)1 << I40E_FILTER_PCTYPE_L2_PAYLOAD); - +#endif hena = (u64)rd32(hw, I40E_VFQF_HENA(0)) | ((u64)rd32(hw, I40E_VFQF_HENA(1)) << 32); hena |= set_hena; @@ -2564,16 +2623,26 @@ ixlv_config_rss(struct ixlv_sc *sc) wr32(hw, I40E_VFQF_HENA(1), (u32)(hena >> 32)); /* Populate the LUT with max no. of queues in round robin fashion */ - for (i = 0, j = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; j++) { + for (i = 0, j = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++, j++) { if (j == vsi->num_queues) j = 0; +#ifdef RSS + /* + * Fetch the RSS bucket id for the given indirection entry. + * Cap it at the number of configured buckets (which is + * num_queues.) + */ + que_id = rss_get_indirection_to_bucket(i); + que_id = que_id % adapter->num_queues; +#else + que_id = j; +#endif /* lut = 4-byte sliding window of 4 lut entries */ - lut = (lut << 8) | (j & 0xF); + lut = (lut << 8) | (que_id & 0xF); /* On i = 3, we have 4 entries in lut; write to the register */ - if ((j & 3) == 3) { + if ((i & 3) == 3) { wr32(hw, I40E_VFQF_HLUT(i), lut); DDPRINTF(sc->dev, "HLUT(%2d): %#010x", i, lut); - i++; } } ixl_flush(hw); Modified: head/sys/dev/ixl/ixl.h ============================================================================== --- head/sys/dev/ixl/ixl.h Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/ixl.h Mon Jan 12 18:43:34 2015 (r277084) @@ -93,7 +93,7 @@ #include "i40e_type.h" #include "i40e_prototype.h" -#ifdef IXL_DEBUG +#if defined(IXL_DEBUG) || defined(IXL_DEBUG_SYSCTL) #include #define MAC_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x" @@ -101,7 +101,13 @@ (mac_addr)[0], (mac_addr)[1], (mac_addr)[2], (mac_addr)[3], \ (mac_addr)[4], (mac_addr)[5] #define ON_OFF_STR(is_set) ((is_set) ? "On" : "Off") +#endif /* IXL_DEBUG || IXL_DEBUG_SYSCTL */ +#ifdef IXL_DEBUG +/* Enable debug sysctls */ +#ifndef IXL_DEBUG_SYSCTL +#define IXL_DEBUG_SYSCTL 1 +#endif #define _DBG_PRINTF(S, ...) printf("%s: " S "\n", __func__, ##__VA_ARGS__) #define _DEV_DBG_PRINTF(dev, S, ...) device_printf(dev, "%s: " S "\n", __func__, ##__VA_ARGS__) @@ -128,7 +134,7 @@ #define HW_DEBUGOUT(...) if (DEBUG_HW) _DBG_PRINTF(__VA_ARGS__) -#else +#else /* no IXL_DEBUG */ #define DEBUG_INIT 0 #define DEBUG_IOCTL 0 #define DEBUG_HW 0 @@ -144,7 +150,7 @@ #define IOCTL_DBG_IF2(...) #define IOCTL_DBG_IF(...) #define HW_DEBUGOUT(...) -#endif +#endif /* IXL_DEBUG */ /* Tunables */ @@ -214,6 +220,7 @@ #define IXL_MAX_TSO_SEGS 66 #define IXL_SPARSE_CHAIN 6 #define IXL_QUEUE_HUNG 0x80000000 +#define IXL_KEYSZ 10 /* ERJ: hardware can support ~1.5k filters between all functions */ #define IXL_MAX_FILTERS 256 Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:43:34 2015 (r277084) @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m struct tx_ring *txr; int err, i; - /* check if flowid is set */ - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + /* Which queue to use */ + if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % vsi->num_queues; else i = curcpu % vsi->num_queues; @@ -1089,8 +1089,8 @@ int ixl_init_rx_ring(struct ixl_queue *que) { struct rx_ring *rxr = &que->rxr; - struct ixl_vsi *vsi = que->vsi; #if defined(INET6) || defined(INET) + struct ixl_vsi *vsi = que->vsi; struct ifnet *ifp = vsi->ifp; struct lro_ctrl *lro = &rxr->lro; #endif @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); sendmp->m_pkthdr.flowid = que->msix; - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); + sendmp->m_flags |= M_FLOWID; } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, Modified: head/sys/modules/ixl/Makefile ============================================================================== --- head/sys/modules/ixl/Makefile Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/modules/ixl/Makefile Mon Jan 12 18:43:34 2015 (r277084) @@ -4,7 +4,7 @@ KMOD = if_ixl SRCS = device_if.h bus_if.h pci_if.h opt_bdg.h -SRCS += opt_inet.h opt_inet6.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ixl.c ixl_txrx.c i40e_osdep.c # Shared source Modified: head/sys/modules/ixlv/Makefile ============================================================================== --- head/sys/modules/ixlv/Makefile Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/modules/ixlv/Makefile Mon Jan 12 18:43:34 2015 (r277084) @@ -4,7 +4,7 @@ KMOD = if_ixlv SRCS = device_if.h bus_if.h pci_if.h opt_bdg.h -SRCS += opt_inet.h opt_inet6.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ixlv.c ixlvc.c ixl_txrx.c i40e_osdep.c # Shared source From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:55:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08C0F8D2; Mon, 12 Jan 2015 18:55:37 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79EEFAC9; Mon, 12 Jan 2015 18:55:36 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id p9so19197517lbv.0; Mon, 12 Jan 2015 10:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=L8EsyhAUcwsl0LT7IFPkQSCsaW3YrECIQXh2fjayj3s=; b=xn8HD5dNLe2KdToop531+PfygLkV2qhB3YWp+F8mzNSfXt6Ce3LtWywRm9WAxfZh/W Snwtm/d9npirDjMGbolu2Hd8twaokRmZni3fMOWcplRg+QIqx4hh2snI5pCRMghi8rGv zXGTFd+he+fKUIY/J2S6pDSwhrvk8G9y9jI8TtL/4B7nhCfYp88e9lLTBwKFkjvc2/DX vfAVNAlOP6qvFemU6faDkDKLU7uM09ISNtl+oWGQcIwfjg2eTiE2jAQ6HzMt2zZSgeVc r5Y++5COldRgb1UIn5t+D0Mq1cWDJFcJ9GfjTpYwaBmRLN7e/wrJj0aq1m91ymuuuhTj OuSA== MIME-Version: 1.0 X-Received: by 10.152.23.98 with SMTP id l2mr37971903laf.46.1421088934676; Mon, 12 Jan 2015 10:55:34 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.141.5 with HTTP; Mon, 12 Jan 2015 10:55:34 -0800 (PST) In-Reply-To: <201501121843.t0CIhYnW067569@svn.freebsd.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> Date: Mon, 12 Jan 2015 10:55:34 -0800 X-Google-Sender-Auth: a_O_7zRYAS402xxfhiCuneABfdg Message-ID: Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Craig Rodrigues To: Jack F Vogel Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:55:37 -0000 On Mon, Jan 12, 2015 at 10:43 AM, Jack F Vogel wrote: > Author: jfv > Date: Mon Jan 12 18:43:34 2015 > New Revision: 277084 > URL: https://svnweb.freebsd.org/changeset/base/277084 > > Log: > Intel I40E driver updates: > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > In future please set the Relnotes: flag in your commit log message for this type of commit so that Release Engineering can properly keep track of this type of commit for the release notes. This was added in the past year, see: https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-message.html -- Craig From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 18:58:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B59B7AF7; Mon, 12 Jan 2015 18:58:48 +0000 (UTC) Date: Mon, 12 Jan 2015 18:58:42 +0000 From: Glen Barber To: Craig Rodrigues Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv Message-ID: <20150112185842.GR1400@hub.FreeBSD.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Uw+RRa3pmtkgiNaD" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Jack F Vogel , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:58:49 -0000 --Uw+RRa3pmtkgiNaD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 12, 2015 at 10:55:34AM -0800, Craig Rodrigues wrote: > On Mon, Jan 12, 2015 at 10:43 AM, Jack F Vogel wrote: >=20 > > Author: jfv > > Date: Mon Jan 12 18:43:34 2015 > > New Revision: 277084 > > URL: https://svnweb.freebsd.org/changeset/base/277084 > > > > Log: > > Intel I40E driver updates: > > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > > >=20 > In future please set the Relnotes: flag in your commit log message for th= is > type of commit so that Release Engineering can > properly keep track of this type of commit for the release notes. This w= as > added in the past year, see: > https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-messa= ge.html >=20 FWIW, we need a manual page for ixl(4) and ixlv(4) before it can be added to the release notes page. (I've already emailed Jack about this privately, following one of his recent commits.) Glen --Uw+RRa3pmtkgiNaD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUtBliAAoJEAMUWKVHj+KTLegP/2bro9rk6HSKpZyvwLAMQjYv OOnJOR894CtGmL1Do6uQJKi1eMBSmm6R3pviRdug8p9l8xN8VJMvY4C5ymtzpr3x X7F42iX5DvweQ59scNXHOvxeA9tCZDVPwwTuRBR0Fr03WWsLqjEa6E18jneQ/y+m Yd2sEsvTyz53Fd7QM1mZpGd4rzlvDBy2MCz0bgjeAZ5Hn7Q1gcIIw2wCgUY3G5xP D7C7jpolnXiDRn+3m1Y9eaMHsEetzxaSQO0yXyi7bUwx7QBWkZzswm2YV8CbDfAz 7jkFEHBgmHmxnAKuBaTWHiY611Q/CpevwbXjGZyPR95SyNHX9DZ0IDUCLAU2Wpve 6RlCEgLqSM48pjWtGg3BqnWSEU5WBP5UuWM2+OSMC/fMKTfgQWGjEbn27xpfOB2i Wu9TK+M7xKcooZ47nyXjQHr3X4Iw8ul++Z+9ZRym8aO8R6yiUE04be+cgYrFns2k vA+MWuYxOmMbea5p3izL7paMWmFlLZ7M9o8UGiECFTZQq3zkOJHOjMSahEPoAWld /tGSe3OKoQrKosXUp2XMk/VYmRYoyKqYiH21cCLvMrOb6Qc2d+aNsK9csc4Nvhxq mAWDqbH+sQ8KvQbl5niQzgpbxRW2CBOSadJ3boDbLEJZtMv7k/LON2MjvlehuRcY ze8KjzL+jV71lMkwju/x =l5kH -----END PGP SIGNATURE----- --Uw+RRa3pmtkgiNaD-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 19:26:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 915E3CF0; Mon, 12 Jan 2015 19:26:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D81BEE7; Mon, 12 Jan 2015 19:26:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CJQW2h087538; Mon, 12 Jan 2015 19:26:32 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CJQWHI087537; Mon, 12 Jan 2015 19:26:32 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501121926.t0CJQWHI087537@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Jan 2015 19:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277085 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 19:26:32 -0000 Author: brueffer Date: Mon Jan 12 19:26:31 2015 New Revision: 277085 URL: https://svnweb.freebsd.org/changeset/base/277085 Log: Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf. The error exists in the NetBSD upstream version as well and will be reported back. PR: 196598 Submitted by: Dan McGregor MFC after: 1 week Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon Jan 12 18:43:34 2015 (r277084) +++ head/usr.sbin/makefs/ffs.c Mon Jan 12 19:26:31 2015 (r277085) @@ -191,7 +191,7 @@ ffs_parse_opts(const char *option, fsinf "bytes per inode" }, { "minfree", &ffs_opts->minfree, 0, 99, "minfree" }, - { "maxbpf", &ffs_opts->maxbpg, 1, INT_MAX, + { "maxbpg", &ffs_opts->maxbpg, 1, INT_MAX, "max blocks per file in a cg" }, { "avgfilesize", &ffs_opts->avgfilesize,1, INT_MAX, "expected average file size" }, From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 19:47:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C53E744F; Mon, 12 Jan 2015 19:47:45 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 554871CB; Mon, 12 Jan 2015 19:47:45 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 9497A25D3A42; Mon, 12 Jan 2015 19:47:42 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C202DC7706D; Mon, 12 Jan 2015 19:47:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id tfpGE97616zp; Mon, 12 Jan 2015 19:47:40 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 8FCFFC77058; Mon, 12 Jan 2015 19:47:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv From: "Bjoern A. Zeeb" In-Reply-To: <201501121843.t0CIhYnW067569@svn.freebsd.org> Date: Mon, 12 Jan 2015 19:47:39 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <43BD685C-77C4-42C8-9143-4BD59916EDFB@FreeBSD.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> To: Jack F Vogel X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 19:47:46 -0000 > On 12 Jan 2015, at 18:43 , Jack F Vogel wrote: >=20 > Author: jfv > Date: Mon Jan 12 18:43:34 2015 > New Revision: 277084 > URL: https://svnweb.freebsd.org/changeset/base/277084 >=20 > Log: > Intel I40E driver updates: > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > - Major change in both drivers is to add RSS support > - In ixl fix some interface speed related issues, dual > speed was not changing correctly, KR/X media was not > displaying correctly (this has a workaround until a > more robust media handling is in place) > - Add a warning when using Dell NPAR and the speed is > less than 10G > - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, > and without tuning can display excessively >=20 > MFC after: 1 week >=20 > Modified: > head/sys/dev/ixl/if_ixl.c > head/sys/dev/ixl/if_ixlv.c > head/sys/dev/ixl/ixl.h > head/sys/dev/ixl/ixl_txrx.c There is no M_FLOWID in HEAD anymore. Build failure. > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:38:09 2015 = (r277083) > +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:43:34 2015 = (r277084) > @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m > struct tx_ring *txr; > int err, i; >=20 > - /* check if flowid is set */ > - if (M_HASHTYPE_GET(m) !=3D M_HASHTYPE_NONE) > + /* Which queue to use */ > + if ((m->m_flags & M_FLOWID) !=3D 0) > i =3D m->m_pkthdr.flowid % vsi->num_queues; > else > i =3D curcpu % vsi->num_queues; > @@ -1089,8 +1089,8 @@ int > ixl_init_rx_ring(struct ixl_queue *que) > { > struct rx_ring *rxr =3D &que->rxr; > - struct ixl_vsi *vsi =3D que->vsi; > #if defined(INET6) || defined(INET) > + struct ixl_vsi *vsi =3D que->vsi; > struct ifnet *ifp =3D vsi->ifp; > struct lro_ctrl *lro =3D &rxr->lro; > #endif > @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou > if ((ifp->if_capenable & IFCAP_RXCSUM) !=3D 0) > ixl_rx_checksum(sendmp, status, error, = ptype); > sendmp->m_pkthdr.flowid =3D que->msix; > - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); > + sendmp->m_flags |=3D M_FLOWID; > } > next_desc: > bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:00:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81682AC9 for ; Mon, 12 Jan 2015 20:00:37 +0000 (UTC) Received: from mail-qa0-x22e.google.com (mail-qa0-x22e.google.com [IPv6:2607:f8b0:400d:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39A05369 for ; Mon, 12 Jan 2015 20:00:37 +0000 (UTC) Received: by mail-qa0-f46.google.com with SMTP id j7so9252575qaq.5 for ; Mon, 12 Jan 2015 12:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:content-transfer-encoding:from:mime-version:date :subject:message-id:to; bh=oXnCDVUg86hMRbbL+UkP7zUGgMKwep/FsS2r6NkhBvY=; b=HWLGOv++FSgEMSlyOeLzvzUH0yYhbnWRzmTTk1reJ00YsvuPwsaUkM2S4GljHA8WgF qBhG8S4NL+eoQ5CQpTGQ4YjgAuWD2900LkwDX9UMPq7Akpk71qSualIAmWBylqzZaAVg JH14IxtyirwyX5fiAoEII0fP198Ne9CjRfe4uIw/eG2SLypr5vMYFn7CkLgqaAJbSCs1 a62Uh6kXMM+D0wb6TAXbRRfJIC1jNbfFnodLNF89DG1J54VQZTfTy+BDaj8dEzkHzFcm lZsQ2QYZkoooZXFfS1Zg+MH/u/tssEeWYQzMwb8SrgwJgVHYSj25y9CrcB7hElQU57Co kZmw== X-Received: by 10.140.82.136 with SMTP id h8mr49399820qgd.75.1421092836406; Mon, 12 Jan 2015 12:00:36 -0800 (PST) Received: from [192.168.1.75] (108-206-36-24.lightspeed.sntcca.sbcglobal.net. [108.206.36.24]) by mx.google.com with ESMTPSA id n1sm15675440qag.21.2015.01.12.12.00.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 12:00:35 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Sudhakar Bhavanam Mime-Version: 1.0 (1.0) Date: Mon, 12 Jan 2015 12:00:32 -0800 Subject: Re: svn commit: r270200 - head/share/vt/keymaps Message-Id: <68D4FB5B-6E66-42B5-A61F-7F2F946643DF@gmail.com> To: "svn-src-all@freebsd.org" X-Mailer: iPhone Mail (12B440) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:00:37 -0000 AAAefyvlj. Bcc vvkkkkoo PlllowuZ Sent from my iPhone From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:00:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF0A2ACF for ; Mon, 12 Jan 2015 20:00:40 +0000 (UTC) Received: from mail-qa0-x230.google.com (mail-qa0-x230.google.com [IPv6:2607:f8b0:400d:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A728836C for ; Mon, 12 Jan 2015 20:00:40 +0000 (UTC) Received: by mail-qa0-f48.google.com with SMTP id v8so6833788qal.7 for ; Mon, 12 Jan 2015 12:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:content-transfer-encoding:from:mime-version:date :subject:message-id:to; bh=oXnCDVUg86hMRbbL+UkP7zUGgMKwep/FsS2r6NkhBvY=; b=pGHtTUgNZtmJcNHhHlN+4qEyPB6bqK6B2eCJszGR3OR4bTp2qq4eWrdJUQ6oxMb5Su Dzc+0xm+uJsW93u+nifG/liYUHlG36konZUgmrN9Y82Rne8POw7FDJGpn+4MuDdUOsNQ MTEjVMl4iTaJ8U6okTphNELRXST95nvuqfZ3IbhXfixZdAkq7Uu5vDOt6x3TOTVxlmmL ve2d5K9wQKnswXsog/hOdR9mBy+XdVayEYekkO2o2yxndqCAX+yGLhY20mFRrhSO02eT 8P1qNhjKVmrNGazEJ7w0zm/N0LNrv8ScJPNxxr4mmAaUWOxR5iN7nvao8s66Dw9qP61P 2ihQ== X-Received: by 10.140.23.210 with SMTP id 76mr49549722qgp.84.1421092839302; Mon, 12 Jan 2015 12:00:39 -0800 (PST) Received: from [192.168.1.75] (108-206-36-24.lightspeed.sntcca.sbcglobal.net. [108.206.36.24]) by mx.google.com with ESMTPSA id p7sm15690662qat.4.2015.01.12.12.00.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 12:00:38 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Sudhakar Bhavanam Mime-Version: 1.0 (1.0) Date: Mon, 12 Jan 2015 12:00:32 -0800 Subject: Re: svn commit: r270200 - head/share/vt/keymaps Message-Id: To: "svn-src-all@freebsd.org" X-Mailer: iPhone Mail (12B440) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:00:41 -0000 AAAefyvlj. Bcc vvkkkkoo PlllowuZ Sent from my iPhone From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:00:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF96B14 for ; Mon, 12 Jan 2015 20:00:42 +0000 (UTC) Received: from mail-qa0-x229.google.com (mail-qa0-x229.google.com [IPv6:2607:f8b0:400d:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A856D36E for ; Mon, 12 Jan 2015 20:00:42 +0000 (UTC) Received: by mail-qa0-f41.google.com with SMTP id bm13so9225614qab.0 for ; Mon, 12 Jan 2015 12:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:content-transfer-encoding:from:mime-version:date :subject:message-id:to; bh=oXnCDVUg86hMRbbL+UkP7zUGgMKwep/FsS2r6NkhBvY=; b=M7lfZxgMPtRavRxPezsClmIAwrOPepK4D2M7FUCpkxrGdpKz9l/aLYt79EKUz2/Gj0 oRKFzYYsAW58sVapd5RfZOjJvJLULf9oN9xniOAsdSqmNZI6sUDcbOF6dZaOPH0VDXF1 Sk29S1DlRujmzAl0JhWubkvk9Ma/QVF7Yf9abtCy1E3UmK2s9NxYOtut2K5V0+aJiZO8 lcwYd2lIjgCPtyTWP7IsiF0/4d4Fjucr0rw3QSYWf1O9qNerk8vb6OaRX9Q1HhS4D5jk Bvemm6m0HwlYvvRZfXll39SFq2ob/XBLkrlEsDO6ox+4p5tChQS9zj2lQ48b37VXxKER ZjoA== X-Received: by 10.140.19.139 with SMTP id 11mr51053492qgh.14.1421092841472; Mon, 12 Jan 2015 12:00:41 -0800 (PST) Received: from [192.168.1.75] (108-206-36-24.lightspeed.sntcca.sbcglobal.net. [108.206.36.24]) by mx.google.com with ESMTPSA id d5sm15659366qai.40.2015.01.12.12.00.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 12:00:41 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Sudhakar Bhavanam Mime-Version: 1.0 (1.0) Date: Mon, 12 Jan 2015 12:00:33 -0800 Subject: Re: svn commit: r270200 - head/share/vt/keymaps Message-Id: <2C20652B-8D78-4290-A3DA-E93C638590D8@gmail.com> To: "svn-src-all@freebsd.org" X-Mailer: iPhone Mail (12B440) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:00:43 -0000 AAAefyvlj. Bcc vvkkkkoo PlllowuZ Sent from my iPhone From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:07:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 546ABC42; Mon, 12 Jan 2015 20:07:13 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAC99639; Mon, 12 Jan 2015 20:07:12 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id l2so21421980wgh.7; Mon, 12 Jan 2015 12:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RoTFgHtq2M/CIjgUh6AOuz5+ii5OxJ8Grkrf76QgnHo=; b=aKcXrgsi+Z/t8Xst6RSQ3S4ouujd/C4BRt1HPvBPlIYBZno8E0eStHBnRtPopVcOI5 eM/YIAl7nBZTYioiEiiMmnFHzbfwZPg1+/2c44sNBBmD0cRW0JOYqAhaUDCNXsZx1cWl cYzds4kDpd+1YxzYNnCaPuoIL5SWjK2wU2aRDgpgK5CgPBW2eJw7rU0bMRqQ6lSD7SEA RI4PgwBY31CE2flonxsQyQ0ranH3F/IVf3r4VxkQphXmMKJxerTsOoeNMFTJUH2BBfbm YkTuhKKDrcAZP5yk96wxTfdJHzjjjbH6p6BDwby8vBi0e84QUbX6O51DiGh8lkHvYzFl Jrsw== MIME-Version: 1.0 X-Received: by 10.194.19.131 with SMTP id f3mr30935673wje.46.1421093231359; Mon, 12 Jan 2015 12:07:11 -0800 (PST) Received: by 10.194.101.106 with HTTP; Mon, 12 Jan 2015 12:07:11 -0800 (PST) In-Reply-To: <43BD685C-77C4-42C8-9143-4BD59916EDFB@FreeBSD.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> <43BD685C-77C4-42C8-9143-4BD59916EDFB@FreeBSD.org> Date: Mon, 12 Jan 2015 12:07:11 -0800 Message-ID: Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Jack Vogel To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Jack F Vogel , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:07:13 -0000 Opps, missing chunk, fix coming. Jack On Mon, Jan 12, 2015 at 11:47 AM, Bjoern A. Zeeb wrote: > > > On 12 Jan 2015, at 18:43 , Jack F Vogel wrote: > > > > Author: jfv > > Date: Mon Jan 12 18:43:34 2015 > > New Revision: 277084 > > URL: https://svnweb.freebsd.org/changeset/base/277084 > > > > Log: > > Intel I40E driver updates: > > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > > - Major change in both drivers is to add RSS support > > - In ixl fix some interface speed related issues, dual > > speed was not changing correctly, KR/X media was not > > displaying correctly (this has a workaround until a > > more robust media handling is in place) > > - Add a warning when using Dell NPAR and the speed is > > less than 10G > > - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, > > and without tuning can display excessively > > > > MFC after: 1 week > > > > Modified: > > head/sys/dev/ixl/if_ixl.c > > head/sys/dev/ixl/if_ixlv.c > > head/sys/dev/ixl/ixl.h > > head/sys/dev/ixl/ixl_txrx.c > > There is no M_FLOWID in HEAD anymore. Build failure. > > > > ============================================================================== > > --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:38:09 2015 > (r277083) > > +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:43:34 2015 > (r277084) > > @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m > > struct tx_ring *txr; > > int err, i; > > > > - /* check if flowid is set */ > > - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) > > + /* Which queue to use */ > > + if ((m->m_flags & M_FLOWID) != 0) > > i = m->m_pkthdr.flowid % vsi->num_queues; > > else > > i = curcpu % vsi->num_queues; > > @@ -1089,8 +1089,8 @@ int > > ixl_init_rx_ring(struct ixl_queue *que) > > { > > struct rx_ring *rxr = &que->rxr; > > - struct ixl_vsi *vsi = que->vsi; > > #if defined(INET6) || defined(INET) > > + struct ixl_vsi *vsi = que->vsi; > > struct ifnet *ifp = vsi->ifp; > > struct lro_ctrl *lro = &rxr->lro; > > #endif > > @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou > > if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) > > ixl_rx_checksum(sendmp, status, error, > ptype); > > sendmp->m_pkthdr.flowid = que->msix; > > - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); > > + sendmp->m_flags |= M_FLOWID; > > } > > next_desc: > > bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, > > > > -- > Bjoern A. Zeeb Charles Haddon Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have failed > beneath the bitterness of their trial had they not found a friend." > > From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:14:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D63A91F3; Mon, 12 Jan 2015 20:14:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C039F792; Mon, 12 Jan 2015 20:14:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CKEePq011057; Mon, 12 Jan 2015 20:14:40 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CKEWnI011004; Mon, 12 Jan 2015 20:14:32 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501122014.t0CKEWnI011004@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 12 Jan 2015 20:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277086 - in stable/10: contrib/byacc/test/yacc usr.bin/yacc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:14:41 -0000 Author: jkim Date: Mon Jan 12 20:14:31 2015 New Revision: 277086 URL: https://svnweb.freebsd.org/changeset/base/277086 Log: MFC: r274460, r274475 Increase MAXTABLE to the maxmimum possible value and regen test cases. Modified: stable/10/contrib/byacc/test/yacc/calc.tab.c stable/10/contrib/byacc/test/yacc/calc1.tab.c stable/10/contrib/byacc/test/yacc/calc2.tab.c stable/10/contrib/byacc/test/yacc/calc3.tab.c stable/10/contrib/byacc/test/yacc/code_calc.code.c stable/10/contrib/byacc/test/yacc/code_calc.tab.c stable/10/contrib/byacc/test/yacc/code_error.code.c stable/10/contrib/byacc/test/yacc/code_error.tab.c stable/10/contrib/byacc/test/yacc/empty.tab.c stable/10/contrib/byacc/test/yacc/err_syntax10.tab.c stable/10/contrib/byacc/test/yacc/err_syntax11.tab.c stable/10/contrib/byacc/test/yacc/err_syntax12.tab.c stable/10/contrib/byacc/test/yacc/err_syntax18.tab.c stable/10/contrib/byacc/test/yacc/err_syntax20.tab.c stable/10/contrib/byacc/test/yacc/error.tab.c stable/10/contrib/byacc/test/yacc/grammar.tab.c stable/10/contrib/byacc/test/yacc/ok_syntax1.tab.c stable/10/contrib/byacc/test/yacc/pure_calc.tab.c stable/10/contrib/byacc/test/yacc/pure_error.tab.c stable/10/contrib/byacc/test/yacc/quote_calc-s.tab.c stable/10/contrib/byacc/test/yacc/quote_calc.tab.c stable/10/contrib/byacc/test/yacc/quote_calc2-s.tab.c stable/10/contrib/byacc/test/yacc/quote_calc2.tab.c stable/10/contrib/byacc/test/yacc/quote_calc3-s.tab.c stable/10/contrib/byacc/test/yacc/quote_calc3.tab.c stable/10/contrib/byacc/test/yacc/quote_calc4-s.tab.c stable/10/contrib/byacc/test/yacc/quote_calc4.tab.c stable/10/contrib/byacc/test/yacc/rename_debug.c stable/10/contrib/byacc/test/yacc/varsyntax_calc1.tab.c stable/10/usr.bin/yacc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/byacc/test/yacc/calc.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/calc.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/calc.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -150,7 +150,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/calc1.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/calc1.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/calc1.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -175,7 +175,7 @@ extern int YYPARSE_DECL(); #define CONST 259 #define UMINUS 260 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc1_lhs[] = { -1, 3, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, Modified: stable/10/contrib/byacc/test/yacc/calc2.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/calc2.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/calc2.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -152,7 +152,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc2_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/calc3.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/calc3.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/calc3.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -157,7 +157,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc3_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/code_calc.code.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/code_calc.code.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/code_calc.code.c Mon Jan 12 20:14:31 2015 (r277086) @@ -160,7 +160,7 @@ typedef int YYSTYPE; #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a)) extern int YYPARSE_DECL(); -typedef short YYINT; +typedef int YYINT; extern YYINT yylhs[]; extern YYINT yylen[]; extern YYINT yydefred[]; Modified: stable/10/contrib/byacc/test/yacc/code_calc.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/code_calc.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/code_calc.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -1,4 +1,4 @@ -typedef short YYINT; +typedef int YYINT; const YYINT calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/code_error.code.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/code_error.code.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/code_error.code.c Mon Jan 12 20:14:31 2015 (r277086) @@ -152,7 +152,7 @@ typedef int YYSTYPE; #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a)) extern int YYPARSE_DECL(); -typedef short YYINT; +typedef int YYINT; extern YYINT yylhs[]; extern YYINT yylen[]; extern YYINT yydefred[]; Modified: stable/10/contrib/byacc/test/yacc/code_error.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/code_error.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/code_error.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -1,4 +1,4 @@ -typedef short YYINT; +typedef int YYINT; const YYINT error_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/empty.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/empty.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/empty.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -144,7 +144,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT empty_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/err_syntax10.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax10.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/err_syntax10.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -134,7 +134,7 @@ static void yyerror(const char *); extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax10_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/err_syntax11.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax11.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/err_syntax11.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -140,7 +140,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax11_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/err_syntax12.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax12.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/err_syntax12.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -141,7 +141,7 @@ extern int YYPARSE_DECL(); #define text 456 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax12_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/err_syntax18.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax18.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/err_syntax18.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -140,7 +140,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax18_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/err_syntax20.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax20.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/err_syntax20.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -135,7 +135,7 @@ extern int YYPARSE_DECL(); #define recur 257 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax20_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/error.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/error.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/error.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -140,7 +140,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT error_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/grammar.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/grammar.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/grammar.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -453,7 +453,7 @@ extern int YYPARSE_DECL(); #define T_ASMARG 290 #define T_VA_DCL 291 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT grammar_lhs[] = { -1, 0, 0, 26, 26, 27, 27, 27, 27, 27, 27, 27, 31, 30, 30, 28, 28, 34, 28, 32, 32, Modified: stable/10/contrib/byacc/test/yacc/ok_syntax1.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/ok_syntax1.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/ok_syntax1.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -178,7 +178,7 @@ extern int YYPARSE_DECL(); #define VT 272 #define UMINUS 273 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT ok_syntax1_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/pure_calc.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/pure_calc.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/pure_calc.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -160,7 +160,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/pure_error.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/pure_error.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/pure_error.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -152,7 +152,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT error_lhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/quote_calc-s.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc-s.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc-s.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -162,7 +162,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc2-s.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc2-s.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc2-s.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc2_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc2.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc2.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc2.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -162,7 +162,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc2_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc3-s.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc3-s.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc3-s.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc3_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc3.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc3.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc3.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc3_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc4-s.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc4-s.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc4-s.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc4_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/quote_calc4.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/quote_calc4.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/quote_calc4.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc4_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, Modified: stable/10/contrib/byacc/test/yacc/rename_debug.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/rename_debug.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/rename_debug.c Mon Jan 12 20:14:31 2015 (r277086) @@ -16,7 +16,7 @@ #line 17 "rename_debug.c" #include "rename_debug.i" #include "rename_debug.h" -typedef short YYINT; +typedef int YYINT; static const YYINT yylhs[] = { -1, 0, }; Modified: stable/10/contrib/byacc/test/yacc/varsyntax_calc1.tab.c ============================================================================== --- stable/10/contrib/byacc/test/yacc/varsyntax_calc1.tab.c Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/contrib/byacc/test/yacc/varsyntax_calc1.tab.c Mon Jan 12 20:14:31 2015 (r277086) @@ -176,7 +176,7 @@ extern int YYPARSE_DECL(); #define CONST 259 #define UMINUS 260 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT varsyntax_calc1_lhs[] = { -1, 3, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, Modified: stable/10/usr.bin/yacc/Makefile ============================================================================== --- stable/10/usr.bin/yacc/Makefile Mon Jan 12 19:26:31 2015 (r277085) +++ stable/10/usr.bin/yacc/Makefile Mon Jan 12 20:14:31 2015 (r277086) @@ -10,9 +10,10 @@ PROG= yacc SRCS= closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c mstring.c output.c \ reader.c yaccpar.c symtab.c verbose.c warshall.c -CFLAGS+= -DMIXEDCASE_FILENAMES=1 \ - -DHAVE_FCNTL_H=1 \ - -DHAVE_MKSTEMP=1 +CFLAGS+= -DHAVE_FCNTL_H=1 \ + -DHAVE_MKSTEMP=1 \ + -DMAXTABLE=INT_MAX \ + -DMIXEDCASE_FILENAMES=1 YYPATCH!= cat ${BYACC_SRC}/VERSION CFLAGS+= -DYYPATCH=${YYPATCH} From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:27:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 187E1627; Mon, 12 Jan 2015 20:27:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D908E4; Mon, 12 Jan 2015 20:27:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CKR6RJ016076; Mon, 12 Jan 2015 20:27:06 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CKR6bE016075; Mon, 12 Jan 2015 20:27:06 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501122027.t0CKR6bE016075@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 12 Jan 2015 20:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277087 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:27:07 -0000 Author: jkim Date: Mon Jan 12 20:27:06 2015 New Revision: 277087 URL: https://svnweb.freebsd.org/changeset/base/277087 Log: Bump version after r277086. yacc(1) is now built with maximum MAXTABLE. Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Mon Jan 12 20:14:31 2015 (r277086) +++ stable/10/sys/sys/param.h Mon Jan 12 20:27:06 2015 (r277087) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001505 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001506 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 20:59:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DDB131F; Mon, 12 Jan 2015 20:59:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30998C57; Mon, 12 Jan 2015 20:59:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CKx8r9030578; Mon, 12 Jan 2015 20:59:08 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CKx8rd030577; Mon, 12 Jan 2015 20:59:08 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501122059.t0CKx8rd030577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 12 Jan 2015 20:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277088 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:59:08 -0000 Author: jfv Date: Mon Jan 12 20:59:07 2015 New Revision: 277088 URL: https://svnweb.freebsd.org/changeset/base/277088 Log: Missing RSS support added, this fixes the build, but the code in the RX side was complicated by recent changes and will need some further tweaking. Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 20:27:06 2015 (r277087) +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 20:59:07 2015 (r277088) @@ -65,14 +65,33 @@ ixl_mq_start(struct ifnet *ifp, struct m struct ixl_queue *que; struct tx_ring *txr; int err, i; +#ifdef RSS + u32 bucket_id; +#endif - /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) - i = m->m_pkthdr.flowid % vsi->num_queues; - else + /* + ** Which queue to use: + ** + ** When doing RSS, map it to the same outbound + ** queue as the incoming flow would be mapped to. + ** If everything is setup correctly, it should be + ** the same bucket that the current CPU we're on is. + */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { +#ifdef RSS + if (rss_hash2bucket(m->m_pkthdr.flowid, + M_HASHTYPE_GET(m), &bucket_id) == 0) { + i = bucket_id % vsi->num_queues; + } else +#endif + i = m->m_pkthdr.flowid % vsi->num_queues; + } else i = curcpu % vsi->num_queues; - - /* Check for a hung queue and pick alternative */ + /* + ** This may not be perfect, but until something + ** better comes along it will keep from scheduling + ** on stalled queues. + */ if (((1 << i) & vsi->active_queues) == 0) i = ffsl(vsi->active_queues); @@ -1542,8 +1561,11 @@ ixl_rxeof(struct ixl_queue *que, int cou rxr->bytes += sendmp->m_pkthdr.len; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); +#ifdef RSS + /* XXX Work in Progress, fix the build for now */ +#endif sendmp->m_pkthdr.flowid = que->msix; - sendmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 21:28:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EEDEE1E; Mon, 12 Jan 2015 21:28:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B323F52; Mon, 12 Jan 2015 21:28:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CLSBHE045115; Mon, 12 Jan 2015 21:28:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CLSBlH045114; Mon, 12 Jan 2015 21:28:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501122128.t0CLSBlH045114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 12 Jan 2015 21:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277089 - head/contrib/compiler-rt/lib/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:28:11 -0000 Author: dim Date: Mon Jan 12 21:28:10 2015 New Revision: 277089 URL: https://svnweb.freebsd.org/changeset/base/277089 Log: Pull in r225610 from upstream compiler-rt trunk (by Roman Divacky): Add FreeBSD support for __clear_cache. Modified: head/contrib/compiler-rt/lib/builtins/clear_cache.c Modified: head/contrib/compiler-rt/lib/builtins/clear_cache.c ============================================================================== --- head/contrib/compiler-rt/lib/builtins/clear_cache.c Mon Jan 12 20:59:07 2015 (r277088) +++ head/contrib/compiler-rt/lib/builtins/clear_cache.c Mon Jan 12 21:28:10 2015 (r277089) @@ -13,6 +13,11 @@ #if __APPLE__ #include #endif +#if defined(__FreeBSD__) && defined(__arm__) + #include + #include +#endif + #if defined(__NetBSD__) && defined(__arm__) #include #endif @@ -39,7 +44,7 @@ void __clear_cache(void *start, void *en * so there is nothing to do */ #elif defined(__arm__) && !defined(__APPLE__) - #if defined(__NetBSD__) + #if defined(__FreeBSD__) || defined(__NetBSD__) struct arm_sync_icache_args arg; arg.addr = (uintptr_t)start; From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 21:33:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2274E3B3; Mon, 12 Jan 2015 21:33:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C8ABCB; Mon, 12 Jan 2015 21:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CLXfFq049349; Mon, 12 Jan 2015 21:33:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CLXaVD049328; Mon, 12 Jan 2015 21:33:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501122133.t0CLXaVD049328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Jan 2015 21:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277090 - in vendor/NetBSD/libedit/dist: . TEST readline X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:33:41 -0000 Author: bapt Date: Mon Jan 12 21:33:35 2015 New Revision: 277090 URL: https://svnweb.freebsd.org/changeset/base/277090 Log: Import libedit 2014-01-09 Obtained from: NetBSD Modified: vendor/NetBSD/libedit/dist/Makefile vendor/NetBSD/libedit/dist/TEST/tc1.c vendor/NetBSD/libedit/dist/TEST/wtc1.c vendor/NetBSD/libedit/dist/chared.c vendor/NetBSD/libedit/dist/chared.h vendor/NetBSD/libedit/dist/editline.3 vendor/NetBSD/libedit/dist/editrc.5 vendor/NetBSD/libedit/dist/el.c vendor/NetBSD/libedit/dist/eln.c vendor/NetBSD/libedit/dist/filecomplete.c vendor/NetBSD/libedit/dist/hist.h vendor/NetBSD/libedit/dist/histedit.h vendor/NetBSD/libedit/dist/history.c vendor/NetBSD/libedit/dist/map.c vendor/NetBSD/libedit/dist/map.h vendor/NetBSD/libedit/dist/parse.c vendor/NetBSD/libedit/dist/read.c vendor/NetBSD/libedit/dist/readline.c vendor/NetBSD/libedit/dist/readline/readline.h vendor/NetBSD/libedit/dist/shlib_version vendor/NetBSD/libedit/dist/tty.c vendor/NetBSD/libedit/dist/tty.h vendor/NetBSD/libedit/dist/vi.c Modified: vendor/NetBSD/libedit/dist/Makefile ============================================================================== --- vendor/NetBSD/libedit/dist/Makefile Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/Makefile Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.51 2012/08/10 12:20:10 joerg Exp $ +# $NetBSD: Makefile,v 1.52 2014/06/14 20:49:37 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -127,7 +127,7 @@ tc1: libedit.a tc1.o .include # XXX -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 +.if defined(HAVE_GCC) COPTS.editline.c+= -Wno-cast-qual COPTS.tokenizer.c+= -Wno-cast-qual COPTS.tokenizern.c+= -Wno-cast-qual Modified: vendor/NetBSD/libedit/dist/TEST/tc1.c ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/tc1.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/TEST/tc1.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: tc1.c,v 1.5 2010/04/18 21:17:47 christos Exp $ */ +/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tc1.c,v 1.5 2010/04/18 21:17:47 christos Exp $"); +__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -189,7 +189,7 @@ main(int argc, char *argv[]) #endif if (gotsig) { - (void) fprintf(stderr, "Got signal %d.\n", gotsig); + (void) fprintf(stderr, "Got signal %d.\n", (int)gotsig); gotsig = 0; el_reset(el); } Modified: vendor/NetBSD/libedit/dist/TEST/wtc1.c ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/wtc1.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/TEST/wtc1.c Mon Jan 12 21:33:35 2015 (r277090) @@ -170,7 +170,7 @@ main(int argc, char *argv[]) #endif if (gotsig) { - (void)fprintf(stderr, "Got signal %d.\n", gotsig); + (void)fprintf(stderr, "Got signal %d.\n", (int)gotsig); gotsig = 0; el_reset(el); } Modified: vendor/NetBSD/libedit/dist/chared.c ============================================================================== --- vendor/NetBSD/libedit/dist/chared.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/chared.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.37 2012/07/18 17:12:39 christos Exp $ */ +/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: chared.c,v 1.37 2012/07/18 17:12:39 christos Exp $"); +__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -434,6 +434,8 @@ ch_init(EditLine *el) el->el_chared.c_kill.last = el->el_chared.c_kill.buf; el->el_chared.c_resizefun = NULL; el->el_chared.c_resizearg = NULL; + el->el_chared.c_aliasfun = NULL; + el->el_chared.c_aliasarg = NULL; el->el_map.current = el->el_map.key; @@ -644,6 +646,25 @@ el_deletestr(EditLine *el, int n) el->el_line.cursor = el->el_line.buffer; } +/* el_cursor(): + * Move the cursor to the left or the right of the current position + */ +public int +el_cursor(EditLine *el, int n) +{ + if (n == 0) + goto out; + + el->el_line.cursor += n; + + if (el->el_line.cursor < el->el_line.buffer) + el->el_line.cursor = el->el_line.buffer; + if (el->el_line.cursor > el->el_line.lastchar) + el->el_line.cursor = el->el_line.lastchar; +out: + return (int)(el->el_line.cursor - el->el_line.buffer); +} + /* c_gets(): * Get a string */ @@ -738,3 +759,11 @@ ch_resizefun(EditLine *el, el_zfunc_t f, el->el_chared.c_resizearg = a; return 0; } + +protected int +ch_aliasfun(EditLine *el, el_afunc_t f, void *a) +{ + el->el_chared.c_aliasfun = f; + el->el_chared.c_aliasarg = a; + return 0; +} Modified: vendor/NetBSD/libedit/dist/chared.h ============================================================================== --- vendor/NetBSD/libedit/dist/chared.h Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/chared.h Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.h,v 1.21 2010/08/28 15:44:59 christos Exp $ */ +/* $NetBSD: chared.h,v 1.22 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -104,6 +104,7 @@ typedef struct c_kill_t { } c_kill_t; typedef void (*el_zfunc_t)(EditLine *, void *); +typedef const char *(*el_afunc_t)(void *, const char *); /* * Note that we use both data structures because the user can bind @@ -116,7 +117,9 @@ typedef struct el_chared_t { c_vcmd_t c_vcmd; c_macro_t c_macro; el_zfunc_t c_resizefun; + el_afunc_t c_aliasfun; void * c_resizearg; + void * c_aliasarg; } el_chared_t; @@ -165,6 +168,7 @@ protected int c_hpos(EditLine *); protected int ch_init(EditLine *); protected void ch_reset(EditLine *, int); protected int ch_resizefun(EditLine *, el_zfunc_t, void *); +protected int ch_aliasfun(EditLine *, el_afunc_t, void *); protected int ch_enlargebufs(EditLine *, size_t); protected void ch_end(EditLine *); Modified: vendor/NetBSD/libedit/dist/editline.3 ============================================================================== --- vendor/NetBSD/libedit/dist/editline.3 Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/editline.3 Mon Jan 12 21:33:35 2015 (r277090) @@ -1,6 +1,6 @@ -.\" $NetBSD: editline.3,v 1.77 2012/09/11 20:29:58 christos Exp $ +.\" $NetBSD: editline.3,v 1.84 2014/12/25 13:39:41 wiz Exp $ .\" -.\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc. +.\" Copyright (c) 1997-2014 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This file was contributed to The NetBSD Foundation by Luke Mewburn. @@ -26,12 +26,13 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 11, 2012 +.Dd December 25, 2014 .Dt EDITLINE 3 .Os .Sh NAME .Nm editline , .Nm el_init , +.Nm el_init_fd , .Nm el_end , .Nm el_reset , .Nm el_gets , @@ -48,6 +49,7 @@ .Nm el_wget , .Nm el_source , .Nm el_resize , +.Nm el_cursor , .Nm el_line , .Nm el_wline , .Nm el_insertstr , @@ -77,6 +79,8 @@ .In histedit.h .Ft EditLine * .Fn el_init "const char *prog" "FILE *fin" "FILE *fout" "FILE *ferr" +.Ft EditLine * +.Fn el_init_fd "const char *prog" "FILE *fin" "FILE *fout" "FILE *ferr" "int fdin" "int fdout" "int fderr" .Ft void .Fn el_end "EditLine *e" .Ft void @@ -109,8 +113,12 @@ .Fn el_source "EditLine *e" "const char *file" .Ft void .Fn el_resize "EditLine *e" +.Fn int +.Fn el_cursor "EditLine *e" "int count" .Ft const LineInfo * .Fn el_line "EditLine *e" +.Ft const LineInfoW * +.Fn el_wline "EditLine *e" .Ft int .Fn el_insertstr "EditLine *e" "const char *str" .Ft int @@ -170,6 +178,8 @@ The line editing functions use a common .Fa EditLine , which is created by .Fn el_init +or +.Fn el_init_fd and freed by .Fn el_end . .Pp @@ -180,7 +190,9 @@ The following functions are available: .Bl -tag -width 4n .It Fn el_init Initialise the line editor, and return a data structure -to be used by all other line editing functions. +to be used by all other line editing functions, or +.Dv NULL +on failure. .Fa prog is the name of the invoking program, used when reading the .Xr editrc 5 @@ -193,11 +205,20 @@ are the input, output, and error streams In this documentation, references to .Dq the tty are actually to this input/output stream combination. +.It Fn el_init_fd +Like +.Fn el_init +but allows specifying file descriptors for the +.Xr stdio 3 +corresponding streams, in case those were created with +.Xr funopen 3 . .It Fn el_end Clean up and finish with .Fa e , assumed to have been created with -.Fn el_init . +.Fn el_init +or +.Fn el_init_fd . .It Fn el_reset Reset the tty and the parser. This should be called after an error which may have upset the tty's @@ -271,6 +292,7 @@ parameters. .Fa op determines which parameter to set, and each operation has its own parameter list. +Returns 0 on success, \-1 on failure. .Pp The following values for .Fa op @@ -581,13 +603,13 @@ If is .Dv NULL , try -.Pa $PWD/.editrc -then .Pa $HOME/.editrc . Refer to .Xr editrc 5 for details on the format of .Fa file . +.Fn el_source +returns 0 on success and \-1 on error. .It Fn el_resize Must be called if the terminal size changes. If @@ -598,6 +620,11 @@ then this is done automatically. Otherwise, it's the responsibility of the application to call .Fn el_resize on the appropriate occasions. +.It Fn el_cursor +Move the cursor to the right (if positive) or to the left (if negative) +.Fa count +characters. +Returns the resulting offset of the cursor from the beginning of the line. .It Fn el_line Return the editing information for the current line in a .Fa LineInfo @@ -643,7 +670,9 @@ The following functions are available: .Bl -tag -width 4n .It Fn history_init Initialise the history list, and return a data structure -to be used by all other history list functions. +to be used by all other history list functions, or +.Dv NULL +on failure. .It Fn history_end Clean up and finish with .Fa h , @@ -712,12 +741,12 @@ as a new element to the history, and, if removing the oldest entry to keep the list to the created size. If .Dv H_SETUNIQUE -was has been called with a non-zero arguments, the element +has been called with a non-zero argument, the element will not be entered into the history if its contents match the ones of the current history element. If the element is entered .Fn history -returns 1, if it is ignored as a duplicate returns 0. +returns 1; if it is ignored as a duplicate returns 0. Finally .Fn history returns \-1 if an error occurred. @@ -739,6 +768,11 @@ Load the history list stored in .It Dv H_SAVE , Fa "const char *file" Save the history list to .Fa file . +.It Dv H_SAVE_FP , Fa "FILE *fp" +Save the history list to the opened +.Ft FILE +pointer +.Fa fp . .It Dv H_SETUNIQUE , Fa "int unique" Set flag that adjacent identical event strings should not be entered into the history. @@ -859,17 +893,22 @@ and the readline emulation appeared in appeared in .Nx 1.5 . .Sh AUTHORS +.An -nosplit The .Nm -library was written by Christos Zoulas. -Luke Mewburn wrote this manual and implemented +library was written by +.An Christos Zoulas . +.An Luke Mewburn +wrote this manual and implemented .Dv CC_REDISPLAY , .Dv CC_REFRESH_BEEP , .Dv EL_EDITMODE , and .Dv EL_RPROMPT . -Jaromir Dolecek implemented the readline emulation. -Johny Mattsson implemented wide-character support. +.An Jaromir Dolecek +implemented the readline emulation. +.An Johny Mattsson +implemented wide-character support. .Sh BUGS At this time, it is the responsibility of the caller to check the result of the Modified: vendor/NetBSD/libedit/dist/editrc.5 ============================================================================== --- vendor/NetBSD/libedit/dist/editrc.5 Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/editrc.5 Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -.\" $NetBSD: editrc.5,v 1.26 2012/06/02 14:19:20 njoly Exp $ +.\" $NetBSD: editrc.5,v 1.29 2014/12/25 13:39:41 wiz Exp $ .\" .\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -26,7 +26,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 18, 2003 +.Dd December 25, 2014 .Dt EDITRC 5 .Os .Sh NAME @@ -42,7 +42,8 @@ file defines various settings to be used library. .Pp The format of each line is: -.Dl [prog:]command [arg [...]] +.Pp +.Dl [prog:]command [arg ...] .Pp .Ar command is one of the @@ -103,16 +104,12 @@ to .Ar key . Options include: .Bl -tag -width 4n -.It Fl e -Bind all keys to the standard GNU Emacs-like bindings. -.It Fl v -Bind all keys to the standard -.Xr vi 1 Ns -like -bindings. .It Fl a List or change key bindings in the .Xr vi 1 mode alternate (command mode) key map. +.It Fl e +Bind all keys to the standard GNU Emacs-like bindings. .It Fl k .Ar key is interpreted as a symbolic arrow key name, which may be one of @@ -134,6 +131,10 @@ Bound keys in .Ar command are themselves reinterpreted, and this continues for ten levels of interpretation. +.It Fl v +Bind all keys to the standard +.Xr vi 1 Ns -like +bindings. .El .Pp .Ar command @@ -149,7 +150,7 @@ can contain control characters of the fo .Sq No ^ Ar character .Sm on .Po -e.g. +e.g.\& .Sq ^A .Pc , and the following backslashed escape sequences: @@ -186,7 +187,7 @@ and .Sq ^ . .It Ic echotc Oo Fl sv Oc Ar arg Ar ... Exercise terminal capabilities given in -.Ar arg Ar ... . +.Ar arg ... . If .Ar arg is @@ -230,9 +231,6 @@ is non zero, only keep unique history en If .Dv n is zero, then keep all entries (the default). -.It Ic telltc -List the values of all the terminal capabilities (see -.Xr termcap 5 ) . .It Ic settc Ar cap Ar val Set the terminal capability .Ar cap @@ -291,6 +289,9 @@ If is empty then the character is set to .Dv _POSIX_VDISABLE . +.It Ic telltc +List the values of all the terminal capabilities (see +.Xr termcap 5 ) . .El .Sh EDITOR COMMANDS The following editor commands are available for use in key bindings: @@ -300,11 +301,11 @@ The following editor commands are availa Vi paste previous deletion to the right of the cursor. .It Ic vi-paste-prev Vi paste previous deletion to the left of the cursor. -.It Ic vi-prev-space-word +.It Ic vi-prev-big-word Vi move to the previous space delimited word. .It Ic vi-prev-word Vi move to the previous word. -.It Ic vi-next-space-word +.It Ic vi-next-big-word Vi move to the next space delimited word. .It Ic vi-next-word Vi move to the next word. @@ -332,9 +333,9 @@ Vi enter insert mode after the cursor. Vi enter insert mode at end of line. .It Ic vi-delete-meta Vi delete prefix command. -.It Ic vi-end-word +.It Ic vi-end-big-word Vi move to the end of the current space delimited word. -.It Ic vi-to-end-word +.It Ic vi-end-word Vi move to the end of the current word. .It Ic vi-undo Vi undo last change. @@ -368,6 +369,28 @@ Vi move up to the character specified pr Vi repeat current character search in the same search direction. .It Ic vi-repeat-prev-char Vi repeat current character search in the opposite search direction. +.It Ic vi-match +Vi go to matching () {} or []. +.It Ic vi-undo-line +Vi undo all changes to line. +.It Ic vi-to-column +Vi go to specified column. +.It Ic vi-yank-end +Vi yank to end of line. +.It Ic vi-yank +Vi yank. +.It Ic vi-comment-out +Vi comment out current command. +.It Ic vi-alias +Vi include shell alias. +.It Ic vi-to-history-line +Vi go to specified history file line.. +.It Ic vi-histedit +Vi edit history line with vi. +.It Ic vi-history-word +Vi append word from previous input line. +.It Ic vi-redo +Vi redo last non-motion command. .It Ic em-delete-or-list Delete character under cursor or list completions if at end of line. .It Ic em-delete-next-word @@ -478,14 +501,24 @@ Move down one line. Editline extended command. .El .\" End of section automatically generated with makelist +.Sh FILES +.Bl -tag -width "~/.editrcXXX" +.It Pa ~/.editrc +User configuration file for the +.Xr editline 3 +library. +.El .Sh SEE ALSO .Xr editline 3 , .Xr regex 3 , .Xr termcap 5 .Sh AUTHORS +.An -nosplit The .Nm editline -library was written by Christos Zoulas, -and this manual was written by Luke Mewburn, +library was written by +.An Christos Zoulas , +and this manual was written by +.An Luke Mewburn , with some sections inspired by .Xr tcsh 1 . Modified: vendor/NetBSD/libedit/dist/el.c ============================================================================== --- vendor/NetBSD/libedit/dist/el.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/el.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: el.c,v 1.71 2012/09/11 11:58:53 christos Exp $ */ +/* $NetBSD: el.c,v 1.73 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94"; #else -__RCSID("$NetBSD: el.c,v 1.71 2012/09/11 11:58:53 christos Exp $"); +__RCSID("$NetBSD: el.c,v 1.73 2014/06/18 18:12:28 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -60,6 +60,14 @@ __RCSID("$NetBSD: el.c,v 1.71 2012/09/11 public EditLine * el_init(const char *prog, FILE *fin, FILE *fout, FILE *ferr) { + return el_init_fd(prog, fin, fout, ferr, fileno(fin), fileno(fout), + fileno(ferr)); +} + +public EditLine * +el_init_fd(const char *prog, FILE *fin, FILE *fout, FILE *ferr, + int fdin, int fdout, int fderr) +{ EditLine *el = el_malloc(sizeof(*el)); if (el == NULL) @@ -71,9 +79,9 @@ el_init(const char *prog, FILE *fin, FIL el->el_outfile = fout; el->el_errfile = ferr; - el->el_infd = fileno(fin); - el->el_outfd = fileno(fout); - el->el_errfd = fileno(ferr); + el->el_infd = fdin; + el->el_outfd = fdout; + el->el_errfd = fderr; el->el_prog = Strdup(ct_decode_string(prog, &el->el_scratch)); if (el->el_prog == NULL) { @@ -186,6 +194,13 @@ FUN(el,set)(EditLine *el, int op, ...) break; } + case EL_ALIAS_TEXT: { + el_afunc_t p = va_arg(ap, el_afunc_t); + void *arg = va_arg(ap, void *); + rv = ch_aliasfun(el, p, arg); + break; + } + case EL_PROMPT_ESC: case EL_RPROMPT_ESC: { el_pfunc_t p = va_arg(ap, el_pfunc_t); Modified: vendor/NetBSD/libedit/dist/eln.c ============================================================================== --- vendor/NetBSD/libedit/dist/eln.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/eln.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: eln.c,v 1.14 2012/03/11 21:15:25 christos Exp $ */ +/* $NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: eln.c,v 1.14 2012/03/11 21:15:25 christos Exp $"); +__RCSID("$NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $"); #endif /* not lint && not SCCSID */ #include "histedit.h" @@ -125,6 +125,22 @@ el_set(EditLine *el, int op, ...) break; } + case EL_ALIAS_TEXT: { + el_afunc_t p = va_arg(ap, el_afunc_t); + void *arg = va_arg(ap, void *); + ret = ch_aliasfun(el, p, arg); + break; + } + + case EL_PROMPT_ESC: + case EL_RPROMPT_ESC: { + el_pfunc_t p = va_arg(ap, el_pfunc_t); + int c = va_arg(ap, int); + + ret = prompt_set(el, p, c, op, 0); + break; + } + case EL_TERMINAL: /* const char * */ ret = el_wset(el, op, va_arg(ap, char *)); break; @@ -149,10 +165,10 @@ el_set(EditLine *el, int op, ...) const char *argv[20]; int i; const wchar_t **wargv; - for (i = 1; i < (int)__arraycount(argv); ++i) - if ((argv[i] = va_arg(ap, char *)) == NULL) + for (i = 1; i < (int)__arraycount(argv) - 1; ++i) + if ((argv[i] = va_arg(ap, const char *)) == NULL) break; - argv[0] = NULL; + argv[0] = argv[i] = NULL; wargv = (const wchar_t **) ct_decode_argv(i + 1, argv, &el->el_lgcyconv); if (!wargv) { @@ -220,27 +236,31 @@ el_set(EditLine *el, int op, ...) el->el_flags |= NARROW_HISTORY; break; } + /* XXX: do we need to change el_rfunc_t? */ case EL_GETCFN: /* el_rfunc_t */ ret = el_wset(el, op, va_arg(ap, el_rfunc_t)); el->el_flags |= NARROW_READ; break; + case EL_CLIENTDATA: /* void * */ ret = el_wset(el, op, va_arg(ap, void *)); break; + case EL_SETFP: { /* int, FILE * */ int what = va_arg(ap, int); FILE *fp = va_arg(ap, FILE *); ret = el_wset(el, op, what, fp); break; } - case EL_PROMPT_ESC: /* el_pfunc_t, char */ - case EL_RPROMPT_ESC: { - el_pfunc_t p = va_arg(ap, el_pfunc_t); - char c = (char)va_arg(ap, int); - ret = prompt_set(el, p, c, op, 0); + + case EL_REFRESH: + re_clear_display(el); + re_refresh(el); + terminal__flush(el); + ret = 0; break; - } + default: ret = -1; break; Modified: vendor/NetBSD/libedit/dist/filecomplete.c ============================================================================== --- vendor/NetBSD/libedit/dist/filecomplete.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/filecomplete.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: filecomplete.c,v 1.31 2011/09/16 16:13:16 plunky Exp $ */ +/* $NetBSD: filecomplete.c,v 1.34 2014/10/18 15:07:02 riz Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: filecomplete.c,v 1.31 2011/09/16 16:13:16 plunky Exp $"); +__RCSID("$NetBSD: filecomplete.c,v 1.34 2014/10/18 15:07:02 riz Exp $"); #endif /* not lint && not SCCSID */ #include @@ -64,7 +64,7 @@ static const Char break_chars[] = { ' ', * if ``user'' isn't valid user name or ``txt'' doesn't start * w/ '~', returns pointer to strdup()ed copy of ``txt'' * - * it's callers's responsibility to free() returned string + * it's the caller's responsibility to free() the returned string */ char * fn_tilde_expand(const char *txt) @@ -137,7 +137,7 @@ fn_tilde_expand(const char *txt) * such file can be found * value of ``state'' is ignored * - * it's caller's responsibility to free returned string + * it's the caller's responsibility to free the returned string */ char * fn_filename_completion_function(const char *text, int state) @@ -490,7 +490,8 @@ fn_complete(EditLine *el, if (what_to_do == '?') goto display_matches; - if (matches[2] == NULL && strcmp(matches[0], matches[1]) == 0) { + if (matches[2] == NULL && + (matches[1] == NULL || strcmp(matches[0], matches[1]) == 0)) { /* * We found exact match. Add a space after * it, unless we do filename completion and the Modified: vendor/NetBSD/libedit/dist/hist.h ============================================================================== --- vendor/NetBSD/libedit/dist/hist.h Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/hist.h Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: hist.h,v 1.13 2011/07/28 20:50:55 christos Exp $ */ +/* $NetBSD: hist.h,v 1.14 2014/05/11 01:05:17 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -73,6 +73,7 @@ typedef struct el_history_t { #define HIST_SET(el, num) HIST_FUN(el, H_SET, num) #define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname) #define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname) +#define HIST_SAVE_FP(el, fp) HIST_FUN(el, H_SAVE_FP fp) protected int hist_init(EditLine *); protected void hist_end(EditLine *); Modified: vendor/NetBSD/libedit/dist/histedit.h ============================================================================== --- vendor/NetBSD/libedit/dist/histedit.h Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/histedit.h Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: histedit.h,v 1.49 2012/05/31 13:16:39 christos Exp $ */ +/* $NetBSD: histedit.h,v 1.53 2014/06/18 18:12:28 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -84,6 +84,8 @@ typedef struct lineinfo { * Initialization, cleanup, and resetting */ EditLine *el_init(const char *, FILE *, FILE *, FILE *); +EditLine *el_init_fd(const char *, FILE *, FILE *, FILE *, + int, int, int); void el_end(EditLine *); void el_reset(EditLine *); @@ -154,6 +156,7 @@ unsigned char _el_fn_complete(EditLine * #define EL_PROMPT_ESC 21 /* , prompt_func, Char); set/get */ #define EL_RPROMPT_ESC 22 /* , prompt_func, Char); set/get */ #define EL_RESIZE 23 /* , el_zfunc_t, void *); set */ +#define EL_ALIAS_TEXT 24 /* , el_afunc_t, void *); set */ #define EL_BUILTIN_GETCFN (NULL) @@ -222,6 +225,7 @@ int history(History *, HistEvent *, int #define H_NEXT_EVDATA 23 /* , const int, histdata_t *); */ #define H_DELDATA 24 /* , int, histdata_t *);*/ #define H_REPLACE 25 /* , const char *, histdata_t); */ +#define H_SAVE_FP 26 /* , FILE *); */ @@ -277,6 +281,7 @@ int el_wparse(EditLine *, int, const w int el_wset(EditLine *, int, ...); int el_wget(EditLine *, int, ...); +int el_cursor(EditLine *, int); const LineInfoW *el_wline(EditLine *); int el_winsertstr(EditLine *, const wchar_t *); #define el_wdeletestr el_deletestr Modified: vendor/NetBSD/libedit/dist/history.c ============================================================================== --- vendor/NetBSD/libedit/dist/history.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/history.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: history.c,v 1.46 2011/11/18 20:39:18 christos Exp $ */ +/* $NetBSD: history.c,v 1.47 2014/05/11 01:05:17 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: history.c,v 1.46 2011/11/18 20:39:18 christos Exp $"); +__RCSID("$NetBSD: history.c,v 1.47 2014/05/11 01:05:17 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -105,6 +105,7 @@ private int history_getunique(TYPE(Histo private int history_set_fun(TYPE(History) *, TYPE(History) *); private int history_load(TYPE(History) *, const char *); private int history_save(TYPE(History) *, const char *); +private int history_save_fp(TYPE(History) *, FILE *); private int history_prev_event(TYPE(History) *, TYPE(HistEvent) *, int); private int history_next_event(TYPE(History) *, TYPE(HistEvent) *, int); private int history_next_string(TYPE(History) *, TYPE(HistEvent) *, const Char *); @@ -784,13 +785,12 @@ done: } -/* history_save(): +/* history_save_fp(): * TYPE(History) save function */ private int -history_save(TYPE(History) *h, const char *fname) +history_save_fp(TYPE(History) *h, FILE *fp) { - FILE *fp; TYPE(HistEvent) ev; int i = -1, retval; size_t len, max_size; @@ -800,9 +800,6 @@ history_save(TYPE(History) *h, const cha static ct_buffer_t conv; #endif - if ((fp = fopen(fname, "w")) == NULL) - return -1; - if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) goto done; if (fputs(hist_cookie, fp) == EOF) @@ -831,11 +828,29 @@ history_save(TYPE(History) *h, const cha oomem: h_free(ptr); done: - (void) fclose(fp); return i; } +/* history_save(): + * History save function + */ +private int +history_save(TYPE(History) *h, const char *fname) +{ + FILE *fp; + int i; + + if ((fp = fopen(fname, "w")) == NULL) + return -1; + + i = history_save_fp(h, fp); + + (void) fclose(fp); + return i; +} + + /* history_prev_event(): * Find the previous event, with number given */ @@ -1016,6 +1031,12 @@ FUNW(history)(TYPE(History) *h, TYPE(His he_seterrev(ev, _HE_HIST_WRITE); break; + case H_SAVE_FP: + retval = history_save_fp(h, va_arg(va, FILE *)); + if (retval == -1) + he_seterrev(ev, _HE_HIST_WRITE); + break; + case H_PREV_EVENT: retval = history_prev_event(h, ev, va_arg(va, int)); break; Modified: vendor/NetBSD/libedit/dist/map.c ============================================================================== --- vendor/NetBSD/libedit/dist/map.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/map.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: map.c,v 1.31 2011/11/18 20:39:18 christos Exp $ */ +/* $NetBSD: map.c,v 1.34 2014/07/06 18:15:34 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: map.c,v 1.31 2011/11/18 20:39:18 christos Exp $"); +__RCSID("$NetBSD: map.c,v 1.34 2014/07/06 18:15:34 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -1249,7 +1249,7 @@ map_bind(EditLine *el, int argc, const C Char inbuf[EL_BUFSIZ]; Char outbuf[EL_BUFSIZ]; const Char *in = NULL; - Char *out = NULL; + Char *out; el_bindings_t *bp, *ep; int cmd; int key; @@ -1368,7 +1368,7 @@ map_bind(EditLine *el, int argc, const C return -1; } if (key) - terminal_set_arrow(el, in, keymacro_map_str(el, out), ntype); + terminal_set_arrow(el, in, keymacro_map_cmd(el, cmd), ntype); else { if (in[1]) { keymacro_add(el, in, keymacro_map_cmd(el, cmd), ntype); @@ -1396,7 +1396,7 @@ protected int map_addfunc(EditLine *el, const Char *name, const Char *help, el_func_t func) { void *p; - size_t nf = (size_t)el->el_map.nfunc + 1; + size_t nf = el->el_map.nfunc + 1; if (name == NULL || help == NULL || func == NULL) return -1; Modified: vendor/NetBSD/libedit/dist/map.h ============================================================================== --- vendor/NetBSD/libedit/dist/map.h Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/map.h Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: map.h,v 1.9 2009/12/30 22:37:40 christos Exp $ */ +/* $NetBSD: map.h,v 1.10 2014/07/06 18:15:34 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -57,7 +57,7 @@ typedef struct el_map_t { int type; /* Emacs or vi */ el_bindings_t *help; /* The help for the editor functions */ el_func_t *func; /* List of available functions */ - int nfunc; /* The number of functions/help items */ + size_t nfunc; /* The number of functions/help items */ } el_map_t; #define MAP_EMACS 0 Modified: vendor/NetBSD/libedit/dist/parse.c ============================================================================== --- vendor/NetBSD/libedit/dist/parse.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/parse.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.26 2011/08/16 16:25:15 christos Exp $ */ +/* $NetBSD: parse.c,v 1.27 2014/07/06 18:15:34 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: parse.c,v 1.26 2011/08/16 16:25:15 christos Exp $"); +__RCSID("$NetBSD: parse.c,v 1.27 2014/07/06 18:15:34 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -276,10 +276,11 @@ parse__string(Char *out, const Char *in) protected int parse_cmd(EditLine *el, const Char *cmd) { - el_bindings_t *b; + el_bindings_t *b = el->el_map.help; + size_t i; - for (b = el->el_map.help; b->name != NULL; b++) - if (Strcmp(b->name, cmd) == 0) - return b->func; + for (i = 0; i < el->el_map.nfunc; i++) + if (Strcmp(b[i].name, cmd) == 0) + return b[i].func; return -1; } Modified: vendor/NetBSD/libedit/dist/read.c ============================================================================== --- vendor/NetBSD/libedit/dist/read.c Mon Jan 12 21:28:10 2015 (r277089) +++ vendor/NetBSD/libedit/dist/read.c Mon Jan 12 21:33:35 2015 (r277090) @@ -1,4 +1,4 @@ -/* $NetBSD: read.c,v 1.69 2012/09/11 12:31:08 christos Exp $ */ +/* $NetBSD: read.c,v 1.71 2014/07/06 18:15:34 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: read.c,v 1.69 2012/09/11 12:31:08 christos Exp $"); +__RCSID("$NetBSD: read.c,v 1.71 2014/07/06 18:15:34 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -341,6 +341,13 @@ read_char(EditLine *el, Char *cp) } } + /* Test for EOF */ + if (num_read == 0) { + errno = 0; + *cp = '\0'; + return 0; + } + #ifdef WIDECHAR if (el->el_flags & CHARSET_IS_UTF8) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 21:34:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C2BA4E0; Mon, 12 Jan 2015 21:34:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75B74D4; Mon, 12 Jan 2015 21:34:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CLYXnP049508; Mon, 12 Jan 2015 21:34:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CLYWiS049503; Mon, 12 Jan 2015 21:34:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501122134.t0CLYWiS049503@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Jan 2015 21:34:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277091 - in vendor/NetBSD/libedit/2014-01-07: . TEST readline X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:34:33 -0000 Author: bapt Date: Mon Jan 12 21:34:31 2015 New Revision: 277091 URL: https://svnweb.freebsd.org/changeset/base/277091 Log: Tag import of libedit 2014-01-07 Added: vendor/NetBSD/libedit/2014-01-07/ - copied from r275568, vendor/NetBSD/libedit/dist/ Replaced: vendor/NetBSD/libedit/2014-01-07/Makefile - copied unchanged from r277090, vendor/NetBSD/libedit/dist/Makefile vendor/NetBSD/libedit/2014-01-07/TEST/tc1.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/TEST/tc1.c vendor/NetBSD/libedit/2014-01-07/TEST/wtc1.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/TEST/wtc1.c vendor/NetBSD/libedit/2014-01-07/chared.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/chared.c vendor/NetBSD/libedit/2014-01-07/chared.h - copied unchanged from r277090, vendor/NetBSD/libedit/dist/chared.h vendor/NetBSD/libedit/2014-01-07/editline.3 - copied unchanged from r277090, vendor/NetBSD/libedit/dist/editline.3 vendor/NetBSD/libedit/2014-01-07/editrc.5 - copied unchanged from r277090, vendor/NetBSD/libedit/dist/editrc.5 vendor/NetBSD/libedit/2014-01-07/el.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/el.c vendor/NetBSD/libedit/2014-01-07/eln.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/eln.c vendor/NetBSD/libedit/2014-01-07/filecomplete.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/filecomplete.c vendor/NetBSD/libedit/2014-01-07/hist.h - copied unchanged from r277090, vendor/NetBSD/libedit/dist/hist.h vendor/NetBSD/libedit/2014-01-07/histedit.h - copied unchanged from r277090, vendor/NetBSD/libedit/dist/histedit.h vendor/NetBSD/libedit/2014-01-07/history.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/history.c vendor/NetBSD/libedit/2014-01-07/map.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/map.c vendor/NetBSD/libedit/2014-01-07/map.h - copied unchanged from r277090, vendor/NetBSD/libedit/dist/map.h vendor/NetBSD/libedit/2014-01-07/parse.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/parse.c vendor/NetBSD/libedit/2014-01-07/read.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/read.c vendor/NetBSD/libedit/2014-01-07/readline.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/readline.c vendor/NetBSD/libedit/2014-01-07/readline/readline.h - copied unchanged from r277090, vendor/NetBSD/libedit/dist/readline/readline.h vendor/NetBSD/libedit/2014-01-07/shlib_version - copied unchanged from r277090, vendor/NetBSD/libedit/dist/shlib_version vendor/NetBSD/libedit/2014-01-07/tty.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/tty.c vendor/NetBSD/libedit/2014-01-07/tty.h - copied unchanged from r277090, vendor/NetBSD/libedit/dist/tty.h vendor/NetBSD/libedit/2014-01-07/vi.c - copied unchanged from r277090, vendor/NetBSD/libedit/dist/vi.c Copied: vendor/NetBSD/libedit/2014-01-07/Makefile (from r277090, vendor/NetBSD/libedit/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2014-01-07/Makefile Mon Jan 12 21:34:31 2015 (r277091, copy of r277090, vendor/NetBSD/libedit/dist/Makefile) @@ -0,0 +1,134 @@ +# $NetBSD: Makefile,v 1.52 2014/06/14 20:49:37 mrg Exp $ +# @(#)Makefile 8.1 (Berkeley) 6/4/93 + +USE_SHLIBDIR= yes + +WIDECHAR ?= yes +WARNS?= 5 +LIB= edit + +LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo + +.include "bsd.own.mk" + +COPTS+= -Wunused-parameter +CWARNFLAGS.gcc+= -Wconversion + +OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ + hist.c keymacro.c map.c chartype.c \ + parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c + +MAN= editline.3 editrc.5 + +MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \ + editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \ + editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_get.3 \ + editline.3 el_source.3 editline.3 el_resize.3 editline.3 el_line.3 \ + editline.3 el_insertstr.3 editline.3 el_deletestr.3 \ + editline.3 history_init.3 editline.3 history_end.3 \ + editline.3 history.3 \ + editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \ + editline.3 tok_line.3 editline.3 tok_str.3 + +# For speed and debugging +#SRCS= ${OSRCS} readline.c tokenizer.c history.c +# For protection +SRCS= editline.c readline.c tokenizer.c history.c + +.if ${WIDECHAR} == "yes" +OSRCS += eln.c +SRCS += tokenizern.c historyn.c +CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c +CPPFLAGS+=-DWIDECHAR +.endif + +LIBEDITDIR?=${.CURDIR} + +INCS= histedit.h +INCSDIR=/usr/include + +CLEANFILES+=editline.c +CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp +CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1 +CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c +CPPFLAGS+=-I. -I${LIBEDITDIR} +CPPFLAGS+=-I. -I${.CURDIR} +CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH +CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT + +AHDR=vi.h emacs.h common.h +ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c + +DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c +CLEANFILES+= ${AHDR} fcns.h help.h fcns.c help.c + +SUBDIR= readline + +vi.h: vi.c makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +emacs.h: emacs.c makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +common.h: common.c makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +fcns.h: ${AHDR} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +fcns.c: ${AHDR} fcns.h help.h makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +help.c: ${ASRC} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +help.h: ${ASRC} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +editline.c: ${OSRCS} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +tokenizern.c: makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -n tokenizer.c > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +historyn.c: makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -n history.c > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +tc1.o: ${LIBEDITDIR}/TEST/tc1.c + +tc1: libedit.a tc1.o + ${_MKTARGET_LINK} + ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib + +.include +.include + +# XXX +.if defined(HAVE_GCC) +COPTS.editline.c+= -Wno-cast-qual +COPTS.tokenizer.c+= -Wno-cast-qual +COPTS.tokenizern.c+= -Wno-cast-qual +.endif Copied: vendor/NetBSD/libedit/2014-01-07/TEST/tc1.c (from r277090, vendor/NetBSD/libedit/dist/TEST/tc1.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2014-01-07/TEST/tc1.c Mon Jan 12 21:34:31 2015 (r277091, copy of r277090, vendor/NetBSD/libedit/dist/TEST/tc1.c) @@ -0,0 +1,304 @@ +/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ + +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Christos Zoulas of Cornell University. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "config.h" +#ifndef lint +__COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\ + The Regents of the University of California. All rights reserved.\n"); +#endif /* not lint */ + +#if !defined(lint) && !defined(SCCSID) +#if 0 +static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); +#endif +#endif /* not lint && not SCCSID */ + +/* + * test.c: A little test program + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "histedit.h" + +static int continuation = 0; +volatile sig_atomic_t gotsig = 0; + +static unsigned char complete(EditLine *, int); + int main(int, char **); +static char *prompt(EditLine *); +static void sig(int); + +static char * +prompt(EditLine *el) +{ + static char a[] = "\1\033[7m\1Edit$\1\033[0m\1 "; + static char b[] = "Edit> "; + + return (continuation ? b : a); +} + +static void +sig(int i) +{ + gotsig = i; +} + +static unsigned char +complete(EditLine *el, int ch) +{ + DIR *dd = opendir("."); + struct dirent *dp; + const char* ptr; + const LineInfo *lf = el_line(el); + int len; + int res = CC_ERROR; + + /* + * Find the last word + */ + for (ptr = lf->cursor - 1; + !isspace((unsigned char)*ptr) && ptr > lf->buffer; ptr--) + continue; + len = lf->cursor - ++ptr; + + for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) { + if (len > strlen(dp->d_name)) + continue; + if (strncmp(dp->d_name, ptr, len) == 0) { + if (el_insertstr(el, &dp->d_name[len]) == -1) + res = CC_ERROR; + else + res = CC_REFRESH; + break; + } + } + + closedir(dd); + return res; +} + +int +main(int argc, char *argv[]) +{ + EditLine *el = NULL; + int num; + const char *buf; + Tokenizer *tok; +#if 0 + int lastevent = 0; +#endif + int ncontinuation; + History *hist; + HistEvent ev; + + (void) setlocale(LC_CTYPE, ""); + (void) signal(SIGINT, sig); + (void) signal(SIGQUIT, sig); + (void) signal(SIGHUP, sig); + (void) signal(SIGTERM, sig); + + hist = history_init(); /* Init the builtin history */ + /* Remember 100 events */ + history(hist, &ev, H_SETSIZE, 100); + + tok = tok_init(NULL); /* Initialize the tokenizer */ + + /* Initialize editline */ + el = el_init(*argv, stdin, stdout, stderr); + + el_set(el, EL_EDITOR, "vi"); /* Default editor is vi */ + el_set(el, EL_SIGNAL, 1); /* Handle signals gracefully */ + el_set(el, EL_PROMPT_ESC, prompt, '\1');/* Set the prompt function */ + + /* Tell editline to use this history interface */ + el_set(el, EL_HIST, history, hist); + + /* Add a user-defined function */ + el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete); + + /* Bind tab to it */ + el_set(el, EL_BIND, "^I", "ed-complete", NULL); + + /* + * Bind j, k in vi command mode to previous and next line, instead + * of previous and next history. + */ + el_set(el, EL_BIND, "-a", "k", "ed-prev-line", NULL); + el_set(el, EL_BIND, "-a", "j", "ed-next-line", NULL); + + /* + * Source the user's defaults file. + */ + el_source(el, NULL); + + while ((buf = el_gets(el, &num)) != NULL && num != 0) { + int ac, cc, co; +#ifdef DEBUG + int i; +#endif + const char **av; + const LineInfo *li; + li = el_line(el); +#ifdef DEBUG + (void) fprintf(stderr, "==> got %d %s", num, buf); + (void) fprintf(stderr, " > li `%.*s_%.*s'\n", + (li->cursor - li->buffer), li->buffer, + (li->lastchar - 1 - li->cursor), + (li->cursor >= li->lastchar) ? "" : li->cursor); + +#endif + if (gotsig) { + (void) fprintf(stderr, "Got signal %d.\n", (int)gotsig); + gotsig = 0; + el_reset(el); + } + + if (!continuation && num == 1) + continue; + + ac = cc = co = 0; + ncontinuation = tok_line(tok, li, &ac, &av, &cc, &co); + if (ncontinuation < 0) { + (void) fprintf(stderr, "Internal error\n"); + continuation = 0; + continue; + } +#ifdef DEBUG + (void) fprintf(stderr, " > nc %d ac %d cc %d co %d\n", + ncontinuation, ac, cc, co); +#endif +#if 0 + if (continuation) { + /* + * Append to the right event in case the user + * moved around in history. + */ + if (history(hist, &ev, H_SET, lastevent) == -1) + err(1, "%d: %s", lastevent, ev.str); + history(hist, &ev, H_ADD , buf); + } else { + history(hist, &ev, H_ENTER, buf); + lastevent = ev.num; + } +#else + /* Simpler */ + history(hist, &ev, continuation ? H_APPEND : H_ENTER, buf); +#endif + + continuation = ncontinuation; + ncontinuation = 0; + if (continuation) + continue; +#ifdef DEBUG + for (i = 0; i < ac; i++) { + (void) fprintf(stderr, " > arg# %2d ", i); + if (i != cc) + (void) fprintf(stderr, "`%s'\n", av[i]); + else + (void) fprintf(stderr, "`%.*s_%s'\n", + co, av[i], av[i] + co); + } +#endif + + if (strcmp(av[0], "history") == 0) { + int rv; + + switch (ac) { + case 1: + for (rv = history(hist, &ev, H_LAST); rv != -1; + rv = history(hist, &ev, H_PREV)) + (void) fprintf(stdout, "%4d %s", + ev.num, ev.str); + break; + + case 2: + if (strcmp(av[1], "clear") == 0) + history(hist, &ev, H_CLEAR); + else + goto badhist; + break; + + case 3: + if (strcmp(av[1], "load") == 0) + history(hist, &ev, H_LOAD, av[2]); + else if (strcmp(av[1], "save") == 0) + history(hist, &ev, H_SAVE, av[2]); + break; + + badhist: + default: + (void) fprintf(stderr, + "Bad history arguments\n"); + break; + } + } else if (el_parse(el, ac, av) == -1) { + switch (fork()) { + case 0: + execvp(av[0], (char *const *)__UNCONST(av)); + perror(av[0]); + _exit(1); + /*NOTREACHED*/ + break; + + case -1: + perror("fork"); + break; + + default: + if (wait(&num) == -1) + perror("wait"); + (void) fprintf(stderr, "Exit %x\n", num); + break; + } + } + + tok_reset(tok); + } + + el_end(el); + tok_end(tok); + history_end(hist); + + return (0); +} Copied: vendor/NetBSD/libedit/2014-01-07/TEST/wtc1.c (from r277090, vendor/NetBSD/libedit/dist/TEST/wtc1.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2014-01-07/TEST/wtc1.c Mon Jan 12 21:34:31 2015 (r277091, copy of r277090, vendor/NetBSD/libedit/dist/TEST/wtc1.c) @@ -0,0 +1,278 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../histedit.h" + + +static int continuation; +volatile sig_atomic_t gotsig; +static const char hfile[] = ".whistory"; + +static wchar_t * +prompt(EditLine *el) +{ + static wchar_t a[] = L"\1\033[7m\1Edit$\1\033[0m\1 "; + static wchar_t b[] = L"Edit> "; + + return continuation ? b : a; +} + + +static void +sig(int i) +{ + gotsig = i; +} + +const char * +my_wcstombs(const wchar_t *wstr) +{ + static struct { + char *str; + int len; + } buf; + + int needed = wcstombs(0, wstr, 0) + 1; + if (needed > buf.len) { + buf.str = malloc(needed); + buf.len = needed; + } + wcstombs(buf.str, wstr, needed); + buf.str[needed - 1] = 0; + + return buf.str; +} + + +static unsigned char +complete(EditLine *el, int ch) +{ + DIR *dd = opendir("."); + struct dirent *dp; + const wchar_t *ptr; + char *buf, *bptr; + const LineInfoW *lf = el_wline(el); + int len, mblen, i; + unsigned char res = 0; + wchar_t dir[1024]; + + /* Find the last word */ + for (ptr = lf->cursor -1; !iswspace(*ptr) && ptr > lf->buffer; --ptr) + continue; + len = lf->cursor - ++ptr; + + /* Convert last word to multibyte encoding, so we can compare to it */ + wctomb(NULL, 0); /* Reset shift state */ + mblen = MB_LEN_MAX * len + 1; + buf = bptr = malloc(mblen); + if (buf == NULL) + err(1, "malloc"); + for (i = 0; i < len; ++i) { + /* Note: really should test for -1 return from wctomb */ + bptr += wctomb(bptr, ptr[i]); + } + *bptr = 0; /* Terminate multibyte string */ + mblen = bptr - buf; + + /* Scan directory for matching name */ + for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) { + if (mblen > strlen(dp->d_name)) + continue; + if (strncmp(dp->d_name, buf, mblen) == 0) { + mbstowcs(dir, &dp->d_name[mblen], + sizeof(dir) / sizeof(*dir)); + if (el_winsertstr(el, dir) == -1) + res = CC_ERROR; + else + res = CC_REFRESH; + break; + } + } + + closedir(dd); + free(buf); + return res; +} + + +int +main(int argc, char *argv[]) +{ + EditLine *el = NULL; + int numc, ncontinuation; + const wchar_t *line; + TokenizerW *tok; + HistoryW *hist; + HistEventW ev; +#ifdef DEBUG + int i; +#endif + + setlocale(LC_ALL, ""); + + (void)signal(SIGINT, sig); + (void)signal(SIGQUIT, sig); + (void)signal(SIGHUP, sig); + (void)signal(SIGTERM, sig); + + hist = history_winit(); /* Init built-in history */ + history_w(hist, &ev, H_SETSIZE, 100); /* Remember 100 events */ + history_w(hist, &ev, H_LOAD, hfile); + + tok = tok_winit(NULL); /* Init the tokenizer */ + + el = el_init(argv[0], stdin, stdout, stderr); + + el_wset(el, EL_EDITOR, L"vi"); /* Default editor is vi */ + el_wset(el, EL_SIGNAL, 1); /* Handle signals gracefully */ + el_wset(el, EL_PROMPT_ESC, prompt, '\1'); /* Set the prompt function */ + + el_wset(el, EL_HIST, history_w, hist); /* FIXME - history_w? */ + + /* Add a user-defined function */ + el_wset(el, EL_ADDFN, L"ed-complete", L"Complete argument", complete); + + /* Bind to it */ + el_wset(el, EL_BIND, L"^I", L"ed-complete", NULL); + + /* + * Bind j, k in vi command mode to previous and next line, instead + * of previous and next history. + */ + el_wset(el, EL_BIND, L"-a", L"k", L"ed-prev-line", NULL); + el_wset(el, EL_BIND, L"-a", L"j", L"ed-next-line", NULL); + + /* Source the user's defaults file. */ + el_source(el, NULL); + + while((line = el_wgets(el, &numc)) != NULL && numc != 0) { + int ac, cc, co, rc; + const wchar_t **av; + + const LineInfoW *li; + li = el_wline(el); + +#ifdef DEBUG + (void)fwprintf(stderr, L"==> got %d %ls", numc, line); + (void)fwprintf(stderr, L" > li `%.*ls_%.*ls'\n", + (li->cursor - li->buffer), li->buffer, + (li->lastchar - 1 - li->cursor), + (li->cursor >= li->lastchar) ? L"" : li->cursor); +#endif + + if (gotsig) { + (void)fprintf(stderr, "Got signal %d.\n", (int)gotsig); + gotsig = 0; + el_reset(el); + } + + if(!continuation && numc == 1) + continue; /* Only got a linefeed */ + + ac = cc = co = 0; + ncontinuation = tok_wline(tok, li, &ac, &av, &cc, &co); + if (ncontinuation < 0) { + (void) fprintf(stderr, "Internal error\n"); + continuation = 0; + continue; + } + +#ifdef DEBUG + (void)fprintf(stderr, " > nc %d ac %d cc %d co %d\n", + ncontinuation, ac, cc, co); +#endif + history_w(hist, &ev, continuation ? H_APPEND : H_ENTER, line); + + continuation = ncontinuation; + ncontinuation = 0; + if(continuation) + continue; + +#ifdef DEBUG + for (i = 0; i < ac; ++i) { + (void)fwprintf(stderr, L" > arg# %2d ", i); + if (i != cc) + (void)fwprintf(stderr, L"`%ls'\n", av[i]); + else + (void)fwprintf(stderr, L"`%.*ls_%ls'\n", + co, av[i], av[i] + co); + } +#endif + + if (wcscmp (av[0], L"history") == 0) { + switch(ac) { + case 1: + for(rc = history_w(hist, &ev, H_LAST); + rc != -1; + rc = history_w(hist, &ev, H_PREV)) + (void)fwprintf(stdout, L"%4d %ls", + ev.num, ev.str); + break; + case 2: + if (wcscmp(av[1], L"clear") == 0) + history_w(hist, &ev, H_CLEAR); + else + goto badhist; + break; + case 3: + if (wcscmp(av[1], L"load") == 0) + history_w(hist, &ev, H_LOAD, + my_wcstombs(av[2])); + else if (wcscmp(av[1], L"save") == 0) + history_w(hist, &ev, H_SAVE, + my_wcstombs(av[2])); + else + goto badhist; + break; + badhist: + default: + (void)fprintf(stderr, + "Bad history arguments\n"); + break; + } + } else if (el_wparse(el, ac, av) == -1) { + switch (fork()) { + case 0: { + Tokenizer *ntok = tok_init(NULL); + int nargc; + const char **nav; + tok_str(ntok, my_wcstombs(line), &nargc, &nav); + execvp(nav[0],(char **)nav); + perror(nav[0]); + _exit(1); + /* NOTREACHED */ + break; + } + case -1: + perror("fork"); + break; + default: + if (wait(&rc) == -1) + perror("wait"); + (void)fprintf(stderr, "Exit %x\n", rc); + break; + } + } + + tok_wreset(tok); + } + + el_end(el); + tok_wend(tok); + history_w(hist, &ev, H_SAVE, hfile); + history_wend(hist); + + fprintf(stdout, "\n"); + return 0; +} + + Copied: vendor/NetBSD/libedit/2014-01-07/chared.c (from r277090, vendor/NetBSD/libedit/dist/chared.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2014-01-07/chared.c Mon Jan 12 21:34:31 2015 (r277091, copy of r277090, vendor/NetBSD/libedit/dist/chared.c) @@ -0,0 +1,769 @@ +/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ + +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Christos Zoulas of Cornell University. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "config.h" +#if !defined(lint) && !defined(SCCSID) +#if 0 +static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); +#endif +#endif /* not lint && not SCCSID */ + +/* + * chared.c: Character editor utilities + */ +#include +#include "el.h" + +private void ch__clearmacro (EditLine *); + +/* value to leave unused in line buffer */ +#define EL_LEAVE 2 + +/* cv_undo(): + * Handle state for the vi undo command + */ +protected void +cv_undo(EditLine *el) +{ + c_undo_t *vu = &el->el_chared.c_undo; + c_redo_t *r = &el->el_chared.c_redo; + size_t size; + + /* Save entire line for undo */ + size = (size_t)(el->el_line.lastchar - el->el_line.buffer); + vu->len = (ssize_t)size; + vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); + (void)memcpy(vu->buf, el->el_line.buffer, size * sizeof(*vu->buf)); + + /* save command info for redo */ + r->count = el->el_state.doingarg ? el->el_state.argument : 0; + r->action = el->el_chared.c_vcmd.action; + r->pos = r->buf; + r->cmd = el->el_state.thiscmd; + r->ch = el->el_state.thisch; +} + +/* cv_yank(): + * Save yank/delete data for paste + */ +protected void +cv_yank(EditLine *el, const Char *ptr, int size) +{ + c_kill_t *k = &el->el_chared.c_kill; + + (void)memcpy(k->buf, ptr, (size_t)size * sizeof(*k->buf)); + k->last = k->buf + size; +} + + +/* c_insert(): + * Insert num characters + */ +protected void +c_insert(EditLine *el, int num) +{ + Char *cp; + + if (el->el_line.lastchar + num >= el->el_line.limit) { + if (!ch_enlargebufs(el, (size_t)num)) + return; /* can't go past end of buffer */ + } + + if (el->el_line.cursor < el->el_line.lastchar) { + /* if I must move chars */ + for (cp = el->el_line.lastchar; cp >= el->el_line.cursor; cp--) + cp[num] = *cp; + } + el->el_line.lastchar += num; +} + + +/* c_delafter(): + * Delete num characters after the cursor + */ +protected void +c_delafter(EditLine *el, int num) +{ + + if (el->el_line.cursor + num > el->el_line.lastchar) + num = (int)(el->el_line.lastchar - el->el_line.cursor); + + if (el->el_map.current != el->el_map.emacs) { + cv_undo(el); + cv_yank(el, el->el_line.cursor, num); + } + + if (num > 0) { + Char *cp; + + for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) + *cp = cp[num]; + + el->el_line.lastchar -= num; + } +} + + +/* c_delafter1(): + * Delete the character after the cursor, do not yank + */ +protected void +c_delafter1(EditLine *el) +{ + Char *cp; + + for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) + *cp = cp[1]; + + el->el_line.lastchar--; +} + + +/* c_delbefore(): + * Delete num characters before the cursor + */ +protected void +c_delbefore(EditLine *el, int num) +{ + + if (el->el_line.cursor - num < el->el_line.buffer) + num = (int)(el->el_line.cursor - el->el_line.buffer); + + if (el->el_map.current != el->el_map.emacs) { + cv_undo(el); + cv_yank(el, el->el_line.cursor - num, num); + } + + if (num > 0) { + Char *cp; + + for (cp = el->el_line.cursor - num; + cp <= el->el_line.lastchar; + cp++) + *cp = cp[num]; + + el->el_line.lastchar -= num; + } +} + + +/* c_delbefore1(): + * Delete the character before the cursor, do not yank + */ +protected void +c_delbefore1(EditLine *el) +{ + Char *cp; + + for (cp = el->el_line.cursor - 1; cp <= el->el_line.lastchar; cp++) + *cp = cp[1]; + + el->el_line.lastchar--; +} + + +/* ce__isword(): + * Return if p is part of a word according to emacs + */ +protected int +ce__isword(Int p) +{ + return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; +} + + +/* cv__isword(): + * Return if p is part of a word according to vi + */ +protected int +cv__isword(Int p) +{ + if (Isalnum(p) || p == '_') + return 1; + if (Isgraph(p)) + return 2; + return 0; +} + + +/* cv__isWord(): + * Return if p is part of a big word according to vi + */ +protected int +cv__isWord(Int p) +{ + return !Isspace(p); +} + + +/* c__prev_word(): + * Find the previous word + */ +protected Char * +c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +{ + p--; + + while (n--) { + while ((p >= low) && !(*wtest)(*p)) + p--; + while ((p >= low) && (*wtest)(*p)) + p--; + } + + /* cp now points to one character before the word */ + p++; + if (p < low) + p = low; + /* cp now points where we want it */ + return p; +} + + +/* c__next_word(): + * Find the next word + */ +protected Char * +c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) +{ + while (n--) { + while ((p < high) && !(*wtest)(*p)) + p++; + while ((p < high) && (*wtest)(*p)) + p++; + } + if (p > high) + p = high; + /* p now points where we want it */ + return p; +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 21:55:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B4A89D1; Mon, 12 Jan 2015 21:55:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C29C30F; Mon, 12 Jan 2015 21:55:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CLtoST059104; Mon, 12 Jan 2015 21:55:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CLtnmE059101; Mon, 12 Jan 2015 21:55:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501122155.t0CLtnmE059101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 21:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277092 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:55:50 -0000 Author: emaste Date: Mon Jan 12 21:55:48 2015 New Revision: 277092 URL: https://svnweb.freebsd.org/changeset/base/277092 Log: ANSIfy msdosfs Add a few cases and style(9) fixes missed in r276887 Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/msdosfs_conv.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_lookup.c Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Mon Jan 12 21:34:31 2015 (r277091) +++ head/sys/fs/msdosfs/msdosfs_conv.c Mon Jan 12 21:55:48 2015 (r277092) @@ -295,12 +295,8 @@ dos2unixfn(u_char dn[11], u_char *un, in * 3 if conversion was successful and generation number was inserted */ int -unix2dosfn(un, dn, unlen, gen, pmp) - const u_char *un; - u_char dn[12]; - size_t unlen; - u_int gen; - struct msdosfsmount *pmp; +unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen, + struct msdosfsmount *pmp) { ssize_t i, j; int l; @@ -519,13 +515,8 @@ done: * i.e. doesn't consist solely of blanks and dots */ int -unix2winfn(un, unlen, wep, cnt, chksum, pmp) - const u_char *un; - size_t unlen; - struct winentry *wep; - int cnt; - int chksum; - struct msdosfsmount *pmp; +unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt, + int chksum, struct msdosfsmount *pmp) { u_int8_t *wcp; int i, end; @@ -588,12 +579,8 @@ unix2winfn(un, unlen, wep, cnt, chksum, * Returns the checksum or -1 if no match */ int -winChkName(nbp, un, unlen, chksum, pmp) - struct mbnambuf *nbp; - const u_char *un; - size_t unlen; - int chksum; - struct msdosfsmount *pmp; +winChkName(struct mbnambuf *nbp, const u_char *un, size_t unlen, int chksum, + struct msdosfsmount *pmp) { size_t len; u_int16_t c1, c2; @@ -638,11 +625,8 @@ winChkName(nbp, un, unlen, chksum, pmp) * Returns the checksum or -1 if impossible */ int -win2unixfn(nbp, wep, chksum, pmp) - struct mbnambuf *nbp; - struct winentry *wep; - int chksum; - struct msdosfsmount *pmp; +win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum, + struct msdosfsmount *pmp) { u_char *c, tmpbuf[5]; u_int8_t *cp; @@ -745,10 +729,7 @@ winChksum(u_int8_t *name) * Determine the number of slots necessary for Win95 names */ int -winSlotCnt(un, unlen, pmp) - const u_char *un; - size_t unlen; - struct msdosfsmount *pmp; +winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp) { size_t wlen; char wn[WIN_MAXLEN * 2 + 1], *wnp; @@ -773,9 +754,7 @@ winSlotCnt(un, unlen, pmp) * Determine the number of bytes neccessary for Win95 names */ size_t -winLenFixup(un, unlen) - const u_char* un; - size_t unlen; +winLenFixup(const u_char *un, size_t unlen) { for (un += unlen; unlen > 0; unlen--) if (*--un != ' ' && *un != '.') Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Mon Jan 12 21:34:31 2015 (r277091) +++ head/sys/fs/msdosfs/msdosfs_fat.c Mon Jan 12 21:55:48 2015 (r277092) @@ -111,6 +111,7 @@ fatblock(struct msdosfsmount *pmp, u_lon * If this pointer is null then don't return this quantity. * cnp - address of where to place the filesystem relative cluster number. * If this pointer is null then don't return this quantity. + * sp - pointer to returned block size * * NOTE: Either bnp or cnp must be non-null. * This function has one side effect. If the requested file relative cluster @@ -443,7 +444,8 @@ clusterfree(struct msdosfsmount *pmp, u_ * the msdosfsmount structure. This is left to the caller. */ int -fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, u_long newcontents) +fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, + u_long newcontents) { int error; u_long readcn; Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Mon Jan 12 21:34:31 2015 (r277091) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Mon Jan 12 21:55:48 2015 (r277092) @@ -929,6 +929,9 @@ readde(struct denode *dep, struct buf ** * and will truncate the file to 0 length. When the vnode containing the * denode is needed for some other purpose by VFS it will call * msdosfs_reclaim() which will remove the denode from the denode cache. + * + * pdep directory where the entry is removed + * dep file to be removed */ int removede(struct denode *pdep, struct denode *dep) @@ -998,7 +1001,7 @@ removede(struct denode *pdep, struct den * Create a unique DOS name in dvp */ int -uniqdosname(struct denode *dep,struct componentname *cnp, u_char *cp) +uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp) { struct msdosfsmount *pmp = dep->de_pmp; struct direntry *dentp; From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 22:27:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DA021A0; Mon, 12 Jan 2015 22:27:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5909F887; Mon, 12 Jan 2015 22:27:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CMRgNC073447; Mon, 12 Jan 2015 22:27:42 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CMRdKA073432; Mon, 12 Jan 2015 22:27:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501122227.t0CMRdKA073432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 22:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277093 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 22:27:42 -0000 Author: glebius Date: Mon Jan 12 22:27:38 2015 New Revision: 277093 URL: https://svnweb.freebsd.org/changeset/base/277093 Log: In miibus(4) drivers provide functions that allow to get NIC driver name and NIC driver softc via the device(9) tree, instead of going dirty through the ifnet(9) layer. Differential Revision: D1506 Reviewed by: imp, jhb Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/ciphy.c head/sys/dev/mii/e1000phy.c head/sys/dev/mii/ip1000phy.c head/sys/dev/mii/jmphy.c head/sys/dev/mii/mii.c head/sys/dev/mii/miivar.h head/sys/dev/mii/mlphy.c head/sys/dev/mii/nsphy.c head/sys/dev/mii/rgephy.c head/sys/dev/mii/rlphy.c head/sys/dev/mii/tlphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/brgphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -198,7 +198,6 @@ brgphy_attach(device_t dev) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct mii_softc *sc; - if_t ifp; bsc = device_get_softc(dev); sc = &bsc->mii_sc; @@ -207,13 +206,12 @@ brgphy_attach(device_t dev) &brgphy_funcs, 0); bsc->serdes_flags = 0; - ifp = sc->mii_pdata->mii_ifp; /* Find the MAC driver associated with this PHY. */ - if (strcmp(if_getdname(ifp), "bge") == 0) - bge_sc = if_getsoftc(ifp); - else if (strcmp(if_getdname(ifp), "bce") == 0) - bce_sc = if_getsoftc(ifp); + if (mii_dev_mac_match(dev, "bge")) + bge_sc = mii_dev_mac_softc(dev); + else if (mii_dev_mac_match(dev, "bce")) + bce_sc = mii_dev_mac_softc(dev); /* Handle any special cases based on the PHY ID */ switch (sc->mii_mpd_oui) { @@ -933,11 +931,10 @@ brgphy_reset(struct mii_softc *sc) ifp = sc->mii_pdata->mii_ifp; /* Find the driver associated with this PHY. */ - if (strcmp(if_getdname(ifp), "bge") == 0) { - bge_sc = if_getsoftc(ifp); - } else if (strcmp(if_getdname(ifp), "bce") == 0) { - bce_sc = if_getsoftc(ifp); - } + if (mii_phy_mac_match(sc, "bge")) + bge_sc = mii_phy_mac_softc(sc); + else if (mii_phy_mac_match(sc, "bce")) + bce_sc = mii_phy_mac_softc(sc); if (bge_sc) { /* Fix up various bugs */ Modified: head/sys/dev/mii/ciphy.c ============================================================================== --- head/sys/dev/mii/ciphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/ciphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -303,8 +303,7 @@ ciphy_fixup(struct mii_softc *sc) status = PHY_READ(sc, CIPHY_MII_AUXCSR); speed = status & CIPHY_AUXCSR_SPEED; - if (strcmp(device_get_name(device_get_parent(sc->mii_dev)), - "nfe") == 0) { + if (mii_phy_mac_match(sc, "nfe")) { /* need to set for 2.5V RGMII for NVIDIA adapters */ val = PHY_READ(sc, CIPHY_MII_ECTL1); val &= ~(CIPHY_ECTL1_IOVOL | CIPHY_ECTL1_INTSEL); Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/e1000phy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -139,8 +139,7 @@ e1000phy_attach(device_t dev) mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &e1000phy_funcs, 0); ifp = sc->mii_pdata->mii_ifp; - if (strcmp(if_getdname(ifp), "msk") == 0 && - (sc->mii_flags & MIIF_MACPRIV0) != 0) + if (mii_dev_mac_match(dev, "msk") && (sc->mii_flags & MIIF_MACPRIV0) != 0) sc->mii_flags |= MIIF_PHYPRIV0; switch (sc->mii_mpd_model) { Modified: head/sys/dev/mii/ip1000phy.c ============================================================================== --- head/sys/dev/mii/ip1000phy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/ip1000phy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -110,7 +110,7 @@ ip1000phy_attach(device_t dev) ma = device_get_ivars(dev); flags = MIIF_NOISOLATE | MIIF_NOMANPAUSE; if (MII_MODEL(ma->mii_id2) == MII_MODEL_xxICPLUS_IP1000A && - strcmp(if_getdname(ma->mii_data->mii_ifp), "stge") == 0 && + mii_dev_mac_match(dev, "stge") && (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0) flags |= MIIF_PHYPRIV0; mii_phy_dev_attach(dev, flags, &ip1000phy_funcs, 1); Modified: head/sys/dev/mii/jmphy.c ============================================================================== --- head/sys/dev/mii/jmphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/jmphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -105,7 +105,7 @@ jmphy_attach(device_t dev) ma = device_get_ivars(dev); flags = 0; - if (strcmp(if_getdname(ma->mii_data->mii_ifp), "jme") == 0 && + if (mii_dev_mac_match(dev, "jme") && (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0) flags |= MIIF_PHYPRIV0; mii_phy_dev_attach(dev, flags, &jmphy_funcs, 1); Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/mii.c Mon Jan 12 22:27:38 2015 (r277093) @@ -645,3 +645,33 @@ mii_oui(u_int id1, u_int id2) (mii_bitreverse((h >> 8) & 0xff) << 8) | mii_bitreverse(h & 0xff)); } + +int +mii_phy_mac_match(struct mii_softc *mii, const char *name) +{ + + return (strcmp(device_get_name(device_get_parent(mii->mii_dev)), + name) == 0); +} + +int +mii_dev_mac_match(device_t parent, const char *name) +{ + + return (strcmp(device_get_name(device_get_parent( + device_get_parent(parent))), name) == 0); +} + +void * +mii_phy_mac_softc(struct mii_softc *mii) +{ + + return (device_get_softc(device_get_parent(mii->mii_dev))); +} + +void * +mii_dev_mac_softc(device_t parent) +{ + + return (device_get_softc(device_get_parent(device_get_parent(parent)))); +} Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/miivar.h Mon Jan 12 22:27:38 2015 (r277093) @@ -263,6 +263,10 @@ void mii_phy_reset(struct mii_softc *); void mii_phy_setmedia(struct mii_softc *sc); void mii_phy_update(struct mii_softc *, int); int mii_phy_tick(struct mii_softc *); +int mii_phy_mac_match(struct mii_softc *, const char *); +int mii_dev_mac_match(device_t, const char *); +void *mii_phy_mac_softc(struct mii_softc *); +void *mii_dev_mac_softc(device_t); const struct mii_phydesc * mii_phy_match(const struct mii_attach_args *ma, const struct mii_phydesc *mpd); Modified: head/sys/dev/mii/mlphy.c ============================================================================== --- head/sys/dev/mii/mlphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/mlphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -128,8 +128,7 @@ mlphy_probe(dev) * encountered the 6692 on an Olicom card with a ThunderLAN * controller chip. */ - if (strcmp(device_get_name(device_get_parent(device_get_parent(dev))), - "tl") != 0) + if (!mii_dev_mac_match(dev, "tl")) return (ENXIO); device_set_desc(dev, "Micro Linear 6692 media interface"); Modified: head/sys/dev/mii/nsphy.c ============================================================================== --- head/sys/dev/mii/nsphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/nsphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -129,15 +129,13 @@ nsphy_probe(device_t dev) static int nsphy_attach(device_t dev) { - const char *nic; u_int flags; - nic = device_get_name(device_get_parent(device_get_parent(dev))); flags = MIIF_NOMANPAUSE; /* * Am79C971 wedge when isolating all of their external PHYs. */ - if (strcmp(nic, "pcn") == 0) + if (mii_dev_mac_match(dev,"pcn")) flags |= MIIF_NOISOLATE; mii_phy_dev_attach(dev, flags, &nsphy_funcs, 1); return (0); @@ -186,7 +184,7 @@ nsphy_service(struct mii_softc *sc, stru */ reg |= 0x0100 | 0x0400; - if (strcmp(if_getdname(mii->mii_ifp), "fxp") == 0) + if (mii_phy_mac_match(sc, "fxp")) PHY_WRITE(sc, MII_NSPHY_PCR, reg); mii_phy_setmedia(sc); Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/rgephy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -119,7 +119,7 @@ rgephy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); flags = 0; - if (strcmp(if_getdname(ma->mii_data->mii_ifp), "re") == 0) + if (mii_dev_mac_match(dev, "re")) flags |= MIIF_PHYPRIV0; mii_phy_dev_attach(dev, flags, &rgephy_funcs, 0); Modified: head/sys/dev/mii/rlphy.c ============================================================================== --- head/sys/dev/mii/rlphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/rlphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -108,15 +108,13 @@ static const struct mii_phy_funcs rlphy_ static int rlphy_probe(device_t dev) { - const char *nic; int rv; rv = mii_phy_dev_probe(dev, rlphys, BUS_PROBE_DEFAULT); if (rv <= 0) return (rv); - nic = device_get_name(device_get_parent(device_get_parent(dev))); - if (strcmp(nic, "rl") == 0 || strcmp(nic, "re") == 0) + if (mii_dev_mac_match(dev, "rl") || mii_dev_mac_match(dev, "re")) return (mii_phy_dev_probe(dev, rlintphys, BUS_PROBE_DEFAULT)); return (ENXIO); } Modified: head/sys/dev/mii/tlphy.c ============================================================================== --- head/sys/dev/mii/tlphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/tlphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -130,8 +130,7 @@ static int tlphy_probe(device_t dev) { - if (strcmp(device_get_name(device_get_parent(device_get_parent(dev))), - "tl") != 0) + if (!mii_dev_mac_match(dev, "tl")) return (ENXIO); return (mii_phy_dev_probe(dev, tlphys, BUS_PROBE_DEFAULT)); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 22:38:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 637A26D9; Mon, 12 Jan 2015 22:38:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F7F89A1; Mon, 12 Jan 2015 22:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CMcui6078505; Mon, 12 Jan 2015 22:38:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CMcuMb078504; Mon, 12 Jan 2015 22:38:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501122238.t0CMcuMb078504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Jan 2015 22:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277096 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 22:38:56 -0000 Author: mav Date: Mon Jan 12 22:38:55 2015 New Revision: 277096 URL: https://svnweb.freebsd.org/changeset/base/277096 Log: Skip extra bcopy() when scrubbing vdev without redundancy. According to profiler, this bcopy() can use about 10% of CPU time. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Mon Jan 12 22:36:50 2015 (r277095) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Mon Jan 12 22:38:55 2015 (r277096) @@ -435,7 +435,8 @@ vdev_mirror_io_start(zio_t *zio) mm = vdev_mirror_map_init(zio); if (zio->io_type == ZIO_TYPE_READ) { - if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing) { + if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing && + mm->mm_children > 1) { /* * For scrubbing reads we need to allocate a read * buffer for each child and issue reads to all From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 23:20:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72874DB4; Mon, 12 Jan 2015 23:20:20 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 00BB6D98; Mon, 12 Jan 2015 23:20:19 +0000 (UTC) Received: from [192.168.1.200] (p508F271C.dip0.t-ipconnect.de [80.143.39.28]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id BABC71C104DC5; Tue, 13 Jan 2015 00:20:15 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 From: Michael Tuexen In-Reply-To: <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> Date: Tue, 13 Jan 2015 00:20:14 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7A28D39E-7C21-4081-83E0-656F8082D525@fh-muenster.de> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1993) Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , John Baldwin , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 23:20:20 -0000 > On 12 Jan 2015, at 18:42, Bjoern A. Zeeb wrote: >=20 >=20 >> On 12 Jan 2015, at 15:51 , John Baldwin wrote: >>=20 >> On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: >>> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery = wrote: >>>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: >>>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>>=20 >>>>> > wrote: >>>>> Bryan- >>>>>=20 >>>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher = >>>>=20 >>>>> > wrote: >>>>>> Author: bryanv >>>>>> Date: Fri Oct 10 06:08:59 2014 >>>>>> New Revision: 272886 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 >>>>>>=20 >>>>>> Log: >>>>>> Add context pointer and source address to the UDP tunnel callback >>>>>>=20 >>>>>> These are needed for the forthcoming vxlan implementation. The >>>>=20 >>>> context >>>>=20 >>>>>> pointer means we do not have to use a spare pointer field in the >>>>=20 >>>> inpcb, >>>>=20 >>>>>> and the source address is required to populate vxlan's forwarding >>>>=20 >>>> table. >>>>=20 >>>>>> While I highly doubt there is an out of tree consumer of the UDP >>>>>> tunneling callback, this change may be a difficult to eventually >>>>=20 >>>> MFC. >>>>=20 >>>>> I noticed this comment while doing an MFC of vxlan to my local = tree. >>>>> Do you think an MFC to 10-STABLE of this change (and vxlan >>>>> generally) will be feasible? Is there precedent for ABI changes = like >>>>> this being sanctioned? Could symbol versioning help? >>>>>=20 >>>>> I'd like to get some consensus on whether this commit is OK to = MFC. With >>>>> this commit, vxlan should be an easy to MFC. >>>>=20 >>>> Breaking ABI will potentially hurt packages. FreeBSD builds = packages for >>>> the oldest supported release on a branch. If you break ABI in 10.2 = while >>>> we are building packages for 10.1 then any packages using these >>>> interfaces may not work right or result in panics packages with = kmods. >>>> Please consider that. >>>=20 >>> The only user visible change of this commit would be the addition of = a >>> field at the end of 'struct udpcb'. I don't think that is a problem, = at >>> least a similar change didn't prevent the MFC of UDP Lite. >>>=20 >>> The kernel part of this changes the UDP tunneling functions which I = guess >>> there could be a 3rd party module out there, but I very highly doubt = that, >>> based on how un-useful the previous interface was. >>=20 >> Userland should not be impacted by this at all. (Nothing in userland = cares >> about udpcb's internals.) I think there was only ever one consumer = for the=20 >> existing UDP tunneling code (bz@ knows what it is). I'm not sure = where it=20 >> lives. >=20 > If you are talking about u_tun_func then it came from SCTP over UDP = tunneling. tuexen and rrs are your friends. rrs implemented it to support SCTP over UDP over IPv[46]. To be more = precisely, to receive such packets. Best regards Michael >=20 > I was wondering if it could be used similarly for IPsec UDPencap but I = think that went nowhere back then. >=20 > =E2=80=94=20 > Bjoern A. Zeeb Charles Haddon = Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have = failed > beneath the bitterness of their trial had they not found a friend." >=20 >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Jan 12 23:33:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E14F0FA1; Mon, 12 Jan 2015 23:33:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD311F09; Mon, 12 Jan 2015 23:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CNXfbS006033; Mon, 12 Jan 2015 23:33:41 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CNXfbw006032; Mon, 12 Jan 2015 23:33:41 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201501122333.t0CNXfbw006032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Mon, 12 Jan 2015 23:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277097 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 23:33:42 -0000 Author: jmg Date: Mon Jan 12 23:33:40 2015 New Revision: 277097 URL: https://svnweb.freebsd.org/changeset/base/277097 Log: fix IV size of XTS to be correct at 8 bytes.. That is what both the AES-NI code and the software code expects.. Modified: head/share/man/man7/crypto.7 Modified: head/share/man/man7/crypto.7 ============================================================================== --- head/share/man/man7/crypto.7 Mon Jan 12 22:38:55 2015 (r277096) +++ head/share/man/man7/crypto.7 Mon Jan 12 23:33:40 2015 (r277097) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2014 +.Dd January 2, 2015 .Dt CRYPTO 7 .Os .Sh NAME @@ -105,7 +105,7 @@ Note: You must provide an IV on every ca .It Dv CRYPTO_AES_XTS .Bl -tag -width "Block size :" -compact -offset indent .It IV size : -16 +8 .It Block size : 16 .It Key size : From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 00:00:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2D5070F; Tue, 13 Jan 2015 00:00:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A35831A8; Tue, 13 Jan 2015 00:00:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D00BJj016735; Tue, 13 Jan 2015 00:00:11 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D00A6q016730; Tue, 13 Jan 2015 00:00:10 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201501130000.t0D00A6q016730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 13 Jan 2015 00:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277098 - in head/sys/dev: fdt ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:00:11 -0000 Author: zbb Date: Tue Jan 13 00:00:09 2015 New Revision: 277098 URL: https://svnweb.freebsd.org/changeset/base/277098 Log: Introduce ofw_bus_reg_to_rl() to replace part of common bus code Instead of reusing the same reg parsing code, create one, common function that puts reg contents to the resource list. Address cells and size cells are passed rather than acquired here so that any bus can have different default values. Obtained from: Semihalf Reviewed by: andrew, ian, nwhitehorn Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/fdt/simplebus.c head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/ofw_bus_subr.h head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/fdt/simplebus.c Tue Jan 13 00:00:09 2015 (r277098) @@ -253,10 +253,6 @@ simplebus_setup_dinfo(device_t dev, phan { struct simplebus_softc *sc; struct simplebus_devinfo *ndi; - uint32_t *reg; - uint64_t phys, size; - int i, j, k; - int nreg; sc = device_get_softc(dev); @@ -267,32 +263,7 @@ simplebus_setup_dinfo(device_t dev, phan } resource_list_init(&ndi->rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - ndi->obdinfo.obd_name); - nreg = 0; - } - - for (i = 0, k = 0; i < nreg; i += sc->acells + sc->scells, k++) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - - resource_list_add(&ndi->rl, SYS_RES_MEMORY, k, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - + ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->rl); ofw_bus_intr_to_rl(dev, node, &ndi->rl); return (ndi); Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/ofw/ofw_bus_subr.c Tue Jan 13 00:00:09 2015 (r277098) @@ -370,6 +370,54 @@ ofw_bus_search_intrmap(void *intr, int i } int +ofw_bus_reg_to_rl(device_t dev, phandle_t node, pcell_t acells, pcell_t scells, + struct resource_list *rl) +{ + uint64_t phys, size; + ssize_t i, j, rid, nreg, ret; + uint32_t *reg; + char *name; + + /* + * This may be just redundant when having ofw_bus_devinfo + * but makes this routine independent of it. + */ + ret = OF_getencprop_alloc(node, "name", sizeof(*name), (void **)&name); + if (ret == -1) + name = NULL; + + ret = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = (ret == -1) ? 0 : ret; + + if (nreg % (acells + scells) != 0) { + if (bootverbose) + device_printf(dev, "Malformed reg property on <%s>\n", + (name == NULL) ? "unknown" : name); + nreg = 0; + } + + for (i = 0, rid = 0; i < nreg; i += acells + scells, rid++) { + phys = size = 0; + for (j = 0; j < acells; j++) { + phys <<= 32; + phys |= reg[i + j]; + } + for (j = 0; j < scells; j++) { + size <<= 32; + size |= reg[i + acells + j]; + } + /* Skip the dummy reg property of glue devices like ssm(4). */ + if (size != 0) + resource_list_add(rl, SYS_RES_MEMORY, rid, + phys, phys + size - 1, size); + } + free(name, M_OFWPROP); + free(reg, M_OFWPROP); + + return (0); +} + +int ofw_bus_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl) { phandle_t iparent; Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/ofw/ofw_bus_subr.h Tue Jan 13 00:00:09 2015 (r277098) @@ -73,6 +73,8 @@ int ofw_bus_search_intrmap(void *, int, void *, void *, int, phandle_t *); /* Routines for parsing device-tree data into resource lists. */ +int ofw_bus_reg_to_rl(device_t, phandle_t, pcell_t, pcell_t, + struct resource_list *); int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *); /* Helper to get device status property */ Modified: head/sys/dev/ofw/ofwbus.c ============================================================================== --- head/sys/dev/ofw/ofwbus.c Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/ofw/ofwbus.c Tue Jan 13 00:00:09 2015 (r277098) @@ -442,10 +442,6 @@ ofwbus_setup_dinfo(device_t dev, phandle struct ofwbus_softc *sc; struct ofwbus_devinfo *ndi; const char *nodename; - uint32_t *reg; - uint64_t phys, size; - int i, j, rid; - int nreg; sc = device_get_softc(dev); @@ -462,33 +458,7 @@ ofwbus_setup_dinfo(device_t dev, phandle } resource_list_init(&ndi->ndi_rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - nodename); - nreg = 0; - } - - for (i = 0, rid = 0; i < nreg; i += sc->acells + sc->scells, rid++) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - /* Skip the dummy reg property of glue devices like ssm(4). */ - if (size != 0) - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, rid, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - + ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->ndi_rl); ofw_bus_intr_to_rl(dev, node, &ndi->ndi_rl); return (ndi); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 00:04:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED87B8E1; Tue, 13 Jan 2015 00:04:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D90A7263; Tue, 13 Jan 2015 00:04:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D04NgY021611; Tue, 13 Jan 2015 00:04:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D04NMj021610; Tue, 13 Jan 2015 00:04:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501130004.t0D04NMj021610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 13 Jan 2015 00:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277099 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:04:24 -0000 Author: pfg Date: Tue Jan 13 00:04:22 2015 New Revision: 277099 URL: https://svnweb.freebsd.org/changeset/base/277099 Log: Replace __inline GNUism with the standard inline. MFC after: 1 week Modified: head/usr.bin/sed/process.c Modified: head/usr.bin/sed/process.c ============================================================================== --- head/usr.bin/sed/process.c Tue Jan 13 00:00:09 2015 (r277098) +++ head/usr.bin/sed/process.c Tue Jan 13 00:04:22 2015 (r277099) @@ -67,7 +67,7 @@ static SPACE HS, PS, SS, YS; #define hs HS.space #define hsl HS.len -static __inline int applies(struct s_command *); +static inline int applies(struct s_command *); static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); @@ -288,7 +288,7 @@ new: if (!nflag && !pd) * Return TRUE if the command applies to the current line. Sets the start * line for process ranges. Interprets the non-select (``!'') flag. */ -static __inline int +static inline int applies(struct s_command *cp) { int r; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 00:11:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B30A8B9B; Tue, 13 Jan 2015 00:11:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84E9C377; Tue, 13 Jan 2015 00:11:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D0BvLw026056; Tue, 13 Jan 2015 00:11:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D0BvRD026054; Tue, 13 Jan 2015 00:11:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501130011.t0D0BvRD026054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 13 Jan 2015 00:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277100 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:11:57 -0000 Author: kib Date: Tue Jan 13 00:11:56 2015 New Revision: 277100 URL: https://svnweb.freebsd.org/changeset/base/277100 Log: Add quirk to override default BAR(5) rid for AHCI. Use it for Cavium AHCI. Submitted by: Michaе┌ Stanek Reviewed by: imp (previous version) MFC after: 1 week Modified: head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Jan 13 00:04:22 2015 (r277099) +++ head/sys/dev/ahci/ahci.h Tue Jan 13 00:11:56 2015 (r277100) @@ -572,6 +572,7 @@ enum ahci_err_type { #define AHCI_Q_ATI_PMP_BUG 0x2000 #define AHCI_Q_MAXIO_64K 0x4000 #define AHCI_Q_SATA1_UNIT0 0x8000 /* need better method for this */ +#define AHCI_Q_ABAR0 0x10000 #define AHCI_Q_BIT_STRING \ "\020" \ Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:04:22 2015 (r277099) +++ head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:11:56 2015 (r277100) @@ -287,6 +287,7 @@ static const struct { {0x11841039, 0x00, "SiS 966", 0}, {0x11851039, 0x00, "SiS 968", 0}, {0x01861039, 0x00, "SiS 968", 0}, + {0xa01c177d, 0x00, "ThunderX SATA", AHCI_Q_ABAR0}, {0x00000000, 0x00, NULL, 0} }; @@ -386,12 +387,16 @@ ahci_pci_attach(device_t dev) pci_get_subvendor(dev) == 0x1043 && pci_get_subdevice(dev) == 0x81e4) ctlr->quirks |= AHCI_Q_SATA1_UNIT0; - /* if we have a memory BAR(5) we are likely on an AHCI part */ ctlr->vendorid = pci_get_vendor(dev); ctlr->deviceid = pci_get_device(dev); ctlr->subvendorid = pci_get_subvendor(dev); ctlr->subdeviceid = pci_get_subdevice(dev); - ctlr->r_rid = PCIR_BAR(5); + + /* Default AHCI Base Address is BAR(5), Cavium uses BAR(0) */ + if (ctlr->quirks & AHCI_Q_ABAR0) + ctlr->r_rid = PCIR_BAR(0); + else + ctlr->r_rid = PCIR_BAR(5); if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_rid, RF_ACTIVE))) return ENXIO; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 00:20:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16F15A0; Tue, 13 Jan 2015 00:20:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE6FA3DC; Tue, 13 Jan 2015 00:20:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D0Ka8R028455; Tue, 13 Jan 2015 00:20:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D0KaOX028453; Tue, 13 Jan 2015 00:20:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501130020.t0D0KaOX028453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Jan 2015 00:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277101 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:20:37 -0000 Author: imp Date: Tue Jan 13 00:20:35 2015 New Revision: 277101 URL: https://svnweb.freebsd.org/changeset/base/277101 Log: Explain a bit of tricky code dealing with trims and how it prevents starvation. These side effects aren't obvious without extremely careful study, and are important to do just so. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Tue Jan 13 00:11:56 2015 (r277100) +++ head/sys/cam/ata/ata_da.c Tue Jan 13 00:20:35 2015 (r277101) @@ -1790,6 +1790,16 @@ adadone(struct cam_periph *periph, union TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * trim_running set to 0 before the call above to allow + * other I/O to progress when many BIO_DELETE requests + * are pushed down. We set trim_running to 0 and call + * daschedule again so that we don't stall if there are + * no other I/Os pending apart from BIO_DELETEs. + */ softc->trim_running = 0; adaschedule(periph); cam_periph_unlock(periph); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jan 13 00:11:56 2015 (r277100) +++ head/sys/cam/scsi/scsi_da.c Tue Jan 13 00:20:35 2015 (r277101) @@ -3018,6 +3018,16 @@ dadone(struct cam_periph *periph, union TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->delete_run_queue.queue, bio_queue); softc->delete_run_queue.insert_point = NULL; + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * delete_running set to 0 before the call above to + * allow other I/O to progress when many BIO_DELETE + * requests are pushed down. We set delete_running to 0 + * and call daschedule again so that we don't stall if + * there are no other I/Os pending apart from BIO_DELETEs. + */ softc->delete_running = 0; daschedule(periph); cam_periph_unlock(periph); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 01:28:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CB0AD34 for ; Tue, 13 Jan 2015 01:28:15 +0000 (UTC) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02A41C6D for ; Tue, 13 Jan 2015 01:28:14 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x13so188395wgg.12 for ; Mon, 12 Jan 2015 17:28:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=PcsYgXvK+KVdTbHmIIPA2Jc6zfqqHbFm173takTwHP0=; b=OJFPrdtc325lfRn49RqeFTtZ4bNJPDiZBs0H4uZ4dGuSFuL6phfL4ZxUsRmNC47fQy FvbUgyjXRAFlyyPpVC3ihLStjAUulM8scgkWZasXUYpJKJygFbuQg1QL6dT7OWx6aPHW PdBELsYuWvfiHclwUemu3olkK22WlQWOX7YRGGLCCigmqofRqAC7U2swDOGdDNoVVQFc fs8iXwqnvJQzwEV8sPcF0w46Dynbjlqi6Oe8RrFiVacNPx3U26uwZFHx5I9Qw/jD/md4 8RiPUqATKvEGV3B9Q7VXbPcp8TLhAzrFjeqpf8k7elpDpy8SOObV/HbNzaqScoDUAJEY 5zoA== X-Gm-Message-State: ALoCoQmqom+kjKE1jMMcxrpLWp81Eg4lY/s6Di3iEki1d7zcEiinasMD+n1djRThSiZMF5bZe266 X-Received: by 10.194.190.46 with SMTP id gn14mr110571wjc.36.1421112067015; Mon, 12 Jan 2015 17:21:07 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id s9sm12249516wiz.12.2015.01.12.17.21.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jan 2015 17:21:06 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <54B472FC.4090808@freebsd.org> Date: Tue, 13 Jan 2015 01:21:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277100 - head/sys/dev/ahci References: <201501130011.t0D0BvRD026054@svn.freebsd.org> In-Reply-To: <201501130011.t0D0BvRD026054@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 01:28:15 -0000 Looks like this missed the addition of the new quirk to AHCI_Q_BIT_STRING. On 13/01/2015 00:11, Konstantin Belousov wrote: > Author: kib > Date: Tue Jan 13 00:11:56 2015 > New Revision: 277100 > URL: https://svnweb.freebsd.org/changeset/base/277100 > > Log: > Add quirk to override default BAR(5) rid for AHCI. > Use it for Cavium AHCI. > > Submitted by: Michaе┌ Stanek > Reviewed by: imp (previous version) > MFC after: 1 week > > Modified: > head/sys/dev/ahci/ahci.h > head/sys/dev/ahci/ahci_pci.c > > Modified: head/sys/dev/ahci/ahci.h > ============================================================================== > --- head/sys/dev/ahci/ahci.h Tue Jan 13 00:04:22 2015 (r277099) > +++ head/sys/dev/ahci/ahci.h Tue Jan 13 00:11:56 2015 (r277100) > @@ -572,6 +572,7 @@ enum ahci_err_type { > #define AHCI_Q_ATI_PMP_BUG 0x2000 > #define AHCI_Q_MAXIO_64K 0x4000 > #define AHCI_Q_SATA1_UNIT0 0x8000 /* need better method for this */ > +#define AHCI_Q_ABAR0 0x10000 > > #define AHCI_Q_BIT_STRING \ > "\020" \ > > Modified: head/sys/dev/ahci/ahci_pci.c > ============================================================================== > --- head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:04:22 2015 (r277099) > +++ head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:11:56 2015 (r277100) > @@ -287,6 +287,7 @@ static const struct { > {0x11841039, 0x00, "SiS 966", 0}, > {0x11851039, 0x00, "SiS 968", 0}, > {0x01861039, 0x00, "SiS 968", 0}, > + {0xa01c177d, 0x00, "ThunderX SATA", AHCI_Q_ABAR0}, > {0x00000000, 0x00, NULL, 0} > }; > > @@ -386,12 +387,16 @@ ahci_pci_attach(device_t dev) > pci_get_subvendor(dev) == 0x1043 && > pci_get_subdevice(dev) == 0x81e4) > ctlr->quirks |= AHCI_Q_SATA1_UNIT0; > - /* if we have a memory BAR(5) we are likely on an AHCI part */ > ctlr->vendorid = pci_get_vendor(dev); > ctlr->deviceid = pci_get_device(dev); > ctlr->subvendorid = pci_get_subvendor(dev); > ctlr->subdeviceid = pci_get_subdevice(dev); > - ctlr->r_rid = PCIR_BAR(5); > + > + /* Default AHCI Base Address is BAR(5), Cavium uses BAR(0) */ > + if (ctlr->quirks & AHCI_Q_ABAR0) > + ctlr->r_rid = PCIR_BAR(0); > + else > + ctlr->r_rid = PCIR_BAR(5); > if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, > &ctlr->r_rid, RF_ACTIVE))) > return ENXIO; > From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 01:40:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D3EDE44; Tue, 13 Jan 2015 01:40:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08C89DD3; Tue, 13 Jan 2015 01:40:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D1eCor065290; Tue, 13 Jan 2015 01:40:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D1eC1l065289; Tue, 13 Jan 2015 01:40:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501130140.t0D1eC1l065289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 13 Jan 2015 01:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277102 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 01:40:13 -0000 Author: np Date: Tue Jan 13 01:40:12 2015 New Revision: 277102 URL: https://svnweb.freebsd.org/changeset/base/277102 Log: cxgbe/iw_cxgbe: allow any size during the initial MPA exchange. MFC after: 1 month Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 00:20:35 2015 (r277101) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 01:40:12 2015 (r277102) @@ -955,18 +955,14 @@ send_mpa_req(struct c4iw_ep *ep) if (mpa_rev_to_use == 2) mpalen += sizeof(struct mpa_v2_conn_params); - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) { +failed: connect_reply_upcall(ep, -ENOMEM); return; } - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REQ, sizeof(mpa->key)); mpa->flags = (crc_enabled ? MPA_CRC : 0) | (markers_enabled ? MPA_MARKERS : 0) | @@ -1013,11 +1009,18 @@ send_mpa_req(struct c4iw_ep *ep) CTR2(KTR_IW_CXGBE, "%s:smr7 %p", __func__, ep); } - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); - if (err) { - connect_reply_upcall(ep, -ENOMEM); - return; + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + goto failed; } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + ep->com.thread); + if (err) + goto failed; START_EP_TIMER(ep); state_set(&ep->com, MPA_REQ_SENT); @@ -1044,22 +1047,11 @@ static int send_mpa_reject(struct c4iw_e ep->mpa_attr.version, mpalen); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - printf("%s - cannot alloc mbuf!\n", __func__); - CTR2(KTR_IW_CXGBE, "%s:smrej2 %p", __func__, ep); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; - memset(mpa, 0, sizeof(*mpa)); + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = MPA_REJECT; mpa->revision = mpa_rev; @@ -1091,7 +1083,15 @@ static int send_mpa_reject(struct c4iw_e if (plen) memcpy(mpa->private_data, pdata, plen); - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); if (!err) ep->snd_seq += mpalen; CTR4(KTR_IW_CXGBE, "%s:smrejE %p %u %d", __func__, ep, ep->hwtid, err); @@ -1117,21 +1117,10 @@ static int send_mpa_reply(struct c4iw_ep mpalen += sizeof(struct mpa_v2_conn_params); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - CTR2(KTR_IW_CXGBE, "%s:smrep2 %p", __func__, ep); - printf("%s - cannot alloc mbuf!\n", __func__); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; memset(mpa, 0, sizeof(*mpa)); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = (ep->mpa_attr.crc_enabled ? MPA_CRC : 0) | @@ -1182,9 +1171,18 @@ static int send_mpa_reply(struct c4iw_ep if (plen) memcpy(mpa->private_data, pdata, plen); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + state_set(&ep->com, MPA_REP_SENT); ep->snd_seq += mpalen; - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); CTR3(KTR_IW_CXGBE, "%s:smrepE %p %d", __func__, ep, err); return err; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 05:32:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAA23AE4; Tue, 13 Jan 2015 05:32:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B61CA800; Tue, 13 Jan 2015 05:32:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D5WqYw077736; Tue, 13 Jan 2015 05:32:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D5WqeN077734; Tue, 13 Jan 2015 05:32:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501130532.t0D5WqeN077734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 13 Jan 2015 05:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277103 - in head/sys/dev/xen: netback netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 05:32:52 -0000 Author: delphij Date: Tue Jan 13 05:32:51 2015 New Revision: 277103 URL: https://svnweb.freebsd.org/changeset/base/277103 Log: Use the common codepath to handle SIOCGIFADDR. Before this change, the current code handles SIOCGIFADDR the same way with SIOCSIFADDR, which involves full arp_ifinit, et al. They should be unnecessary for SIOCGIFADDR case. Differential Revision: https://reviews.freebsd.org/D1508 Reviewed by: glebius MFC after: 2 weeks Modified: head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Tue Jan 13 01:40:12 2015 (r277102) +++ head/sys/dev/xen/netback/netback.c Tue Jan 13 05:32:51 2015 (r277103) @@ -2251,7 +2251,6 @@ xnb_ioctl(struct ifnet *ifp, u_long cmd, mtx_unlock(&xnb->sc_lock); break; case SIOCSIFADDR: - case SIOCGIFADDR: #ifdef INET mtx_lock(&xnb->sc_lock); if (ifa->ifa_addr->sa_family == AF_INET) { Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Tue Jan 13 01:40:12 2015 (r277102) +++ head/sys/dev/xen/netfront/netfront.c Tue Jan 13 05:32:51 2015 (r277103) @@ -1741,7 +1741,6 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, int mask, error = 0; switch(cmd) { case SIOCSIFADDR: - case SIOCGIFADDR: #ifdef INET XN_LOCK(sc); if (ifa->ifa_addr->sa_family == AF_INET) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 06:22:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59944308; Tue, 13 Jan 2015 06:22:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45D2AC57; Tue, 13 Jan 2015 06:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D6MPPl001252; Tue, 13 Jan 2015 06:22:25 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6MPYP001251; Tue, 13 Jan 2015 06:22:25 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130622.t0D6MPYP001251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 06:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277104 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:22:25 -0000 Author: glebius Date: Tue Jan 13 06:22:24 2015 New Revision: 277104 URL: https://svnweb.freebsd.org/changeset/base/277104 Log: Remove unused fields. Modified: head/sys/dev/mii/miivar.h Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Tue Jan 13 05:32:51 2015 (r277103) +++ head/sys/dev/mii/miivar.h Tue Jan 13 06:22:24 2015 (r277104) @@ -45,13 +45,6 @@ struct mii_softc; /* - * Callbacks from MII layer into network interface device driver. - */ -typedef int (*mii_readreg_t)(struct device *, int, int); -typedef void (*mii_writereg_t)(struct device *, int, int, int); -typedef void (*mii_statchg_t)(struct device *); - -/* * A network interface driver has one of these structures in its softc. * It is the interface from the network interface driver to the MII * layer. @@ -73,13 +66,6 @@ struct mii_data { */ u_int mii_media_status; u_int mii_media_active; - - /* - * Calls from MII layer into network interface driver. - */ - mii_readreg_t mii_readreg; - mii_writereg_t mii_writereg; - mii_statchg_t mii_statchg; }; typedef struct mii_data mii_data_t; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 06:22:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0B97448; Tue, 13 Jan 2015 06:22:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CED7C5F; Tue, 13 Jan 2015 06:22:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D6MuJN001357; Tue, 13 Jan 2015 06:22:56 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6Mumt001356; Tue, 13 Jan 2015 06:22:56 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130622.t0D6Mumt001356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 06:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277105 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:22:56 -0000 Author: glebius Date: Tue Jan 13 06:22:55 2015 New Revision: 277105 URL: https://svnweb.freebsd.org/changeset/base/277105 Log: - Remove unused variable. - Wrap long line. Modified: head/sys/dev/mii/e1000phy.c Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Tue Jan 13 06:22:24 2015 (r277104) +++ head/sys/dev/mii/e1000phy.c Tue Jan 13 06:22:55 2015 (r277105) @@ -132,14 +132,13 @@ static int e1000phy_attach(device_t dev) { struct mii_softc *sc; - if_t ifp; sc = device_get_softc(dev); mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &e1000phy_funcs, 0); - ifp = sc->mii_pdata->mii_ifp; - if (mii_dev_mac_match(dev, "msk") && (sc->mii_flags & MIIF_MACPRIV0) != 0) + if (mii_dev_mac_match(dev, "msk") && + (sc->mii_flags & MIIF_MACPRIV0) != 0) sc->mii_flags |= MIIF_PHYPRIV0; switch (sc->mii_mpd_model) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 06:23:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8316A591; Tue, 13 Jan 2015 06:23:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC27C6C; Tue, 13 Jan 2015 06:23:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D6Nd6u001505; Tue, 13 Jan 2015 06:23:39 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6NdV5001503; Tue, 13 Jan 2015 06:23:39 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501130623.t0D6NdV5001503@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 13 Jan 2015 06:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277106 - stable/10/usr.bin/kdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:23:39 -0000 Author: dchagin Date: Tue Jan 13 06:23:38 2015 New Revision: 277106 URL: https://svnweb.freebsd.org/changeset/base/277106 Log: MFC r273048 by jhb: Fix most of the warnings in kdump(1). r276758: Eliminate new clang warnings. Modified: stable/10/usr.bin/kdump/Makefile stable/10/usr.bin/kdump/kdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/kdump/Makefile ============================================================================== --- stable/10/usr.bin/kdump/Makefile Tue Jan 13 06:22:55 2015 (r277105) +++ stable/10/usr.bin/kdump/Makefile Tue Jan 13 06:23:38 2015 (r277106) @@ -18,13 +18,13 @@ CFLAGS+= -I${.CURDIR}/../ktrace -I${.CUR CFLAGS+=-DPF .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" -SRCS+= linux_syscalls.c -.endif - NO_WERROR?= YES -CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c +CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h + +.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") +CLEANFILES+= linux_syscalls.c +.endif ioctl.c: mkioctls env MACHINE=${MACHINE} CPP="${CPP}" \ @@ -36,11 +36,9 @@ kdump_subr.h: mksubr kdump_subr.c: mksubr kdump_subr.h sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} - -linux_syscalls.c: - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ +.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") + sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf - echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \ - >> linux_syscalls.c +.endif .include Modified: stable/10/usr.bin/kdump/kdump.c ============================================================================== --- stable/10/usr.bin/kdump/kdump.c Tue Jan 13 06:22:55 2015 (r277105) +++ stable/10/usr.bin/kdump/kdump.c Tue Jan 13 06:23:38 2015 (r277106) @@ -102,9 +102,9 @@ void ktrgenio(struct ktr_genio *, int); void ktrpsig(struct ktr_psig *); void ktrcsw(struct ktr_csw *); void ktrcsw_old(struct ktr_csw_old *); -void ktruser_malloc(unsigned char *); -void ktruser_rtld(int, unsigned char *); -void ktruser(int, unsigned char *); +void ktruser_malloc(void *); +void ktruser_rtld(int, void *); +void ktruser(int, void *); void ktrcaprights(cap_rights_t *); void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); @@ -116,10 +116,13 @@ void limitfd(int fd); void usage(void); void ioctlname(unsigned long, int); -int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, +extern const char *signames[], *syscallnames[]; +extern int nsyscalls; + +static int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, resolv = 0, abiflag = 0, syscallno = 0; -const char *tracefile = DEF_TRACEFILE; -struct ktr_header ktr_header; +static const char *tracefile = DEF_TRACEFILE; +static struct ktr_header ktr_header; #define TIME_FORMAT "%b %e %T %Y" #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) @@ -138,8 +141,11 @@ struct ktr_header ktr_header; void linux_ktrsyscall(struct ktr_syscall *); void linux_ktrsysret(struct ktr_sysret *); -extern char *linux_syscallnames[]; -extern int nlinux_syscalls; +extern const char *linux_syscallnames[]; + +#include +static int nlinux_syscalls = sizeof(linux_syscallnames) / \ + sizeof(linux_syscallnames[0]); /* * from linux.h @@ -166,7 +172,7 @@ struct proc_info pid_t pid; }; -TAILQ_HEAD(trace_procs, proc_info) trace_procs; +static TAILQ_HEAD(trace_procs, proc_info) trace_procs; static void strerror_init(void) @@ -386,7 +392,7 @@ limitfd(int fd) unsigned long cmd; cap_rights_init(&rights, CAP_FSTAT); - cmd = -1; + cmd = 0; switch (fd) { case STDIN_FILENO: @@ -409,7 +415,7 @@ limitfd(int fd) if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "unable to limit rights for descriptor %d", fd); - if (cmd != -1 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) + if (cmd != 0 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) err(1, "unable to limit ioctls for descriptor %d", fd); } @@ -1016,7 +1022,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); putchar(','); flagsname(ip[0]); - printf(",0%o", ip[1]); + printf(",0%o", (unsigned int)ip[1]); ip += 3; narg -= 3; break; @@ -1458,9 +1464,10 @@ struct utrace_rtld { }; void -ktruser_rtld(int len, unsigned char *p) +ktruser_rtld(int len, void *p) { - struct utrace_rtld *ut = (struct utrace_rtld *)p; + struct utrace_rtld *ut = p; + unsigned char *cp; void *parent; int mode; @@ -1525,14 +1532,15 @@ ktruser_rtld(int len, unsigned char *p) ut->name); break; default: - p += 4; + cp = p; + cp += 4; len -= 4; printf("RTLD: %d ", len); while (len--) if (decimal) - printf(" %d", *p++); + printf(" %d", *cp++); else - printf(" %02x", *p++); + printf(" %02x", *cp++); printf("\n"); } } @@ -1544,9 +1552,9 @@ struct utrace_malloc { }; void -ktruser_malloc(unsigned char *p) +ktruser_malloc(void *p) { - struct utrace_malloc *ut = (struct utrace_malloc *)p; + struct utrace_malloc *ut = p; if (ut->p == (void *)(intptr_t)(-1)) printf("malloc_init()\n"); @@ -1559,8 +1567,9 @@ ktruser_malloc(unsigned char *p) } void -ktruser(int len, unsigned char *p) +ktruser(int len, void *p) { + unsigned char *cp; if (len >= 8 && bcmp(p, "RTLD", 4) == 0) { ktruser_rtld(len, p); @@ -1573,11 +1582,12 @@ ktruser(int len, unsigned char *p) } printf("%d ", len); + cp = p; while (len--) if (decimal) - printf(" %d", *p++); + printf(" %d", *cp++); else - printf(" %02x", *p++); + printf(" %02x", *cp++); printf("\n"); } @@ -1857,7 +1867,7 @@ void ktrfault(struct ktr_fault *ktr) { - printf("0x%jx ", ktr->vaddr); + printf("0x%jx ", (uintmax_t)ktr->vaddr); vmprotname(ktr->type); printf("\n"); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 06:56:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8899C40; Tue, 13 Jan 2015 06:56:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4D37F2C; Tue, 13 Jan 2015 06:56:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D6u5CX016111; Tue, 13 Jan 2015 06:56:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6u5NH016109; Tue, 13 Jan 2015 06:56:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130656.t0D6u5NH016109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 06:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277108 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:56:06 -0000 Author: glebius Date: Tue Jan 13 06:56:04 2015 New Revision: 277108 URL: https://svnweb.freebsd.org/changeset/base/277108 Log: Remove unused variables. CID: 1262431 CID: 1262430 Modified: head/sys/dev/mii/jmphy.c head/sys/dev/mii/rgephy.c Modified: head/sys/dev/mii/jmphy.c ============================================================================== --- head/sys/dev/mii/jmphy.c Tue Jan 13 06:27:02 2015 (r277107) +++ head/sys/dev/mii/jmphy.c Tue Jan 13 06:56:04 2015 (r277108) @@ -100,10 +100,8 @@ jmphy_probe(device_t dev) static int jmphy_attach(device_t dev) { - struct mii_attach_args *ma; u_int flags; - ma = device_get_ivars(dev); flags = 0; if (mii_dev_mac_match(dev, "jme") && (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0) Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Tue Jan 13 06:27:02 2015 (r277107) +++ head/sys/dev/mii/rgephy.c Tue Jan 13 06:56:04 2015 (r277108) @@ -113,11 +113,9 @@ static int rgephy_attach(device_t dev) { struct mii_softc *sc; - struct mii_attach_args *ma; u_int flags; sc = device_get_softc(dev); - ma = device_get_ivars(dev); flags = 0; if (mii_dev_mac_match(dev, "re")) flags |= MIIF_PHYPRIV0; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 07:45:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19E32634; Tue, 13 Jan 2015 07:45:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05AAA5E9; Tue, 13 Jan 2015 07:45:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D7jGfw039671; Tue, 13 Jan 2015 07:45:16 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D7jGVP039670; Tue, 13 Jan 2015 07:45:16 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201501130745.t0D7jGVP039670@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 13 Jan 2015 07:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277113 - stable/10/sys/arm/allwinner X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 07:45:17 -0000 Author: ganbold Date: Tue Jan 13 07:45:16 2015 New Revision: 277113 URL: https://svnweb.freebsd.org/changeset/base/277113 Log: MFC: Allow timer0 to run at full 24MHz not at 24MHz/16 by setting prescale to 1. Approved by: stas (mentor) Modified: stable/10/sys/arm/allwinner/timer.c Modified: stable/10/sys/arm/allwinner/timer.c ============================================================================== --- stable/10/sys/arm/allwinner/timer.c Tue Jan 13 07:40:59 2015 (r277112) +++ stable/10/sys/arm/allwinner/timer.c Tue Jan 13 07:45:16 2015 (r277113) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define TIMER_ENABLE (1<<0) #define TIMER_AUTORELOAD (1<<1) #define TIMER_OSC24M (1<<2) /* oscillator = 24mhz */ -#define TIMER_PRESCALAR (4<<4) /* prescalar = 16 */ +#define TIMER_PRESCALAR (0<<4) /* prescalar = 1 */ #define SYS_TIMER_CLKSRC 24000000 /* clock source */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 07:49:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 974E1968; Tue, 13 Jan 2015 07:49:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69D0260E; Tue, 13 Jan 2015 07:49:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D7n9oo040283; Tue, 13 Jan 2015 07:49:09 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D7n8jv040279; Tue, 13 Jan 2015 07:49:08 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201501130749.t0D7n8jv040279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 13 Jan 2015 07:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277116 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 07:49:09 -0000 Author: ganbold Date: Tue Jan 13 07:49:07 2015 New Revision: 277116 URL: https://svnweb.freebsd.org/changeset/base/277116 Log: Add CPU ID for ARM Cortex A17. Approved by: stas (mentor) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Jan 13 07:46:21 2015 (r277115) +++ head/sys/arm/arm/cpufunc.c Tue Jan 13 07:49:07 2015 (r277116) @@ -1071,6 +1071,7 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA15R1 || cputype == CPU_ID_CORTEXA15R2 || cputype == CPU_ID_CORTEXA15R3 || + cputype == CPU_ID_CORTEXA17 || cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Tue Jan 13 07:46:21 2015 (r277115) +++ head/sys/arm/arm/identcpu.c Tue Jan 13 07:49:07 2015 (r277116) @@ -193,6 +193,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEXA, "Cortex A15-r3", generic_steppings }, + { CPU_ID_CORTEXA17, CPU_CLASS_CORTEXA, "Cortex A17", + generic_steppings }, { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", generic_steppings }, Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Tue Jan 13 07:46:21 2015 (r277115) +++ head/sys/arm/include/armreg.h Tue Jan 13 07:49:07 2015 (r277116) @@ -137,6 +137,7 @@ #define CPU_ID_CORTEXA15R1 0x411fc0f0 #define CPU_ID_CORTEXA15R2 0x412fc0f0 #define CPU_ID_CORTEXA15R3 0x413fc0f0 +#define CPU_ID_CORTEXA17 0x410fc0d0 #define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 08:20:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75ABFD4D; Tue, 13 Jan 2015 08:20:19 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 025228FC; Tue, 13 Jan 2015 08:20:18 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0D8KCkU020861 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jan 2015 10:20:13 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0D8KCkU020861 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0D8KCSF020860; Tue, 13 Jan 2015 10:20:12 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 13 Jan 2015 10:20:12 +0200 From: Konstantin Belousov To: Steven Hartland Subject: Re: svn commit: r277100 - head/sys/dev/ahci Message-ID: <20150113082012.GI42409@kib.kiev.ua> References: <201501130011.t0D0BvRD026054@svn.freebsd.org> <54B472FC.4090808@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B472FC.4090808@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 08:20:19 -0000 On Tue, Jan 13, 2015 at 01:21:00AM +0000, Steven Hartland wrote: > Looks like this missed the addition of the new quirk to AHCI_Q_BIT_STRING. Thank you for noting. See the patch below. Is anything else amiss ? Index: sys/dev/ahci/ahci.h =================================================================== --- sys/dev/ahci/ahci.h (revision 277100) +++ sys/dev/ahci/ahci.h (working copy) @@ -591,7 +591,8 @@ "\015NOMSI" \ "\016ATI_PMP_BUG" \ "\017MAXIO_64K" \ - "\020SATA1_UNIT0" + "\020SATA1_UNIT0" \ + "\021ABAR0" int ahci_attach(device_t dev); int ahci_detach(device_t dev); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 09:24:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B92423C8 for ; Tue, 13 Jan 2015 09:24:07 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5D9F71 for ; Tue, 13 Jan 2015 09:24:07 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id em10so2409190wid.5 for ; Tue, 13 Jan 2015 01:24:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=sc5Brqph9AIcJJlN/9BvN7hNGRfGyNm3BKm9kcyQS0U=; b=jeHpZYM45zFpsInXxsRUnEfGWXdnVMs5L1a6BjIIqlws4nCKc7U7J6fdoTWXaUn9QH 8grT45ZaYeQf9sh/Jzn1FU+sX/OxgoiekGcSYVgb4F/rhYqdug3Ts6+BayhIXgd2lERi feC7kl/NNuZm2/8/SD83D3eDMrpciI/ZgjejRFCnca0HDcYO46Y8fkwDovH7cA9QYJ7d iJDpqYa3BHr6OV2UxLHC1HuucuSchhOzv/sudGQEy3/8nmRNAqWLjRoYWpNqPJ9xbeQu 7Mt1fOGSmYj2jLtKQR8wCLTJNeA+tkQ/O5tjihfQYi/CYkQaw+zO+DfvbR8uXkHRwNvJ uMSA== X-Gm-Message-State: ALoCoQnNntFcFYW9u0TTXLST7TSb0Ta0wFBwgdrQi6wdCy/FfIU63cLnfYi46fqe+y+XuvPTQaqg X-Received: by 10.195.13.104 with SMTP id ex8mr14053929wjd.12.1421140569103; Tue, 13 Jan 2015 01:16:09 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id i15sm24873299wjq.22.2015.01.13.01.16.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 01:16:08 -0800 (PST) Message-ID: <54B4E24D.9070305@multiplay.co.uk> Date: Tue, 13 Jan 2015 09:15:57 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277100 - head/sys/dev/ahci References: <201501130011.t0D0BvRD026054@svn.freebsd.org> <54B472FC.4090808@freebsd.org> <20150113082012.GI42409@kib.kiev.ua> In-Reply-To: <20150113082012.GI42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 09:24:07 -0000 On 13/01/2015 08:20, Konstantin Belousov wrote: > On Tue, Jan 13, 2015 at 01:21:00AM +0000, Steven Hartland wrote: >> Looks like this missed the addition of the new quirk to AHCI_Q_BIT_STRING. > Thank you for noting. > > See the patch below. Is anything else amiss ? > > Index: sys/dev/ahci/ahci.h > =================================================================== > --- sys/dev/ahci/ahci.h (revision 277100) > +++ sys/dev/ahci/ahci.h (working copy) > @@ -591,7 +591,8 @@ > "\015NOMSI" \ > "\016ATI_PMP_BUG" \ > "\017MAXIO_64K" \ > - "\020SATA1_UNIT0" > + "\020SATA1_UNIT0" \ > + "\021ABAR0" > > int ahci_attach(device_t dev); > int ahci_detach(device_t dev); Yep that's the puppy, everything else looks good :) From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 09:50:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58990968; Tue, 13 Jan 2015 09:50:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45098267; Tue, 13 Jan 2015 09:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D9oGfZ096859; Tue, 13 Jan 2015 09:50:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D9oGqk096858; Tue, 13 Jan 2015 09:50:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501130950.t0D9oGqk096858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 13 Jan 2015 09:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277126 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 09:50:16 -0000 Author: kib Date: Tue Jan 13 09:50:15 2015 New Revision: 277126 URL: https://svnweb.freebsd.org/changeset/base/277126 Log: Complete r277100: add AHCI_Q_ABAR0 tp AHCI_Q_BIT_STRING. Noted and reviewed by: smh MFC after: 6 days Modified: head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Jan 13 09:29:34 2015 (r277125) +++ head/sys/dev/ahci/ahci.h Tue Jan 13 09:50:15 2015 (r277126) @@ -591,7 +591,8 @@ enum ahci_err_type { "\015NOMSI" \ "\016ATI_PMP_BUG" \ "\017MAXIO_64K" \ - "\020SATA1_UNIT0" + "\020SATA1_UNIT0" \ + "\021ABAR0" int ahci_attach(device_t dev); int ahci_detach(device_t dev); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 13:32:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62E7CDC0; Tue, 13 Jan 2015 13:32:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E654E84; Tue, 13 Jan 2015 13:32:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DDWJ5G004520; Tue, 13 Jan 2015 13:32:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DDWJNb004519; Tue, 13 Jan 2015 13:32:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131332.t0DDWJNb004519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 13:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277127 - head/sys/fs/cuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 13:32:19 -0000 Author: hselasky Date: Tue Jan 13 13:32:18 2015 New Revision: 277127 URL: https://svnweb.freebsd.org/changeset/base/277127 Log: Don't use POLLNVAL as a return value from the client side poll function. Many existing clients don't understand POLLNVAL and instead relies on an error code from the read(), write() or ioctl() system call. Also make sure we wakeup any client pollers before the cuse server is closing, so they don't wait forever for an event. Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Tue Jan 13 09:50:15 2015 (r277126) +++ head/sys/fs/cuse/cuse.c Tue Jan 13 13:32:18 2015 (r277127) @@ -142,6 +142,7 @@ static struct cuse_server *cuse_alloc_un static int cuse_alloc_unit_id[CUSE_DEVICES_MAX]; static struct cuse_memory cuse_mem[CUSE_ALLOC_UNIT_MAX]; +static void cuse_server_wakeup_all_client_locked(struct cuse_server *pcs); static void cuse_client_kqfilter_read_detach(struct knote *kn); static void cuse_client_kqfilter_write_detach(struct knote *kn); static int cuse_client_kqfilter_read_event(struct knote *kn, long hint); @@ -648,6 +649,8 @@ cuse_server_free(void *arg) return; } cuse_server_is_closing(pcs); + /* final client wakeup, if any */ + cuse_server_wakeup_all_client_locked(pcs); TAILQ_REMOVE(&cuse_server_head, pcs, entry); @@ -716,6 +719,9 @@ cuse_server_close(struct cdev *dev, int cuse_lock(); cuse_server_is_closing(pcs); + /* final client wakeup, if any */ + cuse_server_wakeup_all_client_locked(pcs); + knlist_clear(&pcs->selinfo.si_note, 1); cuse_unlock(); @@ -920,6 +926,18 @@ cuse_server_wakeup_locked(struct cuse_se KNOTE_LOCKED(&pcs->selinfo.si_note, 0); } +static void +cuse_server_wakeup_all_client_locked(struct cuse_server *pcs) +{ + struct cuse_client *pcc; + + TAILQ_FOREACH(pcc, &pcs->hcli, entry) { + pcc->cflags |= (CUSE_CLI_KNOTE_NEED_READ | + CUSE_CLI_KNOTE_NEED_WRITE); + } + cuse_server_wakeup_locked(pcs); +} + static int cuse_free_unit_by_id_locked(struct cuse_server *pcs, int id) { @@ -1226,11 +1244,7 @@ cuse_server_ioctl(struct cdev *dev, unsi * We don't know which direction caused the event. * Wakeup both! */ - TAILQ_FOREACH(pcc, &pcs->hcli, entry) { - pcc->cflags |= (CUSE_CLI_KNOTE_NEED_READ | - CUSE_CLI_KNOTE_NEED_WRITE); - } - cuse_server_wakeup_locked(pcs); + cuse_server_wakeup_all_client_locked(pcs); cuse_unlock(); break; @@ -1677,7 +1691,7 @@ cuse_client_poll(struct cdev *dev, int e error = cuse_client_get(&pcc); if (error != 0) - return (POLLNVAL); + goto pollnval; temp = 0; @@ -1705,8 +1719,10 @@ cuse_client_poll(struct cdev *dev, int e error = cuse_client_receive_command_locked(pccmd, 0, 0); cuse_unlock(); + cuse_cmd_unlock(pccmd); + if (error < 0) { - revents = POLLNVAL; + goto pollnval; } else { revents = 0; if (error & CUSE_POLL_READ) @@ -1716,10 +1732,12 @@ cuse_client_poll(struct cdev *dev, int e if (error & CUSE_POLL_ERROR) revents |= (events & POLLHUP); } - - cuse_cmd_unlock(pccmd); - return (revents); + + pollnval: + /* XXX many clients don't understand POLLNVAL */ + return (events & (POLLHUP | POLLPRI | POLLIN | + POLLRDNORM | POLLOUT | POLLWRNORM)); } static int From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 13:59:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59BC2774; Tue, 13 Jan 2015 13:59:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45301189; Tue, 13 Jan 2015 13:59:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DDxnKT014922; Tue, 13 Jan 2015 13:59:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DDxnXP014921; Tue, 13 Jan 2015 13:59:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501131359.t0DDxnXP014921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 13 Jan 2015 13:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277128 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 13:59:49 -0000 Author: trasz Date: Tue Jan 13 13:59:48 2015 New Revision: 277128 URL: https://svnweb.freebsd.org/changeset/base/277128 Log: Fix detection of ext2/ext3 filesystems that lack labels. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/ext2fs.c Modified: head/usr.sbin/fstyp/ext2fs.c ============================================================================== --- head/usr.sbin/fstyp/ext2fs.c Tue Jan 13 13:32:18 2015 (r277127) +++ head/usr.sbin/fstyp/ext2fs.c Tue Jan 13 13:59:48 2015 (r277128) @@ -78,12 +78,6 @@ fstyp_ext2fs(FILE *fp, char *label, size if (s_volume_name[0] == '/') s_volume_name += 1; - /* Check for volume label */ - if (s_volume_name[0] == '\0') { - free(fs); - return (1); - } - strlcpy(label, s_volume_name, size); free(fs); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 14:03:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8EE1A87; Tue, 13 Jan 2015 14:03:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9350B268; Tue, 13 Jan 2015 14:03:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DE3wZX019117; Tue, 13 Jan 2015 14:03:58 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DE3vOh019109; Tue, 13 Jan 2015 14:03:57 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501131403.t0DE3vOh019109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 13 Jan 2015 14:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277129 - in head/sys: conf dev/usb dev/usb/template X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:03:58 -0000 Author: br Date: Tue Jan 13 14:03:56 2015 New Revision: 277129 URL: https://svnweb.freebsd.org/changeset/base/277129 Log: Add usb template SERIALNET allowing us to have both USB CDC Ethernet and USB CDC Modem same time by single cable. Reviewed by: hselasky@ Added: head/sys/dev/usb/template/usb_template_serialnet.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template.h head/sys/dev/usb/usb_ioctl.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/conf/files Tue Jan 13 14:03:56 2015 (r277129) @@ -2559,6 +2559,7 @@ dev/usb/template/usb_template_mouse.c op dev/usb/template/usb_template_msc.c optional usb_template dev/usb/template/usb_template_mtp.c optional usb_template dev/usb/template/usb_template_phone.c optional usb_template +dev/usb/template/usb_template_serialnet.c optional usb_template # # USB END # Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/dev/usb/template/usb_template.c Tue Jan 13 14:03:56 2015 (r277129) @@ -1371,6 +1371,9 @@ usb_temp_setup_by_index(struct usb_devic case USB_TEMP_PHONE: err = usb_temp_setup(udev, &usb_template_phone); break; + case USB_TEMP_SERIALNET: + err = usb_temp_setup(udev, &usb_template_serialnet); + break; default: return (USB_ERR_INVAL); } Modified: head/sys/dev/usb/template/usb_template.h ============================================================================== --- head/sys/dev/usb/template/usb_template.h Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/dev/usb/template/usb_template.h Tue Jan 13 14:03:56 2015 (r277129) @@ -106,6 +106,7 @@ extern const struct usb_temp_device_desc extern const struct usb_temp_device_desc usb_template_msc; extern const struct usb_temp_device_desc usb_template_mtp; extern const struct usb_temp_device_desc usb_template_phone; +extern const struct usb_temp_device_desc usb_template_serialnet; usb_error_t usb_temp_setup(struct usb_device *, const struct usb_temp_device_desc *); Added: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/template/usb_template_serialnet.c Tue Jan 13 14:03:56 2015 (r277129) @@ -0,0 +1,387 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +/* + * This file contains the USB template for USB Networking and Serial + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#endif /* USB_GLOBAL_INCLUDE_FILE */ + +#define MODEM_IFACE_0 0 +#define MODEM_IFACE_1 1 + +enum { + STRING_LANG_INDEX, + STRING_MODEM_INDEX, + STRING_ETH_MAC_INDEX, + STRING_ETH_CONTROL_INDEX, + STRING_ETH_DATA_INDEX, + STRING_ETH_CONFIG_INDEX, + STRING_CONFIG_INDEX, + STRING_VENDOR_INDEX, + STRING_PRODUCT_INDEX, + STRING_SERIAL_INDEX, + STRING_MAX, +}; + +#define STRING_MODEM \ + "U\0S\0B\0 \0M\0o\0d\0e\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_ETH_MAC \ + "2\0A\0002\0003\0004\0005\0006\0007\08\09\0A\0B" + +#define STRING_ETH_CONTROL \ + "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 " \ + "\0C\0o\0m\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_ETH_DATA \ + "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0D\0a\0t\0a\0 " \ + "\0I\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_CONFIG \ + "D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g\0u\0r\0a\0t\0i\0o\0n" + +#define STRING_VENDOR \ + "T\0h\0e\0 \0F\0r\0e\0e\0B\0S\0D\0 \0P\0r\0o\0j\0e\0c\0t" + +#define STRING_PRODUCT \ + "S\0E\0R\0I\0A\0L\0N\0E\0T" + +#define STRING_SERIAL \ + "J\0a\0n\0u\0a\0r\0y\0 \0002\0000\0001\0005" + +/* make the real string descriptors */ + +USB_MAKE_STRING_DESC(STRING_MODEM, string_modem); +USB_MAKE_STRING_DESC(STRING_ETH_MAC, string_eth_mac); +USB_MAKE_STRING_DESC(STRING_ETH_CONTROL, string_eth_control); +USB_MAKE_STRING_DESC(STRING_ETH_DATA, string_eth_data); +USB_MAKE_STRING_DESC(STRING_CONFIG, string_serialnet_config); +USB_MAKE_STRING_DESC(STRING_VENDOR, string_serialnet_vendor); +USB_MAKE_STRING_DESC(STRING_PRODUCT, string_serialnet_product); +USB_MAKE_STRING_DESC(STRING_SERIAL, string_serialnet_serial); + +/* prototypes */ + +static usb_temp_get_string_desc_t serialnet_get_string_desc; + +static const struct usb_cdc_union_descriptor eth_union_desc = { + .bLength = sizeof(eth_union_desc), + .bDescriptorType = UDESC_CS_INTERFACE, + .bDescriptorSubtype = UDESCSUB_CDC_UNION, + .bMasterInterface = 0, /* this is automatically updated */ + .bSlaveInterface[0] = 1, /* this is automatically updated */ +}; + +static const struct usb_cdc_header_descriptor eth_header_desc = { + .bLength = sizeof(eth_header_desc), + .bDescriptorType = UDESC_CS_INTERFACE, + .bDescriptorSubtype = UDESCSUB_CDC_HEADER, + .bcdCDC[0] = 0x10, + .bcdCDC[1] = 0x01, +}; + +static const struct usb_cdc_ethernet_descriptor eth_enf_desc = { + .bLength = sizeof(eth_enf_desc), + .bDescriptorType = UDESC_CS_INTERFACE, + .bDescriptorSubtype = UDESCSUB_CDC_ENF, + .iMacAddress = STRING_ETH_MAC_INDEX, + .bmEthernetStatistics = {0, 0, 0, 0}, + .wMaxSegmentSize = {0xEA, 0x05},/* 1514 bytes */ + .wNumberMCFilters = {0, 0}, + .bNumberPowerFilters = 0, +}; + +static const void *eth_control_if_desc[] = { + ð_union_desc, + ð_header_desc, + ð_enf_desc, + NULL, +}; + +static const struct usb_temp_packet_size bulk_mps = { + .mps[USB_SPEED_FULL] = 64, + .mps[USB_SPEED_HIGH] = 512, +}; + +static const struct usb_temp_packet_size intr_mps = { + .mps[USB_SPEED_FULL] = 8, + .mps[USB_SPEED_HIGH] = 8, +}; + +static const struct usb_temp_endpoint_desc bulk_in_ep = { + .pPacketSize = &bulk_mps, +#ifdef USB_HIP_IN_EP_0 + .bEndpointAddress = USB_HIP_IN_EP_0, +#else + .bEndpointAddress = UE_DIR_IN, +#endif + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc bulk_out_ep = { + .pPacketSize = &bulk_mps, +#ifdef USB_HIP_OUT_EP_0 + .bEndpointAddress = USB_HIP_OUT_EP_0, +#else + .bEndpointAddress = UE_DIR_OUT, +#endif + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc intr_in_ep = { + .pPacketSize = &intr_mps, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_INTERRUPT, +}; + +static const struct usb_temp_endpoint_desc *eth_intr_endpoints[] = { + &intr_in_ep, + NULL, +}; + +static const struct usb_temp_interface_desc eth_control_interface = { + .ppEndpoints = eth_intr_endpoints, + .ppRawDesc = eth_control_if_desc, + .bInterfaceClass = UICLASS_CDC, + .bInterfaceSubClass = UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, + .bInterfaceProtocol = 0, + .iInterface = STRING_ETH_CONTROL_INDEX, +}; + +static const struct usb_temp_endpoint_desc *eth_data_endpoints[] = { + &bulk_in_ep, + &bulk_out_ep, + NULL, +}; + +static const struct usb_temp_interface_desc eth_data_null_interface = { + .ppEndpoints = NULL, /* no endpoints */ + .bInterfaceClass = UICLASS_CDC_DATA, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = STRING_ETH_DATA_INDEX, +}; + +static const struct usb_temp_interface_desc eth_data_interface = { + .ppEndpoints = eth_data_endpoints, + .bInterfaceClass = UICLASS_CDC_DATA, + .bInterfaceSubClass = UISUBCLASS_DATA, + .bInterfaceProtocol = 0, + .iInterface = STRING_ETH_DATA_INDEX, + .isAltInterface = 1, /* this is an alternate setting */ +}; + +static const struct usb_temp_packet_size modem_bulk_mps = { + .mps[USB_SPEED_LOW] = 8, + .mps[USB_SPEED_FULL] = 64, + .mps[USB_SPEED_HIGH] = 512, +}; + +static const struct usb_temp_packet_size modem_intr_mps = { + .mps[USB_SPEED_LOW] = 8, + .mps[USB_SPEED_FULL] = 8, + .mps[USB_SPEED_HIGH] = 8, +}; + +static const struct usb_temp_interval modem_intr_interval = { + .bInterval[USB_SPEED_LOW] = 8, /* 8ms */ + .bInterval[USB_SPEED_FULL] = 8, /* 8ms */ + .bInterval[USB_SPEED_HIGH] = 7, /* 8ms */ +}; + +static const struct usb_temp_endpoint_desc modem_ep_0 = { + .pPacketSize = &modem_intr_mps, + .pIntervals = &modem_intr_interval, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_INTERRUPT, +}; + +static const struct usb_temp_endpoint_desc modem_ep_1 = { + .pPacketSize = &modem_bulk_mps, + .bEndpointAddress = UE_DIR_OUT, + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc modem_ep_2 = { + .pPacketSize = &modem_bulk_mps, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc *modem_iface_0_ep[] = { + &modem_ep_0, + NULL, +}; + +static const struct usb_temp_endpoint_desc *modem_iface_1_ep[] = { + &modem_ep_1, + &modem_ep_2, + NULL, +}; + +static const uint8_t modem_raw_desc_0[] = { + 0x05, 0x24, 0x00, 0x10, 0x01 +}; + +static const uint8_t modem_raw_desc_1[] = { + 0x05, 0x24, 0x06, MODEM_IFACE_0, MODEM_IFACE_1 +}; + +static const uint8_t modem_raw_desc_2[] = { + 0x05, 0x24, 0x01, 0x03, MODEM_IFACE_1 +}; + +static const uint8_t modem_raw_desc_3[] = { + 0x04, 0x24, 0x02, 0x07 +}; + +static const void *modem_iface_0_desc[] = { + &modem_raw_desc_0, + &modem_raw_desc_1, + &modem_raw_desc_2, + &modem_raw_desc_3, + NULL, +}; + +static const struct usb_temp_interface_desc modem_iface_0 = { + .ppRawDesc = modem_iface_0_desc, + .ppEndpoints = modem_iface_0_ep, + .bInterfaceClass = 2, + .bInterfaceSubClass = 2, + .bInterfaceProtocol = 1, + .iInterface = STRING_MODEM_INDEX, +}; + +static const struct usb_temp_interface_desc modem_iface_1 = { + .ppEndpoints = modem_iface_1_ep, + .bInterfaceClass = 10, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = STRING_MODEM_INDEX, +}; + +static const struct usb_temp_interface_desc *serialnet_interfaces[] = { + &modem_iface_0, + &modem_iface_1, + ð_control_interface, + ð_data_null_interface, + ð_data_interface, + NULL, +}; + +static const struct usb_temp_config_desc serialnet_config_desc = { + .ppIfaceDesc = serialnet_interfaces, + .bmAttributes = UC_BUS_POWERED, + .bMaxPower = 25, /* 50 mA */ + .iConfiguration = STRING_CONFIG_INDEX, +}; +static const struct usb_temp_config_desc *serialnet_configs[] = { + &serialnet_config_desc, + NULL, +}; + +const struct usb_temp_device_desc usb_template_serialnet = { + .getStringDesc = &serialnet_get_string_desc, + .ppConfigDesc = serialnet_configs, + .idVendor = USB_TEMPLATE_VENDOR, + .idProduct = 0x0001, + .bcdDevice = 0x0100, + .bDeviceClass = UDCLASS_COMM, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, + .iManufacturer = STRING_VENDOR_INDEX, + .iProduct = STRING_PRODUCT_INDEX, + .iSerialNumber = STRING_SERIAL_INDEX, +}; + +/*------------------------------------------------------------------------* + * serialnet_get_string_desc + * + * Return values: + * NULL: Failure. No such string. + * Else: Success. Pointer to string descriptor is returned. + *------------------------------------------------------------------------*/ +static const void * +serialnet_get_string_desc(uint16_t lang_id, uint8_t string_index) +{ + static const void *ptr[STRING_MAX] = { + [STRING_LANG_INDEX] = &usb_string_lang_en, + [STRING_MODEM_INDEX] = &string_modem, + [STRING_ETH_MAC_INDEX] = &string_eth_mac, + [STRING_ETH_CONTROL_INDEX] = &string_eth_control, + [STRING_ETH_DATA_INDEX] = &string_eth_data, + [STRING_CONFIG_INDEX] = &string_serialnet_config, + [STRING_VENDOR_INDEX] = &string_serialnet_vendor, + [STRING_PRODUCT_INDEX] = &string_serialnet_product, + [STRING_SERIAL_INDEX] = &string_serialnet_serial, + }; + + if (string_index == 0) { + return (&usb_string_lang_en); + } + if (lang_id != 0x0409) { + return (NULL); + } + if (string_index < STRING_MAX) { + return (ptr[string_index]); + } + return (NULL); +} Modified: head/sys/dev/usb/usb_ioctl.h ============================================================================== --- head/sys/dev/usb/usb_ioctl.h Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/dev/usb/usb_ioctl.h Tue Jan 13 14:03:56 2015 (r277129) @@ -65,6 +65,7 @@ enum { USB_TEMP_KBD, /* USB Keyboard */ USB_TEMP_MOUSE, /* USB Mouse */ USB_TEMP_PHONE, /* USB Phone */ + USB_TEMP_SERIALNET, /* USB CDC Ethernet and Modem */ USB_TEMP_MAX, }; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 14:15:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17401DCA; Tue, 13 Jan 2015 14:15:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 039E43E5; Tue, 13 Jan 2015 14:15:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DEF0XD024018; Tue, 13 Jan 2015 14:15:00 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DEF0vF024017; Tue, 13 Jan 2015 14:15:00 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501131415.t0DEF0vF024017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 13 Jan 2015 14:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277130 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:15:01 -0000 Author: bz Date: Tue Jan 13 14:15:00 2015 New Revision: 277130 URL: https://svnweb.freebsd.org/changeset/base/277130 Log: Move the vsi variable outside of the #ifdef block to unbreak NOIP kernels after r277084. MFC after: 6 days X-MFC with: r277084 Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 14:03:56 2015 (r277129) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 14:15:00 2015 (r277130) @@ -1108,8 +1108,8 @@ int ixl_init_rx_ring(struct ixl_queue *que) { struct rx_ring *rxr = &que->rxr; -#if defined(INET6) || defined(INET) struct ixl_vsi *vsi = que->vsi; +#if defined(INET6) || defined(INET) struct ifnet *ifp = vsi->ifp; struct lro_ctrl *lro = &rxr->lro; #endif From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 14:26:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F0E2830; Tue, 13 Jan 2015 14:26:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29CD9790; Tue, 13 Jan 2015 14:26:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DEQ61W029629; Tue, 13 Jan 2015 14:26:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DEQ6XH029628; Tue, 13 Jan 2015 14:26:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131426.t0DEQ6XH029628@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 14:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277131 - head/sys/modules/usb/template X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:26:06 -0000 Author: hselasky Date: Tue Jan 13 14:26:05 2015 New Revision: 277131 URL: https://svnweb.freebsd.org/changeset/base/277131 Log: Add new USB template to the USB template module. Modified: head/sys/modules/usb/template/Makefile Modified: head/sys/modules/usb/template/Makefile ============================================================================== --- head/sys/modules/usb/template/Makefile Tue Jan 13 14:15:00 2015 (r277130) +++ head/sys/modules/usb/template/Makefile Tue Jan 13 14:26:05 2015 (r277131) @@ -39,6 +39,7 @@ SRCS= opt_bus.h opt_usb.h device_if.h bu usb_template_mouse.c \ usb_template_msc.c \ usb_template_mtp.c \ - usb_template_phone.c + usb_template_phone.c \ + usb_template_serialnet.c .include From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 15:04:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FA0E6DA; Tue, 13 Jan 2015 15:04:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF70B98; Tue, 13 Jan 2015 15:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DF4US3049288; Tue, 13 Jan 2015 15:04:30 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DF4TCG049283; Tue, 13 Jan 2015 15:04:29 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501131504.t0DF4TCG049283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 13 Jan 2015 15:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277132 - in head/sys: arm/samsung/exynos dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:04:30 -0000 Author: br Date: Tue Jan 13 15:04:28 2015 New Revision: 277132 URL: https://svnweb.freebsd.org/changeset/base/277132 Log: Rename Exynos UART driver. No functional change. Submitted by: Michal Meloun Modified: head/sys/arm/samsung/exynos/exynos_uart.c head/sys/dev/uart/uart.h head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/arm/samsung/exynos/exynos_uart.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos_uart.c Tue Jan 13 14:26:05 2015 (r277131) +++ head/sys/arm/samsung/exynos/exynos_uart.c Tue Jan 13 15:04:28 2015 (r277132) @@ -50,17 +50,17 @@ __FBSDID("$FreeBSD$"); #define DEF_CLK 100000000 static int sscomspeed(long, long); -static int s3c24x0_uart_param(struct uart_bas *, int, int, int, int); +static int exynos4210_uart_param(struct uart_bas *, int, int, int, int); /* * Low-level UART interface. */ -static int s3c2410_probe(struct uart_bas *bas); -static void s3c2410_init(struct uart_bas *bas, int, int, int, int); -static void s3c2410_term(struct uart_bas *bas); -static void s3c2410_putc(struct uart_bas *bas, int); -static int s3c2410_rxready(struct uart_bas *bas); -static int s3c2410_getc(struct uart_bas *bas, struct mtx *mtx); +static int exynos4210_probe(struct uart_bas *bas); +static void exynos4210_init(struct uart_bas *bas, int, int, int, int); +static void exynos4210_term(struct uart_bas *bas); +static void exynos4210_putc(struct uart_bas *bas, int); +static int exynos4210_rxready(struct uart_bas *bas); +static int exynos4210_getc(struct uart_bas *bas, struct mtx *mtx); extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; @@ -76,7 +76,7 @@ sscomspeed(long speed, long frequency) } static int -s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits, +exynos4210_uart_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { int brd, ulcon; @@ -127,38 +127,38 @@ s3c24x0_uart_param(struct uart_bas *bas, return (0); } -struct uart_ops uart_s3c2410_ops = { - .probe = s3c2410_probe, - .init = s3c2410_init, - .term = s3c2410_term, - .putc = s3c2410_putc, - .rxready = s3c2410_rxready, - .getc = s3c2410_getc, +struct uart_ops uart_exynos4210_ops = { + .probe = exynos4210_probe, + .init = exynos4210_init, + .term = exynos4210_term, + .putc = exynos4210_putc, + .rxready = exynos4210_rxready, + .getc = exynos4210_getc, }; static int -s3c2410_probe(struct uart_bas *bas) +exynos4210_probe(struct uart_bas *bas) { return (0); } static void -s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, +exynos4210_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { if (bas->rclk == 0) bas->rclk = DEF_CLK; - KASSERT(bas->rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(bas->rclk != 0, ("exynos4210_init: Invalid rclk")); uart_setreg(bas, SSCOM_UCON, 0); uart_setreg(bas, SSCOM_UFCON, UFCON_TXTRIGGER_8 | UFCON_RXTRIGGER_8 | UFCON_TXFIFO_RESET | UFCON_RXFIFO_RESET | UFCON_FIFO_ENABLE); - s3c24x0_uart_param(bas, baudrate, databits, stopbits, parity); + exynos4210_uart_param(bas, baudrate, databits, stopbits, parity); /* Enable UART. */ uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT | UCON_RXMODE_INT | @@ -167,13 +167,13 @@ s3c2410_init(struct uart_bas *bas, int b } static void -s3c2410_term(struct uart_bas *bas) +exynos4210_term(struct uart_bas *bas) { /* XXX */ } static void -s3c2410_putc(struct uart_bas *bas, int c) +exynos4210_putc(struct uart_bas *bas, int c) { while ((bus_space_read_4(bas->bst, bas->bsh, SSCOM_UFSTAT) & @@ -184,7 +184,7 @@ s3c2410_putc(struct uart_bas *bas, int c } static int -s3c2410_rxready(struct uart_bas *bas) +exynos4210_rxready(struct uart_bas *bas) { return ((uart_getreg(bas, SSCOM_UTRSTAT) & UTRSTAT_RXREADY) == @@ -192,7 +192,7 @@ s3c2410_rxready(struct uart_bas *bas) } static int -s3c2410_getc(struct uart_bas *bas, struct mtx *mtx) +exynos4210_getc(struct uart_bas *bas, struct mtx *mtx) { int utrstat; @@ -205,34 +205,34 @@ s3c2410_getc(struct uart_bas *bas, struc return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH)); } -static int s3c2410_bus_probe(struct uart_softc *sc); -static int s3c2410_bus_attach(struct uart_softc *sc); -static int s3c2410_bus_flush(struct uart_softc *, int); -static int s3c2410_bus_getsig(struct uart_softc *); -static int s3c2410_bus_ioctl(struct uart_softc *, int, intptr_t); -static int s3c2410_bus_ipend(struct uart_softc *); -static int s3c2410_bus_param(struct uart_softc *, int, int, int, int); -static int s3c2410_bus_receive(struct uart_softc *); -static int s3c2410_bus_setsig(struct uart_softc *, int); -static int s3c2410_bus_transmit(struct uart_softc *); - -static kobj_method_t s3c2410_methods[] = { - KOBJMETHOD(uart_probe, s3c2410_bus_probe), - KOBJMETHOD(uart_attach, s3c2410_bus_attach), - KOBJMETHOD(uart_flush, s3c2410_bus_flush), - KOBJMETHOD(uart_getsig, s3c2410_bus_getsig), - KOBJMETHOD(uart_ioctl, s3c2410_bus_ioctl), - KOBJMETHOD(uart_ipend, s3c2410_bus_ipend), - KOBJMETHOD(uart_param, s3c2410_bus_param), - KOBJMETHOD(uart_receive, s3c2410_bus_receive), - KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), - KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), +static int exynos4210_bus_probe(struct uart_softc *sc); +static int exynos4210_bus_attach(struct uart_softc *sc); +static int exynos4210_bus_flush(struct uart_softc *, int); +static int exynos4210_bus_getsig(struct uart_softc *); +static int exynos4210_bus_ioctl(struct uart_softc *, int, intptr_t); +static int exynos4210_bus_ipend(struct uart_softc *); +static int exynos4210_bus_param(struct uart_softc *, int, int, int, int); +static int exynos4210_bus_receive(struct uart_softc *); +static int exynos4210_bus_setsig(struct uart_softc *, int); +static int exynos4210_bus_transmit(struct uart_softc *); + +static kobj_method_t exynos4210_methods[] = { + KOBJMETHOD(uart_probe, exynos4210_bus_probe), + KOBJMETHOD(uart_attach, exynos4210_bus_attach), + KOBJMETHOD(uart_flush, exynos4210_bus_flush), + KOBJMETHOD(uart_getsig, exynos4210_bus_getsig), + KOBJMETHOD(uart_ioctl, exynos4210_bus_ioctl), + KOBJMETHOD(uart_ipend, exynos4210_bus_ipend), + KOBJMETHOD(uart_param, exynos4210_bus_param), + KOBJMETHOD(uart_receive, exynos4210_bus_receive), + KOBJMETHOD(uart_setsig, exynos4210_bus_setsig), + KOBJMETHOD(uart_transmit, exynos4210_bus_transmit), {0, 0 } }; int -s3c2410_bus_probe(struct uart_softc *sc) +exynos4210_bus_probe(struct uart_softc *sc) { sc->sc_txfifosz = 16; @@ -242,7 +242,7 @@ s3c2410_bus_probe(struct uart_softc *sc) } static int -s3c2410_bus_attach(struct uart_softc *sc) +exynos4210_bus_attach(struct uart_softc *sc) { sc->sc_hwiflow = 0; @@ -252,7 +252,7 @@ s3c2410_bus_attach(struct uart_softc *sc } static int -s3c2410_bus_transmit(struct uart_softc *sc) +exynos4210_bus_transmit(struct uart_softc *sc) { int i; int reg; @@ -260,7 +260,7 @@ s3c2410_bus_transmit(struct uart_softc * uart_lock(sc->sc_hwmtx); for (i = 0; i < sc->sc_txdatasz; i++) { - s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]); + exynos4210_putc(&sc->sc_bas, sc->sc_txbuf[i]); uart_barrier(&sc->sc_bas); } @@ -277,14 +277,14 @@ s3c2410_bus_transmit(struct uart_softc * } static int -s3c2410_bus_setsig(struct uart_softc *sc, int sig) +exynos4210_bus_setsig(struct uart_softc *sc, int sig) { return (0); } static int -s3c2410_bus_receive(struct uart_softc *sc) +exynos4210_bus_receive(struct uart_softc *sc) { struct uart_bas *bas; @@ -297,7 +297,7 @@ s3c2410_bus_receive(struct uart_softc *s } static int -s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits, +exynos4210_bus_param(struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) { int error; @@ -305,10 +305,10 @@ s3c2410_bus_param(struct uart_softc *sc, if (sc->sc_bas.rclk == 0) sc->sc_bas.rclk = DEF_CLK; - KASSERT(sc->sc_bas.rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(sc->sc_bas.rclk != 0, ("exynos4210_init: Invalid rclk")); uart_lock(sc->sc_hwmtx); - error = s3c24x0_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + error = exynos4210_uart_param(&sc->sc_bas, baudrate, databits, stopbits, parity); uart_unlock(sc->sc_hwmtx); @@ -316,7 +316,7 @@ s3c2410_bus_param(struct uart_softc *sc, } static int -s3c2410_bus_ipend(struct uart_softc *sc) +exynos4210_bus_ipend(struct uart_softc *sc) { uint32_t ints; uint32_t txempty, rxready; @@ -352,31 +352,31 @@ s3c2410_bus_ipend(struct uart_softc *sc) } static int -s3c2410_bus_flush(struct uart_softc *sc, int what) +exynos4210_bus_flush(struct uart_softc *sc, int what) { return (0); } static int -s3c2410_bus_getsig(struct uart_softc *sc) +exynos4210_bus_getsig(struct uart_softc *sc) { return (0); } static int -s3c2410_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +exynos4210_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) { return (EINVAL); } -struct uart_class uart_s3c2410_class = { - "s3c2410 class", - s3c2410_methods, +struct uart_class uart_exynos4210_class = { + "exynos4210 class", + exynos4210_methods, 1, - .uc_ops = &uart_s3c2410_ops, + .uc_ops = &uart_exynos4210_ops, .uc_range = 8, .uc_rclk = 0, }; Modified: head/sys/dev/uart/uart.h ============================================================================== --- head/sys/dev/uart/uart.h Tue Jan 13 14:26:05 2015 (r277131) +++ head/sys/dev/uart/uart.h Tue Jan 13 15:04:28 2015 (r277132) @@ -78,6 +78,7 @@ extern struct uart_class uart_cdnc_class extern struct uart_class uart_ti8250_class __attribute__((weak)); extern struct uart_class uart_vybrid_class __attribute__((weak)); extern struct uart_class at91_usart_class __attribute__((weak)); +extern struct uart_class uart_exynos4210_class __attribute__((weak)); #ifdef FDT struct ofw_compat_data; Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Tue Jan 13 14:26:05 2015 (r277131) +++ head/sys/dev/uart/uart_bus_fdt.c Tue Jan 13 15:04:28 2015 (r277132) @@ -74,7 +74,7 @@ static struct ofw_compat_data compat_dat {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, {"cadence,uart", (uintptr_t)&uart_cdnc_class}, - {"exynos", (uintptr_t)&uart_s3c2410_class}, + {"exynos", (uintptr_t)&uart_exynos4210_class}, {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx53-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx51-uart", (uintptr_t)&uart_imx_class}, From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 15:18:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93C2BB9C; Tue, 13 Jan 2015 15:18:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F3C6CD5; Tue, 13 Jan 2015 15:18:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DFItPm054461; Tue, 13 Jan 2015 15:18:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DFItl0054460; Tue, 13 Jan 2015 15:18:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501131518.t0DFItl0054460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Jan 2015 15:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277133 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:18:55 -0000 Author: emaste Date: Tue Jan 13 15:18:54 2015 New Revision: 277133 URL: https://svnweb.freebsd.org/changeset/base/277133 Log: libdwarf: add missing break Reported by: Coverity CID: 1193315 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libdwarf/dwarf_attrval.c Modified: head/contrib/elftoolchain/libdwarf/dwarf_attrval.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_attrval.c Tue Jan 13 15:04:28 2015 (r277132) +++ head/contrib/elftoolchain/libdwarf/dwarf_attrval.c Tue Jan 13 15:18:54 2015 (r277133) @@ -125,6 +125,7 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar break; case DW_FORM_data4: *valp = (int32_t) at->u[0].s64; + break; case DW_FORM_data8: case DW_FORM_sdata: *valp = at->u[0].s64; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 15:55:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D318D435; Tue, 13 Jan 2015 15:55:15 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4EB175; Tue, 13 Jan 2015 15:55:15 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id tr6so3482074ieb.7; Tue, 13 Jan 2015 07:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mZjPfg49ANjWl3cxw/f2b9aD7uRAgIYwoCVvJZdUXlo=; b=JkxTpglg67KNqTPpbb5PJ3THN8rR6nQx+io5eEsm7PYHiUqV9KJ+SpWVkiO+hWIlPS IomSrHIJYucW3yVyVFYnj/ItgUafFxxs2t6Oz8wM/aQfYx9Tv+UOUS4DuPOkf+SS38bd 9WETRXI1Y0n8k9X9om8ZoDk0zCFqlyauDf0OflOt1qpzHYdQz0CFP0xNNa4sLm/2mUNu WcLDie1yqHPd27IhkIyZglqTrmyefOA60njC5nRn51lx3Og1sk2ajJYBofKFSYVLH2pF TM3YDzW/sbr78+L8A7f66LjDj3+lAvCY6n48059jmGdmcojLtSNOcZt0rL/Lo0ZUppgT hJEg== X-Received: by 10.42.103.7 with SMTP id k7mr29294727ico.33.1421164514661; Tue, 13 Jan 2015 07:55:14 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.71.228 with HTTP; Tue, 13 Jan 2015 07:54:44 -0800 (PST) In-Reply-To: <7A28D39E-7C21-4081-83E0-656F8082D525@fh-muenster.de> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> <7A28D39E-7C21-4081-83E0-656F8082D525@fh-muenster.de> From: Bryan Venteicher Date: Tue, 13 Jan 2015 09:54:44 -0600 X-Google-Sender-Auth: OU3AoN3pAAxE6cfuNEqChxmjqbE Message-ID: Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 To: Michael Tuexen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , John Baldwin , "Bjoern A. Zeeb" , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:55:16 -0000 On Mon, Jan 12, 2015 at 5:20 PM, Michael Tuexen wrote: > > > On 12 Jan 2015, at 18:42, Bjoern A. Zeeb wrote: > > > > > >> On 12 Jan 2015, at 15:51 , John Baldwin wrote: > >> > >> On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > >>> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery > wrote: > >>>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > >>>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>>> > >>>>> > wrote: > >>>>> Bryan- > >>>>> > >>>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher >>>>> > >>>>> > wrote: > >>>>>> Author: bryanv > >>>>>> Date: Fri Oct 10 06:08:59 2014 > >>>>>> New Revision: 272886 > >>>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 > >>>>>> > >>>>>> Log: > >>>>>> Add context pointer and source address to the UDP tunnel callback > >>>>>> > >>>>>> These are needed for the forthcoming vxlan implementation. The > >>>> > >>>> context > >>>> > >>>>>> pointer means we do not have to use a spare pointer field in the > >>>> > >>>> inpcb, > >>>> > >>>>>> and the source address is required to populate vxlan's forwarding > >>>> > >>>> table. > >>>> > >>>>>> While I highly doubt there is an out of tree consumer of the UDP > >>>>>> tunneling callback, this change may be a difficult to eventually > >>>> > >>>> MFC. > >>>> > >>>>> I noticed this comment while doing an MFC of vxlan to my local > tree. > >>>>> Do you think an MFC to 10-STABLE of this change (and vxlan > >>>>> generally) will be feasible? Is there precedent for ABI changes > like > >>>>> this being sanctioned? Could symbol versioning help? > >>>>> > >>>>> I'd like to get some consensus on whether this commit is OK to MFC. > With > >>>>> this commit, vxlan should be an easy to MFC. > >>>> > >>>> Breaking ABI will potentially hurt packages. FreeBSD builds packages > for > >>>> the oldest supported release on a branch. If you break ABI in 10.2 > while > >>>> we are building packages for 10.1 then any packages using these > >>>> interfaces may not work right or result in panics packages with kmod= s. > >>>> Please consider that. > >>> > >>> The only user visible change of this commit would be the addition of = a > >>> field at the end of 'struct udpcb'. I don't think that is a problem, = at > >>> least a similar change didn't prevent the MFC of UDP Lite. > >>> > >>> The kernel part of this changes the UDP tunneling functions which I > guess > >>> there could be a 3rd party module out there, but I very highly doubt > that, > >>> based on how un-useful the previous interface was. > >> > >> Userland should not be impacted by this at all. (Nothing in userland > cares > >> about udpcb's internals.) I think there was only ever one consumer fo= r > the > >> existing UDP tunneling code (bz@ knows what it is). I'm not sure > where it > >> lives. > > > > If you are talking about u_tun_func then it came from SCTP over UDP > tunneling. tuexen and rrs are your friends. > rrs implemented it to support SCTP over UDP over IPv[46]. To be more > precisely, to > receive such packets. > > So I am just being overly cautious and this change is fine to MFC? Best regards > Michael > > > > I was wondering if it could be used similarly for IPsec UDPencap but I > think that went nowhere back then. > > > > =E2=80=94 > > Bjoern A. Zeeb Charles Haddon Spurgeon= : > > "Friendship is one of the sweetest joys of life. Many might have faile= d > > beneath the bitterness of their trial had they not found a friend." > > > > > > > > From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 16:06:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 640F694D; Tue, 13 Jan 2015 16:06:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FAA42F1; Tue, 13 Jan 2015 16:06:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DG6dxB079446; Tue, 13 Jan 2015 16:06:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DG6dJT079445; Tue, 13 Jan 2015 16:06:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131606.t0DG6dJT079445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 16:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277134 - head/sys/boot/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:06:39 -0000 Author: hselasky Date: Tue Jan 13 16:06:38 2015 New Revision: 277134 URL: https://svnweb.freebsd.org/changeset/base/277134 Log: Add new USB template to the USB bootloader module. Modified: head/sys/boot/usb/usbcore.mk Modified: head/sys/boot/usb/usbcore.mk ============================================================================== --- head/sys/boot/usb/usbcore.mk Tue Jan 13 15:18:54 2015 (r277133) +++ head/sys/boot/usb/usbcore.mk Tue Jan 13 16:06:38 2015 (r277134) @@ -142,6 +142,7 @@ KSRCS+= usb_template_mouse.c KSRCS+= usb_template_kbd.c KSRCS+= usb_template_audio.c KSRCS+= usb_template_phone.c +KSRCS+= usb_template_serialnet.c # # USB mass storage support From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 16:18:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 853BCE37; Tue, 13 Jan 2015 16:18:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 711A5614; Tue, 13 Jan 2015 16:18:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DGIWH4084582; Tue, 13 Jan 2015 16:18:32 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DGIWiK084581; Tue, 13 Jan 2015 16:18:32 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501131618.t0DGIWiK084581@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 13 Jan 2015 16:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277135 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:18:32 -0000 Author: np Date: Tue Jan 13 16:18:31 2015 New Revision: 277135 URL: https://svnweb.freebsd.org/changeset/base/277135 Log: cxgbe/iw_cxgbe: fix whitespace nit in r277102. Reported by: stefanf@ Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 16:06:38 2015 (r277134) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 16:18:31 2015 (r277135) @@ -955,7 +955,7 @@ send_mpa_req(struct c4iw_ep *ep) if (mpa_rev_to_use == 2) mpalen += sizeof(struct mpa_v2_conn_params); - mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); if (mpa == NULL) { failed: connect_reply_upcall(ep, -ENOMEM); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 16:37:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AF4597E; Tue, 13 Jan 2015 16:37:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AFA78AB; Tue, 13 Jan 2015 16:37:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DGbj8v094280; Tue, 13 Jan 2015 16:37:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DGbipG094270; Tue, 13 Jan 2015 16:37:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131637.t0DGbipG094270@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 16:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277136 - in head/sys/dev/usb: . controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:37:45 -0000 Author: hselasky Date: Tue Jan 13 16:37:43 2015 New Revision: 277136 URL: https://svnweb.freebsd.org/changeset/base/277136 Log: Resolve a special case deadlock: When two or more threads are simultaneously detaching kernel drivers on the same USB device we can get stuck in the "usb_wait_pending_ref_locked()" function because the conditions needed for allowing detach are not met. The "destroy_dev()" function waits for all system calls involving the given character device to return. Character device system calls may lock the USB enumeration lock, which is also held when "destroy_dev()" is called. This can sometimes lead to a deadlock not noticed by WITNESS. The current solution is to ensure the calling thread is the only one holding the USB enumeration lock and prevent other threads from getting refs while a USB device detach is ongoing. This turned out not to be sufficient. To solve this deadlock we could use "destroy_dev_sched()" to schedule the device destruction in the background, but then we don't know when it is safe to free() the private data of the character device. Instead a callback function is executed by the USB explore process to kill off any leftover USB character devices synchronously after the USB device explore code is finished and the USB enumeration lock is no longer locked. This makes porting easier and also ensures us that character devices must eventually go away after a USB device detach. While at it ensure that "flag_iserror" is only written when "priv_mtx" is locked, which is protecting it. MFC after: 5 days Modified: head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/usb_bus.h head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_device.h Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/controller/usb_controller.c Tue Jan 13 16:37:43 2015 (r277136) @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -219,6 +220,11 @@ usb_detach(device_t dev) usb_proc_mwait(USB_BUS_EXPLORE_PROC(bus), &bus->detach_msg[0], &bus->detach_msg[1]); +#if USB_HAVE_UGEN + /* Wait for cleanup to complete */ + usb_proc_mwait(USB_BUS_EXPLORE_PROC(bus), + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); +#endif USB_BUS_UNLOCK(bus); #if USB_HAVE_PER_BUS_PROCESS @@ -631,6 +637,32 @@ usb_bus_shutdown(struct usb_proc_msg *pm USB_BUS_LOCK(bus); } +/*------------------------------------------------------------------------* + * usb_bus_cleanup + * + * This function is used to cleanup leftover USB character devices. + *------------------------------------------------------------------------*/ +#if USB_HAVE_UGEN +static void +usb_bus_cleanup(struct usb_proc_msg *pm) +{ + struct usb_bus *bus; + struct usb_fs_privdata *pd; + + bus = ((struct usb_bus_msg *)pm)->bus; + + while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) { + + LIST_REMOVE(pd, pd_next); + USB_BUS_UNLOCK(bus); + + usb_destroy_dev_sync(pd); + + USB_BUS_LOCK(bus); + } +} +#endif + static void usb_power_wdog(void *arg) { @@ -813,6 +845,14 @@ usb_attach_sub(device_t dev, struct usb_ bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown; bus->shutdown_msg[1].bus = bus; +#if USB_HAVE_UGEN + LIST_INIT(&bus->pd_cleanup_list); + bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[0].bus = bus; + bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[1].bus = bus; +#endif + #if USB_HAVE_PER_BUS_PROCESS /* Create USB explore and callback processes */ Modified: head/sys/dev/usb/usb_bus.h ============================================================================== --- head/sys/dev/usb/usb_bus.h Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_bus.h Tue Jan 13 16:37:43 2015 (r277136) @@ -27,6 +27,8 @@ #ifndef _USB_BUS_H_ #define _USB_BUS_H_ +struct usb_fs_privdata; + /* * The following structure defines the USB explore message sent to the USB * explore process. @@ -83,6 +85,10 @@ struct usb_bus { struct usb_bus_msg resume_msg[2]; struct usb_bus_msg reset_msg[2]; struct usb_bus_msg shutdown_msg[2]; +#if USB_HAVE_UGEN + struct usb_bus_msg cleanup_msg[2]; + LIST_HEAD(,usb_fs_privdata) pd_cleanup_list; +#endif /* * This mutex protects the USB hardware: */ Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_dev.c Tue Jan 13 16:37:43 2015 (r277136) @@ -293,8 +293,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -365,8 +365,8 @@ usb_unref_device(struct usb_cdev_privdat } if (crd->is_uref) { crd->is_uref = 0; - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } @@ -592,12 +592,12 @@ usb_fifo_free(struct usb_fifo *f) /* decrease refcount */ f->refcount--; - /* prevent any write flush */ - f->flag_iserror = 1; /* need to wait until all callers have exited */ while (f->refcount != 0) { mtx_unlock(&usb_ref_lock); /* avoid LOR */ mtx_lock(f->priv_mtx); + /* prevent write flush, if any */ + f->flag_iserror = 1; /* get I/O thread out of any sleep state */ if (f->flag_sleeping) { f->flag_sleeping = 0; Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_device.c Tue Jan 13 16:37:43 2015 (r277136) @@ -448,68 +448,29 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } -#if USB_HAVE_UGEN -static uint16_t -usb_get_refcount(struct usb_device *udev) -{ - if (usb_proc_is_called_from(USB_BUS_EXPLORE_PROC(udev->bus)) || - usb_proc_is_called_from(USB_BUS_CONTROL_XFER_PROC(udev->bus))) - return (1); - return (2); -} -#endif - /*------------------------------------------------------------------------* - * usb_wait_pending_ref_locked + * usb_wait_pending_refs * * This function will wait for any USB references to go away before - * returning and disable further USB device refcounting on the - * specified USB device. This function is used when detaching a USB - * device. + * returning. This function is used before freeing a USB device. *------------------------------------------------------------------------*/ static void -usb_wait_pending_ref_locked(struct usb_device *udev) +usb_wait_pending_refs(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); + DPRINTF("Refcount = %d\n", (int)udev->refcount); + mtx_lock(&usb_ref_lock); + udev->refcount--; while (1) { /* wait for any pending references to go away */ - mtx_lock(&usb_ref_lock); - if (udev->refcount == refcount) { - /* prevent further refs being taken */ + if (udev->refcount == 0) { + /* prevent further refs being taken, if any */ udev->refcount = USB_DEV_REF_MAX; - mtx_unlock(&usb_ref_lock); break; } - usbd_enum_unlock(udev); cv_wait(&udev->ref_cv, &usb_ref_lock); - mtx_unlock(&usb_ref_lock); - (void) usbd_enum_lock(udev); } -#endif -} - -/*------------------------------------------------------------------------* - * usb_ref_restore_locked - * - * This function will restore the reference count value after a call - * to "usb_wait_pending_ref_locked()". - *------------------------------------------------------------------------*/ -static void -usb_ref_restore_locked(struct usb_device *udev) -{ -#if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); - - /* restore reference count and wakeup waiters, if any */ - mtx_lock(&usb_ref_lock); - udev->refcount = refcount; - cv_broadcast(&udev->ref_cv); mtx_unlock(&usb_ref_lock); #endif } @@ -1186,9 +1147,6 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1215,8 +1173,6 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } - - usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2033,14 +1989,43 @@ usb_make_dev(struct usb_device *udev, co } void +usb_destroy_dev_sync(struct usb_fs_privdata *pd) +{ + DPRINTFN(1, "Destroying device at ugen%d.%d\n", + pd->bus_index, pd->dev_index); + + /* + * Destroy character device synchronously. After this + * all system calls are returned. Can block. + */ + destroy_dev(pd->cdev); + + free(pd, M_USBDEV); +} + +void usb_destroy_dev(struct usb_fs_privdata *pd) { + struct usb_bus *bus; + if (pd == NULL) return; - destroy_dev(pd->cdev); + mtx_lock(&usb_ref_lock); + bus = devclass_get_softc(usb_devclass_ptr, pd->bus_index); + mtx_unlock(&usb_ref_lock); - free(pd, M_USBDEV); + if (bus == NULL) { + usb_destroy_dev_sync(pd); + return; + } + + USB_BUS_LOCK(bus); + LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); + /* get cleanup going */ + usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus), + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); + USB_BUS_UNLOCK(bus); } static void @@ -2191,6 +2176,9 @@ usb_free_device(struct usb_device *udev, &udev->cs_msg[0], &udev->cs_msg[1]); USB_BUS_UNLOCK(udev->bus); + /* wait for all references to go away */ + usb_wait_pending_refs(udev); + sx_destroy(&udev->enum_sx); sx_destroy(&udev->sr_sx); @@ -2676,14 +2664,8 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* free this FIFO */ usb_fifo_free(f); - - /* restore refcount */ - usb_ref_restore_locked(udev); } } #endif Modified: head/sys/dev/usb/usb_device.h ============================================================================== --- head/sys/dev/usb/usb_device.h Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_device.h Tue Jan 13 16:37:43 2015 (r277136) @@ -293,6 +293,7 @@ struct usb_device *usb_alloc_device(devi struct usb_fs_privdata *usb_make_dev(struct usb_device *, const char *, int, int, int, uid_t, gid_t, int); void usb_destroy_dev(struct usb_fs_privdata *); +void usb_destroy_dev_sync(struct usb_fs_privdata *); #endif usb_error_t usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index); From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 16:57:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4059380; Tue, 13 Jan 2015 16:57:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE93AAC6; Tue, 13 Jan 2015 16:57:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DGv3mw004187; Tue, 13 Jan 2015 16:57:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DGv3mB004186; Tue, 13 Jan 2015 16:57:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131657.t0DGv3mB004186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 16:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277137 - stable/10/sys/ofed/include/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:57:03 -0000 Author: hselasky Date: Tue Jan 13 16:57:02 2015 New Revision: 277137 URL: https://svnweb.freebsd.org/changeset/base/277137 Log: MFC r276879: Don't mask the IP-address when doing multicast IP over infiniband. PR: 196631 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/include/net/ip.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/net/ip.h ============================================================================== --- stable/10/sys/ofed/include/net/ip.h Tue Jan 13 16:37:43 2015 (r277136) +++ stable/10/sys/ofed/include/net/ip.h Tue Jan 13 16:57:02 2015 (r277137) @@ -74,7 +74,7 @@ ip_ib_mc_map(uint32_t addr, const unsign buf[13] = 0; buf[14] = 0; buf[15] = 0; - buf[16] = (addr >> 24) & 0x0f; + buf[16] = (addr >> 24) & 0xff; buf[17] = (addr >> 16) & 0xff; buf[18] = (addr >> 8) & 0xff; buf[19] = addr & 0xff; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 17:02:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BBF0562; Tue, 13 Jan 2015 17:02:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 763AABA1; Tue, 13 Jan 2015 17:02:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DH2Me4008505; Tue, 13 Jan 2015 17:02:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DH2Mo3008504; Tue, 13 Jan 2015 17:02:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131702.t0DH2Mo3008504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 17:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277138 - stable/9/sys/ofed/include/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 17:02:22 -0000 Author: hselasky Date: Tue Jan 13 17:02:21 2015 New Revision: 277138 URL: https://svnweb.freebsd.org/changeset/base/277138 Log: MFC r276879: Don't mask the IP-address when doing multicast IP over infiniband. PR: 196631 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/include/net/ip.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/net/ip.h ============================================================================== --- stable/9/sys/ofed/include/net/ip.h Tue Jan 13 16:57:02 2015 (r277137) +++ stable/9/sys/ofed/include/net/ip.h Tue Jan 13 17:02:21 2015 (r277138) @@ -74,7 +74,7 @@ ip_ib_mc_map(uint32_t addr, const unsign buf[13] = 0; buf[14] = 0; buf[15] = 0; - buf[16] = (addr >> 24) & 0x0f; + buf[16] = (addr >> 24) & 0xff; buf[17] = (addr >> 16) & 0xff; buf[18] = (addr >> 8) & 0xff; buf[19] = addr & 0xff; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 17:07:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2C8D86D; Tue, 13 Jan 2015 17:07:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2BFBC0A; Tue, 13 Jan 2015 17:07:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DH7XOw009450; Tue, 13 Jan 2015 17:07:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DH7VkI009435; Tue, 13 Jan 2015 17:07:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131707.t0DH7VkI009435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 17:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277139 - in stable/10/sys/ofed: drivers/infiniband/hw/mlx4 drivers/net/mlx4 include/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 17:07:34 -0000 Author: hselasky Date: Tue Jan 13 17:07:30 2015 New Revision: 277139 URL: https://svnweb.freebsd.org/changeset/base/277139 Log: MFC r276749: Fixes and updates for the Linux compatibility layer: - Remove unsupported "bus" field from "struct pci_dev". - Fix logic inside "pci_enable_msix()" when the number of allocated interrupts are less than the number of available interrupts. - Update header files included from "list.h". - Ensure that "idr_destroy()" removes all entries before destroying the IDR root node(s). - Set the "device->release" function so that we don't leak memory at device destruction. - Use FreeBSD's "log()" function for certain debug printouts. - Put parenthesis around arguments inside the min, max, min_t and max_t macros. - Make sure we don't leak file descriptors by dropping the extra file reference counts done by the FreeBSD kernel when calling falloc() and fget_unlocked(). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/include/linux/file.h stable/10/sys/ofed/include/linux/kernel.h stable/10/sys/ofed/include/linux/linux_compat.c stable/10/sys/ofed/include/linux/linux_idr.c stable/10/sys/ofed/include/linux/list.h stable/10/sys/ofed/include/linux/pci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Jan 13 17:07:30 2015 (r277139) @@ -1613,8 +1613,12 @@ static void mlx4_ib_alloc_eqs(struct mlx eq = 0; mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) { for (j = 0; j < eq_per_port; j++) { - //sprintf(name, "mlx4-ib-%d-%d@%s", - // i, j, dev->pdev->bus->conf.pd_name); + snprintf(name, sizeof(name), "mlx4-ib-%d-%d@%d:%d:%d:%d", i, j, + pci_get_domain(dev->pdev->dev.bsddev), + pci_get_bus(dev->pdev->dev.bsddev), + PCI_SLOT(dev->pdev->devfn), + PCI_FUNC(dev->pdev->devfn)); + /* Set IRQ for specific name (per ring) */ if (mlx4_assign_eq(dev, name, &ibdev->eq_table[eq])) { Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Tue Jan 13 17:07:30 2015 (r277139) @@ -504,10 +504,6 @@ int mlx4_get_val(struct mlx4_dbdf2val *t if (!pdev) return -EINVAL; - if (!pdev->bus) { - return -EINVAL; - } - dbdf = dbdf_to_u64(pci_get_domain(pdev->dev.bsddev), pci_get_bus(pdev->dev.bsddev), PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); Modified: stable/10/sys/ofed/include/linux/file.h ============================================================================== --- stable/10/sys/ofed/include/linux/file.h Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/include/linux/file.h Tue Jan 13 17:07:30 2015 (r277139) @@ -77,7 +77,15 @@ put_unused_fd(unsigned int fd) NULL) != 0) { return; } + /* + * NOTE: We should only get here when the "fd" has not been + * installed, so no need to free the associated Linux file + * structure. + */ fdclose(curthread->td_proc->p_fd, file, fd, curthread); + + /* drop extra reference */ + fdrop(file, curthread); } static inline void @@ -90,7 +98,10 @@ fd_install(unsigned int fd, struct linux file = NULL; } filp->_file = file; - finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + + /* drop the extra reference */ + fput(filp); } static inline int @@ -103,6 +114,8 @@ get_unused_fd(void) error = falloc(curthread, &file, &fd, 0); if (error) return -error; + /* drop the extra reference */ + fdrop(file, curthread); return fd; } Modified: stable/10/sys/ofed/include/linux/kernel.h ============================================================================== --- stable/10/sys/ofed/include/linux/kernel.h Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/include/linux/kernel.h Tue Jan 13 17:07:30 2015 (r277139) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -65,7 +66,23 @@ #define DIV_ROUND_UP howmany #define printk(X...) printf(X) -#define pr_debug(fmt, ...) printk(KERN_DEBUG # fmt, ##__VA_ARGS__) + +/* + * The "pr_debug()" and "pr_devel()" macros should produce zero code + * unless DEBUG is defined: + */ +#ifdef DEBUG +#define pr_debug(fmt, ...) \ + log(LOG_DEBUG, fmt, ##__VA_ARGS__) +#define pr_devel(fmt, ...) \ + log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__) +#else +#define pr_debug(fmt, ...) \ + ({ if (0) log(LOG_DEBUG, fmt, ##__VA_ARGS__); 0; }) +#define pr_devel(fmt, ...) \ + ({ if (0) log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__); 0; }) +#endif + #define udelay(t) DELAY(t) #ifndef pr_fmt @@ -75,45 +92,46 @@ /* * Print a one-time message (analogous to WARN_ONCE() et al): */ -#define printk_once(x...) ({ \ - static bool __print_once; \ - \ - if (!__print_once) { \ - __print_once = true; \ - printk(x); \ - } \ -}) - +#define printk_once(...) do { \ + static bool __print_once; \ + \ + if (!__print_once) { \ + __print_once = true; \ + printk(__VA_ARGS__); \ + } \ +} while (0) +/* + * Log a one-time message (analogous to WARN_ONCE() et al): + */ +#define log_once(level,...) do { \ + static bool __log_once; \ + \ + if (!__log_once) { \ + __log_once = true; \ + log(level, __VA_ARGS__); \ + } \ +} while (0) #define pr_emerg(fmt, ...) \ - printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_EMERG, pr_fmt(fmt), ##__VA_ARGS__) #define pr_alert(fmt, ...) \ - printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_ALERT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_crit(fmt, ...) \ - printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_CRIT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_err(fmt, ...) \ - printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_ERR, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warning(fmt, ...) \ - printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_WARNING, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warn pr_warning #define pr_notice(fmt, ...) \ - printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_NOTICE, pr_fmt(fmt), ##__VA_ARGS__) #define pr_info(fmt, ...) \ - printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_INFO, pr_fmt(fmt), ##__VA_ARGS__) #define pr_info_once(fmt, ...) \ - printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + log_once(LOG_INFO, pr_fmt(fmt), ##__VA_ARGS__) #define pr_cont(fmt, ...) \ - printk(KERN_CONT fmt, ##__VA_ARGS__) - -/* pr_devel() should produce zero code unless DEBUG is defined */ -#ifdef DEBUG -#define pr_devel(fmt, ...) \ - printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) -#else -#define pr_devel(fmt, ...) \ - ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) -#endif + printk(KERN_CONT fmt, ##__VA_ARGS__) #ifndef WARN #define WARN(condition, format...) ({ \ @@ -136,10 +154,10 @@ #define simple_strtol strtol #define kstrtol(a,b,c) ({*(c) = strtol(a,0,b);}) -#define min(x, y) (x < y ? x : y) -#define max(x, y) (x > y ? x : y) -#define min_t(type, _x, _y) (type)(_x) < (type)(_y) ? (type)(_x) : (_y) -#define max_t(type, _x, _y) (type)(_x) > (type)(_y) ? (type)(_x) : (_y) +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) +#define min_t(type, _x, _y) ((type)(_x) < (type)(_y) ? (type)(_x) : (type)(_y)) +#define max_t(type, _x, _y) ((type)(_x) > (type)(_y) ? (type)(_x) : (type)(_y)) /* * This looks more complex than it should be. But we need to Modified: stable/10/sys/ofed/include/linux/linux_compat.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_compat.c Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/include/linux/linux_compat.c Tue Jan 13 17:07:30 2015 (r277139) @@ -174,6 +174,13 @@ kobject_kfree_name(struct kobject *kobj) struct kobj_type kfree_type = { .release = kobject_kfree }; +static void +dev_release(struct device *dev) +{ + pr_debug("dev_release: %s\n", dev_name(dev)); + kfree(dev); +} + struct device * device_create(struct class *class, struct device *parent, dev_t devt, void *drvdata, const char *fmt, ...) @@ -186,6 +193,7 @@ device_create(struct class *class, struc dev->class = class; dev->devt = devt; dev->driver_data = drvdata; + dev->release = dev_release; va_start(args, fmt); kobject_set_name_vargs(&dev->kobj, fmt, args); va_end(args); Modified: stable/10/sys/ofed/include/linux/linux_idr.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_idr.c Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/include/linux/linux_idr.c Tue Jan 13 17:07:30 2015 (r277139) @@ -77,6 +77,7 @@ idr_destroy(struct idr *idr) { struct idr_layer *il, *iln; + idr_remove_all(idr); mtx_lock(&idr->lock); for (il = idr->free; il != NULL; il = iln) { iln = il->ary[0]; Modified: stable/10/sys/ofed/include/linux/list.h ============================================================================== --- stable/10/sys/ofed/include/linux/list.h Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/include/linux/list.h Tue Jan 13 17:07:30 2015 (r277139) @@ -57,6 +57,7 @@ #include #include +#include #include #include Modified: stable/10/sys/ofed/include/linux/pci.h ============================================================================== --- stable/10/sys/ofed/include/linux/pci.h Tue Jan 13 17:02:21 2015 (r277138) +++ stable/10/sys/ofed/include/linux/pci.h Tue Jan 13 17:07:30 2015 (r277139) @@ -149,9 +149,8 @@ struct pci_dev { uint16_t device; uint16_t vendor; unsigned int irq; - unsigned int devfn; - u8 revision; - struct pci_devinfo *bus; /* bus this device is on, equivalent to linux struct pci_bus */ + unsigned int devfn; + u8 revision; }; static inline struct resource_list_entry * @@ -577,6 +576,14 @@ pci_enable_msix(struct pci_dev *pdev, st avail = nreq; if ((error = -pci_alloc_msix(pdev->dev.bsddev, &avail)) != 0) return error; + /* + * Handle case where "pci_alloc_msix()" may allocate less + * interrupts than available and return with no error: + */ + if (avail < nreq) { + pci_release_msi(pdev->dev.bsddev); + return avail; + } rle = _pci_get_rle(pdev, SYS_RES_IRQ, 1); pdev->dev.msix = rle->start; pdev->dev.msix_max = rle->start + avail; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 17:16:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D285AB5C; Tue, 13 Jan 2015 17:16:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2962D05; Tue, 13 Jan 2015 17:16:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DHG90m014137; Tue, 13 Jan 2015 17:16:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DHG73r014128; Tue, 13 Jan 2015 17:16:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131716.t0DHG73r014128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 17:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277140 - in stable/9/sys/ofed: drivers/infiniband/hw/mlx4 drivers/net/mlx4 include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 17:16:10 -0000 Author: hselasky Date: Tue Jan 13 17:16:06 2015 New Revision: 277140 URL: https://svnweb.freebsd.org/changeset/base/277140 Log: MFC r276749: Fixes and updates for the Linux compatibility layer: - Remove unsupported "bus" field from "struct pci_dev". - Fix logic inside "pci_enable_msix()" when the number of allocated interrupts are less than the number of available interrupts. - Update header files included from "list.h". - Ensure that "idr_destroy()" removes all entries before destroying the IDR root node(s). - Set the "device->release" function so that we don't leak memory at device destruction. - Use FreeBSD's "log()" function for certain debug printouts. - Put parenthesis around arguments inside the min, max, min_t and max_t macros. - Make sure we don't leak file descriptors by dropping the extra file reference counts done by the FreeBSD kernel when calling falloc() and fget_unlocked(). Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/include/linux/file.h stable/9/sys/ofed/include/linux/kernel.h stable/9/sys/ofed/include/linux/linux_compat.c stable/9/sys/ofed/include/linux/linux_idr.c stable/9/sys/ofed/include/linux/list.h stable/9/sys/ofed/include/linux/pci.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Jan 13 17:16:06 2015 (r277140) @@ -1613,8 +1613,12 @@ static void mlx4_ib_alloc_eqs(struct mlx eq = 0; mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) { for (j = 0; j < eq_per_port; j++) { - //sprintf(name, "mlx4-ib-%d-%d@%s", - // i, j, dev->pdev->bus->conf.pd_name); + snprintf(name, sizeof(name), "mlx4-ib-%d-%d@%d:%d:%d:%d", i, j, + pci_get_domain(dev->pdev->dev.bsddev), + pci_get_bus(dev->pdev->dev.bsddev), + PCI_SLOT(dev->pdev->devfn), + PCI_FUNC(dev->pdev->devfn)); + /* Set IRQ for specific name (per ring) */ if (mlx4_assign_eq(dev, name, &ibdev->eq_table[eq])) { Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Tue Jan 13 17:16:06 2015 (r277140) @@ -504,10 +504,6 @@ int mlx4_get_val(struct mlx4_dbdf2val *t if (!pdev) return -EINVAL; - if (!pdev->bus) { - return -EINVAL; - } - dbdf = dbdf_to_u64(pci_get_domain(pdev->dev.bsddev), pci_get_bus(pdev->dev.bsddev), PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); Modified: stable/9/sys/ofed/include/linux/file.h ============================================================================== --- stable/9/sys/ofed/include/linux/file.h Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/include/linux/file.h Tue Jan 13 17:16:06 2015 (r277140) @@ -73,7 +73,15 @@ put_unused_fd(unsigned int fd) file = fget_unlocked(curthread->td_proc->p_fd, fd); if (file == NULL) return; + /* + * NOTE: We should only get here when the "fd" has not been + * installed, so no need to free the associated Linux file + * structure. + */ fdclose(curthread->td_proc->p_fd, file, fd, curthread); + + /* drop extra reference */ + fdrop(file, curthread); } static inline void @@ -83,7 +91,10 @@ fd_install(unsigned int fd, struct linux file = fget_unlocked(curthread->td_proc->p_fd, fd); filp->_file = file; - finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + + /* drop the extra reference */ + fput(filp); } static inline int @@ -96,6 +107,8 @@ get_unused_fd(void) error = falloc(curthread, &file, &fd, 0); if (error) return -error; + /* drop the extra reference */ + fdrop(file, curthread); return fd; } Modified: stable/9/sys/ofed/include/linux/kernel.h ============================================================================== --- stable/9/sys/ofed/include/linux/kernel.h Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/include/linux/kernel.h Tue Jan 13 17:16:06 2015 (r277140) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -65,7 +66,23 @@ #define DIV_ROUND_UP howmany #define printk(X...) printf(X) -#define pr_debug(fmt, ...) printk(KERN_DEBUG # fmt, ##__VA_ARGS__) + +/* + * The "pr_debug()" and "pr_devel()" macros should produce zero code + * unless DEBUG is defined: + */ +#ifdef DEBUG +#define pr_debug(fmt, ...) \ + log(LOG_DEBUG, fmt, ##__VA_ARGS__) +#define pr_devel(fmt, ...) \ + log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__) +#else +#define pr_debug(fmt, ...) \ + ({ if (0) log(LOG_DEBUG, fmt, ##__VA_ARGS__); 0; }) +#define pr_devel(fmt, ...) \ + ({ if (0) log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__); 0; }) +#endif + #define udelay(t) DELAY(t) #ifndef pr_fmt @@ -75,45 +92,46 @@ /* * Print a one-time message (analogous to WARN_ONCE() et al): */ -#define printk_once(x...) ({ \ - static bool __print_once; \ - \ - if (!__print_once) { \ - __print_once = true; \ - printk(x); \ - } \ -}) - +#define printk_once(...) do { \ + static bool __print_once; \ + \ + if (!__print_once) { \ + __print_once = true; \ + printk(__VA_ARGS__); \ + } \ +} while (0) +/* + * Log a one-time message (analogous to WARN_ONCE() et al): + */ +#define log_once(level,...) do { \ + static bool __log_once; \ + \ + if (!__log_once) { \ + __log_once = true; \ + log(level, __VA_ARGS__); \ + } \ +} while (0) #define pr_emerg(fmt, ...) \ - printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_EMERG, pr_fmt(fmt), ##__VA_ARGS__) #define pr_alert(fmt, ...) \ - printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_ALERT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_crit(fmt, ...) \ - printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_CRIT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_err(fmt, ...) \ - printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_ERR, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warning(fmt, ...) \ - printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_WARNING, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warn pr_warning #define pr_notice(fmt, ...) \ - printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_NOTICE, pr_fmt(fmt), ##__VA_ARGS__) #define pr_info(fmt, ...) \ - printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_INFO, pr_fmt(fmt), ##__VA_ARGS__) #define pr_info_once(fmt, ...) \ - printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + log_once(LOG_INFO, pr_fmt(fmt), ##__VA_ARGS__) #define pr_cont(fmt, ...) \ - printk(KERN_CONT fmt, ##__VA_ARGS__) - -/* pr_devel() should produce zero code unless DEBUG is defined */ -#ifdef DEBUG -#define pr_devel(fmt, ...) \ - printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) -#else -#define pr_devel(fmt, ...) \ - ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) -#endif + printk(KERN_CONT fmt, ##__VA_ARGS__) #ifndef WARN #define WARN(condition, format...) ({ \ @@ -136,10 +154,10 @@ #define simple_strtol strtol #define kstrtol(a,b,c) ({*(c) = strtol(a,0,b);}) -#define min(x, y) (x < y ? x : y) -#define max(x, y) (x > y ? x : y) -#define min_t(type, _x, _y) (type)(_x) < (type)(_y) ? (type)(_x) : (_y) -#define max_t(type, _x, _y) (type)(_x) > (type)(_y) ? (type)(_x) : (_y) +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) +#define min_t(type, _x, _y) ((type)(_x) < (type)(_y) ? (type)(_x) : (type)(_y)) +#define max_t(type, _x, _y) ((type)(_x) > (type)(_y) ? (type)(_x) : (type)(_y)) /* * This looks more complex than it should be. But we need to Modified: stable/9/sys/ofed/include/linux/linux_compat.c ============================================================================== --- stable/9/sys/ofed/include/linux/linux_compat.c Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/include/linux/linux_compat.c Tue Jan 13 17:16:06 2015 (r277140) @@ -173,6 +173,13 @@ kobject_kfree_name(struct kobject *kobj) struct kobj_type kfree_type = { .release = kobject_kfree }; +static void +dev_release(struct device *dev) +{ + pr_debug("dev_release: %s\n", dev_name(dev)); + kfree(dev); +} + struct device * device_create(struct class *class, struct device *parent, dev_t devt, void *drvdata, const char *fmt, ...) @@ -185,6 +192,7 @@ device_create(struct class *class, struc dev->class = class; dev->devt = devt; dev->driver_data = drvdata; + dev->release = dev_release; va_start(args, fmt); kobject_set_name_vargs(&dev->kobj, fmt, args); va_end(args); Modified: stable/9/sys/ofed/include/linux/linux_idr.c ============================================================================== --- stable/9/sys/ofed/include/linux/linux_idr.c Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/include/linux/linux_idr.c Tue Jan 13 17:16:06 2015 (r277140) @@ -77,6 +77,7 @@ idr_destroy(struct idr *idr) { struct idr_layer *il, *iln; + idr_remove_all(idr); mtx_lock(&idr->lock); for (il = idr->free; il != NULL; il = iln) { iln = il->ary[0]; Modified: stable/9/sys/ofed/include/linux/list.h ============================================================================== --- stable/9/sys/ofed/include/linux/list.h Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/include/linux/list.h Tue Jan 13 17:16:06 2015 (r277140) @@ -57,6 +57,7 @@ #include #include +#include #include #include Modified: stable/9/sys/ofed/include/linux/pci.h ============================================================================== --- stable/9/sys/ofed/include/linux/pci.h Tue Jan 13 17:07:30 2015 (r277139) +++ stable/9/sys/ofed/include/linux/pci.h Tue Jan 13 17:16:06 2015 (r277140) @@ -149,9 +149,8 @@ struct pci_dev { uint16_t device; uint16_t vendor; unsigned int irq; - unsigned int devfn; - u8 revision; - struct pci_devinfo *bus; /* bus this device is on, equivalent to linux struct pci_bus */ + unsigned int devfn; + u8 revision; }; static inline struct resource_list_entry * @@ -577,6 +576,14 @@ pci_enable_msix(struct pci_dev *pdev, st avail = nreq; if ((error = -pci_alloc_msix(pdev->dev.bsddev, &avail)) != 0) return error; + /* + * Handle case where "pci_alloc_msix()" may allocate less + * interrupts than available and return with no error: + */ + if (avail < nreq) { + pci_release_msi(pdev->dev.bsddev); + return avail; + } rle = _pci_get_rle(pdev, SYS_RES_IRQ, 1); pdev->dev.msix = rle->start; pdev->dev.msix_max = rle->start + avail; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 18:03:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92ACB9D3; Tue, 13 Jan 2015 18:03:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65158315; Tue, 13 Jan 2015 18:03:04 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C467B93B; Tue, 13 Jan 2015 13:03:02 -0500 (EST) From: John Baldwin To: "Bjoern A. Zeeb" Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 Date: Mon, 12 Jan 2015 14:54:21 -0500 Message-ID: <9249494.lCU21bPJgC@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> References: <201410100609.s9A690NU067686@svn.freebsd.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 13 Jan 2015 13:03:02 -0500 (EST) Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 18:03:04 -0000 On Monday, January 12, 2015 05:42:34 PM Bjoern A. Zeeb wrote: > > On 12 Jan 2015, at 15:51 , John Baldwin wrote: > > > > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > >> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery wrote: > >>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > >>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>> > >>>> > wrote: > >>>> Bryan- > >>>> > >>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher >>>>> > >>>> > wrote: > >>>>> Author: bryanv > >>>>> Date: Fri Oct 10 06:08:59 2014 > >>>>> New Revision: 272886 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 > >>>>> > >>>>> Log: > >>>>> Add context pointer and source address to the UDP tunnel callback > >>>>> > >>>>> These are needed for the forthcoming vxlan implementation. The > >>> > >>> context > >>> > >>>>> pointer means we do not have to use a spare pointer field in the > >>> > >>> inpcb, > >>> > >>>>> and the source address is required to populate vxlan's forwarding > >>> > >>> table. > >>> > >>>>> While I highly doubt there is an out of tree consumer of the UDP > >>>>> tunneling callback, this change may be a difficult to eventually > >>> > >>> MFC. > >>> > >>>> I noticed this comment while doing an MFC of vxlan to my local tree. > >>>> Do you think an MFC to 10-STABLE of this change (and vxlan > >>>> generally) will be feasible? Is there precedent for ABI changes like > >>>> this being sanctioned? Could symbol versioning help? > >>>> > >>>> I'd like to get some consensus on whether this commit is OK to MFC. > >>>> With > >>>> this commit, vxlan should be an easy to MFC. > >>> > >>> Breaking ABI will potentially hurt packages. FreeBSD builds packages for > >>> the oldest supported release on a branch. If you break ABI in 10.2 while > >>> we are building packages for 10.1 then any packages using these > >>> interfaces may not work right or result in panics packages with kmods. > >>> Please consider that. > >> > >> The only user visible change of this commit would be the addition of a > >> field at the end of 'struct udpcb'. I don't think that is a problem, at > >> least a similar change didn't prevent the MFC of UDP Lite. > >> > >> The kernel part of this changes the UDP tunneling functions which I guess > >> there could be a 3rd party module out there, but I very highly doubt > >> that, > >> based on how un-useful the previous interface was. > > > > Userland should not be impacted by this at all. (Nothing in userland > > cares > > about udpcb's internals.) I think there was only ever one consumer for > > the > > existing UDP tunneling code (bz@ knows what it is). I'm not sure where it > > lives. > > If you are talking about u_tun_func then it came from SCTP over UDP > tunneling. tuexen and rrs are your friends. > > I was wondering if it could be used similarly for IPsec UDPencap but I think > that went nowhere back then. It is the IPsec UDPencap case I was thinking of. If that is a dead end then the only consumer is already in-tree, so in this case I think this is ok to MFC (but remember to bump __FreeBSD_version). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 18:56:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FD63B67; Tue, 13 Jan 2015 18:56:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41BEAB70; Tue, 13 Jan 2015 18:56:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DIuU8M061694; Tue, 13 Jan 2015 18:56:30 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DIuUE0061693; Tue, 13 Jan 2015 18:56:30 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501131856.t0DIuUE0061693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Tue, 13 Jan 2015 18:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277143 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 18:56:30 -0000 Author: jfv Date: Tue Jan 13 18:56:29 2015 New Revision: 277143 URL: https://svnweb.freebsd.org/changeset/base/277143 Log: Complete the RX side RSS code: parse the encoded portion of the RX descriptor to determine the correct hash type. MFC after:1 week Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 18:56:28 2015 (r277142) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 18:56:29 2015 (r277143) @@ -1364,6 +1364,63 @@ ixl_rx_discard(struct rx_ring *rxr, int return; } +#ifdef RSS +/* +** i40e_ptype_to_hash: parse the packet type +** to determine the appropriate hash. +*/ +static inline int +ixl_ptype_to_hash(u8 ptype) +{ + struct i40e_rx_ptype_decoded decoded; + u8 ex = 0 + + decode = decode_rx_desc_ptype(ptype); + ex = decoded.outer_frag; + + if (!decoded.known) + return M_HASHTYPE_OPAQUE; + + if (decoded.outer_ip == I40E_RX_PTYPE_OUTER_L2) + return M_HASHTYPE_OPAQUE; + + /* Note: anything that gets to this point is IP */ + if (decoded.outer_ip_ver == I40E_RX_PTYPE_OUTER_IPV6) { + switch (decoded.inner_prot) { + case I40E_RX_PTYPE_INNER_PROT_TCP: + if (ex) + return M_HASHTYPE_RSS_TCP_IPV6_EX; + else + return M_HASHTYPE_RSS_TCP_IPV6; + case I40E_RX_PTYPE_INNER_PROT_UDP: + if (ex) + return M_HASHTYPE_RSS_UDP_IPV6_EX; + else + return M_HASHTYPE_RSS_UDP_IPV6; + default: + if (ex) + return M_HASHTYPE_RSS_IPV6_EX; + else + return M_HASHTYPE_RSS_IPV6; + } + } + if (decoded.outer_ip_ver == I40E_RX_PTYPE_OUTER_IPV4) { + switch (decoded.inner_prot) { + case I40E_RX_PTYPE_INNER_PROT_TCP: + return M_HASHTYPE_RSS_TCP_IPV4; + case I40E_RX_PTYPE_INNER_PROT_UDP: + if (ex) + return M_HASHTYPE_RSS_UDP_IPV4_EX; + else + return M_HASHTYPE_RSS_UDP_IPV4; + default: + return M_HASHTYPE_RSS_IPV4; + } + } + /* We should never get here!! */ + return M_HASHTYPE_OPAQUE; +} +#endif /* RSS */ /********************************************************************* * @@ -1562,10 +1619,13 @@ ixl_rxeof(struct ixl_queue *que, int cou if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); #ifdef RSS - /* XXX Work in Progress, fix the build for now */ -#endif + sendmp->m_pkthdr.flowid = + le32toh(cur->wb.qword0.hi_dword.rss); + M_HASHTYPE_SET(sendmp, ixl_ptype_to_hash(ptype)); +#else sendmp->m_pkthdr.flowid = que->msix; M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); +#endif } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 19:54:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DBD8FC6; Tue, 13 Jan 2015 19:54:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E488261; Tue, 13 Jan 2015 19:54:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DJsntr090238; Tue, 13 Jan 2015 19:54:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DJslhB090231; Tue, 13 Jan 2015 19:54:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501131954.t0DJslhB090231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 13 Jan 2015 19:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277146 - in head: etc/mtree lib lib/libclang_rt tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 19:54:49 -0000 Author: dim Date: Tue Jan 13 19:54:47 2015 New Revision: 277146 URL: https://svnweb.freebsd.org/changeset/base/277146 Log: Connect libclang_rt to the build, for specific architectures. This contains the libraries for Address Sanitizer (asan), Undefined Behavior Sanitizer (ubsan) and Profile Guided Optimization. ASan is a fast memory error detector. It can detect the following types of bugs: Out-of-bounds accesses to heap, stack and globals Use-after-free Use-after-return (to some extent) Double-free, invalid free Memory leaks (experimental) Typical slowdown introduced by AddressSanitizer is 2x. UBSan is a fast and compatible undefined behavior checker. It enables a number of undefined behavior checks that have small runtime cost and no impact on address space layout or ABI. PLEASE NOTE: the sanitizers still have some rough edges on FreeBSD, particularly on i386. These will hopefully be smoothed out in the coming time. Differential Revision: https://reviews.freebsd.org/D1505 Modified: head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/Makefile head/lib/libclang_rt/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Tue Jan 13 19:38:43 2015 (r277145) +++ head/etc/mtree/BSD.debug.dist Tue Jan 13 19:54:47 2015 (r277146) @@ -24,6 +24,14 @@ games .. lib + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. engines .. i18n Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Tue Jan 13 19:38:43 2015 (r277145) +++ head/etc/mtree/BSD.usr.dist Tue Jan 13 19:54:47 2015 (r277146) @@ -14,6 +14,14 @@ lib aout .. + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. compat aout .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Jan 13 19:38:43 2015 (r277145) +++ head/lib/Makefile Tue Jan 13 19:54:47 2015 (r277146) @@ -13,6 +13,7 @@ SUBDIR_ORDERED= ${_csu} \ libc \ libc_nonshared \ libcompiler_rt \ + ${_libclang_rt} \ ${_libcplusplus} \ ${_libcxxrt} \ libelf \ @@ -211,6 +212,15 @@ _libcom_err= libcom_err _libldns= libldns .endif +# The libraries under libclang_rt can only be built by clang, and only make +# sense to build when clang is enabled at all. Furthermore, they can only be +# built for certain architectures. +.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ + (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb")) +_libclang_rt= libclang_rt +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ Modified: head/lib/libclang_rt/Makefile ============================================================================== --- head/lib/libclang_rt/Makefile Tue Jan 13 19:38:43 2015 (r277145) +++ head/lib/libclang_rt/Makefile Tue Jan 13 19:54:47 2015 (r277146) @@ -1,10 +1,18 @@ # $FreeBSD$ -SUBDIR= asan\ - asan_cxx\ - profile\ - san\ - ubsan\ - ubsan_cxx +.include + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= asan\ + asan_cxx\ + san\ + ubsan\ + ubsan_cxx +.endif + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") +SUBDIR+= profile +.endif .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Jan 13 19:38:43 2015 (r277145) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Jan 13 19:54:47 2015 (r277146) @@ -527,6 +527,23 @@ OLD_FILES+=usr/include/clang/3.5.0/xmmin OLD_FILES+=usr/include/clang/3.5.0/xopintrin.h OLD_DIRS+=usr/include/clang/3.5.0 OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.5.0/lib +OLD_DIRS+=usr/lib/clang/3.5.0 +OLD_DIRS+=usr/lib/clang OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT OLD_DIRS+=usr/share/doc/llvm/clang OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 20:37:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36F78A1A; Tue, 13 Jan 2015 20:37:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0901592E; Tue, 13 Jan 2015 20:37:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DKbvUh009966; Tue, 13 Jan 2015 20:37:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DKbvb1009965; Tue, 13 Jan 2015 20:37:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501132037.t0DKbvb1009965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 13 Jan 2015 20:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277147 - head/lib/libmagic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 20:37:58 -0000 Author: dim Date: Tue Jan 13 20:37:57 2015 New Revision: 277147 URL: https://svnweb.freebsd.org/changeset/base/277147 Log: Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1518 Modified: head/lib/libmagic/config.h Modified: head/lib/libmagic/config.h ============================================================================== --- head/lib/libmagic/config.h Tue Jan 13 19:54:47 2015 (r277146) +++ head/lib/libmagic/config.h Tue Jan 13 20:37:57 2015 (r277147) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 1000002 || (__FreeBSD_version < 1000000 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -102,7 +112,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -195,7 +207,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -235,7 +249,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 1 From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 22:00:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CBEA222; Tue, 13 Jan 2015 22:00:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77B99267; Tue, 13 Jan 2015 22:00:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DM0nH0051706; Tue, 13 Jan 2015 22:00:49 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DM0lCO051690; Tue, 13 Jan 2015 22:00:47 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501132200.t0DM0lCO051690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 13 Jan 2015 22:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277149 - in head/sys/amd64: include vmm vmm/amd vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:00:49 -0000 Author: neel Date: Tue Jan 13 22:00:47 2015 New Revision: 277149 URL: https://svnweb.freebsd.org/changeset/base/277149 Log: 'struct vm_exception' was intended to be used only as the collateral for the VM_INJECT_EXCEPTION ioctl. However it morphed into other uses like keeping track pending exceptions for a vcpu. This in turn causes confusion because some fields in 'struct vm_exception' like 'vcpuid' make sense only in the ioctl context. It also makes it harder to add or remove structure fields. Fix this by using 'struct vm_exception' only to communicate information from userspace to vmm.ko when injecting an exception. Also, add a field 'restart_instruction' to 'struct vm_exception'. This field is set to '1' for exceptions where the faulting instruction is restarted after the exception is handled. MFC after: 1 week Modified: head/sys/amd64/include/vmm.h head/sys/amd64/include/vmm_dev.h head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/include/vmm.h Tue Jan 13 22:00:47 2015 (r277149) @@ -289,7 +289,7 @@ struct vpmtmr *vm_pmtmr(struct vm *vm); struct vrtc *vm_rtc(struct vm *vm); /* - * Inject exception 'vme' into the guest vcpu. This function returns 0 on + * Inject exception 'vector' into the guest vcpu. This function returns 0 on * success and non-zero on failure. * * Wrapper functions like 'vm_inject_gp()' should be preferred to calling @@ -299,7 +299,8 @@ struct vrtc *vm_rtc(struct vm *vm); * This function should only be called in the context of the thread that is * executing this vcpu. */ -int vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *vme); +int vm_inject_exception(struct vm *vm, int vcpuid, int vector, int err_valid, + uint32_t errcode, int restart_instruction); /* * This function is called after a VM-exit that occurred during exception or @@ -628,4 +629,6 @@ vm_inject_ss(void *vm, int vcpuid, int e void vm_inject_pf(void *vm, int vcpuid, int error_code, uint64_t cr2); +int vm_restart_instruction(void *vm, int vcpuid); + #endif /* _VMM_H_ */ Modified: head/sys/amd64/include/vmm_dev.h ============================================================================== --- head/sys/amd64/include/vmm_dev.h Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/include/vmm_dev.h Tue Jan 13 22:00:47 2015 (r277149) @@ -63,6 +63,7 @@ struct vm_exception { int vector; uint32_t error_code; int error_code_valid; + int restart_instruction; }; struct vm_lapic_msi { Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/amd/svm.c Tue Jan 13 22:00:47 2015 (r277149) @@ -1201,7 +1201,6 @@ svm_vmexit(struct svm_softc *svm_sc, int struct vmcb_state *state; struct vmcb_ctrl *ctrl; struct svm_regctx *ctx; - struct vm_exception exception; uint64_t code, info1, info2, val; uint32_t eax, ecx, edx; int error, errcode_valid, handled, idtvec, reflect; @@ -1315,6 +1314,7 @@ svm_vmexit(struct svm_softc *svm_sc, int /* fallthru */ default: errcode_valid = 0; + info1 = 0; break; } KASSERT(vmexit->inst_length == 0, ("invalid inst_length (%d) " @@ -1323,17 +1323,10 @@ svm_vmexit(struct svm_softc *svm_sc, int if (reflect) { /* Reflect the exception back into the guest */ - bzero(&exception, sizeof(struct vm_exception)); - exception.vector = idtvec; - if (errcode_valid) { - exception.error_code = info1; - exception.error_code_valid = 1; - } VCPU_CTR2(svm_sc->vm, vcpu, "Reflecting exception " - "%d/%#x into the guest", exception.vector, - exception.error_code); - error = vm_inject_exception(svm_sc->vm, vcpu, - &exception); + "%d/%#x into the guest", idtvec, (int)info1); + error = vm_inject_exception(svm_sc->vm, vcpu, idtvec, + errcode_valid, info1, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); } Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/intel/vmx.c Tue Jan 13 22:00:47 2015 (r277149) @@ -1784,7 +1784,7 @@ vmexit_inst_emul(struct vm_exit *vmexit, { struct vm_guest_paging *paging; uint32_t csar; - + paging = &vmexit->u.inst_emul.paging; vmexit->exitcode = VM_EXITCODE_INST_EMUL; @@ -2073,12 +2073,11 @@ emulate_rdmsr(struct vmx *vmx, int vcpui static int vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) { - int error, handled, in; + int error, errcode, errcode_valid, handled, in; struct vmxctx *vmxctx; struct vlapic *vlapic; struct vm_inout_str *vis; struct vm_task_switch *ts; - struct vm_exception vmexc; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, intr_info, inst_info; uint32_t intr_type, intr_vec, reason; uint64_t exitintinfo, qual, gpa; @@ -2263,6 +2262,7 @@ vmx_exit_process(struct vmx *vmx, int vc case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); vmexit->exitcode = VM_EXITCODE_MTRAP; + vmexit->inst_length = 0; break; case EXIT_REASON_PAUSE: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_PAUSE, 1); @@ -2389,15 +2389,15 @@ vmx_exit_process(struct vmx *vmx, int vc vmcs_write(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); /* Reflect all other exceptions back into the guest */ - bzero(&vmexc, sizeof(struct vm_exception)); - vmexc.vector = intr_vec; + errcode_valid = errcode = 0; if (intr_info & VMCS_INTR_DEL_ERRCODE) { - vmexc.error_code_valid = 1; - vmexc.error_code = vmcs_read(VMCS_EXIT_INTR_ERRCODE); + errcode_valid = 1; + errcode = vmcs_read(VMCS_EXIT_INTR_ERRCODE); } VCPU_CTR2(vmx->vm, vcpu, "Reflecting exception %d/%#x into " - "the guest", vmexc.vector, vmexc.error_code); - error = vm_inject_exception(vmx->vm, vcpu, &vmexc); + "the guest", intr_vec, errcode); + error = vm_inject_exception(vmx->vm, vcpu, intr_vec, + errcode_valid, errcode, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); return (1); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/vmm.c Tue Jan 13 22:00:47 2015 (r277149) @@ -101,8 +101,10 @@ struct vcpu { uint64_t exitintinfo; /* (i) events pending at VM exit */ int nmi_pending; /* (i) NMI pending */ int extint_pending; /* (i) INTR pending */ - struct vm_exception exception; /* (x) exception collateral */ int exception_pending; /* (i) exception pending */ + int exc_vector; /* (x) exception collateral */ + int exc_errcode_valid; + uint32_t exc_errcode; struct savefpu *guestfpu; /* (a,i) guest fpu state */ uint64_t guest_xcr0; /* (i) guest %xcr0 register */ void *stats; /* (a,i) statistics */ @@ -1223,7 +1225,7 @@ vm_handle_paging(struct vm *vm, int vcpu return (EFAULT); done: /* restart execution at the faulting instruction */ - vme->inst_length = 0; + vm_restart_instruction(vm, vcpuid); return (0); } @@ -1526,6 +1528,20 @@ restart: } int +vm_restart_instruction(void *arg, int vcpuid) +{ + struct vcpu *vcpu; + struct vm *vm = arg; + + if (vcpuid < 0 || vcpuid >= VM_MAXCPU) + return (EINVAL); + + vcpu = &vm->vcpu[vcpuid]; + vcpu->exitinfo.inst_length = 0; + return (0); +} + +int vm_exit_intinfo(struct vm *vm, int vcpuid, uint64_t info) { struct vcpu *vcpu; @@ -1655,11 +1671,11 @@ vcpu_exception_intinfo(struct vcpu *vcpu uint64_t info = 0; if (vcpu->exception_pending) { - info = vcpu->exception.vector & 0xff; + info = vcpu->exc_vector & 0xff; info |= VM_INTINFO_VALID | VM_INTINFO_HWEXCEPTION; - if (vcpu->exception.error_code_valid) { + if (vcpu->exc_errcode_valid) { info |= VM_INTINFO_DEL_ERRCODE; - info |= (uint64_t)vcpu->exception.error_code << 32; + info |= (uint64_t)vcpu->exc_errcode << 32; } } return (info); @@ -1684,7 +1700,7 @@ vm_entry_intinfo(struct vm *vm, int vcpu info2 = vcpu_exception_intinfo(vcpu); vcpu->exception_pending = 0; VCPU_CTR2(vm, vcpuid, "Exception %d delivered: %#lx", - vcpu->exception.vector, info2); + vcpu->exc_vector, info2); } if ((info1 & VM_INTINFO_VALID) && (info2 & VM_INTINFO_VALID)) { @@ -1722,7 +1738,8 @@ vm_get_intinfo(struct vm *vm, int vcpuid } int -vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *exception) +vm_inject_exception(struct vm *vm, int vcpuid, int vector, int errcode_valid, + uint32_t errcode, int restart_instruction) { struct vcpu *vcpu; int error; @@ -1730,7 +1747,7 @@ vm_inject_exception(struct vm *vm, int v if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if (exception->vector < 0 || exception->vector >= 32) + if (vector < 0 || vector >= 32) return (EINVAL); /* @@ -1738,15 +1755,14 @@ vm_inject_exception(struct vm *vm, int v * the guest. It is a derived exception that results from specific * combinations of nested faults. */ - if (exception->vector == IDT_DF) + if (vector == IDT_DF) return (EINVAL); vcpu = &vm->vcpu[vcpuid]; if (vcpu->exception_pending) { VCPU_CTR2(vm, vcpuid, "Unable to inject exception %d due to " - "pending exception %d", exception->vector, - vcpu->exception.vector); + "pending exception %d", vector, vcpu->exc_vector); return (EBUSY); } @@ -1760,9 +1776,14 @@ vm_inject_exception(struct vm *vm, int v KASSERT(error == 0, ("%s: error %d clearing interrupt shadow", __func__, error)); + if (restart_instruction) + vm_restart_instruction(vm, vcpuid); + vcpu->exception_pending = 1; - vcpu->exception = *exception; - VCPU_CTR1(vm, vcpuid, "Exception %d pending", exception->vector); + vcpu->exc_vector = vector; + vcpu->exc_errcode = errcode; + vcpu->exc_errcode_valid = errcode_valid; + VCPU_CTR1(vm, vcpuid, "Exception %d pending", vector); return (0); } @@ -1770,28 +1791,15 @@ void vm_inject_fault(void *vmarg, int vcpuid, int vector, int errcode_valid, int errcode) { - struct vm_exception exception; - struct vm_exit *vmexit; struct vm *vm; - int error; + int error, restart_instruction; vm = vmarg; + restart_instruction = 1; - exception.vector = vector; - exception.error_code = errcode; - exception.error_code_valid = errcode_valid; - error = vm_inject_exception(vm, vcpuid, &exception); + error = vm_inject_exception(vm, vcpuid, vector, errcode_valid, + errcode, restart_instruction); KASSERT(error == 0, ("vm_inject_exception error %d", error)); - - /* - * A fault-like exception allows the instruction to be restarted - * after the exception handler returns. - * - * By setting the inst_length to 0 we ensure that the instruction - * pointer remains at the faulting instruction. - */ - vmexit = vm_exitinfo(vm, vcpuid); - vmexit->inst_length = 0; } void Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/vmm_dev.c Tue Jan 13 22:00:47 2015 (r277149) @@ -310,7 +310,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c break; case VM_INJECT_EXCEPTION: vmexc = (struct vm_exception *)data; - error = vm_inject_exception(sc->vm, vmexc->cpuid, vmexc); + error = vm_inject_exception(sc->vm, vmexc->cpuid, + vmexc->vector, vmexc->error_code_valid, vmexc->error_code, + vmexc->restart_instruction); break; case VM_INJECT_NMI: vmnmi = (struct vm_nmi *)data; From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 22:13:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DA396D5; Tue, 13 Jan 2015 22:13:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FDF13B4; Tue, 13 Jan 2015 22:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DMDVIu059619; Tue, 13 Jan 2015 22:13:31 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DMDUFs059616; Tue, 13 Jan 2015 22:13:30 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501132213.t0DMDUFs059616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Tue, 13 Jan 2015 22:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277151 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:13:31 -0000 Author: jfv Date: Tue Jan 13 22:13:30 2015 New Revision: 277151 URL: https://svnweb.freebsd.org/changeset/base/277151 Log: Cleanup some bogus code in the RSS config, and add the include for the rss option file. And bump the version. MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Tue Jan 13 22:13:03 2015 (r277150) +++ head/sys/dev/ixl/if_ixl.c Tue Jan 13 22:13:30 2015 (r277151) @@ -41,7 +41,7 @@ /********************************************************************* * Driver version *********************************************************************/ -char ixl_driver_version[] = "1.3.0"; +char ixl_driver_version[] = "1.3.1"; /********************************************************************* * PCI Device ID Table @@ -3212,12 +3212,12 @@ static void ixl_config_rss(struct ixl_vs set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6); if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); - if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) - set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; #else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 22:13:03 2015 (r277150) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 22:13:30 2015 (r277151) @@ -40,6 +40,7 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" /* Local Prototypes */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 22:41:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAFD32EB; Tue, 13 Jan 2015 22:41:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC9B916; Tue, 13 Jan 2015 22:41:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DMfcZ9073072; Tue, 13 Jan 2015 22:41:38 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DMfcEO073071; Tue, 13 Jan 2015 22:41:38 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201501132241.t0DMfcEO073071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Tue, 13 Jan 2015 22:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277154 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:41:39 -0000 Author: wblock (doc committer) Date: Tue Jan 13 22:41:38 2015 New Revision: 277154 URL: https://svnweb.freebsd.org/changeset/base/277154 Log: MFC r276426: Remove the svn:executable property from iscsi.4. Modified: Directory Properties: stable/10/ (props changed) stable/10/share/man/man4/iscsi.4 (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Jan 13 22:51:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40492668; Tue, 13 Jan 2015 22:51:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B88EA25; Tue, 13 Jan 2015 22:51:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0DMpjEY077109; Tue, 13 Jan 2015 22:51:45 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DMpjCp077108; Tue, 13 Jan 2015 22:51:45 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201501132251.t0DMpjCp077108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Tue, 13 Jan 2015 22:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277155 - stable/10/usr.sbin/binmiscctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:51:45 -0000 Author: wblock (doc committer) Date: Tue Jan 13 22:51:44 2015 New Revision: 277155 URL: https://svnweb.freebsd.org/changeset/base/277155 Log: MFC r276419: Move the explanation for examples before the example itself. Add numerous QEMU examples and explanations supplied by sbruno, with thanks to Ingo Schwarze for help with the mdoc markup. Code, text, testing, proofreading, cinematography, stunts, and the haunting theme song supplied by sbruno. Modified: stable/10/usr.sbin/binmiscctl/binmiscctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/binmiscctl/binmiscctl.8 ============================================================================== --- stable/10/usr.sbin/binmiscctl/binmiscctl.8 Tue Jan 13 22:41:38 2015 (r277154) +++ stable/10/usr.sbin/binmiscctl/binmiscctl.8 Tue Jan 13 22:51:44 2015 (r277155) @@ -27,8 +27,8 @@ .\" .\" Support for miscellaneous binary image activators .\" -.Dd April 10, 2014 -.Dt BINMISCCTL 8 +.Dd December 30, 2014 +.Dt BINMISCCTL 8 .Os .Sh NAME .Nm binmiscctl @@ -142,50 +142,152 @@ Enable the activator entry identified wi .It Cm lookup Ar name Look up and print out the activator entry identified with .Ar name . -.It Cm list +.It Cm list Take a snapshot and print all the activator entries currently configured. .El .Sh EXAMPLES -.Bl -# binmiscctl add llvmbc --interpreter ''/usr/bin/lli --fake-argv0=#a'' \\ - --magic ''BC\\xc0\\xde'' --size 4 --set-enabled -.El -.Pp Add an image activator to run the LLVM interpreter (lli) on bitcode -compiled files. +compiled files: +.Bd -ragged -offset indent +# binmiscctl add llvmbc --interpreter ''/usr/bin/lli --fake-argv0=#a'' +--magic ''BC\\xc0\\xde'' --size 4 --set-enabled +.Ed +.Pp .Ar #a -gets replaced with the old +is replaced with the old .Dv argv0 value so that 'lli' can fake its .Dv argv0 . Set its state to enabled. .Pp +Set the state of the +.Ar llvmbc +image activator to disabled: .Dl # binmiscctl disable llvmbc .Pp -Set the state of the +Set the state of the .Ar llvmbc -image activator to disabled. -.Pp +image activator to enabled: .Dl # binmiscctl enable llvmbc .Pp -Set the state of the +Delete the .Ar llvmbc -image activator to enabled. -.Pp +image activator: .Dl # binmiscctl remove llvmbc .Pp -Delete the +Look up and list the record for the .Ar llvmbc -image activator. -.Pp +image activator: .Dl # binmiscctl lookup llvmbc .Pp -Look up and list the record for the -.Ar llvmbc -image activator. +Add QEMU bsd-user program as an image activator for ARM little-endian binaries: +.Bd -literal -offset indent +# binmiscctl add armelf \e + --interpreter "/usr/local/bin/qemu-arm-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex01\ex01\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex28\ex00" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exfe\exff\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +Add QEMU bsd-user program as an image activator for ARM big-endian binaries: +.Bd -literal -offset indent +# binmiscctl add armebelf \e + --interpreter "/usr/local/bin/qemu-arm-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex01\ex02\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex28" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +Add QEMU bsd-user program as an image activator for MIPS32 binaries: +.Bd -literal -offset indent +# binmiscctl add mips32 \e + --interpreter "/usr/local/bin/qemu-mips-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex01\ex02\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex08" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +Add QEMU bsd-user program as an image activator for MIPS64 binaries: +.Bd -literal -offset indent +# binmiscctl add mips64 \e + --interpreter "/usr/local/bin/qemu-mips64-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex02\ex02\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex08" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +Add QEMU bsd-user program as an image activator for PowerPC binaries: +.Bd -literal -offset indent +# binmiscctl add powerpc \e + --interpreter "/usr/local/bin/qemu-ppc-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex01\ex02\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex14" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +Add QEMU bsd-user program as an image activator for PowerPC64 binaries: +.Bd -literal -offset indent +# binmiscctl add powerpc64 \e + --interpreter "/usr/local/bin/qemu-ppc64-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex01\ex02\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex15" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +Add QEMU bsd-user program as an image activator for SPARC64 binaries: +.Bd -literal -offset indent +# binmiscctl add sparc64 \e + --interpreter "/usr/local/bin/qemu-sparc64-static" \e + --magic "\ex7f\ex45\ex4c\ex46\ex02\ex02\ex01\ex00\ex00\ex00\e + \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex2b" \e + --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e + \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e + --size 20 --set-enabled +.Ed +.Pp +.Ss "Create and use an ARMv6 chroot on an AMD64 host" +Use an existing source tree to build a chroot host with architecture +overrides: +.Bd -literal +D=/path/to/chroot +cd /usr/src +mkdir -p $D +make world TARGET=arm TARGET_ARCH=armv6 DESTDIR=$D +make distribution TARGET=arm TARGET_ARCH=armv6 DESTDIR=$D +.Ed +.Pp +With +.Pa emulators/qemu-user-static +from the +.Fx +Ports Collection, the emulator must be copied into the jail path +specified in the binmiscctl command. +Using the example above: +.Bd -literal +mkdir $D/usr/local/bin +cp /usr/local/bin/qemu-arm-static $D/usr/local/bin +.Ed +.Pp +Now the user can chroot into the environment normally, as root: +.Bd -literal +chroot $D +.Ed .Sh SEE ALSO .Xr lli 1 , -.Xr execve 2 +.Xr execve 2 , +.Xr jail 8 .Sh HISTORY The .Cm binmiscctl From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 01:23:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8058CEAA; Wed, 14 Jan 2015 01:23:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51D1BAA1; Wed, 14 Jan 2015 01:23:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E1NqL1049770; Wed, 14 Jan 2015 01:23:52 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E1NpF6049767; Wed, 14 Jan 2015 01:23:51 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201501140123.t0E1NpF6049767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Wed, 14 Jan 2015 01:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277156 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 01:23:52 -0000 Author: ganbold Date: Wed Jan 14 01:23:50 2015 New Revision: 277156 URL: https://svnweb.freebsd.org/changeset/base/277156 Log: Correct cpu type, it was rather Cortex A12 R0. Approved by: stas (mentor) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Jan 13 22:51:44 2015 (r277155) +++ head/sys/arm/arm/cpufunc.c Wed Jan 14 01:23:50 2015 (r277156) @@ -1067,11 +1067,11 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA9R1 || cputype == CPU_ID_CORTEXA9R2 || cputype == CPU_ID_CORTEXA9R3 || + cputype == CPU_ID_CORTEXA12R0 || cputype == CPU_ID_CORTEXA15R0 || cputype == CPU_ID_CORTEXA15R1 || cputype == CPU_ID_CORTEXA15R2 || cputype == CPU_ID_CORTEXA15R3 || - cputype == CPU_ID_CORTEXA17 || cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Tue Jan 13 22:51:44 2015 (r277155) +++ head/sys/arm/arm/identcpu.c Wed Jan 14 01:23:50 2015 (r277156) @@ -185,6 +185,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA9R3, CPU_CLASS_CORTEXA, "Cortex A9-r3", generic_steppings }, + { CPU_ID_CORTEXA12R0, CPU_CLASS_CORTEXA, "Cortex A12-r0", + generic_steppings }, { CPU_ID_CORTEXA15R0, CPU_CLASS_CORTEXA, "Cortex A15-r0", generic_steppings }, { CPU_ID_CORTEXA15R1, CPU_CLASS_CORTEXA, "Cortex A15-r1", @@ -193,8 +195,6 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEXA, "Cortex A15-r3", generic_steppings }, - { CPU_ID_CORTEXA17, CPU_CLASS_CORTEXA, "Cortex A17", - generic_steppings }, { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", generic_steppings }, Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Tue Jan 13 22:51:44 2015 (r277155) +++ head/sys/arm/include/armreg.h Wed Jan 14 01:23:50 2015 (r277156) @@ -133,11 +133,11 @@ #define CPU_ID_CORTEXA9R1 0x411fc090 #define CPU_ID_CORTEXA9R2 0x412fc090 #define CPU_ID_CORTEXA9R3 0x413fc090 +#define CPU_ID_CORTEXA12R0 0x410fc0d0 #define CPU_ID_CORTEXA15R0 0x410fc0f0 #define CPU_ID_CORTEXA15R1 0x411fc0f0 #define CPU_ID_CORTEXA15R2 0x412fc0f0 #define CPU_ID_CORTEXA15R3 0x413fc0f0 -#define CPU_ID_CORTEXA17 0x410fc0d0 #define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 02:18:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FF4B7CA; Wed, 14 Jan 2015 02:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B370F26; Wed, 14 Jan 2015 02:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E2IUMu073617; Wed, 14 Jan 2015 02:18:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E2IUQY073616; Wed, 14 Jan 2015 02:18:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501140218.t0E2IUQY073616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 14 Jan 2015 02:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277157 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 02:18:30 -0000 Author: nwhitehorn Date: Wed Jan 14 02:18:29 2015 New Revision: 277157 URL: https://svnweb.freebsd.org/changeset/base/277157 Log: Do not remap Open Firmware mappings covered by the direct map. It's pointless and wastes resources. MFC after: 1 week Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Jan 14 01:23:50 2015 (r277156) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Jan 14 02:18:29 2015 (r277157) @@ -224,6 +224,8 @@ uma_zone_t moea64_mpvo_zone; /* zone for #define BPVO_POOL_SIZE 327680 static struct pvo_entry *moea64_bpvo_pool; static int moea64_bpvo_pool_index = 0; +SYSCTL_INT(_machdep, OID_AUTO, moea64_allocated_bpvo_entries, CTLFLAG_RD, + &moea64_bpvo_pool_index, 0, ""); #define VSID_NBPW (sizeof(u_int32_t) * 8) #ifdef __powerpc64__ @@ -534,6 +536,11 @@ moea64_add_ofw_mappings(mmu_t mmup, phan DISABLE_TRANS(msr); for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { + /* If this address is direct-mapped, skip remapping */ + if (hw_direct_map && translations[i].om_va == pa_base && + moea64_calc_wimg(pa_base + off, VM_MEMATTR_DEFAULT) == LPTE_M) + continue; + if (moea64_pvo_find_va(kernel_pmap, translations[i].om_va + off) != NULL) continue; From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 03:52:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05766E26; Wed, 14 Jan 2015 03:52:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5F51C47; Wed, 14 Jan 2015 03:52:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E3qfIH020360; Wed, 14 Jan 2015 03:52:41 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E3qfHq020359; Wed, 14 Jan 2015 03:52:41 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501140352.t0E3qfHq020359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 14 Jan 2015 03:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277158 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 03:52:42 -0000 Author: jamie Date: Wed Jan 14 03:52:41 2015 New Revision: 277158 URL: https://svnweb.freebsd.org/changeset/base/277158 Log: Don't set prison's pr_ip4s or pr_ip6s to -1. PR: 196474 MFC after: 3 days Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Jan 14 02:18:29 2015 (r277157) +++ head/sys/kern/kern_jail.c Wed Jan 14 03:52:41 2015 (r277158) @@ -800,7 +800,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET error = vfs_getopt(opts, "ip4.addr", &op, &ip4s); if (error == ENOENT) - ip4s = (pr_flags & PR_IP4_DISABLE) ? 0 : -1; + ip4s = 0; else if (error != 0) goto done_free; else if (ip4s & (sizeof(*ip4) - 1)) { @@ -858,7 +858,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET6 error = vfs_getopt(opts, "ip6.addr", &op, &ip6s); if (error == ENOENT) - ip6s = (pr_flags & PR_IP6_DISABLE) ? 0 : -1; + ip6s = 0; else if (error != 0) goto done_free; else if (ip6s & (sizeof(*ip6) - 1)) { From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 04:50:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2DF4950; Wed, 14 Jan 2015 04:50:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEED91BF; Wed, 14 Jan 2015 04:50:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E4oTsg045223; Wed, 14 Jan 2015 04:50:29 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E4oTLn045220; Wed, 14 Jan 2015 04:50:29 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501140450.t0E4oTLn045220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 14 Jan 2015 04:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277159 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 04:50:30 -0000 Author: jamie Date: Wed Jan 14 04:50:28 2015 New Revision: 277159 URL: https://svnweb.freebsd.org/changeset/base/277159 Log: Remove the prison flags PR_IP4_DISABLE and PR_IP6_DISABLE, which have been write-only for as long as they've existed. Modified: head/sys/kern/kern_jail.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Jan 14 03:52:41 2015 (r277158) +++ head/sys/kern/kern_jail.c Wed Jan 14 04:50:28 2015 (r277159) @@ -187,10 +187,10 @@ struct jailsys_flags { { "vnet", 0, PR_VNET }, #endif #ifdef INET - { "ip4", PR_IP4_USER | PR_IP4_DISABLE, PR_IP4_USER }, + { "ip4", PR_IP4_USER, PR_IP4_USER }, #endif #ifdef INET6 - { "ip6", PR_IP6_USER | PR_IP6_DISABLE, PR_IP6_USER }, + { "ip6", PR_IP6_USER, PR_IP6_USER }, #endif }; const size_t pr_flag_jailsys_size = sizeof(pr_flag_jailsys); @@ -807,11 +807,9 @@ kern_jail_set(struct thread *td, struct error = EINVAL; goto done_free; } else { - ch_flags |= PR_IP4_USER | PR_IP4_DISABLE; - if (ip4s == 0) - pr_flags |= PR_IP4_USER | PR_IP4_DISABLE; - else { - pr_flags = (pr_flags & ~PR_IP4_DISABLE) | PR_IP4_USER; + ch_flags |= PR_IP4_USER; + pr_flags |= PR_IP4_USER; + if (ip4s > 0) { ip4s /= sizeof(*ip4); if (ip4s > jail_max_af_ips) { error = EINVAL; @@ -865,11 +863,9 @@ kern_jail_set(struct thread *td, struct error = EINVAL; goto done_free; } else { - ch_flags |= PR_IP6_USER | PR_IP6_DISABLE; - if (ip6s == 0) - pr_flags |= PR_IP6_USER | PR_IP6_DISABLE; - else { - pr_flags = (pr_flags & ~PR_IP6_DISABLE) | PR_IP6_USER; + ch_flags |= PR_IP6_USER; + pr_flags |= PR_IP6_USER; + if (ip6s > 0) { ip6s /= sizeof(*ip6); if (ip6s > jail_max_af_ips) { error = EINVAL; @@ -1249,8 +1245,7 @@ kern_jail_set(struct thread *td, struct { #ifdef INET if (!(ch_flags & PR_IP4_USER)) - pr->pr_flags |= - PR_IP4 | PR_IP4_USER | PR_IP4_DISABLE; + pr->pr_flags |= PR_IP4 | PR_IP4_USER; else if (!(pr_flags & PR_IP4_USER)) { pr->pr_flags |= ppr->pr_flags & PR_IP4; if (ppr->pr_ip4 != NULL) { @@ -1265,8 +1260,7 @@ kern_jail_set(struct thread *td, struct #endif #ifdef INET6 if (!(ch_flags & PR_IP6_USER)) - pr->pr_flags |= - PR_IP6 | PR_IP6_USER | PR_IP6_DISABLE; + pr->pr_flags |= PR_IP6 | PR_IP6_USER; else if (!(pr_flags & PR_IP6_USER)) { pr->pr_flags |= ppr->pr_flags & PR_IP6; if (ppr->pr_ip6 != NULL) { @@ -2724,7 +2718,6 @@ prison_restrict_ip4(struct prison *pr, s } } if (pr->pr_ip4s == 0) { - pr->pr_flags |= PR_IP4_DISABLE; free(pr->pr_ip4, M_PRISON); pr->pr_ip4 = NULL; } @@ -3065,7 +3058,6 @@ prison_restrict_ip6(struct prison *pr, s } } if (pr->pr_ip6s == 0) { - pr->pr_flags |= PR_IP6_DISABLE; free(pr->pr_ip6, M_PRISON); pr->pr_ip6 = NULL; } Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Wed Jan 14 03:52:41 2015 (r277158) +++ head/sys/sys/jail.h Wed Jan 14 04:50:28 2015 (r277159) @@ -201,8 +201,6 @@ struct prison_racct { #define PR_IP4_USER 0x00000004 /* Restrict IPv4 addresses */ #define PR_IP6_USER 0x00000008 /* Restrict IPv6 addresses */ #define PR_VNET 0x00000010 /* Virtual network stack */ -#define PR_IP4_DISABLE 0x00000020 /* Disable IPv4 */ -#define PR_IP6_DISABLE 0x00000040 /* Disable IPv6 */ #define PR_IP4_SADDRSEL 0x00000080 /* Do IPv4 src addr sel. or use the */ /* primary jail address. */ #define PR_IP6_SADDRSEL 0x00000100 /* Do IPv6 src addr sel. or use the */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 05:29:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A9DA35A; Wed, 14 Jan 2015 05:29:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25DDD802; Wed, 14 Jan 2015 05:29:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E5Tb8t063346; Wed, 14 Jan 2015 05:29:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5TahN063343; Wed, 14 Jan 2015 05:29:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501140529.t0E5TahN063343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 05:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277160 - stable/10/contrib/ofed/libmlx4/src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:29:37 -0000 Author: hselasky Date: Wed Jan 14 05:29:35 2015 New Revision: 277160 URL: https://svnweb.freebsd.org/changeset/base/277160 Log: MFC r276981: Fix support for ConnectX2 hardware. Sponsored by: Mellanox Technologies Modified: stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h stable/10/contrib/ofed/libmlx4/src/mlx4.c stable/10/contrib/ofed/libmlx4/src/mlx4.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h Wed Jan 14 04:50:28 2015 (r277159) +++ stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h Wed Jan 14 05:29:35 2015 (r277160) @@ -38,6 +38,13 @@ #define MLX4_UVERBS_MIN_ABI_VERSION 2 #define MLX4_UVERBS_MAX_ABI_VERSION 4 +struct mlx4_alloc_ucontext_resp_v3 { + struct ibv_get_context_resp ibv_resp; + __u32 qp_tab_size; + __u16 bf_reg_size; + __u16 bf_regs_per_page; +}; + struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; __u32 dev_caps; Modified: stable/10/contrib/ofed/libmlx4/src/mlx4.c ============================================================================== --- stable/10/contrib/ofed/libmlx4/src/mlx4.c Wed Jan 14 04:50:28 2015 (r277159) +++ stable/10/contrib/ofed/libmlx4/src/mlx4.c Wed Jan 14 05:29:35 2015 (r277160) @@ -142,8 +142,10 @@ static struct ibv_context *mlx4_alloc_co struct mlx4_context *context; struct ibv_get_context cmd; struct mlx4_alloc_ucontext_resp resp; + struct mlx4_alloc_ucontext_resp_v3 resp_v3; int i; struct ibv_device_attr dev_attrs; + unsigned int bf_reg_size; context = calloc(1, sizeof *context); if (!context) @@ -151,11 +153,26 @@ static struct ibv_context *mlx4_alloc_co context->ibv_ctx.cmd_fd = cmd_fd; - if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, - &resp.ibv_resp, sizeof resp)) - goto err_free; + if (to_mdev(ibdev)->driver_abi_ver > 3) { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp.ibv_resp, sizeof resp)) + goto err_free; + + context->num_qps = resp.qp_tab_size; + context->num_xrc_srqs = resp.qp_tab_size; + bf_reg_size = resp.bf_reg_size; + context->cqe_size = resp.cqe_size; + } else { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp_v3.ibv_resp, sizeof resp_v3)) + goto err_free; + + context->num_qps = resp_v3.qp_tab_size; + context->num_xrc_srqs = resp_v3.qp_tab_size; + bf_reg_size = resp_v3.bf_reg_size; + context->cqe_size = 32; + } - context->num_qps = resp.qp_tab_size; context->qp_table_shift = ffs(context->num_qps) - 1 - MLX4_QP_TABLE_BITS; context->qp_table_mask = (1 << context->qp_table_shift) - 1; @@ -163,7 +180,6 @@ static struct ibv_context *mlx4_alloc_co for (i = 0; i < MLX4_QP_TABLE_SIZE; ++i) context->qp_table[i].refcnt = 0; - context->num_xrc_srqs = resp.qp_tab_size; context->xrc_srq_table_shift = ffs(context->num_xrc_srqs) - 1 - MLX4_XRC_SRQ_TABLE_BITS; context->xrc_srq_table_mask = (1 << context->xrc_srq_table_shift) - 1; @@ -182,7 +198,7 @@ static struct ibv_context *mlx4_alloc_co if (context->uar == MAP_FAILED) goto err_free; - if (resp.bf_reg_size) { + if (bf_reg_size) { context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size, PROT_WRITE, MAP_SHARED, cmd_fd, to_mdev(ibdev)->page_size); @@ -192,7 +208,7 @@ static struct ibv_context *mlx4_alloc_co context->bf_page = NULL; context->bf_buf_size = 0; } else { - context->bf_buf_size = resp.bf_reg_size / 2; + context->bf_buf_size = bf_reg_size / 2; context->bf_offset = 0; pthread_spin_init(&context->bf_lock, PTHREAD_PROCESS_PRIVATE); } @@ -201,7 +217,6 @@ static struct ibv_context *mlx4_alloc_co context->bf_buf_size = 0; } - context->cqe_size = resp.cqe_size; pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE); context->ibv_ctx.ops = mlx4_ctx_ops; @@ -294,6 +309,7 @@ found: dev->ibv_dev.ops = mlx4_dev_ops; dev->page_size = sysconf(_SC_PAGESIZE); + dev->driver_abi_ver = abi_version; return &dev->ibv_dev; } Modified: stable/10/contrib/ofed/libmlx4/src/mlx4.h ============================================================================== --- stable/10/contrib/ofed/libmlx4/src/mlx4.h Wed Jan 14 04:50:28 2015 (r277159) +++ stable/10/contrib/ofed/libmlx4/src/mlx4.h Wed Jan 14 05:29:35 2015 (r277160) @@ -162,6 +162,7 @@ enum { struct mlx4_device { struct ibv_device ibv_dev; int page_size; + int driver_abi_ver; }; struct mlx4_db_page; From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 05:32:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44984501; Wed, 14 Jan 2015 05:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 305898BE; Wed, 14 Jan 2015 05:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E5WIa9067217; Wed, 14 Jan 2015 05:32:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5WHx3067214; Wed, 14 Jan 2015 05:32:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501140532.t0E5WHx3067214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 05:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277161 - stable/9/contrib/ofed/libmlx4/src X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:32:18 -0000 Author: hselasky Date: Wed Jan 14 05:32:16 2015 New Revision: 277161 URL: https://svnweb.freebsd.org/changeset/base/277161 Log: MFC r276981: Fix support for ConnectX2 hardware. Sponsored by: Mellanox Technologies Modified: stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h stable/9/contrib/ofed/libmlx4/src/mlx4.c stable/9/contrib/ofed/libmlx4/src/mlx4.h Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h Wed Jan 14 05:29:35 2015 (r277160) +++ stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h Wed Jan 14 05:32:16 2015 (r277161) @@ -38,6 +38,13 @@ #define MLX4_UVERBS_MIN_ABI_VERSION 2 #define MLX4_UVERBS_MAX_ABI_VERSION 4 +struct mlx4_alloc_ucontext_resp_v3 { + struct ibv_get_context_resp ibv_resp; + __u32 qp_tab_size; + __u16 bf_reg_size; + __u16 bf_regs_per_page; +}; + struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; __u32 dev_caps; Modified: stable/9/contrib/ofed/libmlx4/src/mlx4.c ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/mlx4.c Wed Jan 14 05:29:35 2015 (r277160) +++ stable/9/contrib/ofed/libmlx4/src/mlx4.c Wed Jan 14 05:32:16 2015 (r277161) @@ -142,8 +142,10 @@ static struct ibv_context *mlx4_alloc_co struct mlx4_context *context; struct ibv_get_context cmd; struct mlx4_alloc_ucontext_resp resp; + struct mlx4_alloc_ucontext_resp_v3 resp_v3; int i; struct ibv_device_attr dev_attrs; + unsigned int bf_reg_size; context = calloc(1, sizeof *context); if (!context) @@ -151,11 +153,26 @@ static struct ibv_context *mlx4_alloc_co context->ibv_ctx.cmd_fd = cmd_fd; - if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, - &resp.ibv_resp, sizeof resp)) - goto err_free; + if (to_mdev(ibdev)->driver_abi_ver > 3) { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp.ibv_resp, sizeof resp)) + goto err_free; + + context->num_qps = resp.qp_tab_size; + context->num_xrc_srqs = resp.qp_tab_size; + bf_reg_size = resp.bf_reg_size; + context->cqe_size = resp.cqe_size; + } else { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp_v3.ibv_resp, sizeof resp_v3)) + goto err_free; + + context->num_qps = resp_v3.qp_tab_size; + context->num_xrc_srqs = resp_v3.qp_tab_size; + bf_reg_size = resp_v3.bf_reg_size; + context->cqe_size = 32; + } - context->num_qps = resp.qp_tab_size; context->qp_table_shift = ffs(context->num_qps) - 1 - MLX4_QP_TABLE_BITS; context->qp_table_mask = (1 << context->qp_table_shift) - 1; @@ -163,7 +180,6 @@ static struct ibv_context *mlx4_alloc_co for (i = 0; i < MLX4_QP_TABLE_SIZE; ++i) context->qp_table[i].refcnt = 0; - context->num_xrc_srqs = resp.qp_tab_size; context->xrc_srq_table_shift = ffs(context->num_xrc_srqs) - 1 - MLX4_XRC_SRQ_TABLE_BITS; context->xrc_srq_table_mask = (1 << context->xrc_srq_table_shift) - 1; @@ -182,7 +198,7 @@ static struct ibv_context *mlx4_alloc_co if (context->uar == MAP_FAILED) goto err_free; - if (resp.bf_reg_size) { + if (bf_reg_size) { context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size, PROT_WRITE, MAP_SHARED, cmd_fd, to_mdev(ibdev)->page_size); @@ -192,7 +208,7 @@ static struct ibv_context *mlx4_alloc_co context->bf_page = NULL; context->bf_buf_size = 0; } else { - context->bf_buf_size = resp.bf_reg_size / 2; + context->bf_buf_size = bf_reg_size / 2; context->bf_offset = 0; pthread_spin_init(&context->bf_lock, PTHREAD_PROCESS_PRIVATE); } @@ -201,7 +217,6 @@ static struct ibv_context *mlx4_alloc_co context->bf_buf_size = 0; } - context->cqe_size = resp.cqe_size; pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE); context->ibv_ctx.ops = mlx4_ctx_ops; @@ -294,6 +309,7 @@ found: dev->ibv_dev.ops = mlx4_dev_ops; dev->page_size = sysconf(_SC_PAGESIZE); + dev->driver_abi_ver = abi_version; return &dev->ibv_dev; } Modified: stable/9/contrib/ofed/libmlx4/src/mlx4.h ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/mlx4.h Wed Jan 14 05:29:35 2015 (r277160) +++ stable/9/contrib/ofed/libmlx4/src/mlx4.h Wed Jan 14 05:32:16 2015 (r277161) @@ -162,6 +162,7 @@ enum { struct mlx4_device { struct ibv_device ibv_dev; int page_size; + int driver_abi_ver; }; struct mlx4_db_page; From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 05:41:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85FE3882; Wed, 14 Jan 2015 05:41:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72CE7993; Wed, 14 Jan 2015 05:41:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E5fTgb069984; Wed, 14 Jan 2015 05:41:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5fTtg069982; Wed, 14 Jan 2015 05:41:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501140541.t0E5fTtg069982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Jan 2015 05:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277162 - in head/sys/modules: cardbus cbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:41:29 -0000 Author: imp Date: Wed Jan 14 05:41:28 2015 New Revision: 277162 URL: https://svnweb.freebsd.org/changeset/base/277162 Log: On x86 force NEW_PCIB, since that's the default. While this option would be picked up for kernel builds, it isn't picked up for old-fashioned builds. Without this option, PCI bus numbers are busted for modules build iteratively. Modified: head/sys/modules/cardbus/Makefile head/sys/modules/cbb/Makefile Modified: head/sys/modules/cardbus/Makefile ============================================================================== --- head/sys/modules/cardbus/Makefile Wed Jan 14 05:32:16 2015 (r277161) +++ head/sys/modules/cardbus/Makefile Wed Jan 14 05:41:28 2015 (r277162) @@ -6,4 +6,8 @@ KMOD= cardbus SRCS= cardbus.c cardbus_cis.c cardbus_device.c \ device_if.h bus_if.h card_if.h power_if.h pci_if.h pcib_if.h +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +CFLAGS += -DNEW_PCIB +.endif + .include Modified: head/sys/modules/cbb/Makefile ============================================================================== --- head/sys/modules/cbb/Makefile Wed Jan 14 05:32:16 2015 (r277161) +++ head/sys/modules/cbb/Makefile Wed Jan 14 05:41:28 2015 (r277162) @@ -6,4 +6,8 @@ KMOD= cbb SRCS= pccbb.c pccbb_isa.c pccbb_pci.c \ device_if.h bus_if.h power_if.h card_if.h isa_if.h pci_if.h pcib_if.h +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +CFLAGS += -DNEW_PCIB +.endif + .include From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 05:41:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 141589AF; Wed, 14 Jan 2015 05:41:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01E60994; Wed, 14 Jan 2015 05:41:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E5fV2F070033; Wed, 14 Jan 2015 05:41:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5fV00070032; Wed, 14 Jan 2015 05:41:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501140541.t0E5fV00070032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Jan 2015 05:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277163 - head/sys/dev/cardbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:41:32 -0000 Author: imp Date: Wed Jan 14 05:41:31 2015 New Revision: 277163 URL: https://svnweb.freebsd.org/changeset/base/277163 Log: Add a rather obnoxious warning if you don't have NEW_PCIB defined since it's a total crap shoot if things will work. Modified: head/sys/dev/cardbus/cardbus.c Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Wed Jan 14 05:41:28 2015 (r277162) +++ head/sys/dev/cardbus/cardbus.c Wed Jan 14 05:41:31 2015 (r277163) @@ -106,6 +106,8 @@ cardbus_attach(device_t cbdev) device_printf(cbdev, "failed to allocate bus number\n"); return (ENXIO); } +#else + device_printf(cbdev, "Your bus numbers may be AFU\n"); #endif return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 05:41:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 453DAB01; Wed, 14 Jan 2015 05:41:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29433996; Wed, 14 Jan 2015 05:41:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E5fZr9070094; Wed, 14 Jan 2015 05:41:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5fYQN070078; Wed, 14 Jan 2015 05:41:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501140541.t0E5fYQN070078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Jan 2015 05:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277164 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:41:35 -0000 Author: imp Date: Wed Jan 14 05:41:33 2015 New Revision: 277164 URL: https://svnweb.freebsd.org/changeset/base/277164 Log: Various interrelated fixes to make suspend / resume work better. We now can suspend / resume and unload / load cbb and cardbus without errors on my Lenovo T400, which wasn't possible before. Cards suspending and resuming in the CardBus slot not yet tested. o Enable memory cycles to the bridge early (as part of the new cbb_pci_bridge_init). This fixes the Bad VCC errors which were caused by the code accessing the device registers with this cleared. The suspend / resume process clears it. o Refactor suspend / resume into bus specific code (though the ISA code is just stubbed). This isn't strictly necessary, but makes the initializaiton code more uniform and should be more bullet proof in the face of variant behavior among cardbus bridges. o Fixup comments in the power-up sequence to reflect reality. These comments were written for one regime of power-up, but not updated as things were revised. o Add a paranoid small delay (100ms) to cover noisy cards powering down. o Fix some debugging prints to be easier to grep from dmesg. Sponsored by: Netflix Modified: head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbb.c Wed Jan 14 05:41:33 2015 (r277164) @@ -477,7 +477,7 @@ cbb_event_thread(void *arg) */ mtx_lock(&Giant); status = cbb_get(sc, CBB_SOCKET_STATE); - DPRINTF(("Status is 0x%x\n", status)); + DEVPRINTF((sc->dev, "Status is %#x\n", status)); if (!CBB_CARD_PRESENT(status)) { not_a_card = 0; /* We know card type */ cbb_removal(sc); @@ -800,13 +800,14 @@ cbb_power(device_t brdev, int volts) if (on) { mtx_lock(&sc->mtx); cnt = sc->powerintr; + /* * We have a shortish timeout of 500ms here. Some bridges do - * not generate a POWER_CYCLE event for 16-bit cards. In - * those cases, we have to cope the best we can, and having - * only a short delay is better than the alternatives. Others - * raise the power cycle a smidge before it is really ready. - * We deal with those below. + * not generate a POWER_CYCLE event for 16-bit cards. In those + * cases, we have to cope the best we can, and having only a + * short delay is better than the alternatives. Others raise + * the power cycle a smidge before it is really ready. We deal + * with those below. */ sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && @@ -816,19 +817,18 @@ cbb_power(device_t brdev, int volts) /* * Relax for 100ms. Some bridges appear to assert this signal - * right away, but before the card has stabilized. Other - * cards need need more time to cope up reliabily. - * Experiments with troublesome setups show this to be a - * "cheap" way to enhance reliabilty. We need not do this for - * "off" since we don't touch the card after we turn it off. + * right away, but before the card has stabilized. Other cards + * need need more time to cope up reliabily. Experiments with + * troublesome setups show this to be a "cheap" way to enhance + * reliabilty. */ pause("cbbPwr", min(hz / 10, 1)); /* - * The TOPIC95B requires a little bit extra time to get its - * act together, so delay for an additional 100ms. Also as - * documented below, it doesn't seem to set the POWER_CYCLE - * bit, so don't whine if it never came on. + * The TOPIC95B requires a little bit extra time to get its act + * together, so delay for an additional 100ms. Also as + * documented below, it doesn't seem to set the POWER_CYCLE bit, + * so don't whine if it never came on. */ if (sc->chipset == CB_TOPIC95) pause("cbb95B", hz / 10); @@ -838,26 +838,27 @@ cbb_power(device_t brdev, int volts) /* * After the power is good, we can turn off the power interrupt. - * However, the PC Card standard says that we must delay turning the - * CD bit back on for a bit to allow for bouncyness on power down - * (recall that we don't wait above for a power down, since we don't - * get an interrupt for that). We're called either from the suspend - * code in which case we don't want to turn card change on again, or - * we're called from the card insertion code, in which case the cbb - * thread will turn it on for us before it waits to be woken by a - * change event. + * However, the PC Card standard says that we must delay turning the CD + * bit back on for a bit to allow for bouncyness on power down. We just + * pause a little below to cover that. Most bridges don't seem to need + * this delay. * - * NB: Topic95B doesn't set the power cycle bit. we assume that - * both it and the TOPIC95 behave the same. + * NB: Topic95B doesn't set the power cycle bit. We assume that + * both it and the TOPIC95 behave the same, though despite efforts + * to find one, the author never could locate a laptop with a TOPIC95 + * in it. */ cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_POWER); status = cbb_get(sc, CBB_SOCKET_STATE); if (on && sc->chipset != CB_TOPIC95) { if ((status & CBB_STATE_POWER_CYCLE) == 0) device_printf(sc->dev, "Power not on?\n"); + } else { + pause("cbbDwn", hz / 10); } if (status & CBB_STATE_BAD_VCC_REQ) { - device_printf(sc->dev, "Bad Vcc requested\n"); + device_printf(sc->dev, "Bad Vcc requested status %#x %dV\n", + status, volts); /* * Turn off the power, and try again. Retrigger other * active interrupts via force register. From NetBSD @@ -1563,61 +1564,6 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t self) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(self); - - error = bus_generic_suspend(self); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -int -cbb_resume(device_t self) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); - uint32_t tmp; - - /* - * In the APM and early ACPI era, BIOSes saved the PCI config - * registers. As chips became more complicated, that functionality moved - * into the ACPI code / tables. We must therefore, restore the settings - * we made here to make sure the device come back. Transitions to Dx - * from D0 and back to D0 cause the bridge to lose its config space, so - * all the bus mappings and such are preserved. - * - * For most drivers, the PCI layer handles this saving. However, since - * there's much black magic and arcane art hidden in these few lines of - * code that would be difficult to transition into the PCI - * layer. chipinit was several years of trial and error to write. - */ - pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((self, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - - sc->chipinit(sc); - - /* reset interrupt -- Do we really need to do this? */ - tmp = cbb_get(sc, CBB_SOCKET_EVENT); - cbb_set(sc, CBB_SOCKET_EVENT, tmp); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* Signal the thread to wakeup. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(self); - - return (error); -} - -int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbb_isa.c Wed Jan 14 05:41:33 2015 (r277164) @@ -203,13 +203,27 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } +static int +cbb_isa_suspend(device_t dev) +{ + + return 0; +} + +static int +cbb_isa_resume(device_t dev) +{ + + return 0; +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_isa_suspend), + DEVMETHOD(device_resume, cbb_isa_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Jan 14 05:41:33 2015 (r277164) @@ -301,6 +301,41 @@ cbb_print_config(device_t dev) printf("\n"); } +static void +cbb_pci_bridge_init(device_t brdev) +{ + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + u_int32_t membase, irq; + + if (pci_get_powerstate(brdev) != PCI_POWERSTATE_D0) { + /* Reset the power state. */ + device_printf(brdev, "chip is in D%d power mode " + "-- setting to D0\n", pci_get_powerstate(brdev)); + pci_set_powerstate(brdev, PCI_POWERSTATE_D0); + } + membase = rman_get_start(sc->base_res); + irq = rman_get_start(sc->irq_res); + + pci_write_config(brdev, CBBR_SOCKBASE, membase, 4); + pci_write_config(brdev, PCIR_INTLINE, irq, 4); + PCI_ENABLE_IO(device_get_parent(brdev), brdev, SYS_RES_MEMORY); + + exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); + sc->chipinit(sc); + + /* reset 16-bit pcmcia bus */ + exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); + + /* turn off power */ + cbb_power(brdev, CARD_OFF); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* reset interrupt */ + cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); +} + static int cbb_pci_attach(device_t brdev) { @@ -345,11 +380,9 @@ cbb_pci_attach(device_t brdev) sc->bst = rman_get_bustag(sc->base_res); sc->bsh = rman_get_bushandle(sc->base_res); - exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); sc->exca[0].flags |= EXCA_HAS_MEMREG_WIN; sc->exca[0].chipset = EXCA_CARDBUS; sc->chipinit = cbb_chipinit; - sc->chipinit(sc); /*Sysctls*/ sctx = device_get_sysctl_ctx(brdev); @@ -427,17 +460,7 @@ cbb_pci_attach(device_t brdev) goto err; } - /* reset 16-bit pcmcia bus */ - exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); - - /* turn off power */ - cbb_power(brdev, CARD_OFF); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* reset interrupt */ - cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); + cbb_pci_bridge_init(brdev); if (bootverbose) cbb_print_config(brdev); @@ -877,14 +900,45 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } +static int +cbb_pci_suspend(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(brdev); + + error = bus_generic_suspend(brdev); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +static int +cbb_pci_resume(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + + /* Reinitialize the hardware, ala attach */ + cbb_pci_bridge_init(brdev); + + /* Signal the thread to wakeup to see if we have any cards to work with. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(brdev); + + return (error); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_pci_suspend), + DEVMETHOD(device_resume, cbb_pci_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbbvar.h Wed Jan 14 05:41:33 2015 (r277164) @@ -134,11 +134,9 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); -int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 06:46:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 865D85E5; Wed, 14 Jan 2015 06:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74130F00; Wed, 14 Jan 2015 06:46:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E6kQgp000519; Wed, 14 Jan 2015 06:46:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E6kQ7u000518; Wed, 14 Jan 2015 06:46:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501140646.t0E6kQ7u000518@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 06:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277165 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 06:46:26 -0000 Author: hselasky Date: Wed Jan 14 06:46:25 2015 New Revision: 277165 URL: https://svnweb.freebsd.org/changeset/base/277165 Log: Fix spelling. Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Wed Jan 14 05:41:33 2015 (r277164) +++ head/lib/libusb/libusb.3 Wed Jan 14 06:46:25 2015 (r277165) @@ -42,9 +42,9 @@ The .Nm library contains interfaces for directly managing a usb device. The current implementation supports v1.0 of the libusb API. -.Sh LIBRARY INITIALISATION / DEINITIALISATION +.Sh LIBRARY INITIALISATION AND DEINITIALISATION .Ft int -.Fn libusb_init libusb_context **ctx +.Fn libusb_init "libusb_context **ctx" This function initialises libusb. It must be called at the beginning of the program, before other libusb routines are used. From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 07:01:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49ADF846; Wed, 14 Jan 2015 07:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BBDFFB; Wed, 14 Jan 2015 07:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E71NLf007446; Wed, 14 Jan 2015 07:01:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E71MPY007439; Wed, 14 Jan 2015 07:01:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501140701.t0E71MPY007439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 14 Jan 2015 07:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277166 - in head/sys: conf powerpc/include powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 07:01:23 -0000 Author: jhibbits Date: Wed Jan 14 07:01:21 2015 New Revision: 277166 URL: https://svnweb.freebsd.org/changeset/base/277166 Log: Add Altivec/VMX register support to ptrace. MFC after: 2 weeks Relnotes: yes Added: head/sys/powerpc/powerpc/ptrace_machdep.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/include/ptrace.h head/sys/powerpc/include/reg.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Jan 14 06:46:25 2015 (r277165) +++ head/sys/conf/files.powerpc Wed Jan 14 07:01:21 2015 (r277166) @@ -202,6 +202,7 @@ powerpc/powerpc/pic_if.m standard powerpc/powerpc/pmap_dispatch.c standard powerpc/powerpc/platform.c standard powerpc/powerpc/platform_if.m standard +powerpc/powerpc/ptrace_machdep.c standard powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/setjmp.S standard powerpc/powerpc/sigcode32.S optional powerpc | compat_freebsd32 Modified: head/sys/powerpc/include/ptrace.h ============================================================================== --- head/sys/powerpc/include/ptrace.h Wed Jan 14 06:46:25 2015 (r277165) +++ head/sys/powerpc/include/ptrace.h Wed Jan 14 07:01:21 2015 (r277166) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2014 Justin Hibbits + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,4 +33,9 @@ #ifndef _MACHINE_PTRACE_H_ #define _MACHINE_PTRACE_H_ +#define __HAVE_PTRACE_MACHDEP + +#define PT_GETVRREGS (PT_FIRSTMACH + 0) +#define PT_SETVRREGS (PT_FIRSTMACH + 1) + #endif Modified: head/sys/powerpc/include/reg.h ============================================================================== --- head/sys/powerpc/include/reg.h Wed Jan 14 06:46:25 2015 (r277165) +++ head/sys/powerpc/include/reg.h Wed Jan 14 07:01:21 2015 (r277166) @@ -24,6 +24,14 @@ struct fpreg { double fpscr; }; +/* Must match pcb.pcb_vec */ +struct vmxreg { + uint32_t vr[32][4]; + uint32_t pad[2]; + uint32_t vrsave; + uint32_t vscr; +}; + struct dbreg { unsigned int junk; }; @@ -43,6 +51,10 @@ struct fpreg32 { struct fpreg data; }; +struct vmxreg32 { + struct vmxreg data; +}; + struct dbreg32 { struct dbreg data; }; Added: head/sys/powerpc/powerpc/ptrace_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powerpc/ptrace_machdep.c Wed Jan 14 07:01:21 2015 (r277166) @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2014 Justin Hibbits + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_compat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +cpu_ptrace(struct thread *td, int req, void *addr, int data) +{ + int error; + struct pcb *pcb; + struct vec vec; + + pcb = td->td_pcb; + + bzero(&vec, sizeof(vec)); + + error = EINVAL; + switch (req) { + case PT_GETVRREGS: + if (!(cpu_features & PPC_FEATURE_HAS_ALTIVEC)) + break; + + if (pcb->pcb_flags & PCB_VEC) { + save_vec_nodrop(td); + memcpy(&vec, &pcb->pcb_vec, sizeof(vec)); + } + error = copyout(&vec, addr, sizeof(vec)); + break; + case PT_SETVRREGS: + if (!(cpu_features & PPC_FEATURE_HAS_ALTIVEC)) + break; + error = copyin(addr, &vec, sizeof(vec)); + if (error == 0) { + pcb->pcb_flags |= PCB_VEC; + memcpy(&pcb->pcb_vec, &vec, sizeof(vec)); + } + break; + + default: + break; + } + + return (error); +} From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 07:02:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BC71997; Wed, 14 Jan 2015 07:02:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D395F101; Wed, 14 Jan 2015 07:02:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E72M27009460; Wed, 14 Jan 2015 07:02:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E72M72009459; Wed, 14 Jan 2015 07:02:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501140702.t0E72M72009459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 14 Jan 2015 07:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277167 - head/usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 07:02:23 -0000 Author: jhibbits Date: Wed Jan 14 07:02:21 2015 New Revision: 277167 URL: https://svnweb.freebsd.org/changeset/base/277167 Log: Make use of the new Altivec ptrace support, to save the Altivec registers in gcore. MFC after: 2 weeks Relnotes: yes Modified: head/usr.bin/gcore/elfcore.c Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Wed Jan 14 07:01:21 2015 (r277166) +++ head/usr.bin/gcore/elfcore.c Wed Jan 14 07:02:21 2015 (r277167) @@ -105,6 +105,9 @@ static void *elf_note_thrmisc(void *, si #if defined(__i386__) || defined(__amd64__) static void *elf_note_x86_xstate(void *, size_t *); #endif +#if defined(__powerpc__) +static void *elf_note_powerpc_vmx(void *, size_t *); +#endif static void *elf_note_procstat_auxv(void *, size_t *); static void *elf_note_procstat_files(void *, size_t *); static void *elf_note_procstat_groups(void *, size_t *); @@ -348,6 +351,9 @@ elf_putnotes(pid_t pid, struct sbuf *sb, #if defined(__i386__) || defined(__amd64__) elf_putnote(NT_X86_XSTATE, elf_note_x86_xstate, tids + i, sb); #endif +#if defined(__powerpc__) + elf_putnote(NT_PPC_VMX, elf_note_powerpc_vmx, tids + i, sb); +#endif } #ifndef ELFCORE_COMPAT_32 @@ -650,6 +656,32 @@ elf_note_x86_xstate(void *arg, size_t *s } #endif +#if defined(__powerpc__) +static void * +elf_note_powerpc_vmx(void *arg, size_t *sizep) +{ + lwpid_t tid; + struct vmxreg *vmx; + static bool has_vmx = true; + struct vmxreg info; + + tid = *(lwpid_t *)arg; + if (has_vmx) { + if (ptrace(PT_GETVRREGS, tid, (void *)&info, + sizeof(info)) != 0) + has_vmx = false; + } + if (!has_vmx) { + *sizep = 0; + return (NULL); + } + vmx = calloc(1, sizeof(*vmx)); + memcpy(vmx, &info, sizeof(*vmx)); + *sizep = sizeof(*vmx); + return (vmx); +} +#endif + static void * procstat_sysctl(void *arg, int what, size_t structsz, size_t *sizep) { From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 07:18:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A1E0C65; Wed, 14 Jan 2015 07:18:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3807E212; Wed, 14 Jan 2015 07:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E7IqVI014953; Wed, 14 Jan 2015 07:18:52 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E7IqCo014952; Wed, 14 Jan 2015 07:18:52 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501140718.t0E7IqCo014952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 14 Jan 2015 07:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277168 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 07:18:52 -0000 Author: neel Date: Wed Jan 14 07:18:51 2015 New Revision: 277168 URL: https://svnweb.freebsd.org/changeset/base/277168 Log: Fix typo (missing comma). MFC after: 3 days Modified: head/sys/amd64/vmm/vmm_ioport.c Modified: head/sys/amd64/vmm/vmm_ioport.c ============================================================================== --- head/sys/amd64/vmm/vmm_ioport.c Wed Jan 14 07:02:21 2015 (r277167) +++ head/sys/amd64/vmm/vmm_ioport.c Wed Jan 14 07:18:51 2015 (r277168) @@ -74,7 +74,7 @@ inout_instruction(struct vm_exit *vmexit static const char *iodesc[] = { "outb", "outw", "outl", "inb", "inw", "inl", - "outsb", "outsw", "outsd" + "outsb", "outsw", "outsd", "insb", "insw", "insd", }; From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 09:39:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D46A8CFD; Wed, 14 Jan 2015 09:39:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF2AC3A6; Wed, 14 Jan 2015 09:39:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0E9dwE3081464; Wed, 14 Jan 2015 09:39:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E9dw1h081463; Wed, 14 Jan 2015 09:39:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501140939.t0E9dw1h081463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Jan 2015 09:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277169 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 09:39:59 -0000 Author: mav Date: Wed Jan 14 09:39:57 2015 New Revision: 277169 URL: https://svnweb.freebsd.org/changeset/base/277169 Log: Reimplement TRIM throttling added in r248577. Previous throttling implementation approached problem from the wrong side. It significantly limited useful delaying of TRIM requests and aggregation potential, while not so much controlled TRIM burstiness under heavy load. With this change random 4K write benchmarks (probably the worst case for TRIM) show me IOPS increase by 20%, average latency reduction by 30%, peak TRIM bursts reduction by 3 times and same peak TRIM map size (memory usage). Also the new logic does not force map size down so heavily, really allowing to keep deleted data for 32 TXG or 30 seconds under moderate load. It was practically impossible with old throttling logic, which pushed map down to only 64 segments. Reviewed by: smh MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 07:18:51 2015 (r277168) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 09:39:57 2015 (r277169) @@ -40,17 +40,20 @@ #define TRIM_ZIO_END(vd, offset, size) (offset + \ P2ROUNDUP(size, 1ULL << vd->vdev_top->vdev_ashift)) -#define TRIM_MAP_SINC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, (size)) +/* Maximal segment size for ATA TRIM. */ +#define TRIM_MAP_SIZE_FACTOR (512 << 16) -#define TRIM_MAP_SDEC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, -(size)) +#define TRIM_MAP_SEGS(size) (1 + (size) / TRIM_MAP_SIZE_FACTOR) -#define TRIM_MAP_QINC(tm) \ - atomic_inc_64(&(tm)->tm_pending); \ - -#define TRIM_MAP_QDEC(tm) \ - atomic_dec_64(&(tm)->tm_pending); +#define TRIM_MAP_ADD(tm, ts) do { \ + list_insert_tail(&(tm)->tm_head, (ts)); \ + (tm)->tm_pending += TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \ +} while (0) + +#define TRIM_MAP_REM(tm, ts) do { \ + list_remove(&(tm)->tm_head, (ts)); \ + (tm)->tm_pending -= TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \ +} while (0) typedef struct trim_map { list_t tm_head; /* List of segments sorted by txg. */ @@ -60,7 +63,6 @@ typedef struct trim_map { list_t tm_pending_writes; /* Writes blocked on in-flight frees. */ kmutex_t tm_lock; uint64_t tm_pending; /* Count of pending TRIMs. */ - uint64_t tm_bytes; /* Total size in bytes of queued TRIMs. */ } trim_map_t; typedef struct trim_seg { @@ -74,13 +76,10 @@ typedef struct trim_seg { extern boolean_t zfs_trim_enabled; -static u_int trim_txg_delay = 32; -static u_int trim_timeout = 30; -static u_int trim_max_interval = 1; -/* Limit outstanding TRIMs to 2G (max size for a single TRIM request) */ -static uint64_t trim_vdev_max_bytes = 2147483648; -/* Limit outstanding TRIMs to 64 (max ranges for a single TRIM request) */ -static u_int trim_vdev_max_pending = 64; +static u_int trim_txg_delay = 32; /* Keep deleted data up to 32 TXG */ +static u_int trim_timeout = 30; /* Keep deleted data up to 30s */ +static u_int trim_max_interval = 1; /* 1s delays between TRIMs */ +static u_int trim_vdev_max_pending = 10000; /* Keep up to 10K segments */ SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, trim, CTLFLAG_RD, 0, "ZFS TRIM"); @@ -94,9 +93,6 @@ SYSCTL_UINT(_vfs_zfs_trim, OID_AUTO, max "Maximum interval between TRIM queue processing (seconds)"); SYSCTL_DECL(_vfs_zfs_vdev); -SYSCTL_QUAD(_vfs_zfs_vdev, OID_AUTO, trim_max_bytes, CTLFLAG_RWTUN, - &trim_vdev_max_bytes, 0, - "Maximum pending TRIM bytes for a vdev"); SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, trim_max_pending, CTLFLAG_RWTUN, &trim_vdev_max_pending, 0, "Maximum pending TRIM segments for a vdev"); @@ -189,10 +185,8 @@ trim_map_destroy(vdev_t *vd) mutex_enter(&tm->tm_lock); while ((ts = list_head(&tm->tm_head)) != NULL) { avl_remove(&tm->tm_queued_frees, ts); - list_remove(&tm->tm_head, ts); + TRIM_MAP_REM(tm, ts); kmem_free(ts, sizeof (*ts)); - TRIM_MAP_SDEC(tm, ts->ts_end - ts->ts_start); - TRIM_MAP_QDEC(tm); } mutex_exit(&tm->tm_lock); @@ -237,40 +231,34 @@ trim_map_segment_add(trim_map_t *tm, uin merge_after = (ts_after != NULL && ts_after->ts_start == end); if (merge_before && merge_after) { - TRIM_MAP_SINC(tm, ts_after->ts_start - ts_before->ts_end); - TRIM_MAP_QDEC(tm); avl_remove(&tm->tm_queued_frees, ts_before); - list_remove(&tm->tm_head, ts_before); + TRIM_MAP_REM(tm, ts_before); + TRIM_MAP_REM(tm, ts_after); ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; - list_remove(&tm->tm_head, ts_after); - list_insert_tail(&tm->tm_head, ts_after); + TRIM_MAP_ADD(tm, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { - TRIM_MAP_SINC(tm, end - ts_before->ts_end); + TRIM_MAP_REM(tm, ts_before); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; - list_remove(&tm->tm_head, ts_before); - list_insert_tail(&tm->tm_head, ts_before); + TRIM_MAP_ADD(tm, ts_before); } else if (merge_after) { - TRIM_MAP_SINC(tm, ts_after->ts_start - start); + TRIM_MAP_REM(tm, ts_after); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; - list_remove(&tm->tm_head, ts_after); - list_insert_tail(&tm->tm_head, ts_after); + TRIM_MAP_ADD(tm, ts_after); } else { - TRIM_MAP_SINC(tm, end - start); - TRIM_MAP_QINC(tm); ts = kmem_alloc(sizeof (*ts), KM_SLEEP); ts->ts_start = start; ts->ts_end = end; ts->ts_txg = txg; ts->ts_time = time; avl_insert(&tm->tm_queued_frees, ts, where); - list_insert_tail(&tm->tm_head, ts); + TRIM_MAP_ADD(tm, ts); } } @@ -286,7 +274,7 @@ trim_map_segment_remove(trim_map_t *tm, left_over = (ts->ts_start < start); right_over = (ts->ts_end > end); - TRIM_MAP_SDEC(tm, end - start); + TRIM_MAP_REM(tm, ts); if (left_over && right_over) { nts = kmem_alloc(sizeof (*nts), KM_SLEEP); nts->ts_start = end; @@ -295,16 +283,16 @@ trim_map_segment_remove(trim_map_t *tm, nts->ts_time = ts->ts_time; ts->ts_end = start; avl_insert_here(&tm->tm_queued_frees, nts, ts, AVL_AFTER); - list_insert_after(&tm->tm_head, ts, nts); - TRIM_MAP_QINC(tm); + TRIM_MAP_ADD(tm, ts); + TRIM_MAP_ADD(tm, nts); } else if (left_over) { ts->ts_end = start; + TRIM_MAP_ADD(tm, ts); } else if (right_over) { ts->ts_start = end; + TRIM_MAP_ADD(tm, ts); } else { avl_remove(&tm->tm_queued_frees, ts); - list_remove(&tm->tm_head, ts); - TRIM_MAP_QDEC(tm); kmem_free(ts, sizeof (*ts)); } } @@ -423,7 +411,8 @@ trim_map_write_done(zio_t *zio) * the first element's time is not greater than time argument */ static trim_seg_t * -trim_map_first(trim_map_t *tm, uint64_t txg, uint64_t txgsafe, hrtime_t time) +trim_map_first(trim_map_t *tm, uint64_t txg, uint64_t txgsafe, hrtime_t time, + boolean_t force) { trim_seg_t *ts; @@ -432,9 +421,7 @@ trim_map_first(trim_map_t *tm, uint64_t ts = list_head(&tm->tm_head); if (ts != NULL && ts->ts_txg <= txgsafe && - (ts->ts_txg <= txg || ts->ts_time <= time || - tm->tm_bytes > trim_vdev_max_bytes || - tm->tm_pending > trim_vdev_max_pending)) + (ts->ts_txg <= txg || ts->ts_time <= time || force)) return (ts); return (NULL); } @@ -445,6 +432,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * trim_map_t *tm = vd->vdev_trimmap; trim_seg_t *ts; uint64_t size, offset, txgtarget, txgsafe; + int64_t hard, soft; hrtime_t timelimit; ASSERT(vd->vdev_ops->vdev_op_leaf); @@ -465,16 +453,19 @@ trim_map_vdev_commit(spa_t *spa, zio_t * } mutex_enter(&tm->tm_lock); + hard = 0; + if (tm->tm_pending > trim_vdev_max_pending) + hard = (tm->tm_pending - trim_vdev_max_pending) / 4; + soft = P2ROUNDUP(hard + tm->tm_pending / trim_timeout + 1, 64); /* Loop until we have sent all outstanding free's */ - while ((ts = trim_map_first(tm, txgtarget, txgsafe, timelimit)) + while (soft > 0 && + (ts = trim_map_first(tm, txgtarget, txgsafe, timelimit, hard > 0)) != NULL) { - list_remove(&tm->tm_head, ts); + TRIM_MAP_REM(tm, ts); avl_remove(&tm->tm_queued_frees, ts); avl_add(&tm->tm_inflight_frees, ts); size = ts->ts_end - ts->ts_start; offset = ts->ts_start; - TRIM_MAP_SDEC(tm, size); - TRIM_MAP_QDEC(tm); /* * We drop the lock while we call zio_nowait as the IO * scheduler can result in a different IO being run e.g. @@ -484,6 +475,8 @@ trim_map_vdev_commit(spa_t *spa, zio_t * zio_nowait(zio_trim(zio, spa, vd, offset, size)); + soft -= TRIM_MAP_SEGS(size); + hard -= TRIM_MAP_SEGS(size); mutex_enter(&tm->tm_lock); } mutex_exit(&tm->tm_lock); From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 11:15:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71B634C8; Wed, 14 Jan 2015 11:15:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5319E135; Wed, 14 Jan 2015 11:15:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EBFw5D028363; Wed, 14 Jan 2015 11:15:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBFvPP028361; Wed, 14 Jan 2015 11:15:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141115.t0EBFvPP028361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277170 - in head: sbin/devd sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:15:58 -0000 Author: trasz Date: Wed Jan 14 11:15:57 2015 New Revision: 277170 URL: https://svnweb.freebsd.org/changeset/base/277170 Log: Add devd(8) notifications for creation and destruction of GEOM devices. Differential Revision: https://reviews.freebsd.org/D1211 MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/devd/devd.conf.5 head/sys/geom/geom_dev.c Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Wed Jan 14 09:39:57 2015 (r277169) +++ head/sbin/devd/devd.conf.5 Wed Jan 14 11:15:57 2015 (r277170) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd February 22, 2013 +.Dd January 14, 2015 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -370,6 +370,33 @@ node is destroyed. .El .El .Pp +.It Li GEOM +Events related to the +.Xr geom 4 +framework. +The difference compared to +.Li DEVFS +is that +.Li GEOM +only includes disk-like devices. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li DEV +.Bl -tag -width ".Li MEDIACHANGE" -compact +.It Sy Type +.It Li CREATE +A +.Xr geom 4 +device node is created. +.It Li DESTROY +A +.Xr geom 4 +device node is destroyed. +.It Li MEDIACHANGE +Physical media has changed. +.El +.El +.Pp .It Li USB Events related to the USB subsystem. .Bl -tag -width ".Sy Subsystem" -compact Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Wed Jan 14 09:39:57 2015 (r277169) +++ head/sys/geom/geom_dev.c Wed Jan 14 11:15:57 2015 (r277170) @@ -169,12 +169,15 @@ g_dev_destroy(void *arg, int flags __unu struct g_consumer *cp; struct g_geom *gp; struct g_dev_softc *sc; + char buf[SPECNAMELEN + 6]; g_topology_assert(); cp = arg; gp = cp->geom; sc = cp->private; g_trace(G_T_TOPOLOGY, "g_dev_destroy(%p(%s))", cp, gp->name); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "DESTROY", buf, M_WAITOK); if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); g_detach(cp); @@ -209,11 +212,14 @@ g_dev_attrchanged(struct g_consumer *cp, dev = sc->sc_dev; snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, M_WAITOK); dev = sc->sc_alias; if (dev != NULL) { snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, + M_WAITOK); } return; } @@ -269,7 +275,7 @@ g_dev_taste(struct g_class *mp, struct g struct g_dev_softc *sc; int error, len; struct cdev *dev, *adev; - char buf[64], *val; + char buf[SPECNAMELEN + 6], *val; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -326,6 +332,8 @@ g_dev_taste(struct g_class *mp, struct g } g_dev_attrchanged(cp, "GEOM::physpath"); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "CREATE", buf, M_WAITOK); return (gp); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 11:18:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1D8A646; Wed, 14 Jan 2015 11:18:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1D3155; Wed, 14 Jan 2015 11:18:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EBIkvU028731; Wed, 14 Jan 2015 11:18:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBIk0B028730; Wed, 14 Jan 2015 11:18:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141118.t0EBIk0B028730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277171 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:18:46 -0000 Author: trasz Date: Wed Jan 14 11:18:45 2015 New Revision: 277171 URL: https://svnweb.freebsd.org/changeset/base/277171 Log: Use newly added GEOM notifications to discard autofs caches. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Wed Jan 14 11:15:57 2015 (r277170) +++ head/etc/devd.conf Wed Jan 14 11:18:45 2015 (r277171) @@ -318,16 +318,11 @@ notify 0 { action "/usr/local/etc/rc.d/postgresql restart"; }; -# Discard autofs caches, useful for the -media special map. The one -# second delay is for GEOM to finish tasting. -# -# XXX: We should probably have a devctl(4) event that fires after GEOM -# tasting. -# +# Discard autofs caches, useful for the -media special map. notify 100 { - match "system" "DEVFS"; - match "cdev" "(da|mmcsd)[0-9]+"; - action "sleep 1 && /usr/sbin/automount -c"; + match "system" "GEOM"; + match "subsystem" "DEV"; + action "/usr/sbin/automount -c"; }; */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 11:26:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D1E68EE; Wed, 14 Jan 2015 11:26:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4825523E; Wed, 14 Jan 2015 11:26:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EBQ4Oc033074; Wed, 14 Jan 2015 11:26:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBQ4LL033073; Wed, 14 Jan 2015 11:26:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141126.t0EBQ4LL033073@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:26:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277172 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:26:04 -0000 Author: trasz Date: Wed Jan 14 11:26:03 2015 New Revision: 277172 URL: https://svnweb.freebsd.org/changeset/base/277172 Log: Improve wording. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/fstyp.8 Modified: head/usr.sbin/fstyp/fstyp.8 ============================================================================== --- head/usr.sbin/fstyp/fstyp.8 Wed Jan 14 11:18:45 2015 (r277171) +++ head/usr.sbin/fstyp/fstyp.8 Wed Jan 14 11:26:03 2015 (r277172) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 6, 2014 +.Dd January 14, 2015 .Dt FSTYP 8 .Os .Sh NAME @@ -58,9 +58,9 @@ is built specifically to detect filesyst .Xr file 1 in several ways. The output is machine-parsable, filesystem labels are supported, -and only filesystems are identified. -Security is improved with -.Xr capsicum 4 . +the utility runs sandboxed using +.Xr capsicum 4 , +and does not try to recognize any file format other than filesystems. .Pp These options are available: .Bl -tag -width ".Fl l" From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 11:29:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7EAEB5D; Wed, 14 Jan 2015 11:29:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A11B3270; Wed, 14 Jan 2015 11:29:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EBTHJV033610; Wed, 14 Jan 2015 11:29:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBTGdM033607; Wed, 14 Jan 2015 11:29:16 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141129.t0EBTGdM033607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277173 - in stable/10: sbin/iscontrol usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:29:17 -0000 Author: trasz Date: Wed Jan 14 11:29:16 2015 New Revision: 277173 URL: https://svnweb.freebsd.org/changeset/base/277173 Log: MFC r275510: Move iscsi.conf.5 from sbin/iscontrol/ to usr.bin/iscsictl/, as the former is obsolete. Sponsored by: The FreeBSD Foundation Added: stable/10/usr.bin/iscsictl/iscsi.conf.5 - copied unchanged from r275510, head/usr.bin/iscsictl/iscsi.conf.5 Deleted: stable/10/sbin/iscontrol/iscsi.conf.5 Modified: stable/10/sbin/iscontrol/Makefile stable/10/usr.bin/iscsictl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/iscontrol/Makefile ============================================================================== --- stable/10/sbin/iscontrol/Makefile Wed Jan 14 11:26:03 2015 (r277172) +++ stable/10/sbin/iscontrol/Makefile Wed Jan 14 11:29:16 2015 (r277173) @@ -9,6 +9,6 @@ S= ${.CURDIR}/../../sys WARNS?= 3 CFLAGS+= -I$S -MAN= iscsi.conf.5 iscontrol.8 +MAN= iscontrol.8 .include Modified: stable/10/usr.bin/iscsictl/Makefile ============================================================================== --- stable/10/usr.bin/iscsictl/Makefile Wed Jan 14 11:26:03 2015 (r277172) +++ stable/10/usr.bin/iscsictl/Makefile Wed Jan 14 11:29:16 2015 (r277173) @@ -4,7 +4,7 @@ PROG= iscsictl SRCS= iscsictl.c periphs.c parse.y token.l y.tab.h CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi -MAN= iscsictl.8 +MAN= iscsi.conf.5 iscsictl.8 DPADD= ${LIBCAM} ${LIBUTIL} LDADD= -lcam -lutil Copied: stable/10/usr.bin/iscsictl/iscsi.conf.5 (from r275510, head/usr.bin/iscsictl/iscsi.conf.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/iscsictl/iscsi.conf.5 Wed Jan 14 11:29:16 2015 (r277173, copy of r275510, head/usr.bin/iscsictl/iscsi.conf.5) @@ -0,0 +1,188 @@ +.\" Copyright (c) 2007-2010 Daniel Braniss +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 17, 2013 +.Dt ISCSI.CONF 5 +.Os +.Sh NAME +.Nm iscsi.conf +.Nd iSCSI initiator configuration file +.Sh DESCRIPTION +The file +.Nm , +is used by the +.Xr iscsictl 8 +and +.Xr iscontrol 8 +utilities. +It contains declarations and parameter/key-options. +The syntax is very simple, +.D1 Li variable = value; +and they can be grouped via a +.Em block +declaration: +.Bf Li +.Bd -literal + # this is a comment + target_1 { # nickname + variable = value; + ... + } # this must be on a line by itself. +.Ed +.Ef +.Pp +The following are specified in the iSCSI RFC 3720, +for a full description see sections 11/12 of the RFC. +.Bl -tag -width MaxConnections +.It Cm AuthMethod +currently only supported authentication method is CHAP, with +digest either MD5 or SHA. +Default is none. +.It Cm HeaderDigest +a +.Em digest +is calculated on the header of all iSCSI PDUs, and +checked. +Only CRC32C is implemented. +Default is none. +.It Cm DataDigest +same as for HeaderDigest, but on the data part of the iSCSI PDU. +(not yet tested) +.It Cm TargetName +is the name by which the target is known, not to be confused with +target address, either obtained via the target administrator, or +from a +.Em discovery session . +.It Cm InitiatorName +if not specified, defaults to +.Sy iqn.2005-01.il.ac.huji.cs: +.Aq hostname . +.It Cm TargetAddress +is of the form +.Sy domainname[:port][,portal-group-tag] +to quote the RFC: +.Bd -ragged -compact +The domainname can be specified as either a DNS host name, a +dotted-decimal IPv4 address, or a bracketed IPv6 address as specified +in [RFC2732]. +.Ed +Note: portal-group-tag is unused at the moment. +.Em not implemented yet. +.It Cm MaxRecvDataSegmentLength +the maximum data segment length in +bytes it can receive in an iSCSI PDU, default is 8192. +.It Cm MaxOutstandingR2T +is used to calculate/negotiate the +.Em tag opening , +can be overridden by the +.Sy tag +option. +.It Cm SessionType +either Discovery or Normal, default is Normal, see the +.Fl d +flag of +.Cm iscontrol . +.El +.sp +The following are not specified in the +.Sy RFC 3720 +.Bl -tag -width sockbufsize +.It Cm port +The iSCSI port used by the iSCSI protocol, defaults to 3260. +.It Cm tags +Sets the +.Em tag opening +to the value specified. +.It Cm maxluns +overrides the compiled value of +.Sy luns , +see +.Xr iscsi_initiator 4 . +This value can only be reduced. +.It Cm sockbufsize +sets the receiver and transmitter socket buffer size to +.Em size , +in kilobytes. +The default is 128. +.El +.sp +If +.Em AuthMethod +is set to +.Cm CHAP , +then the following must also be set: +.Bl -tag -width chapSecret +.It Cm chapSecret +this +.Em shared-secret . +Can be either an ASCII string (e.g. hello world), a hex string (e.g +0xababcd0987654321...), or base64 string (eg 0b...) +.It Cm chapIName +the chap-name, defaults to +.Em hostname . +.It Cm chapDigest +can be MD5 or SHA1. +.It Cm tgtChapName/tgtChapSecret +name and secret used for mutual CHAP; by default, mutual CHAP +is not used. +.El +.Sh FILES +.Bl -tag -width indent +.It Pa /etc/iscsi.conf +.El +.Sh EXAMPLES +.Bd -literal +# +# Globals +# +port = 3260 +# +myiscsi { # nickname + targetaddress = iscsi1 + targetname = iqn.1900.com.com:sn.123456 +} +chaptest { + targetaddress= 10.0.0.1; + targetname = iqn.1900.com.com:sn.123456 + initiatorname= iqn.2005-01.il.ac.huji.cs:nobody + authmethod = CHAP; chapDigest = SHA1; + chapsecret = 0x3713c3336d9a224c2791c873d3d2b174 + tags = 256 +} +.Ed +.Sh SEE ALSO +.Xr iscsi_initiator 4 , +.Xr iscsictl 8 , +.Xr iscontrol 8 +.Sh STANDARDS +ISCSI RFC 3720 +.\"Sh HISTORY +.\"Sh AUTHORS +.Sh BUGS +Some options have not been implemented, either they were found +to be unnecessary, or not understood, this can change in the future. +.br +The tags opening value is difficult to calculate, use wisely. From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 11:31:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD62FCB9; Wed, 14 Jan 2015 11:31:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97FEA298; Wed, 14 Jan 2015 11:31:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EBVW7F036979; Wed, 14 Jan 2015 11:31:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBVWKd036978; Wed, 14 Jan 2015 11:31:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141131.t0EBVWKd036978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277174 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:31:32 -0000 Author: trasz Date: Wed Jan 14 11:31:31 2015 New Revision: 277174 URL: https://svnweb.freebsd.org/changeset/base/277174 Log: MFC r275752: Fix quick_exit(3) manual page to match reality - the status was missing. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/stdlib/quick_exit.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/quick_exit.3 ============================================================================== --- stable/10/lib/libc/stdlib/quick_exit.3 Wed Jan 14 11:29:16 2015 (r277173) +++ stable/10/lib/libc/stdlib/quick_exit.3 Wed Jan 14 11:31:31 2015 (r277174) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 7, 2011 +.Dd December 13, 2014 .Dt QUICK_EXIT 3 .Os .Sh NAME @@ -35,7 +35,7 @@ .Sh SYNOPSIS .In stdlib.h .Ft _Noreturn void -.Fn quick_exit "void" +.Fn quick_exit "int status" .Sh DESCRIPTION The .Fn quick_exit From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 11:53:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52E079F; Wed, 14 Jan 2015 11:53:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E8A3794; Wed, 14 Jan 2015 11:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EBrg2F046891; Wed, 14 Jan 2015 11:53:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBrg0k046890; Wed, 14 Jan 2015 11:53:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141153.t0EBrg0k046890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277175 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:53:42 -0000 Author: trasz Date: Wed Jan 14 11:53:41 2015 New Revision: 277175 URL: https://svnweb.freebsd.org/changeset/base/277175 Log: Mention /net in hier(7). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Wed Jan 14 11:31:31 2015 (r277174) +++ head/share/man/man7/hier.7 Wed Jan 14 11:53:41 2015 (r277175) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 10, 2014 +.Dd January 14, 2015 .Dt HIER 7 .Os .Sh NAME @@ -159,6 +159,10 @@ floppy disks .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point +.It Pa /net/ +automounted NFS shares; +see +.Xr auto_master 5 .It Pa /proc/ process file system; see From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 12:46:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8FF1B08; Wed, 14 Jan 2015 12:46:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ABDFC69; Wed, 14 Jan 2015 12:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ECkdwW070380; Wed, 14 Jan 2015 12:46:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ECkcrY070372; Wed, 14 Jan 2015 12:46:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501141246.t0ECkcrY070372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 14 Jan 2015 12:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277176 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 12:46:39 -0000 Author: glebius Date: Wed Jan 14 12:46:38 2015 New Revision: 277176 URL: https://svnweb.freebsd.org/changeset/base/277176 Log: Clean some dead code. Modified: head/sys/dev/mii/mii.c head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Jan 14 11:53:41 2015 (r277175) +++ head/sys/dev/mii/mii.c Wed Jan 14 12:46:38 2015 (r277176) @@ -612,18 +612,6 @@ mii_pollstat(struct mii_data *mii) } } -/* - * Inform the PHYs that the interface is down. - */ -void -mii_down(struct mii_data *mii) -{ - struct mii_softc *child; - - LIST_FOREACH(child, &mii->mii_phys, mii_list) - mii_phy_down(child); -} - static unsigned char mii_bitreverse(unsigned char x) { Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Wed Jan 14 11:53:41 2015 (r277175) +++ head/sys/dev/mii/mii_physubr.c Wed Jan 14 12:46:38 2015 (r277176) @@ -279,12 +279,6 @@ mii_phy_reset(struct mii_softc *sc) } void -mii_phy_down(struct mii_softc *sc) -{ - -} - -void mii_phy_update(struct mii_softc *sc, int cmd) { struct mii_data *mii = sc->mii_pdata; @@ -479,7 +473,6 @@ mii_phy_detach(device_t dev) struct mii_softc *sc; sc = device_get_softc(dev); - mii_phy_down(sc); sc->mii_dev = NULL; LIST_REMOVE(sc, mii_list); return (0); Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Wed Jan 14 11:53:41 2015 (r277175) +++ head/sys/dev/mii/miivar.h Wed Jan 14 12:46:38 2015 (r277176) @@ -235,7 +235,6 @@ extern driver_t miibus_driver; int mii_attach(device_t, device_t *, if_t, ifm_change_cb_t, ifm_stat_cb_t, int, int, int, int); -void mii_down(struct mii_data *); int mii_mediachg(struct mii_data *); void mii_tick(struct mii_data *); void mii_pollstat(struct mii_data *); @@ -243,7 +242,6 @@ void mii_phy_add_media(struct mii_softc int mii_phy_auto(struct mii_softc *); int mii_phy_detach(device_t dev); -void mii_phy_down(struct mii_softc *); u_int mii_phy_flowstatus(struct mii_softc *); void mii_phy_reset(struct mii_softc *); void mii_phy_setmedia(struct mii_softc *sc); From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 12:46:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A61D0C45; Wed, 14 Jan 2015 12:46:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FA35C6F; Wed, 14 Jan 2015 12:46:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ECkxki070458; Wed, 14 Jan 2015 12:46:59 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ECkxsZ070455; Wed, 14 Jan 2015 12:46:59 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201501141246.t0ECkxsZ070455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 14 Jan 2015 12:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277177 - in head: lib/libpmc sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 12:46:59 -0000 Author: rrs Date: Wed Jan 14 12:46:58 2015 New Revision: 277177 URL: https://svnweb.freebsd.org/changeset/base/277177 Log: Update the hwpmc driver to have the new type HASWELL_XEON. Also go back through HASWELL, IVY_BRIDGE, IVY_BRIDGE_XEON and SANDY_BRIDGE to straighten out all the missing PMCs. We also add a new pmc tool pmcstudy, this allows one to run the various formulas from the documents "Using Intel Vtune Amplifier XE on XXX Generation platforms" for IB/SB and Haswell. The tool also allows one to postulate your own formulas with any of the various PMC's. At some point I will enahance this to work with Brendan Gregg's flame-graphs so we can flamegraph various PMC interactions. Note the manual page also needs some work (lots of work) but gnn has committed to help me with that ;-) Reviewed by: gnn MFC after:1 month Sponsored by: Netflix Inc. Added: head/usr.sbin/pmcstudy/ head/usr.sbin/pmcstudy/Makefile (contents, props changed) head/usr.sbin/pmcstudy/eval_expr.c (contents, props changed) head/usr.sbin/pmcstudy/eval_expr.h (contents, props changed) head/usr.sbin/pmcstudy/pmcstudy.1 (contents, props changed) head/usr.sbin/pmcstudy/pmcstudy.c (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/hwpmc/hwpmc_uncore.c head/sys/dev/hwpmc/hwpmc_x86.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h head/usr.sbin/Makefile Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Wed Jan 14 12:46:38 2015 (r277176) +++ head/lib/libpmc/libpmc.c Wed Jan 14 12:46:58 2015 (r277177) @@ -200,6 +200,12 @@ static const struct pmc_event_descr hasw __PMC_EV_ALIAS_HASWELL() }; +static const struct pmc_event_descr haswell_xeon_event_table[] = +{ + __PMC_EV_ALIAS_HASWELL_XEON() +}; + + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -267,6 +273,7 @@ PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOF PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -312,6 +319,7 @@ PMC_CLASS_TABLE_DESC(core2, IAP, core2, PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); +PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); @@ -626,6 +634,8 @@ static struct pmc_event_alias core2_alia #define nehalem_ex_aliases_without_iaf core2_aliases_without_iaf #define haswell_aliases core2_aliases #define haswell_aliases_without_iaf core2_aliases_without_iaf +#define haswell_xeon_aliases core2_aliases +#define haswell_xeon_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -896,7 +906,8 @@ iap_allocate_pmc(enum pmc_event pe, char n = pmc_parse_mask(iap_rsp_mask_sb_sbx_ib, p, &rsp); } else return (-1); - } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL) { + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL || + cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else @@ -2788,6 +2799,10 @@ pmc_event_names_of_class(enum pmc_class ev = haswell_event_table; count = PMC_EVENT_TABLE_SIZE(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + ev = haswell_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(haswell_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -3115,6 +3130,9 @@ pmc_init(void) pmc_class_table[n++] = &haswelluc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + PMC_MDEP_INIT_INTEL_V2(haswell_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3280,6 +3298,11 @@ _pmc_name_of_event(enum pmc_event pe, en ev = haswell_event_table; evfence = haswell_event_table + PMC_EVENT_TABLE_SIZE(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + ev = haswell_xeon_event_table; + evfence = haswell_xeon_event_table + PMC_EVENT_TABLE_SIZE(haswell_xeon); + break; + case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Wed Jan 14 12:46:38 2015 (r277176) +++ head/sys/dev/hwpmc/hwpmc_core.c Wed Jan 14 12:46:58 2015 (r277177) @@ -38,7 +38,11 @@ __FBSDID("$FreeBSD$"); #include #include +#if (__FreeBSD_version >= 1100000) #include +#else +#include +#endif #include #include #include @@ -569,7 +573,8 @@ struct iap_event_descr { #define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ #define IAP_F_HW (1 << 10) /* CPU: Haswell */ #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ -#define IAP_F_FM (1 << 12) /* Fixed mask */ +#define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ +#define IAP_F_FM (1 << 13) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -613,11 +618,11 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS), + IAP_F_CAS | IAP_F_HWX), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS), + IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -638,9 +643,9 @@ static struct iap_event_descr iap_events IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | @@ -654,7 +659,7 @@ static struct iap_event_descr iap_events IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW), + IAP_F_HW | IAP_F_HWX), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), @@ -662,26 +667,27 @@ static struct iap_event_descr iap_events IAP_F_SBX), IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW), + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW), + IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW), + IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_IB | IAP_F_IBX), IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), @@ -697,15 +703,16 @@ static struct iap_event_descr iap_events IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW), + IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAP_F_IB | IAP_F_IBX | IAP_F_HWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -716,24 +723,24 @@ static struct iap_event_descr iap_events IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX), + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX ), IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB | - IAP_F_SBX), - IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -796,30 +803,30 @@ static struct iap_event_descr iap_events IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW), + IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW), + IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW), + IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW), + IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -850,7 +857,7 @@ static struct iap_event_descr iap_events IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW), + IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -878,10 +885,10 @@ static struct iap_event_descr iap_events IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS), + IAP_F_CAS | IAP_F_HWX), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS), + IAP_F_CAS | IAP_F_HWX), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -897,10 +904,10 @@ static struct iap_event_descr iap_events IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -942,25 +949,25 @@ static struct iap_event_descr iap_events IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW), + IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW), + IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW), - IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW), - IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), @@ -970,9 +977,9 @@ static struct iap_event_descr iap_events IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -989,7 +996,7 @@ static struct iap_event_descr iap_events IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1001,10 +1008,10 @@ static struct iap_event_descr iap_events IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1016,25 +1023,25 @@ static struct iap_event_descr iap_events IAPDESCR(5BH_4FH, 0x5B, 0x4F, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(5CH_01H, 0x5C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB), - IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX), + IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ + IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), @@ -1046,9 +1053,9 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -1090,20 +1097,25 @@ static struct iap_event_descr iap_events IAPDESCR(78H, 0x78, IAP_M_CORE | IAP_M_SNOOPTYPE, IAP_F_CA | IAP_F_CC2), IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + + IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + + IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1120,10 +1132,10 @@ static struct iap_event_descr iap_events IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS), + IAP_F_CAS | IAP_F_HWX), IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), - IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX), IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1141,74 +1153,74 @@ static struct iap_event_descr iap_events IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(87H_08H, 0x87, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_80H, 0x88, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_FFH, 0x88, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_80H, 0x89, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_FFH, 0x89, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -1223,45 +1235,45 @@ static struct iap_event_descr iap_events IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + + IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A0H_00H, 0xA0, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A1H_01H, 0xA1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_02H, 0xA1, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_IB | IAP_F_IBX), + IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_30H, 0xA1, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_40H, 0xA1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_80H, 0xA1, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1269,15 +1281,17 @@ static struct iap_event_descr iap_events IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW), + IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB), + IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX), + IAPDESCR(A3H_0CH, 0xA3, 0x08, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | + IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1295,17 +1309,17 @@ static struct iap_event_descr iap_events IAPDESCR(ACH_0AH, 0xAC, 0x0A, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1315,7 +1329,7 @@ static struct iap_event_descr iap_events IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1353,7 +1367,7 @@ static struct iap_event_descr iap_events IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_CAS), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1364,30 +1378,30 @@ static struct iap_event_descr iap_events IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW), + IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(BDH_01H, 0xBD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(BDH_20H, 0xBD, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(BFH_05H, 0xBF, 0x05, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS), + IAP_F_CAS | IAP_F_HWX), IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1398,21 +1412,22 @@ static struct iap_event_descr iap_events IAPDESCR(C1H_01H, 0xC1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C1H_02H, 0xC1, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C1H_08H, 0xC1, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C1H_10H, 0xC1, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW), + IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1424,37 +1439,39 @@ static struct iap_event_descr iap_events IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS | IAP_F_HWX), IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_CAS), IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), IAPDESCR(C3H_20H, 0xC3, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_08H, 0xC4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), IAPDESCR(C4H_10H, 0xC4, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_20H, 0xC4, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_40H, 0xC4, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_CAS), IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_CAS), IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_CAS), @@ -1466,17 +1483,17 @@ static struct iap_event_descr iap_events IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C5H_10H, 0xC5, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_20H, 0xC5, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_CAS), IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_CAS), IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_CAS), @@ -1511,15 +1528,15 @@ static struct iap_event_descr iap_events IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), IAPDESCR(CAH_02H, 0xCA, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_04H, 0xCA, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_08H, 0xCA, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_10H, 0xCA, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_1EH, 0xCA, 0x1E, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_20H, 0xCA, 0x20, IAP_F_CAS), IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_CAS), IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_CAS), @@ -1545,11 +1562,11 @@ static struct iap_event_descr iap_events IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_20H, 0xCC, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CDH_01H, 0xCD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(CDH_02H, 0xCD, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -1559,55 +1576,67 @@ static struct iap_event_descr iap_events /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - + IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX | + IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), /* Not in spec but in linux and Vtune guide */ + IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX | + IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), /* Not in spec but in linux and Vtune guide */ + IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX | + IAP_F_IB | IAP_F_IBX), /* Not in spec but in linux and Vtune guide */ + IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX | + IAP_F_IB | IAP_F_IBX), /* Not in spec but in linux and Vtune guide */ IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW), - IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), + IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E), IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), - IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX), - IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D3H_03H, 0xD0, 0x3, IAP_F_IBX ), + IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), /* Not defined for IBX */ + IAPDESCR(D3H_0CH, 0xD0, 0x0, IAP_F_IBX ), + IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX ), + IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX ), IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), @@ -1668,7 +1697,8 @@ static struct iap_event_descr iap_events IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), - IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IBX | IAP_F_HW), + IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 13:03:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA3A6E56; Wed, 14 Jan 2015 13:03:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C699DE05; Wed, 14 Jan 2015 13:03:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ED349I079407; Wed, 14 Jan 2015 13:03:04 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ED34QI079406; Wed, 14 Jan 2015 13:03:04 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201501141303.t0ED34QI079406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 14 Jan 2015 13:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277178 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 13:03:05 -0000 Author: ed Date: Wed Jan 14 13:03:03 2015 New Revision: 277178 URL: https://svnweb.freebsd.org/changeset/base/277178 Log: Make sure CAP_BINDAT and CAP_CONNECTAT are part of CAP_ALL0. This makes sure that file descriptors of opened directories will actually get these capabilities. Without this change, bindat() and connectat() don't seem to work for me. MFC after: 2 weeks Reviewed by: rwatson, pjd Modified: head/sys/sys/capsicum.h Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Wed Jan 14 12:46:58 2015 (r277177) +++ head/sys/sys/capsicum.h Wed Jan 14 13:03:03 2015 (r277178) @@ -206,10 +206,10 @@ CAP_SETSOCKOPT | CAP_SHUTDOWN) /* All used bits for index 0. */ -#define CAP_ALL0 CAPRIGHT(0, 0x0000007FFFFFFFFFULL) +#define CAP_ALL0 CAPRIGHT(0, 0x000001FFFFFFFFFFULL) /* Available bits for index 0. */ -#define CAP_UNUSED0_40 CAPRIGHT(0, 0x0000008000000000ULL) +#define CAP_UNUSED0_42 CAPRIGHT(0, 0x0000020000000000ULL) /* ... */ #define CAP_UNUSED0_57 CAPRIGHT(0, 0x0100000000000000ULL) From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 14:04:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B0D0D4A; Wed, 14 Jan 2015 14:04:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8CE679; Wed, 14 Jan 2015 14:04:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EE4Va5008404; Wed, 14 Jan 2015 14:04:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EE4UR7008401; Wed, 14 Jan 2015 14:04:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501141404.t0EE4UR7008401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 14:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277179 - in head/sys: dev/usb kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:04:31 -0000 Author: hselasky Date: Wed Jan 14 14:04:29 2015 New Revision: 277179 URL: https://svnweb.freebsd.org/changeset/base/277179 Log: Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background. MFC after: 4 days Reported by: dchagin@ Modified: head/sys/dev/usb/usb_device.c head/sys/kern/kern_conf.c head/sys/sys/conf.h Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * usb_destroy_dev_sync(pd); return; } - + + /* make sure we can re-use the device name */ + delist_dev(pd->cdev); + USB_BUS_LOCK(bus); LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); /* get cleanup going */ Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Wed Jan 14 13:03:03 2015 (r277178) +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) } } +static void +delist_dev_locked(struct cdev *dev) +{ + struct cdev *child; + devfs_destroy(dev); + LIST_FOREACH(child, &dev->si_children, si_siblings) + delist_dev_locked(child); +} + +void +delist_dev(struct cdev *dev) +{ + dev_lock(); + delist_dev_locked(dev); + dev_unlock(); +} + void destroy_dev(struct cdev *dev) { Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Wed Jan 14 13:03:03 2015 (r277178) +++ head/sys/sys/conf.h Wed Jan 14 14:04:29 2015 (r277179) @@ -245,6 +245,7 @@ void clone_cleanup(struct clonedevs **); int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, int extra); int count_dev(struct cdev *_dev); +void delist_dev(struct cdev *_dev); void destroy_dev(struct cdev *_dev); int destroy_dev_sched(struct cdev *dev); int destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg); From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 14:23:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A36B421; Wed, 14 Jan 2015 14:23:07 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42BE48D9; Wed, 14 Jan 2015 14:23:07 +0000 (UTC) Received: from new-host.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 27534B91E; Wed, 14 Jan 2015 09:23:06 -0500 (EST) Message-ID: <54B67BC9.70904@FreeBSD.org> Date: Wed, 14 Jan 2015 09:23:05 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> In-Reply-To: <201501140541.t0E5fV00070032@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 14 Jan 2015 09:23:06 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:23:07 -0000 On 1/14/15 12:41 AM, Warner Losh wrote: > Author: imp > Date: Wed Jan 14 05:41:31 2015 > New Revision: 277163 > URL: https://svnweb.freebsd.org/changeset/base/277163 > > Log: > Add a rather obnoxious warning if you don't have NEW_PCIB defined > since it's a total crap shoot if things will work. Should we just make it a #error instead? (Some day I hope to have NEW_PCIB enabled by default and remove the old code. Will take a while to get there for the generic PCI code, but cardbus is probably only used on x86 so that would be fine.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 14:49:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C39CF4; Wed, 14 Jan 2015 14:49:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 384DCB9A; Wed, 14 Jan 2015 14:49:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EEnxhG028155; Wed, 14 Jan 2015 14:49:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EEnxsW028154; Wed, 14 Jan 2015 14:49:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501141449.t0EEnxsW028154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Jan 2015 14:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277181 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:49:59 -0000 Author: emaste Date: Wed Jan 14 14:49:58 2015 New Revision: 277181 URL: https://svnweb.freebsd.org/changeset/base/277181 Log: elfcopy: Avoid divide-by-0 on section alignment 0 According to ELF ABI, alignment 0 and 1 has the same meaning: the section has no alignment constraints. PR: 196715 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Wed Jan 14 14:49:05 2015 (r277180) +++ head/contrib/elftoolchain/elfcopy/sections.c Wed Jan 14 14:49:58 2015 (r277181) @@ -777,6 +777,8 @@ resync_sections(struct elfcopy *ecp) continue; /* Align section offset. */ + if (s->align == 0) + s->align = 1; if (off <= s->off) { if (!s->loadable) s->off = roundup(off, s->align); From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 15:32:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17A58A3E; Wed, 14 Jan 2015 15:32:53 +0000 (UTC) Received: from mail-oi0-x22f.google.com (mail-oi0-x22f.google.com [IPv6:2607:f8b0:4003:c06::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA4129D; Wed, 14 Jan 2015 15:32:52 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id z81so7815450oif.6; Wed, 14 Jan 2015 07:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=OZNVzr8Tn4QbXKNMyBa6ej29DpBnFem/3Un73VGZ27Y=; b=npNqqvdBUfGZqeQsos5sRTssouWnCbFRlWmyBeuWSXSlXw5PM5UfEID6dGSWU8f62f zDWji5QJ/PoGgk4YEciUzq3yDW/UcdCCMLj2BCARaDRG/Y4aG+Q9WUuNOJzDZHBpK9KV j1MP79PeHbvRFdUOfZKinW4pwJ0lnD4k7Y8Rn4MIbq9uxcEci0v1IiKnMc3LL49nWmpq Ap0Sj65ablJyKY/vWbnbHbgnNlMPJqytnU72299eonmZoDzUUe2FD+L5PHuUU82mtK7l m1Yc9+NPlLKh40NVNKREcKXRjN5JF65dvD9L3zkOlYdRKCi3OXYThJUdNq6rq2d6m4jD CJBQ== X-Received: by 10.182.153.133 with SMTP id vg5mr2882221obb.20.1421249572080; Wed, 14 Jan 2015 07:32:52 -0800 (PST) Received: from zhabar.attlocal.net (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id ve6sm12199646obb.2.2015.01.14.07.32.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jan 2015 07:32:51 -0800 (PST) Date: Wed, 14 Jan 2015 07:32:46 -0800 From: Justin Hibbits To: John Baldwin Subject: Re: svn commit: r277163 - head/sys/dev/cardbus Message-ID: <20150114073246.74c159df@zhabar.attlocal.net> In-Reply-To: <54B67BC9.70904@FreeBSD.org> References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 15:32:53 -0000 On Wed, 14 Jan 2015 09:23:05 -0500 John Baldwin wrote: > On 1/14/15 12:41 AM, Warner Losh wrote: > > Author: imp > > Date: Wed Jan 14 05:41:31 2015 > > New Revision: 277163 > > URL: https://svnweb.freebsd.org/changeset/base/277163 > > > > Log: > > Add a rather obnoxious warning if you don't have NEW_PCIB defined > > since it's a total crap shoot if things will work. > > Should we just make it a #error instead? (Some day I hope to have > NEW_PCIB enabled by default and remove the old code. Will take a > while to get there for the generic PCI code, but cardbus is probably > only used on x86 so that would be fine.) > Also powerpc, but NEW_PCIB is default there as well. - Justin From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 16:22:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87EEB8A4; Wed, 14 Jan 2015 16:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 738AC864; Wed, 14 Jan 2015 16:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EGM1g2075105; Wed, 14 Jan 2015 16:22:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EGM1FL075104; Wed, 14 Jan 2015 16:22:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501141622.t0EGM1FL075104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Jan 2015 16:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277185 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 16:22:01 -0000 Author: mav Date: Wed Jan 14 16:22:00 2015 New Revision: 277185 URL: https://svnweb.freebsd.org/changeset/base/277185 Log: Fix overflow bug from r248577, turning 30s TRIM timeout into ~4s. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 15:45:18 2015 (r277184) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 16:22:00 2015 (r277185) @@ -440,7 +440,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * if (tm == NULL) return; - timelimit = gethrtime() - trim_timeout * NANOSEC; + timelimit = gethrtime() - (hrtime_t)trim_timeout * NANOSEC; if (vd->vdev_isl2cache) { txgsafe = UINT64_MAX; txgtarget = UINT64_MAX; From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 17:58:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10C62325; Wed, 14 Jan 2015 17:58:38 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id D0F5C2D53; Wed, 14 Jan 2015 17:58:36 +0000 (UTC) Message-ID: <54B6AE1C.5010405@FreeBSD.org> Date: Wed, 14 Jan 2015 20:57:48 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277179 - in head/sys: dev/usb kern sys References: <201501141404.t0EE4UR7008401@svn.freebsd.org> In-Reply-To: <201501141404.t0EE4UR7008401@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 17:58:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 14.01.2015 17:04, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jan 14 14:04:29 2015 > New Revision: 277179 > URL: https://svnweb.freebsd.org/changeset/base/277179 >=20 > Log: > Add a kernel function to delist our kernel character devices, so that= > the device name can be re-used right away in case we are destroying > the character devices in the background. > =20 > MFC after: 4 days > Reported by: dchagin@ >=20 > Modified: > head/sys/dev/usb/usb_device.c > head/sys/kern/kern_conf.c > head/sys/sys/conf.h >=20 > Modified: head/sys/dev/usb/usb_device.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) > +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) > @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * > usb_destroy_dev_sync(pd); > return; > } > -=09 > + > + /* make sure we can re-use the device name */ > + delist_dev(pd->cdev); > + > USB_BUS_LOCK(bus); > LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); > /* get cleanup going */ >=20 > Modified: head/sys/kern/kern_conf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_conf.c Wed Jan 14 13:03:03 2015 (r277178) > +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) > @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) > } > } > =20 > +static void > +delist_dev_locked(struct cdev *dev) > +{ > + struct cdev *child; > + devfs_destroy(dev); > + LIST_FOREACH(child, &dev->si_children, si_siblings) > + delist_dev_locked(child); > +} It looks a bit strange. First you call destroy(dev), then you are trying enumerate its children. It is ok? --=20 WBR, Andrey V. Elsukov --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUtq4dAAoJEAHF6gQQyKF6Dq0H/3C/56a4gNkHOzh+VJlDXHlT hdllrSTg6Os4I+elYlviyOBKthU7hFOlx0NKwt+J5VL7UVAgLiUcHM9jrpFka+9a 2trKZxKUUbvYqRuL5iaPFH2m4RxfuldgFD6GlkallOO1J4tBVZaPIW/g85M+PK1i u92k+tVjLaK3iepf1L/OeYXdSjIAM8TapsE8S5KmtB7yr7t1ExrxlxRDGc+eq1m7 hFXxo4KSYcyvBv3ltybBU7fIf0F81ngQdyuHVBx6sVG78NCeB6X+XkdOc8a/WZ6P xzNtMcuCnwEUAWWoQcEWnAHAKS+DV78g1eG4nOB5MPAO1rlslyHlshlbca9fzrQ= =JQPf -----END PGP SIGNATURE----- --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 19:54:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D762E39; Wed, 14 Jan 2015 19:54:59 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E263A1A4; Wed, 14 Jan 2015 19:54:58 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 590761FE022; Wed, 14 Jan 2015 20:54:56 +0100 (CET) Message-ID: <54B6C9BF.6010408@selasky.org> Date: Wed, 14 Jan 2015 20:55:43 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277179 - in head/sys: dev/usb kern sys References: <201501141404.t0EE4UR7008401@svn.freebsd.org> <54B6AE1C.5010405@FreeBSD.org> In-Reply-To: <54B6AE1C.5010405@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 19:54:59 -0000 On 01/14/15 18:57, Andrey V. Elsukov wrote: > On 14.01.2015 17:04, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Jan 14 14:04:29 2015 >> New Revision: 277179 >> URL: https://svnweb.freebsd.org/changeset/base/277179 >> >> Log: >> Add a kernel function to delist our kernel character devices, so that >> the device name can be re-used right away in case we are destroying >> the character devices in the background. >> >> MFC after: 4 days >> Reported by: dchagin@ >> >> Modified: >> head/sys/dev/usb/usb_device.c >> head/sys/kern/kern_conf.c >> head/sys/sys/conf.h >> >> Modified: head/sys/dev/usb/usb_device.c >> ============================================================================== >> --- head/sys/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) >> +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) >> @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * >> usb_destroy_dev_sync(pd); >> return; >> } >> - >> + >> + /* make sure we can re-use the device name */ >> + delist_dev(pd->cdev); >> + >> USB_BUS_LOCK(bus); >> LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); >> /* get cleanup going */ >> >> Modified: head/sys/kern/kern_conf.c >> ============================================================================== >> --- head/sys/kern/kern_conf.c Wed Jan 14 13:03:03 2015 (r277178) >> +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) >> @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) >> } >> } >> >> +static void >> +delist_dev_locked(struct cdev *dev) >> +{ >> + struct cdev *child; >> + devfs_destroy(dev); >> + LIST_FOREACH(child, &dev->si_children, si_siblings) >> + delist_dev_locked(child); >> +} > > It looks a bit strange. First you call destroy(dev), then you are trying > enumerate its children. It is ok? > Hi, Maybe you misread dev_destroy() with devfs_destroy(). devfs_destroy() only clears a flag bit, so that the devfs system does no longer show the device and the duplicate device check done when you create a new character device is not seeing the yet-to-be destroyed device. It should be OK from what I can see and have tested. --HPS From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 21:23:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0597696; Wed, 14 Jan 2015 21:23:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB785D6C; Wed, 14 Jan 2015 21:23:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ELNkXg020966; Wed, 14 Jan 2015 21:23:46 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ELNkN4020965; Wed, 14 Jan 2015 21:23:46 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501142123.t0ELNkN4020965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 14 Jan 2015 21:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277194 - stable/10/lib/libstand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 21:23:47 -0000 Author: nwhitehorn Date: Wed Jan 14 21:23:46 2015 New Revision: 277194 URL: https://svnweb.freebsd.org/changeset/base/277194 Log: MFC r276412: Fix loader's ability to read the 10.1 release PowerPC ISOs. There appears to be some kind of problem with the version of makefs used for these disks. There may be a better way to handle this problem, so I've set the MFC timer for a fairly long time period. Modified: stable/10/lib/libstand/cd9660.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/cd9660.c ============================================================================== --- stable/10/lib/libstand/cd9660.c Wed Jan 14 19:49:07 2015 (r277193) +++ stable/10/lib/libstand/cd9660.c Wed Jan 14 21:23:46 2015 (r277194) @@ -151,9 +151,14 @@ susp_lookup_record(struct open_file *f, return (NULL); p = susp_buffer + isonum_733(shc->offset); end = p + isonum_733(shc->length); - } else + } else { /* Ignore this record and skip to the next. */ p += isonum_711(sh->length); + + /* Avoid infinite loops with corrupted file systems */ + if (isonum_711(sh->length) == 0) + return (NULL); + } } return (NULL); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 21:27:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C152692A; Wed, 14 Jan 2015 21:27:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A89F1D9F; Wed, 14 Jan 2015 21:27:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ELRogj021704; Wed, 14 Jan 2015 21:27:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ELRlvE021690; Wed, 14 Jan 2015 21:27:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501142127.t0ELRlvE021690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 14 Jan 2015 21:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r277195 - in releng: 10.0 10.0/crypto/openssl/crypto/asn1 10.0/crypto/openssl/crypto/bio 10.0/crypto/openssl/crypto/bn 10.0/crypto/openssl/crypto/bn/asm 10.0/crypto/openssl/crypto/dsa 1... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 21:27:50 -0000 Author: delphij Date: Wed Jan 14 21:27:46 2015 New Revision: 277195 URL: https://svnweb.freebsd.org/changeset/base/277195 Log: Fix multiple vulnerabilities in OpenSSL. [SA-15:01] Approved by: so Modified: releng/10.0/UPDATING releng/10.0/crypto/openssl/crypto/asn1/a_bitstr.c releng/10.0/crypto/openssl/crypto/asn1/a_type.c releng/10.0/crypto/openssl/crypto/asn1/a_verify.c releng/10.0/crypto/openssl/crypto/asn1/asn1.h releng/10.0/crypto/openssl/crypto/asn1/asn1_err.c releng/10.0/crypto/openssl/crypto/asn1/x_algor.c releng/10.0/crypto/openssl/crypto/bio/bss_dgram.c releng/10.0/crypto/openssl/crypto/bn/asm/mips.pl releng/10.0/crypto/openssl/crypto/bn/asm/x86_64-gcc.c releng/10.0/crypto/openssl/crypto/bn/bn_asm.c releng/10.0/crypto/openssl/crypto/bn/bntest.c releng/10.0/crypto/openssl/crypto/dsa/dsa_asn1.c releng/10.0/crypto/openssl/crypto/ecdsa/ecs_vrf.c releng/10.0/crypto/openssl/crypto/x509/x509.h releng/10.0/crypto/openssl/crypto/x509/x_all.c releng/10.0/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod releng/10.0/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod releng/10.0/crypto/openssl/ssl/d1_pkt.c releng/10.0/crypto/openssl/ssl/d1_srvr.c releng/10.0/crypto/openssl/ssl/s23_srvr.c releng/10.0/crypto/openssl/ssl/s3_clnt.c releng/10.0/crypto/openssl/ssl/s3_pkt.c releng/10.0/crypto/openssl/ssl/s3_srvr.c releng/10.0/crypto/openssl/ssl/ssl.h releng/10.0/crypto/openssl/ssl/ssl_lib.c releng/10.0/crypto/openssl/util/libeay.num releng/10.0/sys/conf/newvers.sh releng/10.1/UPDATING releng/10.1/crypto/openssl/crypto/asn1/a_bitstr.c releng/10.1/crypto/openssl/crypto/asn1/a_type.c releng/10.1/crypto/openssl/crypto/asn1/a_verify.c releng/10.1/crypto/openssl/crypto/asn1/asn1.h releng/10.1/crypto/openssl/crypto/asn1/asn1_err.c releng/10.1/crypto/openssl/crypto/asn1/x_algor.c releng/10.1/crypto/openssl/crypto/bio/bss_dgram.c releng/10.1/crypto/openssl/crypto/bn/asm/mips.pl releng/10.1/crypto/openssl/crypto/bn/asm/x86_64-gcc.c releng/10.1/crypto/openssl/crypto/bn/bn_asm.c releng/10.1/crypto/openssl/crypto/bn/bntest.c releng/10.1/crypto/openssl/crypto/dsa/dsa_asn1.c releng/10.1/crypto/openssl/crypto/ecdsa/ecs_vrf.c releng/10.1/crypto/openssl/crypto/x509/x509.h releng/10.1/crypto/openssl/crypto/x509/x_all.c releng/10.1/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod releng/10.1/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod releng/10.1/crypto/openssl/ssl/d1_pkt.c releng/10.1/crypto/openssl/ssl/d1_srvr.c releng/10.1/crypto/openssl/ssl/s23_srvr.c releng/10.1/crypto/openssl/ssl/s3_clnt.c releng/10.1/crypto/openssl/ssl/s3_pkt.c releng/10.1/crypto/openssl/ssl/s3_srvr.c releng/10.1/crypto/openssl/ssl/ssl.h releng/10.1/crypto/openssl/ssl/ssl_lib.c releng/10.1/crypto/openssl/util/libeay.num releng/10.1/sys/conf/newvers.sh releng/8.4/UPDATING releng/8.4/crypto/openssl/crypto/asn1/a_bitstr.c releng/8.4/crypto/openssl/crypto/asn1/a_type.c releng/8.4/crypto/openssl/crypto/asn1/a_verify.c releng/8.4/crypto/openssl/crypto/asn1/asn1.h releng/8.4/crypto/openssl/crypto/asn1/asn1_err.c releng/8.4/crypto/openssl/crypto/asn1/tasn_dec.c releng/8.4/crypto/openssl/crypto/asn1/x_algor.c releng/8.4/crypto/openssl/crypto/bn/asm/mips3.s releng/8.4/crypto/openssl/crypto/bn/asm/x86_64-gcc.c releng/8.4/crypto/openssl/crypto/bn/bn_asm.c releng/8.4/crypto/openssl/crypto/bn/bntest.c releng/8.4/crypto/openssl/crypto/dsa/dsa_asn1.c releng/8.4/crypto/openssl/crypto/ecdsa/ecs_vrf.c releng/8.4/crypto/openssl/crypto/x509/x509.h releng/8.4/crypto/openssl/crypto/x509/x_all.c releng/8.4/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod releng/8.4/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod releng/8.4/crypto/openssl/ssl/d1_pkt.c releng/8.4/crypto/openssl/ssl/d1_srvr.c releng/8.4/crypto/openssl/ssl/s23_srvr.c releng/8.4/crypto/openssl/ssl/s3_clnt.c releng/8.4/crypto/openssl/ssl/s3_pkt.c releng/8.4/crypto/openssl/ssl/s3_srvr.c releng/8.4/crypto/openssl/ssl/ssl.h releng/8.4/crypto/openssl/util/libeay.num releng/8.4/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/crypto/openssl/crypto/asn1/a_bitstr.c releng/9.3/crypto/openssl/crypto/asn1/a_type.c releng/9.3/crypto/openssl/crypto/asn1/a_verify.c releng/9.3/crypto/openssl/crypto/asn1/asn1.h releng/9.3/crypto/openssl/crypto/asn1/asn1_err.c releng/9.3/crypto/openssl/crypto/asn1/tasn_dec.c releng/9.3/crypto/openssl/crypto/asn1/x_algor.c releng/9.3/crypto/openssl/crypto/bn/asm/mips3.s releng/9.3/crypto/openssl/crypto/bn/asm/x86_64-gcc.c releng/9.3/crypto/openssl/crypto/bn/bn_asm.c releng/9.3/crypto/openssl/crypto/bn/bntest.c releng/9.3/crypto/openssl/crypto/dsa/dsa_asn1.c releng/9.3/crypto/openssl/crypto/ecdsa/ecs_vrf.c releng/9.3/crypto/openssl/crypto/x509/x509.h releng/9.3/crypto/openssl/crypto/x509/x_all.c releng/9.3/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod releng/9.3/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod releng/9.3/crypto/openssl/ssl/d1_pkt.c releng/9.3/crypto/openssl/ssl/d1_srvr.c releng/9.3/crypto/openssl/ssl/s23_srvr.c releng/9.3/crypto/openssl/ssl/s3_clnt.c releng/9.3/crypto/openssl/ssl/s3_pkt.c releng/9.3/crypto/openssl/ssl/s3_srvr.c releng/9.3/crypto/openssl/ssl/ssl.h releng/9.3/crypto/openssl/util/libeay.num releng/9.3/sys/conf/newvers.sh Modified: releng/10.0/UPDATING ============================================================================== --- releng/10.0/UPDATING Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/UPDATING Wed Jan 14 21:27:46 2015 (r277195) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20150114: p16 FreeBSD-SA-15:01.openssl + Fix multiple vulnerabilities in OpenSSL. [SA-15:01] + 20141223: p15 FreeBSD-SA-14:31.ntp FreeBSD-EN-14:13.freebsd-update Modified: releng/10.0/crypto/openssl/crypto/asn1/a_bitstr.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/a_bitstr.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/asn1/a_bitstr.c Wed Jan 14 21:27:46 2015 (r277195) @@ -136,11 +136,16 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN p= *pp; i= *(p++); + if (i > 7) + { + i=ASN1_R_INVALID_BIT_STRING_BITS_LEFT; + goto err; + } /* We do this to preserve the settings. If we modify * the settings, via the _set_bit function, we will recalculate * on output */ ret->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */ - ret->flags|=(ASN1_STRING_FLAG_BITS_LEFT|(i&0x07)); /* set */ + ret->flags|=(ASN1_STRING_FLAG_BITS_LEFT|i); /* set */ if (len-- > 1) /* using one because of the bits left byte */ { Modified: releng/10.0/crypto/openssl/crypto/asn1/a_type.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/a_type.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/asn1/a_type.c Wed Jan 14 21:27:46 2015 (r277195) @@ -113,7 +113,7 @@ IMPLEMENT_STACK_OF(ASN1_TYPE) IMPLEMENT_ASN1_SET_OF(ASN1_TYPE) /* Returns 0 if they are equal, != 0 otherwise. */ -int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b) +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) { int result = -1; Modified: releng/10.0/crypto/openssl/crypto/asn1/a_verify.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/a_verify.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/asn1/a_verify.c Wed Jan 14 21:27:46 2015 (r277195) @@ -90,6 +90,12 @@ int ASN1_verify(i2d_of_void *i2d, X509_A ASN1err(ASN1_F_ASN1_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM); goto err; } + + if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7) + { + ASN1err(ASN1_F_ASN1_VERIFY, ASN1_R_INVALID_BIT_STRING_BITS_LEFT); + goto err; + } inl=i2d(data,NULL); buf_in=OPENSSL_malloc((unsigned int)inl); @@ -146,6 +152,12 @@ int ASN1_item_verify(const ASN1_ITEM *it return -1; } + if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7) + { + ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ASN1_R_INVALID_BIT_STRING_BITS_LEFT); + return -1; + } + EVP_MD_CTX_init(&ctx); /* Convert signature OID into digest and public key OIDs */ Modified: releng/10.0/crypto/openssl/crypto/asn1/asn1.h ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/asn1.h Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/asn1/asn1.h Wed Jan 14 21:27:46 2015 (r277195) @@ -776,7 +776,7 @@ DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, int ASN1_TYPE_get(ASN1_TYPE *a); void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); -int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b); +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b); ASN1_OBJECT * ASN1_OBJECT_new(void ); void ASN1_OBJECT_free(ASN1_OBJECT *a); @@ -1329,6 +1329,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_R_ILLEGAL_TIME_VALUE 184 #define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185 #define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 +#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220 #define ASN1_R_INVALID_BMPSTRING_LENGTH 129 #define ASN1_R_INVALID_DIGIT 130 #define ASN1_R_INVALID_MIME_TYPE 205 Modified: releng/10.0/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/asn1_err.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/asn1/asn1_err.c Wed Jan 14 21:27:46 2015 (r277195) @@ -246,6 +246,7 @@ static ERR_STRING_DATA ASN1_str_reasons[ {ERR_REASON(ASN1_R_ILLEGAL_TIME_VALUE) ,"illegal time value"}, {ERR_REASON(ASN1_R_INTEGER_NOT_ASCII_FORMAT),"integer not ascii format"}, {ERR_REASON(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG),"integer too large for long"}, +{ERR_REASON(ASN1_R_INVALID_BIT_STRING_BITS_LEFT),"invalid bit string bits left"}, {ERR_REASON(ASN1_R_INVALID_BMPSTRING_LENGTH),"invalid bmpstring length"}, {ERR_REASON(ASN1_R_INVALID_DIGIT) ,"invalid digit"}, {ERR_REASON(ASN1_R_INVALID_MIME_TYPE) ,"invalid mime type"}, Modified: releng/10.0/crypto/openssl/crypto/asn1/x_algor.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/x_algor.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/asn1/x_algor.c Wed Jan 14 21:27:46 2015 (r277195) @@ -142,3 +142,14 @@ void X509_ALGOR_set_md(X509_ALGOR *alg, X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); } + +int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) + { + int rv; + rv = OBJ_cmp(a->algorithm, b->algorithm); + if (rv) + return rv; + if (!a->parameter && !b->parameter) + return 0; + return ASN1_TYPE_cmp(a->parameter, b->parameter); + } Modified: releng/10.0/crypto/openssl/crypto/bio/bss_dgram.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/bio/bss_dgram.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/bio/bss_dgram.c Wed Jan 14 21:27:46 2015 (r277195) @@ -982,7 +982,12 @@ static int dgram_sctp_free(BIO *a) return 0; data = (bio_dgram_sctp_data *)a->ptr; - if(data != NULL) OPENSSL_free(data); + if(data != NULL) + { + if(data->saved_message.data != NULL) + OPENSSL_free(data->saved_message.data); + OPENSSL_free(data); + } return(1); } @@ -1099,6 +1104,7 @@ static int dgram_sctp_read(BIO *b, char dgram_sctp_write(data->saved_message.bio, data->saved_message.data, data->saved_message.length); OPENSSL_free(data->saved_message.data); + data->saved_message.data = NULL; data->saved_message.length = 0; } @@ -1258,9 +1264,11 @@ static int dgram_sctp_write(BIO *b, cons if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b)) { data->saved_message.bio = b; - data->saved_message.length = inl; + if (data->saved_message.data) + OPENSSL_free(data->saved_message.data); data->saved_message.data = OPENSSL_malloc(inl); memcpy(data->saved_message.data, in, inl); + data->saved_message.length = inl; return inl; } Modified: releng/10.0/crypto/openssl/crypto/bn/asm/mips.pl ============================================================================== --- releng/10.0/crypto/openssl/crypto/bn/asm/mips.pl Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/bn/asm/mips.pl Wed Jan 14 21:27:46 2015 (r277195) @@ -1874,6 +1874,41 @@ ___ ($a_4,$a_5,$a_6,$a_7)=($b_0,$b_1,$b_2,$b_3); +sub add_c2 () { +my ($hi,$lo,$c0,$c1,$c2, + $warm, # !$warm denotes first call with specific sequence of + # $c_[XYZ] when there is no Z-carry to accumulate yet; + $an,$bn # these two are arguments for multiplication which + # result is used in *next* step [which is why it's + # commented as "forward multiplication" below]; + )=@_; +$code.=<<___; + mflo $lo + mfhi $hi + $ADDU $c0,$lo + sltu $at,$c0,$lo + $MULTU $an,$bn # forward multiplication + $ADDU $c0,$lo + $ADDU $at,$hi + sltu $lo,$c0,$lo + $ADDU $c1,$at + $ADDU $hi,$lo +___ +$code.=<<___ if (!$warm); + sltu $c2,$c1,$at + $ADDU $c1,$hi + sltu $hi,$c1,$hi + $ADDU $c2,$hi +___ +$code.=<<___ if ($warm); + sltu $at,$c1,$at + $ADDU $c1,$hi + $ADDU $c2,$at + sltu $hi,$c1,$hi + $ADDU $c2,$hi +___ +} + $code.=<<___; .align 5 @@ -1922,21 +1957,10 @@ $code.=<<___; sltu $at,$c_2,$t_1 $ADDU $c_3,$t_2,$at $ST $c_2,$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_2,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_1,$a_1 # mul_add_c(a[1],b[1],c3,c1,c2); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at +___ + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,0, + $a_1,$a_1); # mul_add_c(a[1],b[1],c3,c1,c2); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_3,$t_1 @@ -1947,67 +1971,19 @@ $code.=<<___; sltu $at,$c_1,$t_2 $ADDU $c_2,$at $ST $c_3,2*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_3,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_1,$a_2 # mul_add_c2(a[1],b[2],c1,c2,c3); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_3,$at - $MULTU $a_4,$a_0 # mul_add_c2(a[4],b[0],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at +___ + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,0, + $a_1,$a_2); # mul_add_c2(a[1],b[2],c1,c2,c3); + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,1, + $a_4,$a_0); # mul_add_c2(a[4],b[0],c2,c3,c1); +$code.=<<___; $ST $c_1,3*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_1,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_3,$a_1 # mul_add_c2(a[3],b[1],c2,c3,c1); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_1,$at - $MULTU $a_2,$a_2 # mul_add_c(a[2],b[2],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at +___ + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,0, + $a_3,$a_1); # mul_add_c2(a[3],b[1],c2,c3,c1); + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,1, + $a_2,$a_2); # mul_add_c(a[2],b[2],c2,c3,c1); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_2,$t_1 @@ -2018,97 +1994,23 @@ $code.=<<___; sltu $at,$c_3,$t_2 $ADDU $c_1,$at $ST $c_2,4*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_2,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_1,$a_4 # mul_add_c2(a[1],b[4],c3,c1,c2); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_2,$at - $MULTU $a_2,$a_3 # mul_add_c2(a[2],b[3],c3,c1,c2); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $MULTU $a_6,$a_0 # mul_add_c2(a[6],b[0],c1,c2,c3); - $ADDU $c_2,$at - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at +___ + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,0, + $a_1,$a_4); # mul_add_c2(a[1],b[4],c3,c1,c2); + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,1, + $a_2,$a_3); # mul_add_c2(a[2],b[3],c3,c1,c2); + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,1, + $a_6,$a_0); # mul_add_c2(a[6],b[0],c1,c2,c3); +$code.=<<___; $ST $c_3,5*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_3,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_5,$a_1 # mul_add_c2(a[5],b[1],c1,c2,c3); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_3,$at - $MULTU $a_4,$a_2 # mul_add_c2(a[4],b[2],c1,c2,c3); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_3,$at - $MULTU $a_3,$a_3 # mul_add_c(a[3],b[3],c1,c2,c3); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at +___ + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,0, + $a_5,$a_1); # mul_add_c2(a[5],b[1],c1,c2,c3); + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,1, + $a_4,$a_2); # mul_add_c2(a[4],b[2],c1,c2,c3); + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,1, + $a_3,$a_3); # mul_add_c(a[3],b[3],c1,c2,c3); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_1,$t_1 @@ -2119,112 +2021,25 @@ $code.=<<___; sltu $at,$c_2,$t_2 $ADDU $c_3,$at $ST $c_1,6*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_1,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_1,$a_6 # mul_add_c2(a[1],b[6],c2,c3,c1); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_1,$at - $MULTU $a_2,$a_5 # mul_add_c2(a[2],b[5],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_1,$at - $MULTU $a_3,$a_4 # mul_add_c2(a[3],b[4],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_1,$at - $MULTU $a_7,$a_1 # mul_add_c2(a[7],b[1],c3,c1,c2); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at +___ + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,0, + $a_1,$a_6); # mul_add_c2(a[1],b[6],c2,c3,c1); + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,1, + $a_2,$a_5); # mul_add_c2(a[2],b[5],c2,c3,c1); + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,1, + $a_3,$a_4); # mul_add_c2(a[3],b[4],c2,c3,c1); + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,1, + $a_7,$a_1); # mul_add_c2(a[7],b[1],c3,c1,c2); +$code.=<<___; $ST $c_2,7*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_2,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_6,$a_2 # mul_add_c2(a[6],b[2],c3,c1,c2); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_2,$at - $MULTU $a_5,$a_3 # mul_add_c2(a[5],b[3],c3,c1,c2); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_2,$at - $MULTU $a_4,$a_4 # mul_add_c(a[4],b[4],c3,c1,c2); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at +___ + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,0, + $a_6,$a_2); # mul_add_c2(a[6],b[2],c3,c1,c2); + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,1, + $a_5,$a_3); # mul_add_c2(a[5],b[3],c3,c1,c2); + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,1, + $a_4,$a_4); # mul_add_c(a[4],b[4],c3,c1,c2); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_3,$t_1 @@ -2235,82 +2050,21 @@ $code.=<<___; sltu $at,$c_1,$t_2 $ADDU $c_2,$at $ST $c_3,8*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_3,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_3,$a_6 # mul_add_c2(a[3],b[6],c1,c2,c3); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_3,$at - $MULTU $a_4,$a_5 # mul_add_c2(a[4],b[5],c1,c2,c3); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_3,$at - $MULTU $a_7,$a_3 # mul_add_c2(a[7],b[3],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at +___ + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,0, + $a_3,$a_6); # mul_add_c2(a[3],b[6],c1,c2,c3); + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,1, + $a_4,$a_5); # mul_add_c2(a[4],b[5],c1,c2,c3); + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,1, + $a_7,$a_3); # mul_add_c2(a[7],b[3],c2,c3,c1); +$code.=<<___; $ST $c_1,9*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_1,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_6,$a_4 # mul_add_c2(a[6],b[4],c2,c3,c1); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_1,$at - $MULTU $a_5,$a_5 # mul_add_c(a[5],b[5],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at +___ + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,0, + $a_6,$a_4); # mul_add_c2(a[6],b[4],c2,c3,c1); + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,1, + $a_5,$a_5); # mul_add_c(a[5],b[5],c2,c3,c1); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_2,$t_1 @@ -2321,52 +2075,17 @@ $code.=<<___; sltu $at,$c_3,$t_2 $ADDU $c_1,$at $ST $c_2,10*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_2,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_5,$a_6 # mul_add_c2(a[5],b[6],c3,c1,c2); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_2,$at - $MULTU $a_7,$a_5 # mul_add_c2(a[7],b[5],c1,c2,c3); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at +___ + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,0, + $a_5,$a_6); # mul_add_c2(a[5],b[6],c3,c1,c2); + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,1, + $a_7,$a_5); # mul_add_c2(a[7],b[5],c1,c2,c3); +$code.=<<___; $ST $c_3,11*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_3,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_6,$a_6 # mul_add_c(a[6],b[6],c1,c2,c3); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at +___ + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,0, + $a_6,$a_6); # mul_add_c(a[6],b[6],c1,c2,c3); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_1,$t_1 @@ -2377,21 +2096,10 @@ $code.=<<___; sltu $at,$c_2,$t_2 $ADDU $c_3,$at $ST $c_1,12*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_1,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_7,$a_7 # mul_add_c(a[7],b[7],c3,c1,c2); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at +___ + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,0, + $a_7,$a_7); # mul_add_c(a[7],b[7],c3,c1,c2); +$code.=<<___; $ST $c_2,13*$BNSZ($a0) mflo $t_1 @@ -2459,21 +2167,10 @@ $code.=<<___; sltu $at,$c_2,$t_1 $ADDU $c_3,$t_2,$at $ST $c_2,$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_2,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_1,$a_1 # mul_add_c(a[1],b[1],c3,c1,c2); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at +___ + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,0, + $a_1,$a_1); # mul_add_c(a[1],b[1],c3,c1,c2); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_3,$t_1 @@ -2484,52 +2181,17 @@ $code.=<<___; sltu $at,$c_1,$t_2 $ADDU $c_2,$at $ST $c_3,2*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_3,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_1,$a_2 # mul_add_c(a2[1],b[2],c1,c2,c3); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at - mflo $t_1 - mfhi $t_2 - slt $at,$t_2,$zero - $ADDU $c_3,$at - $MULTU $a_3,$a_1 # mul_add_c2(a[3],b[1],c2,c3,c1); - $SLL $t_2,1 - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_1,$t_1 - sltu $at,$c_1,$t_1 - $ADDU $t_2,$at - $ADDU $c_2,$t_2 - sltu $at,$c_2,$t_2 - $ADDU $c_3,$at +___ + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,0, + $a_1,$a_2); # mul_add_c2(a2[1],b[2],c1,c2,c3); + &add_c2($t_2,$t_1,$c_1,$c_2,$c_3,1, + $a_3,$a_1); # mul_add_c2(a[3],b[1],c2,c3,c1); +$code.=<<___; $ST $c_1,3*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_1,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_2,$a_2 # mul_add_c(a[2],b[2],c2,c3,c1); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_2,$t_1 - sltu $at,$c_2,$t_1 - $ADDU $t_2,$at - $ADDU $c_3,$t_2 - sltu $at,$c_3,$t_2 - $ADDU $c_1,$at +___ + &add_c2($t_2,$t_1,$c_2,$c_3,$c_1,0, + $a_2,$a_2); # mul_add_c(a[2],b[2],c2,c3,c1); +$code.=<<___; mflo $t_1 mfhi $t_2 $ADDU $c_2,$t_1 @@ -2540,21 +2202,10 @@ $code.=<<___; sltu $at,$c_3,$t_2 $ADDU $c_1,$at $ST $c_2,4*$BNSZ($a0) - - mflo $t_1 - mfhi $t_2 - slt $c_2,$t_2,$zero - $SLL $t_2,1 - $MULTU $a_3,$a_3 # mul_add_c(a[3],b[3],c1,c2,c3); - slt $a2,$t_1,$zero - $ADDU $t_2,$a2 - $SLL $t_1,1 - $ADDU $c_3,$t_1 - sltu $at,$c_3,$t_1 - $ADDU $t_2,$at - $ADDU $c_1,$t_2 - sltu $at,$c_1,$t_2 - $ADDU $c_2,$at +___ + &add_c2($t_2,$t_1,$c_3,$c_1,$c_2,0, + $a_3,$a_3); # mul_add_c(a[3],b[3],c1,c2,c3); +$code.=<<___; $ST $c_3,5*$BNSZ($a0) mflo $t_1 Modified: releng/10.0/crypto/openssl/crypto/bn/asm/x86_64-gcc.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Wed Jan 14 21:23:46 2015 (r277194) +++ releng/10.0/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Wed Jan 14 21:27:46 2015 (r277195) @@ -273,6 +273,10 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_UL /* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */ /* sqr_add_c2(a,i,c0,c1,c2) -- c+=2*a[i]*a[j] for three word number c=(c2,c1,c0) */ +/* + * Keep in mind that carrying into high part of multiplication result + * can not overflow, because it cannot be all-ones. + */ #if 0 /* original macros are kept for reference purposes */ #define mul_add_c(a,b,c0,c1,c2) { \ @@ -287,10 +291,10 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_UL BN_ULONG ta=(a),tb=(b),t0; \ t1 = BN_UMULT_HIGH(ta,tb); \ t0 = ta * tb; \ - t2 = t1+t1; c2 += (t2neg=rand_neg(); + BN_sqr(c,a,ctx); if (bp != NULL) { if (!results) { - BN_print(bp,&a); + BN_print(bp,a); BIO_puts(bp," * "); - BN_print(bp,&a); + BN_print(bp,a); BIO_puts(bp," - "); } - BN_print(bp,&c); + BN_print(bp,c); BIO_puts(bp,"\n"); } - BN_div(&d,&e,&c,&a,ctx); - BN_sub(&d,&d,&a); - if(!BN_is_zero(&d) || !BN_is_zero(&e)) - { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 22:07:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D02DF22; Wed, 14 Jan 2015 22:07:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5812B5FD; Wed, 14 Jan 2015 22:07:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EM7EEG041545; Wed, 14 Jan 2015 22:07:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EM7Dfn041543; Wed, 14 Jan 2015 22:07:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501142207.t0EM7Dfn041543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 22:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277199 - in head/sys: fs/devfs kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 22:07:14 -0000 Author: hselasky Date: Wed Jan 14 22:07:13 2015 New Revision: 277199 URL: https://svnweb.freebsd.org/changeset/base/277199 Log: Avoid race with "dev_rel()" when using the recently added "delist_dev()" function. Make sure the character device structure doesn't go away until the end of the "destroy_dev()" function due to concurrently running cleanup code inside "devfs_populate()". MFC after: 1 week Reported by: dchagin@ Modified: head/sys/fs/devfs/devfs_devs.c head/sys/kern/kern_conf.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) @@ -137,6 +137,12 @@ devfs_alloc(int flags) vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; cdev->si_cred = NULL; + /* + * Avoid race with dev_rel() by setting the initial + * reference count to 1. This last reference is taken + * by the destroy_dev() function. + */ + cdev->si_refcount = 1; return (cdev); } Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Wed Jan 14 22:05:57 2015 (r277198) +++ head/sys/kern/kern_conf.c Wed Jan 14 22:07:13 2015 (r277199) @@ -1048,8 +1048,6 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev->si_flags &= ~SI_NAMED; - dev->si_refcount++; /* Avoid race with dev_rel() */ - /* If we are a child, remove us from the parents list */ if (dev->si_flags & SI_CHILD) { LIST_REMOVE(dev, si_siblings); From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 22:37:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FE2079E; Wed, 14 Jan 2015 22:37:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AEFD9BD; Wed, 14 Jan 2015 22:37:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EMbCkd056184; Wed, 14 Jan 2015 22:37:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EMbCuX056183; Wed, 14 Jan 2015 22:37:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501142237.t0EMbCuX056183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 14 Jan 2015 22:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277201 - head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 22:37:12 -0000 Author: dim Date: Wed Jan 14 22:37:11 2015 New Revision: 277201 URL: https://svnweb.freebsd.org/changeset/base/277201 Log: Remove the include from one of the newly added sanitizer sources. It is apparently unnecessary, and causes trouble for people using WITHOUT_IPFILTER. Reported by: Pawel Biernacki , Kurt Lidl Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Jan 14 22:16:07 2015 (r277200) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Jan 14 22:37:11 2015 (r277201) @@ -97,7 +97,6 @@ # include # include # include -# include # include # include # include From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 23:34:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C3985A1; Wed, 14 Jan 2015 23:34:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1D27109; Wed, 14 Jan 2015 23:34:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ENY0GU084055; Wed, 14 Jan 2015 23:34:00 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ENY0mQ084054; Wed, 14 Jan 2015 23:34:00 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201501142334.t0ENY0mQ084054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 14 Jan 2015 23:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277202 - head/contrib/ntp/ntpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 23:34:01 -0000 Author: hiren Date: Wed Jan 14 23:34:00 2015 New Revision: 277202 URL: https://svnweb.freebsd.org/changeset/base/277202 Log: ntpd tries to bind to IPv6 interfaces in 'tentative' state and fails as IPv6 is actually disabled. Fix it by making ntpd ignore such interfaces. Submitted by: ume Reviewed by: bz, gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D1527 Modified: head/contrib/ntp/ntpd/ntp_io.c Modified: head/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_io.c Wed Jan 14 22:37:11 2015 (r277201) +++ head/contrib/ntp/ntpd/ntp_io.c Wed Jan 14 23:34:00 2015 (r277202) @@ -1176,12 +1176,13 @@ set_wildcard_reuse(int family, int on) #ifdef INCLUDE_IPV6_SUPPORT static isc_boolean_t -is_anycast(struct sockaddr *sa, char *name) +is_not_bindable(struct sockaddr *sa, char *name) { -#if defined(SIOCGIFAFLAG_IN6) && defined(IN6_IFF_ANYCAST) +#if defined(SIOCGIFAFLAG_IN6) && \ + (defined(IN6_IFF_ANYCAST) || defined(IN6_IFF_NOTREADY)) struct in6_ifreq ifr6; int fd; - u_int32_t flags6; + u_int32_t flags6, exclude = 0; if (sa->sa_family != AF_INET6) return ISC_FALSE; @@ -1197,9 +1198,15 @@ is_anycast(struct sockaddr *sa, char *na } close(fd); flags6 = ifr6.ifr_ifru.ifru_flags6; - if ((flags6 & IN6_IFF_ANYCAST) != 0) +#if defined(IN6_IFF_ANYCAST) + exclude |= IN6_IFF_ANYCAST; +#endif /* !IN6_IFF_ANYCAST */ +#if defined(IN6_IFF_NOTREADY) + exclude |= IN6_IFF_NOTREADY; +#endif /* !IN6_IFF_NOTREADY */ + if ((flags6 & exclude) != 0) return ISC_TRUE; -#endif /* !SIOCGIFAFLAG_IN6 || !IN6_IFF_ANYCAST */ +#endif /* !SIOCGIFAFLAG_IN6 || !(IN6_IFF_ANYCAST && IN6_IFF_NOTREADY) */ return ISC_FALSE; } #endif /* !INCLUDE_IPV6_SUPPORT */ @@ -1344,7 +1351,7 @@ update_interfaces( continue; #ifdef INCLUDE_IPV6_SUPPORT - if (is_anycast((struct sockaddr *)&interface.sin, isc_if.name)) + if (is_not_bindable((struct sockaddr *)&interface.sin, isc_if.name)) continue; #endif /* !INCLUDE_IPV6_SUPPORT */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 14 23:44:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57A3E90C; Wed, 14 Jan 2015 23:44:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3787027C; Wed, 14 Jan 2015 23:44:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ENi1iu088753; Wed, 14 Jan 2015 23:44:01 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ENi0tI088747; Wed, 14 Jan 2015 23:44:00 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501142344.t0ENi0tI088747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Wed, 14 Jan 2015 23:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277203 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 23:44:01 -0000 Author: rwatson Date: Wed Jan 14 23:44:00 2015 New Revision: 277203 URL: https://svnweb.freebsd.org/changeset/base/277203 Log: In order to support ongoing work to implement variable-size mbufs, and more generally make it easier to extend 'struct mbuf in the future', make a number of changes to the data structure: - As we anticipate embedding mbufs headers within variable-size regions of memory in the future, change the definitions of byte arrays embedded in mbufs to be of size [0] rather than [MLEN] and [MHLEN]. In fact, the cxgbe driver already uses 'struct mbuf' on the front of other storage sizes, but we would like the global mbuf allocator do be able to do this as well. - Fold 'struct m_hdr' into 'struct mbuf' itself, eliminating a set of macros that aliased 'mh_foo' field names to 'm_foo' names such as 'm_next'. These present a particular problem as we would like to add new mbuf-header fields -- e.g., 'm_size' -- that, if similarly named via macros, would introduce collisions with many other variable names in the kernel. - Rename 'struct m_ext' to 'struct struct_m_ext' so that we can add compile-time assertions without bumping into the still-extant 'm_ext' macro. - Remove the MSIZE compile-time assertion for 'struct mbuf', but add new assertions for alignment of embedded data arrays (64-bit alignment even on 32-bit platforms), and for the sizes the mbuf header, packet header, and m_ext structure. - Document that these assertions exist in comments in mbuf.h. This change is not intended to cause (non-trivial) behavioural differences, but is a precursor to further mbuf-allocator work. Differential Revision: https://reviews.freebsd.org/D1483 Reviewed by: bz, gnn, np, glebius ("go ahead, I trust you") Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Wed Jan 14 23:34:00 2015 (r277202) +++ head/sys/kern/uipc_mbuf.c Wed Jan 14 23:44:00 2015 (r277203) @@ -88,11 +88,38 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defrag * Ensure the correct size of various mbuf parameters. It could be off due * to compiler-induced padding and alignment artifacts. */ -CTASSERT(sizeof(struct mbuf) == MSIZE); CTASSERT(MSIZE - offsetof(struct mbuf, m_dat) == MLEN); CTASSERT(MSIZE - offsetof(struct mbuf, m_pktdat) == MHLEN); /* + * mbuf data storage should be 64-bit aligned regardless of architectural + * pointer size; check this is the case with and without a packet header. + */ +CTASSERT(offsetof(struct mbuf, m_dat) % 8 == 0); +CTASSERT(offsetof(struct mbuf, m_pktdat) % 8 == 0); + +/* + * While the specific values here don't matter too much (i.e., +/- a few + * words), we do want to ensure that changes to these values are carefully + * reasoned about and properly documented. This is especially the case as + * network-protocol and device-driver modules encode these layouts, and must + * be recompiled if the structures change. Check these values at compile time + * against the ones documented in comments in mbuf.h. + * + * NB: Possibly they should be documented there via #define's and not just + * comments. + */ +#if defined(__LP64__) +CTASSERT(offsetof(struct mbuf, m_dat) == 32); +CTASSERT(sizeof(struct pkthdr) == 56); +CTASSERT(sizeof(struct struct_m_ext) == 48); +#else +CTASSERT(offsetof(struct mbuf, m_dat) == 24); +CTASSERT(sizeof(struct pkthdr) == 48); +CTASSERT(sizeof(struct struct_m_ext) == 28); +#endif + +/* * m_get2() allocates minimum mbuf that would fit "size" argument. */ struct mbuf * Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Jan 14 23:34:00 2015 (r277202) +++ head/sys/sys/mbuf.h Wed Jan 14 23:44:00 2015 (r277203) @@ -60,9 +60,15 @@ * MLEN is data length in a normal mbuf. * MHLEN is data length in an mbuf with pktheader. * MINCLSIZE is a smallest amount of data that should be put into cluster. + * + * Compile-time assertions in uipc_mbuf.c test these values to ensure that + * they are sensible. */ -#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) -#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) +struct mbuf; +#define MHSIZE offsetof(struct mbuf, M_dat.M_databuf) +#define MPKTHSIZE offsetof(struct mbuf, M_dat.MH.MH_dat.MH_databuf) +#define MLEN ((int)(MSIZE - MHSIZE)) +#define MHLEN ((int)(MSIZE - MPKTHSIZE)) #define MINCLSIZE (MHLEN + 1) #ifdef _KERNEL @@ -87,23 +93,6 @@ struct mb_args { #endif /* _KERNEL */ /* - * Header present at the beginning of every mbuf. - * Size ILP32: 24 - * LP64: 32 - */ -struct m_hdr { - struct mbuf *mh_next; /* next buffer in chain */ - struct mbuf *mh_nextpkt; /* next chain in queue/record */ - caddr_t mh_data; /* location of data */ - int32_t mh_len; /* amount of data in this mbuf */ - uint32_t mh_type:8, /* type of data in this mbuf */ - mh_flags:24; /* flags; see below */ -#if !defined(__LP64__) - uint32_t mh_pad; /* pad for 64bit alignment */ -#endif -}; - -/* * Packet tag structure (see below for details). */ struct m_tag { @@ -118,6 +107,8 @@ struct m_tag { * Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set. * Size ILP32: 48 * LP64: 56 + * Compile-time assertions in uipc_mbuf.c test these values to ensure that + * they are correct. */ struct pkthdr { struct ifnet *rcvif; /* rcv interface */ @@ -166,8 +157,10 @@ struct pkthdr { * set. * Size ILP32: 28 * LP64: 48 + * Compile-time assertions in uipc_mbuf.c test these values to ensure that + * they are correct. */ -struct m_ext { +struct struct_m_ext { volatile u_int *ext_cnt; /* pointer to ref count info */ caddr_t ext_buf; /* start of buffer */ uint32_t ext_size; /* size of buffer, for ext_free */ @@ -184,24 +177,41 @@ struct m_ext { * purposes. */ struct mbuf { - struct m_hdr m_hdr; + /* + * Header present at the beginning of every mbuf. + * Size ILP32: 24 + * LP64: 32 + * Compile-time assertions in uipc_mbuf.c test these values to ensure + * that they are correct. + */ + struct mbuf *m_next; /* next buffer in chain */ + struct mbuf *m_nextpkt; /* next chain in queue/record */ + caddr_t m_data; /* location of data */ + int32_t m_len; /* amount of data in this mbuf */ + uint32_t m_type:8, /* type of data in this mbuf */ + m_flags:24; /* flags; see below */ +#if !defined(__LP64__) + uint32_t m_pad; /* pad for 64bit alignment */ +#endif + + /* + * A set of optional headers (packet header, external storage header) + * and internal data storage. Historically, these arrays were sized + * to MHLEN (space left after a packet header) and MLEN (space left + * after only a regular mbuf header); they are now variable size in + * order to support future work on variable-size mbufs. + */ union { struct { struct pkthdr MH_pkthdr; /* M_PKTHDR set */ union { - struct m_ext MH_ext; /* M_EXT set */ - char MH_databuf[MHLEN]; + struct struct_m_ext MH_ext; /* M_EXT set */ + char MH_databuf[0]; } MH_dat; } MH; - char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */ + char M_databuf[0]; /* !M_PKTHDR, !M_EXT */ } M_dat; }; -#define m_next m_hdr.mh_next -#define m_len m_hdr.mh_len -#define m_data m_hdr.mh_data -#define m_type m_hdr.mh_type -#define m_flags m_hdr.mh_flags -#define m_nextpkt m_hdr.mh_nextpkt #define m_pkthdr M_dat.MH.MH_pkthdr #define m_ext M_dat.MH.MH_dat.MH_ext #define m_pktdat M_dat.MH.MH_dat.MH_databuf From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 00:07:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1506B106 for ; Thu, 15 Jan 2015 00:07:23 +0000 (UTC) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D56C56CD for ; Thu, 15 Jan 2015 00:07:22 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id y13so12756930pdi.3 for ; Wed, 14 Jan 2015 16:07:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=HxkmVOpJD1mYEqGBr5EqK0kYxbHJLbV0UzN464+xalg=; b=Yrnx35UtmaCzNS10hqo272pnz0FEHpAQ1ZMruWBTlsHZKTumJclXEFFO+tfkOhGcFd hO/fAIcKcoC2Aw8H9Ts7R1iVJYDtDopL7Z7Md9q4/3MtE+Ibsga4UzLfj3/VKqEVQyRZ RdXzYvvX8BW95dwCkZmUszM4vPrS5OseVCQrlUs/im3NWjO1op30QbSmZFEV5QkARUQn 64af6GjTbCRtX9RFXPPHs9MLJmfU68zX+DPHI4deNEV35Kj1mK2uGulY75gTHB3cS9tP QDzb9fMbVHr9PH0m263tm5gnCDo1ZBNVMsd27pHRN7eHhsJyeDS2rrcC42mwRB5Hkj2R z7qw== X-Gm-Message-State: ALoCoQkuF0qWishSVVlPoFAKuG6uOng9OvDOBBhiUw1xE/xWmC1gdLT8pp/LLDkDZzTkxL7bwGbz X-Received: by 10.68.69.48 with SMTP id b16mr1753938pbu.59.1421280442118; Wed, 14 Jan 2015 16:07:22 -0800 (PST) Received: from [10.64.25.14] ([69.53.236.236]) by mx.google.com with ESMTPSA id 9sm20780453pdg.38.2015.01.14.16.07.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 16:07:21 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277163 - head/sys/dev/cardbus Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150114073246.74c159df@zhabar.attlocal.net> Date: Wed, 14 Jan 2015 17:07:18 -0700 Message-Id: <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> To: Justin Hibbits X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:07:23 -0000 --Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 14, 2015, at 8:32 AM, Justin Hibbits = wrote: >=20 > On Wed, 14 Jan 2015 09:23:05 -0500 > John Baldwin wrote: >=20 >> On 1/14/15 12:41 AM, Warner Losh wrote: >>> Author: imp >>> Date: Wed Jan 14 05:41:31 2015 >>> New Revision: 277163 >>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>=20 >>> Log: >>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>> since it's a total crap shoot if things will work. >>=20 >> Should we just make it a #error instead? (Some day I hope to have >> NEW_PCIB enabled by default and remove the old code. Will take a >> while to get there for the generic PCI code, but cardbus is probably >> only used on x86 so that would be fine.) >>=20 >=20 > Also powerpc, but NEW_PCIB is default there as well. PowerPC doesn=E2=80=99t seem to defined the bus number resources. Warner --Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUtwS2AAoJEGwc0Sh9sBEAL3QP/1dUTHaQ5riPwDZyjiUQe8UX sG7T/Qm/2Snm1pTKCerBR8FGcwB6Rwu9bMTJiKTw4pqUMRwoa0jqkvk8Mfy1h2cS CydVOgtEldkr4adcL4Lo5ZJjtdVh2B6lGSaRN0AJlP5h5vzThkLfbWTD3XLAA57C br0OL3H36dVRAMkak7hjOgzI3bk5Ym9U1z7807eCw+Nd4a3uUznABQ9eDeZdlYEa EqERmB9sEOAu2u1O65lqJn53c5N9qciZRhKQwTVKS5Q9LRxc2b7HdEd8YfIT4LoP WJ/5JRy5y3MsuV28KyK0i8/2a9o6a9NNSmeAgtMWO0Z2TeEe6dI4QYNZ00AuUYHa uyg/0xcHqybQF3GN992qoA2pH0B7J+b4aSyu3h/PPIikfNKzQYFWF9LE7nqHcQPF hi+9hvZtSTUPXoEStRK6HI+5Es0WupKI5LH4VnNfB1SRmg021N75P1F0pIbxXEzi /7RXkQGoo1pPJyGyi8h8zUB9l6vPA675+jl+Y6iORbEk1M/6MGqbzv6BxLnltJPK i8hAvHsMvIDePb1ILxx7POnjhh0K3lGb0pwinhXKzjSTnAXIy+Id2ox43r18tgV/ 5TqbA0nwsexe9TM//NzefrEO5ld8VWvzJbSmDgTHGSl9ECdaPMrG/8om0RPo/eId MbDsS5VkJBdnhPvM1RYn =wku1 -----END PGP SIGNATURE----- --Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 00:07:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A31C5154 for ; Thu, 15 Jan 2015 00:07:58 +0000 (UTC) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70C216D4 for ; Thu, 15 Jan 2015 00:07:58 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id et14so13775339pad.1 for ; Wed, 14 Jan 2015 16:07:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=Cyjwjdw3e0HXxw+NdRPxCfbzU27ZP32uKxXLkUfM0XM=; b=Rosbeg/c/vXN+Wm4kei4MzCcQz62Q0J2XQuPbPSKV0/MJSC0fm0fV6vRW4QLTYpBh1 k/DoulssBFlBUZwH+X/jeyMO4yP1mKao+5jqSxaRovAiTmqEd83ICbe4aS6KbNiSbxkD sBcG1WOPeMXM9ZMDN2tUeY9rvjvf3raJ06Xdq28o769ThP2S4uBcqMMMLazgZAtLtlbW oopuncWy3uoqT002LfaM8Grc9jSsm5CCN1oKXvSY1uPPKeEN1XGdwLBzOcN7pSZ9ZXxo Mo/pG2mysBilm+jChf8upXGdGSEvhpjPGfU3hN5bULVNLo8+1IBd4EEEah0ypTC8gQlm Vy1Q== X-Gm-Message-State: ALoCoQmpnreBt5hy8pSYya1PB7cxG01d+L7wBnpPPnUXsbiPAj9TjmVV/mJVUMOzYb90Oo1wTuny X-Received: by 10.68.131.3 with SMTP id oi3mr9628665pbb.27.1421280477685; Wed, 14 Jan 2015 16:07:57 -0800 (PST) Received: from [10.64.25.14] ([69.53.236.236]) by mx.google.com with ESMTPSA id 9sm20780453pdg.38.2015.01.14.16.07.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 16:07:57 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277163 - head/sys/dev/cardbus Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <54B67BC9.70904@FreeBSD.org> Date: Wed, 14 Jan 2015 17:07:55 -0700 Message-Id: References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:07:58 -0000 --Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 14, 2015, at 7:23 AM, John Baldwin wrote: > > On 1/14/15 12:41 AM, Warner Losh wrote: >> Author: imp >> Date: Wed Jan 14 05:41:31 2015 >> New Revision: 277163 >> URL: https://svnweb.freebsd.org/changeset/base/277163 >> >> Log: >> Add a rather obnoxious warning if you don't have NEW_PCIB defined >> since it's a total crap shoot if things will work. > > Should we just make it a #error instead? (Some day I hope to have > NEW_PCIB enabled by default and remove the old code. Will take a while > to get there for the generic PCI code, but cardbus is probably only used > on x86 so that would be fine.) CardBus is also used on PowerPC macs.. Warner --Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUtwTcAAoJEGwc0Sh9sBEAUIMQAJUe+ZMuHBKdJKYUwQcwlnxx b9cTrLwsF7UsTd+CZ6nmRI0+IXeLJUPAmURqz/qrYBkLAUzQZ+xyOdhGFDBDfokq zx9+in87b/a3REKZ69Sv3VE73KCY2dnwzbXUy2eL2hfdUNrRZ5Q690eSmKZpLgqS vIEcLTcEn9UItDP6fbYbwsGUOA/q1YA/WoLNFzoIKn8wTCX6DijutmPJvcVq94FO 0CSQIJSranOBLp0minROqX+SGJJX20GqP+MRRQ1BhBdpQaghXwKV35iXuwHvOKoa sNWqnlBxr4u6BMH1mNsndxbDp+/+Dd13dHhLNeeguEVmg2owRHeUJEnkfowJNMux nuMiTXI0uZHjENCFAO/WNK70aPSX8YRvT0m7uLazWAvr30urIg7XDw7frPKqnAQx V31fLfuVfE6s/daUjPLYDKzCqJ3/ddG3Zhe0rcty3sH2D2z8nyJUHgIVjs0NB0oC cYqg1/cUATtGsw09OJlwgMC10k562H8Vfge4I5U/QHu5dxzz5JYqdLLxt89p40ec OGVdz6IcZspJj5wEbCRLMSLmNlo4Fw0p3NWGnq55U27Q0AHcnJ2eos7KnB7/x8Mg FUaQHrNxXKptsoYEGnz4oLDbyorhKc0uorCyPHI2P+/cGPhOI3Vh9POEN7hmHHIJ 6+i5sdMs2Ch6gVw+ydv8 =Fb/p -----END PGP SIGNATURE----- --Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 00:42:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BD1F7A8; Thu, 15 Jan 2015 00:42:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 674CCAC3; Thu, 15 Jan 2015 00:42:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F0g7Gi018060; Thu, 15 Jan 2015 00:42:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F0g7Um018059; Thu, 15 Jan 2015 00:42:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501150042.t0F0g7Um018059@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 15 Jan 2015 00:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277204 - head/sys/amd64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:42:07 -0000 Author: imp Date: Thu Jan 15 00:42:06 2015 New Revision: 277204 URL: https://svnweb.freebsd.org/changeset/base/277204 Log: New MINIMAL kernel config. The goal with this configuration is to only compile in those options in GENERIC that cannot be loaded as modules. ufs is still included because many of its options aren't present in the kernel module. There's some other exceptions documented in the file. This is part of some work to get more things automatically loading in the hopes of obsoleting GENERIC one day. Added: head/sys/amd64/conf/MINIMAL (contents, props changed) Added: head/sys/amd64/conf/MINIMAL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/MINIMAL Thu Jan 15 00:42:06 2015 (r277204) @@ -0,0 +1,145 @@ +# +# MINIMAL -- Mostly Minimal kernel configuration file for FreeBSD/amd64 +# +# Many definitions of minimal are possible. The one this file follows is +# GENERIC, minus all functionality that can be replaced by loading kernel +# modules. +# +# Exceptions: +# o While UFS is buildable as a module, the current module lacks +# some features (ACL, GJOURNAL) that GENERIC includes. +# o acpi as a module has been reported flakey and not well tested, so +# is included in the kernel. +# o random is included due to uncertaty... +# o Many networking things are included +# +# For now, please run changes to these list past imp@freebsd.org +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +cpu HAMMER +ident MINIMAL + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support + +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options TCP_OFFLOAD # TCP offload +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options MD_ROOT # MD is a potential root device +options COMPAT_FREEBSD32 # Compatible with i386 binaries +options COMPAT_FREEBSD4 # Compatible with FreeBSD4 +options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options COMPAT_FREEBSD9 # Compatible with FreeBSD9 +options COMPAT_FREEBSD10 # Compatible with FreeBSD10 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options STACK # stack(9) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities +options MAC # TrustedBSD MAC Framework +options KDTRACE_FRAME # Ensure frames are compiled in +options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data +options INCLUDE_CONFIG_FILE # Include this file in kernel + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +options DDB # Support DDB. +options GDB # Support remote GDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + +# CPU frequency control +device cpufreq + +# Bus support. +device acpi +options ACPI_DMAR +device pci + +# atkbdc0 controls both the keyboard and the PS/2 mouse +device atkbdc # AT keyboard controller +device atkbd # AT keyboard +device psm # PS/2 mouse + +device kbdmux # keyboard multiplexer + +device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) + +device splash # Splash screen and screen saver support + +# syscons is the default console driver, resembling an SCO console +device sc +options SC_PIXEL_MODE # add support for the raster text mode + +# vt is the new video console driver +device vt +device vt_vga +device vt_efifb + +device agp # support several AGP chipsets + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device padlock_rng # VIA Padlock RNG +device rdrand_rng # Intel Bull Mountain RNG +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device gif # IPv6 and IPv4 tunneling + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Xen HVM Guest Optimizations +# NOTE: XENHVM depends on xenpci. They must be added or removed together. +options XENHVM # Xen HVM kernel infrastructure +device xenpci # Xen HVM Hypervisor services driver From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 00:46:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46203928; Thu, 15 Jan 2015 00:46:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 170C4ADD; Thu, 15 Jan 2015 00:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F0kVQE018670; Thu, 15 Jan 2015 00:46:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F0kVIl018666; Thu, 15 Jan 2015 00:46:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501150046.t0F0kVIl018666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 15 Jan 2015 00:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277205 - in head: sys/boot/common sys/sys usr.sbin/kldxref X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:46:32 -0000 Author: imp Date: Thu Jan 15 00:46:30 2015 New Revision: 277205 URL: https://svnweb.freebsd.org/changeset/base/277205 Log: Reserve and ignore the a new module metadata type MDT_PNP_INFO for associating an optional PNP hint table with this module. In the future, when these are added, these changes will silently ignore the new type they would otherwise warn about. It will always be safe to ignore this data. Get this into the builds today for some future proofing. MFC After: 3 days Modified: head/sys/boot/common/load_elf_obj.c head/sys/sys/module.h head/usr.sbin/kldxref/kldxref.c Modified: head/sys/boot/common/load_elf_obj.c ============================================================================== --- head/sys/boot/common/load_elf_obj.c Thu Jan 15 00:42:06 2015 (r277204) +++ head/sys/boot/common/load_elf_obj.c Thu Jan 15 00:46:30 2015 (r277205) @@ -416,6 +416,7 @@ __elfN(obj_parse_modmetadata)(struct pre modcnt++; break; case MDT_MODULE: + case MDT_PNP_INFO: break; default: printf("unknown type %d\n", md.md_type); Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Thu Jan 15 00:42:06 2015 (r277204) +++ head/sys/sys/module.h Thu Jan 15 00:46:30 2015 (r277205) @@ -35,6 +35,7 @@ #define MDT_DEPEND 1 /* argument is a module name */ #define MDT_MODULE 2 /* module declaration */ #define MDT_VERSION 3 /* module version(s) */ +#define MDT_PNP_INFO 4 /* Plug and play hints record */ #define MDT_STRUCT_VERSION 1 /* version of metadata structure */ #define MDT_SETNAME "modmetadata_set" Modified: head/usr.sbin/kldxref/kldxref.c ============================================================================== --- head/usr.sbin/kldxref/kldxref.c Thu Jan 15 00:42:06 2015 (r277204) +++ head/usr.sbin/kldxref/kldxref.c Thu Jan 15 00:46:30 2015 (r277205) @@ -172,6 +172,10 @@ parse_entry(struct mod_metadata *md, con record_string(kldname); } break; + case MDT_PNP_INFO: + if (dflag) { + printf(" pnp info for bus %s\n", cval); + } default: warnx("unknown metadata record %d in file %s", md->md_type, kldname); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 00:48:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06CCBA8B; Thu, 15 Jan 2015 00:48:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC29CAF4; Thu, 15 Jan 2015 00:48:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F0msW6019073; Thu, 15 Jan 2015 00:48:54 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F0msTD019069; Thu, 15 Jan 2015 00:48:54 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501150048.t0F0msTD019069@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 15 Jan 2015 00:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277206 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:48:55 -0000 Author: loos Date: Thu Jan 15 00:48:53 2015 New Revision: 277206 URL: https://svnweb.freebsd.org/changeset/base/277206 Log: Catch a few cases where we need to release memory resources on errors. Place parentheses around variables in macros. MFC after: 3 days Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu Jan 15 00:46:30 2015 (r277205) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu Jan 15 00:48:53 2015 (r277206) @@ -252,6 +252,7 @@ bcm_bsc_attach(device_t dev) } if (i == nitems(bcm_bsc_pins)) { device_printf(dev, "only bsc0 and bsc1 are supported\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); return (ENXIO); } @@ -262,6 +263,7 @@ bcm_bsc_attach(device_t dev) gpio = devclass_get_device(devclass_find("gpio"), 0); if (!gpio) { device_printf(dev, "cannot find gpio0\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); return (ENXIO); } bcm_gpio_set_alternate(gpio, bcm_bsc_pins[i].sda, BCM_GPIO_ALT0); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Thu Jan 15 00:46:30 2015 (r277205) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Thu Jan 15 00:48:53 2015 (r277206) @@ -58,9 +58,9 @@ struct bcm_bsc_softc { #define BCM_I2C_ERROR 0x04 #define BCM_BSC_WRITE(_sc, _off, _val) \ - bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) + bus_space_write_4((_sc)->sc_bst, (_sc)->sc_bsh, _off, _val) #define BCM_BSC_READ(_sc, _off) \ - bus_space_read_4(_sc->sc_bst, _sc->sc_bsh, _off) + bus_space_read_4((_sc)->sc_bst, (_sc)->sc_bsh, _off) #define BCM_BSC_LOCK(_sc) \ mtx_lock(&(_sc)->sc_mtx) From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 01:05:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A47F1E54; Thu, 15 Jan 2015 01:05:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90039CAA; Thu, 15 Jan 2015 01:05:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F156xT028050; Thu, 15 Jan 2015 01:05:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F156Bb028049; Thu, 15 Jan 2015 01:05:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501150105.t0F156Bb028049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 15 Jan 2015 01:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277207 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 01:05:06 -0000 Author: loos Date: Thu Jan 15 01:05:05 2015 New Revision: 277207 URL: https://svnweb.freebsd.org/changeset/base/277207 Log: Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl. Previous code was discarding the last digit. Remove the unused temperature conversion macros. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Thu Jan 15 00:48:53 2015 (r277206) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Thu Jan 15 01:05:05 2015 (r277207) @@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$"); #define MHZ2HZ(freq) ((freq) * (1000 * 1000)) #define OFFSET2MVOLT(val) (1200 + ((val) * 25)) #define MVOLT2OFFSET(val) (((val) - 1200) / 25) -#define RAW2K(temp) (((temp) + 273150) / 1000) -#define K2RAW(temp) (((temp) * 1000) - 273150) #define DEFAULT_ARM_FREQUENCY 700 #define DEFAULT_CORE_FREQUENCY 250 @@ -77,6 +75,7 @@ __FBSDID("$FreeBSD$"); #define MSG_ERROR -999999999 #define MHZSTEP 100 #define HZSTEP (MHZ2HZ(MHZSTEP)) +#define TZ_ZEROC 2732 #define VC_LOCK(sc) do { \ sema_wait(&vc_sema); \ @@ -1215,7 +1214,7 @@ sysctl_bcm2835_devcpu_temperature(SYSCTL return (EIO); /* 1/1000 celsius (raw) to 1/10 kelvin */ - val = RAW2K(val) * 10; + val = val / 100 + TZ_ZEROC; err = sysctl_handle_int(oidp, &val, 0, req); if (err || !req->newptr) /* error || read request */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 01:20:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 865D5344; Thu, 15 Jan 2015 01:20:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72214DE6; Thu, 15 Jan 2015 01:20:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F1KvNJ036550; Thu, 15 Jan 2015 01:20:57 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F1KvRI036549; Thu, 15 Jan 2015 01:20:57 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501150120.t0F1KvRI036549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 15 Jan 2015 01:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277208 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 01:20:57 -0000 Author: loos Date: Thu Jan 15 01:20:56 2015 New Revision: 277208 URL: https://svnweb.freebsd.org/changeset/base/277208 Log: Fix the PMIC node name to match the PMIC i2c address. Remove an extra blank line. No functional changes. MFC after: 3 days Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/beaglebone-black.dts Thu Jan 15 01:05:05 2015 (r277207) +++ head/sys/boot/fdt/dts/arm/beaglebone-black.dts Thu Jan 15 01:20:56 2015 (r277208) @@ -144,10 +144,9 @@ status = "okay"; non-removable; }; - i2c@44e0b000 { - pmic@24 { + pmic@48 { compatible = "ti,am335x-pmic"; reg = <0x48>; }; From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 02:22:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23FF08E7; Thu, 15 Jan 2015 02:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6111651; Thu, 15 Jan 2015 02:22:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F2Mr77064690; Thu, 15 Jan 2015 02:22:53 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F2MrPQ064689; Thu, 15 Jan 2015 02:22:53 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501150222.t0F2MrPQ064689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 15 Jan 2015 02:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277209 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 02:22:54 -0000 Author: bz Date: Thu Jan 15 02:22:52 2015 New Revision: 277209 URL: https://svnweb.freebsd.org/changeset/base/277209 Log: Fix cpsw(4) after r277203 which folded 'struct m_hdr' into 'struct mbuf'. While in theory this should have been a transparent change (and was for all other drivers), cpsw(4) never used the proper accessor macros in a few places but spelt the indirect m_hdr.mh_* out itself. Convert those to use m_len and m_data and unbreak the driver build. Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 15 01:20:56 2015 (r277208) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 15 02:22:52 2015 (r277209) @@ -396,9 +396,9 @@ cpsw_dump_slot(struct cpsw_softc *sc, st printf("\n"); if (slot->mbuf) { printf(" Ether: %14D\n", - (char *)(slot->mbuf->m_hdr.mh_data), " "); + (char *)(slot->mbuf->m_data), " "); printf(" Packet: %16D\n", - (char *)(slot->mbuf->m_hdr.mh_data) + 14, " "); + (char *)(slot->mbuf->m_data) + 14, " "); } } @@ -611,7 +611,7 @@ cpsw_attach(device_t dev) /* Allocate the null mbuf and pre-sync it. */ sc->null_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - memset(sc->null_mbuf->m_hdr.mh_data, 0, sc->null_mbuf->m_ext.ext_size); + memset(sc->null_mbuf->m_data, 0, sc->null_mbuf->m_ext.ext_size); bus_dmamap_create(sc->mbuf_dtag, 0, &sc->null_mbuf_dmamap); bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, sc->null_mbuf_dmamap, sc->null_mbuf, segs, &nsegs, BUS_DMA_NOWAIT); @@ -1292,8 +1292,8 @@ cpsw_rx_dequeue(struct cpsw_softc *sc) /* Set up mbuf */ /* TODO: track SOP/EOP bits to assemble a full mbuf out of received fragments. */ - slot->mbuf->m_hdr.mh_data += bd.bufoff; - slot->mbuf->m_hdr.mh_len = bd.pktlen - 4; + slot->mbuf->m_data += bd.bufoff; + slot->mbuf->m_len = bd.pktlen - 4; slot->mbuf->m_pkthdr.len = bd.pktlen - 4; slot->mbuf->m_flags |= M_PKTHDR; slot->mbuf->m_pkthdr.rcvif = ifp; @@ -1461,7 +1461,7 @@ cpsw_tx_enqueue(struct cpsw_softc *sc) bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap); if (padlen > 0) /* May as well add padding. */ m_append(slot->mbuf, padlen, - sc->null_mbuf->m_hdr.mh_data); + sc->null_mbuf->m_data); m0 = m_defrag(slot->mbuf, M_NOWAIT); if (m0 == NULL) { if_printf(sc->ifp, From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 03:31:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08E13B8; Thu, 15 Jan 2015 03:31:16 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AB55D15; Thu, 15 Jan 2015 03:31:15 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0F3V99s023713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jan 2015 05:31:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0F3V99s023713 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0F3V9Zt023711; Thu, 15 Jan 2015 05:31:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jan 2015 05:31:09 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150115033109.GM42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501142207.t0EM7Dfn041543@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 03:31:16 -0000 On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jan 14 22:07:13 2015 > New Revision: 277199 > URL: https://svnweb.freebsd.org/changeset/base/277199 > > Log: > Avoid race with "dev_rel()" when using the recently added > "delist_dev()" function. Make sure the character device structure > doesn't go away until the end of the "destroy_dev()" function due to > concurrently running cleanup code inside "devfs_populate()". > > MFC after: 1 week > Reported by: dchagin@ > > Modified: > head/sys/fs/devfs/devfs_devs.c > head/sys/kern/kern_conf.c > > Modified: head/sys/fs/devfs/devfs_devs.c > ============================================================================== > --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) > +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) > @@ -137,6 +137,12 @@ devfs_alloc(int flags) > vfs_timestamp(&ts); > cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; > cdev->si_cred = NULL; > + /* > + * Avoid race with dev_rel() by setting the initial > + * reference count to 1. This last reference is taken > + * by the destroy_dev() function. > + */ > + cdev->si_refcount = 1; This is wrong. Not all devices are destroyed with destroy_dev(). dev_rel() must be allowed to clean up allocated device. That said, I do not understand what race you are trying to solve. Freeing of the accessible cdev memory cannot happen in parallel while dev_mtx is owned. Please do not commit (to devfs) without seeking for the review first. > > return (cdev); > } > > Modified: head/sys/kern/kern_conf.c > ============================================================================== > --- head/sys/kern/kern_conf.c Wed Jan 14 22:05:57 2015 (r277198) > +++ head/sys/kern/kern_conf.c Wed Jan 14 22:07:13 2015 (r277199) > @@ -1048,8 +1048,6 @@ destroy_devl(struct cdev *dev) > /* Remove name marking */ > dev->si_flags &= ~SI_NAMED; > > - dev->si_refcount++; /* Avoid race with dev_rel() */ > - > /* If we are a child, remove us from the parents list */ > if (dev->si_flags & SI_CHILD) { > LIST_REMOVE(dev, si_siblings); From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 07:40:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CBBAC3A; Thu, 15 Jan 2015 07:40:46 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1D997BE; Thu, 15 Jan 2015 07:40:45 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3ECCE1FE022; Thu, 15 Jan 2015 08:40:43 +0100 (CET) Message-ID: <54B76F2B.8040106@selasky.org> Date: Thu, 15 Jan 2015 08:41:31 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> In-Reply-To: <20150115033109.GM42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 07:40:46 -0000 On 01/15/15 04:31, Konstantin Belousov wrote: > On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Jan 14 22:07:13 2015 >> New Revision: 277199 >> URL: https://svnweb.freebsd.org/changeset/base/277199 >> >> Log: >> Avoid race with "dev_rel()" when using the recently added >> "delist_dev()" function. Make sure the character device structure >> doesn't go away until the end of the "destroy_dev()" function due to >> concurrently running cleanup code inside "devfs_populate()". >> >> MFC after: 1 week >> Reported by: dchagin@ >> >> Modified: >> head/sys/fs/devfs/devfs_devs.c >> head/sys/kern/kern_conf.c >> >> Modified: head/sys/fs/devfs/devfs_devs.c >> ============================================================================== >> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) >> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) >> @@ -137,6 +137,12 @@ devfs_alloc(int flags) >> vfs_timestamp(&ts); >> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; >> cdev->si_cred = NULL; >> + /* >> + * Avoid race with dev_rel() by setting the initial >> + * reference count to 1. This last reference is taken >> + * by the destroy_dev() function. >> + */ >> + cdev->si_refcount = 1; > This is wrong. Not all devices are destroyed with destroy_dev(). > dev_rel() must be allowed to clean up allocated device. > > That said, I do not understand what race you are trying to solve. > Freeing of the accessible cdev memory cannot happen in parallel while > dev_mtx is owned. > > Please do not commit (to devfs) without seeking for the review first. Hi Konstantin, From my analysis there are basically three ways for a cdev to die: 1) Through dev_free_devlocked() 2) Through destroy_devl() which then later calls dev_free_devlocked() 3) Through destroy_dev_sched() which really is a wrapper around destroy_devl(). In the case of direct free through #1, the reference count is ignored and it doesn't matter if it is one or zero. Only in the case of destruction through destroy_dev() it matters. Like the comment says in destroy_devl(): /* Avoid race with dev_rel() */ The problem is that the "cdev->si_refcount" is zero when the initial devfs_create() is called. Then one ref is made. When we clear the CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running process to destroy all the FS related structures and the reference count goes back to zero when the "cdp" is removed from the "cdevp_list". Then the cdev is freed too early. This happens because destroy_devl() is dropping the dev_lock() to sleep waiting for pending references. Do you see something else? --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 08:01:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 971C27C; Thu, 15 Jan 2015 08:01:08 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51A8A981; Thu, 15 Jan 2015 08:01:07 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6C26C1FE022; Thu, 15 Jan 2015 09:01:04 +0100 (CET) Message-ID: <54B773F0.6050807@selasky.org> Date: Thu, 15 Jan 2015 09:01:52 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> In-Reply-To: <20150115033109.GM42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 08:01:08 -0000 Hi, On 01/15/15 04:31, Konstantin Belousov wrote: > Please do not commit (to devfs) without seeking for the review first. I was a bit stuck this time either having the choice to back out a USB patch fixing no problems or to fix the kernel devfs to support what I needed. Actually "devfs" is not listed in src/MAINTAINERS. I understand a review can be good in such critical areas in advance as a general practice and I'm currently doing that for another kern/ patch which is much bigger than this one. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 09:38:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CC338F8; Thu, 15 Jan 2015 09:38:48 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A9361D; Thu, 15 Jan 2015 09:38:47 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0F9cfLx003329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jan 2015 11:38:41 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0F9cfLx003329 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0F9cfug003328; Thu, 15 Jan 2015 11:38:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jan 2015 11:38:41 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150115093841.GX42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B76F2B.8040106@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 09:38:48 -0000 On Thu, Jan 15, 2015 at 08:41:31AM +0100, Hans Petter Selasky wrote: > On 01/15/15 04:31, Konstantin Belousov wrote: > > On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: > >> Author: hselasky > >> Date: Wed Jan 14 22:07:13 2015 > >> New Revision: 277199 > >> URL: https://svnweb.freebsd.org/changeset/base/277199 > >> > >> Log: > >> Avoid race with "dev_rel()" when using the recently added > >> "delist_dev()" function. Make sure the character device structure > >> doesn't go away until the end of the "destroy_dev()" function due to > >> concurrently running cleanup code inside "devfs_populate()". > >> > >> MFC after: 1 week > >> Reported by: dchagin@ > >> > >> Modified: > >> head/sys/fs/devfs/devfs_devs.c > >> head/sys/kern/kern_conf.c > >> > >> Modified: head/sys/fs/devfs/devfs_devs.c > >> ============================================================================== > >> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) > >> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) > >> @@ -137,6 +137,12 @@ devfs_alloc(int flags) > >> vfs_timestamp(&ts); > >> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; > >> cdev->si_cred = NULL; > >> + /* > >> + * Avoid race with dev_rel() by setting the initial > >> + * reference count to 1. This last reference is taken > >> + * by the destroy_dev() function. > >> + */ > >> + cdev->si_refcount = 1; > > This is wrong. Not all devices are destroyed with destroy_dev(). > > dev_rel() must be allowed to clean up allocated device. > > > > That said, I do not understand what race you are trying to solve. > > Freeing of the accessible cdev memory cannot happen in parallel while > > dev_mtx is owned. > > > > Please do not commit (to devfs) without seeking for the review first. > > Hi Konstantin, > > From my analysis there are basically three ways for a cdev to die: > > 1) Through dev_free_devlocked() > 2) Through destroy_devl() which then later calls dev_free_devlocked() > 3) Through destroy_dev_sched() which really is a wrapper around > destroy_devl(). You only look from the consumers PoV. Devfs cdev can be dereferenced because e.g. clone handler decides that cdev is not valid/needed, and now the memory is never freed due to extra reference. Do not assume that all cdevs go through destroy_dev(). > > In the case of direct free through #1, the reference count is ignored > and it doesn't matter if it is one or zero. Only in the case of > destruction through destroy_dev() it matters. > > Like the comment says in destroy_devl(): > > /* Avoid race with dev_rel() */ > > The problem is that the "cdev->si_refcount" is zero when the initial > devfs_create() is called. Then one ref is made. When we clear the > CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running > process to destroy all the FS related structures and the reference count > goes back to zero when the "cdp" is removed from the "cdevp_list". Then > the cdev is freed too early. This happens because destroy_devl() is > dropping the dev_lock() to sleep waiting for pending references. Basically, this is very good explanation why your delist hack is wrong, for one of the reason. Another reason is explained below. You are trying to cover it with additional reference, but this is wrong as well. > > Do you see something else? I think that what you are trying to do with the CDP_ACTIVE hack is doomed anyway, because you are allowing for devfs directory to have two entries with the same name, until the populate loop cleans up the inactive one. In the meantime, any access to the directory operates on random entry. The checks for existent names in make_dev() are performed for the reason, and you makes the rounds to effectively ignore it. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 10:43:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DBA8DE5; Thu, 15 Jan 2015 10:43:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A400D3E; Thu, 15 Jan 2015 10:43:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FAhxAC099115; Thu, 15 Jan 2015 10:43:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FAhxrh099114; Thu, 15 Jan 2015 10:43:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501151043.t0FAhxrh099114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Jan 2015 10:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277211 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 10:43:59 -0000 Author: kib Date: Thu Jan 15 10:43:58 2015 New Revision: 277211 URL: https://svnweb.freebsd.org/changeset/base/277211 Log: fcntl F_O{GET,SET}LK take pointer as the arg, handle them properly for compat32. Reported and tested by: Alex Tutubalin Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 15 06:14:42 2015 (r277210) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 15 10:43:58 2015 (r277211) @@ -3032,6 +3032,9 @@ freebsd32_fcntl(struct thread *td, struc case F_GETLK: case F_SETFD: case F_SETFL: + case F_OGETLK: + case F_OSETLK: + case F_OSETLKW: tmp = (unsigned int)(uap->arg); break; default: From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 10:48:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEDFBF5B; Thu, 15 Jan 2015 10:48:25 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F864D65; Thu, 15 Jan 2015 10:48:24 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id F140C1FE022; Thu, 15 Jan 2015 11:48:21 +0100 (CET) Message-ID: <54B79B25.3070707@selasky.org> Date: Thu, 15 Jan 2015 11:49:09 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> In-Reply-To: <20150115093841.GX42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 10:48:26 -0000 On 01/15/15 10:38, Konstantin Belousov wrote: > On Thu, Jan 15, 2015 at 08:41:31AM +0100, Hans Petter Selasky wrote: >> On 01/15/15 04:31, Konstantin Belousov wrote: >>> On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: >>>> Author: hselasky >>>> Date: Wed Jan 14 22:07:13 2015 >>>> New Revision: 277199 >>>> URL: https://svnweb.freebsd.org/changeset/base/277199 >>>> >>>> Log: >>>> Avoid race with "dev_rel()" when using the recently added >>>> "delist_dev()" function. Make sure the character device structure >>>> doesn't go away until the end of the "destroy_dev()" function due to >>>> concurrently running cleanup code inside "devfs_populate()". >>>> >>>> MFC after: 1 week >>>> Reported by: dchagin@ >>>> >>>> Modified: >>>> head/sys/fs/devfs/devfs_devs.c >>>> head/sys/kern/kern_conf.c >>>> >>>> Modified: head/sys/fs/devfs/devfs_devs.c >>>> ============================================================================== >>>> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) >>>> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) >>>> @@ -137,6 +137,12 @@ devfs_alloc(int flags) >>>> vfs_timestamp(&ts); >>>> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; >>>> cdev->si_cred = NULL; >>>> + /* >>>> + * Avoid race with dev_rel() by setting the initial >>>> + * reference count to 1. This last reference is taken >>>> + * by the destroy_dev() function. >>>> + */ >>>> + cdev->si_refcount = 1; >>> This is wrong. Not all devices are destroyed with destroy_dev(). >>> dev_rel() must be allowed to clean up allocated device. >>> >>> That said, I do not understand what race you are trying to solve. >>> Freeing of the accessible cdev memory cannot happen in parallel while >>> dev_mtx is owned. >>> >>> Please do not commit (to devfs) without seeking for the review first. >> >> Hi Konstantin, >> >> From my analysis there are basically three ways for a cdev to die: >> >> 1) Through dev_free_devlocked() >> 2) Through destroy_devl() which then later calls dev_free_devlocked() >> 3) Through destroy_dev_sched() which really is a wrapper around >> destroy_devl(). > You only look from the consumers PoV. Devfs cdev can be dereferenced > because e.g. clone handler decides that cdev is not valid/needed, > and now the memory is never freed due to extra reference. > > Do not assume that all cdevs go through destroy_dev(). Hi, All cdevs go through either case #2 or case #1 eventually from what I can see, including clone devices, which call destroy_devl() in the end aswell. See the "clone_destroy()" function! I did a simple test with /dev/dspX.Y which use clone devices. I did: vmstat -m | grep -i devfs1 1) Before plugging USB audio device: DEVFS1 157 79K - 189 512 2) Plug USB audio device: DEVFS1 164 82K - 196 512 3) Play something (env AUDIODEV=/dev/dsp2.4 play track01.wav) DEVFS1 165 83K - 197 512 4) Stop playing (clone device still exits): DEVFS1 165 83K - 197 512 5) Detach USB audio device: DEVFS1 157 79K - 197 512 I see no leakage in that case! Other case: 1) After "kldload if_tap" DEVFS1 158 79K - 201 512 2) After creating TAP device (cat /dev/tap99) DEVFS1 159 80K - 204 512 3) After creating TAP device (cat /dev/tap101) DEVFS1 160 80K - 207 512 5) After "kldunload if_tap": DEVFS1 158 79K - 207 512 6) After "kldload if_tap" again: DEVFS1 158 79K - 207 512 I see no leakage in that case either! Are there more cases which I don't see? > >> >> In the case of direct free through #1, the reference count is ignored >> and it doesn't matter if it is one or zero. Only in the case of >> destruction through destroy_dev() it matters. >> >> Like the comment says in destroy_devl(): >> >> /* Avoid race with dev_rel() */ >> >> The problem is that the "cdev->si_refcount" is zero when the initial >> devfs_create() is called. Then one ref is made. When we clear the >> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running >> process to destroy all the FS related structures and the reference count >> goes back to zero when the "cdp" is removed from the "cdevp_list". Then >> the cdev is freed too early. This happens because destroy_devl() is >> dropping the dev_lock() to sleep waiting for pending references. > Basically, this is very good explanation why your delist hack is wrong, > for one of the reason. Another reason is explained below. > You are trying to cover it with additional reference, but this is wrong > as well. > >> >> Do you see something else? > > I think that what you are trying to do with the CDP_ACTIVE hack is doomed > anyway, because you are allowing for devfs directory to have two entries > with the same name, until the populate loop cleans up the inactive one. > In the meantime, any access to the directory operates on random entry. The entry will not be random, because upon an open() call to a character device, I believe the devfs_lookup() function will be called, which always populate the devfs tree at first by calls to devfs_populate_xxx(). Any delisted devices which don't have the "CDP_ACTIVE" bit set, will never be seen by any open. Regarding leftover filedescriptors which still access the old "cdev" this is not a problem, and these will be closed when the si_refcount goes to zero after the destroy_devl() call. > > The checks for existent names in make_dev() are performed for the reason, > and you makes the rounds to effectively ignore it. > These checks are still correct and don't conflict with my patch from what I can see. Else the existing destroy_devl() would also be broken even before my patch with regard to the "random" selection of character devices at open() from userspace. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 11:51:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4340A44E; Thu, 15 Jan 2015 11:51:32 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD0A867A; Thu, 15 Jan 2015 11:51:31 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0FBpOlA033658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jan 2015 13:51:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0FBpOlA033658 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0FBpNYr033657; Thu, 15 Jan 2015 13:51:23 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jan 2015 13:51:23 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150115115123.GA42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B79B25.3070707@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 11:51:32 -0000 On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: > On 01/15/15 10:38, Konstantin Belousov wrote: > > On Thu, Jan 15, 2015 at 08:41:31AM +0100, Hans Petter Selasky wrote: > >> On 01/15/15 04:31, Konstantin Belousov wrote: > >>> On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: > >>>> Author: hselasky > >>>> Date: Wed Jan 14 22:07:13 2015 > >>>> New Revision: 277199 > >>>> URL: https://svnweb.freebsd.org/changeset/base/277199 > >>>> > >>>> Log: > >>>> Avoid race with "dev_rel()" when using the recently added > >>>> "delist_dev()" function. Make sure the character device structure > >>>> doesn't go away until the end of the "destroy_dev()" function due to > >>>> concurrently running cleanup code inside "devfs_populate()". > >>>> > >>>> MFC after: 1 week > >>>> Reported by: dchagin@ > >>>> > >>>> Modified: > >>>> head/sys/fs/devfs/devfs_devs.c > >>>> head/sys/kern/kern_conf.c > >>>> > >>>> Modified: head/sys/fs/devfs/devfs_devs.c > >>>> ============================================================================== > >>>> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) > >>>> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) > >>>> @@ -137,6 +137,12 @@ devfs_alloc(int flags) > >>>> vfs_timestamp(&ts); > >>>> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; > >>>> cdev->si_cred = NULL; > >>>> + /* > >>>> + * Avoid race with dev_rel() by setting the initial > >>>> + * reference count to 1. This last reference is taken > >>>> + * by the destroy_dev() function. > >>>> + */ > >>>> + cdev->si_refcount = 1; > >>> This is wrong. Not all devices are destroyed with destroy_dev(). > >>> dev_rel() must be allowed to clean up allocated device. > >>> > >>> That said, I do not understand what race you are trying to solve. > >>> Freeing of the accessible cdev memory cannot happen in parallel while > >>> dev_mtx is owned. > >>> > >>> Please do not commit (to devfs) without seeking for the review first. > >> > >> Hi Konstantin, > >> > >> From my analysis there are basically three ways for a cdev to die: > >> > >> 1) Through dev_free_devlocked() > >> 2) Through destroy_devl() which then later calls dev_free_devlocked() > >> 3) Through destroy_dev_sched() which really is a wrapper around > >> destroy_devl(). > > You only look from the consumers PoV. Devfs cdev can be dereferenced > > because e.g. clone handler decides that cdev is not valid/needed, > > and now the memory is never freed due to extra reference. > > > > Do not assume that all cdevs go through destroy_dev(). > > Hi, > > All cdevs go through either case #2 or case #1 eventually from what I > can see, including clone devices, which call destroy_devl() in the end > aswell. See the "clone_destroy()" function! > > I did a simple test with /dev/dspX.Y which use clone devices. I did: > > vmstat -m | grep -i devfs1 > > 1) Before plugging USB audio device: > > DEVFS1 157 79K - 189 512 > > 2) Plug USB audio device: > > DEVFS1 164 82K - 196 512 > > 3) Play something (env AUDIODEV=/dev/dsp2.4 play track01.wav) > > DEVFS1 165 83K - 197 512 > > 4) Stop playing (clone device still exits): > > DEVFS1 165 83K - 197 512 > > 5) Detach USB audio device: > > DEVFS1 157 79K - 197 512 > > I see no leakage in that case! > > Other case: > > 1) After "kldload if_tap" > > DEVFS1 158 79K - 201 512 > > 2) After creating TAP device (cat /dev/tap99) > > DEVFS1 159 80K - 204 512 > > 3) After creating TAP device (cat /dev/tap101) > > DEVFS1 160 80K - 207 512 > > 5) After "kldunload if_tap": > > DEVFS1 158 79K - 207 512 > > 6) After "kldload if_tap" again: > > DEVFS1 158 79K - 207 512 > > I see no leakage in that case either! Because these cases come through destroy_dev(). > > Are there more cases which I don't see? You are breaking existig devfs KPI by your hack. You introduce yet another reference on the device, which is not supposed to be there. If some code calls delist_dev(), it could be said that it is a contract of the new function that destroy_dev() must be called eventually on the cdev. Then, the reference could be said to be shared-owned by delist_dev() and destroy_dev(). But, for arbitrary devfs user this new reference is unacceptable and breaks interface. > > > > >> > >> In the case of direct free through #1, the reference count is ignored > >> and it doesn't matter if it is one or zero. Only in the case of > >> destruction through destroy_dev() it matters. > >> > >> Like the comment says in destroy_devl(): > >> > >> /* Avoid race with dev_rel() */ > >> > >> The problem is that the "cdev->si_refcount" is zero when the initial > >> devfs_create() is called. Then one ref is made. When we clear the > >> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running > >> process to destroy all the FS related structures and the reference count > >> goes back to zero when the "cdp" is removed from the "cdevp_list". Then > >> the cdev is freed too early. This happens because destroy_devl() is > >> dropping the dev_lock() to sleep waiting for pending references. > > Basically, this is very good explanation why your delist hack is wrong, > > for one of the reason. Another reason is explained below. > > You are trying to cover it with additional reference, but this is wrong > > as well. > > > >> > >> Do you see something else? > > > > I think that what you are trying to do with the CDP_ACTIVE hack is doomed > > anyway, because you are allowing for devfs directory to have two entries > > with the same name, until the populate loop cleans up the inactive one. > > In the meantime, any access to the directory operates on random entry. > > The entry will not be random, because upon an open() call to a character > device, I believe the devfs_lookup() function will be called, which > always populate the devfs tree at first by calls to > devfs_populate_xxx(). Any delisted devices which don't have the > "CDP_ACTIVE" bit set, will never be seen by any open. Entry can be random, since after the populate loop is ran, your code in other thread could start and create duplicate entry. There is a window in the lookup where both directory vnode lock and mount point sx locks are dropped. So running the populate does not guarantee anything. > > Regarding leftover filedescriptors which still access the old "cdev" > this is not a problem, and these will be closed when the si_refcount > goes to zero after the destroy_devl() call. > > > > > The checks for existent names in make_dev() are performed for the reason, > > and you makes the rounds to effectively ignore it. > > > > These checks are still correct and don't conflict with my patch from > what I can see. Else the existing destroy_devl() would also be broken > even before my patch with regard to the "random" selection of character > devices at open() from userspace. The checks are done to avoid duplicate names. Your patch makes these checks ineffective (i.e. broken). Let me summarize: - the extra reference on arbitrary cdev should be eliminated. The delist_dev_locked() may add the ref and set some CDP_ flag to indicate to destroy_dev() that it should do dev_rel(). - the existence of the duplicated entries should be either eliminated (I am not sure it is possible with your code), or we must ensure that only one name with CDP_ACTIVE flag set and given name exists. Then, all lookup code must be audited to take CDP_ACTIVE into account when accessing names. I see at least devfs_find() and devfs_mknod() which must be changed. I did not performed full audit. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 12:13:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC207AF2; Thu, 15 Jan 2015 12:13:53 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87071987; Thu, 15 Jan 2015 12:13:53 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 617331FE022; Thu, 15 Jan 2015 13:13:51 +0100 (CET) Message-ID: <54B7AF2F.3080802@selasky.org> Date: Thu, 15 Jan 2015 13:14:39 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> In-Reply-To: <20150115115123.GA42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 12:13:54 -0000 On 01/15/15 12:51, Konstantin Belousov wrote: > On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: >> >> I see no leakage in that case either! > Because these cases come through destroy_dev(). > >> >> Are there more cases which I don't see? > You are breaking existig devfs KPI by your hack. You introduce yet another > reference on the device, which is not supposed to be there. Hi Konstantin, I need a non-sleeping way to say a character device is no longer supposed to be used and be able to re-use the device name right away creating a new device. I guess you got that. > > If some code calls delist_dev(), it could be said that it is a contract > of the new function that destroy_dev() must be called eventually on > the cdev. Then, the reference could be said to be shared-owned by > delist_dev() and destroy_dev(). But, for arbitrary devfs user this new > reference is unacceptable and breaks interface. delist_dev() changes no references. It can be called multiple times even, also inside destroy_devl(). Also I think that the "destroy_dev_sched_cbl()" function should call delist_dev() first so that we don't have a time from when the "destroy_dev_sched_cbl()" function is called where the device entry still exists in devfs mounts until the final destroy_devl() is done by a taskqueue. >>>> In the case of direct free through #1, the reference count is ignored >>>> and it doesn't matter if it is one or zero. Only in the case of >>>> destruction through destroy_dev() it matters. >>>> >>>> Like the comment says in destroy_devl(): >>>> >>>> /* Avoid race with dev_rel() */ >>>> >>>> The problem is that the "cdev->si_refcount" is zero when the initial >>>> devfs_create() is called. Then one ref is made. When we clear the >>>> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running >>>> process to destroy all the FS related structures and the reference count >>>> goes back to zero when the "cdp" is removed from the "cdevp_list". Then >>>> the cdev is freed too early. This happens because destroy_devl() is >>>> dropping the dev_lock() to sleep waiting for pending references. >>> Basically, this is very good explanation why your delist hack is wrong, >>> for one of the reason. Another reason is explained below. >>> You are trying to cover it with additional reference, but this is wrong >>> as well. >>> >>>> >>>> Do you see something else? >>> >>> I think that what you are trying to do with the CDP_ACTIVE hack is doomed >>> anyway, because you are allowing for devfs directory to have two entries >>> with the same name, until the populate loop cleans up the inactive one. >>> In the meantime, any access to the directory operates on random entry. >> >> The entry will not be random, because upon an open() call to a character >> device, I believe the devfs_lookup() function will be called, which >> always populate the devfs tree at first by calls to >> devfs_populate_xxx(). Any delisted devices which don't have the >> "CDP_ACTIVE" bit set, will never be seen by any open. > Entry can be random, since after the populate loop is ran, your code in > other thread could start and create duplicate entry. There is a window > in the lookup where both directory vnode lock and mount point sx locks > are dropped. So running the populate does not guarantee anything. If there is such a race, it is already there! My patch changes nothing in that area: Thread1: Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes waiting for some refs for xxx milliseconds. Thread2: Tries to create create a new character device having the same name like the one in thread1. Device name duplication check is missed because CDP_ACTIVE is cleared. Still thread1 is waiting. Thread3: Tries to open character device created by thread2 while thread1 is still waiting for some ref held by a userspace app to go away. This can happen already before my patches! What do you think? > >> >> Regarding leftover filedescriptors which still access the old "cdev" >> this is not a problem, and these will be closed when the si_refcount >> goes to zero after the destroy_devl() call. >> >>> >>> The checks for existent names in make_dev() are performed for the reason, >>> and you makes the rounds to effectively ignore it. >>> >> >> These checks are still correct and don't conflict with my patch from >> what I can see. Else the existing destroy_devl() would also be broken >> even before my patch with regard to the "random" selection of character >> devices at open() from userspace. > > The checks are done to avoid duplicate names. Your patch makes these > checks ineffective (i.e. broken). At what level do you mean duplicate names, I don't get this fully? At the directory level (DE nodes)? Or inside the list of character devices (LIST_XXX)? > Let me summarize: > - the extra reference on arbitrary cdev should be eliminated. The > delist_dev_locked() may add the ref and set some CDP_ flag to > indicate to destroy_dev() that it should do dev_rel(). It is possible to do this. I thought about this before doing my patch, but decided to try to avoid adding yet another cdev flag. > - the existence of the duplicated entries should be either eliminated > (I am not sure it is possible with your code), or we must ensure > that only one name with CDP_ACTIVE flag set and given name exists. > Then, all lookup code must be audited to take CDP_ACTIVE into account > when accessing names. I see at least devfs_find() and devfs_mknod() > which must be changed. I did not performed full audit. I will check this path out aswell. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 12:36:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B16BD1BF for ; Thu, 15 Jan 2015 12:36:30 +0000 (UTC) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DE7CBBC for ; Thu, 15 Jan 2015 12:36:29 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/avgusCdtw9+43oQGYIsZZxQQ0xcmsA== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (cl-3506.cgn-01.de.sixxs.net [IPv6:2001:4dd0:ff00:db1::2]) by smtp.strato.de (RZmta 36.3 AUTH) with ESMTPSA id v02b5cr0FCZw3do (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) for ; Thu, 15 Jan 2015 13:35:58 +0100 (CET) Received: by britannica.bec.de (sSMTP sendmail emulation); Thu, 15 Jan 2015 13:35:57 +0100 Date: Thu, 15 Jan 2015 13:35:57 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r277203 - in head/sys: kern sys Message-ID: <20150115123557.GC7669@britannica.bec.de> References: <201501142344.t0ENi0tI088747@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501142344.t0ENi0tI088747@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 12:36:30 -0000 On Wed, Jan 14, 2015 at 11:44:00PM +0000, Robert Watson wrote: > - As we anticipate embedding mbufs headers within variable-size regions of > memory in the future, change the definitions of byte arrays embedded in > mbufs to be of size [0] rather than [MLEN] and [MHLEN]. This is not valid C. You may be able to use flexible array members ([]) instead. Joerg From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 13:23:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2F2798A; Thu, 15 Jan 2015 13:23:13 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B92C132; Thu, 15 Jan 2015 13:23:13 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YBkO7-0000PK-PD; Thu, 15 Jan 2015 16:23:03 +0300 Date: Thu, 15 Jan 2015 16:23:03 +0300 From: Slawa Olhovchenkov To: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115132303.GA245@zxy.spb.ru> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501150042.t0F0g7Um018059@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 13:23:14 -0000 On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > Author: imp > Date: Thu Jan 15 00:42:06 2015 > New Revision: 277204 > URL: https://svnweb.freebsd.org/changeset/base/277204 > > Log: > New MINIMAL kernel config. The goal with this configuration is to > only compile in those options in GENERIC that cannot be loaded as > modules. ufs is still included because many of its options aren't > present in the kernel module. There's some other exceptions documented Are you sure? I think defining UFS options in kernel connfig affect to module too. When I define this options in kernel config (w/o options FFS) I got ufs.ko with this SU, quota, acl etc. > +options SOFTUPDATES # Enable FFS soft updates support > +options UFS_ACL # Support for access control lists > +options UFS_DIRHASH # Improve performance on big directories > +options UFS_GJOURNAL # Enable gjournal-based UFS journaling > +options QUOTA # Enable disk quotas for UFS > +options SYSVSHM # SYSV-style shared memory > +options SYSVMSG # SYSV-style message queues > +options SYSVSEM # SYSV-style semaphores > +device agp # support several AGP chipsets > +device random # Entropy device > +device padlock_rng # VIA Padlock RNG > +device rdrand_rng # Intel Bull Mountain RNG > +device vlan # 802.1Q VLAN support > +device tun # Packet tunnel. > +device gif # IPv6 and IPv4 tunneling This is loadable too. And please include: NETMAP NFS_ROOT IEEE80211_DEBUG IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH AH_SUPPORT_AR5416 AH_AR5416_INTERRUPT_MITIGATION ATH_ENABLE_11N From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 13:44:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 234DAFEC; Thu, 15 Jan 2015 13:44:46 +0000 (UTC) Date: Thu, 15 Jan 2015 13:44:46 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115134446.GA92636@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115132303.GA245@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 13:44:46 -0000 On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > > New Revision: 277204 > > URL: https://svnweb.freebsd.org/changeset/base/277204 > > > > Log: > > New MINIMAL kernel config. The goal with this configuration is to > > only compile in those options in GENERIC that cannot be loaded as > > modules. ufs is still included because many of its options aren't > > present in the kernel module. There's some other exceptions documented > > Are you sure? > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. > > [...] > This is loadable too. Right, it does not look like minimal to me either. But I welcome the intention. AFAIR last time we had a discussion about why our default kernel is not MINIMAL, it boiled down to two main problems: 1) loader's caching of disk reads (which makes loading *.ko's from /boot/loader.conf a PITA, esp. on ZFS), and 2) robust way to figure out which modules to load on an arbitrary user's system (so they won't have to write their /boot/loader.conf from scratch themselves). Speaking of (1), I recall there was one or two attempts to address it (keyword: fast-loader-3.diff). Can someone with more details on their hands comment a bit what had happened to that work and are there any ETA for it to get committed? That would be a big leap forward towards minimal kernel which can be feasible enough to replace (or be a real alternative to) GENERIC in the future. ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 13:53:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16DB63F7; Thu, 15 Jan 2015 13:53:45 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C22F565C; Thu, 15 Jan 2015 13:53:44 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YBkrm-0000zV-Vd; Thu, 15 Jan 2015 16:53:42 +0300 Date: Thu, 15 Jan 2015 16:53:42 +0300 From: Slawa Olhovchenkov To: Alexey Dokuchaev Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115135342.GD3698@zxy.spb.ru> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115134446.GA92636@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 13:53:45 -0000 On Thu, Jan 15, 2015 at 01:44:46PM +0000, Alexey Dokuchaev wrote: > On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > > > New Revision: 277204 > > > URL: https://svnweb.freebsd.org/changeset/base/277204 > > > > > > Log: > > > New MINIMAL kernel config. The goal with this configuration is to > > > only compile in those options in GENERIC that cannot be loaded as > > > modules. ufs is still included because many of its options aren't > > > present in the kernel module. There's some other exceptions documented > > > > Are you sure? > > I think defining UFS options in kernel connfig affect to module too. > > When I define this options in kernel config (w/o options FFS) I got > > ufs.ko with this SU, quota, acl etc. > > > > [...] > > This is loadable too. > > Right, it does not look like minimal to me either. But I welcome the > intention. AFAIR last time we had a discussion about why our default > kernel is not MINIMAL, it boiled down to two main problems: 1) loader's > caching of disk reads (which makes loading *.ko's from /boot/loader.conf reading large monolitic kernel is slow too. > a PITA, esp. on ZFS), and 2) robust way to figure out which modules to > load on an arbitrary user's system (so they won't have to write their > /boot/loader.conf from scratch themselves). /boot/loader.conf (with all modules currently present in GENERIC) may be instaled by bsdinstall (and may be part of base.txz). > Speaking of (1), I recall there was one or two attempts to address it > (keyword: fast-loader-3.diff). Can someone with more details on their > hands comment a bit what had happened to that work and are there any > ETA for it to get committed? That would be a big leap forward towards > minimal kernel which can be feasible enough to replace (or be a real > alternative to) GENERIC in the future. This is not only space saving. This is allow to kenv hw.cxgbe.nrxq10g=8 ; kldunload if_cxgbe ; kldload if_cxgbe ; /etc/netstart only a few seconds downtime. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 14:08:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9835C891; Thu, 15 Jan 2015 14:08:42 +0000 (UTC) Date: Thu, 15 Jan 2015 14:08:42 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115140842.GA10593@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> <20150115135342.GD3698@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115135342.GD3698@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:08:42 -0000 On Thu, Jan 15, 2015 at 04:53:42PM +0300, Slawa Olhovchenkov wrote: > On Thu, Jan 15, 2015 at 01:44:46PM +0000, Alexey Dokuchaev wrote: > > intention. AFAIR last time we had a discussion about why our default > > kernel is not MINIMAL, it boiled down to two main problems: 1) loader's > > caching of disk reads (which makes loading *.ko's from /boot/loader.conf > > reading large monolitic kernel is slow too. But not nearly as slow as loading 50-60 modules at boot time (on my stable/8 I have 59 right now). When you read one big file *once* you don't have to worry about caching reads. With everything moved to modules, loader does a lot of superfluous disk access, and to remedy this we need smart(er) caching implementation. > /boot/loader.conf (with all modules currently present in GENERIC) may > be instaled by bsdinstall (and may be part of base.txz). That could be done, but not before we solve (1), and from this POV it deems more important than (2). > This is not only space saving. > This is allow to [unload and load modules, change configuration in runtime > with minimal downtime and without reboot]. I think we all know what are the benefits of modularized kernels. But before we solve aforementioned problems, it will remain a custom option for advanced users. ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 14:27:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B235B21B; Thu, 15 Jan 2015 14:27:25 +0000 (UTC) Date: Thu, 15 Jan 2015 14:27:25 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20150115142725.GA20964@FreeBSD.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130907210244.GE3796@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:27:25 -0000 On Sun, Sep 08, 2013 at 01:02:44AM +0400, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a wrote: > > > I'll be happy if someone does this right now, by populating a > > > /boot/loader.modules or something, and then force the "fixing" of > > > loader to cache metadata to make the reads faster. > > > > I have no idea on what's the loader(8) state right now, but long time > > ago I've made a patch that made it significantly faster by making > > caching actually work. No idea if anyone picked up the patch > > (http://people.freebsd.org/~trasz/fast-loader-3.diff), though. > > Some time ago Andrey V. Elsukov do improvement in loader for more > efficient caching and partition handling. Now loader load a lot of > modules faster. I am insert hist in CC: list. It's kind of funny we seem to have similar discussion happening right now again -- sixteen months later. Edward, Andrey, since you two seem to have some working code already, maybe you can work together to push out something that can be committed? :) ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 14:36:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6870144A; Thu, 15 Jan 2015 14:36:30 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id CA1731417; Thu, 15 Jan 2015 14:36:28 +0000 (UTC) Message-ID: <54B7D03D.7040004@FreeBSD.org> Date: Thu, 15 Jan 2015 17:35:41 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Alexey Dokuchaev , Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> <20150115135342.GD3698@zxy.spb.ru> <20150115140842.GA10593@FreeBSD.org> In-Reply-To: <20150115140842.GA10593@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:36:30 -0000 On 15.01.2015 17:08, Alexey Dokuchaev wrote: >> reading large monolitic kernel is slow too. > > But not nearly as slow as loading 50-60 modules at boot time (on my stable/8 > I have 59 right now). When you read one big file *once* you don't have to > worry about caching reads. With everything moved to modules, loader does a > lot of superfluous disk access, and to remedy this we need smart(er) caching > implementation. Did you try on recent FreeBSD versions? E.g. stable/9 after r243243, or just /boot/loader from head/ ? -- WBR, Andrey V. Elsukov From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 14:45:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 4458C7B2; Thu, 15 Jan 2015 14:45:30 +0000 (UTC) Date: Thu, 15 Jan 2015 14:45:30 +0000 From: Alexey Dokuchaev To: "Andrey V. Elsukov" Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115144530.GA25191@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> <20150115135342.GD3698@zxy.spb.ru> <20150115140842.GA10593@FreeBSD.org> <54B7D03D.7040004@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7D03D.7040004@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:45:30 -0000 On Thu, Jan 15, 2015 at 05:35:41PM +0300, Andrey V. Elsukov wrote: > On 15.01.2015 17:08, Alexey Dokuchaev wrote: > > When you read one big file *once* you don't have to worry about caching > > reads. With everything moved to modules, loader does a lot of > > superfluous disk access, and to remedy this we need smart(er) caching > > implementation. > > Did you try on recent FreeBSD versions? E.g. stable/9 after r243243, or > just /boot/loader from head/ ? Admittedly, I didn't. My stable/8 laptop and year-or-two -CURRENT on ZFS both do show slowless with populated loader.conf. I will study r243243 and whether it changes anything for me, thanks! ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 14:47:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E412F9DC; Thu, 15 Jan 2015 14:47:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CECF1BB1; Thu, 15 Jan 2015 14:47:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FElmfc013604; Thu, 15 Jan 2015 14:47:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FElmxU013603; Thu, 15 Jan 2015 14:47:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501151447.t0FElmxU013603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 15 Jan 2015 14:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277212 - head/contrib/ofed/management/opensm/osmtest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:47:49 -0000 Author: hselasky Date: Thu Jan 15 14:47:48 2015 New Revision: 277212 URL: https://svnweb.freebsd.org/changeset/base/277212 Log: Fix compilation for 32-bit architectures. PR: 196580 Sponsored by: Mellanox Technologies MFC after: 3 days Modified: head/contrib/ofed/management/opensm/osmtest/osmtest.c Modified: head/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- head/contrib/ofed/management/opensm/osmtest/osmtest.c Thu Jan 15 10:43:58 2015 (r277211) +++ head/contrib/ofed/management/opensm/osmtest/osmtest.c Thu Jan 15 14:47:48 2015 (r277212) @@ -2655,7 +2655,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_PR_RMPP_THR) { @@ -2683,7 +2683,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " Path Record queries CA to CA (rmpp)\n\ttook %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2701,7 +2701,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2733,7 +2733,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_RMPP_THR) { @@ -2772,7 +2772,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " large mixed queries (rmpp) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2785,7 +2785,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2819,7 +2819,7 @@ static ib_api_status_t osmtest_stress_sm OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", - start_tv.tv_sec, (long)start_tv.tv_usec); + (long)start_tv.tv_sec, (long)start_tv.tv_usec); while ((num_queries < STRESS_SMALL_RMPP_THR) && (num_timeouts < 100)) { delta_recs = 0; @@ -2848,7 +2848,7 @@ static ib_api_status_t osmtest_stress_sm end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " port_info queries (single mad) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2859,7 +2859,7 @@ static ib_api_status_t osmtest_stress_sm Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 15:25:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 421D472A; Thu, 15 Jan 2015 15:25:59 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 196BBFDB; Thu, 15 Jan 2015 15:25:59 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C3CBB94B; Thu, 15 Jan 2015 10:25:57 -0500 (EST) Message-ID: <54B7DC05.6080801@FreeBSD.org> Date: Thu, 15 Jan 2015 10:25:57 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Warner Losh Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 10:25:57 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:25:59 -0000 On 1/14/15 7:07 PM, Warner Losh wrote: > >> On Jan 14, 2015, at 7:23 AM, John Baldwin wrote: >> >> On 1/14/15 12:41 AM, Warner Losh wrote: >>> Author: imp >>> Date: Wed Jan 14 05:41:31 2015 >>> New Revision: 277163 >>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>> >>> Log: >>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>> since it's a total crap shoot if things will work. >> >> Should we just make it a #error instead? (Some day I hope to have >> NEW_PCIB enabled by default and remove the old code. Will take a while >> to get there for the generic PCI code, but cardbus is probably only used >> on x86 so that would be fine.) > > CardBus is also used on PowerPC macs.. Ok. It shouldn't be hard to add the PCI_RES_BUS stuff to PowerPC. I believe I put the details of that in the NEW_PCIB page on the wiki. You just need to have the equivalent of the x86 nexus call some MI routines to allocate bus numbers for a given domain when bus_alloc_resource() requests bubble up from below. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 15:32:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F19CAD8; Thu, 15 Jan 2015 15:32:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18130151; Thu, 15 Jan 2015 15:32:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FFWW2o037458; Thu, 15 Jan 2015 15:32:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FFWV2Y037455; Thu, 15 Jan 2015 15:32:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501151532.t0FFWV2Y037455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 15 Jan 2015 15:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:32:32 -0000 Author: hselasky Date: Thu Jan 15 15:32:30 2015 New Revision: 277213 URL: https://svnweb.freebsd.org/changeset/base/277213 Log: Major callout subsystem cleanup and rewrite: - Close a migration race where callout_reset() failed to set the CALLOUT_ACTIVE flag. - Callout callback functions are now allowed to be protected by spinlocks. - Switching the callout CPU number cannot always be done on a per-callout basis. See the updated timeout(9) manual page for more information. - The timeout(9) manual page has been updated to reflect how all the functions inside the callout API are working. The manual page has been made function oriented to make it easier to deduce how each of the functions making up the callout API are working without having to first read the whole manual page. Group all functions into a handful of sections which should give a quick top-level overview when the different functions should be used. - The CALLOUT_SHAREDLOCK flag and its functionality has been removed to reduce the complexity in the callout code and to avoid problems about atomically stopping callouts via callout_stop(). If someone needs it, it can be re-added. From my quick grep there are no CALLOUT_SHAREDLOCK clients in the kernel. - A new callout API function named "callout_drain_async()" has been added. See the updated timeout(9) manual page for a complete description. - Update the callout clients in the "kern/" folder to use the callout API properly, like cv_timedwait(). Previously there was some custom sleepqueue code in the callout subsystem, which has been removed, because we now allow callouts to be protected by spinlocks. This allows us to tear down the callout like done with regular mutexes, and a "td_slpmutex" has been added to "struct thread" to atomically teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and "SWT_SLEEPQTIMO" states can now be completely removed. Currently they are marked as available and will be cleaned up in a follow up commit. - Bump the __FreeBSD_version to indicate kernel modules need recompilation. - There has been several reports that this patch "seems to squash a serious bug leading to a callout timeout and panic". Kernel build testing: all architectures were built MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D1438 Sponsored by: Mellanox Technologies Reviewed by: jhb, adrian, sbruno and emaste Modified: head/share/man/man9/Makefile head/share/man/man9/timeout.9 head/sys/kern/init_main.c head/sys/kern/kern_condvar.c head/sys/kern/kern_lock.c head/sys/kern/kern_switch.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/kern_timeout.c head/sys/kern/subr_sleepqueue.c head/sys/ofed/include/linux/completion.h head/sys/sys/_callout.h head/sys/sys/callout.h head/sys/sys/param.h head/sys/sys/proc.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jan 15 14:47:48 2015 (r277212) +++ head/share/man/man9/Makefile Thu Jan 15 15:32:30 2015 (r277213) @@ -1570,6 +1570,7 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_active.9 \ timeout.9 callout_deactivate.9 \ timeout.9 callout_drain.9 \ + timeout.9 callout_drain_async.9 \ timeout.9 callout_handle_init.9 \ timeout.9 callout_init.9 \ timeout.9 callout_init_mtx.9 \ Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Thu Jan 15 14:47:48 2015 (r277212) +++ head/share/man/man9/timeout.9 Thu Jan 15 15:32:30 2015 (r277213) @@ -29,13 +29,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2014 +.Dd January 14, 2015 .Dt TIMEOUT 9 .Os .Sh NAME .Nm callout_active , .Nm callout_deactivate , .Nm callout_drain , +.Nm callout_drain_async , .Nm callout_handle_init , .Nm callout_init , .Nm callout_init_mtx , @@ -63,279 +64,232 @@ .In sys/systm.h .Bd -literal typedef void timeout_t (void *); +typedef void callout_func_t (void *); .Ed -.Ft int -.Fn callout_active "struct callout *c" -.Ft void -.Fn callout_deactivate "struct callout *c" -.Ft int -.Fn callout_drain "struct callout *c" -.Ft void -.Fn callout_handle_init "struct callout_handle *handle" -.Bd -literal -struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); -.Ed -.Ft void -.Fn callout_init "struct callout *c" "int mpsafe" -.Ft void -.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" -.Ft void -.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" -.Ft void -.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" -.Ft int -.Fn callout_pending "struct callout *c" -.Ft int -.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" -.Ft int -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ -"void *arg" -.Ft int -.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ -"void *arg" "int cpu" -.Ft int -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" -.Ft int -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" -.Ft int -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" -.Ft int -.Fn callout_schedule "struct callout *c" "int ticks" -.Ft int -.Fn callout_schedule_curcpu "struct callout *c" "int ticks" -.Ft int -.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" -.Ft int -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -.Ft int -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -.Ft int -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int cpu" "int flags" -.Ft int -.Fn callout_stop "struct callout *c" -.Ft struct callout_handle -.Fn timeout "timeout_t *func" "void *arg" "int ticks" -.Ft void -.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" .Sh DESCRIPTION The .Nm callout API is used to schedule a call to an arbitrary function at a specific -time in the future. -Consumers of this API are required to allocate a callout structure +time in the future in a single-shot fashion. +Consumers of this API are required to allocate a .Pq struct callout -for each pending function invocation. -This structure stores state about the pending function invocation including -the function to be called and the time at which the function should be invoked. -Pending function calls can be cancelled or rescheduled to a different time. -In addition, -a callout structure may be reused to schedule a new function call after a -scheduled call is completed. -.Pp -Callouts only provide a single-shot mode. -If a consumer requires a periodic timer, -it must explicitly reschedule each function call. -This is normally done by rescheduling the subsequent call within the called -function. +structure for each pending function invocation. +The +.Pq struct callout +structure stores the full state about any pending function call and +should be drained by a call to +.Fn callout_drain +or +.Fn callout_drain_async +before freeing. +.Sh INITIALISATION +.Ft void +.Fn callout_handle_init "struct callout_handle *handle" +This function is deprecated and is used to prepare a +.Pq struct callout_handle +structure before it can be used the first time. +If this function is called on a pending timeout, the pending timeout +cannot be cancelled and the +.Fn untimeout +function will return as if there was no timeout pending. .Pp -Callout functions must not sleep. -They may not acquire sleepable locks, -wait on condition variables, -perform blocking allocation requests, -or invoke any other action that might sleep. +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" +This macro is deprecated and can be used instead of +.Fn callout_handle_init +to assign the default state to the +.Pq struct callout_handle +structure when declaring static timeouts. .Pp -Each callout structure must be initialized by -.Fn callout_init , -.Fn callout_init_mtx , -.Fn callout_init_rm , -or -.Fn callout_init_rw -before it is passed to any of the other callout functions. -The -.Fn callout_init -function initializes a callout structure in -.Fa c -that is not associated with a specific lock. +.Ft void +.Fn callout_init "struct callout *c" "int mpsafe" +This function prepares a +.Pq struct callout +structure before it can be used. +This function should not be used when the callout is pending a timeout. If the .Fa mpsafe -argument is zero, -the callout structure is not considered to be -.Dq multi-processor safe ; -and the Giant lock will be acquired before calling the callout function -and released when the callout function returns. +argument is non-zero, the callback function will be running unlocked. +Else the Giant mutex will be locked before calling the callback function. .Pp +.Ft void +.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" +This function prepares a +.Pq struct callout +structure before it can be used. +This function should not be used when the callout is pending a timeout. The -.Fn callout_init_mtx , -.Fn callout_init_rm , -and -.Fn callout_init_rw -functions initialize a callout structure in -.Fa c -that is associated with a specific lock. -The lock is specified by the -.Fa mtx , -.Fa rm , -or -.Fa rw -parameter. -The associated lock must be held while stopping or rescheduling the -callout. -The callout subsystem acquires the associated lock before calling the -callout function and releases it after the function returns. -If the callout was cancelled while the callout subsystem waited for the -associated lock, -the callout function is not called, -and the associated lock is released. -This ensures that stopping or rescheduling the callout will abort any -previously scheduled invocation. -.Pp -Only regular mutexes may be used with -.Fn callout_init_mtx ; -spin mutexes are not supported. -A sleepable read-mostly lock -.Po -one initialized with the -.Dv RM_SLEEPABLE -flag -.Pc -may not be used with -.Fn callout_init_rm . -Similarly, other sleepable lock types such as -.Xr sx 9 -and -.Xr lockmgr 9 -cannot be used with callouts because sleeping is not permitted in -the callout subsystem. -.Pp -These +.Fa mtx +argument should be non-zero and should specify a pointer to a valid +spinlock type of mutex or a valid regular non-sleepable mutex which +the callback subsystem should lock before calling the callback +function. +Valid .Fa flags -may be specified for -.Fn callout_init_mtx , -.Fn callout_init_rm , -or -.Fn callout_init_rw : +are: .Bl -tag -width ".Dv CALLOUT_RETURNUNLOCKED" .It Dv CALLOUT_RETURNUNLOCKED -The callout function will release the associated lock itself, -so the callout subsystem should not attempt to unlock it -after the callout function returns. -.It Dv CALLOUT_SHAREDLOCK -The lock is only acquired in read mode when running the callout handler. -This flag is ignored by -.Fn callout_init_mtx . +It is assumed that the callout function has released the specified +mutex before returning. +Else the callout subsystem will release the specified mutex after the +callout function has returned. .El .Pp -The function -.Fn callout_stop -cancels a callout -.Fa c -if it is currently pending. -If the callout is pending, then -.Fn callout_stop -returns a non-zero value. -If the callout is not set, -has already been serviced, -or is currently being serviced, -then zero will be returned. -If the callout has an associated lock, -then that lock must be held when this function is called. -.Pp -The function -.Fn callout_drain -is identical to -.Fn callout_stop -except that it will wait for the callout -.Fa c -to complete if it is already in progress. -This function MUST NOT be called while holding any -locks on which the callout might block, or deadlock will result. -Note that if the callout subsystem has already begun processing this -callout, then the callout function may be invoked before -.Fn callout_drain -returns. -However, the callout subsystem does guarantee that the callout will be -fully stopped before -.Fn callout_drain -returns. -.Pp -The -.Fn callout_reset -and -.Fn callout_schedule -function families schedule a future function invocation for callout -.Fa c . -If -.Fa c -already has a pending callout, -it is cancelled before the new invocation is scheduled. -These functions return a non-zero value if a pending callout was cancelled -and zero if there was no pending callout. -If the callout has an associated lock, -then that lock must be held when any of these functions are called. +.Ft void +.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" +This function is the same like the +.Fn callout_init_mtx +function except it accepts a read-mostly type of lock. +The read-mostly lock must not be initialised with the +.Dv RM_SLEEPABLE +flag. .Pp -The time at which the callout function will be invoked is determined by -either the -.Fa ticks -argument or the -.Fa sbt , -.Fa pr , -and -.Fa flags -arguments. -When -.Fa ticks -is used, -the callout is scheduled to execute after +.Ft void +.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" +This function is the same like the +.Fn callout_init_mtx +function except it accepts a reader-writer type of lock. +.Sh SCHEDULING CALLOUTS +.Ft struct callout_handle +.Fn timeout "timeout_t *func" "void *arg" "int ticks" +This function is deprecated and schedules a call to the function given by the argument +.Fa func +to take place after .Fa ticks Ns No /hz seconds. Non-positive values of .Fa ticks are silently converted to the value .Sq 1 . -.Pp The -.Fa sbt , -.Fa pr , -and -.Fa flags -arguments provide more control over the scheduled time including -support for higher resolution times, -specifying the precision of the scheduled time, -and setting an absolute deadline instead of a relative timeout. -The callout is scheduled to execute in a time window which begins at -the time specified in +.Fa func +argument should be a valid pointer to a function that takes a single +.Fa void * +argument. +Upon invocation, the +.Fa func +function will receive +.Fa arg +as its only argument. +The Giant lock is locked when the +.Fa arg +function is invoked and should not be unlocked by this function. +The returned value from +.Fn timeout +is a +.Ft struct callout_handle +structure which can be used in conjunction with the +.Fn untimeout +function to request that a scheduled timeout be cancelled. +As handles are recycled by the system, it is possible, although unlikely, +that a handle from one invocation of +.Fn timeout +may match the handle of another invocation of +.Fn timeout +if both calls used the same function pointer and argument, and the first +timeout is expired or canceled before the second call. +Please ensure that the function and argument pointers are unique when using this function. +.Pp +.Ft int +.Fn callout_reset "struct callout *c" "int ticks" "callout_func_t *func" "void *arg" +This function is used to schedule or re-schedule a callout. +This function at first stops the callout given by the +.Fa c +argument, if any. +Then it will start the callout given by the +.Fa c +argument. +The relative time until the timeout callback happens is given by the +.Fa ticks +argument. +The number of ticks in a second is defined by +.Dv hz +and can vary from system to system. +This function returns a non-zero value if the given callout was pending and +the callback function was prevented from being called. +Else a value of zero is returned. +If a lock is associated with the callout given by the +.Fa c +argument and it is exclusivly locked when this function is called this +function will always ensure that previous callback function, if any, +is never reached. +In other words the callout will be atomically restarted. +Else there is no such guarantee. +The callback function is given by the +.Fa func +argument and its function argument is given by the +.Fa arg +argument. +.Pp +.Ft int +.Fn callout_reset_curcpu "struct callout *c" "int ticks" "callout_func_t *func" \ +"void *arg" +This function works the same like the +.Fn callout_reset +function except the callback function given by the +.Fa func +argument will be executed on the same CPU which called this function. +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the +.Fa func +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_reset_on "struct callout *c" "int ticks" "callout_func_t *func" \ +"void *arg" "int cpu" +This function works the same like the +.Fn callout_reset +function except the callback function given by the +.Fa func +argument will be executed on the CPU given by the +.Fa cpu +argument. +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the +.Fa func +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" +This function works the same like the +.Fn callout_reset +function except the relative or absolute time after which the timeout +callback should happen is given by the .Fa sbt -and extends for the amount of time specified in -.Fa pr . -If +argument and extends for the amount of time specified in the +.Fa pr +argument. +This function is used when you need high precision timeouts. +If the .Fa sbt -specifies a time in the past, +argument specifies a time in the past, the window is adjusted to start at the current time. A non-zero value for .Fa pr allows the callout subsystem to coalesce callouts scheduled close to each other into fewer timer interrupts, reducing processing overhead and power consumption. -These +The .Fa flags -may be specified to adjust the interpretation of +argument may be non-zero to adjust the interpretation of the .Fa sbt -and -.Fa pr : +and the +.Fa pr +arguments: .Bl -tag -width ".Dv C_DIRECT_EXEC" .It Dv C_ABSOLUTE Handle the .Fa sbt argument as an absolute time since boot. -By default, +By default, the .Fa sbt -is treated as a relative amount of time, +argument is treated like a relative amount of time, similar to .Fa ticks . .It Dv C_DIRECT_EXEC @@ -347,7 +301,7 @@ Callout functions run in this context ma and should be as small as possible because they run with absolute priority. .It Fn C_PREL Specifies relative event time precision as binary logarithm of time interval -divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4 and so on. Note that the larger of .Fa pr or this value is used as the length of the time window. @@ -360,65 +314,215 @@ Align the timeouts to calls if possible. .El .Pp -The -.Fn callout_reset -functions accept a +.Ft int +.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" +This function works the same like the +.Fn callout_reset_sbt +function except the callback function given by the .Fa func -argument which identifies the function to be called when the time expires. -It must be a pointer to a function that takes a single -.Fa void * +argument will be executed on the same CPU which called this function. +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the +.Fa func +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "callout_func_t *func" "void *arg" "int cpu" "int flags" +This function works the same like the +.Fn callout_reset_sbt +function except the callback function given by the +.Fa func +argument will be executed on the CPU given by the +.Fa cpu argument. -Upon invocation, +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the .Fa func -will receive -.Fa arg -as its only argument. -The -.Fn callout_schedule -functions reuse the +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_schedule "struct callout *c" "int ticks" +This function works the same like the +.Fn callout_reset +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_curcpu "struct callout *c" "int ticks" +This function works the same like the +.Fn callout_reset_curcpu +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" +This function works the same like the +.Fn callout_reset_on +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +This function works the same like the +.Fn callout_reset_sbt +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +This function works the same like the +.Fn callout_reset_sbt_curcpu +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int cpu" "int flags" +This function works the same like the +.Fn callout_reset_sbt_on +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Sh CHECKING THE STATE OF CALLOUTS +.Ft int +.Fn callout_pending "struct callout *c" +This function returns non-zero if the callout pointed to by the +.Fa c +argument is pending for callback. +Else this function returns zero. +This function returns zero when inside the callout function if the +callout is not re-scheduled. +.Pp +.Ft int +.Fn callout_active "struct callout *c" +This function is deprecated and returns non-zero if the callout +pointed to by the +.Fa c +argument was scheduled in the past. +Else this function returns zero. +This function also returns zero after the +.Fn callout_deactivate +or the +.Fn callout_stop +or the +.Fn callout_drain +or the +.Fn callout_drain_async +function is called on the same callout as given by the +.Fa c +argument. +.Pp +.Ft void +.Fn callout_deactivate "struct callout *c" +This function is deprecated and ensures that subsequent calls to the +.Fn callout_activate +function returns zero until the callout is scheduled again. +.Sh STOPPING CALLOUTS +.Ft void +.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" +This function is deprecated and cancels the timeout associated with the +.Fa handle +argument using the function pointed to by the .Fa func -and +argument and having the .Fa arg -arguments from the previous callout. -Note that one of the -.Fn callout_reset -functions must always be called to initialize +arguments to validate the handle. +If the handle does not correspond to a timeout with +the function .Fa func -and +taking the argument .Fa arg -before one of the -.Fn callout_schedule -functions can be used. +no action is taken. The +.Fa handle +must be initialised by a previous call to +.Fn timeout , +.Fn callout_handle_init +or assigned the value of +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" +before being passed to +.Fn untimeout . +The behavior of calling +.Fn untimeout +with an uninitialised handle +is undefined. .Pp -The callout subsystem provides a softclock thread for each CPU in the system. -Callouts are assigned to a single CPU and are executed by the softclock thread -for that CPU. -Initially, -callouts are assigned to CPU 0. -The -.Fn callout_reset_on , -.Fn callout_reset_sbt_on , -.Fn callout_schedule_on -and -.Fn callout_schedule_sbt_on -functions assign the callout to CPU -.Fa cpu . -The -.Fn callout_reset_curcpu , -.Fn callout_reset_sbt_curpu , -.Fn callout_schedule_curcpu -and -.Fn callout_schedule_sbt_curcpu -functions assign the callout to the current CPU. -The -.Fn callout_reset , -.Fn callout_reset_sbt , -.Fn callout_schedule -and -.Fn callout_schedule_sbt -functions schedule the callout to execute in the softclock thread of the CPU -to which it is currently assigned. +.Ft int +.Fn callout_stop "struct callout *c" +This function is used to stop a timeout function invocation associated with the callout pointed to by the +.Fa c +argument, in a non-blocking fashion. +This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialised. +This function returns a non-zero value if the given callout was pending and +the callback function was prevented from being called. +Else a value of zero is returned. +If a lock is associated with the callout given by the +.Fa c +argument and it is exclusivly locked when this function is called, the +.Fn callout_stop +function will always ensure that the callback function is never reached. +In other words the callout will be atomically stopped. +Else there is no such guarantee. +.Sh DRAINING CALLOUTS +.Ft int +.Fn callout_drain "struct callout *c" +This function works the same like the +.Fn callout_stop +function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the +.Fa c +argument inside the callout subsystem before it returns. +Also this function ensures that the lock, if any, associated with the +callout is no longer being used. +When this function returns, it is safe to free the callout structure pointed to by the +.Fa c +argument. .Pp +.Ft int +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" +This function is non-blocking and works the same like the +.Fn callout_stop +function except if it returns non-zero it means the callback function pointed to by the +.Fa fn +argument will be called back with the +.Fa arg +argument when all references to the callout pointed to by the +.Fa c +argument are gone. +If this function returns zero, it is safe to free the callout structure pointed to by the +.Fa c +argument right away. +.Sh CALLOUT FUNCTION RESTRICTIONS +Callout functions must not sleep. +They may not acquire sleepable locks, wait on condition variables, +perform blocking allocation requests, or invoke any other action that +might sleep. +.Sh CALLOUT SUBSYSTEM INTERNALS +The callout subsystem has its own set of spinlocks to protect its internal state. +The callout subsystem provides a softclock thread for each CPU in the +system. +Callouts are assigned to a single CPU and are executed by the +softclock thread for that CPU. +Initially, callouts are assigned to CPU 0. Softclock threads are not pinned to their respective CPUs by default. The softclock thread for CPU 0 can be pinned to CPU 0 by setting the .Va kern.pin_default_swi @@ -427,50 +531,7 @@ Softclock threads for CPUs other than ze respective CPUs by setting the .Va kern.pin_pcpu_swi loader tunable to a non-zero value. -.Pp -The macros -.Fn callout_pending , -.Fn callout_active -and -.Fn callout_deactivate -provide access to the current state of the callout. -The -.Fn callout_pending -macro checks whether a callout is -.Em pending ; -a callout is considered -.Em pending -when a timeout has been set but the time has not yet arrived. -Note that once the timeout time arrives and the callout subsystem -starts to process this callout, -.Fn callout_pending -will return -.Dv FALSE -even though the callout function may not have finished -.Pq or even begun -executing. -The -.Fn callout_active -macro checks whether a callout is marked as -.Em active , -and the -.Fn callout_deactivate -macro clears the callout's -.Em active -flag. -The callout subsystem marks a callout as -.Em active -when a timeout is set and it clears the -.Em active -flag in -.Fn callout_stop -and -.Fn callout_drain , -but it -.Em does not -clear it when a callout expires normally via the execution of the -callout function. -.Ss "Avoiding Race Conditions" +.Sh "AVOIDING RACE CONDITIONS" The callout subsystem invokes callout functions from its own thread context. Without some kind of synchronization, @@ -487,7 +548,7 @@ synchronization concerns. The first approach is preferred as it is the simplest: .Bl -enum -offset indent .It -Callouts can be associated with a specific lock when they are initialized +Callouts can be associated with a specific lock when they are initialised by .Fn callout_init_mtx , .Fn callout_init_rm , @@ -508,7 +569,7 @@ or .Fn callout_schedule functions to provide this safety. .Pp -A callout initialized via +A callout initialised via .Fn callout_init with .Fa mpsafe @@ -531,9 +592,8 @@ function families .Pc indicates whether or not the callout was removed. If it is known that the callout was set and the callout function has -not yet executed, then a return value of -.Dv FALSE -indicates that the callout function is about to be called. +not yet executed, then a return value of zero indicates that the +callout function is about to be called. For example: .Bd -literal -offset indent if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { @@ -589,16 +649,14 @@ The callout function should first check .Em pending flag and return without action if .Fn callout_pending -returns -.Dv TRUE . +returns non-zero. This indicates that the callout was rescheduled using .Fn callout_reset just before the callout function was invoked. If .Fn callout_active -returns -.Dv FALSE -then the callout function should also return without action. +returns zero then the callout function should also return without +action. This indicates that the callout has been stopped. Finally, the callout function should call .Fn callout_deactivate @@ -668,129 +726,13 @@ a callout should always be drained prior or releasing the storage for the callout structure. .Sh LEGACY API .Bf Sy -The functions below are a legacy API that will be removed in a future release. -New code should not use these routines. -.Ef -.Pp -The function -.Fn timeout -schedules a call to the function given by the argument -.Fa func -to take place after -.Fa ticks Ns No /hz -seconds. -Non-positive values of -.Fa ticks -are silently converted to the value -.Sq 1 . -.Fa func -should be a pointer to a function that takes a -.Fa void * -argument. -Upon invocation, -.Fa func -will receive -.Fa arg -as its only argument. -The return value from +The .Fn timeout -is a -.Ft struct callout_handle -which can be used in conjunction with the -.Fn untimeout -function to request that a scheduled timeout be canceled. -.Pp -The function -.Fn callout_handle_init -can be used to initialize a handle to a state which will cause -any calls to -.Fn untimeout -with that handle to return with no side -effects. -.Pp -Assigning a callout handle the value of -.Fn CALLOUT_HANDLE_INITIALIZER -performs the same function as -.Fn callout_handle_init -and is provided for use on statically declared or global callout handles. -.Pp -The function -.Fn untimeout -cancels the timeout associated with -.Fa handle -using the -.Fa func and -.Fa arg -arguments to validate the handle. -If the handle does not correspond to a timeout with -the function -.Fa func -taking the argument -.Fa arg -no action is taken. -.Fa handle -must be initialized by a previous call to -.Fn timeout , -.Fn callout_handle_init , -or assigned the value of -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" -before being passed to -.Fn untimeout . -The behavior of calling .Fn untimeout -with an uninitialized handle -is undefined. -.Pp -As handles are recycled by the system, it is possible (although unlikely) -that a handle from one invocation of -.Fn timeout -may match the handle of another invocation of -.Fn timeout -if both calls used the same function pointer and argument, and the first -timeout is expired or canceled before the second call. -The timeout facility offers O(1) running time for -.Fn timeout -and -.Fn untimeout . -Timeouts are executed from -.Fn softclock -with the -.Va Giant -lock held. -Thus they are protected from re-entrancy. -.Sh RETURN VALUES -The -.Fn callout_active -macro returns the state of a callout's -.Em active -flag. -.Pp -The -.Fn callout_pending -macro returns the state of a callout's -.Em pending -flag. -.Pp -The -.Fn callout_reset -and -.Fn callout_schedule -function families return non-zero if the callout was pending before the new -function invocation was scheduled. -.Pp -The -.Fn callout_stop -and -.Fn callout_drain -functions return non-zero if the callout was still pending when it was -called or zero otherwise. -The -.Fn timeout -function returns a -.Ft struct callout_handle -that can be passed to -.Fn untimeout . +functions are a legacy API that will be removed in a future release. +New code should not use these routines. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 15:51:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26E8C77D; Thu, 15 Jan 2015 15:51:57 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F423C607; Thu, 15 Jan 2015 15:51:56 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E9DACB913; Thu, 15 Jan 2015 10:51:55 -0500 (EST) Message-ID: <54B7E21B.5080008@FreeBSD.org> Date: Thu, 15 Jan 2015 10:51:55 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277204 - head/sys/amd64/conf References: <201501150042.t0F0g7Um018059@svn.freebsd.org> In-Reply-To: <201501150042.t0F0g7Um018059@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 10:51:56 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:51:57 -0000 On 1/14/15 7:42 PM, Warner Losh wrote: > Author: imp > Date: Thu Jan 15 00:42:06 2015 > New Revision: 277204 > URL: https://svnweb.freebsd.org/changeset/base/277204 > > Log: > New MINIMAL kernel config. The goal with this configuration is to > only compile in those options in GENERIC that cannot be loaded as > modules. ufs is still included because many of its options aren't > present in the kernel module. There's some other exceptions documented > in the file. This is part of some work to get more things > automatically loading in the hopes of obsoleting GENERIC one day. > > Added: > head/sys/amd64/conf/MINIMAL (contents, props changed) > > Added: head/sys/amd64/conf/MINIMAL > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/amd64/conf/MINIMAL Thu Jan 15 00:42:06 2015 (r277204) > @@ -0,0 +1,145 @@ > +# o acpi as a module has been reported flakey and not well tested, so > +# is included in the kernel. ACPI doesn't build as a module on amd64 and can't. It has to hook into kernel startup before modules can run to do things like enumerate CPUs and NUMA domains. i386 uses a hack to allow acpi.ko to load whereby it blows out all the CPU-sized tables to the static MAXCPU value instead of doing any runtime tuning. I'd probably prefer to drop acpi.ko from i386 and make it more like amd64. > +# o random is included due to uncertaty... s/uncertaty/uncertainty/, though I think you exhausted your irony quotient for the day with that one. :) > + > +device agp # support several AGP chipsets This works as a kld now IIRC? I think you can even load it at runtime? > + > +# Pseudo devices. > +device loop # Network loopback > +device random # Entropy device > +device padlock_rng # VIA Padlock RNG > +device rdrand_rng # Intel Bull Mountain RNG > +device ether # Ethernet support > +device vlan # 802.1Q VLAN support > +device tun # Packet tunnel. > +device gif # IPv6 and IPv4 tunneling These last three definitely work as modules. (vlan(4) was only recently added to GENERIC). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 15:53:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17B04987; Thu, 15 Jan 2015 15:53:45 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1ED3628; Thu, 15 Jan 2015 15:53:44 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E5859B923; Thu, 15 Jan 2015 10:53:43 -0500 (EST) Message-ID: <54B7E287.80406@FreeBSD.org> Date: Thu, 15 Jan 2015 10:53:43 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 10:53:44 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:53:45 -0000 On 1/15/15 10:32 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 > > Log: > Major callout subsystem cleanup and rewrite: > - Close a migration race where callout_reset() failed to set the > CALLOUT_ACTIVE flag. > - Callout callback functions are now allowed to be protected by > spinlocks. > - Switching the callout CPU number cannot always be done on a > per-callout basis. See the updated timeout(9) manual page for more > information. > - The timeout(9) manual page has been updated to reflect how all the > functions inside the callout API are working. The manual page has > been made function oriented to make it easier to deduce how each of > the functions making up the callout API are working without having > to first read the whole manual page. Group all functions into a > handful of sections which should give a quick top-level overview > when the different functions should be used. > - The CALLOUT_SHAREDLOCK flag and its functionality has been removed > to reduce the complexity in the callout code and to avoid problems > about atomically stopping callouts via callout_stop(). If someone > needs it, it can be re-added. From my quick grep there are no > CALLOUT_SHAREDLOCK clients in the kernel. > - A new callout API function named "callout_drain_async()" has been > added. See the updated timeout(9) manual page for a complete > description. > - Update the callout clients in the "kern/" folder to use the callout > API properly, like cv_timedwait(). Previously there was some custom > sleepqueue code in the callout subsystem, which has been removed, > because we now allow callouts to be protected by spinlocks. This > allows us to tear down the callout like done with regular mutexes, > and a "td_slpmutex" has been added to "struct thread" to atomically > teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and > "SWT_SLEEPQTIMO" states can now be completely removed. Currently > they are marked as available and will be cleaned up in a follow up > commit. > - Bump the __FreeBSD_version to indicate kernel modules need > recompilation. > - There has been several reports that this patch "seems to squash a > serious bug leading to a callout timeout and panic". > > Kernel build testing: all architectures were built > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D1438 > Sponsored by: Mellanox Technologies > Reviewed by: jhb, adrian, sbruno and emaste Eh, I have not reviewed this at all. (I still plan to though.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:00:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A781D7C; Thu, 15 Jan 2015 16:00:28 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C18956C1; Thu, 15 Jan 2015 16:00:27 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rl12so15571598iec.12; Thu, 15 Jan 2015 08:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=a5T25GZ9zPO3PXNPks3peNUWSeJmX1Bz8mUWIL9JMeY=; b=RcDyNNEBPs3WIlyiDgOx+JxKlZQDRNdl+RtOpeXMCj1pfdmN8pznio0UNNmyoft5na o8kinM1tnlmdx3v1vaOnR5AO5iFkRx9AqpfoHFTUM5WSME1uZUdpI/53C8ElK5Rj8Mjg aIeuKDB5L1bQoNc+9qmG16dpvswLMM2yo4n0JYkq4vBFW3LHrG9PMuVW/js5XsYCFh5z ruxAeLyryHsbp4UiZvb7tywyI7oOmedb6f7kYF0NpQIs1Yrn+wctLLCWSDIT+7FJ4uv5 WpzGjie4QMXn0BYqm/w9iKdrt7HpkQa6LhX87TlJpea+zWZjwrmhQRPSkYikcGDb22q5 wDgQ== X-Received: by 10.107.25.74 with SMTP id 71mr11195085ioz.70.1421337627005; Thu, 15 Jan 2015 08:00:27 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.0.85 with HTTP; Thu, 15 Jan 2015 08:00:06 -0800 (PST) In-Reply-To: <54B7E287.80406@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> From: Ed Maste Date: Thu, 15 Jan 2015 11:00:06 -0500 X-Google-Sender-Auth: C7N1nU6H6rWE1fye8YQ0BG2AQQw Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Hans Petter Selasky X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:00:28 -0000 On 15 January 2015 at 10:53, John Baldwin wrote: > On 1/15/15 10:32 AM, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> > Eh, I have not reviewed this at all. (I still plan to though.) Yes, the list is "people listed as reviewers or subscribers on the Phabricator review." I don't believe anyone in the list has examined it closely enough to count as "Reviewed-by." I certainly haven't. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:05:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 810A01DF; Thu, 15 Jan 2015 16:05:13 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40CD9801; Thu, 15 Jan 2015 16:05:13 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 77C8D1FE022; Thu, 15 Jan 2015 17:05:10 +0100 (CET) Message-ID: <54B7E566.8050601@selasky.org> Date: Thu, 15 Jan 2015 17:05:58 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, sbruno@freebsd.org Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> In-Reply-To: <54B7E287.80406@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:05:13 -0000 On 01/15/15 16:53, John Baldwin wrote: > On 1/15/15 10:32 AM, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> Hi, > > Eh, I have not reviewed this at all. (I still plan to though.) > The "Reviewed by" was simply a C&P of the review list in from the Differential Revision. When you mention it should probably simply have said: Reviewed by: sbruno @ Due to the meaning of "Reviewed by" in commit messages. Sorry. BTW: Nice if people respond quickly or remove themselves from the differential reviews if they don't plan to do any reviews. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:09:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1A263C9; Thu, 15 Jan 2015 16:09:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 741C084E; Thu, 15 Jan 2015 16:09:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FG9b7i053023; Thu, 15 Jan 2015 16:09:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FG9aom053019; Thu, 15 Jan 2015 16:09:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501151609.t0FG9aom053019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 15 Jan 2015 16:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277214 - in head/sys/dev/sound: pci pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:09:37 -0000 Author: bapt Date: Thu Jan 15 16:09:35 2015 New Revision: 277214 URL: https://svnweb.freebsd.org/changeset/base/277214 Log: Sound: fix typos in user visible messages etc. Submitted by: Sascha Wildner Obtained from: DragonFly MFC after: 3 days Modified: head/sys/dev/sound/pci/emu10kx.c head/sys/dev/sound/pci/envy24.c head/sys/dev/sound/pci/envy24ht.c head/sys/dev/sound/pcm/channel.c Modified: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pci/emu10kx.c Thu Jan 15 16:09:35 2015 (r277214) @@ -2316,7 +2316,7 @@ emu10kx_prepare(struct emu_sc_info *sc, } if (sc->midi[0] != NULL) if (device_is_attached(sc->midi[0])) { - sbuf_printf(s, "\tIR reciever MIDI events %s\n", sc->enable_ir ? "enabled" : "disabled"); + sbuf_printf(s, "\tIR receiver MIDI events %s\n", sc->enable_ir ? "enabled" : "disabled"); } sbuf_printf(s, "Card is in %s mode\n", (sc->mode == MODE_ANALOG) ? "analog" : "digital"); Modified: head/sys/dev/sound/pci/envy24.c ============================================================================== --- head/sys/dev/sound/pci/envy24.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pci/envy24.c Thu Jan 15 16:09:35 2015 (r277214) @@ -2312,7 +2312,7 @@ envy24_putcfg(struct sc_info *sc) printf("from external clock synthesizer chip\n"); break; default: - printf("illeagal system setting\n"); + printf("illegal system setting\n"); } printf(" MPU-401 UART(s) #: "); if (sc->cfg->scfg & PCIM_SCFG_MPU) Modified: head/sys/dev/sound/pci/envy24ht.c ============================================================================== --- head/sys/dev/sound/pci/envy24ht.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pci/envy24ht.c Thu Jan 15 16:09:35 2015 (r277214) @@ -2212,7 +2212,7 @@ envy24ht_putcfg(struct sc_info *sc) printf("reserved\n"); break; default: - printf("illeagal system setting\n"); + printf("illegal system setting\n"); } printf(" MPU-401 UART(s) #: "); if (sc->cfg->scfg & ENVY24HT_CCSM_SCFG_MPU) Modified: head/sys/dev/sound/pcm/channel.c ============================================================================== --- head/sys/dev/sound/pcm/channel.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pcm/channel.c Thu Jan 15 16:09:35 2015 (r277214) @@ -92,7 +92,7 @@ sysctl_hw_snd_latency_profile(SYSCTL_HAN } SYSCTL_PROC(_hw_snd, OID_AUTO, latency_profile, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_snd_latency_profile, "I", - "buffering latency profile (0=aggresive 1=safe)"); + "buffering latency profile (0=aggressive 1=safe)"); static int chn_timeout = CHN_TIMEOUT; TUNABLE_INT("hw.snd.timeout", &chn_timeout); From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:20:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 3813C782; Thu, 15 Jan 2015 16:20:50 +0000 (UTC) Date: Thu, 15 Jan 2015 16:20:50 +0000 From: Alexey Dokuchaev To: John Baldwin Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115162050.GA60729@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <54B7E21B.5080008@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7E21B.5080008@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:20:50 -0000 On Thu, Jan 15, 2015 at 10:51:55AM -0500, John Baldwin wrote: > > [...] > > +# Pseudo devices. > > +device loop # Network loopback > > +device random # Entropy device > > +device padlock_rng # VIA Padlock RNG > > +device rdrand_rng # Intel Bull Mountain RNG > > +device ether # Ethernet support > > +device vlan # 802.1Q VLAN support > > +device tun # Packet tunnel. > > +device gif # IPv6 and IPv4 tunneling > > These last three definitely work as modules. (vlan(4) was only recently > added to GENERIC). And many other things as well (like SYSV* for example). I usually go as far as nodevice'ing io and mem, FWIW. That said, if we supply reference MINIMAL, it should *really* be minimal. And it should not be limited to amd64; lest we forget, our primary target should still be i386. ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:21:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EB8B9B3; Thu, 15 Jan 2015 16:21:07 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70C7EA17; Thu, 15 Jan 2015 16:21:07 +0000 (UTC) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0FGKwO0024380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Jan 2015 08:20:59 -0800 Message-ID: <54B7E8EA.1090509@freebsd.org> Date: Thu, 15 Jan 2015 08:20:58 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Warner Losh , Justin Hibbits Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> In-Reply-To: <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Sonic-CAuth: UmFuZG9tSVaUfNc+hTFWMHsdz3byJ7Z1gOFRNkFpEIF/SzlseXvpWYXEp9XP2inW8Gq/2wvtnad6unUFbMGMS6B0rVQscu1lXxwuCtsvyfA= X-Sonic-ID: C;OMVSfdKc5BGnKtmh1eMT4g== M;vBWwfdKc5BGnKtmh1eMT4g== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:21:07 -0000 On 01/14/15 16:07, Warner Losh wrote: >> On Jan 14, 2015, at 8:32 AM, Justin Hibbits wrote: >> >> On Wed, 14 Jan 2015 09:23:05 -0500 >> John Baldwin wrote: >> >>> On 1/14/15 12:41 AM, Warner Losh wrote: >>>> Author: imp >>>> Date: Wed Jan 14 05:41:31 2015 >>>> New Revision: 277163 >>>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>> >>>> Log: >>>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>>> since it's a total crap shoot if things will work. >>> Should we just make it a #error instead? (Some day I hope to have >>> NEW_PCIB enabled by default and remove the old code. Will take a >>> while to get there for the generic PCI code, but cardbus is probably >>> only used on x86 so that would be fine.) >>> >> Also powerpc, but NEW_PCIB is default there as well. > PowerPC doesn’t seem to defined the bus number resources. > > Warner > Which ones? -Nathan From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:27:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1879B65; Thu, 15 Jan 2015 16:27:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA395A63; Thu, 15 Jan 2015 16:27:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FGROE0062460; Thu, 15 Jan 2015 16:27:24 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FGRLY2062439; Thu, 15 Jan 2015 16:27:21 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201501151627.t0FGRLY2062439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 15 Jan 2015 16:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:27:25 -0000 Author: royger Date: Thu Jan 15 16:27:20 2015 New Revision: 277215 URL: https://svnweb.freebsd.org/changeset/base/277215 Log: loader: implement multiboot support for Xen Dom0 Implement a subset of the multiboot specification in order to boot Xen and a FreeBSD Dom0 from the FreeBSD bootloader. This multiboot implementation is tailored to boot Xen and FreeBSD Dom0, and it will most surely fail to boot any other multiboot compilant kernel. In order to detect and boot the Xen microkernel, two new file formats are added to the bootloader, multiboot and multiboot_obj. Multiboot support must be tested before regular ELF support, since Xen is a multiboot kernel that also uses ELF. After a multiboot kernel is detected, all the other loaded kernels/modules are parsed by the multiboot_obj format. The layout of the loaded objects in memory is the following; first the Xen kernel is loaded as a 32bit ELF into memory (Xen will switch to long mode by itself), after that the FreeBSD kernel is loaded as a RAW file (Xen will parse and load it using it's internal ELF loader), and finally the metadata and the modules are loaded using the native FreeBSD way. After everything is loaded we jump into Xen's entry point using a small trampoline. The order of the multiboot modules passed to Xen is the following, the first module is the RAW FreeBSD kernel, and the second module is the metadata and the FreeBSD modules. Since Xen will relocate the memory position of the second multiboot module (the one that contains the metadata and native FreeBSD modules), we need to stash the original modulep address inside of the metadata itself in order to recalculate its position once booted. This also means the metadata must come before the loaded modules, so after loading the FreeBSD kernel a portion of memory is reserved in order to place the metadata before booting. In order to tell the loader to boot Xen and then the FreeBSD kernel the following has to be added to the /boot/loader.conf file: xen_cmdline="dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga" xen_kernel="/boot/xen" The first argument contains the command line that will be passed to the Xen kernel, while the second argument is the path to the Xen kernel itself. This can also be done manually from the loader command line, by for example typing the following set of commands: OK unload OK load /boot/xen dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga OK load kernel OK load zfs OK load if_tap OK load ... OK boot Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D517 For the Forth bits: Submitted by: Julien Grall Added: head/sys/boot/i386/libi386/multiboot.c (contents, props changed) head/sys/boot/i386/libi386/multiboot.h (contents, props changed) head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props changed) Modified: head/sys/amd64/include/metadata.h head/sys/boot/common/bootstrap.h head/sys/boot/common/load_elf.c head/sys/boot/common/load_elf_obj.c head/sys/boot/common/module.c head/sys/boot/fdt/fdt_loader_cmd.c head/sys/boot/forth/beastie.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/support.4th head/sys/boot/i386/libi386/Makefile head/sys/boot/i386/libi386/bootinfo64.c head/sys/boot/i386/libi386/elf64_freebsd.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/conf.c head/sys/i386/include/metadata.h head/sys/x86/xen/pv.c Modified: head/sys/amd64/include/metadata.h ============================================================================== --- head/sys/amd64/include/metadata.h Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/amd64/include/metadata.h Thu Jan 15 16:27:20 2015 (r277215) @@ -34,6 +34,7 @@ #define MODINFOMD_DTBP 0x1003 #define MODINFOMD_EFI_MAP 0x1004 #define MODINFOMD_EFI_FB 0x1005 +#define MODINFOMD_MODULEP 0x1006 struct efi_map_header { size_t memory_size; Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/bootstrap.h Thu Jan 15 16:27:20 2015 (r277215) @@ -232,9 +232,9 @@ int mod_loadkld(const char *name, int void unload(void); struct preloaded_file *file_alloc(void); -struct preloaded_file *file_findfile(char *name, char *type); +struct preloaded_file *file_findfile(const char *name, const char *type); struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); -struct preloaded_file *file_loadraw(char *name, char *type); +struct preloaded_file *file_loadraw(char *name, char *type, int insert); void file_discard(struct preloaded_file *fp); void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); int file_addmodule(struct preloaded_file *fp, char *modname, int version, @@ -258,6 +258,9 @@ int __elfN(obj_loadfile)(char *filename, int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, int reltype, Elf_Addr relbase, Elf_Addr dataaddr, void *data, size_t len); +int __elfN(loadfile_raw)(char *filename, u_int64_t dest, + struct preloaded_file **result, int multiboot); +int __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest); #endif /* Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/load_elf.c Thu Jan 15 16:27:20 2015 (r277215) @@ -76,7 +76,8 @@ static int __elfN(loadimage)(struct prel static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const char* name, Elf_Sym* sym); static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); -static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef); +static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, + u_int64_t p_start, u_int64_t p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -85,6 +86,61 @@ const char *__elfN(moduletype) = "elf mo u_int64_t __elfN(relocation_offset) = 0; +static int +__elfN(load_elf_header)(char *filename, elf_file_t ef) +{ + ssize_t bytes_read; + Elf_Ehdr *ehdr; + int err; + + /* + * Open the image, read and validate the ELF header + */ + if (filename == NULL) /* can't handle nameless */ + return (EFTYPE); + if ((ef->fd = open(filename, O_RDONLY)) == -1) + return (errno); + ef->firstpage = malloc(PAGE_SIZE); + if (ef->firstpage == NULL) { + close(ef->fd); + return (ENOMEM); + } + bytes_read = read(ef->fd, ef->firstpage, PAGE_SIZE); + ef->firstlen = (size_t)bytes_read; + if (bytes_read < 0 || ef->firstlen <= sizeof(Elf_Ehdr)) { + err = EFTYPE; /* could be EIO, but may be small file */ + goto error; + } + ehdr = ef->ehdr = (Elf_Ehdr *)ef->firstpage; + + /* Is it ELF? */ + if (!IS_ELF(*ehdr)) { + err = EFTYPE; + goto error; + } + if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || /* Layout ? */ + ehdr->e_ident[EI_DATA] != ELF_TARG_DATA || + ehdr->e_ident[EI_VERSION] != EV_CURRENT || /* Version ? */ + ehdr->e_version != EV_CURRENT || + ehdr->e_machine != ELF_TARG_MACH) { /* Machine ? */ + err = EFTYPE; + goto error; + } + + return (0); + +error: + if (ef->firstpage != NULL) { + free(ef->firstpage); + ef->firstpage = NULL; + } + if (ef->fd != -1) { + close(ef->fd); + ef->fd = -1; + } + return (err); +} + /* * Attempt to load the file (file) as an ELF module. It will be stored at * (dest), and a pointer to a module structure describing the loaded object @@ -93,56 +149,39 @@ u_int64_t __elfN(relocation_offset) = 0; int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result) { + return (__elfN(loadfile_raw)(filename, dest, result, 0)); +} + +int +__elfN(loadfile_raw)(char *filename, u_int64_t dest, + struct preloaded_file **result, int multiboot) +{ struct preloaded_file *fp, *kfp; struct elf_file ef; Elf_Ehdr *ehdr; int err; - ssize_t bytes_read; fp = NULL; bzero(&ef, sizeof(struct elf_file)); + ef.fd = -1; - /* - * Open the image, read and validate the ELF header - */ - if (filename == NULL) /* can't handle nameless */ - return(EFTYPE); - if ((ef.fd = open(filename, O_RDONLY)) == -1) - return(errno); - ef.firstpage = malloc(PAGE_SIZE); - if (ef.firstpage == NULL) { - close(ef.fd); - return(ENOMEM); - } - bytes_read = read(ef.fd, ef.firstpage, PAGE_SIZE); - ef.firstlen = (size_t)bytes_read; - if (bytes_read < 0 || ef.firstlen <= sizeof(Elf_Ehdr)) { - err = EFTYPE; /* could be EIO, but may be small file */ - goto oerr; - } - ehdr = ef.ehdr = (Elf_Ehdr *)ef.firstpage; - - /* Is it ELF? */ - if (!IS_ELF(*ehdr)) { - err = EFTYPE; - goto oerr; - } - if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || /* Layout ? */ - ehdr->e_ident[EI_DATA] != ELF_TARG_DATA || - ehdr->e_ident[EI_VERSION] != EV_CURRENT || /* Version ? */ - ehdr->e_version != EV_CURRENT || - ehdr->e_machine != ELF_TARG_MACH) { /* Machine ? */ - err = EFTYPE; - goto oerr; - } + err = __elfN(load_elf_header)(filename, &ef); + if (err != 0) + return (err); + ehdr = ef.ehdr; /* * Check to see what sort of module we are. */ - kfp = file_findfile(NULL, NULL); + kfp = file_findfile(NULL, __elfN(kerneltype)); if (ehdr->e_type == ET_DYN) { /* Looks like a kld module */ + if (multiboot != 0) { + printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module as multiboot\n"); + err = EPERM; + goto oerr; + } if (kfp == NULL) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module before kernel\n"); err = EPERM; @@ -193,10 +232,14 @@ __elfN(loadfile)(char *filename, u_int64 err = EPERM; goto out; } - if (ef.kernel) + if (ef.kernel == 1 && multiboot == 0) setenv("kernelname", filename, 1); fp->f_name = strdup(filename); - fp->f_type = strdup(ef.kernel ? __elfN(kerneltype) : __elfN(moduletype)); + if (multiboot == 0) + fp->f_type = strdup(ef.kernel ? + __elfN(kerneltype) : __elfN(moduletype)); + else + fp->f_type = strdup("elf multiboot kernel"); #ifdef ELF_VERBOSE if (ef.kernel) @@ -224,7 +267,8 @@ __elfN(loadfile)(char *filename, u_int64 out: if (ef.firstpage) free(ef.firstpage); - close(ef.fd); + if (ef.fd != -1) + close(ef.fd); return(err); } @@ -255,6 +299,8 @@ __elfN(loadimage)(struct preloaded_file int symtabindex; Elf_Size size; u_int fpcopy; + Elf_Sym sym; + u_int64_t p_start, p_end; dp = NULL; shdr = NULL; @@ -587,7 +633,15 @@ nosyms: COPYOUT(ef->hashtab + 1, &ef->nchains, sizeof(ef->nchains)); ef->buckets = ef->hashtab + 2; ef->chains = ef->buckets + ef->nbuckets; - if (__elfN(parse_modmetadata)(fp, ef) == 0) + + if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) + return 0; + p_start = sym.st_value + ef->off; + if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0) + return ENOENT; + p_end = sym.st_value + ef->off; + + if (__elfN(parse_modmetadata)(fp, ef, p_start, p_end) == 0) goto out; if (ef->kernel) /* kernel must not depend on anything */ @@ -650,7 +704,123 @@ struct mod_metadata32 { #endif int -__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef) +__elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) +{ + struct elf_file ef; + int err, i, j; + Elf_Shdr *sh_meta, *shdr = NULL; + Elf_Shdr *sh_data[2]; + char *shstrtab = NULL; + size_t size; + u_int64_t p_start, p_end; + + bzero(&ef, sizeof(struct elf_file)); + ef.fd = -1; + + err = __elfN(load_elf_header)(fp->f_name, &ef); + if (err != 0) + goto out; + + if (ef.ehdr->e_type == ET_EXEC) { + ef.kernel = 1; + } else if (ef.ehdr->e_type != ET_DYN) { + err = EFTYPE; + goto out; + } + + size = ef.ehdr->e_shnum * ef.ehdr->e_shentsize; + shdr = alloc_pread(ef.fd, ef.ehdr->e_shoff, size); + if (shdr == NULL) { + err = ENOMEM; + goto out; + } + + /* Load shstrtab. */ + shstrtab = alloc_pread(ef.fd, shdr[ef.ehdr->e_shstrndx].sh_offset, + shdr[ef.ehdr->e_shstrndx].sh_size); + if (shstrtab == NULL) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load shstrtab\n"); + err = EFTYPE; + goto out; + } + + /* Find set_modmetadata_set and data sections. */ + sh_data[0] = sh_data[1] = sh_meta = NULL; + for (i = 0, j = 0; i < ef.ehdr->e_shnum; i++) { + if (strcmp(&shstrtab[shdr[i].sh_name], + "set_modmetadata_set") == 0) { + sh_meta = &shdr[i]; + } + if ((strcmp(&shstrtab[shdr[i].sh_name], ".data") == 0) || + (strcmp(&shstrtab[shdr[i].sh_name], ".rodata") == 0)) { + sh_data[j++] = &shdr[i]; + } + } + if (sh_meta == NULL || sh_data[0] == NULL || sh_data[1] == NULL) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to find set_modmetadata_set or data sections\n"); + err = EFTYPE; + goto out; + } + + /* Load set_modmetadata_set into memory */ + err = kern_pread(ef.fd, dest, sh_meta->sh_size, sh_meta->sh_offset); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load set_modmetadata_set: %d\n", err); + goto out; + } + p_start = dest; + p_end = dest + sh_meta->sh_size; + dest += sh_meta->sh_size; + + /* Load data sections into memory. */ + err = kern_pread(ef.fd, dest, sh_data[0]->sh_size, + sh_data[0]->sh_offset); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load data: %d\n", err); + goto out; + } + + /* + * We have to increment the dest, so that the offset is the same into + * both the .rodata and .data sections. + */ + ef.off = -(sh_data[0]->sh_addr - dest); + dest += (sh_data[1]->sh_addr - sh_data[0]->sh_addr); + + err = kern_pread(ef.fd, dest, sh_data[1]->sh_size, + sh_data[1]->sh_offset); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load data: %d\n", err); + goto out; + } + + err = __elfN(parse_modmetadata)(fp, &ef, p_start, p_end); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to parse metadata: %d\n", err); + goto out; + } + +out: + if (shstrtab != NULL) + free(shstrtab); + if (shdr != NULL) + free(shdr); + if (ef.firstpage != NULL) + free(ef.firstpage); + if (ef.fd != -1) + close(ef.fd); + return (err); +} + +int +__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, + u_int64_t p_start, u_int64_t p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 @@ -660,20 +830,13 @@ __elfN(parse_modmetadata)(struct preload #endif struct mod_depend *mdepend; struct mod_version mver; - Elf_Sym sym; char *s; int error, modcnt, minfolen; - Elf_Addr v, p, p_stop; - - if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) - return 0; - p = sym.st_value + ef->off; - if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0) - return ENOENT; - p_stop = sym.st_value + ef->off; + Elf_Addr v, p; modcnt = 0; - while (p < p_stop) { + p = p_start; + while (p < p_end) { COPYOUT(p, &v, sizeof(v)); error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v)); if (error == EOPNOTSUPP) Modified: head/sys/boot/common/load_elf_obj.c ============================================================================== --- head/sys/boot/common/load_elf_obj.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/load_elf_obj.c Thu Jan 15 16:27:20 2015 (r277215) @@ -129,20 +129,13 @@ __elfN(obj_loadfile)(char *filename, u_i goto oerr; } - kfp = file_findfile(NULL, NULL); + kfp = file_findfile(NULL, __elfN(obj_kerneltype)); if (kfp == NULL) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_obj_loadfile: can't load module before kernel\n"); err = EPERM; goto oerr; } - if (strcmp(__elfN(obj_kerneltype), kfp->f_type)) { - printf("elf" __XSTRING(__ELF_WORD_SIZE) - "_obj_loadfile: can't load module with kernel type '%s'\n", - kfp->f_type); - err = EPERM; - goto oerr; - } if (archsw.arch_loadaddr != NULL) dest = archsw.arch_loadaddr(LOAD_ELF, hdr, dest); Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/module.c Thu Jan 15 16:27:20 2015 (r277215) @@ -139,7 +139,7 @@ command_load(int argc, char *argv[]) command_errmsg = "invalid load type"; return(CMD_ERROR); } - return(file_loadraw(argv[1], typestr) ? CMD_OK : CMD_ERROR); + return (file_loadraw(argv[1], typestr, 1) ? CMD_OK : CMD_ERROR); } /* * Do we have explicit KLD load ? @@ -194,7 +194,7 @@ command_load_geli(int argc, char *argv[] argv += (optind - 1); argc -= (optind - 1); sprintf(typestr, "%s:geli_keyfile%d", argv[1], num); - return(file_loadraw(argv[2], typestr) ? CMD_OK : CMD_ERROR); + return (file_loadraw(argv[2], typestr, 1) ? CMD_OK : CMD_ERROR); } void @@ -371,7 +371,7 @@ file_load_dependencies(struct preloaded_ * no arguments or anything. */ struct preloaded_file * -file_loadraw(char *name, char *type) +file_loadraw(char *name, char *type, int insert) { struct preloaded_file *fp; char *cp; @@ -434,7 +434,8 @@ file_loadraw(char *name, char *type) loadaddr = laddr; /* Add to the list of loaded files */ - file_insert_tail(fp); + if (insert != 0) + file_insert_tail(fp); close(fd); return(fp); } @@ -537,7 +538,7 @@ mod_loadkld(const char *kldname, int arg * NULL may be passed as a wildcard to either. */ struct preloaded_file * -file_findfile(char *name, char *type) +file_findfile(const char *name, const char *type) { struct preloaded_file *fp; Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/fdt/fdt_loader_cmd.c Thu Jan 15 16:27:20 2015 (r277215) @@ -261,7 +261,7 @@ fdt_load_dtb_file(const char * filename) oldbfp = file_findfile(NULL, "dtb"); /* Attempt to load and validate a new dtb from a file. */ - if ((bfp = file_loadraw(filename, "dtb")) == NULL) { + if ((bfp = file_loadraw(filename, "dtb", 1)) == NULL) { sprintf(command_errbuf, "failed to load file '%s'", filename); return (1); } Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/forth/beastie.4th Thu Jan 15 16:27:20 2015 (r277215) @@ -251,6 +251,7 @@ variable logoY dup -1 <> if s" YES" compare-insensitive 0= if any_conf_read? if + load_xen_throw load_kernel load_modules then Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/forth/loader.4th Thu Jan 15 16:27:20 2015 (r277215) @@ -143,13 +143,14 @@ include /boot/check-password.4th \ was succesfully loaded! any_conf_read? if s" loader_delay" getenv -1 = if + load_xen_throw load_kernel load_modules else drop ." Loading Kernel and Modules (Ctrl-C to Abort)" cr s" also support-functions" evaluate - s" set delay_command='load_kernel load_modules'" evaluate + s" set delay_command='load_xen_throw load_kernel load_modules'" evaluate s" set delay_showdots" evaluate delay_execute then Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/forth/support.4th Thu Jan 15 16:27:20 2015 (r277215) @@ -1437,6 +1437,20 @@ also builtins abort" Unable to load a kernel!" ; +: load_xen ( -- ) + s" xen_kernel" getenv dup -1 <> if + 1 1 load + else + drop + 0 + then +; + +: load_xen_throw ( -- ) ( throws: abort ) + load_xen + abort" Unable to load Xen!" +; + : set_defaultoptions ( -- ) s" kernel_options" getenv dup -1 = if drop @@ -1555,12 +1569,15 @@ also builtins else drop then - r> if ( a path was passed ) - load_directory_or_file - else - standard_kernel_search + load_xen + ?dup 0= if ( success ) + r> if ( a path was passed ) + load_directory_or_file + else + standard_kernel_search + then + ?dup 0= if ['] load_modules catch then then - ?dup 0= if ['] load_modules catch then ; \ Go back to straight forth vocabulary Modified: head/sys/boot/i386/libi386/Makefile ============================================================================== --- head/sys/boot/i386/libi386/Makefile Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/Makefile Thu Jan 15 16:27:20 2015 (r277215) @@ -6,7 +6,7 @@ INTERNALLIB= SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ - elf64_freebsd.c \ + elf64_freebsd.c multiboot.c multiboot_tramp.S \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c .PATH: ${.CURDIR}/../../zfs @@ -68,6 +68,7 @@ machine: # XXX: clang integrated-as doesn't grok .codeNN directives yet CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS} +CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} .if ${MACHINE_CPUARCH} == "amd64" Modified: head/sys/boot/i386/libi386/bootinfo64.c ============================================================================== --- head/sys/boot/i386/libi386/bootinfo64.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/bootinfo64.c Thu Jan 15 16:27:20 2015 (r277215) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "bootstrap.h" @@ -176,12 +177,12 @@ bi_checkcpu(void) * - Module metadata are formatted and placed in kernel space. */ int -bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp) +bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep, + vm_offset_t *kernendp, int add_smap) { struct preloaded_file *xp, *kfp; struct i386_devdesc *rootdev; struct file_metadata *md; - vm_offset_t addr; u_int64_t kernend; u_int64_t envp; vm_offset_t size; @@ -210,21 +211,18 @@ bi_load64(char *args, vm_offset_t *modul /* Try reading the /etc/fstab file to select the root device */ getrootmount(i386_fmtdev((void *)rootdev)); - /* find the last module in the chain */ - addr = 0; - for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { - if (addr < (xp->f_addr + xp->f_size)) - addr = xp->f_addr + xp->f_size; + if (addr == 0) { + /* find the last module in the chain */ + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { + if (addr < (xp->f_addr + xp->f_size)) + addr = xp->f_addr + xp->f_size; + } } /* pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); - /* copy our environment */ - envp = addr; - addr = bi_copyenv(addr); - - /* pad to a page boundary */ - addr = roundup(addr, PAGE_SIZE); + /* place the metadata before anything */ + *modulep = addr; kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) @@ -235,20 +233,30 @@ bi_load64(char *args, vm_offset_t *modul file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); - bios_addsmapdata(kfp); + file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof modulep, modulep); + if (add_smap != 0) + bios_addsmapdata(kfp); - /* Figure out the size and location of the metadata */ - *modulep = addr; size = bi_copymodules64(0); - kernend = roundup(addr + size, PAGE_SIZE); + + /* copy our environment */ + envp = roundup(addr + size, PAGE_SIZE); + addr = bi_copyenv(envp); + + /* set kernend */ + kernend = roundup(addr, PAGE_SIZE); *kernendp = kernend; /* patch MODINFOMD_KERNEND */ md = file_findmetadata(kfp, MODINFOMD_KERNEND); bcopy(&kernend, md->md_data, sizeof kernend); + /* patch MODINFOMD_ENVP */ + md = file_findmetadata(kfp, MODINFOMD_ENVP); + bcopy(&envp, md->md_data, sizeof envp); + /* copy module list and metadata */ - (void)bi_copymodules64(addr); + (void)bi_copymodules64(*modulep); return(0); } Modified: head/sys/boot/i386/libi386/elf64_freebsd.c ============================================================================== --- head/sys/boot/i386/libi386/elf64_freebsd.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/elf64_freebsd.c Thu Jan 15 16:27:20 2015 (r277215) @@ -81,7 +81,7 @@ elf64_exec(struct preloaded_file *fp) return(EFTYPE); ehdr = (Elf_Ehdr *)&(md->md_data); - err = bi_load64(fp->f_args, &modulep, &kernend); + err = bi_load64(fp->f_args, 0, &modulep, &kernend, 1); if (err != 0) return(err); Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/libi386.h Thu Jan 15 16:27:20 2015 (r277215) @@ -122,7 +122,8 @@ void bi_setboothowto(int howto); vm_offset_t bi_copyenv(vm_offset_t addr); int bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t *modulep, vm_offset_t *kernend); -int bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernend); +int bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep, + vm_offset_t *kernend, int add_smap); char *pxe_default_rc(void); void pxe_enable(void *pxeinfo); Added: head/sys/boot/i386/libi386/multiboot.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/libi386/multiboot.c Thu Jan 15 16:27:20 2015 (r277215) @@ -0,0 +1,418 @@ +/*- + * Copyright (c) 2014 Roger Pau Monné + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This multiboot implementation only implements a subset of the full + * multiboot specification in order to be able to boot Xen and a + * FreeBSD Dom0. Trying to use it to boot other multiboot compliant + * kernels will most surely fail. + * + * The full multiboot specification can be found here: + * http://www.gnu.org/software/grub/manual/multiboot/multiboot.html + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#define _MACHINE_ELF_WANT_32BIT +#include +#include +#include + +#include "bootstrap.h" +#include "multiboot.h" +#include "../i386/libi386/libi386.h" +#include "../i386/btx/lib/btxv86.h" + +#define MULTIBOOT_SUPPORTED_FLAGS \ + (MULTIBOOT_PAGE_ALIGN|MULTIBOOT_MEMORY_INFO) +#define NUM_MODULES 2 +#define METADATA_FIXED_SIZE (PAGE_SIZE*4) +#define METADATA_MODULE_SIZE PAGE_SIZE + +#define METADATA_RESV_SIZE(mod_num) \ + roundup(METADATA_FIXED_SIZE + METADATA_MODULE_SIZE * mod_num, PAGE_SIZE) + +extern int elf32_loadfile_raw(char *filename, u_int64_t dest, + struct preloaded_file **result, int multiboot); +extern int elf64_load_modmetadata(struct preloaded_file *fp, u_int64_t dest); +extern int elf64_obj_loadfile(char *filename, u_int64_t dest, + struct preloaded_file **result); + +static int multiboot_loadfile(char *, u_int64_t, struct preloaded_file **); +static int multiboot_exec(struct preloaded_file *); + +static int multiboot_obj_loadfile(char *, u_int64_t, struct preloaded_file **); +static int multiboot_obj_exec(struct preloaded_file *fp); + +struct file_format multiboot = { multiboot_loadfile, multiboot_exec }; +struct file_format multiboot_obj = + { multiboot_obj_loadfile, multiboot_obj_exec }; + +extern void multiboot_tramp(); + +static const char mbl_name[] = "FreeBSD Loader"; + +static int +num_modules(struct preloaded_file *kfp) +{ + struct kernel_module *kmp; + int mod_num = 0; + + for (kmp = kfp->f_modules; kmp != NULL; kmp = kmp->m_next) + mod_num++; + + return (mod_num); +} + +static vm_offset_t +max_addr(void) +{ + struct preloaded_file *fp; + vm_offset_t addr = 0; + + for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { + if (addr < (fp->f_addr + fp->f_size)) + addr = fp->f_addr + fp->f_size; + } + + return (addr); +} + +static int +multiboot_loadfile(char *filename, u_int64_t dest, + struct preloaded_file **result) +{ + uint32_t *magic; + int i, error; + caddr_t header_search; + ssize_t search_size; + int fd; + struct multiboot_header *header; + char *cmdline; + + /* + * Read MULTIBOOT_SEARCH size in order to search for the + * multiboot magic header. + */ + if (filename == NULL) + return (EFTYPE); + if ((fd = open(filename, O_RDONLY)) == -1) + return (errno); + header_search = malloc(MULTIBOOT_SEARCH); + if (header_search == NULL) { + close(fd); + return (ENOMEM); + } + search_size = read(fd, header_search, MULTIBOOT_SEARCH); + magic = (uint32_t *)header_search; + + header = NULL; + for (i = 0; i < (search_size / sizeof(uint32_t)); i++) { + if (magic[i] == MULTIBOOT_HEADER_MAGIC) { + header = (struct multiboot_header *)&magic[i]; + break; + } + } + + if (header == NULL) { + error = EFTYPE; + goto out; + } + + /* Valid multiboot header has been found, validate checksum */ + if (header->magic + header->flags + header->checksum != 0) { + printf( + "Multiboot checksum failed, magic: 0x%x flags: 0x%x checksum: 0x%x\n", + header->magic, header->flags, header->checksum); + error = EFTYPE; + goto out; + } + + if ((header->flags & ~MULTIBOOT_SUPPORTED_FLAGS) != 0) { + printf("Unsupported multiboot flags found: 0x%x\n", + header->flags); + error = EFTYPE; + goto out; + } + + error = elf32_loadfile_raw(filename, dest, result, 1); + if (error != 0) { + printf( + "elf32_loadfile_raw failed: %d unable to load multiboot kernel\n", + error); + goto out; + } + + /* + * f_addr is already aligned to PAGE_SIZE, make sure + * f_size it's also aligned so when the modules are loaded + * they are aligned to PAGE_SIZE. + */ + (*result)->f_size = roundup((*result)->f_size, PAGE_SIZE); + +out: + free(header_search); + close(fd); + return (error); +} + +static int +multiboot_exec(struct preloaded_file *fp) +{ + vm_offset_t module_start, last_addr, metadata_size; + vm_offset_t modulep, kernend, entry; + struct file_metadata *md; + Elf_Ehdr *ehdr; + struct multiboot_info *mb_info = NULL; + struct multiboot_mod_list *mb_mod = NULL; + char *cmdline = NULL; + size_t len; + int error, mod_num; + + /* + * Don't pass the memory size found by the bootloader, the memory + * available to Dom0 will be lower than that. + */ + unsetenv("smbios.memory.enabled"); + + /* Allocate the multiboot struct and fill the basic details. */ + mb_info = malloc(sizeof(struct multiboot_info)); + if (mb_info == NULL) { + error = ENOMEM; + goto error; + } + bzero(mb_info, sizeof(struct multiboot_info)); + mb_info->flags = MULTIBOOT_INFO_MEMORY|MULTIBOOT_INFO_BOOT_LOADER_NAME; + mb_info->mem_lower = bios_basemem / 1024; + mb_info->mem_upper = bios_extmem / 1024; + mb_info->boot_loader_name = VTOP(mbl_name); + + /* Set the Xen command line. */ + if (fp->f_args == NULL) { + /* Add the Xen command line if it is set. */ + cmdline = getenv("xen_cmdline"); + if (cmdline != NULL) { + fp->f_args = strdup(cmdline); + if (fp->f_args == NULL) { + error = ENOMEM; + goto error; + } + } + } + if (fp->f_args != NULL) { + len = strlen(fp->f_name) + 1 + strlen(fp->f_args) + 1; + cmdline = malloc(len); + if (cmdline == NULL) { + error = ENOMEM; + goto error; + } + snprintf(cmdline, len, "%s %s", fp->f_name, fp->f_args); + mb_info->cmdline = VTOP(cmdline); + mb_info->flags |= MULTIBOOT_INFO_CMDLINE; + } + + /* Find the entry point of the Xen kernel and save it for later */ + if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { + printf("Unable to find %s entry point\n", fp->f_name); + error = EFTYPE; + goto error; + } + ehdr = (Elf_Ehdr *)&(md->md_data); + entry = ehdr->e_entry & 0xffffff; + + /* + * Prepare the multiboot module list, Xen assumes the first + * module is the Dom0 kernel, and the second one is the initramfs. + * This is not optimal for FreeBSD, that doesn't have a initramfs + * but instead loads modules dynamically and creates the metadata + * info on-the-fly. + * + * As expected, the first multiboot module is going to be the + * FreeBSD kernel loaded as a raw file. The second module is going + * to contain the metadata info and the loaded modules. + * + * On native FreeBSD loads all the modules and then places the + * metadata info at the end, but this is painful when running on Xen, + * because it relocates the second multiboot module wherever it + * likes. In order to workaround this limitation the metadata + * information is placed at the start of the second module and + * the original modulep value is saved together with the other + * metadata, so we can relocate everything. + */ + fp = file_findfile(NULL, "elf kernel"); + if (fp == NULL) { + printf("No FreeBSD kernel provided, aborting\n"); + error = EFTYPE; + goto error; + } + mb_mod = malloc(sizeof(struct multiboot_mod_list) * NUM_MODULES); + + /* + * Calculate how much memory is needed for the metatdata. We did + * an approximation of the maximum size when loading the kernel, + * but now we know the exact size, so we can release some of this + * preallocated memory if not needed. + */ + last_addr = roundup(max_addr(), PAGE_SIZE); + mod_num = num_modules(fp); + + /* + * Place the metadata after the last used address in order to + * calculate it's size, this will not be used. + */ + error = bi_load64(fp->f_args, last_addr, &modulep, &kernend, 0); + if (error != 0) { + printf("bi_load64 failed: %d\n", error); + goto error; + } + metadata_size = roundup(kernend - last_addr, PAGE_SIZE); + + /* Check that the size is not greater than what we have reserved */ + if (metadata_size > METADATA_RESV_SIZE(mod_num)) { + printf("Required memory for metadata is greater than reserved " + "space, please increase METADATA_FIXED_SIZE and " + "METADATA_MODULE_SIZE and rebuild the loader\n"); + error = ENOMEM; + goto error; + } + + /* + * This is the position where the second multiboot module + * will be placed. + */ + module_start = fp->f_addr + fp->f_size - metadata_size; + + error = bi_load64(fp->f_args, module_start, &modulep, &kernend, 0); + if (error != 0) { + printf("bi_load64 failed: %d\n", error); + goto error; + } + + mb_mod[0].mod_start = fp->f_addr; + mb_mod[0].mod_end = fp->f_addr + fp->f_size; + mb_mod[0].mod_end -= METADATA_RESV_SIZE(mod_num); + + mb_mod[1].mod_start = module_start; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 17:14:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 657C3A5F; Thu, 15 Jan 2015 17:14:34 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DD3A311C; Thu, 15 Jan 2015 17:14:32 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0FHEUsH044332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Jan 2015 20:14:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0FHEUtH044331; Thu, 15 Jan 2015 20:14:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 15 Jan 2015 20:14:30 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150115171430.GO15484@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7E566.8050601@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sbruno@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 17:14:34 -0000 Hans, On Thu, Jan 15, 2015 at 05:05:58PM +0100, Hans Petter Selasky wrote: H> > Eh, I have not reviewed this at all. (I still plan to though.) H> H> The "Reviewed by" was simply a C&P of the review list in from the H> Differential Revision. When you mention it should probably simply have said: H> H> Reviewed by: sbruno @ H> H> Due to the meaning of "Reviewed by" in commit messages. Sorry. H> H> BTW: Nice if people respond quickly or remove themselves from the H> differential reviews if they don't plan to do any reviews. I'd dare to say that such important change simply cannot be committed with a thorough review from at least two people very confident in this area. Look at r247777. This is the way it should be done. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 17:15:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 344DCBCF; Thu, 15 Jan 2015 17:15:42 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A915E130; Thu, 15 Jan 2015 17:15:41 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0FHFdnP044348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Jan 2015 20:15:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0FHFd5P044347; Thu, 15 Jan 2015 20:15:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 15 Jan 2015 20:15:39 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150115171539.GP15484@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> <20150115171430.GO15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115171430.GO15484@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sbruno@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 17:15:42 -0000 On Thu, Jan 15, 2015 at 08:14:30PM +0300, Gleb Smirnoff wrote: T> I'd dare to say that such important change simply cannot be committed T> with a thorough review from at least two people very confident in this T> area. Of course, I typoed. I meant "cannot be committed withOUT a thorough review". -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 17:23:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 3CE22C4; Thu, 15 Jan 2015 17:23:18 +0000 (UTC) Date: Thu, 15 Jan 2015 17:23:18 +0000 From: Alexey Dokuchaev To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150115172318.GA86401@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7E566.8050601@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sbruno@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 17:23:18 -0000 On Thu, Jan 15, 2015 at 05:05:58PM +0100, Hans Petter Selasky wrote: > The "Reviewed by" was simply a C&P of the review list in from the > Differential Revision. When you mention it should probably simply have said: > > Reviewed by: sbruno @ > > Due to the meaning of "Reviewed by" in commit messages. Sorry. > > BTW: Nice if people respond quickly or remove themselves from the > differential reviews if they don't plan to do any reviews. I think it's kind of wrong. Instead, lack of reviews should be treated as "lack of reviews" (and thus blocking commit), not that "people are not interested". ./danfe P.S. BTW, I still didn't receive your answer on an email I sent Jan 8th. From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 18:42:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1030F25; Thu, 15 Jan 2015 18:42:31 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40971D98; Thu, 15 Jan 2015 18:42:31 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id u14so5309587lbd.12; Thu, 15 Jan 2015 10:42:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=loCVVPThLlA4rOEcKOxqshktWqDQ3UyZYOhbHTZkQhI=; b=esbQJ7y4rn+/uo/9HIWb6VerHq7IR9adkSAKctD+x/JkAqB540tQb2WT++MUuTovjc 2pk+t6Eo14CzwwKke/8graHrCQZdG7Q+1QMkjsCEOBYJcJAFBRS3xmOoO+m28+a8ZiNT iyYxzANWnWUqMsnwwtHuTgevi83yE+VOlGY4Ns+waEOd4h8J1IjansiRCjxsAtd0GFC5 Bo3La2gd0hixyUZhZd5qpcAOW8A/aSGKBI+3YjFtoIxFx/AcP7tBdEJ86wzqIE0/SMmL 5OXK+9b3gwULOUxf0V3eBUwGx+2S3UmcSSW4/eSFftRkTzlLhKqxSs+GyHlNMHu+twHe UZ8g== MIME-Version: 1.0 X-Received: by 10.152.228.164 with SMTP id sj4mr11069065lac.98.1421347349276; Thu, 15 Jan 2015 10:42:29 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.155.4 with HTTP; Thu, 15 Jan 2015 10:42:29 -0800 (PST) In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Thu, 15 Jan 2015 10:42:29 -0800 X-Google-Sender-Auth: j4JUDR-42puHouYHXdU5963KqqY Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Davide Italiano To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , pho@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:42:31 -0000 On Thu, Jan 15, 2015 at 7:32 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 > > Log: > Major callout subsystem cleanup and rewrite: I plan to review this as well -- although I didn't have time for it lately. Probably I'll be able to take a closer look during the weekend. I missed it because I'm terribly late with my backlog and I wasn't listed as reviewer so the mail didn't hit my mailbox. I think this is a huge improvement, for many reason I'll try to outline in my following review. OTOH, considering how complex is the subsystem, I would like you to take a look at Peter's (pho@) stress suite and run on that. He has an handful of scenarios that cause problems in migration an callout in general. Thanks for undertaking this, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 18:47:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FEB92DC; Thu, 15 Jan 2015 18:47:03 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 44D25DE3; Thu, 15 Jan 2015 18:47:03 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F25D925D3891; Thu, 15 Jan 2015 18:46:59 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A71EBC770B8; Thu, 15 Jan 2015 18:46:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 9es7gyyaoQqV; Thu, 15 Jan 2015 18:46:57 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:643d:a68e:f059:c7ef] (unknown [IPv6:fde9:577b:c1a9:4410:643d:a68e:f059:c7ef]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 87A63C7706F; Thu, 15 Jan 2015 18:46:56 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "Bjoern A. Zeeb" In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Thu, 15 Jan 2015 18:46:24 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:47:03 -0000 > On 15 Jan 2015, at 15:32 , Hans Petter Selasky = wrote: >=20 > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 >=20 > Log: > Major callout subsystem cleanup and rewrite: I see this for i386 and amd64 LINT* kernels. Is that a local problem or = did you miss something? linking kernel addr.o: In function `set_timeout': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/addr.c:(.text+0x= d37): undefined reference to `_callout_stop_safe' mad.o: In function `ib_unregister_mad_agent': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x1= ed4): undefined reference to `_callout_stop_safe' mad.o: In function `ib_mad_complete_send_wr': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x3= ea0): undefined reference to `_callout_stop_safe' cm.o: In function `ib_cm_cleanup': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/cm.c:(.text+0x40= cf): undefined reference to `_callout_stop_safe' mad_rmpp.o: In function `ib_cancel_rmpp_recvs': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_rmpp.c:(.tex= t+0xc2): undefined reference to `_callout_stop_safe' = mad_rmpp.o:/scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_r= mpp.c:(.text+0xe9): more undefined references to `_callout_stop_safe' = follow --- kernel --- *** [kernel] Error code 1 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 18:51:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 534526DC; Thu, 15 Jan 2015 18:51:53 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 282F3EDC; Thu, 15 Jan 2015 18:51:53 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2E09AB91F; Thu, 15 Jan 2015 13:51:51 -0500 (EST) Message-ID: <54B80C46.2010409@FreeBSD.org> Date: Thu, 15 Jan 2015 13:51:50 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Nathan Whitehorn , Warner Losh , Justin Hibbits Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> <54B7E8EA.1090509@freebsd.org> In-Reply-To: <54B7E8EA.1090509@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 13:51:51 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:51:53 -0000 On 1/15/15 11:20 AM, Nathan Whitehorn wrote: > > On 01/14/15 16:07, Warner Losh wrote: >>> On Jan 14, 2015, at 8:32 AM, Justin Hibbits >>> wrote: >>> >>> On Wed, 14 Jan 2015 09:23:05 -0500 >>> John Baldwin wrote: >>> >>>> On 1/14/15 12:41 AM, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Wed Jan 14 05:41:31 2015 >>>>> New Revision: 277163 >>>>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>>> >>>>> Log: >>>>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>>>> since it's a total crap shoot if things will work. >>>> Should we just make it a #error instead? (Some day I hope to have >>>> NEW_PCIB enabled by default and remove the old code. Will take a >>>> while to get there for the generic PCI code, but cardbus is probably >>>> only used on x86 so that would be fine.) >>>> >>> Also powerpc, but NEW_PCIB is default there as well. >> PowerPC doesn’t seem to defined the bus number resources. >> >> Warner >> > > Which ones? > -Nathan PCI_RES_BUS. https://svnweb.freebsd.org/base?view=revision&revision=261790 I misspoke about it being in the nexus. On x86 it is done in the ACPI Host-PCI bridge drivers (since those have a _SEG method to know which PCI domain/segment/hose the child bus belongs to). You could conceivably do it higher up at whatever level understands which PCI domain a given Host-PCI bridge lives in. If you only ever support a single PCI domain, you could just place it in the nexus with a hardcoded domain arg of 0 to the pci_domain_*() functions. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 18:53:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19CAD877; Thu, 15 Jan 2015 18:53:44 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E300BEF9; Thu, 15 Jan 2015 18:53:43 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E1F41B91F; Thu, 15 Jan 2015 13:53:42 -0500 (EST) Message-ID: <54B80CB6.5030102@FreeBSD.org> Date: Thu, 15 Jan 2015 13:53:42 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> <20150115171430.GO15484@FreeBSD.org> <20150115171539.GP15484@FreeBSD.org> In-Reply-To: <20150115171539.GP15484@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 13:53:43 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sbruno@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:53:44 -0000 On 1/15/15 12:15 PM, Gleb Smirnoff wrote: > On Thu, Jan 15, 2015 at 08:14:30PM +0300, Gleb Smirnoff wrote: > T> I'd dare to say that such important change simply cannot be committed > T> with a thorough review from at least two people very confident in this > T> area. > > Of course, I typoed. I meant "cannot be committed withOUT a thorough review". There is something to be said for people taking time to review things and not wanting to be held up forever. However, I think it's been a clear practice with all other changes reviewed in phabric to date that the committer only lists people in 'Reviewed by' who actually signed off on the patch, not just the list of people asked to review it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 19:52:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9926A7EB; Thu, 15 Jan 2015 19:52:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 816B8804; Thu, 15 Jan 2015 19:52:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FJqLFX065766; Thu, 15 Jan 2015 19:52:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FJqKYp065759; Thu, 15 Jan 2015 19:52:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501151952.t0FJqKYp065759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 15 Jan 2015 19:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277216 - in head: etc/defaults etc/periodic/daily share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 19:52:21 -0000 Author: gjb Date: Thu Jan 15 19:52:19 2015 New Revision: 277216 URL: https://svnweb.freebsd.org/changeset/base/277216 Log: Evaluate running userland/kernel version in daily periodic(8) run, taken from uname(1) '-U' and '-K' flags. Reviewed by: allanjude, dvl Differential Revision: https://reviews.freebsd.org/D1541 MFC after: 1 week Sponsored by: The FreeBSD Foundation Added: head/etc/periodic/daily/510.status-world-kernel (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Thu Jan 15 16:27:20 2015 (r277215) +++ head/etc/defaults/periodic.conf Thu Jan 15 19:52:19 2015 (r277216) @@ -140,6 +140,10 @@ daily_status_ntpd_enable="NO" # Check daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue +# 510.status-world-kernel +daily_status_world_kernel="YES" # Check the running + # userland/kernel version + # 800.scrub-zfs daily_scrub_zfs_enable="NO" daily_scrub_zfs_pools="" # empty string selects all pools Added: head/etc/periodic/daily/510.status-world-kernel ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/510.status-world-kernel Thu Jan 15 19:52:19 2015 (r277216) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Check that the running userland and kernel versions are in sync. + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_world_kernel" in + [Yy][Ee][Ss]) + rc=0 + _U=$(/usr/bin/uname -U 2>/dev/null) + _K=$(/usr/bin/uname -K 2>/dev/null) + [ -z "${_U}" -o -z "${_K}" ] && exit 0 + echo "" + echo "Checking userland and kernel versions:" + if [ "${_U}" != "${_K}" ]; then + echo "Userland and kernel are not in sync" + echo "Userland version: ${_U}" + echo "Kernel version: ${_K}" + rc=1 + else + echo "Userland and kernel are in sync." + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Thu Jan 15 16:27:20 2015 (r277215) +++ head/etc/periodic/daily/Makefile Thu Jan 15 19:52:19 2015 (r277216) @@ -16,6 +16,7 @@ FILES= 100.clean-disks \ 409.status-gconcat \ 420.status-network \ 450.status-security \ + 510.status-world-kernel \ 999.local # NB: keep these sorted by MK_* knobs Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Thu Jan 15 16:27:20 2015 (r277215) +++ head/share/man/man5/periodic.conf.5 Thu Jan 15 19:52:19 2015 (r277216) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd January 15, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -498,6 +498,11 @@ for yesterday's mail rejects. Set to .Dq Li YES if you want to enable NTP status check. +.It Va daily_status_world_kernel +.Pq Vt bool +Set to +.Dq Li YES +to check the running userland and kernel are in sync. .It Va daily_queuerun_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 20:05:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BFB8CA6; Thu, 15 Jan 2015 20:05:21 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E45C907; Thu, 15 Jan 2015 20:05:21 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0FK5E2d017789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Jan 2015 12:05:14 -0800 Message-ID: <54B81D7A.6080502@freebsd.org> Date: Thu, 15 Jan 2015 12:05:14 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin , Warner Losh , Justin Hibbits Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> <54B7E8EA.1090509@freebsd.org> <54B80C46.2010409@FreeBSD.org> In-Reply-To: <54B80C46.2010409@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Sonic-CAuth: UmFuZG9tSVbFCVIlO5tU16luEPxvTpCUMK7Y9y8Lhe7GjHSgKfRjQby/OfAAdup1oKCU5LiY6IQMlb2SopopVMvsWZ+6d2sigeyXgJVEWTk= X-Sonic-ID: C;mEmW0fGc5BGum9mh1eMT4g== M;1iXR0fGc5BGum9mh1eMT4g== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 20:05:21 -0000 On 01/15/15 10:51, John Baldwin wrote: > On 1/15/15 11:20 AM, Nathan Whitehorn wrote: >> On 01/14/15 16:07, Warner Losh wrote: >>>> On Jan 14, 2015, at 8:32 AM, Justin Hibbits >>>> wrote: >>>> >>>> On Wed, 14 Jan 2015 09:23:05 -0500 >>>> John Baldwin wrote: >>>> >>>>> On 1/14/15 12:41 AM, Warner Losh wrote: >>>>>> Author: imp >>>>>> Date: Wed Jan 14 05:41:31 2015 >>>>>> New Revision: 277163 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>>>> >>>>>> Log: >>>>>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>>>>> since it's a total crap shoot if things will work. >>>>> Should we just make it a #error instead? (Some day I hope to have >>>>> NEW_PCIB enabled by default and remove the old code. Will take a >>>>> while to get there for the generic PCI code, but cardbus is probably >>>>> only used on x86 so that would be fine.) >>>>> >>>> Also powerpc, but NEW_PCIB is default there as well. >>> PowerPC doesn’t seem to defined the bus number resources. >>> >>> Warner >>> >> Which ones? >> -Nathan > PCI_RES_BUS. > > https://svnweb.freebsd.org/base?view=revision&revision=261790 > > I misspoke about it being in the nexus. On x86 it is done in the ACPI > Host-PCI bridge drivers (since those have a _SEG method to know which > PCI domain/segment/hose the child bus belongs to). You could > conceivably do it higher up at whatever level understands which PCI > domain a given Host-PCI bridge lives in. > > If you only ever support a single PCI domain, you could just place it in > the nexus with a hardcoded domain arg of 0 to the pci_domain_*() functions. > Most PPC systems have at least two and usually more PCI domains. I'll take a look at adding this. -Nathan From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 21:13:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44D1DBB4; Thu, 15 Jan 2015 21:13:13 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 010D3FA3; Thu, 15 Jan 2015 21:13:12 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 48AA81FE023; Thu, 15 Jan 2015 22:13:09 +0100 (CET) Message-ID: <54B82D94.5090904@selasky.org> Date: Thu, 15 Jan 2015 22:13:56 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:13:13 -0000 On 01/15/15 19:46, Bjoern A. Zeeb wrote: > >> On 15 Jan 2015, at 15:32 , Hans Petter Selasky wrote: >> >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> >> Log: >> Major callout subsystem cleanup and rewrite: > > > I see this for i386 and amd64 LINT* kernels. Is that a local problem or did you miss something? > > linking kernel > addr.o: In function `set_timeout': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/addr.c:(.text+0xd37): undefined reference to `_callout_stop_safe' > mad.o: In function `ib_unregister_mad_agent': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x1ed4): undefined reference to `_callout_stop_safe' > mad.o: In function `ib_mad_complete_send_wr': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x3ea0): undefined reference to `_callout_stop_safe' > cm.o: In function `ib_cm_cleanup': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/cm.c:(.text+0x40cf): undefined reference to `_callout_stop_safe' > mad_rmpp.o: In function `ib_cancel_rmpp_recvs': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_rmpp.c:(.text+0xc2): undefined reference to `_callout_stop_safe' > mad_rmpp.o:/scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_rmpp.c:(.text+0xe9): more undefined references to `_callout_stop_safe' follow > --- kernel --- > *** [kernel] Error code 1 > Hi, I think this is a local problem at your side. I get at r277215: > --- kernel --- > linking kernel > objcopy --strip-debug kernel > text data bss dec hex filename > 28873399 10373165 1857376 41103940 0x2733244 kernel > -------------------------------------------------------------- >>>> Kernel build for LINT completed on Thu Jan 15 23:07:58 IST 2015 > -------------------------------------------------------------- When running: > make -m $PWD/share/mk buildkernel WITH_OFED=YES TARGET_ARCH=i386 KERNCONF=LINT --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 21:17:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9268BD7A; Thu, 15 Jan 2015 21:17:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BCACFDB; Thu, 15 Jan 2015 21:17:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FLHfqK004415; Thu, 15 Jan 2015 21:17:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FLHb8l004391; Thu, 15 Jan 2015 21:17:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501152117.t0FLHb8l004391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 15 Jan 2015 21:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277217 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:17:41 -0000 Author: dim Date: Thu Jan 15 21:17:36 2015 New Revision: 277217 URL: https://svnweb.freebsd.org/changeset/base/277217 Log: Import libc++ trunk r224926. This fixes a number of bugs, completes C++14 support[1], adds more C++1z features[2], and fixes the following LWG issues[3]: 1450: Contradiction in regex_constants 2003: String exception inconsistency in erase. 2075: Progress guarantees, lock-free property, and scheduling assumptions 2104: unique_lock move-assignment should not be noexcept 2112: User-defined classes that cannot be derived from 2132: std::function ambiguity 2135: Unclear requirement for exceptions thrown in condition_variable::wait() 2142: packaged_task::operator() synchronization too broad? 2182: Container::[const_]reference types are misleadingly specified 2186: Incomplete action on async/launch::deferred 2188: Reverse iterator does not fully support targets that overload operator& 2193: Default constructors for standard library containers are explicit 2205: Problematic postconditions of regex_match and regex_search 2213: Return value of std::regex_replace 2240: Probable misuse of term "function scope" in [thread.condition] 2252: Strong guarantee on vector::push_back() still broken with C++11? 2257: Simplify container requirements with the new algorithms 2258: a.erase(q1, q2) unable to directly return q2 2263: Comparing iterators and allocator pointers with different const-character 2268: Setting a default argument in the declaration of a member function assign of std::basic_string 2271: regex_traits::lookup_classname specification unclear 2272: quoted should use char_traits::eq for character comparison 2278: User-defined literals for Standard Library types 2280: begin / end for arrays should be constexpr and noexcept 2285: make_reverse_iterator 2288: Inconsistent requirements for shared mutexes 2291: std::hash is vulnerable to collision DoS attack 2293: Wrong facet used by num_put::do_put 2299: Effects of inaccessible key_compare::is_transparent type are not clear 2301: Why is std::tie not constexpr? 2304: Complexity of count in unordered associative containers 2306: match_results::reference should be value_type&, not const value_type& 2308: Clarify container destructor requirements w.r.t. std::array 2313: tuple_size should always derive from integral_constant 2314: apply() should return decltype(auto) and use decay_t before tuple_size 2315: weak_ptr should be movable 2316: weak_ptr::lock() should be atomic 2317: The type property queries should be UnaryTypeTraits returning size_t 2320: select_on_container_copy_construction() takes allocators, not containers 2322: Associative(initializer_list, stuff) constructors are underspecified 2323: vector::resize(n, t)'s specification should be simplified 2324: Insert iterator constructors should use addressof() 2329: regex_match()/regex_search() with match_results should forbid temporary strings 2330: regex("meow", regex::icase) is technically forbidden but should be permitted 2332: regex_iterator/regex_token_iterator should forbid temporary regexes 2339: Wording issue in nth_element 2341: Inconsistency between basic_ostream::seekp(pos) and basic_ostream::seekp(off, dir) 2344: quoted()'s interaction with padding is unclear 2346: integral_constant's member functions should be marked noexcept 2350: min, max, and minmax should be constexpr 2356: Stability of erasure in unordered associative containers 2357: Remaining "Assignable" requirement 2359: How does regex_constants::nosubs affect basic_regex::mark_count()? 2360: reverse_iterator::operator*() is unimplementable [1] http://libcxx.llvm.org/cxx1y_status.html [2] http://libcxx.llvm.org/cxx1z_status.html [3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html Exp-run: antoine MFC after: 1 month Added: head/contrib/libc++/include/__refstring - copied unchanged from r276792, vendor/libc++/dist/include/__refstring head/contrib/libc++/include/experimental/__config - copied unchanged from r276792, vendor/libc++/dist/include/experimental/__config head/contrib/libc++/include/experimental/string_view - copied unchanged from r276792, vendor/libc++/dist/include/experimental/string_view head/contrib/libc++/include/experimental/type_traits - copied unchanged from r276792, vendor/libc++/dist/include/experimental/type_traits head/contrib/libc++/include/experimental/utility - copied unchanged from r276792, vendor/libc++/dist/include/experimental/utility head/contrib/libc++/include/module.modulemap - copied unchanged from r276792, vendor/libc++/dist/include/module.modulemap Modified: head/contrib/libc++/CREDITS.TXT head/contrib/libc++/LICENSE.TXT head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config head/contrib/libc++/include/__debug head/contrib/libc++/include/__functional_03 head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__functional_base_03 head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__sso_allocator head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/algorithm head/contrib/libc++/include/atomic head/contrib/libc++/include/bitset head/contrib/libc++/include/chrono head/contrib/libc++/include/cmath head/contrib/libc++/include/condition_variable head/contrib/libc++/include/cstddef head/contrib/libc++/include/deque head/contrib/libc++/include/experimental/dynarray head/contrib/libc++/include/experimental/optional head/contrib/libc++/include/ext/__hash head/contrib/libc++/include/ext/hash_map head/contrib/libc++/include/forward_list head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/iomanip head/contrib/libc++/include/ios head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/limits head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/mutex head/contrib/libc++/include/new head/contrib/libc++/include/numeric head/contrib/libc++/include/ostream head/contrib/libc++/include/random head/contrib/libc++/include/regex head/contrib/libc++/include/set head/contrib/libc++/include/shared_mutex head/contrib/libc++/include/sstream head/contrib/libc++/include/stdexcept head/contrib/libc++/include/string head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/typeinfo head/contrib/libc++/include/unordered_map head/contrib/libc++/include/unordered_set head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/algorithm.cpp head/contrib/libc++/src/chrono.cpp head/contrib/libc++/src/condition_variable.cpp head/contrib/libc++/src/debug.cpp head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/future.cpp head/contrib/libc++/src/hash.cpp head/contrib/libc++/src/ios.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/new.cpp head/contrib/libc++/src/optional.cpp head/contrib/libc++/src/random.cpp head/contrib/libc++/src/regex.cpp head/contrib/libc++/src/shared_mutex.cpp head/contrib/libc++/src/stdexcept.cpp head/contrib/libc++/src/string.cpp head/contrib/libc++/src/strstream.cpp head/contrib/libc++/src/system_error.cpp head/contrib/libc++/src/thread.cpp head/contrib/libc++/src/valarray.cpp head/lib/libc++/Makefile Directory Properties: head/contrib/libc++/ (props changed) Modified: head/contrib/libc++/CREDITS.TXT ============================================================================== --- head/contrib/libc++/CREDITS.TXT Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/CREDITS.TXT Thu Jan 15 21:17:36 2015 (r277217) @@ -33,6 +33,10 @@ E: mclow.lists@gmail.com E: marshall@idio.com D: C++14 support, patches and bug fixes. +N: Eric Fiselier +E: eric@efcs.ca +D: LFTS support, patches and bug fixes. + N: Bill Fisher E: william.w.fisher@gmail.com D: Regex bug fixes. Modified: head/contrib/libc++/LICENSE.TXT ============================================================================== --- head/contrib/libc++/LICENSE.TXT Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/LICENSE.TXT Thu Jan 15 21:17:36 2015 (r277217) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: head/contrib/libc++/include/__bit_reference ============================================================================== --- head/contrib/libc++/include/__bit_reference Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__bit_reference Thu Jan 15 21:17:36 2015 (r277217) @@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _Is if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _I if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { - return _VSTD::copy(__first, __last, __result); + return _VSTD::copy_backward(__first, __last, __result); } // swap_ranges Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__config Thu Jan 15 21:17:36 2015 (r277217) @@ -19,6 +19,11 @@ #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) #endif +#if !_WIN32 +#include +#include // for ELAST on FreeBSD +#endif + #define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -106,6 +111,13 @@ # endif #endif // __sun__ +#if defined(__native_client__) + // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access, + // including accesses to the special files under /dev. C++11's + // std::random_device is instead exposed through a NaCl syscall. +# define _LIBCPP_USING_NACL_RANDOM +#endif // defined(__native_client__) + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -194,7 +206,7 @@ #endif #ifndef _LIBCPP_EXCEPTION_ABI -#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS +#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) #endif #ifndef _LIBCPP_ALWAYS_INLINE @@ -203,6 +215,11 @@ #if defined(__clang__) +#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ + !defined(__arm__) +#define _LIBCPP_ALTERNATE_STRING_LAYOUT +#endif + #if __has_feature(cxx_alignas) # define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) @@ -215,14 +232,10 @@ #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #endif -#ifndef __GXX_EXPERIMENTAL_CXX0X__ -#ifdef __linux__ -#define _LIBCPP_HAS_NO_UNICODE_CHARS -#else +#if __cplusplus < 201103L typedef __char16_t char16_t; typedef __char32_t char32_t; #endif -#endif #if !(__has_feature(cxx_exceptions)) #define _LIBCPP_NO_EXCEPTIONS @@ -246,6 +259,8 @@ typedef __char32_t char32_t; # define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif +#define _LIBCPP_UNUSED __attribute__((__unused__)) + #if !(__has_feature(cxx_defaulted_functions)) #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #endif // !(__has_feature(cxx_defaulted_functions)) @@ -308,10 +323,16 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif +#if !(__has_feature(cxx_relaxed_constexpr)) +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR +#endif + #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #if defined(__FreeBSD__) #define _LIBCPP_HAS_QUICK_EXIT #define _LIBCPP_HAS_C11_FEATURES +#elif defined(__ANDROID__) +#define _LIBCPP_HAS_QUICK_EXIT #elif defined(__linux__) #include #if __GLIBC_PREREQ(2, 15) @@ -326,13 +347,19 @@ typedef __char32_t char32_t; #if (__has_feature(cxx_noexcept)) # define _NOEXCEPT noexcept # define _NOEXCEPT_(x) noexcept(x) +# define _NOEXCEPT_OR_FALSE(x) noexcept(x) #else # define _NOEXCEPT throw() # define _NOEXCEPT_(x) +# define _NOEXCEPT_OR_FALSE(x) false #endif #if __has_feature(underlying_type) -# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T) +# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#endif + +#if __has_feature(is_literal) +# define _LIBCPP_IS_LITERAL(T) __is_literal(T) #endif // Inline namespaces are available in Clang regardless of C++ dialect. @@ -345,6 +372,10 @@ namespace std { } } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -352,15 +383,33 @@ namespace std { #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED __attribute__((__unused__)) + +#if _GNUC_VER >= 407 +#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) +#endif + #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS #endif #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES + +// constexpr was added to GCC in 4.6. +#if _GNUC_VER < 406 +#define _LIBCPP_HAS_NO_CONSTEXPR +// Can only use constexpr in c++11 mode. +#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L #define _LIBCPP_HAS_NO_CONSTEXPR +#endif + +// No version of GCC supports relaxed constexpr rules +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #ifndef __GXX_EXPERIMENTAL_CXX0X__ @@ -390,9 +439,7 @@ namespace std { #endif #if _GNUC_VER < 404 -#define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS @@ -403,6 +450,11 @@ namespace std { #define _LIBCPP_HAS_NO_NULLPTR #endif +#if _GNUC_VER < 407 +#define _LIBCPP_HAS_NO_ADVANCED_SFINAE +#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS +#endif + #endif // __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { @@ -415,21 +467,28 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(_LIBCPP_MSVC) #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER #define _LIBCPP_HAS_NO_CONSTEXPR +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) +#define _LIBCPP_UNUSED #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS -#define _NOEXCEPT throw() +#define _NOEXCEPT throw () #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } @@ -439,15 +498,19 @@ using namespace _LIBCPP_NAMESPACE __attr namespace std { } +#define _LIBCPP_HAS_NO_ASAN + #elif defined(__IBMCPP__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) #define _ATTRIBUTE(x) __attribute__((x)) #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -455,7 +518,6 @@ namespace std { #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #define _LIBCPP_HAS_NO_NULLPTR #define _LIBCPP_HAS_NO_UNICODE_CHARS -#define _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_HAS_IS_BASE_OF #if defined(_AIX) @@ -471,13 +533,19 @@ namespace std { } } -#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__ +#define _LIBCPP_HAS_NO_ASAN + +#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; typedef unsigned int char32_t; #endif // _LIBCPP_HAS_NO_UNICODE_CHARS +#ifndef __SIZEOF_INT128__ +#define _LIBCPP_HAS_NO_INT128 +#endif + #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT template struct __static_assert_test; @@ -515,12 +583,20 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __has_feature(cxx_explicit_conversions) +#ifndef __has_builtin +#define __has_builtin(__x) 0 +#endif + +#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) # define _LIBCPP_EXPLICIT explicit #else # define _LIBCPP_EXPLICIT #endif +#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) +# define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE +#endif + #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ @@ -546,16 +622,21 @@ template struct __static_asse #endif #ifndef _LIBCPP_EXTERN_TEMPLATE -#define _LIBCPP_EXTERN_TEMPLATE(...) +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; #endif #ifndef _LIBCPP_EXTERN_TEMPLATE2 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; #endif +#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) +#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63) +#endif + #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__) #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif + #ifdef __FreeBSD__ #define _DECLARE_C99_LDBL_MATH 1 #endif @@ -568,21 +649,39 @@ template struct __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif -#if defined(__APPLE__) || defined(__FreeBSD__) -#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 -#endif +#if defined(ELAST) +#define _LIBCPP_ELAST ELAST +#elif defined(__linux__) +#define _LIBCPP_ELAST 4095 +#elif defined(_NEWLIB_VERSION) +#define _LIBCPP_ELAST __ELASTERROR +#elif defined(__APPLE__) +// Not _LIBCPP_ELAST needed on Apple +#elif defined(__sun__) +#define _LIBCPP_ELAST ESTALE +#else +// Warn here so that the person doing the libcxx port has an easier time: +#warning This platform's ELAST hasn't been ported yet #endif #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# if defined(__FreeBSD__) +// Making the std::pair copy constructor trivial breaks ABI compatibility with +// earlier versions of libc++ shipped by FreeBSD, so turn it off by default. +// See also http://svnweb.freebsd.org/changeset/base/261801 +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 +# else +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# endif #endif #ifndef _LIBCPP_STD_VER # if __cplusplus <= 201103L # define _LIBCPP_STD_VER 11 +# elif __cplusplus <= 201402L +# define _LIBCPP_STD_VER 14 # else -# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification +# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification # endif #endif // _LIBCPP_STD_VER @@ -593,21 +692,30 @@ template struct __static_asse #endif #if _LIBCPP_STD_VER <= 11 -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 #define _LIBCPP_EXPLICIT_AFTER_CXX11 #define _LIBCPP_DEPRECATED_AFTER_CXX11 #else -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] #endif +#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr +#else +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 +#endif + +#ifndef _LIBCPP_HAS_NO_ASAN +extern "C" void __sanitizer_annotate_contiguous_container( + const void *, const void *, const void *, const void *); +#endif + // Try to find out if RTTI is disabled. // g++ and cl.exe have RTTI on by default and define a macro when it is. // g++ only defines the macro in 4.3.2 and onwards. #if !defined(_LIBCPP_NO_RTTI) -# if defined(__GNUG__) && (__GNUC__ >= 4 && \ - (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI) +# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \ + (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI) # define _LIBCPP_NO_RTTI # elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI) # define _LIBCPP_NO_RTTI @@ -618,4 +726,9 @@ template struct __static_asse # define _LIBCPP_WEAK __attribute__((__weak__)) #endif +#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS) +# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \ + _LIBCPP_HAS_NO_THREADS is defined. +#endif + #endif // _LIBCPP_CONFIG Modified: head/contrib/libc++/include/__debug ============================================================================== --- head/contrib/libc++/include/__debug Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__debug Thu Jan 15 21:17:36 2015 (r277217) @@ -11,19 +11,23 @@ #ifndef _LIBCPP_DEBUG_H #define _LIBCPP_DEBUG_H +#include <__config> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #if _LIBCPP_DEBUG_LEVEL >= 1 - # include # include # include # ifndef _LIBCPP_ASSERT # define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort())) # endif +#endif +#ifndef _LIBCPP_ASSERT +# define _LIBCPP_ASSERT(x, m) ((void)0) #endif #if _LIBCPP_DEBUG_LEVEL >= 2 Modified: head/contrib/libc++/include/__functional_03 ============================================================================== --- head/contrib/libc++/include/__functional_03 Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__functional_03 Thu Jan 15 21:17:36 2015 (r277217) @@ -651,9 +651,14 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp __base* __f_; template + _LIBCPP_INLINE_VISIBILITY static bool __not_null(const _Fp&) {return true;} template - static bool __not_null(const function<_Rp()>& __p) {return __p;} + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(_R2 (*__p)()) {return __p;} + template + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(const function<_R2()>& __p) {return __p;} public: typedef _Rp result_type; @@ -955,7 +960,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1257,7 +1262,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1558,7 +1563,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1911,7 +1916,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1::type __mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>) { - __ti(_VSTD::forward::type>(get<_Indx>(__uj))...); + __ti(_VSTD::forward::type>(_VSTD::get<_Indx>(__uj))...); } template @@ -1947,9 +1952,9 @@ __mu(_Ti&, _Uj& __uj) { const size_t _Indx = is_placeholder<_Ti>::value - 1; // compiler bug workaround - typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj); + typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj); return __t; -// return _VSTD::forward::type>(get<_Indx>(__uj)); +// return _VSTD::forward::type>(_VSTD::get<_Indx>(__uj)); } template @@ -2040,7 +2045,7 @@ typename __bind_return<_Fp, _BoundArgs, __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _Args&& __args) { - return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); + return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...); } template Modified: head/contrib/libc++/include/__functional_base ============================================================================== --- head/contrib/libc++/include/__functional_base Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__functional_base Thu Jan 15 21:17:36 2015 (r277217) @@ -451,10 +451,10 @@ public: } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/libc++/include/__functional_base_03 ============================================================================== --- head/contrib/libc++/include/__functional_base_03 Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__functional_base_03 Thu Jan 15 21:17:36 2015 (r277217) @@ -1027,7 +1027,7 @@ public: typename __invoke_return0::type operator() (_A0& __a0) const { - return __invoke(get(), __a0); + return __invoke(get(), __a0); } template @@ -1035,7 +1035,7 @@ public: typename __invoke_return1::type operator() (_A0& __a0, _A1& __a1) const { - return __invoke(get(), __a0, __a1); + return __invoke(get(), __a0, __a1); } template @@ -1043,14 +1043,14 @@ public: typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { - return __invoke(get(), __a0, __a1, __a2); + return __invoke(get(), __a0, __a1, __a2); } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/libc++/include/__hash_table ============================================================================== --- head/contrib/libc++/include/__hash_table Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__hash_table Thu Jan 15 21:17:36 2015 (r277217) @@ -20,11 +20,7 @@ #include <__undef_min_max> -#ifdef _LIBCPP_DEBUG -# include <__debug> -#else -# define _LIBCPP_ASSERT(x, m) ((void)0) -#endif +#include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header Modified: head/contrib/libc++/include/__locale ============================================================================== --- head/contrib/libc++/include/__locale Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__locale Thu Jan 15 21:17:36 2015 (r277217) @@ -21,11 +21,22 @@ #include #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) # include -#elif _AIX +#elif defined(_AIX) # include -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) +#elif defined(__ANDROID__) +// Android gained the locale aware functions in L (API level 21) +# include +# if __ANDROID_API__ <= 20 +# include +# endif +#elif defined(__sun__) +# include +#elif defined(_NEWLIB_VERSION) +# include +#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) # include -#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ +#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -341,13 +352,15 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__) #ifdef __APPLE__ typedef __uint32_t mask; #elif defined(__FreeBSD__) typedef unsigned long mask; #elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) typedef unsigned short mask; +#elif defined(__ANDROID__) + typedef unsigned char mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; @@ -357,7 +370,12 @@ public: static const mask alpha = _CTYPE_A; static const mask digit = _CTYPE_D; static const mask punct = _CTYPE_P; +# if defined(__ANDROID__) + static const mask xdigit = _CTYPE_X | _CTYPE_D; +# else static const mask xdigit = _CTYPE_X; +# endif + # if defined(__NetBSD__) static const mask blank = _CTYPE_BL; # else Modified: head/contrib/libc++/include/__mutex_base ============================================================================== --- head/contrib/libc++/include/__mutex_base Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__mutex_base Thu Jan 15 21:17:36 2015 (r277217) @@ -22,6 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#ifndef _LIBCPP_HAS_NO_THREADS + class _LIBCPP_TYPE_VIS mutex { pthread_mutex_t __m_; @@ -254,19 +256,13 @@ void swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT {__x.swap(__y);} -struct _LIBCPP_TYPE_VIS cv_status +//enum class cv_status +_LIBCPP_DECLARE_STRONG_ENUM(cv_status) { - enum __lx { - no_timeout, - timeout - }; - - __lx __v_; - - _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {} - _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} - + no_timeout, + timeout }; +_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status) class _LIBCPP_TYPE_VIS condition_variable { @@ -288,7 +284,7 @@ public: void notify_one() _NOEXCEPT; void notify_all() _NOEXCEPT; - void wait(unique_lock& __lk); + void wait(unique_lock& __lk) _NOEXCEPT; template void wait(unique_lock& __lk, _Predicate __pred); @@ -319,8 +315,9 @@ public: private: void __do_timed_wait(unique_lock& __lk, - chrono::time_point); + chrono::time_point) _NOEXCEPT; }; +#endif // !_LIBCPP_HAS_NO_THREADS template inline _LIBCPP_INLINE_VISIBILITY @@ -338,6 +335,7 @@ __ceil(chrono::duration<_Rep, _Period> _ return __r; } +#ifndef _LIBCPP_HAS_NO_THREADS template void condition_variable::wait(unique_lock& __lk, _Predicate __pred) @@ -402,6 +400,8 @@ condition_variable::wait_for(unique_lock _VSTD::move(__pred)); } +#endif // !_LIBCPP_HAS_NO_THREADS + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___MUTEX_BASE Copied: head/contrib/libc++/include/__refstring (from r276792, vendor/libc++/dist/include/__refstring) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libc++/include/__refstring Thu Jan 15 21:17:36 2015 (r277217, copy of r276792, vendor/libc++/dist/include/__refstring) @@ -0,0 +1,139 @@ +//===------------------------ __refstring ---------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___REFSTRING +#define _LIBCPP___REFSTRING + +#include <__config> +#include +#include +#if __APPLE__ +#include +#include +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +class _LIBCPP_HIDDEN __libcpp_refstring +{ +private: + const char* str_; + + typedef int count_t; + + struct _Rep_base + { + std::size_t len; + std::size_t cap; + count_t count; + }; + + static + _Rep_base* + rep_from_data(const char *data_) _NOEXCEPT + { + char *data = const_cast(data_); + return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base)); + } + static + char * + data_from_rep(_Rep_base *rep) _NOEXCEPT + { + char *data = reinterpret_cast(rep); + return data + sizeof(*rep); + } + +#if __APPLE__ + static + const char* + compute_gcc_empty_string_storage() _NOEXCEPT + { + void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); + if (handle == nullptr) + return nullptr; + void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE"); + if (sym == nullptr) + return nullptr; + return data_from_rep(reinterpret_cast<_Rep_base *>(sym)); + } + + static + const char* + get_gcc_empty_string_storage() _NOEXCEPT + { + static const char* p = compute_gcc_empty_string_storage(); + return p; + } + + bool + uses_refcount() const + { + return str_ != get_gcc_empty_string_storage(); + } +#else + bool + uses_refcount() const + { + return true; + } +#endif + +public: + explicit __libcpp_refstring(const char* msg) { + std::size_t len = strlen(msg); + _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1)); + rep->len = len; + rep->cap = len; + rep->count = 0; + char *data = data_from_rep(rep); + std::memcpy(data, msg, len + 1); + str_ = data; + } + + __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_) + { + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + } + + __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT + { + bool adjust_old_count = uses_refcount(); + struct _Rep_base *old_rep = rep_from_data(str_); + str_ = s.str_; + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + if (adjust_old_count) + { + if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0) + { + ::operator delete(old_rep); + } + } + return *this; + } + + ~__libcpp_refstring() + { + if (uses_refcount()) + { + _Rep_base* rep = rep_from_data(str_); + if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0) + { + ::operator delete(rep); + } + } + } + + const char* c_str() const _NOEXCEPT {return str_;} +}; + +_LIBCPP_END_NAMESPACE_STD + +#endif //_LIBCPP___REFSTRING Modified: head/contrib/libc++/include/__sso_allocator ============================================================================== --- head/contrib/libc++/include/__sso_allocator Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__sso_allocator Thu Jan 15 21:17:36 2015 (r277217) @@ -55,14 +55,14 @@ public: __allocated_ = true; return (pointer)&buf_; } - return static_cast(::operator new(__n * sizeof(_Tp))); + return static_cast(_VSTD::__allocate(__n * sizeof(_Tp))); } _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) { if (__p == (pointer)&buf_) __allocated_ = false; else - ::operator delete(__p); + _VSTD::__deallocate(__p); } _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} Modified: head/contrib/libc++/include/__tree ============================================================================== --- head/contrib/libc++/include/__tree Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__tree Thu Jan 15 21:17:36 2015 (r277217) @@ -1980,9 +1980,9 @@ __tree<_Tp, _Compare, _Allocator>::erase __begin_node() = __r.__ptr_; --size(); __node_allocator& __na = __node_alloc(); - __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __tree_remove(__end_node()->__left_, static_cast<__node_base_pointer>(__np)); + __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __node_traits::deallocate(__na, __np, 1); return __r; } Modified: head/contrib/libc++/include/__tuple ============================================================================== --- head/contrib/libc++/include/__tuple Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__tuple Thu Jan 15 21:17:36 2015 (r277217) @@ -27,6 +27,32 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// __lazy_and + +template +struct __lazy_and_impl; + +template +struct __lazy_and_impl : false_type {}; + +template <> +struct __lazy_and_impl : true_type {}; + +template +struct __lazy_and_impl : integral_constant {}; + +template +struct __lazy_and_impl : __lazy_and_impl<_Hp::type::value, _Tp...> {}; + +template +struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {}; + +// __lazy_not + +template +struct __lazy_not : integral_constant {}; + + template class _LIBCPP_TYPE_VIS_ONLY tuple_size; template @@ -219,19 +245,30 @@ struct __make_tuple_types // __tuple_convertible -template +template struct __tuple_convertible_imp : public false_type {}; template -struct __tuple_convertible_imp, __tuple_types<_Up0, _Up...> > +struct __tuple_convertible_imp<__tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> > : public integral_constant::value && - __tuple_convertible_imp, __tuple_types<_Up...> >::value> {}; + __tuple_convertible_imp<__tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {}; template <> -struct __tuple_convertible_imp, __tuple_types<> > +struct __tuple_convertible_imp<__tuple_types<>, __tuple_types<> > : public true_type {}; +template +struct __tuple_convertible_apply : public false_type {}; + +template +struct __tuple_convertible_apply + : public __tuple_convertible_imp< + typename __make_tuple_types<_Tp>::type + , typename __make_tuple_types<_Up>::type + > +{}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 21:47:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26AA640B; Thu, 15 Jan 2015 21:47:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10C3838E; Thu, 15 Jan 2015 21:47:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FLl33l018750; Thu, 15 Jan 2015 21:47:03 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FLl3K8018748; Thu, 15 Jan 2015 21:47:03 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501152147.t0FLl3K8018748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Thu, 15 Jan 2015 21:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277218 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:47:04 -0000 Author: jfv Date: Thu Jan 15 21:47:02 2015 New Revision: 277218 URL: https://svnweb.freebsd.org/changeset/base/277218 Log: First draft man pages for ixl and ixlv drivers. MFC after: 1 week Added: head/share/man/man4/ixl.4 (contents, props changed) head/share/man/man4/ixlv.4 (contents, props changed) Added: head/share/man/man4/ixl.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ixl.4 Thu Jan 15 21:47:02 2015 (r277218) @@ -0,0 +1,188 @@ +.\" Copyright (c) 2013-2015, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\" this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2015 +.Dt IXL 4 +.Os +.Sh NAME +.Nm ixl +.Nd "Intel XL710 Ethernet 40Gb Base driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ixl" +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ixl_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCI Express adapters or LOMs +in the XL710 Family of ethernet devices. +The driver supports Jumbo Frames, TX/RX checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS), all for both IPv4 and IPv6. +For further hardware information and questions related to hardware +requirements, see +.Pa http://support.intel.com/ . +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +.Pp +Offloads are also controlled via the interface, for instance, +checksumming for both IPv4 and IPv6 can be set and unset, TSO4 +and/or TSO6, and finally LRO can be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports these SFP+ Pluggable Optics: +.Pp +.Bl -bullet -compact +.It +Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPSR +.It +Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPLR +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with SR Modules: +.Pp +.Bl -bullet -compact +.It +Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT +.It +Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2 +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with LR Modules: +.Pp +.Bl -bullet -compact +.It +Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT +.It +Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2 +.El +.Pp +Note that X710/XL710 Based SFP+ adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. + +.Pp +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.ixl.enable_msix +Allows one to enable/disable MSIX, thus forcing MSI instead. +.It Va hw.ixl.ringsz +Set the number of descriptors in the rings, note that this +changes BOTH the TX and RX rings, they cannot be set independly. +.It Va hw.ixl.max_queues +Set the number of queues (each a TX/RX pair) for the port, this +allows one to override the autocalculation if its set to 0. +.It Va hw.ixl.dynamic_rx_itr +The dynamic RX interrupt control, set to 1 to enable. +.It Va hw.ixl.dynamic_tx_itr +The dynamic TX interrupt control, set to 1 to enable. +.It Va hw.ixl.rx_itr +The RX interrupt rate value, set to 8K by default. +.It Va hw.ixl.tx_itr +The TX interrupt rate value, set to 4K by default. +.El +.Pp +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va hw.ixl.fc +Allows one to set the flow control value. A value of 0 disables +flow control, 3 enables full, 1 is RX, and 2 is TX pause. +.It Va hw.ixl.advertise_speed +Allows one to set advertised link speeds, this will then +cause a link renegotiation. With the appropriate adapter +this can cause a link at 10GB, 1GB, or 100MB. +.It Va hw.ixl.current_speed +This is a display of the current setting. +.It Va hw.ixl.fw_version +This is a display of the Firmware version. +.Sh Interrupt Storms +It is important to note that 40G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. It is suggested that this +be resolved by setting: +.Bl -tag -width indent +.It Va hw.intr_storm_threshold: 0 +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Pa http://support.intel.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jack Vogel Aq jfv@FreeBSD.org +and +.An Eric Joyner Aq ricera10@gmail.com . Added: head/share/man/man4/ixlv.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ixlv.4 Thu Jan 15 21:47:02 2015 (r277218) @@ -0,0 +1,140 @@ +.\" Copyright (c) 2013-2015, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\" this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2015 +.Dt IXLV 4 +.Os +.Sh NAME +.Nm ixlv +.Nd "Intel XL710 Ethernet 40Gb VF driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ixlv" +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ixlv_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides virtualization support for PCI Express adapters +or LOMs in the XL710 Family of ethernet devices. +The driver supports Jumbo Frames, TX/RX checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS), all for both IPv4 and IPv6. +For further hardware information and questions related to hardware +requirements, see +.Pa http://support.intel.com/ . +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +.Pp +Offloads are also controlled via the interface, for instance, +checksumming for both IPv4 and IPv6 can be set and unset, TSO4 +and/or TSO6, and finally LRO can be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Pp +NOTE that The +.Nm +Driver is only used by means of SRIOV, normally in a VM on a +hosting server with the +.Xr ixl 4 +driver. +.Pp +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.ixlv.ringsz +Set the number of descriptors in the rings, note that this +changes BOTH the TX and RX rings, they cannot be set independly. +.It Va hw.ixlv.max_queues +Set the number of queues (each a TX/RX pair) for the port, this +allows one to override the autocalculation if its set to 0. +.It Va hw.ixlv.txbrsz +Set the size of the buff ring used by the transmit side of the +stack, we have found that it is necessary to have it quite large +in order to get UDP to perform well. +.It Va hw.ixlv.dynamic_rx_itr +The dynamic RX interrupt control, set to 1 to enable, off by default. +.It Va hw.ixlv.dynamic_tx_itr +The dynamic TX interrupt control, set to 1 to enable, off by default. +.It Va hw.ixlv.rx_itr +The RX interrupt rate value, set to 8K by default. +.It Va hw.ixlv.tx_itr +The TX interrupt rate value, set to 4K by default. +.El +.Pp +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Pa http://support.intel.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq freebsd@intel.com . +.Sh SEE ALSO +.Xr ixl 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jack Vogel Aq jfv@FreeBSD.org +and +.An Eric Joyner Aq ricera10@gmail.com . From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 21:55:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3CDE5D2; Thu, 15 Jan 2015 21:55:19 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC71663; Thu, 15 Jan 2015 21:55:19 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id l15so288764wiw.4; Thu, 15 Jan 2015 13:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=bmmlKGLbP+ohrw0HVfC0B9wvkrKrX0Brh0FJiosLTKg=; b=GlyPUHDWyyxwndn6Qd/Pj6GPk7hN1hem6UCg0EibWtrBPiLd3aL2nBRPykdLymzbxD YS5P7mjLVyAD6kKZihdPqoOJHMNaMJGSA2F3JTJPyJaQq4KWNlFOkPuYKRjL0baCypWt 93ISaX1oEdmWt3itCPIPJrRkgD6m/2NW9lJ8WetSIhIjUU2/SQIHVHb058bxpb0L/niB dwmv+IBA5/P3rlA/HNA9KCbR+h5Ta0kZPO7t1EvIy0Har/m37k7GMm92q60+Dx3CVXun x/vqEaWpFUz6fPKRBHgRTeXv9wwlBaMkplFCxm/gSHwY+1BkzFDGy7EmRmIJUMalVdWf AT/A== X-Received: by 10.180.207.66 with SMTP id lu2mr51252wic.13.1421358917463; Thu, 15 Jan 2015 13:55:17 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id cm7sm599744wib.6.2015.01.15.13.55.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 13:55:16 -0800 (PST) Sender: Baptiste Daroussin Date: Thu, 15 Jan 2015 22:55:14 +0100 From: Baptiste Daroussin To: Jack F Vogel Subject: Re: svn commit: r277218 - head/share/man/man4 Message-ID: <20150115215514.GG98528@ivaldir.etoilebsd.net> References: <201501152147.t0FLl3K8018748@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EDJsL2R9iCFAt7IV" Content-Disposition: inline In-Reply-To: <201501152147.t0FLl3K8018748@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:55:19 -0000 --EDJsL2R9iCFAt7IV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 15, 2015 at 09:47:03PM +0000, Jack F Vogel wrote: > Author: jfv > Date: Thu Jan 15 21:47:02 2015 > New Revision: 277218 > URL: https://svnweb.freebsd.org/changeset/base/277218 >=20 > Log: > First draft man pages for ixl and ixlv drivers. > =20 > MFC after: 1 week >=20 [...] > +.Nm > +driver was written by > +.An Jack Vogel Aq jfv@FreeBSD.org ^ Missing Mt here (Mt =3D=3D mailto) > +and > +.An Eric Joyner Aq ricera10@gmail.com . ^ Missing Mt here (Mt =3D=3D mailto) >=20 Same on the other manpage regards, Bapt --EDJsL2R9iCFAt7IV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlS4N0AACgkQ8kTtMUmk6EwERACfblA5XASPuvLIt8PtmqRTJwNn ZDwAoIVI2P2os4ZjN0vZZLI/kP5Mdsl9 =/Wig -----END PGP SIGNATURE----- --EDJsL2R9iCFAt7IV-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 22:17:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFCA0BB6; Thu, 15 Jan 2015 22:17:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A9E8F1; Thu, 15 Jan 2015 22:17:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FMHCpc033104; Thu, 15 Jan 2015 22:17:12 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FMHCxU033097; Thu, 15 Jan 2015 22:17:12 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501152217.t0FMHCxU033097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Thu, 15 Jan 2015 22:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277219 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 22:17:13 -0000 Author: jfv Date: Thu Jan 15 22:17:11 2015 New Revision: 277219 URL: https://svnweb.freebsd.org/changeset/base/277219 Log: Add needed bits to the Makefile, and the Mt to the emails. Thanks to Nathan and Baptiste for the corrections :) MFC after: 1 week Modified: head/share/man/man4/Makefile head/share/man/man4/ixl.4 head/share/man/man4/ixlv.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/Makefile Thu Jan 15 22:17:11 2015 (r277219) @@ -217,6 +217,8 @@ MAN= aac.4 \ iwnfw.4 \ ixgb.4 \ ixgbe.4 \ + ixl.4 \ + ixlv.4 \ jme.4 \ joy.4 \ kbdmux.4 \ @@ -667,6 +669,8 @@ MLINKS+=ixgb.4 if_ixgb.4 MLINKS+=ixgbe.4 ix.4 MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 +MLINKS+=ixl.4 if_ixl.4 +MLINKS+=ixlv.4 if_ixlv.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 Modified: head/share/man/man4/ixl.4 ============================================================================== --- head/share/man/man4/ixl.4 Thu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/ixl.4 Thu Jan 15 22:17:11 2015 (r277219) @@ -183,6 +183,6 @@ device driver first appeared in The .Nm driver was written by -.An Jack Vogel Aq jfv@FreeBSD.org +.An Jack Vogel Aq Mt jfv@FreeBSD.org and -.An Eric Joyner Aq ricera10@gmail.com . +.An Eric Joyner Aq Mt ricera10@gmail.com . Modified: head/share/man/man4/ixlv.4 ============================================================================== --- head/share/man/man4/ixlv.4 Thu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/ixlv.4 Thu Jan 15 22:17:11 2015 (r277219) @@ -135,6 +135,6 @@ device driver first appeared in The .Nm driver was written by -.An Jack Vogel Aq jfv@FreeBSD.org +.An Jack Vogel Aq Mt jfv@FreeBSD.org and -.An Eric Joyner Aq ricera10@gmail.com . +.An Eric Joyner Aq Mt ricera10@gmail.com . From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 22:30:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A93FDCF; Thu, 15 Jan 2015 22:30:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81D009EC; Thu, 15 Jan 2015 22:30:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FMUMu7038333; Thu, 15 Jan 2015 22:30:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FMUHYA038292; Thu, 15 Jan 2015 22:30:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501152230.t0FMUHYA038292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 15 Jan 2015 22:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277220 - in vendor/llvm/dist: . autoconf cmake/modules docs include/llvm/Analysis include/llvm/CodeGen include/llvm/Target lib/Analysis lib/MC lib/Target/ARM lib/Target/Mips lib/Target... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 22:30:22 -0000 Author: dim Date: Thu Jan 15 22:30:16 2015 New Revision: 277220 URL: https://svnweb.freebsd.org/changeset/base/277220 Log: Vendor import of llvm RELEASE_351/final tag r225668 (effectively, 3.5.1 release): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_351/final@225668 Added: vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/Mips/MipsCCState.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Mips/MipsCCState.h (contents, props changed) vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll vendor/llvm/dist/test/CodeGen/ARM/ghc-tcreturn-lowered.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-struct.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/return-hard-struct-f128.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/return-struct.ll vendor/llvm/dist/test/CodeGen/PowerPC/blockaddress.ll vendor/llvm/dist/test/CodeGen/PowerPC/ia-mem-r0.ll vendor/llvm/dist/test/CodeGen/PowerPC/ia-neg-const.ll vendor/llvm/dist/test/CodeGen/PowerPC/subreg-postra-2.ll vendor/llvm/dist/test/CodeGen/PowerPC/subreg-postra.ll vendor/llvm/dist/test/CodeGen/PowerPC/tls-store2.ll vendor/llvm/dist/test/MC/Disassembler/Mips/mips2.txt (contents, props changed) vendor/llvm/dist/test/Transforms/IndVarSimplify/pr20680.ll vendor/llvm/dist/test/Transforms/LICM/PR21582.ll vendor/llvm/dist/test/Transforms/LoopVectorize/incorrect-dom-info.ll vendor/llvm/dist/test/Transforms/LoopVectorize/loop-form.ll vendor/llvm/dist/test/Transforms/LoopVectorize/unsized-pointee-crash.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/modules/Makefile vendor/llvm/dist/configure vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h vendor/llvm/dist/include/llvm/Target/TargetCallingConv.td vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/BlockFrequencyInfoImpl.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp vendor/llvm/dist/lib/Target/Mips/Mips.td vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.h vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsConstantIslandPass.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsLongBranch.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFastISel.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCMCInstLower.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/test/CodeGen/Mips/abicalls.ll vendor/llvm/dist/test/CodeGen/Mips/atomic.ll vendor/llvm/dist/test/CodeGen/Mips/bswap.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-float.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/return-float.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/return-hard-float.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/return.ll vendor/llvm/dist/test/CodeGen/Mips/cmov.ll vendor/llvm/dist/test/CodeGen/Mips/const-mult.ll vendor/llvm/dist/test/CodeGen/Mips/countleading.ll vendor/llvm/dist/test/CodeGen/Mips/divrem.ll vendor/llvm/dist/test/CodeGen/Mips/ehframe-indirect.ll vendor/llvm/dist/test/CodeGen/Mips/fastcc.ll vendor/llvm/dist/test/CodeGen/Mips/fp64a.ll vendor/llvm/dist/test/CodeGen/Mips/inlineasm-operand-code.ll vendor/llvm/dist/test/CodeGen/Mips/load-store-left-right.ll vendor/llvm/dist/test/CodeGen/Mips/longbranch.ll vendor/llvm/dist/test/CodeGen/Mips/madd-msub.ll vendor/llvm/dist/test/CodeGen/Mips/mips64-f128.ll vendor/llvm/dist/test/CodeGen/Mips/mips64-sret.ll vendor/llvm/dist/test/CodeGen/Mips/msa/frameindex.ll vendor/llvm/dist/test/CodeGen/Mips/octeon_popcnt.ll vendor/llvm/dist/test/CodeGen/Mips/select.ll vendor/llvm/dist/test/CodeGen/Mips/zeroreg.ll vendor/llvm/dist/test/CodeGen/PowerPC/cc.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-conversion.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-ret.ll vendor/llvm/dist/test/CodeGen/PowerPC/stack-realign.ll vendor/llvm/dist/test/CodeGen/PowerPC/tls-pic.ll vendor/llvm/dist/test/MC/Disassembler/Mips/mips32.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64.txt vendor/llvm/dist/test/MC/PowerPC/ppc64-localentry.s vendor/llvm/dist/test/Transforms/GCOVProfiling/linezero.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/lftr-address-space-pointers.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/lftr-extend-const.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/lftr-reuse.ll vendor/llvm/dist/test/Transforms/LICM/speculate.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check-address-space.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll vendor/llvm/dist/test/Transforms/LoopVectorize/vect.stats.ll vendor/llvm/dist/test/Transforms/SROA/phi-and-select.ll vendor/llvm/dist/unittests/Analysis/LazyCallGraphTest.cpp vendor/llvm/dist/utils/TableGen/CallingConvEmitter.cpp vendor/llvm/dist/utils/lit/lit/Test.py vendor/llvm/dist/utils/lit/lit/main.py Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/CMakeLists.txt Thu Jan 15 22:30:16 2015 (r277220) @@ -27,7 +27,7 @@ set(CMAKE_MODULE_PATH set(LLVM_VERSION_MAJOR 3) set(LLVM_VERSION_MINOR 5) -set(LLVM_VERSION_PATCH 0) +set(LLVM_VERSION_PATCH 1) if (NOT PACKAGE_VERSION) set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}svn") Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/autoconf/configure.ac Thu Jan 15 22:30:16 2015 (r277220) @@ -32,11 +32,11 @@ dnl===---------------------------------- dnl Initialize autoconf and define the package name, version number and dnl address for reporting bugs. -AC_INIT([LLVM],[3.5.0],[http://llvm.org/bugs/]) +AC_INIT([LLVM],[3.5.1],[http://llvm.org/bugs/]) LLVM_VERSION_MAJOR=3 LLVM_VERSION_MINOR=5 -LLVM_VERSION_PATCH=0 +LLVM_VERSION_PATCH=1 LLVM_VERSION_SUFFIX= AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API]) Modified: vendor/llvm/dist/cmake/modules/Makefile ============================================================================== --- vendor/llvm/dist/cmake/modules/Makefile Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/cmake/modules/Makefile Thu Jan 15 22:30:16 2015 (r277220) @@ -33,6 +33,19 @@ else LLVM_ENABLE_RTTI := 0 endif +# Don't try to run llvm-config during clean because it won't be available +ifneq ($(MAKECMDGOALS),clean) +LLVM_LIBS_TO_EXPORT := $(subst -l,,$(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error)) + +ifeq ($(LLVM_LIBS_TO_EXPORT),Error) +$(error llvm-config --libs failed) +endif + +ifndef LLVM_LIBS_TO_EXPORT +$(error LLVM_LIBS_TO_EXPORT cannot be empty) +endif +endif + OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in $(LLVMBuildCMakeFrag) @@ -45,7 +58,7 @@ $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMCo -e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \ -e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \ -e 's/@LLVM_COMMON_DEPENDS@//' \ - -e 's/@LLVM_AVAILABLE_LIBS@/'"$(subst -l,,$(LLVMConfigLibs))"'/' \ + -e 's/@LLVM_AVAILABLE_LIBS@/'"$(LLVM_LIBS_TO_EXPORT)"'/' \ -e 's/@LLVM_ALL_TARGETS@/'"$(ALL_TARGETS)"'/' \ -e 's/@LLVM_TARGETS_TO_BUILD@/'"$(TARGETS_TO_BUILD)"'/' \ -e 's/@LLVM_TARGETS_WITH_JIT@/'"$(TARGETS_WITH_JIT)"'/' \ @@ -83,7 +96,7 @@ $(PROJ_OBJ_DIR)/LLVMExports.cmake: $(LLV $(Echo) 'Generating LLVM CMake target exports file' $(Verb) ( \ echo '# LLVM CMake target exports. Do not include directly.' && \ - for lib in $(subst -l,,$(LLVMConfigLibs)); do \ + for lib in $(LLVM_LIBS_TO_EXPORT); do \ echo 'add_library('"$$lib"' STATIC IMPORTED)' && \ echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "'"$(PROJ_libdir)/lib$$lib.a"'")' ; \ done && \ Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/configure Thu Jan 15 22:30:16 2015 (r277220) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM 3.5.0. +# Generated by GNU Autoconf 2.60 for LLVM 3.5.1. # # Report bugs to . # @@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='LLVM' PACKAGE_TARNAME='llvm' -PACKAGE_VERSION='3.5.0' -PACKAGE_STRING='LLVM 3.5.0' +PACKAGE_VERSION='3.5.1' +PACKAGE_STRING='LLVM 3.5.1' PACKAGE_BUGREPORT='http://llvm.org/bugs/' ac_unique_file="lib/IR/Module.cpp" @@ -1316,7 +1316,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LLVM 3.5.0 to adapt to many kinds of systems. +\`configure' configures LLVM 3.5.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1382,7 +1382,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM 3.5.0:";; + short | recursive ) echo "Configuration of LLVM 3.5.1:";; esac cat <<\_ACEOF @@ -1553,7 +1553,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LLVM configure 3.5.0 +LLVM configure 3.5.1 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1569,7 +1569,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LLVM $as_me 3.5.0, which was +It was created by LLVM $as_me 3.5.1, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -1925,7 +1925,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu LLVM_VERSION_MAJOR=3 LLVM_VERSION_MINOR=5 -LLVM_VERSION_PATCH=0 +LLVM_VERSION_PATCH=1 LLVM_VERSION_SUFFIX= @@ -19245,7 +19245,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LLVM $as_me 3.5.0, which was +This file was extended by LLVM $as_me 3.5.1, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19298,7 +19298,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM config.status 3.5.0 +LLVM config.status 3.5.1 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Thu Jan 15 22:30:16 2015 (r277220) @@ -24,6 +24,43 @@ them. Non-comprehensive list of changes in this release ================================================= +Changes to the MIPS Target +-------------------------- + +* A large number of bugs have been fixed for big-endian Mips targets using the + N32 and N64 ABI's. Please note that some of these bugs will still affect + LLVM-IR generated by LLVM 3.5 since correct code generation depends on + appropriate usage of the ``inreg``, ``signext``, and ``zeroext`` attributes + on all function arguments and returns. + +* The registers used to return a structure containing a single 128-bit floating + point member on the N32/N64 ABI's have been changed from those specified by + the ABI documentation to match those used by GCC. The documentation specifies + that ``$f0`` and ``$f2`` should be used but GCC has used ``$f0`` and ``$f1`` + for many years. + +* Returning a zero-byte struct no longer causes incorrect code generation when + using the O32 ABI. + +* Passing structures of less than 32-bits using the O32 ABI on a big-endian + target has been fixed. + +* The exception personality has been changed for 64-bit Mips targets to + eliminate warnings about relocations in a read-only section. + +* Incorrect usage of odd-numbered single-precision floating point registers + has been fixed when the fastcc calling convention is used with 64-bit FPU's + and -mno-odd-spreg. + +* For inline assembly, the 'z' print-modifier print modifier can now be used on + non-immediate values. + +* Attempting to disassemble l[wd]c[23], s[wd]c[23], cache, and pref no longer + triggers an assertion. + +Non-comprehensive list of changes in 3.5 +======================================== + * All backends have been changed to use the MC asm printer and support for the non MC one has been removed. @@ -217,6 +254,37 @@ We had also decided that the name of the following ARM's official documentation. So, at the end of May the old AArch64 directory was removed, and ARM64 renamed into its place. +Changes to the PowerPC Target +----------------------------- + +The PowerPC 64-bit Little Endian subtarget (powerpc64le-unknown-linux-gnu) is +now fully supported. This includes support for the Altivec instruction set. + +The Power Architecture 64-Bit ELFv2 ABI Specification is now supported, and +is the default ABI for Little Endian. The ELFv1 ABI remains the default ABI +for Big Endian. Currently, it is not possible to override these defaults. +That capability will be available (albeit not recommended) in a future release. + +Links to the ELFv2 ABI specification and to the Power ISA Version 2.07 +specification may be found `here `_ (free registration required). +Efforts are underway to move this to a location that doesn't require +registration, but the planned site isn't ready yet. + +Experimental support for the VSX instruction set introduced with ISA 2.06 +is now available using the ``-mvsx`` switch. Work remains on this, so it +is not recommended for production use. VSX is disabled for Little Endian +regardless of this switch setting. + +Load/store cost estimates have been improved. + +Constant hoisting has been enabled. + +Global named register support has been enabled. + +Initial support for PIC code has been added for the 32-bit ELF subtarget. +Further support will be available in a future release. + + Changes to CMake build system ----------------------------- Modified: vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h Thu Jan 15 22:30:16 2015 (r277220) @@ -253,13 +253,16 @@ private: const MDNode *TBAAInfo, bool KnownMustAlias = false); void addUnknownInst(Instruction *I, AliasAnalysis &AA); - void removeUnknownInst(Instruction *I) { + void removeUnknownInst(AliasSetTracker &AST, Instruction *I) { + bool WasEmpty = UnknownInsts.empty(); for (size_t i = 0, e = UnknownInsts.size(); i != e; ++i) if (UnknownInsts[i] == I) { UnknownInsts[i] = UnknownInsts.back(); UnknownInsts.pop_back(); --i; --e; // Revisit the moved entry. } + if (!WasEmpty && UnknownInsts.empty()) + dropRef(AST); } void setVolatile() { Volatile = true; } Modified: vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h Thu Jan 15 22:30:16 2015 (r277220) @@ -31,18 +31,25 @@ class TargetRegisterInfo; class CCValAssign { public: enum LocInfo { - Full, // The value fills the full location. - SExt, // The value is sign extended in the location. - ZExt, // The value is zero extended in the location. - AExt, // The value is extended with undefined upper bits. - BCvt, // The value is bit-converted in the location. - VExt, // The value is vector-widened in the location. - // FIXME: Not implemented yet. Code that uses AExt to mean - // vector-widen should be fixed to use VExt instead. - FPExt, // The floating-point value is fp-extended in the location. - Indirect // The location contains pointer to the value. + Full, // The value fills the full location. + SExt, // The value is sign extended in the location. + ZExt, // The value is zero extended in the location. + AExt, // The value is extended with undefined upper bits. + BCvt, // The value is bit-converted in the location. + VExt, // The value is vector-widened in the location. + // FIXME: Not implemented yet. Code that uses AExt to mean + // vector-widen should be fixed to use VExt instead. + FPExt, // The floating-point value is fp-extended in the location. + Indirect, // The location contains pointer to the value. + SExtUpper, // The value is in the upper bits of the location and should be + // sign extended when retrieved. + ZExtUpper, // The value is in the upper bits of the location and should be + // zero extended when retrieved. + AExtUpper // The value is in the upper bits of the location and should be + // extended with undefined upper bits when retrieved. // TODO: a subset of the value is in the location. }; + private: /// ValNo - This is the value number begin assigned (e.g. an argument number). unsigned ValNo; @@ -146,6 +153,9 @@ public: return (HTP == AExt || HTP == SExt || HTP == ZExt); } + bool isUpperBitsInLoc() const { + return HTP == AExtUpper || HTP == SExtUpper || HTP == ZExtUpper; + } }; /// CCAssignFn - This function assigns a location for Val, updating State to @@ -208,10 +218,10 @@ private: // while "%t" goes to the stack: it wouldn't be described in ByValRegs. // // Supposed use-case for this collection: - // 1. Initially ByValRegs is empty, InRegsParamsProceed is 0. + // 1. Initially ByValRegs is empty, InRegsParamsProcessed is 0. // 2. HandleByVal fillups ByValRegs. // 3. Argument analysis (LowerFormatArguments, for example). After - // some byval argument was analyzed, InRegsParamsProceed is increased. + // some byval argument was analyzed, InRegsParamsProcessed is increased. struct ByValInfo { ByValInfo(unsigned B, unsigned E, bool IsWaste = false) : Begin(B), End(E), Waste(IsWaste) {} @@ -229,9 +239,9 @@ private: }; SmallVector ByValRegs; - // InRegsParamsProceed - shows how many instances of ByValRegs was proceed + // InRegsParamsProcessed - shows how many instances of ByValRegs was proceed // during argument analysis. - unsigned InRegsParamsProceed; + unsigned InRegsParamsProcessed; protected: ParmContext CallOrPrologue; @@ -412,7 +422,7 @@ public: unsigned getInRegsParamsCount() const { return ByValRegs.size(); } // Returns count of byval in-regs arguments proceed. - unsigned getInRegsParamsProceed() const { return InRegsParamsProceed; } + unsigned getInRegsParamsProcessed() const { return InRegsParamsProcessed; } // Get information about N-th byval parameter that is stored in registers. // Here "ByValParamIndex" is N. @@ -436,20 +446,20 @@ public: // Returns false, if end is reached. bool nextInRegsParam() { unsigned e = ByValRegs.size(); - if (InRegsParamsProceed < e) - ++InRegsParamsProceed; - return InRegsParamsProceed < e; + if (InRegsParamsProcessed < e) + ++InRegsParamsProcessed; + return InRegsParamsProcessed < e; } // Clear byval registers tracking info. void clearByValRegsInfo() { - InRegsParamsProceed = 0; + InRegsParamsProcessed = 0; ByValRegs.clear(); } // Rewind byval registers tracking info. void rewindByValRegsInfo() { - InRegsParamsProceed = 0; + InRegsParamsProcessed = 0; } ParmContext getCallOrPrologue() const { return CallOrPrologue; } Modified: vendor/llvm/dist/include/llvm/Target/TargetCallingConv.td ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetCallingConv.td Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/include/llvm/Target/TargetCallingConv.td Thu Jan 15 22:30:16 2015 (r277220) @@ -67,6 +67,9 @@ class CCIfSplit : CCIf<"ArgF /// the specified action. class CCIfSRet : CCIf<"ArgFlags.isSRet()", A> {} +/// CCIfVarArg - If the current function is vararg - apply the action +class CCIfVarArg : CCIf<"State.isVarArg()", A> {} + /// CCIfNotVarArg - If the current function is not vararg - apply the action class CCIfNotVarArg : CCIf<"!State.isVarArg()", A> {} @@ -119,6 +122,12 @@ class CCPromoteToType ValueType DestTy = destTy; } +/// CCPromoteToUpperBitsInType - If applied, this promotes the specified current +/// value to the specified type and shifts the value into the upper bits. +class CCPromoteToUpperBitsInType : CCAction { + ValueType DestTy = destTy; +} + /// CCBitConvertToType - If applied, this bitconverts the specified current /// value to the specified type. class CCBitConvertToType : CCAction { @@ -141,6 +150,13 @@ class CCDelegateTo : CCA /// that the target supports. class CallingConv actions> { list Actions = actions; + bit Custom = 0; +} + +/// CustomCallingConv - An instance of this is used to declare calling +/// conventions that are implemented using a custom function of the same name. +class CustomCallingConv : CallingConv<[]> { + let Custom = 1; } /// CalleeSavedRegs - A list of callee saved registers for a given calling Modified: vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -55,10 +55,13 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasTy = MayAlias; } + bool ASHadUnknownInsts = !AS.UnknownInsts.empty(); if (UnknownInsts.empty()) { // Merge call sites... - if (!AS.UnknownInsts.empty()) + if (ASHadUnknownInsts) { std::swap(UnknownInsts, AS.UnknownInsts); - } else if (!AS.UnknownInsts.empty()) { + addRef(); + } + } else if (ASHadUnknownInsts) { UnknownInsts.insert(UnknownInsts.end(), AS.UnknownInsts.begin(), AS.UnknownInsts.end()); AS.UnknownInsts.clear(); } @@ -76,6 +79,8 @@ void AliasSet::mergeSetIn(AliasSet &AS, AS.PtrListEnd = &AS.PtrList; assert(*AS.PtrListEnd == nullptr && "End of list is not null?"); } + if (ASHadUnknownInsts) + AS.dropRef(AST); } void AliasSetTracker::removeAliasSet(AliasSet *AS) { @@ -123,6 +128,8 @@ void AliasSet::addPointer(AliasSetTracke } void AliasSet::addUnknownInst(Instruction *I, AliasAnalysis &AA) { + if (UnknownInsts.empty()) + addRef(); UnknownInsts.push_back(I); if (!I->mayWriteToMemory()) { @@ -218,13 +225,14 @@ AliasSet *AliasSetTracker::findAliasSetF uint64_t Size, const MDNode *TBAAInfo) { AliasSet *FoundSet = nullptr; - for (iterator I = begin(), E = end(); I != E; ++I) { - if (I->Forward || !I->aliasesPointer(Ptr, Size, TBAAInfo, AA)) continue; + for (iterator I = begin(), E = end(); I != E;) { + iterator Cur = I++; + if (Cur->Forward || !Cur->aliasesPointer(Ptr, Size, TBAAInfo, AA)) continue; if (!FoundSet) { // If this is the first alias set ptr can go into. - FoundSet = I; // Remember it. + FoundSet = Cur; // Remember it. } else { // Otherwise, we must merge the sets. - FoundSet->mergeSetIn(*I, *this); // Merge in contents. + FoundSet->mergeSetIn(*Cur, *this); // Merge in contents. } } @@ -246,14 +254,14 @@ bool AliasSetTracker::containsPointer(Va AliasSet *AliasSetTracker::findAliasSetForUnknownInst(Instruction *Inst) { AliasSet *FoundSet = nullptr; - for (iterator I = begin(), E = end(); I != E; ++I) { - if (I->Forward || !I->aliasesUnknownInst(Inst, AA)) + for (iterator I = begin(), E = end(); I != E;) { + iterator Cur = I++; + if (Cur->Forward || !Cur->aliasesUnknownInst(Inst, AA)) continue; - if (!FoundSet) // If this is the first alias set ptr can go into. - FoundSet = I; // Remember it. - else if (!I->Forward) // Otherwise, we must merge the sets. - FoundSet->mergeSetIn(*I, *this); // Merge in contents. + FoundSet = Cur; // Remember it. + else if (!Cur->Forward) // Otherwise, we must merge the sets. + FoundSet->mergeSetIn(*Cur, *this); // Merge in contents. } return FoundSet; } @@ -393,6 +401,8 @@ void AliasSetTracker::add(const AliasSet /// tracker. void AliasSetTracker::remove(AliasSet &AS) { // Drop all call sites. + if (!AS.UnknownInsts.empty()) + AS.dropRef(*this); AS.UnknownInsts.clear(); // Clear the alias set. @@ -489,10 +499,10 @@ void AliasSetTracker::deleteValue(Value if (Instruction *Inst = dyn_cast(PtrVal)) { if (Inst->mayReadOrWriteMemory()) { // Scan all the alias sets to see if this call site is contained. - for (iterator I = begin(), E = end(); I != E; ++I) { - if (I->Forward) continue; - - I->removeUnknownInst(Inst); + for (iterator I = begin(), E = end(); I != E;) { + iterator Cur = I++; + if (!Cur->Forward) + Cur->removeUnknownInst(*this, Inst); } } } Modified: vendor/llvm/dist/lib/Analysis/BlockFrequencyInfoImpl.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/BlockFrequencyInfoImpl.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Analysis/BlockFrequencyInfoImpl.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -14,7 +14,7 @@ #include "llvm/Analysis/BlockFrequencyInfoImpl.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/Support/raw_ostream.h" -#include +#include using namespace llvm; using namespace llvm::bfi_detail; @@ -123,8 +123,12 @@ static void combineWeight(Weight &W, con } assert(W.Type == OtherW.Type); assert(W.TargetNode == OtherW.TargetNode); - assert(W.Amount < W.Amount + OtherW.Amount && "Unexpected overflow"); - W.Amount += OtherW.Amount; + assert(OtherW.Amount && "Expected non-zero weight"); + if (W.Amount > W.Amount + OtherW.Amount) + // Saturate on overflow. + W.Amount = UINT64_MAX; + else + W.Amount += OtherW.Amount; } static void combineWeightsBySorting(WeightList &Weights) { // Sort so edges to the same node are adjacent. @@ -207,11 +211,19 @@ void Distribution::normalize() { Shift = 33 - countLeadingZeros(Total); // Early exit if nothing needs to be scaled. - if (!Shift) + if (!Shift) { + // If we didn't overflow then combineWeights() shouldn't have changed the + // sum of the weights, but let's double-check. + assert(Total == std::accumulate(Weights.begin(), Weights.end(), UINT64_C(0), + [](uint64_t Sum, const Weight &W) { + return Sum + W.Amount; + }) && + "Expected total to be correct"); return; + } // Recompute the total through accumulation (rather than shifting it) so that - // it's accurate after shifting. + // it's accurate after shifting and any changes combineWeights() made above. Total = 0; // Sum the weights to each node and shift right if necessary. Modified: vendor/llvm/dist/lib/Analysis/ValueTracking.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/ValueTracking.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Analysis/ValueTracking.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -1987,23 +1987,31 @@ bool llvm::isSafeToSpeculativelyExecute( default: return true; case Instruction::UDiv: - case Instruction::URem: - // x / y is undefined if y == 0, but calculations like x / 3 are safe. - return isKnownNonZero(Inst->getOperand(1), TD); + case Instruction::URem: { + // x / y is undefined if y == 0. + const APInt *V; + if (match(Inst->getOperand(1), m_APInt(V))) + return *V != 0; + return false; + } case Instruction::SDiv: case Instruction::SRem: { - Value *Op = Inst->getOperand(1); - // x / y is undefined if y == 0 - if (!isKnownNonZero(Op, TD)) - return false; - // x / y might be undefined if y == -1 - unsigned BitWidth = getBitWidth(Op->getType(), TD); - if (BitWidth == 0) - return false; - APInt KnownZero(BitWidth, 0); - APInt KnownOne(BitWidth, 0); - computeKnownBits(Op, KnownZero, KnownOne, TD); - return !!KnownZero; + // x / y is undefined if y == 0 or x == INT_MIN and y == -1 + const APInt *X, *Y; + if (match(Inst->getOperand(1), m_APInt(Y))) { + if (*Y != 0) { + if (*Y == -1) { + // The numerator can't be MinSignedValue if the denominator is -1. + if (match(Inst->getOperand(0), m_APInt(X))) + return !Y->isMinSignedValue(); + // The numerator *might* be MinSignedValue. + return false; + } + // The denominator is not 0 or -1, it's safe to proceed. + return true; + } + } + return false; } case Instruction::Load: { const LoadInst *LI = cast(Inst); Modified: vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -340,6 +340,8 @@ void MCObjectFileInfo::InitELFMCObjectFi break; case Triple::mips: case Triple::mipsel: + case Triple::mips64: + case Triple::mips64el: // MIPS uses indirect pointer to refer personality functions, so that the // eh_frame section can be read-only. DW.ref.personality will be generated // for relocation. Modified: vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -566,11 +566,59 @@ void ARMFrameLowering::emitPrologue(Mach AFI->setShouldRestoreSPFromFP(true); } +// Resolve TCReturn pseudo-instruction +void ARMFrameLowering::fixTCReturn(MachineFunction &MF, + MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); + assert(MBBI->isReturn() && "Can only insert epilog into returning blocks"); + unsigned RetOpcode = MBBI->getOpcode(); + DebugLoc dl = MBBI->getDebugLoc(); + const ARMBaseInstrInfo &TII = + *MF.getTarget().getSubtarget().getInstrInfo(); + + if (!(RetOpcode == ARM::TCRETURNdi || RetOpcode == ARM::TCRETURNri)) + return; + + // Tail call return: adjust the stack pointer and jump to callee. + MBBI = MBB.getLastNonDebugInstr(); + MachineOperand &JumpTarget = MBBI->getOperand(0); + + // Jump to label or value in register. + if (RetOpcode == ARM::TCRETURNdi) { + unsigned TCOpcode = STI.isThumb() ? + (STI.isTargetMachO() ? ARM::tTAILJMPd : ARM::tTAILJMPdND) : + ARM::TAILJMPd; + MachineInstrBuilder MIB = BuildMI(MBB, MBBI, dl, TII.get(TCOpcode)); + if (JumpTarget.isGlobal()) + MIB.addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset(), + JumpTarget.getTargetFlags()); + else { + assert(JumpTarget.isSymbol()); + MIB.addExternalSymbol(JumpTarget.getSymbolName(), + JumpTarget.getTargetFlags()); + } + + // Add the default predicate in Thumb mode. + if (STI.isThumb()) MIB.addImm(ARMCC::AL).addReg(0); + } else if (RetOpcode == ARM::TCRETURNri) { + BuildMI(MBB, MBBI, dl, + TII.get(STI.isThumb() ? ARM::tTAILJMPr : ARM::TAILJMPr)). + addReg(JumpTarget.getReg(), RegState::Kill); + } + + MachineInstr *NewMI = std::prev(MBBI); + for (unsigned i = 1, e = MBBI->getNumOperands(); i != e; ++i) + NewMI->addOperand(MBBI->getOperand(i)); + + // Delete the pseudo instruction TCRETURN. + MBB.erase(MBBI); + MBBI = NewMI; +} + void ARMFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); assert(MBBI->isReturn() && "Can only insert epilog into returning blocks"); - unsigned RetOpcode = MBBI->getOpcode(); DebugLoc dl = MBBI->getDebugLoc(); MachineFrameInfo *MFI = MF.getFrameInfo(); ARMFunctionInfo *AFI = MF.getInfo(); @@ -588,8 +636,10 @@ void ARMFrameLowering::emitEpilogue(Mach // All calls are tail calls in GHC calling conv, and functions have no // prologue/epilogue. - if (MF.getFunction()->getCallingConv() == CallingConv::GHC) + if (MF.getFunction()->getCallingConv() == CallingConv::GHC) { + fixTCReturn(MF, MBB); return; + } if (!AFI->hasStackFrame()) { if (NumBytes - ArgRegsSaveSize != 0) @@ -661,42 +711,7 @@ void ARMFrameLowering::emitEpilogue(Mach if (AFI->getGPRCalleeSavedArea1Size()) MBBI++; } - if (RetOpcode == ARM::TCRETURNdi || RetOpcode == ARM::TCRETURNri) { - // Tail call return: adjust the stack pointer and jump to callee. - MBBI = MBB.getLastNonDebugInstr(); - MachineOperand &JumpTarget = MBBI->getOperand(0); - - // Jump to label or value in register. - if (RetOpcode == ARM::TCRETURNdi) { - unsigned TCOpcode = STI.isThumb() ? - (STI.isTargetMachO() ? ARM::tTAILJMPd : ARM::tTAILJMPdND) : - ARM::TAILJMPd; - MachineInstrBuilder MIB = BuildMI(MBB, MBBI, dl, TII.get(TCOpcode)); - if (JumpTarget.isGlobal()) - MIB.addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset(), - JumpTarget.getTargetFlags()); - else { - assert(JumpTarget.isSymbol()); - MIB.addExternalSymbol(JumpTarget.getSymbolName(), - JumpTarget.getTargetFlags()); - } - - // Add the default predicate in Thumb mode. - if (STI.isThumb()) MIB.addImm(ARMCC::AL).addReg(0); - } else if (RetOpcode == ARM::TCRETURNri) { - BuildMI(MBB, MBBI, dl, - TII.get(STI.isThumb() ? ARM::tTAILJMPr : ARM::TAILJMPr)). - addReg(JumpTarget.getReg(), RegState::Kill); - } - - MachineInstr *NewMI = std::prev(MBBI); - for (unsigned i = 1, e = MBBI->getNumOperands(); i != e; ++i) - NewMI->addOperand(MBBI->getOperand(i)); - - // Delete the pseudo instruction TCRETURN. - MBB.erase(MBBI); - MBBI = NewMI; - } + fixTCReturn(MF, MBB); if (ArgRegsSaveSize) emitSPUpdate(isARM, MBB, MBBI, dl, TII, ArgRegsSaveSize); Modified: vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h Thu Jan 15 22:30:16 2015 (r277220) @@ -31,6 +31,8 @@ public: void emitPrologue(MachineFunction &MF) const override; void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; + void fixTCReturn(MachineFunction &MF, MachineBasicBlock &MBB) const; + bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector &CSI, Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -1521,7 +1521,7 @@ ARMTargetLowering::LowerCall(TargetLower // True if this byval aggregate will be split between registers // and memory. unsigned ByValArgsCount = CCInfo.getInRegsParamsCount(); - unsigned CurByValIdx = CCInfo.getInRegsParamsProceed(); + unsigned CurByValIdx = CCInfo.getInRegsParamsProcessed(); if (CurByValIdx < ByValArgsCount) { @@ -2962,7 +2962,7 @@ ARMTargetLowering::LowerFormalArguments( if (Flags.isByVal()) { unsigned ExtraArgRegsSize; unsigned ExtraArgRegsSaveSize; - computeRegArea(CCInfo, MF, CCInfo.getInRegsParamsProceed(), + computeRegArea(CCInfo, MF, CCInfo.getInRegsParamsProcessed(), Flags.getByValSize(), ExtraArgRegsSize, ExtraArgRegsSaveSize); @@ -3086,7 +3086,7 @@ ARMTargetLowering::LowerFormalArguments( // Since they could be overwritten by lowering of arguments in case of // a tail call. if (Flags.isByVal()) { - unsigned CurByValIndex = CCInfo.getInRegsParamsProceed(); + unsigned CurByValIndex = CCInfo.getInRegsParamsProcessed(); ByValStoreOffset = RoundUpToAlignment(ByValStoreOffset, Flags.getByValAlign()); int FrameIndex = StoreByValRegs( Modified: vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -200,14 +200,14 @@ class MipsAsmParser : public MCTargetAsm // Example: INSERT.B $w0[n], $1 => 16 > n >= 0 bool validateMSAIndex(int Val, int RegKind); - void setFeatureBits(unsigned Feature, StringRef FeatureString) { + void setFeatureBits(uint64_t Feature, StringRef FeatureString) { if (!(STI.getFeatureBits() & Feature)) { setAvailableFeatures( ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); } } - void clearFeatureBits(unsigned Feature, StringRef FeatureString) { + void clearFeatureBits(uint64_t Feature, StringRef FeatureString) { if (STI.getFeatureBits() & Feature) { setAvailableFeatures( ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); Modified: vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt Thu Jan 15 22:30:16 2015 (r277220) @@ -22,8 +22,10 @@ add_llvm_target(MipsCodeGen Mips16ISelDAGToDAG.cpp Mips16ISelLowering.cpp Mips16RegisterInfo.cpp + MipsABIInfo.cpp MipsAnalyzeImmediate.cpp MipsAsmPrinter.cpp + MipsCCState.cpp MipsCodeEmitter.cpp MipsConstantIslandPass.cpp MipsDelaySlotFiller.cpp Modified: vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Thu Jan 15 22:17:11 2015 (r277219) +++ vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Thu Jan 15 22:30:16 2015 (r277220) @@ -250,6 +250,11 @@ static DecodeStatus DecodeMem(MCInst &In uint64_t Address, const void *Decoder); +static DecodeStatus DecodeCacheOp(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder); + static DecodeStatus DecodeMSA128Mem(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder); @@ -267,6 +272,14 @@ static DecodeStatus DecodeFMem(MCInst &I uint64_t Address, const void *Decoder); +static DecodeStatus DecodeFMem2(MCInst &Inst, unsigned Insn, + uint64_t Address, + const void *Decoder); + +static DecodeStatus DecodeFMem3(MCInst &Inst, unsigned Insn, + uint64_t Address, + const void *Decoder); + static DecodeStatus DecodeSpecial3LlSc(MCInst &Inst, unsigned Insn, uint64_t Address, @@ -451,7 +464,7 @@ static DecodeStatus DecodeAddiGroupBranc InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rs >= Rt) { @@ -490,7 +503,7 @@ static DecodeStatus DecodeDaddiGroupBran InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rs >= Rt) { @@ -530,7 +543,7 @@ static DecodeStatus DecodeBlezlGroupBran InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rt == 0) @@ -575,7 +588,7 @@ static DecodeStatus DecodeBgtzlGroupBran InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; if (Rt == 0) return MCDisassembler::Fail; @@ -617,7 +630,7 @@ static DecodeStatus DecodeBgtzGroupBranc InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; bool HasRt = false; @@ -666,7 +679,7 @@ static DecodeStatus DecodeBlezGroupBranc InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rt == 0) @@ -964,6 +977,23 @@ static DecodeStatus DecodeMem(MCInst &In return MCDisassembler::Success; } +static DecodeStatus DecodeCacheOp(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Hint = fieldFromInstruction(Insn, 16, 5); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + + Inst.addOperand(MCOperand::CreateReg(Base)); + Inst.addOperand(MCOperand::CreateImm(Offset)); + Inst.addOperand(MCOperand::CreateImm(Hint)); + + return MCDisassembler::Success; +} + static DecodeStatus DecodeMSA128Mem(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { int Offset = SignExtend32<10>(fieldFromInstruction(Insn, 16, 10)); @@ -995,15 +1025,15 @@ static DecodeStatus DecodeMSA128Mem(MCIn break; case Mips::LD_H: case Mips::ST_H: - Inst.addOperand(MCOperand::CreateImm(Offset << 1)); + Inst.addOperand(MCOperand::CreateImm(Offset * 2)); break; case Mips::LD_W: case Mips::ST_W: - Inst.addOperand(MCOperand::CreateImm(Offset << 2)); + Inst.addOperand(MCOperand::CreateImm(Offset * 4)); break; case Mips::LD_D: case Mips::ST_D: - Inst.addOperand(MCOperand::CreateImm(Offset << 3)); + Inst.addOperand(MCOperand::CreateImm(Offset * 8)); break; } @@ -1067,6 +1097,42 @@ static DecodeStatus DecodeFMem(MCInst &I return MCDisassembler::Success; } +static DecodeStatus DecodeFMem2(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Reg = fieldFromInstruction(Insn, 16, 5); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + + Reg = getReg(Decoder, Mips::COP2RegClassID, Reg); + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + + Inst.addOperand(MCOperand::CreateReg(Reg)); + Inst.addOperand(MCOperand::CreateReg(Base)); + Inst.addOperand(MCOperand::CreateImm(Offset)); + + return MCDisassembler::Success; +} + +static DecodeStatus DecodeFMem3(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Reg = fieldFromInstruction(Insn, 16, 5); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + + Reg = getReg(Decoder, Mips::COP3RegClassID, Reg); + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + + Inst.addOperand(MCOperand::CreateReg(Reg)); + Inst.addOperand(MCOperand::CreateReg(Base)); + Inst.addOperand(MCOperand::CreateImm(Offset)); + + return MCDisassembler::Success; +} + static DecodeStatus DecodeSpecial3LlSc(MCInst &Inst, unsigned Insn, uint64_t Address, @@ -1225,7 +1291,7 @@ static DecodeStatus DecodeBranchTarget(M unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = (SignExtend32<16>(Offset) << 2) + 4; + int32_t BranchOffset = (SignExtend32<16>(Offset) * 4) + 4; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; } @@ -1244,7 +1310,7 @@ static DecodeStatus DecodeBranchTarget21 unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = SignExtend32<21>(Offset) << 2; + int32_t BranchOffset = SignExtend32<21>(Offset) * 4; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; @@ -1254,7 +1320,7 @@ static DecodeStatus DecodeBranchTarget26 unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = SignExtend32<26>(Offset) << 2; + int32_t BranchOffset = SignExtend32<26>(Offset) * 4; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; @@ -1264,7 +1330,7 @@ static DecodeStatus DecodeBranchTargetMM unsigned Offset, uint64_t Address, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 22:31:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EA72F0C; Thu, 15 Jan 2015 22:31:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4FC2A8F; Thu, 15 Jan 2015 22:31:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FMVBPx038968; Thu, 15 Jan 2015 22:31:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FMVBct038967; Thu, 15 Jan 2015 22:31:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501152231.t0FMVBct038967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 15 Jan 2015 22:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277221 - vendor/llvm/llvm-release_351-r225668 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 22:31:12 -0000 Author: dim Date: Thu Jan 15 22:31:11 2015 New Revision: 277221 URL: https://svnweb.freebsd.org/changeset/base/277221 Log: Tag llvm tags/RELEASE_351/final r225668 (effectively, 3.5.1 release). Added: vendor/llvm/llvm-release_351-r225668/ - copied from r277220, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 22:31:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FB1CAA; Thu, 15 Jan 2015 22:31:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 188B3A99; Thu, 15 Jan 2015 22:31:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FMVeG7039111; Thu, 15 Jan 2015 22:31:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FMVaRw039071; Thu, 15 Jan 2015 22:31:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501152231.t0FMVaRw039071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 15 Jan 2015 22:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277222 - in vendor/clang/dist: docs include/clang/Basic lib/CodeGen lib/Sema test test/CodeGen test/CodeGenCXX test/Driver test/Misc test/Sema test/SemaCXX test/SemaTemplate X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 22:31:41 -0000 Author: dim Date: Thu Jan 15 22:31:35 2015 New Revision: 277222 URL: https://svnweb.freebsd.org/changeset/base/277222 Log: Vendor import of clang RELEASE_351/final tag r225668 (effectively, 3.5.1 release): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_351/final@225668 Added: vendor/clang/dist/test/CodeGen/mips-varargs.c (contents, props changed) vendor/clang/dist/test/CodeGen/mips-zero-sized-struct.c (contents, props changed) Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/test/CodeGen/atomics-inlining.c vendor/clang/dist/test/CodeGen/mips-byval-arg.c vendor/clang/dist/test/CodeGen/mips-vector-arg.c vendor/clang/dist/test/CodeGen/mips-vector-return.c vendor/clang/dist/test/CodeGen/mips64-class-return.cpp vendor/clang/dist/test/CodeGen/mips64-padding-arg.c vendor/clang/dist/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp vendor/clang/dist/test/Driver/cl-x86-flags.c vendor/clang/dist/test/Driver/mips-cs.cpp vendor/clang/dist/test/Driver/mips-fsf.cpp vendor/clang/dist/test/Makefile vendor/clang/dist/test/Misc/backend-optimization-failure.cpp vendor/clang/dist/test/Sema/dllexport.c vendor/clang/dist/test/Sema/dllimport.c vendor/clang/dist/test/Sema/types.c vendor/clang/dist/test/SemaCXX/dllexport.cpp vendor/clang/dist/test/SemaCXX/dllimport.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/lit.cfg Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/docs/ReleaseNotes.rst Thu Jan 15 22:31:35 2015 (r277222) @@ -1,6 +1,6 @@ -===================================== -Clang 3.5 (In-Progress) Release Notes -===================================== +======================= +Clang 3.5 Release Notes +======================= .. contents:: :local: @@ -8,12 +8,6 @@ Clang 3.5 (In-Progress) Release Notes Written by the `LLVM Team `_ -.. warning:: - - These are in-progress notes for the upcoming Clang 3.5 release. You may - prefer the `Clang 3.4 Release Notes - `_. - Introduction ============ @@ -188,16 +182,6 @@ directive just prior to the desired loop interleaving to be enabled or disabled. Vector width as well as interleave count can be manually specified. See :ref:`langext-pragma-loop` for details. -C Language Changes in Clang ---------------------------- - -... - -C11 Feature Support -^^^^^^^^^^^^^^^^^^^ - -... - C++ Language Changes in Clang ----------------------------- @@ -207,8 +191,6 @@ C++ Language Changes in Clang references, and `-fsanitize=null` can be used to detect null references being formed at runtime. -- ... - C++17 Feature Support ^^^^^^^^^^^^^^^^^^^^^ @@ -227,16 +209,6 @@ Additionally, trigraphs are not recogniz Note that these features may be changed or removed in future Clang releases without notice. -Objective-C Language Changes in Clang -------------------------------------- - -... - -OpenCL C Language Changes in Clang ----------------------------------- - -... - OpenMP C/C++ Language Changes in Clang -------------------------------------- @@ -254,11 +226,6 @@ this section should help get you past th - Clang uses `std::unique_ptr` in many places where it used to use raw `T *` pointers. -libclang --------- - -... - Static Analyzer --------------- @@ -282,25 +249,6 @@ instead of `report-XXXXXX.html`, scan-bu List the function/method name in the index page of scan-build. -... - -Core Analysis Improvements -========================== - -- ... - -New Issues Found -================ - -- ... - -Python Binding Changes ----------------------- - -The following methods have been added: - -- ... - Significant Known Problems ========================== Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Jan 15 22:31:35 2015 (r277222) @@ -2115,6 +2115,9 @@ def warn_attribute_invalid_on_definition InGroup; def err_attribute_dll_redeclaration : Error< "redeclaration of %q0 cannot add %q1 attribute">; +def warn_attribute_dll_redeclaration : Warning< + "redeclaration of %q0 should not add %q1 attribute">, + InGroup>; def err_attribute_dllimport_function_definition : Error< "dllimport cannot be applied to non-inline function definition">; def err_attribute_dll_deleted : Error< Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -3216,18 +3216,26 @@ Value *ScalarExprEmitter::VisitChooseExp Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE) { QualType Ty = VE->getType(); + if (Ty->isVariablyModifiedType()) CGF.EmitVariablyModifiedType(Ty); llvm::Value *ArgValue = CGF.EmitVAListRef(VE->getSubExpr()); llvm::Value *ArgPtr = CGF.EmitVAArg(ArgValue, VE->getType()); + llvm::Type *ArgTy = ConvertType(VE->getType()); // If EmitVAArg fails, we fall back to the LLVM instruction. if (!ArgPtr) - return Builder.CreateVAArg(ArgValue, ConvertType(VE->getType())); + return Builder.CreateVAArg(ArgValue, ArgTy); // FIXME Volatility. - return Builder.CreateLoad(ArgPtr); + llvm::Value *Val = Builder.CreateLoad(ArgPtr); + + // If EmitVAArg promoted the type, we must truncate it. + if (ArgTy != Val->getType()) + Val = Builder.CreateTrunc(Val, ArgTy); + + return Val; } Value *ScalarExprEmitter::VisitBlockExpr(const BlockExpr *block) { Modified: vendor/clang/dist/lib/CodeGen/TargetInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/TargetInfo.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/lib/CodeGen/TargetInfo.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -5446,15 +5446,19 @@ MipsABIInfo::classifyArgumentType(QualTy // If we have reached here, aggregates are passed directly by coercing to // another structure type. Padding is inserted if the offset of the // aggregate is unaligned. - return ABIArgInfo::getDirect(HandleAggregates(Ty, TySize), 0, - getPaddingType(OrigOffset, CurrOffset)); + ABIArgInfo ArgInfo = + ABIArgInfo::getDirect(HandleAggregates(Ty, TySize), 0, + getPaddingType(OrigOffset, CurrOffset)); + ArgInfo.setInReg(true); + return ArgInfo; } // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs()) Ty = EnumTy->getDecl()->getIntegerType(); - if (Ty->isPromotableIntegerType()) + // All integral types are promoted to the GPR width. + if (Ty->isIntegralOrEnumerationType()) return ABIArgInfo::getExtend(); return ABIArgInfo::getDirect( @@ -5506,7 +5510,12 @@ MipsABIInfo::returnAggregateInRegs(QualT ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const { uint64_t Size = getContext().getTypeSize(RetTy); - if (RetTy->isVoidType() || Size == 0) + if (RetTy->isVoidType()) + return ABIArgInfo::getIgnore(); + + // O32 doesn't treat zero-sized structs differently from other structs. + // However, N32/N64 ignores zero sized return values. + if (!IsO32 && Size == 0) return ABIArgInfo::getIgnore(); if (isAggregateTypeForABI(RetTy) || RetTy->isVectorType()) { @@ -5514,12 +5523,15 @@ ABIArgInfo MipsABIInfo::classifyReturnTy if (RetTy->isAnyComplexType()) return ABIArgInfo::getDirect(); - // O32 returns integer vectors in registers. - if (IsO32 && RetTy->isVectorType() && !RetTy->hasFloatingRepresentation()) - return ABIArgInfo::getDirect(returnAggregateInRegs(RetTy, Size)); - - if (!IsO32) - return ABIArgInfo::getDirect(returnAggregateInRegs(RetTy, Size)); + // O32 returns integer vectors in registers and N32/N64 returns all small + // aggregates in registers.. + if (!IsO32 || + (RetTy->isVectorType() && !RetTy->hasFloatingRepresentation())) { + ABIArgInfo ArgInfo = + ABIArgInfo::getDirect(returnAggregateInRegs(RetTy, Size)); + ArgInfo.setInReg(true); + return ArgInfo; + } } return ABIArgInfo::getIndirect(0); @@ -5549,11 +5561,20 @@ llvm::Value* MipsABIInfo::EmitVAArg(llvm CodeGenFunction &CGF) const { llvm::Type *BP = CGF.Int8PtrTy; llvm::Type *BPP = CGF.Int8PtrPtrTy; + + // Integer arguments are promoted 32-bit on O32 and 64-bit on N32/N64. + unsigned SlotSizeInBits = IsO32 ? 32 : 64; + if (Ty->isIntegerType() && + CGF.getContext().getIntWidth(Ty) < SlotSizeInBits) { + Ty = CGF.getContext().getIntTypeForBitwidth(SlotSizeInBits, + Ty->isSignedIntegerType()); + } CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); - int64_t TypeAlign = getContext().getTypeAlign(Ty) / 8; + int64_t TypeAlign = + std::min(getContext().getTypeAlign(Ty) / 8, StackAlignInBytes); llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); llvm::Value *AddrTyped; unsigned PtrWidth = getTarget().getPointerWidth(0); @@ -5572,8 +5593,8 @@ llvm::Value* MipsABIInfo::EmitVAArg(llvm llvm::Value *AlignedAddr = Builder.CreateBitCast(AddrTyped, BP); TypeAlign = std::max((unsigned)TypeAlign, MinABIStackAlignInBytes); - uint64_t Offset = - llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, TypeAlign); + unsigned ArgSizeInBits = CGF.getContext().getTypeSize(Ty); + uint64_t Offset = llvm::RoundUpToAlignment(ArgSizeInBits / 8, TypeAlign); llvm::Value *NextAddr = Builder.CreateGEP(AlignedAddr, llvm::ConstantInt::get(IntTy, Offset), "ap.next"); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -5020,7 +5020,7 @@ static void checkDLLAttributeRedeclarati NewDecl = NewTD->getTemplatedDecl(); if (!OldDecl || !NewDecl) - return; + return; const DLLImportAttr *OldImportAttr = OldDecl->getAttr(); const DLLExportAttr *OldExportAttr = OldDecl->getAttr(); @@ -5037,13 +5037,30 @@ static void checkDLLAttributeRedeclarati // Implicitly generated declarations are also excluded for now because there // is no other way to switch these to use dllimport or dllexport. bool AddsAttr = !(OldImportAttr || OldExportAttr) && HasNewAttr; + if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { - S.Diag(NewDecl->getLocation(), diag::err_attribute_dll_redeclaration) - << NewDecl - << (NewImportAttr ? (const Attr *)NewImportAttr : NewExportAttr); + // If the declaration hasn't been used yet, allow with a warning for + // free functions and global variables. + bool JustWarn = false; + if (!OldDecl->isUsed() && !OldDecl->isCXXClassMember()) { + auto *VD = dyn_cast(OldDecl); + if (VD && !VD->getDescribedVarTemplate()) + JustWarn = true; + auto *FD = dyn_cast(OldDecl); + if (FD && FD->getTemplatedKind() == FunctionDecl::TK_NonTemplate) + JustWarn = true; + } + + unsigned DiagID = JustWarn ? diag::warn_attribute_dll_redeclaration + : diag::err_attribute_dll_redeclaration; + S.Diag(NewDecl->getLocation(), DiagID) + << NewDecl + << (NewImportAttr ? (const Attr *)NewImportAttr : NewExportAttr); S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); - NewDecl->setInvalidDecl(); - return; + if (!JustWarn) { + NewDecl->setInvalidDecl(); + return; + } } // A redeclaration is not allowed to drop a dllimport attribute, the only Modified: vendor/clang/dist/lib/Sema/SemaTemplate.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplate.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/lib/Sema/SemaTemplate.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -3692,12 +3692,12 @@ bool Sema::CheckTemplateArgumentList(Tem ArgumentPack.size(), Converted)) return true; - if (TemplateArgs[ArgIdx].getArgument().isPackExpansion() && - isa(Template) && - !(Param + 1 == ParamEnd && (*Param)->isTemplateParameterPack() && - !getExpandedPackSize(*Param))) { + bool PackExpansionIntoNonPack = + TemplateArgs[ArgIdx].getArgument().isPackExpansion() && + (!(*Param)->isTemplateParameterPack() || getExpandedPackSize(*Param)); + if (PackExpansionIntoNonPack && isa(Template)) { // Core issue 1430: we have a pack expansion as an argument to an - // alias template, and it's not part of a final parameter pack. This + // alias template, and it's not part of a parameter pack. This // can't be canonicalized, so reject it now. Diag(TemplateArgs[ArgIdx].getLocation(), diag::err_alias_template_expansion_into_fixed_list) @@ -3720,16 +3720,11 @@ bool Sema::CheckTemplateArgumentList(Tem ++Param; } - // If we just saw a pack expansion, then directly convert the remaining - // arguments, because we don't know what parameters they'll match up - // with. - if (TemplateArgs[ArgIdx-1].getArgument().isPackExpansion()) { - bool InFinalParameterPack = Param != ParamEnd && - Param + 1 == ParamEnd && - (*Param)->isTemplateParameterPack() && - !getExpandedPackSize(*Param); - - if (!InFinalParameterPack && !ArgumentPack.empty()) { + // If we just saw a pack expansion into a non-pack, then directly convert + // the remaining arguments, because we don't know what parameters they'll + // match up with. + if (PackExpansionIntoNonPack) { + if (!ArgumentPack.empty()) { // If we were part way through filling in an expanded parameter pack, // fall back to just producing individual arguments. Converted.insert(Converted.end(), @@ -3738,22 +3733,10 @@ bool Sema::CheckTemplateArgumentList(Tem } while (ArgIdx < NumArgs) { - if (InFinalParameterPack) - ArgumentPack.push_back(TemplateArgs[ArgIdx].getArgument()); - else - Converted.push_back(TemplateArgs[ArgIdx].getArgument()); + Converted.push_back(TemplateArgs[ArgIdx].getArgument()); ++ArgIdx; } - // Push the argument pack onto the list of converted arguments. - if (InFinalParameterPack) { - Converted.push_back( - TemplateArgument::CreatePackCopy(Context, - ArgumentPack.data(), - ArgumentPack.size())); - ArgumentPack.clear(); - } - return false; } Modified: vendor/clang/dist/test/CodeGen/atomics-inlining.c ============================================================================== --- vendor/clang/dist/test/CodeGen/atomics-inlining.c Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGen/atomics-inlining.c Thu Jan 15 22:31:35 2015 (r277222) @@ -76,8 +76,8 @@ void test1(void) { // MIPS32: store atomic i32 {{.*}}, i32* @i1 seq_cst // MIPS32: call i64 @__atomic_load_8(i8* bitcast (i64* @ll1 to i8*) // MIPS32: call void @__atomic_store_8(i8* bitcast (i64* @ll1 to i8*), i64 -// MIPS32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) -// MIPS32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) +// MIPS32: call void @__atomic_load(i32 zeroext 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) +// MIPS32: call void @__atomic_store(i32 zeroext 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) // MIPS64-LABEL: define void @test1 // MIPS64: = load atomic i8* @c1 seq_cst @@ -88,6 +88,6 @@ void test1(void) { // MIPS64: store atomic i32 {{.*}}, i32* @i1 seq_cst // MIPS64: = load atomic i64* @ll1 seq_cst // MIPS64: store atomic i64 {{.*}}, i64* @ll1 seq_cst -// MIPS64: call void @__atomic_load(i64 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0) -// MIPS64: call void @__atomic_store(i64 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) +// MIPS64: call void @__atomic_load(i64 zeroext 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0) +// MIPS64: call void @__atomic_store(i64 zeroext 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) } Modified: vendor/clang/dist/test/CodeGen/mips-byval-arg.c ============================================================================== --- vendor/clang/dist/test/CodeGen/mips-byval-arg.c Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGen/mips-byval-arg.c Thu Jan 15 22:31:35 2015 (r277222) @@ -7,8 +7,8 @@ typedef struct { extern void foo2(S0); -// O32-LABEL: define void @foo1(i32 %a0.coerce0, i32 %a0.coerce1, i32 %a0.coerce2) -// N64-LABEL: define void @foo1(i64 %a0.coerce0, i32 %a0.coerce1) +// O32-LABEL: define void @foo1(i32 inreg %a0.coerce0, i32 inreg %a0.coerce1, i32 inreg %a0.coerce2) +// N64-LABEL: define void @foo1(i64 inreg %a0.coerce0, i32 inreg %a0.coerce1) void foo1(S0 a0) { foo2(a0); Added: vendor/clang/dist/test/CodeGen/mips-varargs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/CodeGen/mips-varargs.c Thu Jan 15 22:31:35 2015 (r277222) @@ -0,0 +1,176 @@ +// RUN: %clang_cc1 -triple mips-unknown-linux -o - -O1 -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=O32 +// RUN: %clang_cc1 -triple mipsel-unknown-linux -o - -O1 -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=O32 +// RUN: %clang_cc1 -triple mips64-unknown-linux -o - -O1 -emit-llvm -target-abi n32 %s | FileCheck %s -check-prefix=ALL -check-prefix=N32 -check-prefix=NEW +// RUN: %clang_cc1 -triple mips64-unknown-linux -o - -O1 -emit-llvm -target-abi n32 %s | FileCheck %s -check-prefix=ALL -check-prefix=N32 -check-prefix=NEW +// RUN: %clang_cc1 -triple mips64-unknown-linux -o - -O1 -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=N64 -check-prefix=NEW +// RUN: %clang_cc1 -triple mips64el-unknown-linux -o - -O1 -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=N64 -check-prefix=NEW + +#include + +typedef int v4i32 __attribute__ ((__vector_size__ (16))); + +int test_i32(char *fmt, ...) { + va_list va; + + va_start(va, fmt); + int v = va_arg(va, int); + va_end(va); + + return v; +} + +// ALL-LABEL: define i32 @test_i32(i8*{{.*}} %fmt, ...) +// +// O32: %va = alloca i8*, align [[PTRALIGN:4]] +// N32: %va = alloca i8*, align [[PTRALIGN:4]] +// N64: %va = alloca i8*, align [[PTRALIGN:8]] +// +// ALL: [[VA1:%.+]] = bitcast i8** %va to i8* +// ALL: call void @llvm.va_start(i8* [[VA1]]) +// +// ALL: [[AP_CUR:%.+]] = load i8** %va, align [[PTRALIGN]] +// +// O32: [[TMP0:%.+]] = bitcast i8* [[AP_CUR]] to i32* +// NEW: [[TMP0:%.+]] = bitcast i8* [[AP_CUR]] to i64* +// +// O32: [[AP_NEXT:%.+]] = getelementptr i8* [[AP_CUR]], i32 4 +// NEW: [[AP_NEXT:%.+]] = getelementptr i8* [[AP_CUR]], {{i32|i64}} 8 +// +// ALL: store i8* [[AP_NEXT]], i8** %va, align [[PTRALIGN]] +// +// O32: [[ARG1:%.+]] = load i32* [[TMP0]], align 4 +// NEW: [[TMP2:%.+]] = load i64* [[TMP0]], align 8 +// NEW: [[ARG1:%.+]] = trunc i64 [[TMP2]] to i32 +// +// ALL: call void @llvm.va_end(i8* [[VA1]]) +// ALL: ret i32 [[ARG1]] +// ALL: } + +int test_i32_2args(char *fmt, ...) { + va_list va; + + va_start(va, fmt); + int v1 = va_arg(va, int); + int v2 = va_arg(va, int); + va_end(va); + + return v1 + v2; +} + +// ALL-LABEL: define i32 @test_i32_2args(i8*{{.*}} %fmt, ...) +// +// ALL: %va = alloca i8*, align [[PTRALIGN]] +// ALL: [[VA1:%.+]] = bitcast i8** %va to i8* +// ALL: call void @llvm.va_start(i8* [[VA1]]) +// +// ALL: [[AP_CUR:%.+]] = load i8** %va, align [[PTRALIGN]] +// +// O32: [[TMP0:%.+]] = bitcast i8* [[AP_CUR]] to i32* +// NEW: [[TMP0:%.+]] = bitcast i8* [[AP_CUR]] to i64* +// +// O32: [[AP_NEXT:%.+]] = getelementptr i8* [[AP_CUR]], i32 4 +// NEW: [[AP_NEXT:%.+]] = getelementptr i8* [[AP_CUR]], [[INTPTR_T:i32|i64]] 8 +// +// O32: store i8* [[AP_NEXT]], i8** %va, align [[PTRALIGN]] +// FIXME: N32 optimised this store out. Why only for this ABI? +// N64: store i8* [[AP_NEXT]], i8** %va, align [[PTRALIGN]] +// +// O32: [[ARG1:%.+]] = load i32* [[TMP0]], align 4 +// NEW: [[TMP3:%.+]] = load i64* [[TMP0]], align 8 +// NEW: [[ARG1:%.+]] = trunc i64 [[TMP3]] to i32 +// +// O32: [[TMP1:%.+]] = bitcast i8* [[AP_NEXT]] to i32* +// NEW: [[TMP1:%.+]] = bitcast i8* [[AP_NEXT]] to i64* +// +// O32: [[AP_NEXT3:%.+]] = getelementptr i8* [[AP_CUR]], i32 8 +// NEW: [[AP_NEXT3:%.+]] = getelementptr i8* [[AP_CUR]], [[INTPTR_T]] 16 +// +// ALL: store i8* [[AP_NEXT3]], i8** %va, align [[PTRALIGN]] +// +// O32: [[ARG2:%.+]] = load i32* [[TMP1]], align 4 +// NEW: [[TMP4:%.+]] = load i64* [[TMP1]], align 8 +// NEW: [[ARG2:%.+]] = trunc i64 [[TMP4]] to i32 +// +// ALL: call void @llvm.va_end(i8* [[VA1]]) +// ALL: [[ADD:%.+]] = add nsw i32 [[ARG2]], [[ARG1]] +// ALL: ret i32 [[ADD]] +// ALL: } + +long long test_i64(char *fmt, ...) { + va_list va; + + va_start(va, fmt); + long long v = va_arg(va, long long); + va_end(va); + + return v; +} + +// ALL-LABEL: define i64 @test_i64(i8*{{.*}} %fmt, ...) +// +// ALL: %va = alloca i8*, align [[PTRALIGN]] +// ALL: [[VA1:%.+]] = bitcast i8** %va to i8* +// ALL: call void @llvm.va_start(i8* [[VA1]]) +// +// ALL: [[AP_CUR:%.+]] = load i8** %va, align [[PTRALIGN]] +// +// NEW: [[TMP0:%.+]] = bitcast i8* [[AP_CUR]] to i64* +// +// i64 is 8-byte aligned, while this is within O32's stack alignment there's no +// guarantee that the offset is still 8-byte aligned after earlier reads. +// O32: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]] +// O32: [[PTR1:%.+]] = add i32 [[PTR0]], 7 +// O32: [[PTR2:%.+]] = and i32 [[PTR1]], -8 +// O32: [[PTR3:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i64* +// O32: [[PTR4:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i8* +// +// O32: [[AP_NEXT:%.+]] = getelementptr i8* [[PTR4]], [[INTPTR_T]] 8 +// NEW: [[AP_NEXT:%.+]] = getelementptr i8* [[AP_CUR]], [[INTPTR_T]] 8 +// +// ALL: store i8* [[AP_NEXT]], i8** %va, align [[PTRALIGN]] +// +// O32: [[ARG1:%.+]] = load i64* [[PTR3]], align 8 +// NEW: [[ARG1:%.+]] = load i64* [[TMP0]], align 8 +// +// ALL: call void @llvm.va_end(i8* [[VA1]]) +// ALL: ret i64 [[ARG1]] +// ALL: } + +int test_v4i32(char *fmt, ...) { + va_list va; + + va_start(va, fmt); + v4i32 v = va_arg(va, v4i32); + va_end(va); + + return v[0]; +} + +// ALL-LABEL: define i32 @test_v4i32(i8*{{.*}} %fmt, ...) +// +// ALL: %va = alloca i8*, align [[PTRALIGN]] +// ALL: [[VA1:%.+]] = bitcast i8** %va to i8* +// ALL: call void @llvm.va_start(i8* [[VA1]]) +// ALL: [[AP_CUR:%.+]] = load i8** %va, align [[PTRALIGN]] +// +// O32: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]] +// N32: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]] +// N64: [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i64]] +// +// Vectors are 16-byte aligned, however the O32 ABI has a maximum alignment of +// 8-bytes since the base of the stack is 8-byte aligned. +// O32: [[PTR1:%.+]] = add i32 [[PTR0]], 7 +// O32: [[PTR2:%.+]] = and i32 [[PTR1]], -8 +// +// NEW: [[PTR1:%.+]] = add [[INTPTR_T]] [[PTR0]], 15 +// NEW: [[PTR2:%.+]] = and [[INTPTR_T]] [[PTR1]], -16 +// +// ALL: [[PTR3:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to <4 x i32>* +// ALL: [[PTR4:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i8* +// ALL: [[AP_NEXT:%.+]] = getelementptr i8* [[PTR4]], [[INTPTR_T]] 16 +// ALL: store i8* [[AP_NEXT]], i8** %va, align [[PTRALIGN]] +// ALL: [[PTR5:%.+]] = load <4 x i32>* [[PTR3]], align 16 +// ALL: call void @llvm.va_end(i8* [[VA1]]) +// ALL: [[VECEXT:%.+]] = extractelement <4 x i32> [[PTR5]], i32 0 +// ALL: ret i32 [[VECEXT]] +// ALL: } Modified: vendor/clang/dist/test/CodeGen/mips-vector-arg.c ============================================================================== --- vendor/clang/dist/test/CodeGen/mips-vector-arg.c Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGen/mips-vector-arg.c Thu Jan 15 22:31:35 2015 (r277222) @@ -8,19 +8,19 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32: define void @test_v4sf(i32 %a1.coerce0, i32 %a1.coerce1, i32 %a1.coerce2, i32 %a1.coerce3, i32 %a2, i32, i32 %a3.coerce0, i32 %a3.coerce1, i32 %a3.coerce2, i32 %a3.coerce3) [[NUW:#[0-9]+]] -// O32: declare i32 @test_v4sf_2(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -// N64: define void @test_v4sf(i64 %a1.coerce0, i64 %a1.coerce1, i32 %a2, i64, i64 %a3.coerce0, i64 %a3.coerce1) [[NUW:#[0-9]+]] -// N64: declare i32 @test_v4sf_2(i64, i64, i32, i64, i64, i64) +// O32: define void @test_v4sf(i32 inreg %a1.coerce0, i32 inreg %a1.coerce1, i32 inreg %a1.coerce2, i32 inreg %a1.coerce3, i32 signext %a2, i32, i32 inreg %a3.coerce0, i32 inreg %a3.coerce1, i32 inreg %a3.coerce2, i32 inreg %a3.coerce3) [[NUW:#[0-9]+]] +// O32: declare i32 @test_v4sf_2(i32 inreg, i32 inreg, i32 inreg, i32 inreg, i32 signext, i32, i32 inreg, i32 inreg, i32 inreg, i32 inreg) +// N64: define void @test_v4sf(i64 inreg %a1.coerce0, i64 inreg %a1.coerce1, i32 signext %a2, i64, i64 inreg %a3.coerce0, i64 inreg %a3.coerce1) [[NUW:#[0-9]+]] +// N64: declare i32 @test_v4sf_2(i64 inreg, i64 inreg, i32 signext, i64, i64 inreg, i64 inreg) extern test_v4sf_2(v4sf, int, v4sf); void test_v4sf(v4sf a1, int a2, v4sf a3) { test_v4sf_2(a3, a2, a1); } -// O32: define void @test_v4i32(i32 %a1.coerce0, i32 %a1.coerce1, i32 %a1.coerce2, i32 %a1.coerce3, i32 %a2, i32, i32 %a3.coerce0, i32 %a3.coerce1, i32 %a3.coerce2, i32 %a3.coerce3) [[NUW]] -// O32: declare i32 @test_v4i32_2(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -// N64: define void @test_v4i32(i64 %a1.coerce0, i64 %a1.coerce1, i32 %a2, i64, i64 %a3.coerce0, i64 %a3.coerce1) [[NUW]] -// N64: declare i32 @test_v4i32_2(i64, i64, i32, i64, i64, i64) +// O32: define void @test_v4i32(i32 inreg %a1.coerce0, i32 inreg %a1.coerce1, i32 inreg %a1.coerce2, i32 inreg %a1.coerce3, i32 signext %a2, i32, i32 inreg %a3.coerce0, i32 inreg %a3.coerce1, i32 inreg %a3.coerce2, i32 inreg %a3.coerce3) [[NUW]] +// O32: declare i32 @test_v4i32_2(i32 inreg, i32 inreg, i32 inreg, i32 inreg, i32 signext, i32, i32 inreg, i32 inreg, i32 inreg, i32 inreg) +// N64: define void @test_v4i32(i64 inreg %a1.coerce0, i64 inreg %a1.coerce1, i32 signext %a2, i64, i64 inreg %a3.coerce0, i64 inreg %a3.coerce1) [[NUW]] +// N64: declare i32 @test_v4i32_2(i64 inreg, i64 inreg, i32 signext, i64, i64 inreg, i64 inreg) extern test_v4i32_2(v4i32, int, v4i32); void test_v4i32(v4i32 a1, int a2, v4i32 a3) { test_v4i32_2(a3, a2, a1); Modified: vendor/clang/dist/test/CodeGen/mips-vector-return.c ============================================================================== --- vendor/clang/dist/test/CodeGen/mips-vector-return.c Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGen/mips-vector-return.c Thu Jan 15 22:31:35 2015 (r277222) @@ -9,7 +9,7 @@ typedef double v4df __attribute__ ((__ve typedef int v4i32 __attribute__ ((__vector_size__ (16))); // O32-LABEL: define void @test_v4sf(<4 x float>* noalias nocapture sret -// N64: define { i64, i64 } @test_v4sf +// N64: define inreg { i64, i64 } @test_v4sf v4sf test_v4sf(float a) { return (v4sf){0.0f, a, 0.0f, 0.0f}; } @@ -23,8 +23,8 @@ v4df test_v4df(double a) { // O32 returns integer vectors whose size is equal to or smaller than 16-bytes // in integer registers. // -// O32: define { i32, i32, i32, i32 } @test_v4i32 -// N64: define { i64, i64 } @test_v4i32 +// O32: define inreg { i32, i32, i32, i32 } @test_v4i32 +// N64: define inreg { i64, i64 } @test_v4i32 v4i32 test_v4i32(int a) { return (v4i32){0, a, 0, 0}; } Added: vendor/clang/dist/test/CodeGen/mips-zero-sized-struct.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/CodeGen/mips-zero-sized-struct.c Thu Jan 15 22:31:35 2015 (r277222) @@ -0,0 +1,16 @@ +// RUN: %clang -target mips-unknown-linux-gnu -S -emit-llvm -o - %s | FileCheck -check-prefix=O32 %s +// RUN: %clang -target mipsel-unknown-linux-gnu -S -emit-llvm -o - %s | FileCheck -check-prefix=O32 %s +// RUN: %clang -target mips64-unknown-linux-gnu -S -emit-llvm -o - %s -mabi=n32 | FileCheck -check-prefix=N32 %s +// RUN: %clang -target mips64el-unknown-linux-gnu -S -emit-llvm -o - %s -mabi=n32 | FileCheck -check-prefix=N32 %s +// RUN: %clang -target mips64-unknown-linux-gnu -S -emit-llvm -o - %s | FileCheck -check-prefix=N64 %s +// RUN: %clang -target mips64el-unknown-linux-gnu -S -emit-llvm -o - %s | FileCheck -check-prefix=N64 %s + +// O32: define void @fn28(%struct.T2* noalias sret %agg.result, i8 signext %arg0) +// N32: define void @fn28(i8 signext %arg0) +// N64: define void @fn28(i8 signext %arg0) + +typedef struct T2 { } T2; +T2 T2_retval; +T2 fn28(char arg0) { + return T2_retval; +} Modified: vendor/clang/dist/test/CodeGen/mips64-class-return.cpp ============================================================================== --- vendor/clang/dist/test/CodeGen/mips64-class-return.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGen/mips64-class-return.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -24,22 +24,22 @@ extern D0 gd0; extern D1 gd1; extern D2 gd2; -// CHECK: define { i64, i64 } @_Z4foo1v() +// CHECK: define inreg { i64, i64 } @_Z4foo1v() D0 foo1(void) { return gd0; } -// CHECK: define { double, float } @_Z4foo2v() +// CHECK: define inreg { double, float } @_Z4foo2v() D1 foo2(void) { return gd1; } -// CHECK-LABEL: define void @_Z4foo32D2(i64 %a0.coerce0, double %a0.coerce1) +// CHECK-LABEL: define void @_Z4foo32D2(i64 inreg %a0.coerce0, double inreg %a0.coerce1) void foo3(D2 a0) { gd2 = a0; } -// CHECK-LABEL: define void @_Z4foo42D0(i64 %a0.coerce0, i64 %a0.coerce1) +// CHECK-LABEL: define void @_Z4foo42D0(i64 inreg %a0.coerce0, i64 inreg %a0.coerce1) void foo4(D0 a0) { gd0 = a0; } Modified: vendor/clang/dist/test/CodeGen/mips64-padding-arg.c ============================================================================== --- vendor/clang/dist/test/CodeGen/mips64-padding-arg.c Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGen/mips64-padding-arg.c Thu Jan 15 22:31:35 2015 (r277222) @@ -9,9 +9,9 @@ typedef struct { // Insert padding to ensure arguments of type S0 are aligned to 16-byte boundaries. -// N64-LABEL: define void @foo1(i32 %a0, i64, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 %b, i64, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3) -// N64: tail call void @foo2(i32 1, i32 2, i32 %a0, i64 undef, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 3, i64 undef, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3) -// N64: declare void @foo2(i32, i32, i32, i64, double, i64, i64, i64, double, i64, i64, i64, i32, i64, double, i64, i64, i64) +// N64-LABEL: define void @foo1(i32 signext %a0, i64, double inreg %a1.coerce0, i64 inreg %a1.coerce1, i64 inreg %a1.coerce2, i64 inreg %a1.coerce3, double inreg %a2.coerce0, i64 inreg %a2.coerce1, i64 inreg %a2.coerce2, i64 inreg %a2.coerce3, i32 signext %b, i64, double inreg %a3.coerce0, i64 inreg %a3.coerce1, i64 inreg %a3.coerce2, i64 inreg %a3.coerce3) +// N64: tail call void @foo2(i32 signext 1, i32 signext 2, i32 signext %a0, i64 undef, double inreg %a1.coerce0, i64 inreg %a1.coerce1, i64 inreg %a1.coerce2, i64 inreg %a1.coerce3, double inreg %a2.coerce0, i64 inreg %a2.coerce1, i64 inreg %a2.coerce2, i64 inreg %a2.coerce3, i32 signext 3, i64 undef, double inreg %a3.coerce0, i64 inreg %a3.coerce1, i64 inreg %a3.coerce2, i64 inreg %a3.coerce3) +// N64: declare void @foo2(i32 signext, i32 signext, i32 signext, i64, double inreg, i64 inreg, i64 inreg, i64 inreg, double inreg, i64 inreg, i64 inreg, i64 inreg, i32 signext, i64, double inreg, i64 inreg, i64 inreg, i64 inreg) extern void foo2(int, int, int, S0, S0, int, S0); @@ -21,9 +21,9 @@ void foo1(int a0, S0 a1, S0 a2, int b, S // Insert padding before long double argument. // -// N64-LABEL: define void @foo3(i32 %a0, i64, fp128 %a1) -// N64: tail call void @foo4(i32 1, i32 2, i32 %a0, i64 undef, fp128 %a1) -// N64: declare void @foo4(i32, i32, i32, i64, fp128) +// N64-LABEL: define void @foo3(i32 signext %a0, i64, fp128 %a1) +// N64: tail call void @foo4(i32 signext 1, i32 signext 2, i32 signext %a0, i64 undef, fp128 %a1) +// N64: declare void @foo4(i32 signext, i32 signext, i32 signext, i64, fp128) extern void foo4(int, int, int, long double); @@ -34,8 +34,8 @@ void foo3(int a0, long double a1) { // Insert padding after hidden argument. // // N64-LABEL: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0) -// N64: call void @foo6(%struct.S0* sret %agg.result, i32 1, i32 2, i64 undef, fp128 %a0) -// N64: declare void @foo6(%struct.S0* sret, i32, i32, i64, fp128) +// N64: call void @foo6(%struct.S0* sret %agg.result, i32 signext 1, i32 signext 2, i64 undef, fp128 %a0) +// N64: declare void @foo6(%struct.S0* sret, i32 signext, i32 signext, i64, fp128) extern S0 foo6(int, int, long double); @@ -55,7 +55,7 @@ void foo7(float a0, double a1) { } // O32-LABEL: define void @foo9() -// O32: declare void @foo10(i32, i32 +// O32: declare void @foo10(i32 signext, i32 typedef struct __attribute__((aligned(16))) { int a; Modified: vendor/clang/dist/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -10,13 +10,13 @@ long *alloc_long() { return rv; } // O32-LABEL: define i32* @_Z10alloc_longv() -// O32: call noalias i8* @_Znwj(i32 4) +// O32: call noalias i8* @_Znwj(i32 zeroext 4) // N32-LABEL: define i32* @_Z10alloc_longv() -// N32: call noalias i8* @_Znwj(i32 4) +// N32: call noalias i8* @_Znwj(i32 zeroext 4) // N64-LABEL: define i64* @_Z10alloc_longv() -// N64: call noalias i8* @_Znwm(i64 8) +// N64: call noalias i8* @_Znwm(i64 zeroext 8) long *alloc_long_array() { long *rv = new long[2]; @@ -24,13 +24,13 @@ long *alloc_long_array() { } // O32-LABEL: define i32* @_Z16alloc_long_arrayv() -// O32: call noalias i8* @_Znaj(i32 8) +// O32: call noalias i8* @_Znaj(i32 zeroext 8) // N32-LABEL: define i32* @_Z16alloc_long_arrayv() -// N32: call noalias i8* @_Znaj(i32 8) +// N32: call noalias i8* @_Znaj(i32 zeroext 8) // N64-LABEL: define i64* @_Z16alloc_long_arrayv() -// N64: call noalias i8* @_Znam(i64 16) +// N64: call noalias i8* @_Znam(i64 zeroext 16) #include Modified: vendor/clang/dist/test/Driver/cl-x86-flags.c ============================================================================== --- vendor/clang/dist/test/Driver/cl-x86-flags.c Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/Driver/cl-x86-flags.c Thu Jan 15 22:31:35 2015 (r277222) @@ -9,73 +9,73 @@ // MFLAGS-NOT: argument unused during compilation // -arch:IA32 is no-op. -// RUN: %clang_cl -m32 -arch:IA32 -### -- 2>&1 %s | FileCheck -check-prefix=IA32 %s +// RUN: %clang_cl -m32 -arch:IA32 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=IA32 %s // IA32-NOT: argument unused during compilation // IA32-NOT: -target-feature -// RUN: %clang_cl -m32 -arch:ia32 -### -- 2>&1 %s | FileCheck -check-prefix=ia32 %s +// RUN: %clang_cl -m32 -arch:ia32 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=ia32 %s // ia32: argument unused during compilation // ia32-NOT: -target-feature -// RUN: %clang_cl -m64 -arch:IA32 -### -- 2>&1 %s | FileCheck -check-prefix=IA3264 %s +// RUN: %clang_cl -m64 -arch:IA32 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=IA3264 %s // IA3264: argument unused during compilation // IA3264-NOT: -target-feature -// RUN: %clang_cl -m32 -arch:SSE -### -- 2>&1 %s | FileCheck -check-prefix=SSE %s +// RUN: %clang_cl -m32 -arch:SSE --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=SSE %s // SSE: -target-feature // SSE: +sse // SSE-NOT: argument unused during compilation -// RUN: %clang_cl -m32 -arch:sse -### -- 2>&1 %s | FileCheck -check-prefix=sse %s +// RUN: %clang_cl -m32 -arch:sse --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s // sse: argument unused during compilation // sse-NOT: -target-feature -// RUN: %clang_cl -m32 -arch:SSE2 -### -- 2>&1 %s | FileCheck -check-prefix=SSE2 %s +// RUN: %clang_cl -m32 -arch:SSE2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=SSE2 %s // SSE2: -target-feature // SSE2: +sse2 // SSE2-NOT: argument unused during compilation -// RUN: %clang_cl -m32 -arch:sse2 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s +// RUN: %clang_cl -m32 -arch:sse2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s // sse2: argument unused during compilation // sse2-NOT: -target-feature -// RUN: %clang_cl -m64 -arch:SSE -### -- 2>&1 %s | FileCheck -check-prefix=SSE64 %s +// RUN: %clang_cl -m64 -arch:SSE --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=SSE64 %s // SSE64: argument unused during compilation // SSE64-NOT: -target-feature -// RUN: %clang_cl -m64 -arch:SSE2 -### -- 2>&1 %s | FileCheck -check-prefix=SSE264 %s +// RUN: %clang_cl -m64 -arch:SSE2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=SSE264 %s // SSE264: argument unused during compilation // SSE264-NOT: -target-feature -// RUN: %clang_cl -m32 -arch:AVX -### -- 2>&1 %s | FileCheck -check-prefix=AVX %s +// RUN: %clang_cl -m32 -arch:AVX --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=AVX %s // AVX: -target-feature // AVX: +avx -// RUN: %clang_cl -m32 -arch:avx -### -- 2>&1 %s | FileCheck -check-prefix=avx %s +// RUN: %clang_cl -m32 -arch:avx --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=avx %s // avx: argument unused during compilation // avx-NOT: -target-feature -// RUN: %clang_cl -m32 -arch:AVX2 -### -- 2>&1 %s | FileCheck -check-prefix=AVX2 %s +// RUN: %clang_cl -m32 -arch:AVX2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=AVX2 %s // AVX2: -target-feature // AVX2: +avx2 -// RUN: %clang_cl -m32 -arch:avx2 -### -- 2>&1 %s | FileCheck -check-prefix=avx2 %s +// RUN: %clang_cl -m32 -arch:avx2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=avx2 %s // avx2: argument unused during compilation // avx2-NOT: -target-feature -// RUN: %clang_cl -m64 -arch:AVX -### -- 2>&1 %s | FileCheck -check-prefix=AVX64 %s +// RUN: %clang_cl -m64 -arch:AVX --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=AVX64 %s // AVX64: -target-feature // AVX64: +avx -// RUN: %clang_cl -m64 -arch:avx -### -- 2>&1 %s | FileCheck -check-prefix=avx64 %s +// RUN: %clang_cl -m64 -arch:avx --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=avx64 %s // avx64: argument unused during compilation // avx64-NOT: -target-feature -// RUN: %clang_cl -m64 -arch:AVX2 -### -- 2>&1 %s | FileCheck -check-prefix=AVX264 %s +// RUN: %clang_cl -m64 -arch:AVX2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=AVX264 %s // AVX264: -target-feature // AVX264: +avx2 -// RUN: %clang_cl -m64 -arch:avx2 -### -- 2>&1 %s | FileCheck -check-prefix=avx264 %s +// RUN: %clang_cl -m64 -arch:avx2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=avx264 %s // avx264: argument unused during compilation // avx264-NOT: -target-feature Modified: vendor/clang/dist/test/Driver/mips-cs.cpp ============================================================================== --- vendor/clang/dist/test/Driver/mips-cs.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/Driver/mips-cs.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -17,6 +17,7 @@ // CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-HF-32: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-HF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc" +// CHECK-BE-HF-32: "-dynamic-linker" "/lib/ld.so.1" // CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-HF-32: "[[TC]]{{/|\\\\}}crtbegin.o" @@ -44,6 +45,7 @@ // CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-HF-16: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-HF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16" +// CHECK-BE-HF-16: "-dynamic-linker" "/lib/ld.so.1" // CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-HF-16: "[[TC]]/mips16{{/|\\\\}}crtbegin.o" @@ -72,6 +74,7 @@ // CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-HF-MICRO: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-HF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips" +// CHECK-BE-HF-MICRO: "-dynamic-linker" "/lib/ld.so.1" // CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-HF-MICRO: "[[TC]]/micromips{{/|\\\\}}crtbegin.o" @@ -100,6 +103,7 @@ // CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-HF-NAN: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-HF-NAN: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/nan2008" +// CHECK-BE-HF-NAN: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1" // CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-HF-NAN: "[[TC]]/nan2008{{/|\\\\}}crtbegin.o" @@ -128,6 +132,7 @@ // CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-SF-32: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-SF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float" +// CHECK-BE-SF-32: "-dynamic-linker" "/lib/ld.so.1" // CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-SF-32: "[[TC]]/soft-float{{/|\\\\}}crtbegin.o" @@ -156,6 +161,7 @@ // CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-SF-16: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-SF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float" +// CHECK-BE-SF-16: "-dynamic-linker" "/lib/ld.so.1" // CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-SF-16: "[[TC]]/mips16/soft-float{{/|\\\\}}crtbegin.o" @@ -184,6 +190,7 @@ // CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-SF-MICRO: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-SF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float" +// CHECK-BE-SF-MICRO: "-dynamic-linker" "/lib/ld.so.1" // CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-BE-SF-MICRO: "[[TC]]/micromips/soft-float{{/|\\\\}}crtbegin.o" @@ -212,6 +219,7 @@ // CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-HF-64: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-HF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc" +// CHECK-BE-HF-64: "-dynamic-linker" "/lib64/ld.so.1" // CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crt1.o" // CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crti.o" // CHECK-BE-HF-64: "[[TC]]/64{{/|\\\\}}crtbegin.o" @@ -240,6 +248,7 @@ // CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-BE-SF-64: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-SF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float" +// CHECK-BE-SF-64: "-dynamic-linker" "/lib64/ld.so.1" // CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crt1.o" // CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crti.o" // CHECK-BE-SF-64: "[[TC]]/soft-float/64{{/|\\\\}}crtbegin.o" @@ -268,6 +277,7 @@ // CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-HF-32: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-HF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/el" +// CHECK-EL-HF-32: "-dynamic-linker" "/lib/ld.so.1" // CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-HF-32: "[[TC]]/el{{/|\\\\}}crtbegin.o" @@ -296,6 +306,7 @@ // CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-HF-16: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-HF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16/el" +// CHECK-EL-HF-16: "-dynamic-linker" "/lib/ld.so.1" // CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-HF-16: "[[TC]]/mips16/el{{/|\\\\}}crtbegin.o" @@ -324,6 +335,7 @@ // CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-HF-MICRO: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-HF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips/el" +// CHECK-EL-HF-MICRO: "-dynamic-linker" "/lib/ld.so.1" // CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-HF-MICRO: "[[TC]]/micromips/el{{/|\\\\}}crtbegin.o" @@ -352,6 +364,7 @@ // CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-HF-NAN: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-HF-NAN: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el" +// CHECK-EL-HF-NAN: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1" // CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-HF-NAN: "[[TC]]/nan2008/el{{/|\\\\}}crtbegin.o" @@ -380,6 +393,7 @@ // CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-SF-32: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-SF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el" +// CHECK-EL-SF-32: "-dynamic-linker" "/lib/ld.so.1" // CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-SF-32: "[[TC]]/soft-float/el{{/|\\\\}}crtbegin.o" @@ -408,6 +422,7 @@ // CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-SF-16: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-SF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el" +// CHECK-EL-SF-16: "-dynamic-linker" "/lib/ld.so.1" // CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-SF-16: "[[TC]]/mips16/soft-float/el{{/|\\\\}}crtbegin.o" @@ -436,6 +451,7 @@ // CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-SF-MICRO: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-SF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el" +// CHECK-EL-SF-MICRO: "-dynamic-linker" "/lib/ld.so.1" // CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o" // CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o" // CHECK-EL-SF-MICRO: "[[TC]]/micromips/soft-float/el{{/|\\\\}}crtbegin.o" @@ -464,6 +480,7 @@ // CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-HF-64: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-HF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/el" +// CHECK-EL-HF-64: "-dynamic-linker" "/lib64/ld.so.1" // CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crt1.o" // CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crti.o" // CHECK-EL-HF-64: "[[TC]]/el/64{{/|\\\\}}crtbegin.o" @@ -492,6 +509,7 @@ // CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include" // CHECK-EL-SF-64: "{{.*}}ld{{(.exe)?}}" // CHECK-EL-SF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el" +// CHECK-EL-SF-64: "-dynamic-linker" "/lib64/ld.so.1" // CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crt1.o" // CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crti.o" // CHECK-EL-SF-64: "[[TC]]/soft-float/el/64{{/|\\\\}}crtbegin.o" Modified: vendor/clang/dist/test/Driver/mips-fsf.cpp ============================================================================== --- vendor/clang/dist/test/Driver/mips-fsf.cpp Thu Jan 15 22:31:11 2015 (r277221) +++ vendor/clang/dist/test/Driver/mips-fsf.cpp Thu Jan 15 22:31:35 2015 (r277222) @@ -17,6 +17,7 @@ // CHECK-BE-HF-32: "[[TC]]/../../../../sysroot/usr/include" // CHECK-BE-HF-32: "{{.*}}ld{{(.exe)?}}" // CHECK-BE-HF-32: "--sysroot=[[TC]]/../../../../sysroot/mips32" +// CHECK-BE-HF-32: "-dynamic-linker" "/lib/ld.so.1" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 22:32:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C27B81CD; Thu, 15 Jan 2015 22:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94C3DA9E; Thu, 15 Jan 2015 22:32:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0FMW43w042140; Thu, 15 Jan 2015 22:32:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FMW4vK042139; Thu, 15 Jan 2015 22:32:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501152232.t0FMW4vK042139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 15 Jan 2015 22:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277223 - vendor/clang/clang-release_351-r225668 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 22:32:04 -0000 Author: dim Date: Thu Jan 15 22:32:03 2015 New Revision: 277223 URL: https://svnweb.freebsd.org/changeset/base/277223 Log: Tag clang tags/RELEASE_351/final r225668 (effectively, 3.5.1 release). Added: vendor/clang/clang-release_351-r225668/ - copied from r277222, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 23:03:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BF8986A; Thu, 15 Jan 2015 23:03:10 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D51EDEB; Thu, 15 Jan 2015 23:03:09 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YBtRP-000For-HI; Thu, 15 Jan 2015 23:03:03 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0FN325Y092103; Thu, 15 Jan 2015 16:03:02 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+WArjyaAPB3QfmLEOhHS0U Message-ID: <1421362982.14601.280.camel@freebsd.org> Subject: Re: svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen From: Ian Lepore To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Date: Thu, 15 Jan 2015 16:03:02 -0700 In-Reply-To: <201501151627.t0FGRLY2062439@svn.freebsd.org> References: <201501151627.t0FGRLY2062439@svn.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ilsoft.org id t0FN325Y092103 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 23:03:10 -0000 On Thu, 2015-01-15 at 16:27 +0000, Roger Pau Monn=E9 wrote: > Author: royger > Date: Thu Jan 15 16:27:20 2015 > New Revision: 277215 > URL: https://svnweb.freebsd.org/changeset/base/277215 >=20 > Log: > loader: implement multiboot support for Xen Dom0 > [...] >=20 > Added: > head/sys/boot/i386/libi386/multiboot.c (contents, props changed) > head/sys/boot/i386/libi386/multiboot.h (contents, props changed) > head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props chang= ed) > Modified: > head/sys/amd64/include/metadata.h > head/sys/boot/common/bootstrap.h > head/sys/boot/common/load_elf.c > head/sys/boot/common/load_elf_obj.c > head/sys/boot/common/module.c > head/sys/boot/fdt/fdt_loader_cmd.c > head/sys/boot/forth/beastie.4th > head/sys/boot/forth/loader.4th > head/sys/boot/forth/support.4th > head/sys/boot/i386/libi386/Makefile > head/sys/boot/i386/libi386/bootinfo64.c > head/sys/boot/i386/libi386/elf64_freebsd.c > head/sys/boot/i386/libi386/libi386.h > head/sys/boot/i386/loader/conf.c > head/sys/i386/include/metadata.h > head/sys/x86/xen/pv.c Something about this change breaks ubldr on arm (it works @ r277214). Now on an RPi I get this: /boot/kernel/kernel data=3D0x4cf8a4+0x3475c syms=3D[0x4+0x91650+0x4+0x533= 54] panic: Address offset 0x40000000 bigger than size 0x1E000000 There is a single physical extent of ram from 0-0x1e000000. -- Ian From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 01:28:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74BBF2F9; Fri, 16 Jan 2015 01:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6077BDFC; Fri, 16 Jan 2015 01:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G1STaA024073; Fri, 16 Jan 2015 01:28:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1SSfi024070; Fri, 16 Jan 2015 01:28:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160128.t0G1SSfi024070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 01:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277225 - in head/sys: conf modules/cxgbe/if_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:28:29 -0000 Author: np Date: Fri Jan 16 01:28:28 2015 New Revision: 277225 URL: https://svnweb.freebsd.org/changeset/base/277225 Log: Make cxgbe(4) buildable with the gcc in base. Modified: head/sys/conf/files head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 15 23:03:24 2015 (r277224) +++ head/sys/conf/files Fri Jan 16 01:28:28 2015 (r277225) @@ -1141,7 +1141,7 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ - compile-with "${NORMAL_C} -I$S/dev/cxgbe" + compile-with "${NORMAL_C} -I$S/dev/cxgbe -fms-extensions" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ Modified: head/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/if_cxgbe/Makefile Thu Jan 15 23:03:24 2015 (r277224) +++ head/sys/modules/cxgbe/if_cxgbe/Makefile Fri Jan 16 01:28:28 2015 (r277225) @@ -23,6 +23,6 @@ SRCS+= t4_tracer.c # Provide the timestamp of a packet in its header mbuf. #CFLAGS+= -DT4_PKT_TIMESTAMP -CFLAGS+= -I${CXGBE} +CFLAGS+= -I${CXGBE} -fms-extensions .include From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 01:32:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D2A7492; Fri, 16 Jan 2015 01:32:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38FE0EA9; Fri, 16 Jan 2015 01:32:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G1WfeM028139; Fri, 16 Jan 2015 01:32:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1WeUV028137; Fri, 16 Jan 2015 01:32:40 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160132.t0G1WeUV028137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 01:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277226 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:32:41 -0000 Author: np Date: Fri Jan 16 01:32:40 2015 New Revision: 277226 URL: https://svnweb.freebsd.org/changeset/base/277226 Log: Allow cxgbe(4) to be built on i386. Driver attach will succeed only on a subset of i386 systems. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_mp_ring.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jan 16 01:28:28 2015 (r277225) +++ head/sys/dev/cxgbe/t4_main.c Fri Jan 16 01:32:40 2015 (r277226) @@ -668,6 +668,14 @@ t4_attach(device_t dev) goto done; } +#if defined(__i386__) + if ((cpu_feature & CPUID_CX8) == 0) { + device_printf(dev, "64 bit atomics not available.\n"); + rc = ENOTSUP; + goto done; + } +#endif + /* Prepare the firmware for operation */ rc = prep_firmware(sc); if (rc != 0) Modified: head/sys/dev/cxgbe/t4_mp_ring.c ============================================================================== --- head/sys/dev/cxgbe/t4_mp_ring.c Fri Jan 16 01:28:28 2015 (r277225) +++ head/sys/dev/cxgbe/t4_mp_ring.c Fri Jan 16 01:32:40 2015 (r277226) @@ -38,6 +38,11 @@ __FBSDID("$FreeBSD$"); #include "t4_mp_ring.h" +#if defined(__i386__) +#define atomic_cmpset_acq_64 atomic_cmpset_64 +#define atomic_cmpset_rel_64 atomic_cmpset_64 +#endif + union ring_state { struct { uint16_t pidx_head; From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 01:39:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01E35684; Fri, 16 Jan 2015 01:39:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E138EEDE; Fri, 16 Jan 2015 01:39:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G1dQqd029078; Fri, 16 Jan 2015 01:39:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1dPu5029070; Fri, 16 Jan 2015 01:39:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160139.t0G1dPu5029070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 01:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277227 - in head/sys: amd64/conf arm/conf conf modules powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:39:27 -0000 Author: np Date: Fri Jan 16 01:39:24 2015 New Revision: 277227 URL: https://svnweb.freebsd.org/changeset/base/277227 Log: Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it on amd64 only. Modified: head/sys/amd64/conf/NOTES head/sys/arm/conf/NOTES head/sys/conf/NOTES head/sys/modules/Makefile head/sys/powerpc/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/amd64/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -300,7 +300,6 @@ options DRM_DEBUG # Include debug print # bxe: Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet # adapters. -# cxgbe: Chelsio T4/T5 1GbE/10GbE/40GbE PCIe Ethernet adapters # ed: Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503 # HP PC Lan+, various PC Card devices # (requires miibus) @@ -323,7 +322,6 @@ options DRM_DEBUG # Include debug print # Requires the wpi firmware module device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE -device cxgbe # Chelsio T4/T5 1GbE/10GbE/40GbE device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/arm/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -82,6 +82,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice cxgbe nodevice pcii nodevice snd_cmi nodevice tnt4882 Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -1917,6 +1917,8 @@ device xmphy # XaQti XMAC II # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. +# cxgb: Chelsio T3 based 1GbE/10GbE PCIe Ethernet adapters. +# cxgbe:Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2065,6 +2067,7 @@ device bge # Broadcom BCM570xx Gigabit device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn device cxgb # Chelsio T3 10 Gigabit Ethernet device cxgb_t3fw # Chelsio T3 10 Gigabit Ethernet firmware +device cxgbe # Chelsio T4 and T5 1GbE/10GbE/40GbE device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/modules/Makefile Fri Jan 16 01:39:24 2015 (r277227) @@ -443,7 +443,8 @@ _ti= ti _txp= txp .endif -.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64" +.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ + ${MACHINE_CPUARCH} != "powerpc" _cxgbe= cxgbe .endif Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/powerpc/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -57,6 +57,7 @@ device adm1030 # Apple G4 MDD fan cont # Devices we don't want to deal with nodevice bktr +nodevice cxgbe # XXX: builds on powerpc64 only. nodevice fdc nodevice ppc nodevice splash From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 01:52:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2550A5A; Fri, 16 Jan 2015 01:52:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD97FD; Fri, 16 Jan 2015 01:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G1qR5b037618; Fri, 16 Jan 2015 01:52:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1qRZd037617; Fri, 16 Jan 2015 01:52:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501160152.t0G1qRZd037617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 16 Jan 2015 01:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277228 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:52:27 -0000 Author: adrian Date: Fri Jan 16 01:52:26 2015 New Revision: 277228 URL: https://svnweb.freebsd.org/changeset/base/277228 Log: Check the right value correctly. Thanks to clang for pointing out this silliness. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Jan 16 01:39:24 2015 (r277227) +++ head/sys/dev/ath/if_ath.c Fri Jan 16 01:52:26 2015 (r277228) @@ -7024,7 +7024,7 @@ ath_tx_update_tim(struct ath_softc *sc, /* * Don't bother grabbing the lock unless the queue is empty. */ - if (&an->an_swq_depth != 0) + if (an->an_swq_depth != 0) return; if (an->an_is_powersave && From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 02:20:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C72DE58; Fri, 16 Jan 2015 02:20:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6864B328; Fri, 16 Jan 2015 02:20:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G2KPqH048768; Fri, 16 Jan 2015 02:20:25 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G2KPmm048767; Fri, 16 Jan 2015 02:20:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160220.t0G2KPmm048767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 02:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277229 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 02:20:25 -0000 Author: np Date: Fri Jan 16 02:20:24 2015 New Revision: 277229 URL: https://svnweb.freebsd.org/changeset/base/277229 Log: Use parentheses instead of close proximity to ensure layer + 1 is evaluated before the rest of the expression. Modified: head/sys/ofed/include/linux/linux_idr.c Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Fri Jan 16 01:52:26 2015 (r277228) +++ head/sys/ofed/include/linux/linux_idr.c Fri Jan 16 02:20:24 2015 (r277229) @@ -408,7 +408,7 @@ restart: * to be rare. */ if (idx == IDR_SIZE) { - starting_id = id + (1 << (layer+1 * IDR_BITS)); + starting_id = id + (1 << ((layer + 1) * IDR_BITS)); goto restart; } if (idx > sidx) From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 02:34:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 749D3C9; Fri, 16 Jan 2015 02:34:34 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58DCF69A; Fri, 16 Jan 2015 02:34:34 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0G2YVXY003248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Jan 2015 18:34:31 -0800 Message-ID: <54B878B7.7050206@freebsd.org> Date: Thu, 15 Jan 2015 18:34:31 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Navdeep Parhar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277227 - in head/sys: amd64/conf arm/conf conf modules powerpc/conf References: <201501160139.t0G1dPu5029070@svn.freebsd.org> In-Reply-To: <201501160139.t0G1dPu5029070@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVb4LW+amc3woOTEX1tdwvOMlK9saSF+7h6eDZWT+AlQuQE1eyzu4KNmPs0Jq0aKPBYeqjQm+ToY4ZjaXNBNp/JkuKc0OO9Fkw0= X-Sonic-ID: C;FKtmMyid5BGx4dmh1eMT4g== M;dKuXMyid5BGx4dmh1eMT4g== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 02:34:34 -0000 On 01/15/15 17:39, Navdeep Parhar wrote: > Author: np > Date: Fri Jan 16 01:39:24 2015 > New Revision: 277227 > URL: https://svnweb.freebsd.org/changeset/base/277227 > > Log: > Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it > on amd64 only. > > Modified: > head/sys/amd64/conf/NOTES > head/sys/arm/conf/NOTES > head/sys/conf/NOTES > head/sys/modules/Makefile > head/sys/powerpc/conf/NOTES > > > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Fri Jan 16 01:32:40 2015 (r277226) > +++ head/sys/modules/Makefile Fri Jan 16 01:39:24 2015 (r277227) > @@ -443,7 +443,8 @@ _ti= ti > _txp= txp > .endif > > -.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64" > +.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ > + ${MACHINE_CPUARCH} != "powerpc" > _cxgbe= cxgbe > .endif Don't you want MACHINE_ARCH != powerpc here rather than MACHINE_CPUARCH if it builds on powerpc64? -Nathan > > Modified: head/sys/powerpc/conf/NOTES > ============================================================================== > --- head/sys/powerpc/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) > +++ head/sys/powerpc/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) > @@ -57,6 +57,7 @@ device adm1030 # Apple G4 MDD fan cont > # Devices we don't want to deal with > > nodevice bktr > +nodevice cxgbe # XXX: builds on powerpc64 only. > nodevice fdc > nodevice ppc > nodevice splash > From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 02:43:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D39B27D; Fri, 16 Jan 2015 02:43:50 +0000 (UTC) Received: from mail-pd0-x22c.google.com (mail-pd0-x22c.google.com [IPv6:2607:f8b0:400e:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5724D7B5; Fri, 16 Jan 2015 02:43:50 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id y13so19915468pdi.3; Thu, 15 Jan 2015 18:43:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=7J26gIiiMQhhphjWPYZRGCWXS6CIUQqTgAOcBN7mYvo=; b=XPKkee8jecE/aNpz04iQllQsnm/MAvs8N6/scTr/KjtvKHmAph8RmNFbU5O7uq1GiW EF+SwGDuUSgYI9b5pPrtzFHi/NY/YNLWqC6U+eeLi3LD0+dh3/hhjJKlVEueoUIKSvNx s/AYCt7SvaNTIpYRYdUV2/ZMNuDiCDn+3evXVlHUZRa2vEQHC8CGy+BkT7Sxfsh0swDA BgRP5mOK0tP/DwjhmHOmq0dSwpuWgtxDwUI2M1g5/s17sP0ficB8B2OrEeOfwZGaRJA2 o5Q3hutgQ1H5jxRwpEk3z4kYuexhZu8xn/SjpZXY+Afzu5VA59hMvBv7d8+HZz6ns3nU LbuQ== X-Received: by 10.70.135.165 with SMTP id pt5mr18606249pdb.37.1421376229923; Thu, 15 Jan 2015 18:43:49 -0800 (PST) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id qv9sm2618006pab.27.2015.01.15.18.43.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Jan 2015 18:43:48 -0800 (PST) Sender: Navdeep Parhar Date: Thu, 15 Jan 2015 18:43:40 -0800 From: Navdeep Parhar To: Nathan Whitehorn Subject: Re: svn commit: r277227 - in head/sys: amd64/conf arm/conf conf modules powerpc/conf Message-ID: <20150116024340.GA4923@ox> Mail-Followup-To: Nathan Whitehorn , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201501160139.t0G1dPu5029070@svn.freebsd.org> <54B878B7.7050206@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B878B7.7050206@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 02:43:50 -0000 On Thu, Jan 15, 2015 at 06:34:31PM -0800, Nathan Whitehorn wrote: > > On 01/15/15 17:39, Navdeep Parhar wrote: > >Author: np > >Date: Fri Jan 16 01:39:24 2015 > >New Revision: 277227 > >URL: https://svnweb.freebsd.org/changeset/base/277227 > > > >Log: > > Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it > > on amd64 only. > > > >Modified: > > head/sys/amd64/conf/NOTES > > head/sys/arm/conf/NOTES > > head/sys/conf/NOTES > > head/sys/modules/Makefile > > head/sys/powerpc/conf/NOTES > > > > > > > >Modified: head/sys/modules/Makefile > >============================================================================== > >--- head/sys/modules/Makefile Fri Jan 16 01:32:40 2015 (r277226) > >+++ head/sys/modules/Makefile Fri Jan 16 01:39:24 2015 (r277227) > >@@ -443,7 +443,8 @@ _ti= ti > > _txp= txp > > .endif > >-.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64" > >+.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ > >+ ${MACHINE_CPUARCH} != "powerpc" > > _cxgbe= cxgbe > > .endif > > Don't you want MACHINE_ARCH != powerpc here rather than > MACHINE_CPUARCH if it builds on powerpc64? > -Nathan Hmm, I think you're right. I'll try building with MACHINE_ARCH and commit if it succeeds. Regards, Navdeep From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 03:39:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4048EA9C; Fri, 16 Jan 2015 03:39:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CD5ECED; Fri, 16 Jan 2015 03:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G3ddDQ085734; Fri, 16 Jan 2015 03:39:39 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G3ddGG085733; Fri, 16 Jan 2015 03:39:39 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160339.t0G3ddGG085733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 03:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277230 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 03:39:39 -0000 Author: np Date: Fri Jan 16 03:39:38 2015 New Revision: 277230 URL: https://svnweb.freebsd.org/changeset/base/277230 Log: Build cxgbe(4) on powerpc64 too. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jan 16 02:20:24 2015 (r277229) +++ head/sys/modules/Makefile Fri Jan 16 03:39:38 2015 (r277230) @@ -444,7 +444,7 @@ _txp= txp .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ - ${MACHINE_CPUARCH} != "powerpc" + ${MACHINE_ARCH} != "powerpc" _cxgbe= cxgbe .endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 06:19:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6EB1F26; Fri, 16 Jan 2015 06:19:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B21D88; Fri, 16 Jan 2015 06:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G6J665060302; Fri, 16 Jan 2015 06:19:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6J6Cg060301; Fri, 16 Jan 2015 06:19:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6J6Cg060301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277231 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:07 -0000 Author: imp Date: Fri Jan 16 06:19:05 2015 New Revision: 277231 URL: https://svnweb.freebsd.org/changeset/base/277231 Log: Add back a couple PC Card devices to amd64. There's only a couple of them that were popular enough, so this doesn't adversly affect build times. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jan 16 03:39:38 2015 (r277230) +++ head/sys/modules/Makefile Fri Jan 16 06:19:05 2015 (r277231) @@ -474,6 +474,7 @@ _cardbus= cardbus _cbb= cbb _cpuctl= cpuctl _cpufreq= cpufreq +_cs= cs _dpms= dpms _drm= drm _drm2= drm2 @@ -482,9 +483,11 @@ _dtrace= dtrace .endif _ed= ed _em= em +_ep= ep _et= et _exca= exca _ext2fs= ext2fs +_fe= fe _filemon= filemon _i2c= i2c .if ${MK_OFED} != "no" || defined(ALL_MODULES) @@ -519,6 +522,7 @@ _vmware= vmware _vxge= vxge _wbwd= wbwd _wi= wi +_xe= xe .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif @@ -625,10 +629,7 @@ _coff= coff .if ${MK_SOURCELESS_UCODE} != "no" _cp= cp .endif -_cs= cs _elink= elink -_ep= ep -_fe= fe _glxiic= glxiic _glxsb= glxsb _ibcs2= ibcs2 @@ -644,7 +645,6 @@ _streams= streams _stg= stg _svr4= svr4 _wds= wds -_xe= xe .if ${MACHINE} == "i386" .if ${MK_EISA} != "no" _ahb= ahb From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 06:19:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FEE8A0; Fri, 16 Jan 2015 06:19:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0EFD89; Fri, 16 Jan 2015 06:19:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G6J9sC060361; Fri, 16 Jan 2015 06:19:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6J9mC060351; Fri, 16 Jan 2015 06:19:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6J9mC060351@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277232 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:10 -0000 Author: imp Date: Fri Jan 16 06:19:08 2015 New Revision: 277232 URL: https://svnweb.freebsd.org/changeset/base/277232 Log: Back out the refactor. It turns out to cause interrupt storms on resume sometimes (but not others). On powerup, other wierd issues show up (sometimes the card comes up, but with really bogus pci config space stuff. There may be more, but given my experience of historical fussiness, stick to what works and make more minimal changes to that. Modified: head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:08 2015 (r277232) @@ -477,7 +477,7 @@ cbb_event_thread(void *arg) */ mtx_lock(&Giant); status = cbb_get(sc, CBB_SOCKET_STATE); - DEVPRINTF((sc->dev, "Status is %#x\n", status)); + DPRINTF(("Status is 0x%x\n", status)); if (!CBB_CARD_PRESENT(status)) { not_a_card = 0; /* We know card type */ cbb_removal(sc); @@ -800,14 +800,13 @@ cbb_power(device_t brdev, int volts) if (on) { mtx_lock(&sc->mtx); cnt = sc->powerintr; - /* * We have a shortish timeout of 500ms here. Some bridges do - * not generate a POWER_CYCLE event for 16-bit cards. In those - * cases, we have to cope the best we can, and having only a - * short delay is better than the alternatives. Others raise - * the power cycle a smidge before it is really ready. We deal - * with those below. + * not generate a POWER_CYCLE event for 16-bit cards. In + * those cases, we have to cope the best we can, and having + * only a short delay is better than the alternatives. Others + * raise the power cycle a smidge before it is really ready. + * We deal with those below. */ sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && @@ -817,18 +816,19 @@ cbb_power(device_t brdev, int volts) /* * Relax for 100ms. Some bridges appear to assert this signal - * right away, but before the card has stabilized. Other cards - * need need more time to cope up reliabily. Experiments with - * troublesome setups show this to be a "cheap" way to enhance - * reliabilty. + * right away, but before the card has stabilized. Other + * cards need need more time to cope up reliabily. + * Experiments with troublesome setups show this to be a + * "cheap" way to enhance reliabilty. We need not do this for + * "off" since we don't touch the card after we turn it off. */ pause("cbbPwr", min(hz / 10, 1)); /* - * The TOPIC95B requires a little bit extra time to get its act - * together, so delay for an additional 100ms. Also as - * documented below, it doesn't seem to set the POWER_CYCLE bit, - * so don't whine if it never came on. + * The TOPIC95B requires a little bit extra time to get its + * act together, so delay for an additional 100ms. Also as + * documented below, it doesn't seem to set the POWER_CYCLE + * bit, so don't whine if it never came on. */ if (sc->chipset == CB_TOPIC95) pause("cbb95B", hz / 10); @@ -838,27 +838,26 @@ cbb_power(device_t brdev, int volts) /* * After the power is good, we can turn off the power interrupt. - * However, the PC Card standard says that we must delay turning the CD - * bit back on for a bit to allow for bouncyness on power down. We just - * pause a little below to cover that. Most bridges don't seem to need - * this delay. + * However, the PC Card standard says that we must delay turning the + * CD bit back on for a bit to allow for bouncyness on power down + * (recall that we don't wait above for a power down, since we don't + * get an interrupt for that). We're called either from the suspend + * code in which case we don't want to turn card change on again, or + * we're called from the card insertion code, in which case the cbb + * thread will turn it on for us before it waits to be woken by a + * change event. * - * NB: Topic95B doesn't set the power cycle bit. We assume that - * both it and the TOPIC95 behave the same, though despite efforts - * to find one, the author never could locate a laptop with a TOPIC95 - * in it. + * NB: Topic95B doesn't set the power cycle bit. we assume that + * both it and the TOPIC95 behave the same. */ cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_POWER); status = cbb_get(sc, CBB_SOCKET_STATE); if (on && sc->chipset != CB_TOPIC95) { if ((status & CBB_STATE_POWER_CYCLE) == 0) device_printf(sc->dev, "Power not on?\n"); - } else { - pause("cbbDwn", hz / 10); } if (status & CBB_STATE_BAD_VCC_REQ) { - device_printf(sc->dev, "Bad Vcc requested status %#x %dV\n", - status, volts); + device_printf(sc->dev, "Bad Vcc requested\n"); /* * Turn off the power, and try again. Retrigger other * active interrupts via force register. From NetBSD @@ -1564,6 +1563,61 @@ cbb_write_ivar(device_t brdev, device_t } int +cbb_suspend(device_t self) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(self); + + error = bus_generic_suspend(self); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +int +cbb_resume(device_t self) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); + uint32_t tmp; + + /* + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. + * + * For most drivers, the PCI layer handles this saving. However, since + * there's much black magic and arcane art hidden in these few lines of + * code that would be difficult to transition into the PCI + * layer. chipinit was several years of trial and error to write. + */ + pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); + DEVPRINTF((self, "PCI Memory allocated: %08lx\n", + rman_get_start(sc->base_res))); + + sc->chipinit(sc); + + /* reset interrupt -- Do we really need to do this? */ + tmp = cbb_get(sc, CBB_SOCKET_EVENT); + cbb_set(sc, CBB_SOCKET_EVENT, tmp); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* Signal the thread to wakeup. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(self); + + return (error); +} + +int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:08 2015 (r277232) @@ -203,27 +203,13 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } -static int -cbb_isa_suspend(device_t dev) -{ - - return 0; -} - -static int -cbb_isa_resume(device_t dev) -{ - - return 0; -} - static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_isa_suspend), - DEVMETHOD(device_resume, cbb_isa_resume), + DEVMETHOD(device_suspend, cbb_suspend), + DEVMETHOD(device_resume, cbb_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:08 2015 (r277232) @@ -301,41 +301,6 @@ cbb_print_config(device_t dev) printf("\n"); } -static void -cbb_pci_bridge_init(device_t brdev) -{ - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); - u_int32_t membase, irq; - - if (pci_get_powerstate(brdev) != PCI_POWERSTATE_D0) { - /* Reset the power state. */ - device_printf(brdev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(brdev)); - pci_set_powerstate(brdev, PCI_POWERSTATE_D0); - } - membase = rman_get_start(sc->base_res); - irq = rman_get_start(sc->irq_res); - - pci_write_config(brdev, CBBR_SOCKBASE, membase, 4); - pci_write_config(brdev, PCIR_INTLINE, irq, 4); - PCI_ENABLE_IO(device_get_parent(brdev), brdev, SYS_RES_MEMORY); - - exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); - sc->chipinit(sc); - - /* reset 16-bit pcmcia bus */ - exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); - - /* turn off power */ - cbb_power(brdev, CARD_OFF); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* reset interrupt */ - cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); -} - static int cbb_pci_attach(device_t brdev) { @@ -380,9 +345,11 @@ cbb_pci_attach(device_t brdev) sc->bst = rman_get_bustag(sc->base_res); sc->bsh = rman_get_bushandle(sc->base_res); + exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); sc->exca[0].flags |= EXCA_HAS_MEMREG_WIN; sc->exca[0].chipset = EXCA_CARDBUS; sc->chipinit = cbb_chipinit; + sc->chipinit(sc); /*Sysctls*/ sctx = device_get_sysctl_ctx(brdev); @@ -460,7 +427,17 @@ cbb_pci_attach(device_t brdev) goto err; } - cbb_pci_bridge_init(brdev); + /* reset 16-bit pcmcia bus */ + exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); + + /* turn off power */ + cbb_power(brdev, CARD_OFF); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* reset interrupt */ + cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); if (bootverbose) cbb_print_config(brdev); @@ -900,45 +877,14 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } -static int -cbb_pci_suspend(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(brdev); - - error = bus_generic_suspend(brdev); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -static int -cbb_pci_resume(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); - - /* Reinitialize the hardware, ala attach */ - cbb_pci_bridge_init(brdev); - - /* Signal the thread to wakeup to see if we have any cards to work with. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(brdev); - - return (error); -} - static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_pci_suspend), - DEVMETHOD(device_resume, cbb_pci_resume), + DEVMETHOD(device_suspend, cbb_suspend), + DEVMETHOD(device_resume, cbb_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:08 2015 (r277232) @@ -134,9 +134,11 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); +int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); +int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 06:19:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 172C7205; Fri, 16 Jan 2015 06:19:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE658D91; Fri, 16 Jan 2015 06:19:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G6JOCZ060438; Fri, 16 Jan 2015 06:19:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6JOZl060437; Fri, 16 Jan 2015 06:19:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6JOZl060437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277233 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:25 -0000 Author: imp Date: Fri Jan 16 06:19:24 2015 New Revision: 277233 URL: https://svnweb.freebsd.org/changeset/base/277233 Log: Suspend and resume were the only two functions not to follow the brdev convention here, so fix that. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:08 2015 (r277232) +++ head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:24 2015 (r277233) @@ -1563,12 +1563,12 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t self) +cbb_suspend(device_t brdev) { int error = 0; - struct cbb_softc *sc = device_get_softc(self); + struct cbb_softc *sc = device_get_softc(brdev); - error = bus_generic_suspend(self); + error = bus_generic_suspend(brdev); if (error != 0) return (error); cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ @@ -1577,10 +1577,10 @@ cbb_suspend(device_t self) } int -cbb_resume(device_t self) +cbb_resume(device_t brdev) { int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); uint32_t tmp; /* @@ -1596,8 +1596,8 @@ cbb_resume(device_t self) * code that would be difficult to transition into the PCI * layer. chipinit was several years of trial and error to write. */ - pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((self, "PCI Memory allocated: %08lx\n", + pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); + DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", rman_get_start(sc->base_res))); sc->chipinit(sc); @@ -1612,7 +1612,7 @@ cbb_resume(device_t self) /* Signal the thread to wakeup. */ wakeup(&sc->intrhand); - error = bus_generic_resume(self); + error = bus_generic_resume(brdev); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 06:19:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25219343; Fri, 16 Jan 2015 06:19:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11722D9B; Fri, 16 Jan 2015 06:19:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G6JeA2060516; Fri, 16 Jan 2015 06:19:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6JeqK060512; Fri, 16 Jan 2015 06:19:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6JeqK060512@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277234 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:41 -0000 Author: imp Date: Fri Jan 16 06:19:39 2015 New Revision: 277234 URL: https://svnweb.freebsd.org/changeset/base/277234 Log: Move the suspsned and resume functions to the bus attachment. They were accessing PCI config registers, which won't work for the ISA version. Modified: head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:39 2015 (r277234) @@ -1563,61 +1563,6 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(brdev); - - error = bus_generic_suspend(brdev); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -int -cbb_resume(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); - uint32_t tmp; - - /* - * In the APM and early ACPI era, BIOSes saved the PCI config - * registers. As chips became more complicated, that functionality moved - * into the ACPI code / tables. We must therefore, restore the settings - * we made here to make sure the device come back. Transitions to Dx - * from D0 and back to D0 cause the bridge to lose its config space, so - * all the bus mappings and such are preserved. - * - * For most drivers, the PCI layer handles this saving. However, since - * there's much black magic and arcane art hidden in these few lines of - * code that would be difficult to transition into the PCI - * layer. chipinit was several years of trial and error to write. - */ - pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - - sc->chipinit(sc); - - /* reset interrupt -- Do we really need to do this? */ - tmp = cbb_get(sc, CBB_SOCKET_EVENT); - cbb_set(sc, CBB_SOCKET_EVENT, tmp); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* Signal the thread to wakeup. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(brdev); - - return (error); -} - -int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:39 2015 (r277234) @@ -203,13 +203,25 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } +static int +cbb_isa_suspend(device_t dev) +{ + return (0); +} + +static int +cbb_isa_resume(device_t dev) +{ + return (0); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_isa_suspend), + DEVMETHOD(device_resume, cbb_isa_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:39 2015 (r277234) @@ -877,14 +877,69 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } +static int +cbb_pci_suspend(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(brdev); + + error = bus_generic_suspend(brdev); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +static int +cbb_pci_resume(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + uint32_t tmp; + + /* + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. + * + * For most drivers, the PCI layer handles this saving. However, since + * there's much black magic and arcane art hidden in these few lines of + * code that would be difficult to transition into the PCI + * layer. chipinit was several years of trial and error to write. + */ + pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); + DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", + rman_get_start(sc->base_res))); + + sc->chipinit(sc); + + /* reset interrupt -- Do we really need to do this? */ + tmp = cbb_get(sc, CBB_SOCKET_EVENT); + cbb_set(sc, CBB_SOCKET_EVENT, tmp); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* Signal the thread to wakeup. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(brdev); + + return (error); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_pci_suspend), + DEVMETHOD(device_resume, cbb_pci_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:39 2015 (r277234) @@ -134,11 +134,9 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); -int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 06:19:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBB8D481; Fri, 16 Jan 2015 06:19:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A84A8D9F; Fri, 16 Jan 2015 06:19:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G6Jrjp060582; Fri, 16 Jan 2015 06:19:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6JrlC060581; Fri, 16 Jan 2015 06:19:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6JrlC060581@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277235 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:53 -0000 Author: imp Date: Fri Jan 16 06:19:52 2015 New Revision: 277235 URL: https://svnweb.freebsd.org/changeset/base/277235 Log: Always enable I/O, memory and dma cycles. Some BIOSes don't enable them, sometimes they are reset for power state transitions or during whatever happens while suspended. Also, it is good practice to always do this. Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:39 2015 (r277234) +++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:52 2015 (r277235) @@ -479,10 +479,10 @@ cbb_chipinit(struct cbb_softc *sc) pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); - /* Enable memory access */ + /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc->dev); - /* XXX: This should not be necessary, but some chipsets require it */ - PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); + pci_enable_io(sc->dev, SYS_RES_IOPORT); + pci_enable_io(sc->dev, SYS_RES_MEMORY); /* disable Legacy IO */ switch (sc->chipset) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 07:06:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E10896B; Fri, 16 Jan 2015 07:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A9C725B; Fri, 16 Jan 2015 07:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G76xsY083478; Fri, 16 Jan 2015 07:06:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G76xmr083477; Fri, 16 Jan 2015 07:06:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501160706.t0G76xmr083477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Jan 2015 07:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277236 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 07:06:59 -0000 Author: kib Date: Fri Jan 16 07:06:58 2015 New Revision: 277236 URL: https://svnweb.freebsd.org/changeset/base/277236 Log: For sigaction(2), ignore possible garbage in sa_flags for sa_handler == SIG_DFL or SIG_IGN. Sloppy code does not fully initialize struct sigaction for such cases, and being too demanding in the case of default handler does not catch anything. Reported and tested by: Alex Tutubalin Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Jan 16 06:19:52 2015 (r277235) +++ head/sys/kern/kern_sig.c Fri Jan 16 07:06:58 2015 (r277236) @@ -653,9 +653,10 @@ kern_sigaction(td, sig, act, oact, flags if (!_SIG_VALID(sig)) return (EINVAL); - if (act != NULL && (act->sa_flags & ~(SA_ONSTACK | SA_RESTART | - SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | - SA_SIGINFO)) != 0) + if (act != NULL && act->sa_handler != SIG_DFL && + act->sa_handler != SIG_IGN && (act->sa_flags & ~(SA_ONSTACK | + SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | + SA_NOCLDWAIT | SA_SIGINFO)) != 0) return (EINVAL); PROC_LOCK(p); From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 08:03:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7381DB5; Fri, 16 Jan 2015 08:03:40 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4890A39; Fri, 16 Jan 2015 08:03:39 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0G83XxQ004003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Jan 2015 10:03:33 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0G83XxQ004003 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0G83WPm004002; Fri, 16 Jan 2015 10:03:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Jan 2015 10:03:32 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150116080332.GE42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7AF2F.3080802@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 08:03:40 -0000 On Thu, Jan 15, 2015 at 01:14:39PM +0100, Hans Petter Selasky wrote: > On 01/15/15 12:51, Konstantin Belousov wrote: > > On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: > >> > >> I see no leakage in that case either! > > Because these cases come through destroy_dev(). > > > >> > >> Are there more cases which I don't see? > > You are breaking existig devfs KPI by your hack. You introduce yet another > > reference on the device, which is not supposed to be there. > > Hi Konstantin, > > I need a non-sleeping way to say a character device is no longer > supposed to be used and be able to re-use the device name right away > creating a new device. I guess you got that. Yes, I got it. The devfs design is not suitable for this, and your hack is the good witness of the fact. My opinion is that you should have tried to handle the issue at the driver level, instead of making this devfs issue. I.e., if you already have cdev node with the correct name, driver should have replaced the private data to point to new device. This would also close a window where /dev node is non-existent or operate erronously. > > > > > If some code calls delist_dev(), it could be said that it is a contract > > of the new function that destroy_dev() must be called eventually on > > the cdev. Then, the reference could be said to be shared-owned by > > delist_dev() and destroy_dev(). But, for arbitrary devfs user this new > > reference is unacceptable and breaks interface. > > delist_dev() changes no references. It can be called multiple times > even, also inside destroy_devl(). Also I think that the > "destroy_dev_sched_cbl()" function should call delist_dev() first so > that we don't have a time from when the "destroy_dev_sched_cbl()" > function is called where the device entry still exists in devfs mounts > until the final destroy_devl() is done by a taskqueue. You do not understand my point. I object against imposing one additional global reference on all cdevs just to cope with the delist hack. See the patch at the end of the message. WRT destroy_dev_sched_cb() calling delist_dev(), even after calling delist_dev(), the node still exists in the /dev. It is only removed after populate loop is run sometime later. dev_sched() KPI is inheritly racy, drivers must handle the races for other reasons. > > >>>> In the case of direct free through #1, the reference count is ignored > >>>> and it doesn't matter if it is one or zero. Only in the case of > >>>> destruction through destroy_dev() it matters. > >>>> > >>>> Like the comment says in destroy_devl(): > >>>> > >>>> /* Avoid race with dev_rel() */ > >>>> > >>>> The problem is that the "cdev->si_refcount" is zero when the initial > >>>> devfs_create() is called. Then one ref is made. When we clear the > >>>> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running > >>>> process to destroy all the FS related structures and the reference count > >>>> goes back to zero when the "cdp" is removed from the "cdevp_list". Then > >>>> the cdev is freed too early. This happens because destroy_devl() is > >>>> dropping the dev_lock() to sleep waiting for pending references. > >>> Basically, this is very good explanation why your delist hack is wrong, > >>> for one of the reason. Another reason is explained below. > >>> You are trying to cover it with additional reference, but this is wrong > >>> as well. > >>> > >>>> > >>>> Do you see something else? > >>> > >>> I think that what you are trying to do with the CDP_ACTIVE hack is doomed > >>> anyway, because you are allowing for devfs directory to have two entries > >>> with the same name, until the populate loop cleans up the inactive one. > >>> In the meantime, any access to the directory operates on random entry. > >> > >> The entry will not be random, because upon an open() call to a character > >> device, I believe the devfs_lookup() function will be called, which > >> always populate the devfs tree at first by calls to > >> devfs_populate_xxx(). Any delisted devices which don't have the > >> "CDP_ACTIVE" bit set, will never be seen by any open. > > Entry can be random, since after the populate loop is ran, your code in > > other thread could start and create duplicate entry. There is a window > > in the lookup where both directory vnode lock and mount point sx locks > > are dropped. So running the populate does not guarantee anything. > > If there is such a race, it is already there! My patch changes nothing > in that area: > > Thread1: > Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes > waiting for some refs for xxx milliseconds. > Thread2: > Tries to create create a new character device having the same name like > the one in thread1. Device name duplication check is missed because > CDP_ACTIVE is cleared. Still thread1 is waiting. > Thread3: > Tries to open character device created by thread2 while thread1 is still > waiting for some ref held by a userspace app to go away. > > This can happen already before my patches! What do you think? Possibly. > > > > >> > >> Regarding leftover filedescriptors which still access the old "cdev" > >> this is not a problem, and these will be closed when the si_refcount > >> goes to zero after the destroy_devl() call. > >> > >>> > >>> The checks for existent names in make_dev() are performed for the reason, > >>> and you makes the rounds to effectively ignore it. > >>> > >> > >> These checks are still correct and don't conflict with my patch from > >> what I can see. Else the existing destroy_devl() would also be broken > >> even before my patch with regard to the "random" selection of character > >> devices at open() from userspace. > > > > The checks are done to avoid duplicate names. Your patch makes these > > checks ineffective (i.e. broken). > > At what level do you mean duplicate names, I don't get this fully? At > the directory level (DE nodes)? Or inside the list of character devices > (LIST_XXX)? It does not matter, dup at either one directory level, or dup of full names in the global list are equivalent (bad) things. > > > Let me summarize: > > - the extra reference on arbitrary cdev should be eliminated. The > > delist_dev_locked() may add the ref and set some CDP_ flag to > > indicate to destroy_dev() that it should do dev_rel(). > > It is possible to do this. I thought about this before doing my patch, > but decided to try to avoid adding yet another cdev flag. > > > - the existence of the duplicated entries should be either eliminated > > (I am not sure it is possible with your code), or we must ensure > > that only one name with CDP_ACTIVE flag set and given name exists. > > Then, all lookup code must be audited to take CDP_ACTIVE into account > > when accessing names. I see at least devfs_find() and devfs_mknod() > > which must be changed. I did not performed full audit. > > I will check this path out aswell. > It seems it is simpler for me to try to clean up after the commit. The patch was only lightly tested. I post the patch for discussion, not for you to committing it. I will expedite the change into HEAD after the consensus on it is made and adequate testing is performed. diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index 294bd62..6620aef 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -137,12 +137,6 @@ devfs_alloc(int flags) vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; cdev->si_cred = NULL; - /* - * Avoid race with dev_rel() by setting the initial - * reference count to 1. This last reference is taken - * by the destroy_dev() function. - */ - cdev->si_refcount = 1; return (cdev); } @@ -192,6 +186,16 @@ devfs_find(struct devfs_dirent *dd, const char *name, int namelen, int type) continue; if (type != 0 && type != de->de_dirent->d_type) continue; + + /* + * The race with finding non-active name is not + * completely closed by the check, but it is similar + * to the devfs_allocv() in making it unlikely enough. + */ + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; + if (bcmp(name, de->de_dirent->d_name, namelen) != 0) continue; break; diff --git a/sys/fs/devfs/devfs_int.h b/sys/fs/devfs/devfs_int.h index ce55416..6c57109 100644 --- a/sys/fs/devfs/devfs_int.h +++ b/sys/fs/devfs/devfs_int.h @@ -56,6 +56,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_UNREF_DTR (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 9153588..570f710 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1045,6 +1045,9 @@ devfs_mknod(struct vop_mknod_args *ap) TAILQ_FOREACH(de, &dd->de_dlist, de_list) { if (cnp->cn_namelen != de->de_dirent->d_namlen) continue; + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; if (bcmp(cnp->cn_nameptr, de->de_dirent->d_name, de->de_dirent->d_namlen) != 0) continue; diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index bcd6fb9..79c8fea 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -116,6 +116,8 @@ dev_free_devlocked(struct cdev *cdev) mtx_assert(&devmtx, MA_OWNED); cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, + ("destroy_dev() was not called after delist_dev(%p)", cdev)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -1035,6 +1037,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; struct cdev_privdata *p; + struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -1043,7 +1046,18 @@ destroy_devl(struct cdev *dev) ("WARNING: Driver mistake: destroy_dev on eternal %d\n", dev2unit(dev))); - devfs_destroy(dev); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* + * Avoid race with dev_rel(), e.g. from the populate + * loop. If CDP_UNREF_DTR flag is set, the reference + * to be dropped at the end of destroy_devl() was + * already taken by delist_dev_locked(). + */ + dev_refl(dev); + + devfs_destroy(dev); + } /* Remove name marking */ dev->si_flags &= ~SI_NAMED; @@ -1103,19 +1117,27 @@ destroy_devl(struct cdev *dev) } } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ + cdp->cdp_flags &= ~CDP_UNREF_DTR; + dev->si_refcount--; - if (dev->si_refcount > 0) { + if (dev->si_refcount > 0) LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); - } else { + else dev_free_devlocked(dev); - } } static void delist_dev_locked(struct cdev *dev) { + struct cdev_priv *cdp; struct cdev *child; + + mtx_assert(&devmtx, MA_OWNED); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0) + return; + cdp->cdp_flags |= CDP_UNREF_DTR; + dev_refl(dev); devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); @@ -1124,6 +1146,7 @@ delist_dev_locked(struct cdev *dev) void delist_dev(struct cdev *dev) { + dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 08:59:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0BA8DB0; Fri, 16 Jan 2015 08:59:27 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6172EF70; Fri, 16 Jan 2015 08:59:27 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 60BD51FE023; Fri, 16 Jan 2015 09:59:23 +0100 (CET) Message-ID: <54B8D31B.9030805@selasky.org> Date: Fri, 16 Jan 2015 10:00:11 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> <20150116080332.GE42409@kib.kiev.ua> In-Reply-To: <20150116080332.GE42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 08:59:28 -0000 Hi Konstantin, On 01/16/15 09:03, Konstantin Belousov wrote: > On Thu, Jan 15, 2015 at 01:14:39PM +0100, Hans Petter Selasky wrote: >> On 01/15/15 12:51, Konstantin Belousov wrote: >>> On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: >>>> >>>> I see no leakage in that case either! >>> Because these cases come through destroy_dev(). >>> >>>> >>>> Are there more cases which I don't see? >>> You are breaking existig devfs KPI by your hack. You introduce yet another >>> reference on the device, which is not supposed to be there. >> >> Hi Konstantin, >> >> I need a non-sleeping way to say a character device is no longer >> supposed to be used and be able to re-use the device name right away >> creating a new device. I guess you got that. > Yes, I got it. The devfs design is not suitable for this, and your > hack is the good witness of the fact. > > My opinion is that you should have tried to handle the issue at the driver > level, instead of making this devfs issue. I.e., if you already have > cdev node with the correct name, driver should have replaced the private > data to point to new device. I think this way cannot be implemented in a clean way, because of locking order reversal. And if you try to avoid the LOR you end up with the race. Chess mate sort of ;-) Let me explain: Thread 1: usb_sx_lock(); cdev = Look in freelist for existing device(); else cdev = make_dev(); usb_sx_unlock(); Thread 2: usb_sx_lock(); put cdev on freelist usb_sx_unlock(); Thread 3: usb_sx_lock(); cdev = remove first entry in freelist usb_sx_unlock(); /* * XXX because USB needs to call destroy_dev() unlocked we * are racing with Thread 1 again */ destroy_dev(cdev); > > This would also close a window where /dev node is non-existent or operate > erronously. I'm not saying I plan so, but I think "cdevs" at some point need to understand mutexes and locks. That means like with other API's in the kernel we can associate a lock with the "cdev", and this lock is then used to ensure an atomic shutdown of the system in a non-blocking fashion. In my past experience multithreaded APIs should be high level implemented like this: NON-BLOCKING methods: lock(); ** xxx_start(); xxx_stop(); unlock(); BLOCKING methods: setup(); // init unsetup(); // drain Any callbacks should always be called locked ** In devfs there was no non-blocking stop before I added the delist_dev() function. > > You do not understand my point. > > I object against imposing one additional global reference on all cdevs > just to cope with the delist hack. See the patch at the end of the message. It's fine by me. > > WRT destroy_dev_sched_cb() calling delist_dev(), even after calling > delist_dev(), the node still exists in the /dev. It is only removed > after populate loop is run sometime later. dev_sched() KPI is inheritly > racy, drivers must handle the races for other reasons. The populate loop is all running under the dev_lock() from what I can see and make_dev() is also keeping the same lock when inserting and removing new cdevs. The populate loop should always give a consistent view of the character devices available, and I don't see how "cdev" structures without the CDP_ACTIVE flag can appear with recently created ones, even if the name is the same. > >> >>> Entry can be random, since after the populate loop is ran, your code in >>> other thread could start and create duplicate entry. There is a window >>> in the lookup where both directory vnode lock and mount point sx locks >>> are dropped. So running the populate does not guarantee anything. >> >> If there is such a race, it is already there! My patch changes nothing >> in that area: >> >> Thread1: >> Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes >> waiting for some refs for xxx milliseconds. >> Thread2: >> Tries to create create a new character device having the same name like >> the one in thread1. Device name duplication check is missed because >> CDP_ACTIVE is cleared. Still thread1 is waiting. >> Thread3: >> Tries to open character device created by thread2 while thread1 is still >> waiting for some ref held by a userspace app to go away. >> >> This can happen already before my patches! What do you think? > Possibly. > >> At what level do you mean duplicate names, I don't get this fully? At >> the directory level (DE nodes)? Or inside the list of character devices >> (LIST_XXX)? > It does not matter, dup at either one directory level, or dup of full > names in the global list are equivalent (bad) things. Like I write above I don't see where the problem is. At the cdev level, we are protecting the cdev's LIST with dev_lock() and only one entry will exist having CDP_ACTIVE bit set per unique cdev name and path. Else we will hit a panic in make_dev() and friends. In the directory entry level the populate loop will also ensure a consistent view, and hence the cdev's LIST is consistent, the view presented to userspace will also be consistent. That system functions can still call into the dangling read/write/ioctl functions is another story, and that is why I tell, that in order to simplify this teardown, we possibly should associate a client selectable lock with each CDEV, for teardown purposes. Like done for several years in the callout and USB APIs and possibly many other places. > >> >>> Let me summarize: >>> - the extra reference on arbitrary cdev should be eliminated. The >>> delist_dev_locked() may add the ref and set some CDP_ flag to >>> indicate to destroy_dev() that it should do dev_rel(). >> >> It is possible to do this. I thought about this before doing my patch, >> but decided to try to avoid adding yet another cdev flag. >> >>> - the existence of the duplicated entries should be either eliminated >>> (I am not sure it is possible with your code), or we must ensure >>> that only one name with CDP_ACTIVE flag set and given name exists. >>> Then, all lookup code must be audited to take CDP_ACTIVE into account >>> when accessing names. I see at least devfs_find() and devfs_mknod() >>> which must be changed. I did not performed full audit. >> >> I will check this path out aswell. >> > > It seems it is simpler for me to try to clean up after the commit. > The patch was only lightly tested. I post the patch for discussion, > not for you to committing it. I will expedite the change into HEAD > after the consensus on it is made and adequate testing is performed. I don't see any problems about your patch, except it adds a bit more code to the kernel. --HPS From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 09:07:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 047BF1A7; Fri, 16 Jan 2015 09:07:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4805DE; Fri, 16 Jan 2015 09:07:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0G97Vvt039561; Fri, 16 Jan 2015 09:07:31 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G97Vo8039560; Fri, 16 Jan 2015 09:07:31 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501160907.t0G97Vo8039560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Fri, 16 Jan 2015 09:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277237 - head/lib/libpam/modules/pam_radius X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 09:07:32 -0000 Author: des Date: Fri Jan 16 09:07:31 2015 New Revision: 277237 URL: https://svnweb.freebsd.org/changeset/base/277237 Log: If PAM_RHOST is non-NULL, pass it in the Calling-Station-ID attribute of the RADIUS access request. MFC after: 1 week Modified: head/lib/libpam/modules/pam_radius/pam_radius.c Modified: head/lib/libpam/modules/pam_radius/pam_radius.c ============================================================================== --- head/lib/libpam/modules/pam_radius/pam_radius.c Fri Jan 16 07:06:58 2015 (r277236) +++ head/lib/libpam/modules/pam_radius/pam_radius.c Fri Jan 16 09:07:31 2015 (r277237) @@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$"); #define PASSWORD_PROMPT "RADIUS Password:" static int build_access_request(struct rad_handle *, const char *, - const char *, const char *, const char *, const void *, - size_t); + const char *, const char *, const char *, const char *, + const void *, size_t); static int do_accept(pam_handle_t *, struct rad_handle *); static int do_challenge(pam_handle_t *, struct rad_handle *, - const char *, const char *, const char *); + const char *, const char *, const char *, const char *); /* * Construct an access request, but don't send it. Returns 0 on success, @@ -75,7 +75,7 @@ static int do_challenge(pam_handle_t *, static int build_access_request(struct rad_handle *radh, const char *user, const char *pass, const char *nas_id, const char *nas_ipaddr, - const void *state, size_t state_len) + const char *rhost, const void *state, size_t state_len) { int error; char host[MAXHOSTNAMELEN]; @@ -121,8 +121,13 @@ build_access_request(struct rad_handle * } } } - if (state != NULL && rad_put_attr(radh, RAD_STATE, state, - state_len) == -1) { + if (rhost != NULL && + rad_put_string(radh, RAD_CALLING_STATION_ID, rhost) == -1) { + syslog(LOG_CRIT, "rad_put_string: %s", rad_strerror(radh)); + return (-1); + } + if (state != NULL && + rad_put_attr(radh, RAD_STATE, state, state_len) == -1) { syslog(LOG_CRIT, "rad_put_attr: %s", rad_strerror(radh)); return (-1); } @@ -162,7 +167,7 @@ do_accept(pam_handle_t *pamh, struct rad static int do_challenge(pam_handle_t *pamh, struct rad_handle *radh, const char *user, - const char *nas_id, const char *nas_ipaddr) + const char *nas_id, const char *nas_ipaddr, const char *rhost) { int retval; int attrtype; @@ -230,7 +235,7 @@ do_challenge(pam_handle_t *pamh, struct conv->appdata_ptr)) != PAM_SUCCESS) return (retval); if (build_access_request(radh, user, resp[num_msgs-1].resp, nas_id, - nas_ipaddr, state, statelen) == -1) + nas_ipaddr, rhost, state, statelen) == -1) return (PAM_SERVICE_ERR); memset(resp[num_msgs-1].resp, 0, strlen(resp[num_msgs-1].resp)); free(resp[num_msgs-1].resp); @@ -246,7 +251,7 @@ pam_sm_authenticate(pam_handle_t *pamh, { struct rad_handle *radh; const char *user, *pass; - const void *tmpuser; + const void *rhost, *tmpuser; const char *conf_file, *template_user, *nas_id, *nas_ipaddr; int retval; int e; @@ -255,6 +260,7 @@ pam_sm_authenticate(pam_handle_t *pamh, template_user = openpam_get_option(pamh, PAM_OPT_TEMPLATE_USER); nas_id = openpam_get_option(pamh, PAM_OPT_NAS_ID); nas_ipaddr = openpam_get_option(pamh, PAM_OPT_NAS_IPADDR); + pam_get_item(pamh, PAM_RHOST, &rhost); retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS) @@ -284,8 +290,8 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Radius config file read"); - if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, NULL, - 0) == -1) { + if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, rhost, + NULL, 0) == -1) { rad_close(radh); return (PAM_SERVICE_ERR); } @@ -330,7 +336,7 @@ pam_sm_authenticate(pam_handle_t *pamh, case RAD_ACCESS_CHALLENGE: retval = do_challenge(pamh, radh, user, nas_id, - nas_ipaddr); + nas_ipaddr, rhost); if (retval != PAM_SUCCESS) { rad_close(radh); return (retval); From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 10:09:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62B432E8; Fri, 16 Jan 2015 10:09:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34D9A99E; Fri, 16 Jan 2015 10:09:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GA9TmD068081; Fri, 16 Jan 2015 10:09:29 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GA9SDp068079; Fri, 16 Jan 2015 10:09:28 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501161009.t0GA9SDp068079@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 16 Jan 2015 10:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277238 - in head: share/man/man4 sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:09:29 -0000 Author: melifaro Date: Fri Jan 16 10:09:28 2015 New Revision: 277238 URL: https://svnweb.freebsd.org/changeset/base/277238 Log: Eliminate SIOCGIFADDR handling in bpf. Quoting 19 years bpf.4 manual from bpf-1.2a1: " (SIOCGIFADDR is obsolete under BSD systems. SIOCGIFCONF should be used to query link-level addresses.) " * SIOCGIFADDR was not imported in NetBSD (bpf.c 1.36) and OpenBSD. * Last bits (e.g. manpage claiming SIOCGIFADDR exists) was cleaned from NetBSD via kern/21513 5 years ago, from OpenBSD via documentation/6352 5 years ago. Modified: head/share/man/man4/bpf.4 head/sys/net/bpf.c Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Fri Jan 16 09:07:31 2015 (r277237) +++ head/share/man/man4/bpf.4 Fri Jan 16 10:09:28 2015 (r277238) @@ -290,8 +290,6 @@ and .Pp In addition to .Dv FIONREAD -and -.Dv SIOCGIFADDR , the following commands may be applied to any open .Nm file. Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Jan 16 09:07:31 2015 (r277237) +++ head/sys/net/bpf.c Fri Jan 16 10:09:28 2015 (r277238) @@ -1192,7 +1192,6 @@ reset_d(struct bpf_d *d) /* * FIONREAD Check for read packet available. - * SIOCGIFADDR Get interface address - convenient hook to driver. * BIOCGBLEN Get buffer len [for read()]. * BIOCSETF Set read filter. * BIOCSETFNR Set read filter without resetting descriptor. @@ -1322,19 +1321,6 @@ bpfioctl(struct cdev *dev, u_long cmd, c break; } - case SIOCGIFADDR: - { - struct ifnet *ifp; - - if (d->bd_bif == NULL) - error = EINVAL; - else { - ifp = d->bd_bif->bif_ifp; - error = (*ifp->if_ioctl)(ifp, cmd, addr); - } - break; - } - /* * Get buffer len [for read()]. */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 10:11:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A0A2458; Fri, 16 Jan 2015 10:11:22 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3200CA4B; Fri, 16 Jan 2015 10:11:21 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 2E2D05A15; Fri, 16 Jan 2015 10:11:10 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id EDF78E15C; Fri, 16 Jan 2015 11:11:14 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> Date: Fri, 16 Jan 2015 11:11:14 +0100 In-Reply-To: <20150115142725.GA20964@FreeBSD.org> (Alexey Dokuchaev's message of "Thu, 15 Jan 2015 14:27:25 +0000") Message-ID: <86vbk7dohp.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:11:22 -0000 Alexey Dokuchaev writes: > Edward, Andrey, since you two seem to have some working code already, > maybe you can work together to push out something that can be > committed? :) ------------------------------------------------------------------------ r241053 | ae | 2012-09-29 18:47:56 +0200 (Sat, 29 Sep 2012) | 17 lines Almost each time when loader opens a file, this leads to calling disk_open(). Very often this is called several times for one file. This leads to reading partition table metadata for each call. To reduce the number of disk I/O we have a simple block cache, but it is very dumb and more than half of I/O operations related to reading metadata, misses this cache. Introduce new cache layer to resolve this problem. It is independent and doesn't need initialization like bcache, and will work by default for all loaders which use the new DISK API. A successful disk_open() call to each new disk or partition produces new entry in the cache. Even more, when disk was already open, now opening of any nested partitions does not require reading top level partition table. So, if without this cache, partition table metadata was read around 20-50 times during boot, now it reads only once. This affects the booting from GPT and MBR from the UFS. ------------------------------------------------------------------------ DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 10:44:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38ECEAE3; Fri, 16 Jan 2015 10:44:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252C2D49; Fri, 16 Jan 2015 10:44:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GAie2q086236; Fri, 16 Jan 2015 10:44:40 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GAieGv086235; Fri, 16 Jan 2015 10:44:40 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501161044.t0GAieGv086235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 16 Jan 2015 10:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277239 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:44:40 -0000 Author: smh Date: Fri Jan 16 10:44:39 2015 New Revision: 277239 URL: https://svnweb.freebsd.org/changeset/base/277239 Log: Eliminate illumos whole disk special case when searching for a ZFS vdev This special case prevented locating vdevs which start with c[0-9] e.g. gptid/c6cde092-504b-11e4-ba52-c45444453598 hence it was impossible to online a vdev via its path. Submitted by: Peter Xu MFC after: 2 weeks Sponsored by: Multiplay Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 16 10:09:28 2015 (r277238) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 16 10:44:39 2015 (r277239) @@ -1916,6 +1916,7 @@ zpool_scan(zpool_handle_t *zhp, pool_sca } } +#ifdef illumos /* * This provides a very minimal check whether a given string is likely a * c#t#d# style string. Users of this are expected to do their own @@ -1947,6 +1948,7 @@ ctd_check_path(char *str) { } return (CTD_CHECK(str)); } +#endif /* * Find a vdev that matches the search criteria specified. We use the @@ -2002,6 +2004,7 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist * * Otherwise, all other searches are simple string compares. */ +#ifdef illumos if (strcmp(srchkey, ZPOOL_CONFIG_PATH) == 0 && ctd_check_path(val)) { uint64_t wholedisk = 0; @@ -2041,6 +2044,9 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist break; } } else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) { +#else + if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) { +#endif char *type, *idx, *end, *p; uint64_t id, vdev_id; From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 10:49:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45A8EC7E; Fri, 16 Jan 2015 10:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32467D7E; Fri, 16 Jan 2015 10:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GAnSAF086866; Fri, 16 Jan 2015 10:49:28 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GAnSfB086865; Fri, 16 Jan 2015 10:49:28 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501161049.t0GAnSfB086865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 16 Jan 2015 10:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277240 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:49:28 -0000 Author: melifaro Date: Fri Jan 16 10:49:27 2015 New Revision: 277240 URL: https://svnweb.freebsd.org/changeset/base/277240 Log: Use ipfw runtime lock only when real modification is required. Modified: head/sys/netpfil/ipfw/ip_fw_nat.c Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Fri Jan 16 10:44:39 2015 (r277239) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Fri Jan 16 10:49:27 2015 (r277240) @@ -105,7 +105,7 @@ ifaddr_change(void *arg __unused, struct KASSERT(curvnet == ifp->if_vnet, ("curvnet(%p) differs from iface vnet(%p)", curvnet, ifp->if_vnet)); chain = &V_layer3_chain; - IPFW_WLOCK(chain); + IPFW_UH_WLOCK(chain); /* Check every nat entry... */ LIST_FOREACH(ptr, &chain->nat, _next) { /* ...using nic 'ifp->if_xname' as dynamic alias address. */ @@ -117,13 +117,15 @@ ifaddr_change(void *arg __unused, struct continue; if (ifa->ifa_addr->sa_family != AF_INET) continue; + IPFW_WLOCK(chain); ptr->ip = ((struct sockaddr_in *) (ifa->ifa_addr))->sin_addr; LibAliasSetAddress(ptr->lib, ptr->ip); + IPFW_WUNLOCK(chain); } if_addr_runlock(ifp); } - IPFW_WUNLOCK(chain); + IPFW_UH_WUNLOCK(chain); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 11:17:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E6C873B; Fri, 16 Jan 2015 11:17:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B00B11C; Fri, 16 Jan 2015 11:17:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GBHVUj001498; Fri, 16 Jan 2015 11:17:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GBHVf6001497; Fri, 16 Jan 2015 11:17:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501161117.t0GBHVf6001497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 16 Jan 2015 11:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277241 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 11:17:31 -0000 Author: melifaro Date: Fri Jan 16 11:17:30 2015 New Revision: 277241 URL: https://svnweb.freebsd.org/changeset/base/277241 Log: Eliminate incorrect IPv6 mask guessing: RFC 2374 concept of 'IPv6 Aggregatable Global Unicast Address Format' was deprecated by RFC 3587 12 years ago. Before: 15:06 [1] edge# netstat -rn6 | grep 2a02:6b8:: 2a02:6b8::/32 2a02:978:2::1 UGS em0 15:06 [1] edge# route -6n get 2a02:6b8:: route: writing to routing socket: No such process After: 15:07 [1] edge# /usr/obj/usr/src/sbin/route/route -n6 get 2a02:6b8:: route to: 2a02:6b8:: destination: 2a02:6b8:: mask: ffff:ffff:: gateway: 2a02:978:2::1 fib: 0 interface: em0 flags: recvpipe sendpipe ssthresh rtt,msec mtu weight expire 0 0 0 0 1500 1 0 MFC after: 2 weeks Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Fri Jan 16 10:49:27 2015 (r277240) +++ head/sbin/route/route.c Fri Jan 16 11:17:30 2015 (r277241) @@ -1137,19 +1137,11 @@ inet_makenetandmask(u_long net, struct s static int inet6_makenetandmask(struct sockaddr_in6 *sin6, const char *plen) { - struct in6_addr in6; if (plen == NULL) { if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && - sin6->sin6_scope_id == 0) { + sin6->sin6_scope_id == 0) plen = "0"; - } else if ((sin6->sin6_addr.s6_addr[0] & 0xe0) == 0x20) { - /* aggregatable global unicast - RFC2374 */ - memset(&in6, 0, sizeof(in6)); - if (!memcmp(&sin6->sin6_addr.s6_addr[8], - &in6.s6_addr[8], 8)) - plen = "64"; - } } if (plen == NULL || strcmp(plen, "128") == 0) From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 12:11:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33B0067F; Fri, 16 Jan 2015 12:11:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B378B4; Fri, 16 Jan 2015 12:11:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GCB2H8027358; Fri, 16 Jan 2015 12:11:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GCB2dW027356; Fri, 16 Jan 2015 12:11:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501161211.t0GCB2dW027356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 16 Jan 2015 12:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277245 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:11:03 -0000 Author: hselasky Date: Fri Jan 16 12:11:01 2015 New Revision: 277245 URL: https://svnweb.freebsd.org/changeset/base/277245 Log: Add more USB request definitions. The values are described in section 9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification" Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/lib/libusb/libusb.h head/lib/libusb/libusb20_desc.h Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Fri Jan 16 11:51:47 2015 (r277244) +++ head/lib/libusb/libusb.h Fri Jan 16 12:11:01 2015 (r277245) @@ -128,6 +128,8 @@ enum libusb_standard_request { LIBUSB_REQUEST_GET_INTERFACE = 0x0A, LIBUSB_REQUEST_SET_INTERFACE = 0x0B, LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, + LIBUSB_REQUEST_SET_SEL = 0x30, + LIBUSB_REQUEST_SET_ISOCH_DELAY = 0x31, }; enum libusb_request_type { Modified: head/lib/libusb/libusb20_desc.h ============================================================================== --- head/lib/libusb/libusb20_desc.h Fri Jan 16 11:51:47 2015 (r277244) +++ head/lib/libusb/libusb20_desc.h Fri Jan 16 12:11:01 2015 (r277245) @@ -481,6 +481,12 @@ enum libusb20_standard_request { /** Set then report an endpoint's synchronization frame */ LIBUSB20_REQUEST_SYNCH_FRAME = 0x0C, + + /** Set U1 and U2 system exit latency */ + LIBUSB20_REQUEST_SET_SEL = 0x30, + + /** Set isochronous delay */ + LIBUSB20_REQUEST_SET_ISOCH_DELAY = 0x31, }; /** \ingroup misc From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 12:16:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A37840; Fri, 16 Jan 2015 12:16:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92207987; Fri, 16 Jan 2015 12:16:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GCGM4Z029931; Fri, 16 Jan 2015 12:16:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GCGMsE029929; Fri, 16 Jan 2015 12:16:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501161216.t0GCGMsE029929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 16 Jan 2015 12:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277246 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:16:22 -0000 Author: hselasky Date: Fri Jan 16 12:16:21 2015 New Revision: 277246 URL: https://svnweb.freebsd.org/changeset/base/277246 Log: Add more USB device IDs. Submitted by: max.n.boyarov@gmail.com PR: 196362 MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Jan 16 12:11:01 2015 (r277245) +++ head/sys/dev/usb/serial/u3g.c Fri Jan 16 12:16:21 2015 (r277246) @@ -239,6 +239,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DELL, U740, 0), U3G_DEV(DLINK, DWR510_CD, U3GINIT_SCSIEJECT), U3G_DEV(DLINK, DWR510, 0), + U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWM157, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 16 12:11:01 2015 (r277245) +++ head/sys/dev/usb/usbdevs Fri Jan 16 12:16:21 2015 (r277246) @@ -1627,6 +1627,8 @@ product DLINK DSB650 0xabc1 10/100 Ethe product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode product DLINK DWR510 0x7e12 DWR-510 +product DLINK DWM157 0x7d02 DWM-157 +product DLINK DWM157_CD 0xa707 DWM-157 CD-ROM Mode product DLINK RTL8188CU 0x3308 RTL8188CU product DLINK RTL8192CU_1 0x3307 RTL8192CU product DLINK RTL8192CU_2 0x3309 RTL8192CU From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 12:31:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DD45B19; Fri, 16 Jan 2015 12:31:29 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9490B2E; Fri, 16 Jan 2015 12:31:28 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id hn15so2996610igb.3; Fri, 16 Jan 2015 04:31:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=AxOSwj8+hL9Nt6rwqzZ2l41po5RxliH2045l5NpcUZE=; b=ADf/DV7xqPYfydtVM8a2KHisenHBQySM4O9FtYrpNnwgsgcabABT6U95zUcOiUjT/F sQD7uqEUl5wFL8To8n064YAHUWHg/s+WbPau97Zp9TNAvbf1c1gJzSkaqOGet5nZgkwG 3POVuyJW9zylUW9+9uDY4i5T/0mj+XddWPK6XpY2Ow8IEmQmRqtrfkKmgGn87sU6QcWk IgLEQZBMrYACa+KWyiSr5RF5p7zrxuGCSjAhRulA58aksUWhWNoehn6qjpP+5LsoWnIE +GaaRv41wL4WfLUGDLlAbChEU9nV0N2k12DYKM60aMU9Hh3EljPl/5Aoc2fp0VZFJ0z3 z3Lg== X-Received: by 10.42.251.68 with SMTP id mr4mr7659496icb.94.1421411488277; Fri, 16 Jan 2015 04:31:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.175.4 with HTTP; Fri, 16 Jan 2015 04:30:58 -0800 (PST) In-Reply-To: <201412021955.sB2JtiXL009756@svn.freebsd.org> References: <201412021955.sB2JtiXL009756@svn.freebsd.org> From: Jia-Shiun Li Date: Fri, 16 Jan 2015 20:30:58 +0800 Message-ID: Subject: Re: svn commit: r275422 - in head/sys: amd64/conf i386/conf pc98/conf powerpc/conf sparc64/conf To: "George V. Neville-Neil" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:31:29 -0000 On Wed, Dec 3, 2014 at 3:55 AM, George V. Neville-Neil wrote: > Author: gnn > Date: Tue Dec 2 19:55:43 2014 > New Revision: 275422 > URL: https://svnweb.freebsd.org/changeset/base/275422 > > Log: > This configuration file removes several debugging options, including > WITNESS and INVARIANTS checking, which are known to have significant > performance impact on running systems. When benchmarking new features > this kernel should be used instead of the standard GENERIC. > This kernel configuration should never appear outside of the HEAD > of the FreeBSD tree. > Just noticed the newly added config file. Shall we mention it in foreword of /usr/src/UPDATING to tell people interested in benchmarking -current to use it instead? -Jia-Shiun From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 12:35:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E103D3C; Fri, 16 Jan 2015 12:35:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD65B78; Fri, 16 Jan 2015 12:35:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GCZuqP039459; Fri, 16 Jan 2015 12:35:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GCZuXs039458; Fri, 16 Jan 2015 12:35:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501161235.t0GCZuXs039458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Jan 2015 12:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277247 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:35:56 -0000 Author: mav Date: Fri Jan 16 12:35:55 2015 New Revision: 277247 URL: https://svnweb.freebsd.org/changeset/base/277247 Log: Don't count status as sent until CTIO completes successfully. If we aggregated status sending with data move and got error, allow status to be updated and resent again separately. Without this command may stuck without status sent at all. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Jan 16 12:16:21 2015 (r277246) +++ head/sys/cam/ctl/scsi_ctl.c Fri Jan 16 12:35:55 2015 (r277247) @@ -891,7 +891,6 @@ ctlfestart(struct cam_periph *periph, un (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || io->io_hdr.status == CTL_SUCCESS)) { - io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; flags |= CAM_SEND_STATUS; scsi_status = io->scsiio.scsi_status; csio->sense_len = io->scsiio.sense_len; @@ -1265,6 +1264,10 @@ ctlfedone(struct cam_periph *periph, uni break; } + if ((done_ccb->ccb_h.flags & CAM_SEND_STATUS) && + (done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + /* * If we were sending status back to the initiator, free up * resources. If we were doing a datamove, call the From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 15:15:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CD4FEAC; Fri, 16 Jan 2015 15:15:31 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BBA1E51; Fri, 16 Jan 2015 15:15:31 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hi2so4503051wib.2; Fri, 16 Jan 2015 07:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=uR/IE2/WUSG0vgXh6UQJJfpgQYkL9JjSsfvdlH8eRe4=; b=PWcs9/CJy9HiwRM+n01wI+O7C3TOhnswz12ZreSsVkImOdPj74Lon8Pix4P/gPj/6j EcWPJt292szzzMj91ERU7JQIHaVJi9bIzvv2eJYBu3t7blQGeUB+8b9zDr7X/bYb8pn/ Z8vXh7jE/Gn+4Z/XVlsWVeipo3YZgLUmeLa4UcPNbZ12/kfs9slXc/+9yGUVi74nfYkj SeW+gNi/W0xSqLy4hTO5FTk7PUGf86LSYGRq9HZwv7I08lvF/GXFH1rD992CnPJPcNYU m/L4N8jIi3BoSdJknAqRMRHm8XA9CP0mGSgeI8a1/Drvm1YHj6ahZ/UoNZSIFY1GFdHb XPkw== X-Received: by 10.180.104.9 with SMTP id ga9mr7332034wib.9.1421421329196; Fri, 16 Jan 2015 07:15:29 -0800 (PST) Received: from [172.16.1.30] (243.Red-2-137-76.dynamicIP.rima-tde.net. [2.137.76.243]) by mx.google.com with ESMTPSA id l6sm6432104wjx.33.2015.01.16.07.15.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jan 2015 07:15:28 -0800 (PST) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <54B92B0A.1020108@FreeBSD.org> Date: Fri, 16 Jan 2015 16:15:22 +0100 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen References: <201501151627.t0FGRLY2062439@svn.freebsd.org> <1421362982.14601.280.camel@freebsd.org> In-Reply-To: <1421362982.14601.280.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 15:15:31 -0000 El 16/01/15 a les 0.03, Ian Lepore ha escrit: > On Thu, 2015-01-15 at 16:27 +0000, Roger Pau Monné wrote: >> Author: royger >> Date: Thu Jan 15 16:27:20 2015 >> New Revision: 277215 >> URL: https://svnweb.freebsd.org/changeset/base/277215 >> >> Log: >> loader: implement multiboot support for Xen Dom0 >> [...] >> >> Added: >> head/sys/boot/i386/libi386/multiboot.c (contents, props changed) >> head/sys/boot/i386/libi386/multiboot.h (contents, props changed) >> head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props changed) >> Modified: >> head/sys/amd64/include/metadata.h >> head/sys/boot/common/bootstrap.h >> head/sys/boot/common/load_elf.c >> head/sys/boot/common/load_elf_obj.c >> head/sys/boot/common/module.c >> head/sys/boot/fdt/fdt_loader_cmd.c >> head/sys/boot/forth/beastie.4th >> head/sys/boot/forth/loader.4th >> head/sys/boot/forth/support.4th >> head/sys/boot/i386/libi386/Makefile >> head/sys/boot/i386/libi386/bootinfo64.c >> head/sys/boot/i386/libi386/elf64_freebsd.c >> head/sys/boot/i386/libi386/libi386.h >> head/sys/boot/i386/loader/conf.c >> head/sys/i386/include/metadata.h >> head/sys/x86/xen/pv.c > > Something about this change breaks ubldr on arm (it works @ r277214). > Now on an RPi I get this: > > /boot/kernel/kernel data=0x4cf8a4+0x3475c syms=[0x4+0x91650+0x4+0x53354] > panic: Address offset 0x40000000 bigger than size 0x1E000000 > > There is a single physical extent of ram from 0-0x1e000000. Sorry for this, the above patch solved the problem for me. I'm currently running a tinderbox with it to make sure nothing else breaks, but the fix is quite straightforward. --- diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c index 6860815..4c801e9 100644 --- a/sys/boot/common/load_elf.c +++ b/sys/boot/common/load_elf.c @@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end); + Elf_Addr p_start, Elf_Addr p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) Elf_Size size; u_int fpcopy; Elf_Sym sym; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; dp = NULL; shdr = NULL; @@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) Elf_Shdr *sh_data[2]; char *shstrtab = NULL; size_t size; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; bzero(&ef, sizeof(struct elf_file)); ef.fd = -1; @@ -820,7 +820,7 @@ out: int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end) + Elf_Addr p_start, Elf_Addr p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 15:16:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53AD5FF6; Fri, 16 Jan 2015 15:16:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F65BE65; Fri, 16 Jan 2015 15:16:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GFGKOC015286; Fri, 16 Jan 2015 15:16:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GFGKhu015285; Fri, 16 Jan 2015 15:16:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501161516.t0GFGKhu015285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Jan 2015 15:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277249 - head/contrib/elftoolchain/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 15:16:20 -0000 Author: emaste Date: Fri Jan 16 15:16:19 2015 New Revision: 277249 URL: https://svnweb.freebsd.org/changeset/base/277249 Log: Verify that section header offset is not past EOF MFC After: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelf/elf_scn.c Modified: head/contrib/elftoolchain/libelf/elf_scn.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_scn.c Fri Jan 16 15:10:55 2015 (r277248) +++ head/contrib/elftoolchain/libelf/elf_scn.c Fri Jan 16 15:16:19 2015 (r277249) @@ -60,7 +60,8 @@ _libelf_load_section_headers(Elf *e, voi assert((e->e_flags & LIBELF_F_SHDRS_LOADED) == 0); #define CHECK_EHDR(E,EH) do { \ - if (fsz != (EH)->e_shentsize || \ + if (shoff > e->e_rawsize || \ + fsz != (EH)->e_shentsize || \ shnum > SIZE_MAX / fsz || \ fsz * shnum > e->e_rawsize - shoff) { \ LIBELF_SET_ERROR(HEADER, 0); \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 15:17:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id EAF011A4; Fri, 16 Jan 2015 15:17:11 +0000 (UTC) Date: Fri, 16 Jan 2015 15:17:11 +0000 From: Alexey Dokuchaev To: Dag-Erling Smorgrav Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20150116151711.GA39938@FreeBSD.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> <86vbk7dohp.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86vbk7dohp.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 15:17:12 -0000 On Fri, Jan 16, 2015 at 11:11:14AM +0100, Dag-Erling Smorgrav wrote: > Alexey Dokuchaev writes: > > Edward, Andrey, since you two seem to have some working code already, > > maybe you can work together to push out something that can be > > committed? :) > > ------------------------------------------------------------------------ > r241053 | ae | 2012-09-29 18:47:56 +0200 (Sat, 29 Sep 2012) | 17 lines Thanks; I wonder why this commit was not mentioned 16 months ago, esp. with ae@ CCed. ./danfe From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 17:41:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70E7952F; Fri, 16 Jan 2015 17:41:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C5BA28B; Fri, 16 Jan 2015 17:41:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GHfMKv088829; Fri, 16 Jan 2015 17:41:22 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GHfMH2088828; Fri, 16 Jan 2015 17:41:22 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501161741.t0GHfMH2088828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 16 Jan 2015 17:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277254 - head/sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 17:41:22 -0000 Author: nwhitehorn Date: Fri Jan 16 17:41:21 2015 New Revision: 277254 URL: https://svnweb.freebsd.org/changeset/base/277254 Log: Make netbooting work again by disabling BOOTP_NFSV3. Investigate why this causes bad RPC errors later. Modified: head/sys/powerpc/conf/MPC85XX Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Fri Jan 16 17:40:30 2015 (r277253) +++ head/sys/powerpc/conf/MPC85XX Fri Jan 16 17:41:21 2015 (r277254) @@ -20,7 +20,7 @@ options ALT_BREAK_TO_DEBUGGER options BREAK_TO_DEBUGGER options BOOTP options BOOTP_NFSROOT -options BOOTP_NFSV3 +#options BOOTP_NFSV3 options BOOTP_WIRED_TO=tsec0 options CD9660 options COMPAT_43 From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 17:58:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 756A7C1E for ; Fri, 16 Jan 2015 17:58:04 +0000 (UTC) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F6E56A6 for ; Fri, 16 Jan 2015 17:58:03 +0000 (UTC) Received: by mail-pd0-f175.google.com with SMTP id g10so24000534pdj.6 for ; Fri, 16 Jan 2015 09:57:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=gwqw5nfuYO2InERsxl4uHFftYpMO1+GubbeY5v/ISgo=; b=KfQIIag0JrsUZH9cz9VuPkWDwQbMiEuKU6zQ5HJ/XZVcIBEkHQu2LlIkSBmBuIkqrj gJb47S3j++VdF9K+kBBTWubaHYKBL9I/9mjVQ8TSgB8jUXmUOVwOy/gNqFNVHbZsKY4Z lvpZETfX/wt23uq5JstlouRvPk6n89WG/V+9nGDJ+7XeMSrR/jubYaLijJvX1M3p3IQG Fcx78Y6jVJJlbWBykZUVuXuD0pjw8nIWv+fTIUuJL3iPx1Cm/JrdIvTwDu5zAHjccstW 513m98ZzR8/pJS99UlQ4se5SI8muIUcXKqWO/3TATMMbRZT+J+TQ1I9zVbRvEvsATsL8 0DyQ== X-Gm-Message-State: ALoCoQnPP0+VBcihdsRJbYdZ5Nn8yBzE96uBOovam4qD3p1Tf5eCXCfd0jZ4KWaqO0t/So5gO/vA X-Received: by 10.68.211.104 with SMTP id nb8mr15623182pbc.29.1421431077406; Fri, 16 Jan 2015 09:57:57 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id z2sm4625942pdc.95.2015.01.16.09.57.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 09:57:56 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115132303.GA245@zxy.spb.ru> Date: Fri, 16 Jan 2015 10:57:54 -0700 Message-Id: <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 17:58:04 -0000 --Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov = wrote: >=20 > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >=20 >> Author: imp >> Date: Thu Jan 15 00:42:06 2015 >> New Revision: 277204 >> URL: https://svnweb.freebsd.org/changeset/base/277204 >>=20 >> Log: >> New MINIMAL kernel config. The goal with this configuration is to >> only compile in those options in GENERIC that cannot be loaded as >> modules. ufs is still included because many of its options aren't >> present in the kernel module. There's some other exceptions = documented >=20 > Are you sure? > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. While one could set options in the kernel to affect the ufs.ko build, there=E2=80=99s not a universal ufs.ko that can be loaded easily that = switches between the different types of options. You can create modules that do this, but that=E2=80=99s a very very different problem than the = one I want to solve, namely you get the same[*] functionality having device fred in the kernel config as kldloading fred.ko. So rather than bite off that problem also, I=E2=80=99m opting for simplicity. >> +options SOFTUPDATES # Enable FFS soft updates = support >> +options UFS_ACL # Support for access control = lists >> +options UFS_DIRHASH # Improve performance on big = directories >> +options UFS_GJOURNAL # Enable gjournal-based UFS = journaling >> +options QUOTA # Enable disk quotas for UFS >=20 >> +options SYSVSHM # SYSV-style shared memory >> +options SYSVMSG # SYSV-style message queues >> +options SYSVSEM # SYSV-style semaphores >> +device agp # support several AGP = chipsets >> +device random # Entropy device >> +device padlock_rng # VIA Padlock RNG >> +device rdrand_rng # Intel Bull Mountain = RNG >> +device vlan # 802.1Q VLAN support >> +device tun # Packet tunnel. >> +device gif # IPv6 and IPv4 = tunneling >=20 > This is loadable too. True > And please include: >=20 > NETMAP > NFS_ROOT OK. > IEEE80211_DEBUG > IEEE80211_AMPDU_AGE > IEEE80211_SUPPORT_MESH > AH_SUPPORT_AR5416 > AH_AR5416_INTERRUPT_MITIGATION > ATH_ENABLE_11N These are already the default for the ath or wlan modules, if I=E2=80=99m = reading things correctly. Warner --Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuVEiAAoJEGwc0Sh9sBEA7w4QALcHU+Ii+UEQHX5D/fHUzlF5 o+gxUJqgQaylDai0ly+vnh1qRj3PkFA8O/crkzNWBZCHcL4Uf7Sd0/ArySd1O9nK S77HBYzizTybaDekB795a9H2IINu+N/cazOMdjbhIa3tO1031adq7KMKT2LYKiO1 mrarlEaxAInetFDOAOxXHwWrCHZIUmeljHGtPZJJOP+RVb30uknGLrCbTyHAOBSJ tJwh3mPmpWmDoyyzXdJb/EQUYNw46n6EQyrlBTqB1HXMaPVwm3/HiXbUDXuajv6l Y9P9i1cUcQ89UTzfHPJYXgN6OI1Hn+TX+hZpqKYG9nCtWlrfyPQTfTHTDzHmXmVM CWyiTteC3QPcILPhZnNbiwKdusjLMMvJNmW1WeMqkBiOpM1C+HtijjVeOlmMRay8 nTj0pRgTTDYAkC37i4nNaUmruY/J3U6lDCOKptcQMvXMhiSYBd/6Xuhynen3o5Ol vfJchQm5PkCBd65RHbep1Dsy26ycJlKS7F7TDmxsbzvGTBihGFkGtx1tw6o4F6K+ tRAlHjSFlaGIVBoRE+cA5MK8GjFsL/wZFe5c2jptyGtMM2wX0Fk83s5DUhhjzSo8 Oe+7Oceygz3JnQ1RVJGPfaPkOZWCOWZ1DdTrS1EYMsg/EcB6gmwVcfISgOEroQ1l ry+5AeEdFUDVqqeTCSlM =qSFR -----END PGP SIGNATURE----- --Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:01:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB9C9DCF for ; Fri, 16 Jan 2015 18:01:56 +0000 (UTC) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 782ED7BD for ; Fri, 16 Jan 2015 18:01:56 +0000 (UTC) Received: by mail-pd0-f180.google.com with SMTP id fl12so23981898pdb.11 for ; Fri, 16 Jan 2015 10:01:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=LeKfyQA3c09yg31kwiKhDkWfbPL7cjLGxE1IFnNqon4=; b=BEqIeL8sgsAJ3wV09eZoUpf1tKH7291EZFQsUDruodc45gyVvQI0K3jpaJ0la6Rrk4 tQAe4zwXGHYBDccExhEtkZpq7vWSvirAIPZBQhkfOq7ZbofHVVJ9WnB62BrUYqRZTrHJ 2WREuF2f2rDSqoW4vWVKqijFc3QvbepvzDPoBaw08T2pGP8EygPKiZuCbSpfesmnSalr +1/MDPvEx3fKxg29/jYKqDQY0I7UpmbFTsXc2gyhuKykoGXOUGs7FvMqItaQn9gLuCWc IpgaavxOem4phwAfqXd3/tDA1NH2/auT7O/dmpHsgjVedg68yQOQYhUb8IMO2/T9Rxzq b4ZQ== X-Gm-Message-State: ALoCoQn5wnNDEuyHapCFBehXzwgjNJXeu8vdPi4znVxKg46sc8b7l8MEBK2MYF+FFENadG7KvTAt X-Received: by 10.68.211.104 with SMTP id nb8mr15650395pbc.29.1421431310415; Fri, 16 Jan 2015 10:01:50 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id y2sm4671653pdm.31.2015.01.16.10.01.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:01:49 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115134446.GA92636@FreeBSD.org> Date: Fri, 16 Jan 2015 11:01:46 -0700 Message-Id: <8CA7406B-9962-4DED-A509-14851128F43B@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:01:56 -0000 --Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 6:44 AM, Alexey Dokuchaev = wrote: >=20 > On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: >> On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >>> New Revision: 277204 >>> URL: https://svnweb.freebsd.org/changeset/base/277204 >>>=20 >>> Log: >>> New MINIMAL kernel config. The goal with this configuration is to >>> only compile in those options in GENERIC that cannot be loaded as >>> modules. ufs is still included because many of its options aren't >>> present in the kernel module. There's some other exceptions = documented >>=20 >> Are you sure? >> I think defining UFS options in kernel connfig affect to module too. >> When I define this options in kernel config (w/o options FFS) I got >> ufs.ko with this SU, quota, acl etc. >>=20 >> [...] >> This is loadable too. >=20 > Right, it does not look like minimal to me either. Too many things, sadly, are kernel options and the functionality is = absent when or reduced when loading from a module. > But I welcome the > intention. AFAIR last time we had a discussion about why our default > kernel is not MINIMAL, it boiled down to two main problems: 1) = loader's > caching of disk reads (which makes loading *.ko's from = /boot/loader.conf > a PITA, esp. on ZFS), and 2) robust way to figure out which modules to > load on an arbitrary user's system (so they won't have to write their > /boot/loader.conf from scratch themselves). (2) is the exact problem I=E2=80=99m working on. Since the design of = that will allow us to read from the kernel these modules, (1) becomes largely irrelevant because the only /boot/loader incursion would be to load drivers for any storage devices that are on the PCIe bus. > Speaking of (1), I recall there was one or two attempts to address it > (keyword: fast-loader-3.diff). Can someone with more details on their > hands comment a bit what had happened to that work and are there any > ETA for it to get committed? That would be a big leap forward towards > minimal kernel which can be feasible enough to replace (or be a real > alternative to) GENERIC in the future. Perhaps. Let=E2=80=99s see how my stuff plays out, since it generally = would mean we could use a more minimal kernel and let the system figure out what = other things should be loaded. Warner --Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuVIKAAoJEGwc0Sh9sBEAPqAP/1ksobiazMXPCCCff1kwqEdp EPBJh94ERMu+hJD+3zBE+2Zlc02KGlto5zt6d5fTvzWTx4w+DOzbIPjMznOQhrZ/ xx2CK3wabE+dH+wy0+wiszDh9rjQNgPAct9Yw65zAHLEWt5Z2TTGoevSxJVrMDiQ LQoVElZeuhnxLp/RBlI8292c6KLat73RgJqrqaQ+ZqpZiJjzbvlwUjqa51wu7t4w oOo2M+/cGqYdcx+16CF0GNMNasHRFJpk4un1gCiZVafRz3YuVSlcciBkMbJJnvJC G6imEmte3X+b5eR6VmcCLJSGVKxQQeDeP+6yk6W6cvpN5c+e2IVnoYl7Dq5rlQCW NPLRpGaxeu6sIdyPcwIXkFIrn0vUYof04FA/JC3kypcBLvWNuezzywqGewhOhaUs PFbh3P+TpwEWCnm2ulhmZhxTa7z3JP2QZnwGA5wvIGUxOPbb0mfC5QZ+kwFBnYUT BsvMdk/jKTFPAOEs/eu6IGJ2xlvWB07Kk/2in/nNm/f3b3rsLYHN7ei8/apfVZl4 f2eI18yHep1mqWjFB3mHZ0xLuf15S6RPh2n04aZtdnb5Eu/gC0pLSljXsE37/ytM ie82jpGfST5c3MdV1ycHakqNf5skvOmMwC+ND1uMSOs4Lolo0madt1tOT+cTs53b 1x+ZurfCYefJWFrP53WW =aYih -----END PGP SIGNATURE----- --Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:07:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFA43F7 for ; Fri, 16 Jan 2015 18:07:16 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCF88828 for ; Fri, 16 Jan 2015 18:07:16 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id eu11so25616302pac.8 for ; Fri, 16 Jan 2015 10:07:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=tF0DpkGke4/x51Es5Xw9NffghquLVxyO72EjNMraF6c=; b=X78cBHy5W6xapvm/KuN7UjHZ/fLU2yZHlPzmm10AAnuPjNJaeXDuSN7kla+7437U/1 IuBStG+c4eESMgl9Y1POTen84jbZIH8WZraZPxJMXd/tkQ6NXM4hFhJ/ARNAIRy1xxDX ZfwhdiLssqDWJrPxss+zHJebHiQe8Du5o9CpK8K6CJq2dlCEPEDhF6iKIxYCd5IMr69w 6Z/QiP3EJchr/h8aqHNeUf0N3BvrEfB8ZmYaYJOUNyjbpyf6VPfQ4Xaq7QYq7kf+PZM7 J+XZqEak6P2cQfEkjxlvUEIn6mDBU50EH/Ybhy8u4gIehltX//OhYWslkm+cbo2R8lRc xGEg== X-Gm-Message-State: ALoCoQkaC6vi0eA52OzjlWspVyaXhioozkFZ3cNinLH0tQoOSbFJiwjuI/OfsAUeZiMW0c5bTuNy X-Received: by 10.66.65.234 with SMTP id a10mr25066775pat.120.1421431630342; Fri, 16 Jan 2015 10:07:10 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id pw9sm4686182pbb.12.2015.01.16.10.07.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:07:09 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115162050.GA60729@FreeBSD.org> Date: Fri, 16 Jan 2015 11:07:07 -0700 Message-Id: <5645C90D-2CC7-4517-8AD4-B238AF42AD51@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <54B7E21B.5080008@FreeBSD.org> <20150115162050.GA60729@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:07:17 -0000 --Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 9:20 AM, Alexey Dokuchaev = wrote: >=20 > On Thu, Jan 15, 2015 at 10:51:55AM -0500, John Baldwin wrote: >>> [...] >>> +# Pseudo devices. >>> +device loop # Network loopback >>> +device random # Entropy device >>> +device padlock_rng # VIA Padlock RNG >>> +device rdrand_rng # Intel Bull Mountain = RNG >>> +device ether # Ethernet support >>> +device vlan # 802.1Q VLAN support >>> +device tun # Packet tunnel. >>> +device gif # IPv6 and IPv4 = tunneling >>=20 >> These last three definitely work as modules. (vlan(4) was only = recently >> added to GENERIC). >=20 > And many other things as well (like SYSV* for example). I usually go = as > far as nodevice'ing io and mem, FWIW. >=20 > That said, if we supply reference MINIMAL, it should *really* be = minimal. > And it should not be limited to amd64; lest we forget, our primary = target > should still be i386. Noted. However, the driver here is an automated loading system. This = isn=E2=80=99t a theoretical =E2=80=98least you can have in the kernel=E2=80=99 thing = but rather GENERIC with all the stuff you can practically kldload taken out. But you bring up a good point. i386 is easy, once the basics are done. = PowerPC is only slightly harder, since it has good /boot/loader support as well as = a GENERIC kernel or two. Ditto sparc64. But stepping into arm and mips then all = hell breaks loose. It=E2=80=99s also desirable to refactor GENERIC, for the transition = period, to be include MINIMAL + more stuff. I=E2=80=99ll do that as time permits. Warner --Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuVNLAAoJEGwc0Sh9sBEAeSAQAJa+YJX8Rn9RYqPZjLT/oW3t AIJzZnfIRIVVlnlxu6XK5cC/PNUwEPRZfu08mmcHyIx51OTORUe8iWoahG6nxpEH VKIpYRI0Tf57omtB9pTdSOAH6zjOBf/ULbC12Rc1CEV/5WsqnPkbpaLYscVqIEkr Gn05eNJmvEhr4ft5gUPEQEVd3XEPbj7NqPV9Gdm3Gh/K/NYndo9qR5AYlQ+/QstU NTxGt4wTx62ct6L9lCw8JMGULtHX4AkLnfEt9jJJimxKMn3C99XuIATvjgPApWwC BHXAQ7vCWsXCEMx3TmPSviHWnJr4CUL/MANWw3OeISIo73Gu/sbsFcqWicx+JzMD ZmDth+yhsL79xxb5JWh1qBh+c8TML3nsDVNA5KO5EugiNsOaCUaPhyKq889r2geP C7AsLwQDEHM7IEFCAHGtoDQXH5aSHcka4eWqrnI45Z+2UR3j2dH3Ng6art6Um/aN RPKgidfEVZVZ5ObSeEuvtz3fpcWDieP/3BwOMbQv7pNvP+HmdFsBGF2R/6NfTAMD P22QYLOHszzkyEeSQfUP7b8jxmrnKuVDA2Bo8/Av10QVujiuXQSFlUdGdfcozuxl Ywrkbv2AqiFuFp6VmpwTSodzRe6wjx1S9+6we1rAsiJNMj9feA9t+9bjE1HoN6eQ qSyTciiR3CwhY3lsGU/Y =mB/J -----END PGP SIGNATURE----- --Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:17:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6ACFE56A; Fri, 16 Jan 2015 18:17:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 564B1974; Fri, 16 Jan 2015 18:17:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GIHAjo005784; Fri, 16 Jan 2015 18:17:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIHA9U005783; Fri, 16 Jan 2015 18:17:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201501161817.t0GIHA9U005783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 16 Jan 2015 18:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277255 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:17:10 -0000 Author: alc Date: Fri Jan 16 18:17:09 2015 New Revision: 277255 URL: https://svnweb.freebsd.org/changeset/base/277255 Log: Revamp the default page clustering strategy that is used by the page fault handler. For roughly twenty years, the page fault handler has used the same basic strategy: Fetch a fixed number of non-resident pages both ahead and behind the virtual page that was faulted on. Over the years, alternative strategies have been implemented for optimizing the handling of random and sequential access patterns, but the only change to the default strategy has been to increase the number of pages read ahead to 7 and behind to 8. The problem with the default page clustering strategy becomes apparent when you look at how it behaves on the code section of an executable or shared library. (To simplify the following explanation, I'm going to ignore the read that is performed to obtain the header and assume that no pages are resident at the start of execution.) Suppose that we have a code section consisting of 32 pages. Further, suppose that we access pages 4, 28, and 16 in that order. Under the default page clustering strategy, we page fault three times and perform three I/O operations, because the first and second page faults only read a truncated cluster of 12 pages. In contrast, if we access pages 8, 24, and 16 in that order, we only fault twice and perform two I/O operations, because the first and second page faults read a full cluster of 16 pages. In general, truncated clusters are more common than full clusters. To address this problem, this revision changes the default page clustering strategy to align the start of the cluster to a page offset within the vm object that is a multiple of the cluster size. This results in many fewer truncated clusters. Returning to our example, if we now access pages 4, 28, and 16 in that order, the cluster that is read to satisfy the page fault on page 28 will now include page 16. So, the access to page 16 will no longer page fault and perform an I/O operation. Since the revised default page clustering strategy is typically reading more pages at a time, we are likely to read a few more pages that are never accessed. However, for the various programs that we looked at, including clang, emacs, firefox, and openjdk, the reduction in the number of page faults and I/O operations far outweighed the increase in the number of pages that are never accessed. Moreover, the extra resident pages allowed for many more superpage mappings. For example, if we look at the execution of clang during a buildworld, the number of (hard) page faults on the code section drops by 26%, the number of superpage mappings increases by about 29,000, but the number of never accessed pages only increases from 30.38% to 33.66%. Finally, this leads to a small but measureable reduction in execution time. In collaboration with: Emily Pettigrew Differential Revision: https://reviews.freebsd.org/D1500 Reviewed by: jhb, kib MFC after: 6 weeks Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Jan 16 17:41:21 2015 (r277254) +++ head/sys/vm/vm_fault.c Fri Jan 16 18:17:09 2015 (r277255) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); static int vm_fault_additional_pages(vm_page_t, int, int, vm_page_t *, int *); #define VM_FAULT_READ_BEHIND 8 +#define VM_FAULT_READ_DEFAULT (1 + VM_FAULT_READ_AHEAD_INIT) #define VM_FAULT_READ_MAX (1 + VM_FAULT_READ_AHEAD_MAX) #define VM_FAULT_NINCR (VM_FAULT_READ_MAX / VM_FAULT_READ_BEHIND) #define VM_FAULT_SUM (VM_FAULT_NINCR * (VM_FAULT_NINCR + 1) / 2) @@ -292,7 +293,6 @@ vm_fault_hold(vm_map_t map, vm_offset_t int fault_flags, vm_page_t *m_hold) { vm_prot_t prot; - long ahead, behind; int alloc_req, era, faultcount, nera, reqpage, result; boolean_t growstack, is_first_object_locked, wired; int map_generation; @@ -302,7 +302,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t struct faultstate fs; struct vnode *vp; vm_page_t m; - int locked, error; + int ahead, behind, cluster_offset, error, locked; hardfault = 0; growstack = TRUE; @@ -555,45 +555,59 @@ readrest: int rv; u_char behavior = vm_map_entry_behavior(fs.entry); + era = fs.entry->read_ahead; if (behavior == MAP_ENTRY_BEHAV_RANDOM || P_KILLED(curproc)) { behind = 0; + nera = 0; ahead = 0; } else if (behavior == MAP_ENTRY_BEHAV_SEQUENTIAL) { behind = 0; - ahead = atop(fs.entry->end - vaddr) - 1; - if (ahead > VM_FAULT_READ_AHEAD_MAX) - ahead = VM_FAULT_READ_AHEAD_MAX; + nera = VM_FAULT_READ_AHEAD_MAX; + ahead = nera; if (fs.pindex == fs.entry->next_read) vm_fault_cache_behind(&fs, VM_FAULT_READ_MAX); - } else { + } else if (fs.pindex == fs.entry->next_read) { /* - * If this is a sequential page fault, then - * arithmetically increase the number of pages - * in the read-ahead window. Otherwise, reset - * the read-ahead window to its smallest size. + * This is a sequential fault. Arithmetically + * increase the requested number of pages in + * the read-ahead window. The requested + * number of pages is "# of sequential faults + * x (read ahead min + 1) + read ahead min" */ - behind = atop(vaddr - fs.entry->start); - if (behind > VM_FAULT_READ_BEHIND) - behind = VM_FAULT_READ_BEHIND; - ahead = atop(fs.entry->end - vaddr) - 1; - era = fs.entry->read_ahead; - if (fs.pindex == fs.entry->next_read) { - nera = era + behind; + behind = 0; + nera = VM_FAULT_READ_AHEAD_MIN; + if (era > 0) { + nera += era + 1; if (nera > VM_FAULT_READ_AHEAD_MAX) nera = VM_FAULT_READ_AHEAD_MAX; - behind = 0; - if (ahead > nera) - ahead = nera; - if (era == VM_FAULT_READ_AHEAD_MAX) - vm_fault_cache_behind(&fs, - VM_FAULT_CACHE_BEHIND); - } else if (ahead > VM_FAULT_READ_AHEAD_MIN) - ahead = VM_FAULT_READ_AHEAD_MIN; - if (era != ahead) - fs.entry->read_ahead = ahead; + } + ahead = nera; + if (era == VM_FAULT_READ_AHEAD_MAX) + vm_fault_cache_behind(&fs, + VM_FAULT_CACHE_BEHIND); + } else { + /* + * This is a non-sequential fault. Request a + * cluster of pages that is aligned to a + * VM_FAULT_READ_DEFAULT page offset boundary + * within the object. Alignment to a page + * offset boundary is more likely to coincide + * with the underlying file system block than + * alignment to a virtual address boundary. + */ + cluster_offset = fs.pindex % + VM_FAULT_READ_DEFAULT; + behind = ulmin(cluster_offset, + atop(vaddr - fs.entry->start)); + nera = 0; + ahead = VM_FAULT_READ_DEFAULT - 1 - + cluster_offset; } + ahead = ulmin(ahead, atop(fs.entry->end - vaddr) - 1); + if (era != nera) + fs.entry->read_ahead = nera; /* * Call the pager to retrieve the data, if any, after From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:42:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72958F0A; Fri, 16 Jan 2015 18:42:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5346ED08; Fri, 16 Jan 2015 18:42:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GIgosj020087; Fri, 16 Jan 2015 18:42:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIgoMh020086; Fri, 16 Jan 2015 18:42:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501161842.t0GIgoMh020086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 16 Jan 2015 18:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277256 - head/usr.sbin/ofwdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:42:50 -0000 Author: nwhitehorn Date: Fri Jan 16 18:42:49 2015 New Revision: 277256 URL: https://svnweb.freebsd.org/changeset/base/277256 Log: Instead of iterating through all properties looking for a match, if asked for a specific property, look it up directly. MFC after: 1 week Modified: head/usr.sbin/ofwdump/ofwdump.c Modified: head/usr.sbin/ofwdump/ofwdump.c ============================================================================== --- head/usr.sbin/ofwdump/ofwdump.c Fri Jan 16 18:17:09 2015 (r277255) +++ head/usr.sbin/ofwdump/ofwdump.c Fri Jan 16 18:42:49 2015 (r277256) @@ -49,8 +49,9 @@ __FBSDID("$FreeBSD$"); static void usage(void); static void ofw_indent(int); -static void ofw_dump_properties(int, phandle_t, int, const char *, int, - int); +static void ofw_dump_properties(int, phandle_t, int, int, int); +static void ofw_dump_property(int fd, phandle_t n, int level, + const char *prop, int raw, int str); static void ofw_dump(int, const char *, int, int, const char *, int, int); static void @@ -140,62 +141,67 @@ ofw_indent(int level) } static void -ofw_dump_properties(int fd, phandle_t n, int level, const char *pmatch, int raw, +ofw_dump_properties(int fd, phandle_t n, int level, int raw, int str) +{ + int nlen; + char prop[32]; + + for (nlen = ofw_firstprop(fd, n, prop, sizeof(prop)); nlen != 0; + nlen = ofw_nextprop(fd, n, prop, prop, sizeof(prop))) + ofw_dump_property(fd, n, level, prop, raw, str); +} + +static void +ofw_dump_property(int fd, phandle_t n, int level, const char *prop, int raw, int str) { static void *pbuf = NULL; static char *visbuf = NULL; static char printbuf[CHARSPERLINE + 1]; static int pblen = 0, vblen = 0; - char prop[32]; - int nlen, len, i, j, max, vlen; + int len, i, j, max, vlen; - for (nlen = ofw_firstprop(fd, n, prop, sizeof(prop)); nlen != 0; - nlen = ofw_nextprop(fd, n, prop, prop, sizeof(prop))) { - if (pmatch != NULL && strcmp(pmatch, prop) != 0) - continue; - len = ofw_getprop_alloc(fd, n, prop, &pbuf, &pblen, 1); - if (len < 0) - continue; - if (raw) - write(STDOUT_FILENO, pbuf, len); - else if (str) - printf("%.*s\n", len, (char *)pbuf); - else { - ofw_indent(level * LVLINDENT + NAMEINDENT); - printf("%s:\n", prop); - /* Print in hex. */ - for (i = 0; i < len; i += BYTESPERLINE) { - max = len - i; - max = max > BYTESPERLINE ? BYTESPERLINE : max; - ofw_indent(level * LVLINDENT + DUMPINDENT); - for (j = 0; j < max; j++) - printf("%02x ", - ((unsigned char *)pbuf)[i + j]); - printf("\n"); - } - /* - * strvis() and print if it looks like it is - * zero-terminated. - */ - if (((char *)pbuf)[len - 1] == '\0' && - strlen(pbuf) == (unsigned)len - 1) { - if (vblen < (len - 1) * 4 + 1) { - if (visbuf != NULL) - free(visbuf); - vblen = (OFIOCMAXVALUE + len) * 4 + 1; + len = ofw_getprop_alloc(fd, n, prop, &pbuf, &pblen, 1); + if (len < 0) + return; + if (raw) + write(STDOUT_FILENO, pbuf, len); + else if (str) + printf("%.*s\n", len, (char *)pbuf); + else { + ofw_indent(level * LVLINDENT + NAMEINDENT); + printf("%s:\n", prop); + /* Print in hex. */ + for (i = 0; i < len; i += BYTESPERLINE) { + max = len - i; + max = max > BYTESPERLINE ? BYTESPERLINE : max; + ofw_indent(level * LVLINDENT + DUMPINDENT); + for (j = 0; j < max; j++) + printf("%02x ", + ((unsigned char *)pbuf)[i + j]); + printf("\n"); + } + /* + * strvis() and print if it looks like it is + * zero-terminated. + */ + if (((char *)pbuf)[len - 1] == '\0' && + strlen(pbuf) == (unsigned)len - 1) { + if (vblen < (len - 1) * 4 + 1) { + if (visbuf != NULL) + free(visbuf); + vblen = (OFIOCMAXVALUE + len) * 4 + 1; if ((visbuf = malloc(vblen)) == NULL) err(EX_OSERR, "malloc() failed"); - } - vlen = strvis(visbuf, pbuf, VIS_TAB | VIS_NL); - for (i = 0; i < vlen; i += CHARSPERLINE) { - ofw_indent(level * LVLINDENT + - DUMPINDENT); - strlcpy(printbuf, &visbuf[i], - sizeof(printbuf)); - printf("'%s'\n", printbuf); - } + } + vlen = strvis(visbuf, pbuf, VIS_TAB | VIS_NL); + for (i = 0; i < vlen; i += CHARSPERLINE) { + ofw_indent(level * LVLINDENT + + DUMPINDENT); + strlcpy(printbuf, &visbuf[i], + sizeof(printbuf)); + printf("'%s'\n", printbuf); } } } @@ -219,8 +225,12 @@ ofw_dump_node(int fd, phandle_t n, int l else putchar('\n'); } - if (prop) - ofw_dump_properties(fd, n, level, pmatch, raw, str); + if (prop) { + if (pmatch) + ofw_dump_property(fd, n, level, pmatch, raw, str); + else + ofw_dump_properties(fd, n, level, raw, str); + } if (rec) { for (c = ofw_child(fd, n); c != 0; c = ofw_peer(fd, c)) { ofw_dump_node(fd, c, level + 1, rec, prop, pmatch, From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:43:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECD10CB; Fri, 16 Jan 2015 18:43:27 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7A1D17; Fri, 16 Jan 2015 18:43:27 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id l15so6144241wiw.2; Fri, 16 Jan 2015 10:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=hFs9uqKPFCMIEVjTFnxEAfSVhk4EWpUYbFmbooEVYZA=; b=gpICCnFDsQrnmFCg7ac0bknifL1gxdLu9U6eObEXzpvSEWDDaECVlNFHhAU7EOo4vf NKe6FSnTNQ2wg6jonVuzIOA0770eFMPCvAFoJd2D5HwodvIwBOiPrrLtWjn39qKmDAZv QIenOguEbejJXjF7J4ugFuAt63gSbVvRNsKJ0tnCD8dr1jIyssHNuGhUpstOIpVSular ic60SurtorM0Dch9aHa7ZfGj2O8JpsAkHD5yi31UaEh9jdaQMo1f451/wcF0NyUQkZkR V6K06N5yjG7cUmoghcGDUCk3SPeF7F5prqqPFkK231VjGiki5J1h304Q04VcMdMzeyg5 Ukwg== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr5278129wjf.15.1421433805929; Fri, 16 Jan 2015 10:43:25 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Fri, 16 Jan 2015 10:43:25 -0800 (PST) In-Reply-To: <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> Date: Fri, 16 Jan 2015 10:43:25 -0800 X-Google-Sender-Auth: rgrOQLRdKF2PGcjJtEj5es-DF-8 Message-ID: Subject: Re: svn commit: r277204 - head/sys/amd64/conf From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:43:28 -0000 On 16 January 2015 at 09:57, Warner Losh wrote: > >> On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov wrote: >> >> On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >> >>> Author: imp >>> Date: Thu Jan 15 00:42:06 2015 >>> New Revision: 277204 >>> URL: https://svnweb.freebsd.org/changeset/base/277204 >>> >>> Log: >>> New MINIMAL kernel config. The goal with this configuration is to >>> only compile in those options in GENERIC that cannot be loaded as >>> modules. ufs is still included because many of its options aren't >>> present in the kernel module. There's some other exceptions documented >> >> Are you sure? >> I think defining UFS options in kernel connfig affect to module too. >> When I define this options in kernel config (w/o options FFS) I got >> ufs.ko with this SU, quota, acl etc. > > While one could set options in the kernel to affect the ufs.ko build, > there=E2=80=99s not a universal ufs.ko that can be loaded easily that swi= tches > between the different types of options. You can create modules > that do this, but that=E2=80=99s a very very different problem than the o= ne I > want to solve, namely you get the same[*] functionality having > device fred in the kernel config as kldloading fred.ko. So rather than > bite off that problem also, I=E2=80=99m opting for simplicity. > >>> +options SOFTUPDATES # Enable FFS soft updates support >>> +options UFS_ACL # Support for access control lists >>> +options UFS_DIRHASH # Improve performance on big direc= tories >>> +options UFS_GJOURNAL # Enable gjournal-based UFS journa= ling >>> +options QUOTA # Enable disk quotas for UFS >> >>> +options SYSVSHM # SYSV-style shared memory >>> +options SYSVMSG # SYSV-style message queues >>> +options SYSVSEM # SYSV-style semaphores >>> +device agp # support several AGP chip= sets >>> +device random # Entropy device >>> +device padlock_rng # VIA Padlock RNG >>> +device rdrand_rng # Intel Bull Mountain RNG >>> +device vlan # 802.1Q VLAN support >>> +device tun # Packet tunnel. >>> +device gif # IPv6 and IPv4 tunneling >> >> This is loadable too. > > True > >> And please include: >> >> NETMAP >> NFS_ROOT > > OK. > >> IEEE80211_DEBUG >> IEEE80211_AMPDU_AGE >> IEEE80211_SUPPORT_MESH >> AH_SUPPORT_AR5416 >> AH_AR5416_INTERRUPT_MITIGATION >> ATH_ENABLE_11N > > These are already the default for the ath or wlan modules, if I=E2=80=99m= reading things correctly. Nope. The other half of this problem is where some modules (did? do?) populate an opt_wlan.h with their own options. Some modules did this with the inet option. When I've done what you're doing, I end up having these options in my minimal config file so opt_xxx.h is correctly populated. That way when I point SYSDIR (or whichever variable it is) at the configured kernel directory with the opt_xxx.h files, it all works out correctly. (I still think we shouldn't be relying on "defaults", but should ship the opt_xxx.h files or something to derive the opt_xxx.h and makefile config bits so things like external module building is possible against a kernel. Or, we just kill all module options that change behaviour/ABI of things in an incompatible way.) -adrian From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:47:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B34143FA; Fri, 16 Jan 2015 18:47:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EBD1D60; Fri, 16 Jan 2015 18:47:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GIlLA3021056; Fri, 16 Jan 2015 18:47:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIlLrw021055; Fri, 16 Jan 2015 18:47:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501161847.t0GIlLrw021055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 16 Jan 2015 18:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277257 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:47:21 -0000 Author: nwhitehorn Date: Fri Jan 16 18:47:20 2015 New Revision: 277257 URL: https://svnweb.freebsd.org/changeset/base/277257 Log: Add two fake properties ("fdtbootcpu" and "fdtmemreserv") to the device tree's /chosen node to provide out-of-band header fields of the FDT. This emulation is not perfect without corresponding changes to ofw_fdt_nextprop(), but is enough to enable lookup by memory-map-parsing code. MFC after: 1 week Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Fri Jan 16 18:42:49 2015 (r277256) +++ head/sys/dev/ofw/ofw_fdt.c Fri Jan 16 18:47:20 2015 (r277257) @@ -231,6 +231,13 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t return (len + 1); } + if (prop == NULL && offset == fdt_path_offset(fdtp, "/chosen")) { + if (strcmp(propname, "fdtbootcpu") == 0) + return (sizeof(cell_t)); + if (strcmp(propname, "fdtmemreserv") == 0) + return (sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp)); + } + return (len); } @@ -242,6 +249,7 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac const void *prop; const char *name; int len, offset; + uint32_t cpuid; offset = fdt_phandle_offset(package); if (offset < 0) @@ -258,6 +266,18 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac return (len + 1); } + if (prop == NULL && offset == fdt_path_offset(fdtp, "/chosen")) { + if (strcmp(propname, "fdtbootcpu") == 0) { + cpuid = cpu_to_fdt32(fdt_boot_cpuid_phys(fdtp)); + len = sizeof(cpuid); + prop = &cpuid; + } + if (strcmp(propname, "fdtmemreserv") == 0) { + prop = (char *)fdtp + fdt_off_mem_rsvmap(fdtp); + len = sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp); + } + } + if (prop == NULL) return (-1); From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:48:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D453561 for ; Fri, 16 Jan 2015 18:48:30 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2772CD79 for ; Fri, 16 Jan 2015 18:48:29 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id eu11so25808660pac.8 for ; Fri, 16 Jan 2015 10:48:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=zHFAqh3TGfaaJUSRWH0pyljjbsISzUfjS6ySK+egkrU=; b=Ul8oz3NmSjE/yF4E+grxohUBu66Tmc0dbDj1Luw8N2y8UW3P1ZwcQkaZrBQ6cACCOB mpqHtq+ajj08wb6BXQGeKYV5gOiIyWf1QB4QaEmc32lMCSRTsq4X2bZqM8ZzAt1rAWSP ed+Ebfyt30I+8xCV3wtJFjEI6hi8XljEz25cbl4ibouHiHaDFmDdQa1EV2W2UjSFmusj jveQdv8JuIk7/Q+pKTSEkq+UTLtHyk8Yaxt9bcrQBVxPvSa9ftr1qCdTavwGBr+esdG3 iQr9USNXpd4uU4QENM2mMkj0gi9IbeXGNkHtRZbZm93oQ5pplkHG0tPHMVzYzAdoAMiR 0zWA== X-Gm-Message-State: ALoCoQnQuy1IwkczVVgDCiIpe0uYx6TJjXX1UO6tr5m4DYMMWW2+VuIkcAsjZyIltK0mSHyENwOC X-Received: by 10.66.146.167 with SMTP id td7mr24657965pab.101.1421434109559; Fri, 16 Jan 2015 10:48:29 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id w3sm4750243pdw.14.2015.01.16.10.48.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:48:28 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Fri, 16 Jan 2015 11:48:25 -0700 Message-Id: References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:48:30 -0000 --Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 16, 2015, at 11:43 AM, Adrian Chadd wrote: >=20 > On 16 January 2015 at 09:57, Warner Losh wrote: >>=20 >>> On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov = wrote: >>>=20 >>> On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >>>=20 >>>> Author: imp >>>> Date: Thu Jan 15 00:42:06 2015 >>>> New Revision: 277204 >>>> URL: https://svnweb.freebsd.org/changeset/base/277204 >>>>=20 >>>> Log: >>>> New MINIMAL kernel config. The goal with this configuration is to >>>> only compile in those options in GENERIC that cannot be loaded as >>>> modules. ufs is still included because many of its options aren't >>>> present in the kernel module. There's some other exceptions = documented >>>=20 >>> Are you sure? >>> I think defining UFS options in kernel connfig affect to module too. >>> When I define this options in kernel config (w/o options FFS) I got >>> ufs.ko with this SU, quota, acl etc. >>=20 >> While one could set options in the kernel to affect the ufs.ko build, >> there=E2=80=99s not a universal ufs.ko that can be loaded easily that = switches >> between the different types of options. You can create modules >> that do this, but that=E2=80=99s a very very different problem than = the one I >> want to solve, namely you get the same[*] functionality having >> device fred in the kernel config as kldloading fred.ko. So rather = than >> bite off that problem also, I=E2=80=99m opting for simplicity. >>=20 >>>> +options SOFTUPDATES # Enable FFS soft updates = support >>>> +options UFS_ACL # Support for access control = lists >>>> +options UFS_DIRHASH # Improve performance on big = directories >>>> +options UFS_GJOURNAL # Enable gjournal-based UFS = journaling >>>> +options QUOTA # Enable disk quotas for UFS >>>=20 >>>> +options SYSVSHM # SYSV-style shared memory >>>> +options SYSVMSG # SYSV-style message queues >>>> +options SYSVSEM # SYSV-style semaphores >>>> +device agp # support several AGP = chipsets >>>> +device random # Entropy device >>>> +device padlock_rng # VIA Padlock RNG >>>> +device rdrand_rng # Intel Bull Mountain = RNG >>>> +device vlan # 802.1Q VLAN support >>>> +device tun # Packet tunnel. >>>> +device gif # IPv6 and IPv4 = tunneling >>>=20 >>> This is loadable too. >>=20 >> True >>=20 >>> And please include: >>>=20 >>> NETMAP >>> NFS_ROOT >>=20 >> OK. >>=20 >>> IEEE80211_DEBUG >>> IEEE80211_AMPDU_AGE >>> IEEE80211_SUPPORT_MESH >>> AH_SUPPORT_AR5416 >>> AH_AR5416_INTERRUPT_MITIGATION >>> ATH_ENABLE_11N >>=20 >> These are already the default for the ath or wlan modules, if I=E2=80=99= m reading things correctly. >=20 > Nope. It=E2=80=99s simple to add any of the last 3 to modules/ath, but I see = your point. > The other half of this problem is where some modules (did? do?) > populate an opt_wlan.h with their own options. Some modules did this > with the inet option. You might thing that, but you=E2=80=99d be behind the times. The IEEE = options are centralized, as are the INET options. > When I've done what you're doing, I end up having these options in my > minimal config file so opt_xxx.h is correctly populated. That way when > I point SYSDIR (or whichever variable it is) at the configured kernel > directory with the opt_xxx.h files, it all works out correctly. Yea, that=E2=80=99s a different issue. > (I still think we shouldn't be relying on "defaults", but should ship > the opt_xxx.h files or something to derive the opt_xxx.h and makefile > config bits so things like external module building is possible > against a kernel. Or, we just kill all module options that change > behaviour/ABI of things in an incompatible way.) Options aren=E2=80=99t supposed to change KBI. Some do, and that=E2=80=99s= unfortunate. But don=E2=80=99t turn this into a rant on how sub-optimal the = opt_XXXX.h intersect with modules. That=E2=80=99s another set of problems to solve. Warner --Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuVz6AAoJEGwc0Sh9sBEAD1AQAM5AEyXxnOdjdQYyZgszjUQ7 +ElALFd8JAeALikfFBMSOBRU4bjA7btAEUfHpE3Lr1loJXHhxv0C4DWoVGfl0yQH HQr+Z6bFP9skPFwmwlGDggLwKrbZ0s38aDfHWe4hfcC4NwwHZKkzAz2DH54kn2al Q6ItPbu+rc3pZEYmmiiEu1zJxCDvSGtHzHuLHBsJZYNNm2W7pP8KvoFBf+qXxtNE s3LtSlx/waoZOcpRwOD3zmkb0yEU5h9M6LCo1Jdw9XyTBGMn0VlTWIMIjYOFJGcl mcR+mSyIW6FvgiHO9XuRyDiyRT/KeIxcLGjNKwiEoAuQGtyfVnnwQRHz1Jlm8MRe /gXTaY0dGx4/bgsR2CP+TfW8a6AsY8oPzLMP6FktSk5M+sdgH9QfITJMtY2yjaPP +2YG1Yh1GlbAUrW6ApGxRL9rg2dD5fPhVfmJHaDShQGp4p8L6O7fV5AIW26fqQFw o6gg57XPXct6CVpPmGudbPGfQQF4+lpaCoQjRmrLpOTkh/hZXUEvfMZH9eyQd8SE 3bjYWoD+RFLuwMy1EgGHYD6Pj8evq60Dxp+1Ihm5ZukvKfR0r9e9AnP6aIogFp7z ZPSemgSckunu3glcL18Bb6CzRZn6lpHeZ/vL1PHXDqAFCsnrVVPhcKYNiEOf3T3w HcOSjOTYDivsiOHPGIcz =SI4C -----END PGP SIGNATURE----- --Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:51:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D950786; Fri, 16 Jan 2015 18:51:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDE8ADBB; Fri, 16 Jan 2015 18:51:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GIpQqv022861; Fri, 16 Jan 2015 18:51:26 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIpQ0X022860; Fri, 16 Jan 2015 18:51:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501161851.t0GIpQ0X022860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 16 Jan 2015 18:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277258 - head/usr.sbin/ngctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:51:27 -0000 Author: glebius Date: Fri Jan 16 18:51:26 2015 New Revision: 277258 URL: https://svnweb.freebsd.org/changeset/base/277258 Log: Plug mutex leak. MFC after: 1 week Sponsored by: Nginx, Inc. Modified: head/usr.sbin/ngctl/main.c Modified: head/usr.sbin/ngctl/main.c ============================================================================== --- head/usr.sbin/ngctl/main.c Fri Jan 16 18:47:20 2015 (r277257) +++ head/usr.sbin/ngctl/main.c Fri Jan 16 18:51:26 2015 (r277258) @@ -324,8 +324,10 @@ DoInteractive(void) history(hist, &hev, H_ENTER, buf); pthread_kill(monitor, SIGUSR1); pthread_mutex_lock(&mutex); - if (DoParseCommand(buf) == CMDRTN_QUIT) + if (DoParseCommand(buf) == CMDRTN_QUIT) { + pthread_mutex_unlock(&mutex); break; + } pthread_cond_signal(&cond); pthread_mutex_unlock(&mutex); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:52:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39FD68F9; Fri, 16 Jan 2015 18:52:25 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE4F6E5C; Fri, 16 Jan 2015 18:52:24 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id m14so71725wev.10; Fri, 16 Jan 2015 10:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=eVWkRq0BCZ9L/qnnQeWxLXDhXMCPKLPiJqeK3grXeoY=; b=eo9DG9tGw8N3xYoWkV33RFNAkb5nSrFMZfSEseCN19aPhHnI7jTT4aeC58r+UXjrZH uMVMn3Q5LJBXzUa0qkBh17PjzItdwXgbwz4jdlX5bMw+mTj+QGBvj8GeNNifnD+3OLIQ nKYPZ79WdM4N4jdTdgbToFsB4tl7QDonpORB0obfLeFb1/3c8uFFJObmPn2Wk2lY+XCd /li1vGPdVzsscYiEH1syE3wY/8TOEyiJUwmlw+QqZa8jCKGFxSdnak8rE+YlD3KzU/Cu zF/XsYS5uiwCmLGY8UTIzor20PiHCVfrzlcRXDnyU/asWYpJ6skuoLVFSjy//HRrZAsj 1z5g== MIME-Version: 1.0 X-Received: by 10.180.14.136 with SMTP id p8mr9036879wic.20.1421434343249; Fri, 16 Jan 2015 10:52:23 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Fri, 16 Jan 2015 10:52:23 -0800 (PST) In-Reply-To: References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> Date: Fri, 16 Jan 2015 10:52:23 -0800 X-Google-Sender-Auth: FKUvIePYS_oiMEpYf6oy0bhQA2M Message-ID: Subject: Re: svn commit: r277204 - head/sys/amd64/conf From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:52:25 -0000 On 16 January 2015 at 10:48, Warner Losh wrote: > Options aren=E2=80=99t supposed to change KBI. Some do, and that=E2=80=99= s unfortunate. Yup, and at least for net80211 I'm going to try really hard to fix that. > But don=E2=80=99t turn this into a rant on how sub-optimal the opt_XXXX.h > intersect with modules. That=E2=80=99s another set of problems to solve. Yeah. Please don't take this as a derail attempt; I am not expecting to address/solve that at the moment. -adrian From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:53:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBF79A5D for ; Fri, 16 Jan 2015 18:53:42 +0000 (UTC) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96C37E73 for ; Fri, 16 Jan 2015 18:53:42 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id r10so24194742pdi.9 for ; Fri, 16 Jan 2015 10:53:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=gTK8RAPS8HBRJOKjywpiTE1lUubr/msc1wypsdhpb44=; b=Xy5Z2Zqgam0vOqN4L/CjG24q4wdq6Wb/hA0xW/3abNybl+2/LwPnejxJ9lXUAHknTH j8GOROXQ0Mh6xzo7qtAKpqM6cRRrNYnsJyt+eW1rx+2eNk3w2PEQOy/so/jSaaeOBTs/ agZhpDRbzQnyf/poaXwLgyjkrUJHEAkrLK5vO7Qi+DGM7e2mJc0HehRMhh/5peBG2znn nGuVFYatt/ivDr85Mxh94+UTtJWErBXyBLdarXrSOVboVKKtT8SqybTDzMbP2k/DlMwz XCQa2GRJgygTYzCskvutsW7LD3ZwDhUJxI59UU6K87FE6yfKkGS9Z9pa9Urpf8caYoNq +vgQ== X-Gm-Message-State: ALoCoQkuOwPhvsV6nJTU3ZBcMV93TWWA7Oz5BC7yu9I4+eTVgw8BVCQkA0B5Zrc64Q4z3JnFXeYY X-Received: by 10.66.117.199 with SMTP id kg7mr24804159pab.92.1421434416676; Fri, 16 Jan 2015 10:53:36 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id c9sm1944454pdm.51.2015.01.16.10.53.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:53:35 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Fri, 16 Jan 2015 11:53:33 -0700 Message-Id: <98247DF8-EFAF-462A-AD28-924B81DA55A9@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:53:43 -0000 --Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 16, 2015, at 11:52 AM, Adrian Chadd wrote: >=20 > On 16 January 2015 at 10:48, Warner Losh wrote: >=20 >=20 >> Options aren=E2=80=99t supposed to change KBI. Some do, and that=E2=80=99= s unfortunate. >=20 > Yup, and at least for net80211 I'm going to try really hard to fix = that. >=20 >> But don=E2=80=99t turn this into a rant on how sub-optimal the = opt_XXXX.h >> intersect with modules. That=E2=80=99s another set of problems to = solve. >=20 > Yeah. Please don't take this as a derail attempt; I am not expecting > to address/solve that at the moment. At least we=E2=80=99ve fixed the identical copies problem=E2=80=A6 Warner --Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuV4tAAoJEGwc0Sh9sBEAGgoP/iE5MgWdLPg2f9w6a3m0VUjm FszyHxYf3t8oDQ+hgG+yWDGQw4x8gcoMOF36BU0Ty3MrcQxNSa6XKSDF5u8hyrH+ 8E0h6+qv4XsapGqD9EnI6Y/7O0Za3EDud0E31kjiL46yN42yCIvlBWd4qfjK7Y6l Wt+4Q8gLcKi69B6w3SJoOcfiWNrolHUS9ARl54XsLCo6uzwzRx4rzuwYZc8bg8BZ TOKs3Uz1yGeMzNmj7nVQE/2mhsgPOQBoeu+3p8IOGCViziQUhfL9vNxFfG+ldqdN lCOZO/QVxSUh8YJf/epdEgb87wmUx8eQtVBMU873/1wuhaQJXUmOryNSFBz20vwh TK+i+TczJU56XVaw6G40NpoG4EOqeNc05LcPt8JMIWfBFsVlR5CPMCdF3nKJa4PV hXUb6q+TC1BT+NLK2agcfP5VjVzQO18+qrq8h9FFBE+oxhVVzlWNjep5OOAdQJcr EhHQfkzTHEJ/5I75cvU+KkOJgjaI9/ar0/gXlTL7qRzucnMCfz2sREWDOMS2mDau PHf2hkP2g/E1iSK1MR4nROYJckhczuCZjZSiBZAT0/gtjhDZPbbJ1zDcZ6qrvUU0 J+i7Zt2FG0hxgaWV/Y1mgCkDd1NxnHy+fId95doEtgMtfc7aVFTnM18QmwG2WT8n 9ahAOjZmmvaoM26IaB5e =oveu -----END PGP SIGNATURE----- --Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 18:59:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AACEC66; Fri, 16 Jan 2015 18:59:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86697EE7; Fri, 16 Jan 2015 18:59:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GIxGUE026452; Fri, 16 Jan 2015 18:59:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIxGjh026451; Fri, 16 Jan 2015 18:59:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501161859.t0GIxGjh026451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Jan 2015 18:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277259 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:59:16 -0000 Author: emaste Date: Fri Jan 16 18:59:15 2015 New Revision: 277259 URL: https://svnweb.freebsd.org/changeset/base/277259 Log: crunchide: Correct 64-bit section header offset For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44. Instead of using an incorrect hardcoded offset, let the compiler figure it out for us with offsetof(). Differential Revision: https://reviews.freebsd.org/D1543 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Fri Jan 16 18:51:26 2015 (r277258) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Fri Jan 16 18:59:15 2015 (r277259) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -464,7 +465,7 @@ ELFNAMEEND(hide)(int fd, const char *fn) if (layoutp[i].shdr == &shdrshdr && ehdr.e_shoff != shdrshdr.sh_offset) { ehdr.e_shoff = shdrshdr.sh_offset; - off = (ELFSIZE == 32) ? 32 : 44; + off = offsetof(Elf_Ehdr, e_shoff); size = sizeof(Elf_Off); if ((size_t)xwriteatoff(fd, &ehdr.e_shoff, off, size, fn) != size) From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 19:12:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AA3A349; Fri, 16 Jan 2015 19:12:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1688219C; Fri, 16 Jan 2015 19:12:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GJBxB7035578; Fri, 16 Jan 2015 19:11:59 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJBxbb035575; Fri, 16 Jan 2015 19:11:59 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501161911.t0GJBxbb035575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Fri, 16 Jan 2015 19:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277262 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:12:00 -0000 Author: jfv Date: Fri Jan 16 19:11:58 2015 New Revision: 277262 URL: https://svnweb.freebsd.org/changeset/base/277262 Log: Some RSS issues discovered by Adrian, missing header, variable names fat fingered, incorrect hash config setup. Thanks :) MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Fri Jan 16 19:07:13 2015 (r277261) +++ head/sys/dev/ixl/if_ixl.c Fri Jan 16 19:11:58 2015 (r277262) @@ -38,6 +38,10 @@ #include "ixl.h" #include "ixl_pf.h" +#ifdef RSS +#include +#endif + /********************************************************************* * Driver version *********************************************************************/ @@ -3249,7 +3253,7 @@ static void ixl_config_rss(struct ixl_vs * num_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % adapter->num_queues; + que_id = que_id % vsi->num_queues; #else que_id = j; #endif Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Fri Jan 16 19:07:13 2015 (r277261) +++ head/sys/dev/ixl/if_ixlv.c Fri Jan 16 19:11:58 2015 (r277262) @@ -38,10 +38,14 @@ #include "ixl.h" #include "ixlv.h" +#ifdef RSS +#include +#endif + /********************************************************************* * Driver version *********************************************************************/ -char ixlv_driver_version[] = "1.2.0"; +char ixlv_driver_version[] = "1.2.1"; /********************************************************************* * PCI Device ID Table @@ -2596,12 +2600,12 @@ ixlv_config_rss(struct ixlv_sc *sc) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6); if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); - if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) - set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; #else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | @@ -2633,7 +2637,7 @@ ixlv_config_rss(struct ixlv_sc *sc) * num_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % adapter->num_queues; + que_id = que_id % vsi->num_queues; #else que_id = j; #endif Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Fri Jan 16 19:07:13 2015 (r277261) +++ head/sys/dev/ixl/ixl_txrx.c Fri Jan 16 19:11:58 2015 (r277262) @@ -43,6 +43,10 @@ #include "opt_rss.h" #include "ixl.h" +#ifdef RSS +#include +#endif + /* Local Prototypes */ static void ixl_rx_checksum(struct mbuf *, u32, u32, u8); static void ixl_refresh_mbufs(struct ixl_queue *, int); @@ -1367,7 +1371,7 @@ ixl_rx_discard(struct rx_ring *rxr, int #ifdef RSS /* -** i40e_ptype_to_hash: parse the packet type +** ixl_ptype_to_hash: parse the packet type ** to determine the appropriate hash. */ static inline int @@ -1376,7 +1380,7 @@ ixl_ptype_to_hash(u8 ptype) struct i40e_rx_ptype_decoded decoded; u8 ex = 0 - decode = decode_rx_desc_ptype(ptype); + decoded = decode_rx_desc_ptype(ptype); ex = decoded.outer_frag; if (!decoded.known) From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 19:43:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 233F2AC9; Fri, 16 Jan 2015 19:43:07 +0000 (UTC) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [IPv6:2607:f3e0:0:1::12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smarthost.sentex.ca", Issuer "smarthost.sentex.ca" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B1FE974C; Fri, 16 Jan 2015 19:43:06 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.9/8.14.9) with ESMTP id t0GJh3VN028154; Fri, 16 Jan 2015 14:43:03 -0500 (EST) (envelope-from mike@sentex.net) Message-ID: <54B969A8.4070709@sentex.net> Date: Fri, 16 Jan 2015 14:42:32 -0500 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , svn-src-all@freebsd.org, svn-src-stable@freebsd.org Subject: Re: svn commit: r276076 - in stable/10/sys: amd64/amd64 i386/i386 i386/include i386/xen pc98/pc98 x86/x86 References: <201412221953.sBMJruwk025467@svn.freebsd.org> In-Reply-To: <201412221953.sBMJruwk025467@svn.freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.75 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:43:07 -0000 Hi, I noticed while building a new ALIX_DSK kernel image for my i386 PCEngines alix box, the commit below no longer allows a kernel to be built without cpu I686_CPU as a kernel option. Is this a known side effect ? The default kernel def in /usr/src/tools/tools/nanobsd/pcengines/ALIX_DSK should be updated then. -------------------------------------------------------------- >>> stage 3.2: building everything -------------------------------------------------------------- cd /usr/obj/usr/src/sys/ALIX_DSK; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp _LDSCRIPTROOT= VERSION="FreeBSD 10.1-STABLE i386 1001504" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= RANLIB=ranlib STRINGS= COMPILER_TYPE=clang make -D NO_KERNELCLEAN -m /usr/src/share/mk KERNEL=kernel all -DNO_MODULES_OBJ linking kernel.debug local_apic.o: In function `apic_init': /usr/src/sys/x86/x86/local_apic.c:1307: undefined reference to `ppro_reenable_apic' *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/src/sys/ALIX_DSK *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src ---Mike On 12/22/2014 2:53 PM, John Baldwin wrote: > Author: jhb > Date: Mon Dec 22 19:53:55 2014 > New Revision: 276076 > URL: https://svnweb.freebsd.org/changeset/base/276076 > > Log: > MFC 271405,271408,271409,272658: > MFamd64: Use initializecpu() to set various model-specific registers on > AP startup and AP resume (it was already used for BSP startup and BSP > resume). > > Modified: > stable/10/sys/amd64/amd64/mp_machdep.c > stable/10/sys/i386/i386/initcpu.c > stable/10/sys/i386/i386/machdep.c > stable/10/sys/i386/i386/mp_machdep.c > stable/10/sys/i386/include/md_var.h > stable/10/sys/i386/xen/mp_machdep.c > stable/10/sys/pc98/pc98/machdep.c > stable/10/sys/x86/x86/identcpu.c > stable/10/sys/x86/x86/local_apic.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/amd64/amd64/mp_machdep.c > ============================================================================== > --- stable/10/sys/amd64/amd64/mp_machdep.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/amd64/amd64/mp_machdep.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -723,7 +723,7 @@ init_secondary(void) > /* set up CPU registers and state */ > cpu_setregs(); > > - /* set up SSE/NX registers */ > + /* set up SSE/NX */ > initializecpu(); > > /* set up FPU state on the AP */ > > Modified: stable/10/sys/i386/i386/initcpu.c > ============================================================================== > --- stable/10/sys/i386/i386/initcpu.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/i386/i386/initcpu.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -59,6 +59,12 @@ static void init_i486_on_386(void); > static void init_6x86(void); > #endif /* I486_CPU */ > > +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) > +static void enable_K5_wt_alloc(void); > +static void enable_K6_wt_alloc(void); > +static void enable_K6_2_wt_alloc(void); > +#endif > + > #ifdef I686_CPU > static void init_6x86MX(void); > static void init_ppro(void); > @@ -451,7 +457,7 @@ init_winchip(void) > fcr &= ~(1ULL << 11); > > /* > - * Additioanlly, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. > + * Additionally, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. > */ > if (CPUID_TO_MODEL(cpu_id) >= 8) > fcr |= (1 << 12) | (1 << 19) | (1 << 20); > @@ -527,6 +533,8 @@ init_6x86MX(void) > intr_restore(saveintr); > } > > +static int ppro_apic_used = -1; > + > static void > init_ppro(void) > { > @@ -535,9 +543,29 @@ init_ppro(void) > /* > * Local APIC should be disabled if it is not going to be used. > */ > - apicbase = rdmsr(MSR_APICBASE); > - apicbase &= ~APICBASE_ENABLED; > - wrmsr(MSR_APICBASE, apicbase); > + if (ppro_apic_used != 1) { > + apicbase = rdmsr(MSR_APICBASE); > + apicbase &= ~APICBASE_ENABLED; > + wrmsr(MSR_APICBASE, apicbase); > + ppro_apic_used = 0; > + } > +} > + > +/* > + * If the local APIC is going to be used after being disabled above, > + * re-enable it and don't disable it in the future. > + */ > +void > +ppro_reenable_apic(void) > +{ > + u_int64_t apicbase; > + > + if (ppro_apic_used == 0) { > + apicbase = rdmsr(MSR_APICBASE); > + apicbase |= APICBASE_ENABLED; > + wrmsr(MSR_APICBASE, apicbase); > + ppro_apic_used = 1; > + } > } > > /* > @@ -646,20 +674,6 @@ init_transmeta(void) > } > #endif > > -/* > - * Initialize CR4 (Control register 4) to enable SSE instructions. > - */ > -void > -enable_sse(void) > -{ > -#if defined(CPU_ENABLE_SSE) > - if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { > - load_cr4(rcr4() | CR4_FXSR | CR4_XMM); > - cpu_fxsr = hw_instruction_sse = 1; > - } > -#endif > -} > - > extern int elf32_nxstack; > > void > @@ -692,6 +706,27 @@ initializecpu(void) > #ifdef I586_CPU > case CPU_586: > switch (cpu_vendor_id) { > + case CPU_VENDOR_AMD: > +#ifdef CPU_WT_ALLOC > + if (((cpu_id & 0x0f0) > 0) && > + ((cpu_id & 0x0f0) < 0x60) && > + ((cpu_id & 0x00f) > 3)) > + enable_K5_wt_alloc(); > + else if (((cpu_id & 0x0f0) > 0x80) || > + (((cpu_id & 0x0f0) == 0x80) && > + (cpu_id & 0x00f) > 0x07)) > + enable_K6_2_wt_alloc(); > + else if ((cpu_id & 0x0f0) > 0x50) > + enable_K6_wt_alloc(); > +#endif > + if ((cpu_id & 0xf0) == 0xa0) > + /* > + * Make sure the TSC runs through > + * suspension, otherwise we can't use > + * it as timecounter > + */ > + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); > + break; > case CPU_VENDOR_CENTAUR: > init_winchip(); > break; > @@ -762,7 +797,17 @@ initializecpu(void) > default: > break; > } > - enable_sse(); > +#if defined(CPU_ENABLE_SSE) > + if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { > + load_cr4(rcr4() | CR4_FXSR | CR4_XMM); > + cpu_fxsr = hw_instruction_sse = 1; > + } > +#endif > +} > + > +void > +initializecpucache(void) > +{ > > /* > * CPUID with %eax = 1, %ebx returns > @@ -839,7 +884,7 @@ initializecpu(void) > * Enable write allocate feature of AMD processors. > * Following two functions require the Maxmem variable being set. > */ > -void > +static void > enable_K5_wt_alloc(void) > { > u_int64_t msr; > @@ -885,7 +930,7 @@ enable_K5_wt_alloc(void) > } > } > > -void > +static void > enable_K6_wt_alloc(void) > { > quad_t size; > @@ -945,7 +990,7 @@ enable_K6_wt_alloc(void) > intr_restore(saveintr); > } > > -void > +static void > enable_K6_2_wt_alloc(void) > { > quad_t size; > > Modified: stable/10/sys/i386/i386/machdep.c > ============================================================================== > --- stable/10/sys/i386/i386/machdep.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/i386/i386/machdep.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -2733,6 +2733,7 @@ init386(first) > setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, > GSEL(GCODE_SEL, SEL_KPL)); > initializecpu(); /* Initialize CPU registers */ > + initializecpucache(); > > /* make an initial tss so cpu can get interrupt stack on syscall! */ > /* Note: -16 is so we can grow the trapframe if we came from vm86 */ > @@ -3009,6 +3010,7 @@ init386(first) > setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, > GSEL(GCODE_SEL, SEL_KPL)); > initializecpu(); /* Initialize CPU registers */ > + initializecpucache(); > > /* make an initial tss so cpu can get interrupt stack on syscall! */ > /* Note: -16 is so we can grow the trapframe if we came from vm86 */ > > Modified: stable/10/sys/i386/i386/mp_machdep.c > ============================================================================== > --- stable/10/sys/i386/i386/mp_machdep.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/i386/i386/mp_machdep.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -747,25 +747,15 @@ init_secondary(void) > /* set up CPU registers and state */ > cpu_setregs(); > > + /* set up SSE/NX */ > + initializecpu(); > + > /* set up FPU state on the AP */ > npxinit(); > > - /* set up SSE registers */ > - enable_sse(); > - > if (cpu_ops.cpu_init) > cpu_ops.cpu_init(); > > -#ifdef PAE > - /* Enable the PTE no-execute bit. */ > - if ((amd_feature & AMDID_NX) != 0) { > - uint64_t msr; > - > - msr = rdmsr(MSR_EFER) | EFER_NXE; > - wrmsr(MSR_EFER, msr); > - } > -#endif > - > /* A quick check from sanity claus */ > cpuid = PCPU_GET(cpuid); > if (PCPU_GET(apic_id) != lapic_id()) { > @@ -1530,6 +1520,7 @@ cpususpend_handler(void) > } else { > npxresume(&susppcbs[cpu]->sp_fpususpend); > pmap_init_pat(); > + initializecpu(); > PCPU_SET(switchtime, 0); > PCPU_SET(switchticks, ticks); > > > Modified: stable/10/sys/i386/include/md_var.h > ============================================================================== > --- stable/10/sys/i386/include/md_var.h Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/i386/include/md_var.h Mon Dec 22 19:53:55 2014 (r276076) > @@ -99,14 +99,9 @@ void doreti_popl_fs_fault(void) __asm(__ > void dump_add_page(vm_paddr_t); > void dump_drop_page(vm_paddr_t); > void finishidentcpu(void); > -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) > -void enable_K5_wt_alloc(void); > -void enable_K6_wt_alloc(void); > -void enable_K6_2_wt_alloc(void); > -#endif > -void enable_sse(void); > void fillw(int /*u_short*/ pat, void *base, size_t cnt); > void initializecpu(void); > +void initializecpucache(void); > void i686_pagezero(void *addr); > void sse2_pagezero(void *addr); > void init_AMD_Elan_sc520(void); > @@ -114,6 +109,7 @@ int is_physical_memory(vm_paddr_t addr); > int isa_nmi(int cd); > vm_paddr_t kvtop(void *addr); > void panicifcpuunsupported(void); > +void ppro_reenable_apic(void); > void printcpuinfo(void); > void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); > int user_dbreg_trap(void); > > Modified: stable/10/sys/i386/xen/mp_machdep.c > ============================================================================== > --- stable/10/sys/i386/xen/mp_machdep.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/i386/xen/mp_machdep.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -598,22 +598,13 @@ init_secondary(void) > for (addr = 0; addr < NKPT * NBPDR - 1; addr += PAGE_SIZE) > invlpg(addr); > > - /* set up FPU state on the AP */ > - npxinit(); > #if 0 > - > - /* set up SSE registers */ > - enable_sse(); > + /* set up SSE/NX */ > + initializecpu(); > #endif > -#if 0 && defined(PAE) > - /* Enable the PTE no-execute bit. */ > - if ((amd_feature & AMDID_NX) != 0) { > - uint64_t msr; > > - msr = rdmsr(MSR_EFER) | EFER_NXE; > - wrmsr(MSR_EFER, msr); > - } > -#endif > + /* set up FPU state on the AP */ > + npxinit(); > #if 0 > /* A quick check from sanity claus */ > if (PCPU_GET(apic_id) != lapic_id()) { > > Modified: stable/10/sys/pc98/pc98/machdep.c > ============================================================================== > --- stable/10/sys/pc98/pc98/machdep.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/pc98/pc98/machdep.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -2310,6 +2310,7 @@ init386(first) > setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, > GSEL(GCODE_SEL, SEL_KPL)); > initializecpu(); /* Initialize CPU registers */ > + initializecpucache(); > > /* make an initial tss so cpu can get interrupt stack on syscall! */ > /* Note: -16 is so we can grow the trapframe if we came from vm86 */ > > Modified: stable/10/sys/x86/x86/identcpu.c > ============================================================================== > --- stable/10/sys/x86/x86/identcpu.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/x86/x86/identcpu.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -405,30 +405,11 @@ printcpuinfo(void) > break; > case 0x5a0: > strcat(cpu_model, "Geode LX"); > - /* > - * Make sure the TSC runs through suspension, > - * otherwise we can't use it as timecounter > - */ > - wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); > break; > default: > strcat(cpu_model, "Unknown"); > break; > } > -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) > - if ((cpu_id & 0xf00) == 0x500) { > - if (((cpu_id & 0x0f0) > 0) > - && ((cpu_id & 0x0f0) < 0x60) > - && ((cpu_id & 0x00f) > 3)) > - enable_K5_wt_alloc(); > - else if (((cpu_id & 0x0f0) > 0x80) > - || (((cpu_id & 0x0f0) == 0x80) > - && (cpu_id & 0x00f) > 0x07)) > - enable_K6_2_wt_alloc(); > - else if ((cpu_id & 0x0f0) > 0x50) > - enable_K6_wt_alloc(); > - } > -#endif > #else > if ((cpu_id & 0xf00) == 0xf00) > strcat(cpu_model, "AMD64 Processor"); > > Modified: stable/10/sys/x86/x86/local_apic.c > ============================================================================== > --- stable/10/sys/x86/x86/local_apic.c Mon Dec 22 19:10:21 2014 (r276075) > +++ stable/10/sys/x86/x86/local_apic.c Mon Dec 22 19:53:55 2014 (r276076) > @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); > #include > > #include > -#include > #include > #include > #include > @@ -1264,9 +1263,6 @@ static void > apic_init(void *dummy __unused) > { > struct apic_enumerator *enumerator; > -#ifndef __amd64__ > - uint64_t apic_base; > -#endif > int retval, best; > > /* We only support built in local APICs. */ > @@ -1308,12 +1304,7 @@ apic_init(void *dummy __unused) > * CPUs during early startup. We need to turn the local APIC back > * on on such CPUs now. > */ > - if (cpu == CPU_686 && cpu_vendor_id == CPU_VENDOR_INTEL && > - (cpu_id & 0xff0) == 0x610) { > - apic_base = rdmsr(MSR_APICBASE); > - apic_base |= APICBASE_ENABLED; > - wrmsr(MSR_APICBASE, apic_base); > - } > + ppro_reenable_apic(); > #endif > > /* Probe the CPU's in the system. */ > _______________________________________________ > svn-src-stable-10@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 > To unsubscribe, send any mail to "svn-src-stable-10-unsubscribe@freebsd.org" > > -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 19:49:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39481D5B; Fri, 16 Jan 2015 19:49:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C40C79D; Fri, 16 Jan 2015 19:49:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GJnAnM051846; Fri, 16 Jan 2015 19:49:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJnAOB051844; Fri, 16 Jan 2015 19:49:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501161949.t0GJnAOB051844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 16 Jan 2015 19:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277265 - head/sys/arm/xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:49:11 -0000 Author: ian Date: Fri Jan 16 19:49:10 2015 New Revision: 277265 URL: https://svnweb.freebsd.org/changeset/base/277265 Log: Enable the snoop control unit during MP startup, rather than relying on the bootloader to have done so. Submitted by: Thomas Skibo Modified: head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Fri Jan 16 19:38:24 2015 (r277264) +++ head/sys/arm/xilinx/zy7_mp.c Fri Jan 16 19:49:10 2015 (r277265) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #define ZYNQ7_CPU1_ENTRY 0xfffffff0 +#define SCU_CONTROL_REG 0xf8f00000 +#define SCU_CONTROL_ENABLE (1 << 0) + void platform_mp_init_secondary(void) { @@ -64,7 +67,21 @@ platform_mp_probe(void) void platform_mp_start_ap(void) { + bus_space_handle_t scu_handle; bus_space_handle_t ocm_handle; + uint32_t scu_ctrl; + + /* Map in SCU control register. */ + if (bus_space_map(fdtbus_bs_tag, SCU_CONTROL_REG, 4, + 0, &scu_handle) != 0) + panic("platform_mp_start_ap: Couldn't map SCU config reg\n"); + + /* Set SCU enable bit. */ + scu_ctrl = bus_space_read_4(fdtbus_bs_tag, scu_handle, 0); + scu_ctrl |= SCU_CONTROL_ENABLE; + bus_space_write_4(fdtbus_bs_tag, scu_handle, 0, scu_ctrl); + + bus_space_unmap(fdtbus_bs_tag, scu_handle, 4); /* Map in magic location to give entry address to CPU1. */ if (bus_space_map(fdtbus_bs_tag, ZYNQ7_CPU1_ENTRY, 4, @@ -75,8 +92,10 @@ platform_mp_start_ap(void) bus_space_write_4(fdtbus_bs_tag, ocm_handle, 0, pmap_kextract((vm_offset_t)mpentry)); + bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); + /* - * The SCU is enabled by the BOOTROM but I think the second CPU doesn't + * The SCU is enabled above but I think the second CPU doesn't * turn on filtering until after the wake-up below. I think that's why * things don't work if I don't put these cache ops here. Also, the * magic location, 0xfffffff0, isn't in the SCU's filtering range so it @@ -87,8 +106,6 @@ platform_mp_start_ap(void) /* Wake up CPU1. */ armv7_sev(); - - bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); } void From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 19:52:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA8AAEF0; Fri, 16 Jan 2015 19:52:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3EE785A; Fri, 16 Jan 2015 19:52:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GJqeDu055868; Fri, 16 Jan 2015 19:52:40 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJqbRJ055851; Fri, 16 Jan 2015 19:52:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501161952.t0GJqbRJ055851@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 19:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277266 - in vendor-crypto/openssl/dist: . crypto crypto/ecdsa crypto/x509v3 util X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:52:41 -0000 Author: jkim Date: Fri Jan 16 19:52:36 2015 New Revision: 277266 URL: https://svnweb.freebsd.org/changeset/base/277266 Log: Import OpenSSL 1.0.1l. Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/crypto/Makefile vendor-crypto/openssl/dist/crypto/ecdsa/Makefile vendor-crypto/openssl/dist/crypto/ecdsa/ecs_vrf.c vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/x509v3/v3_ncons.c vendor-crypto/openssl/dist/e_os.h vendor-crypto/openssl/dist/util/mk1mf.pl Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/CHANGES Fri Jan 16 19:52:36 2015 (r277266) @@ -2,6 +2,11 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1k and 1.0.1l [15 Jan 2015] + + *) Build fixes for the Windows and OpenVMS platforms + [Matt Caswell and Richard Levitte] + Changes between 1.0.1j and 1.0.1k [8 Jan 2015] *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Fri Jan 16 19:52:36 2015 (r277266) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://svn.freebsd.org/base" -setenv OSSLVER 1.0.1k -# OSSLTAG format: v1_0_1k +setenv OSSLVER 1.0.1l +# OSSLTAG format: v1_0_1l ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/Makefile ============================================================================== --- vendor-crypto/openssl/dist/Makefile Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/Makefile Fri Jan 16 19:52:36 2015 (r277266) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1k +VERSION=1.0.1l MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/NEWS Fri Jan 16 19:52:36 2015 (r277266) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015] + + o Build fixes for the Windows and OpenVMS platforms + Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015] o Fix for CVE-2014-3571 Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/README Fri Jan 16 19:52:36 2015 (r277266) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1k 8 Jan 2015 + OpenSSL 1.0.1l 15 Jan 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/crypto/Makefile ============================================================================== --- vendor-crypto/openssl/dist/crypto/Makefile Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/crypto/Makefile Fri Jan 16 19:52:36 2015 (r277266) @@ -55,7 +55,7 @@ top: all: shared buildinf.h: ../Makefile - $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" >buildinf.h + $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ Modified: vendor-crypto/openssl/dist/crypto/ecdsa/Makefile ============================================================================== --- vendor-crypto/openssl/dist/crypto/ecdsa/Makefile Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/crypto/ecdsa/Makefile Fri Jan 16 19:52:36 2015 (r277266) @@ -126,16 +126,15 @@ ecs_sign.o: ../../include/openssl/safest ecs_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ecs_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ecs_sign.o: ecs_locl.h ecs_sign.c -ecs_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h -ecs_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h -ecs_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h ecs_vrf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h -ecs_vrf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ecs_locl.h ecs_vrf.c +ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c Modified: vendor-crypto/openssl/dist/crypto/ecdsa/ecs_vrf.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/ecdsa/ecs_vrf.c Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/crypto/ecdsa/ecs_vrf.c Fri Jan 16 19:52:36 2015 (r277266) @@ -57,7 +57,7 @@ */ #include "ecs_locl.h" -#include "cryptlib.h" +#include #ifndef OPENSSL_NO_ENGINE #include #endif Modified: vendor-crypto/openssl/dist/crypto/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslv.h Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/crypto/opensslv.h Fri Jan 16 19:52:36 2015 (r277266) @@ -29,11 +29,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x100010bfL +#define OPENSSL_VERSION_NUMBER 0x100010cfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-fips 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-fips 15 Jan 2015" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l 15 Jan 2015" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: vendor-crypto/openssl/dist/crypto/x509v3/v3_ncons.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/x509v3/v3_ncons.c Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/crypto/x509v3/v3_ncons.c Fri Jan 16 19:52:36 2015 (r277266) @@ -401,7 +401,7 @@ static int nc_dns(ASN1_IA5STRING *dns, A if (dns->length > base->length) { dnsptr += dns->length - base->length; - if (dnsptr[-1] != '.') + if (*baseptr != '.' && dnsptr[-1] != '.') return X509_V_ERR_PERMITTED_VIOLATION; } Modified: vendor-crypto/openssl/dist/e_os.h ============================================================================== --- vendor-crypto/openssl/dist/e_os.h Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/e_os.h Fri Jan 16 19:52:36 2015 (r277266) @@ -368,11 +368,13 @@ static __inline unsigned int _strlen31(c # define DEFAULT_HOME "C:" # endif -/* Avoid Windows 8 SDK GetVersion deprecated problems */ +/* Avoid Visual Studio 13 GetVersion deprecated problems */ #if defined(_MSC_VER) && _MSC_VER>=1800 # define check_winnt() (1) +# define check_win_minplat(x) (1) #else # define check_winnt() (GetVersion() < 0x80000000) +# define check_win_minplat(x) (LOBYTE(LOWORD(GetVersion())) >= (x)) #endif #else /* The non-microsoft world */ Modified: vendor-crypto/openssl/dist/util/mk1mf.pl ============================================================================== --- vendor-crypto/openssl/dist/util/mk1mf.pl Fri Jan 16 19:49:10 2015 (r277265) +++ vendor-crypto/openssl/dist/util/mk1mf.pl Fri Jan 16 19:52:36 2015 (r277266) @@ -625,7 +625,7 @@ open (OUT,">>crypto/buildinf.h") || die printf OUT < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0080FA2; Fri, 16 Jan 2015 19:54:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6CAF86A; Fri, 16 Jan 2015 19:54:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GJsIwG056169; Fri, 16 Jan 2015 19:54:18 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJsIZ5056168; Fri, 16 Jan 2015 19:54:18 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501161954.t0GJsIZ5056168@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 19:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277267 - vendor-crypto/openssl/1.0.1l X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:54:19 -0000 Author: jkim Date: Fri Jan 16 19:54:18 2015 New Revision: 277267 URL: https://svnweb.freebsd.org/changeset/base/277267 Log: Tag OpenSSL 1.0.1l. Added: vendor-crypto/openssl/1.0.1l/ - copied from r277266, vendor-crypto/openssl/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 19:56:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F4EB1FB; Fri, 16 Jan 2015 19:56:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED0B7887; Fri, 16 Jan 2015 19:55:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GJtxc1056524; Fri, 16 Jan 2015 19:55:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJtuk8056502; Fri, 16 Jan 2015 19:55:56 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501161955.t0GJtuk8056502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 19:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277268 - in vendor-crypto/openssl/dist-0.9.8: . crypto crypto/ecdsa crypto/rand X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:56:00 -0000 Author: jkim Date: Fri Jan 16 19:55:55 2015 New Revision: 277268 URL: https://svnweb.freebsd.org/changeset/base/277268 Log: Import OpenSSL 0.9.8ze. Modified: vendor-crypto/openssl/dist-0.9.8/CHANGES vendor-crypto/openssl/dist-0.9.8/FREEBSD-upgrade vendor-crypto/openssl/dist-0.9.8/Makefile vendor-crypto/openssl/dist-0.9.8/NEWS vendor-crypto/openssl/dist-0.9.8/README vendor-crypto/openssl/dist-0.9.8/crypto/cryptlib.c vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/Makefile vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/ecs_vrf.c vendor-crypto/openssl/dist-0.9.8/crypto/opensslv.h vendor-crypto/openssl/dist-0.9.8/crypto/rand/rand_win.c vendor-crypto/openssl/dist-0.9.8/e_os.h vendor-crypto/openssl/dist-0.9.8/openssl.spec Modified: vendor-crypto/openssl/dist-0.9.8/CHANGES ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/CHANGES Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/CHANGES Fri Jan 16 19:55:55 2015 (r277268) @@ -2,6 +2,11 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8zd and 0.9.8ze [15 Jan 2015] + + *) Build fixes for the Windows and OpenVMS platforms + [Matt Caswell and Richard Levitte] + Changes between 0.9.8zc and 0.9.8zd [8 Jan 2015] *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS Modified: vendor-crypto/openssl/dist-0.9.8/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/FREEBSD-upgrade Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/FREEBSD-upgrade Fri Jan 16 19:55:55 2015 (r277268) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://svn.freebsd.org/base" -setenv OSSLVER 0.9.8zd -# OSSLTAG format: v0_9_8zd +setenv OSSLVER 0.9.8ze +# OSSLTAG format: v0_9_8ze ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist-0.9.8/Makefile ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/Makefile Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/Makefile Fri Jan 16 19:55:55 2015 (r277268) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8zd +VERSION=0.9.8ze MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: vendor-crypto/openssl/dist-0.9.8/NEWS ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/NEWS Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/NEWS Fri Jan 16 19:55:55 2015 (r277268) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8zd and OpenSSL 0.9.8ze [15 Jan 2015] + + o Build fixes for the Windows and OpenVMS platforms + Major changes between OpenSSL 0.9.8zc and OpenSSL 0.9.8zd [8 Jan 2015] o Fix for CVE-2014-3571 Modified: vendor-crypto/openssl/dist-0.9.8/README ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/README Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/README Fri Jan 16 19:55:55 2015 (r277268) @@ -1,5 +1,5 @@ - OpenSSL 0.9.8zd 8 Jan 2015 + OpenSSL 0.9.8ze 15 Jan 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist-0.9.8/crypto/cryptlib.c ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/crypto/cryptlib.c Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/crypto/cryptlib.c Fri Jan 16 19:55:55 2015 (r277268) @@ -512,7 +512,7 @@ void OPENSSL_showfatal (const char *fmta #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 /* this -------------v--- guards NT-specific calls */ - if (GetVersion() < 0x80000000 && OPENSSL_isservice() > 0) + if (check_winnt() && OPENSSL_isservice() > 0) { HANDLE h = RegisterEventSource(0,_T("OPENSSL")); const TCHAR *pmsg=buf; ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0); Modified: vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/Makefile ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/Makefile Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/Makefile Fri Jan 16 19:55:55 2015 (r277268) @@ -128,12 +128,11 @@ ecs_sign.o: ../../include/openssl/safest ecs_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ecs_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ecs_sign.o: ecs_locl.h ecs_sign.c -ecs_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h -ecs_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h -ecs_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h ecs_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h ecs_vrf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h ecs_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -141,4 +140,4 @@ ecs_vrf.o: ../../include/openssl/ossl_ty ecs_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h ecs_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ecs_vrf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -ecs_vrf.o: ../cryptlib.h ecs_locl.h ecs_vrf.c +ecs_vrf.o: ecs_locl.h ecs_vrf.c Modified: vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/ecs_vrf.c ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/ecs_vrf.c Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/crypto/ecdsa/ecs_vrf.c Fri Jan 16 19:55:55 2015 (r277268) @@ -57,7 +57,7 @@ */ #include "ecs_locl.h" -#include "cryptlib.h" +#include #ifndef OPENSSL_NO_ENGINE #include #endif Modified: vendor-crypto/openssl/dist-0.9.8/crypto/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/crypto/opensslv.h Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/crypto/opensslv.h Fri Jan 16 19:55:55 2015 (r277268) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009081dfL +#define OPENSSL_VERSION_NUMBER 0x009081efL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zd-fips 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8ze-fips 15 Jan 2015" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zd 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8ze 15 Jan 2015" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: vendor-crypto/openssl/dist-0.9.8/crypto/rand/rand_win.c ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/crypto/rand/rand_win.c Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/crypto/rand/rand_win.c Fri Jan 16 19:55:55 2015 (r277268) @@ -196,12 +196,6 @@ int RAND_poll(void) DWORD w; int good = 0; - /* Determine the OS version we are on so we can turn off things - * that do not work properly. - */ - OSVERSIONINFO osverinfo ; - osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ; - GetVersionEx( &osverinfo ) ; #if defined(OPENSSL_SYS_WINCE) # if defined(_WIN32_WCE) && _WIN32_WCE>=300 @@ -281,56 +275,6 @@ int RAND_poll(void) * at random times on Windows 2000. Reported by Jeffrey Altman. * Only use it on NT. */ - /* Wolfgang Marczy reports that - * the RegQueryValueEx call below can hang on NT4.0 (SP6). - * So we don't use this at all for now. */ -#if 0 - if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT && - osverinfo.dwMajorVersion < 5) - { - /* Read Performance Statistics from NT/2000 registry - * The size of the performance data can vary from call - * to call so we must guess the size of the buffer to use - * and increase its size if we get an ERROR_MORE_DATA - * return instead of ERROR_SUCCESS. - */ - LONG rc=ERROR_MORE_DATA; - char * buf=NULL; - DWORD bufsz=0; - DWORD length; - - while (rc == ERROR_MORE_DATA) - { - buf = realloc(buf,bufsz+8192); - if (!buf) - break; - bufsz += 8192; - - length = bufsz; - rc = RegQueryValueEx(HKEY_PERFORMANCE_DATA, TEXT("Global"), - NULL, NULL, buf, &length); - } - if (rc == ERROR_SUCCESS) - { - /* For entropy count assume only least significant - * byte of each DWORD is random. - */ - RAND_add(&length, sizeof(length), 0); - RAND_add(buf, length, length / 4.0); - - /* Close the Registry Key to allow Windows to cleanup/close - * the open handle - * Note: The 'HKEY_PERFORMANCE_DATA' key is implicitly opened - * when the RegQueryValueEx above is done. However, if - * it is not explicitly closed, it can cause disk - * partition manipulation problems. - */ - RegCloseKey(HKEY_PERFORMANCE_DATA); - } - if (buf) - free(buf); - } -#endif if (advapi) { @@ -383,7 +327,7 @@ int RAND_poll(void) if (advapi) FreeLibrary(advapi); - if ((osverinfo.dwPlatformId != VER_PLATFORM_WIN32_NT || + if ((!check_winnt() || !OPENSSL_isservice()) && (user = LoadLibrary(TEXT("USER32.DLL")))) { @@ -407,8 +351,7 @@ int RAND_poll(void) * on NT4 even though it exists in SP3 (or SP6) and * higher. */ - if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT && - osverinfo.dwMajorVersion < 5) + if (check_winnt() && !check_win_minplat(5)) cursor = 0; } if (cursor) @@ -750,7 +693,7 @@ static void readscreen(void) int y; /* y-coordinate of screen lines to grab */ int n = 16; /* number of screen lines to grab at a time */ - if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0) + if (check_winnt() && OPENSSL_isservice()>0) return; /* Create a screen DC and a memory DC compatible to screen DC */ Modified: vendor-crypto/openssl/dist-0.9.8/e_os.h ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/e_os.h Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/e_os.h Fri Jan 16 19:55:55 2015 (r277268) @@ -360,6 +360,15 @@ static __inline unsigned int _strlen31(c # define DEFAULT_HOME "C:" # endif +/* Avoid Visual Studio 13 GetVersion deprecated problems */ +#if defined(_MSC_VER) && _MSC_VER>=1800 +# define check_winnt() (1) +# define check_win_minplat(x) (1) +#else +# define check_winnt() (GetVersion() < 0x80000000) +# define check_win_minplat(x) (LOBYTE(LOWORD(GetVersion())) >= (x)) +#endif + #else /* The non-microsoft world */ # ifdef OPENSSL_SYS_VMS Modified: vendor-crypto/openssl/dist-0.9.8/openssl.spec ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/openssl.spec Fri Jan 16 19:54:18 2015 (r277267) +++ vendor-crypto/openssl/dist-0.9.8/openssl.spec Fri Jan 16 19:55:55 2015 (r277268) @@ -6,7 +6,7 @@ Release: 1 Summary: Secure Sockets Layer and cryptography libraries and tools Name: openssl -Version: 0.9.8zd +Version: 0.9.8ze Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz License: OpenSSL Group: System Environment/Libraries From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 19:57:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CCDD322; Fri, 16 Jan 2015 19:57:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EF5E88C; Fri, 16 Jan 2015 19:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GJv2a0056738; Fri, 16 Jan 2015 19:57:02 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJv21d056737; Fri, 16 Jan 2015 19:57:02 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501161957.t0GJv21d056737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 19:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277269 - vendor-crypto/openssl/0.9.8ze X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:57:02 -0000 Author: jkim Date: Fri Jan 16 19:57:01 2015 New Revision: 277269 URL: https://svnweb.freebsd.org/changeset/base/277269 Log: Tag OpenSSL 0.9.8ze. Added: vendor-crypto/openssl/0.9.8ze/ - copied from r277268, vendor-crypto/openssl/dist-0.9.8/ From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 20:19:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CFDC855; Fri, 16 Jan 2015 20:19:42 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09933A8A; Fri, 16 Jan 2015 20:19:41 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YCDMh-0008g2-Gg; Fri, 16 Jan 2015 23:19:31 +0300 Date: Fri, 16 Jan 2015 23:19:31 +0300 From: Slawa Olhovchenkov To: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150116201931.GG3698@zxy.spb.ru> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 20:19:42 -0000 On Fri, Jan 16, 2015 at 10:57:54AM -0700, Warner Losh wrote: > > > On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov wrote: > > > > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > > > >> Author: imp > >> Date: Thu Jan 15 00:42:06 2015 > >> New Revision: 277204 > >> URL: https://svnweb.freebsd.org/changeset/base/277204 > >> > >> Log: > >> New MINIMAL kernel config. The goal with this configuration is to > >> only compile in those options in GENERIC that cannot be loaded as > >> modules. ufs is still included because many of its options aren't > >> present in the kernel module. There's some other exceptions documented > > > > Are you sure? > > I think defining UFS options in kernel connfig affect to module too. > > When I define this options in kernel config (w/o options FFS) I got > > ufs.ko with this SU, quota, acl etc. > > While one could set options in the kernel to affect the ufs.ko build, > there's not a universal ufs.ko that can be loaded easily that switches > between the different types of options. You can create modules But this is equal to current condition. > > IEEE80211_DEBUG > > IEEE80211_AMPDU_AGE > > IEEE80211_SUPPORT_MESH > > AH_SUPPORT_AR5416 > > AH_AR5416_INTERRUPT_MITIGATION > > ATH_ENABLE_11N > > These are already the default for the ath or wlan modules, if I'm reading things correctly. This is new for me. From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 21:03:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E05D82; Fri, 16 Jan 2015 21:03:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E867EBD; Fri, 16 Jan 2015 21:03:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GL3njN091372; Fri, 16 Jan 2015 21:03:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GL3Nq8091232; Fri, 16 Jan 2015 21:03:23 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501162103.t0GL3Nq8091232@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 21:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277270 - in head: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/ecdsa crypto/openssl/crypto/x509v3 crypto/openssl/util secure/lib/libcrypto secure/lib/libcrypto/man secure... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:03:49 -0000 Author: jkim Date: Fri Jan 16 21:03:23 2015 New Revision: 277270 URL: https://svnweb.freebsd.org/changeset/base/277270 Log: Merge OpenSSL 1.0.1l. MFC after: 1 week Relnotes: yes Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/ecdsa/Makefile head/crypto/openssl/crypto/ecdsa/ecs_vrf.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/x509v3/v3_ncons.c head/crypto/openssl/e_os.h head/crypto/openssl/util/mk1mf.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/CHANGES Fri Jan 16 21:03:23 2015 (r277270) @@ -2,6 +2,11 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1k and 1.0.1l [15 Jan 2015] + + *) Build fixes for the Windows and OpenVMS platforms + [Matt Caswell and Richard Levitte] + Changes between 1.0.1j and 1.0.1k [8 Jan 2015] *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/Makefile Fri Jan 16 21:03:23 2015 (r277270) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1k +VERSION=1.0.1l MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/NEWS Fri Jan 16 21:03:23 2015 (r277270) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015] + + o Build fixes for the Windows and OpenVMS platforms + Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015] o Fix for CVE-2014-3571 Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/README Fri Jan 16 21:03:23 2015 (r277270) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1k 8 Jan 2015 + OpenSSL 1.0.1l 15 Jan 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/crypto/Makefile ============================================================================== --- head/crypto/openssl/crypto/Makefile Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/Makefile Fri Jan 16 21:03:23 2015 (r277270) @@ -56,7 +56,7 @@ top: all: shared buildinf.h: ../Makefile - $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" >buildinf.h + $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ Modified: head/crypto/openssl/crypto/ecdsa/Makefile ============================================================================== --- head/crypto/openssl/crypto/ecdsa/Makefile Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/ecdsa/Makefile Fri Jan 16 21:03:23 2015 (r277270) @@ -126,16 +126,15 @@ ecs_sign.o: ../../include/openssl/safest ecs_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ecs_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ecs_sign.o: ecs_locl.h ecs_sign.c -ecs_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h -ecs_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h -ecs_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h ecs_vrf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h -ecs_vrf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ecs_locl.h ecs_vrf.c +ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c Modified: head/crypto/openssl/crypto/ecdsa/ecs_vrf.c ============================================================================== --- head/crypto/openssl/crypto/ecdsa/ecs_vrf.c Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/ecdsa/ecs_vrf.c Fri Jan 16 21:03:23 2015 (r277270) @@ -57,7 +57,7 @@ */ #include "ecs_locl.h" -#include "cryptlib.h" +#include #ifndef OPENSSL_NO_ENGINE #include #endif Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/opensslv.h Fri Jan 16 21:03:23 2015 (r277270) @@ -29,11 +29,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x100010bfL +#define OPENSSL_VERSION_NUMBER 0x100010cfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-fips 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-fips 15 Jan 2015" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-freebsd 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-freebsd 15 Jan 2015" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/x509v3/v3_ncons.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_ncons.c Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/x509v3/v3_ncons.c Fri Jan 16 21:03:23 2015 (r277270) @@ -401,7 +401,7 @@ static int nc_dns(ASN1_IA5STRING *dns, A if (dns->length > base->length) { dnsptr += dns->length - base->length; - if (dnsptr[-1] != '.') + if (*baseptr != '.' && dnsptr[-1] != '.') return X509_V_ERR_PERMITTED_VIOLATION; } Modified: head/crypto/openssl/e_os.h ============================================================================== --- head/crypto/openssl/e_os.h Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/e_os.h Fri Jan 16 21:03:23 2015 (r277270) @@ -368,11 +368,13 @@ static __inline unsigned int _strlen31(c # define DEFAULT_HOME "C:" # endif -/* Avoid Windows 8 SDK GetVersion deprecated problems */ +/* Avoid Visual Studio 13 GetVersion deprecated problems */ #if defined(_MSC_VER) && _MSC_VER>=1800 # define check_winnt() (1) +# define check_win_minplat(x) (1) #else # define check_winnt() (GetVersion() < 0x80000000) +# define check_win_minplat(x) (LOBYTE(LOWORD(GetVersion())) >= (x)) #endif #else /* The non-microsoft world */ Modified: head/crypto/openssl/util/mk1mf.pl ============================================================================== --- head/crypto/openssl/util/mk1mf.pl Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/util/mk1mf.pl Fri Jan 16 21:03:23 2015 (r277270) @@ -625,7 +625,7 @@ open (OUT,">>crypto/buildinf.h") || die printf OUT < # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.1k -OPENSSL_DATE= 2015-01-08 +OPENSSL_VER= 1.0.1l +OPENSSL_DATE= 2015-01-15 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_length 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_generate_nconf 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_ctrl 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_base64 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_buffer 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_cipher 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_md 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_null 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_ssl 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_find_type 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_new_CMS 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_push.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_push 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_read.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_read 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_accept 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_bio 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_connect 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_fd 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_file 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_mem 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_null 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_socket 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_set_callback 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_should_retry 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_BLINDING_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_CTX_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_CTX_start 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_add.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_add 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_add_word 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_bn2bin 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_cmp 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_copy.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_copy 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_generate_prime 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_inverse 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_num_bytes 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_rand.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_rand 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_set_bit 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_swap.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_swap 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_zero.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_zero 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add0_cert 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add1_signer 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_compress.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_compress.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_compress 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_decrypt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_encrypt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_final.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_final.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_final 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_type 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_sign.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_sign 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_sign_receipt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_uncompress 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_verify.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_verify 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_verify_receipt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CONF_modules_free 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CONF_modules_load_file 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_generate_key 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_generate_parameters 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_get_ex_new_index 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_set_method 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_size.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_size 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_SIG_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_do_sign 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_dup_DH 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_generate_key 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_generate_parameters 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_new.3 Fri Jan 16 19:57:01 2015 (r277269) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 21:08:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9E16F1A; Fri, 16 Jan 2015 21:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5558EE8; Fri, 16 Jan 2015 21:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GL84Lv091954; Fri, 16 Jan 2015 21:08:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GL842A091953; Fri, 16 Jan 2015 21:08:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501162108.t0GL842A091953@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 16 Jan 2015 21:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277271 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:08:05 -0000 Author: gjb Date: Fri Jan 16 21:08:04 2015 New Revision: 277271 URL: https://svnweb.freebsd.org/changeset/base/277271 Log: Document r277270, OpenSSL update to 1.0.1l. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 16 21:03:23 2015 (r277270) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 16 21:08:04 2015 (r277271) @@ -763,15 +763,9 @@ role="merged">Sendmail has been updated from 8.14.7 to 8.14.9. - OpenSSL has - been updated to version 1.0.1h. - file has been updated to version 5.22. - OpenSSL has - been updated to version 1.0.1j. - The binutils suite of utilities has been updated to include upstream patches that add new relocations for &arch.powerpc; @@ -797,6 +791,8 @@ strings were switched to the versions from the ELF Tool Chain project. + OpenSSL has + been updated to version 1.0.1l. From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 21:12:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A0E2159; Fri, 16 Jan 2015 21:12:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 755D2F92; Fri, 16 Jan 2015 21:12:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GLCb36095996; Fri, 16 Jan 2015 21:12:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GLCblS095995; Fri, 16 Jan 2015 21:12:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501162112.t0GLCblS095995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 16 Jan 2015 21:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277272 - head/contrib/ofed/management/opensm/osmtest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:12:37 -0000 Author: ngie Date: Fri Jan 16 21:12:36 2015 New Revision: 277272 URL: https://svnweb.freebsd.org/changeset/base/277272 Log: Don't call abort on usage errors; print out the usage message instead PR: 196793 MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/management/opensm/osmtest/main.c Modified: head/contrib/ofed/management/opensm/osmtest/main.c ============================================================================== --- head/contrib/ofed/management/opensm/osmtest/main.c Fri Jan 16 21:08:04 2015 (r277271) +++ head/contrib/ofed/management/opensm/osmtest/main.c Fri Jan 16 21:12:36 2015 (r277272) @@ -565,8 +565,9 @@ int main(int argc, char *argv[]) printf("Done with args\n"); break; - default: /* something wrong */ - abort(); + default: + show_usage(); + return 1; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 21:39:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9628D78B; Fri, 16 Jan 2015 21:39:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 760F0227; Fri, 16 Jan 2015 21:39:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GLdEJQ006609; Fri, 16 Jan 2015 21:39:14 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GLd9od006562; Fri, 16 Jan 2015 21:39:09 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501162139.t0GLd9od006562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 16 Jan 2015 21:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277273 - in head: bin/csh etc/mail gnu/usr.bin/grep kerberos5/lib/libasn1 kerberos5/lib/libgssapi_spnego kerberos5/lib/libhdb kerberos5/lib/libhx509 lib/libc lib/libexpat lib/libunboun... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:39:14 -0000 Author: will Date: Fri Jan 16 21:39:08 2015 New Revision: 277273 URL: https://svnweb.freebsd.org/changeset/base/277273 Log: Add a ${CP} alias for copying files in the build. Some users build FreeBSD as non-root in Perforce workspaces. By default, Perforce sets files read-only unless they're explicitly being edited. As a result, the -f argument must be used to cp in order to override the read-only flag when copying source files to object directories. Bare use of 'cp' should be avoided in the future. Update all current users of 'cp' in the src tree. Reviewed by: emaste MFC after: 1 week Sponsored by: Spectra Logic Modified: head/bin/csh/Makefile head/etc/mail/Makefile head/gnu/usr.bin/grep/Makefile head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libhx509/Makefile head/lib/libc/Makefile head/lib/libexpat/Makefile head/lib/libunbound/Makefile head/secure/lib/libcrypto/Makefile head/share/mk/sys.mk head/tools/regression/execve/Makefile head/tools/test/dtrace/Makefile head/usr.bin/grep/Makefile head/usr.bin/lex/Makefile head/usr.bin/make/Makefile head/usr.sbin/mtree/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/bin/csh/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -93,7 +93,7 @@ GENHDRS+= iconv.h SRCS+= iconv_stub.c iconv.h: ${.CURDIR}/iconv_stub.h - cp -f ${.CURDIR}/iconv_stub.h ${.TARGET} + ${CP} ${.CURDIR}/iconv_stub.h ${.TARGET} .endif .endif Modified: head/etc/mail/Makefile ============================================================================== --- head/etc/mail/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/etc/mail/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -69,7 +69,7 @@ SENDMAIL_MC!= hostname SENDMAIL_MC:= ${SENDMAIL_MC}.mc ${SENDMAIL_MC}: - cp -f freebsd.mc ${SENDMAIL_MC} + ${CP} freebsd.mc ${SENDMAIL_MC} .endif .ifndef SENDMAIL_SUBMIT_MC @@ -77,7 +77,7 @@ SENDMAIL_SUBMIT_MC!= hostname SENDMAIL_SUBMIT_MC:= ${SENDMAIL_SUBMIT_MC}.submit.mc ${SENDMAIL_SUBMIT_MC}: - cp -f freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} + ${CP} freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} .endif INSTALL_CF= ${SENDMAIL_MC:R}.cf Modified: head/gnu/usr.bin/grep/Makefile ============================================================================== --- head/gnu/usr.bin/grep/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/gnu/usr.bin/grep/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -43,7 +43,7 @@ MLINKS+=grep.1 zgrep.1 grep.1 zegrep.1 g .endif gnugrep.1: grep.1 - cp ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} check: all @failed=0; total=0; \ Modified: head/kerberos5/lib/libasn1/Makefile ============================================================================== --- head/kerberos5/lib/libasn1/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libasn1/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -111,10 +111,10 @@ ${GEN_KX509}: kx509.asn1 .SUFFIXES: .h .c .x .hx .x.c: - cp -f ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp -f ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libgssapi_spnego/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -45,10 +45,10 @@ ${GEN}: spnego.asn1 spnego.opt .SUFFIXES: .h .c .x .hx .x.c: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libhdb/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -91,10 +91,10 @@ ${GEN}: hdb.asn1 .SUFFIXES: .h .c .x .hx .x.c: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/kerberos5/lib/libhx509/Makefile ============================================================================== --- head/kerberos5/lib/libhx509/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libhx509/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -285,10 +285,10 @@ ${GEN_CRMF}: crmf.asn1 .SUFFIXES: .h .c .x .hx .x.c: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/lib/libc/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -149,11 +149,11 @@ KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c libkern: libkern.gen libkern.${LIBC_ARCH} libkern.gen: ${KQSRCS} ${KSRCS} - cp -fp ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern + ${CP} ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern libkern.${LIBC_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) - cp -fp ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} + ${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif .if ${MK_SYSCALL_COMPAT} != "no" Modified: head/lib/libexpat/Makefile ============================================================================== --- head/lib/libexpat/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/lib/libexpat/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -28,6 +28,6 @@ bsdxml.h: expat.h > ${.TARGET} bsdxml_external.h: expat_external.h - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include Modified: head/lib/libunbound/Makefile ============================================================================== --- head/lib/libunbound/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/lib/libunbound/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -32,7 +32,7 @@ LIBADD= ssl crypto pthread # Misnamed file in upstream source configlexer.l: configlexer.lex - cp -fp ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} CLEANFILES+= configlexer.l # Symbol prefix for lex and yacc Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/secure/lib/libcrypto/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -400,7 +400,7 @@ opensslconf.h: opensslconf-x86.h .else opensslconf.h: opensslconf-${MACHINE_CPUARCH}.h .endif - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} OLDSYMLINKS+= libdes.a libdes.so libdes.so.3 libdes_p.a afterinstall: Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Jan 16 21:12:36 2015 (r277272) +++ head/share/mk/sys.mk Fri Jan 16 21:39:08 2015 (r277273) @@ -67,6 +67,11 @@ CTFFLAGS ?= -L VERSION CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge + +# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle +# read-only files as non-root by passing -f. +CP ?= cp -f + DTRACE ?= dtrace .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g Modified: head/tools/regression/execve/Makefile ============================================================================== --- head/tools/regression/execve/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/tools/regression/execve/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -14,7 +14,7 @@ all: ${PROG} goodaout ${TESTSCRIPTS} .for x in ${TESTSCRIPTS} ${x}: ${TD}/${x} - cp ${TD}/${x} . + ${CP} ${TD}/${x} . chmod +x ${x} .endfor Modified: head/tools/test/dtrace/Makefile ============================================================================== --- head/tools/test/dtrace/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/tools/test/dtrace/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -343,7 +343,7 @@ ${_f:T:S/c$/exe/} : ${_f} .for _f in ${ALL_TESTEXEFILES} ${_f:T} : ${_f} - cp -f ${_f} ${.TARGET} + ${CP} ${_f} ${.TARGET} chmod a+x ${.TARGET} .endfor Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.bin/grep/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -11,7 +11,7 @@ PROG= bsdgrep CLEANFILES+= bsdgrep.1 bsdgrep.1: grep.1 - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .endif SRCS= file.c grep.c queue.c util.c Modified: head/usr.bin/lex/Makefile ============================================================================== --- head/usr.bin/lex/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.bin/lex/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -51,7 +51,7 @@ bootstrap: ${GENFILES:S/^/init/g} @diff -I '^#line ' -I '\$$FreeBS[D]: .*\$$' -q \ ${.CURDIR}/init${_f} ${_f} 2> /dev/null || { \ echo "Bootstrapping ${_f}" ; \ - cp -f ${.CURDIR}/init${_f} ${_f} ; \ + ${CP} ${.CURDIR}/init${_f} ${_f} ; \ } .endfor Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.bin/make/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -115,6 +115,6 @@ CFLAGS+= -DDEFSHELLNAME=\"${MAKE_SHELL}\ PROG= fmake CLEANFILES+= fmake.1 fmake.1: make.1 - cp ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/mtree/Makefile ============================================================================== --- head/usr.sbin/mtree/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.sbin/mtree/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -16,6 +16,6 @@ LIBADD= md CLEANFILES+= fmtree.8 fmtree.8: mtree.8 - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 22:11:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBF37D8B; Fri, 16 Jan 2015 22:11:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A79B2755; Fri, 16 Jan 2015 22:11:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GMB3DK022716; Fri, 16 Jan 2015 22:11:03 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GMB34o022715; Fri, 16 Jan 2015 22:11:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501162211.t0GMB34o022715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 22:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277274 - head/secure/lib/libcrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 22:11:03 -0000 Author: jkim Date: Fri Jan 16 22:11:02 2015 New Revision: 277274 URL: https://svnweb.freebsd.org/changeset/base/277274 Log: Update buildinf.h to make SSLeay_version(3) little bit more useful. MFC after: 1 week Modified: head/secure/lib/libcrypto/Makefile Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Jan 16 21:39:08 2015 (r277273) +++ head/secure/lib/libcrypto/Makefile Fri Jan 16 22:11:02 2015 (r277274) @@ -390,9 +390,9 @@ CLEANFILES= buildinf.h opensslconf.h buildinf.h: ${.CURDIR}/Makefile ( echo "#ifndef MK1MF_BUILD"; \ - echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ - echo " #define CFLAGS \"$(CC)\""; \ - echo " #define PLATFORM \"FreeBSD-${MACHINE_ARCH}\""; \ + echo " /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */"; \ + echo " #define CFLAGS \"compiler: ${COMPILER_TYPE}\""; \ + echo " #define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ echo "#endif" ) > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 23:47:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5371837F; Fri, 16 Jan 2015 23:47:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F1C3123; Fri, 16 Jan 2015 23:47:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GNlhMd067199; Fri, 16 Jan 2015 23:47:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GNlhDK067198; Fri, 16 Jan 2015 23:47:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501162347.t0GNlhDK067198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 16 Jan 2015 23:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277275 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 23:47:43 -0000 Author: adrian Date: Fri Jan 16 23:47:42 2015 New Revision: 277275 URL: https://svnweb.freebsd.org/changeset/base/277275 Log: Add bluetooth MCI coexistence HAL methods - used for AR9462 and AR9565 NICs. It's found, amongst other things, in the Acer Chromebook (Intel) devices. Tested: * AR9462 (WB222) Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Jan 16 22:11:02 2015 (r277274) +++ head/sys/dev/ath/ath_hal/ah.h Fri Jan 16 23:47:42 2015 (r277275) @@ -1589,6 +1589,18 @@ struct ath_hal { void __ahdecl(*ah_btCoexDisable)(struct ath_hal *); int __ahdecl(*ah_btCoexEnable)(struct ath_hal *); + /* Bluetooth MCI methods */ + void __ahdecl(*ah_btMciSetup)(struct ath_hal *, + uint32_t, void *, uint16_t, uint32_t); + HAL_BOOL __ahdecl(*ah_btMciSendMessage)(struct ath_hal *, + uint8_t, uint32_t, uint32_t *, uint8_t, + HAL_BOOL, HAL_BOOL); + uint32_t __ahdecl(*ah_btMciGetInterrupt)(struct ath_hal *, + uint32_t *, uint32_t *); + uint32_t __ahdecl(*ah_btMciGetState)(struct ath_hal *, + uint32_t, uint32_t *); + void __ahdecl(*ah_btMciDetach)(struct ath_hal *); + /* LNA diversity configuration */ void __ahdecl(*ah_divLnaConfGet)(struct ath_hal *, HAL_ANT_COMB_CONFIG *); From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 23:48:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2ECBF4B8; Fri, 16 Jan 2015 23:48:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A438128; Fri, 16 Jan 2015 23:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GNmSqf067349; Fri, 16 Jan 2015 23:48:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GNmSqM067348; Fri, 16 Jan 2015 23:48:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501162348.t0GNmSqM067348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 16 Jan 2015 23:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277276 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 23:48:29 -0000 Author: adrian Date: Fri Jan 16 23:48:28 2015 New Revision: 277276 URL: https://svnweb.freebsd.org/changeset/base/277276 Log: Tie in the MCI bluetooth coexistence functions into the HAL. Tested: * AR9462 (WB222) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Jan 16 23:47:42 2015 (r277275) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Jan 16 23:48:28 2015 (r277276) @@ -249,6 +249,13 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_btCoexDisable = ar9300_bt_coex_disable; ah->ah_btCoexEnable = ar9300_bt_coex_enable; + /* MCI bluetooth functions */ + ah->ah_btMciSetup = ar9300_mci_setup; + ah->ah_btMciSendMessage = ar9300_mci_send_message; + ah->ah_btMciGetInterrupt = ar9300_mci_get_interrupt; + ah->ah_btMciGetState = ar9300_mci_state; + ah->ah_btMciDetach = ar9300_mci_detach; + /* LNA diversity functions */ ah->ah_divLnaConfGet = ar9300_ant_div_comb_get_config; ah->ah_divLnaConfSet = ar9300_ant_div_comb_set_config; From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 00:02:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CB4971E; Sat, 17 Jan 2015 00:02:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18641312; Sat, 17 Jan 2015 00:02:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H02In2076401; Sat, 17 Jan 2015 00:02:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H02IWf076399; Sat, 17 Jan 2015 00:02:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501170002.t0H02IWf076399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 00:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277277 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 00:02:19 -0000 Author: adrian Date: Sat Jan 17 00:02:18 2015 New Revision: 277277 URL: https://svnweb.freebsd.org/changeset/base/277277 Log: Until there's a full MCI implementation - just implement a placeholder MCI bluetooth coexistence method for WB222. The rest of MCI requires a bunch more work, including adding a DMA buffer for the MCI hardware to bounce messages in/out of and handling MCI interrupts. But the more important part here is telling the HAL the btcoex is enabled and MCI is in use so it configures the correct initial bluetooth parameters in the wireless NIC and configures things like bluetooth traffic weights and such. So, this at least gets the HAL to do some of the right things in configuring the inital bluetooth coexistence stuff, but doesn't actually do full btcoex. That'll take.. some effort. Tested: * AR9462 (WB222), STA mode Modified: head/sys/dev/ath/if_ath_btcoex.c Modified: head/sys/dev/ath/if_ath_btcoex.c ============================================================================== --- head/sys/dev/ath/if_ath_btcoex.c Fri Jan 16 23:48:28 2015 (r277276) +++ head/sys/dev/ath/if_ath_btcoex.c Sat Jan 17 00:02:18 2015 (r277277) @@ -188,6 +188,72 @@ ath_btcoex_cfg_wb225(struct ath_softc *s return (0); } +/* + * Initial AR9462 / (WB222) bluetooth coexistence settings, + * just for experimentation. + * + * Return 0 for OK; errno for error. + */ +static int +ath_btcoex_cfg_wb222(struct ath_softc *sc) +{ + HAL_BT_COEX_INFO btinfo; + HAL_BT_COEX_CONFIG btconfig; + struct ath_hal *ah = sc->sc_ah; + + if (! ath_hal_btcoex_supported(ah)) + return (EINVAL); + + bzero(&btinfo, sizeof(btinfo)); + bzero(&btconfig, sizeof(btconfig)); + + device_printf(sc->sc_dev, "Enabling WB222 BTCOEX\n"); + + btinfo.bt_module = HAL_BT_MODULE_JANUS; /* XXX not used? */ + btinfo.bt_coex_config = HAL_BT_COEX_CFG_MCI; + + /* + * MCI uses a completely different interface to speak + * to the bluetooth module - it's a command based + * thing over a serial line, rather than + * state pins to/from the bluetooth module. + * + * So, the GPIO configuration, polarity, etc + * doesn't matter on MCI devices; it's just + * completely ignored by the HAL. + */ + btinfo.bt_gpio_bt_active = 4; + btinfo.bt_gpio_bt_priority = 8; + btinfo.bt_gpio_wlan_active = 5; + + btinfo.bt_active_polarity = 1; /* XXX not used */ + btinfo.bt_single_ant = 0; /* 2 antenna on WB222 */ + btinfo.bt_isolation = 0; /* in dB, not used */ + + ath_hal_btcoex_set_info(ah, &btinfo); + + btconfig.bt_time_extend = 0; + btconfig.bt_txstate_extend = 1; /* true */ + btconfig.bt_txframe_extend = 1; /* true */ + btconfig.bt_mode = HAL_BT_COEX_MODE_SLOTTED; + btconfig.bt_quiet_collision = 1; /* true */ + btconfig.bt_rxclear_polarity = 1; /* true */ + btconfig.bt_priority_time = 2; + btconfig.bt_first_slot_time = 5; + btconfig.bt_hold_rxclear = 1; /* true */ + + ath_hal_btcoex_set_config(ah, &btconfig); + + /* + * Enable antenna diversity. + */ + ath_hal_btcoex_set_parameter(ah, HAL_BT_COEX_ANTENNA_DIVERSITY, 1); + + return (0); +} + + + #if 0 /* @@ -243,6 +309,8 @@ ath_btcoex_attach(struct ath_softc *sc) if (strncmp(profname, "wb195", 5) == 0) { ret = ath_btcoex_cfg_wb195(sc); + } else if (strncmp(profname, "wb222", 5) == 0) { + ret = ath_btcoex_cfg_wb222(sc); } else if (strncmp(profname, "wb225", 5) == 0) { ret = ath_btcoex_cfg_wb225(sc); } else { From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 00:10:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 310219B4 for ; Sat, 17 Jan 2015 00:10:18 +0000 (UTC) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EBCD038A for ; Sat, 17 Jan 2015 00:10:17 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id eu11so27143480pac.11 for ; Fri, 16 Jan 2015 16:10:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=F6v26aOduvnHygKHj1bSRgoPPYq/jQ3d2nX5PpUVdgY=; b=Xv4Ylu6LSNxP3JY6cNFVnZUQXqZJ5HEj7TP/PI3R+5Arm1IhrE1OLgA+nWBv2G80Hq 4zfZ2umzemwJbFJiBOXUWfinoMyeXjfkxX0kz840NzSVIM4R/72WNZ6eWcmWQ2JN+VjR FJQQ1ue0R1TAN1Ftc0NM4YSRBGT9posjzF0JeXVlQDw7Gf7gpDBwvk3vnV9L6zkQRVt2 X5DPqNGeifxM8ImfRn0VHYMwieX1dPuw6gIZB9Oz1KxHC+0MOCF589vuqaIthQzEoAZc 3xDrRt3qbXLdRxwHKbBpXKO9hVVF+K67Prf7ALmtO0lwzpu2XTUIiK8AVUo8paKbkBZr Cd3Q== X-Gm-Message-State: ALoCoQm7nu/df2JpoPWQwKw9KrBZM8MXEq3PFPn+/Wd8nrQsXiXu9iIggFCpj2m2hCdK2CWGpS2g X-Received: by 10.66.170.208 with SMTP id ao16mr26716991pac.1.1421453416756; Fri, 16 Jan 2015 16:10:16 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id wm1sm5130877pac.11.2015.01.16.16.10.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 16:10:16 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115142725.GA20964@FreeBSD.org> Date: Fri, 16 Jan 2015 17:10:13 -0700 Message-Id: <0BB1A79B-F679-4D9B-9547-5B53926294E9@bsdimp.com> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1993) Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 00:10:18 -0000 --Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 7:27 AM, Alexey Dokuchaev = wrote: >=20 > On Sun, Sep 08, 2013 at 01:02:44AM +0400, Slawa Olhovchenkov wrote: >> On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a = wrote: >>>> I'll be happy if someone does this right now, by populating a >>>> /boot/loader.modules or something, and then force the "fixing" of >>>> loader to cache metadata to make the reads faster. >>>=20 >>> I have no idea on what's the loader(8) state right now, but long = time >>> ago I've made a patch that made it significantly faster by making >>> caching actually work. No idea if anyone picked up the patch >>> (http://people.freebsd.org/~trasz/fast-loader-3.diff), though. >>=20 >> Some time ago Andrey V. Elsukov do improvement in loader for more >> efficient caching and partition handling. Now loader load a lot of >> modules faster. I am insert hist in CC: list. >=20 > It's kind of funny we seem to have similar discussion happening right = now > again -- sixteen months later. >=20 > Edward, Andrey, since you two seem to have some working code already, = maybe > you can work together to push out something that can be committed? :) Orthogonal to these issues, I=E2=80=99m improving the loader to = (optionally) load any drivers for storage-class devices it finds on the PCI / PCIe bus. I=E2=80=99m = augmenting /boot/$KERNEL/linker.hints with some additional data so /boot/loader = knows what to load. Warner --Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuahlAAoJEGwc0Sh9sBEAhZwP/0SaPG3YETs9pRme6RHa6Iy/ PMi1FT5M/BoZlIHJCHh9nMAvm226OhCzt7Qh6h74noy0mZVCMarWXZ6fw9PywrYR zUZoMRF00qpmHLp4/1UyuP9IP0iLnAdUJ8QHgtA6bTZvLd53BrltikAPHHInjNEH N6UHLxCsyM3rgffeykh3iT+mKOlvNqs8+IN80DLRAGX/HiLkblS1qsTsLNRJSDmH GoyX9MPfxkFcLAleDYeUVURxLXZurj+j61emlN4CG9nMh9QGh+Y6zpKaS+7rUCf4 Yif/sqXDWxLtH+xaBeHY8sctrJBekHYMfsiXJqldtqFd2oKn2FxWbLKT/VQWo1xd YAVD5rjNTkgCNgJsNzHRyrJWWsv8lUAzmnPQ1q/EN7qQPtAymPhXG5Kh4l2bZEpu QMXrQs0zEmabTSkZjZtEGXQOnP6i1e6eg6GDYR8YG7AtSCNMCo3SM/OHFncNq6XM cRdUCMUIPA/WLET2gOXMLMf5ikZaEA1EO2W5lDhVTOYeiNWWQuVMuVewrDLCpUG6 T1EzP5LDetIBwmQVcTs/JpUD52HLHFo3AgfWhLPX3RpCiA4cqjFP7WvRPMdQM8Iz adxP+xNFN0S4uw2WbDuTV8UIPTUcC30f2hcklBhFWOXiPs6crOSbhJzs6qxsT1cJ gOZZJZHyR2ZcIcMoJiDk =VVMf -----END PGP SIGNATURE----- --Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 00:58:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9E301F6; Sat, 17 Jan 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5A9DA39; Sat, 17 Jan 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H0wPIU001024; Sat, 17 Jan 2015 00:58:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H0wPHF001023; Sat, 17 Jan 2015 00:58:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501170058.t0H0wPHF001023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Jan 2015 00:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277278 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 00:58:25 -0000 Author: ngie Date: Sat Jan 17 00:58:24 2015 New Revision: 277278 URL: https://svnweb.freebsd.org/changeset/base/277278 Log: Fix lib/libthr/tests/detach_test - Eliminate race with liberal use of sleep(3) [1] - Fix NetBSD-specific implementation way of testing result from pthread_cancel by testing with `td` instead of `NULL` [2] PR: 196738 [1] PR: 191906 [2] MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sat Jan 17 00:02:18 2015 (r277277) +++ head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sat Jan 17 00:58:24 2015 (r277278) @@ -38,11 +38,18 @@ __RCSID("$NetBSD: t_detach.c,v 1.1 2011/ #include "h_common.h" +#ifdef __FreeBSD__ +#include +#endif + static void *func(void *); static void * func(void *arg) { +#ifdef __FreeBSD__ + sleep(2); +#endif return NULL; } @@ -72,18 +79,25 @@ ATF_TC_BODY(pthread_detach, tc) */ PTHREAD_REQUIRE(pthread_detach(t)); +#ifdef __FreeBSD__ + sleep(1); +#endif rv = pthread_join(t, NULL); ATF_REQUIRE(rv == EINVAL); #ifdef __FreeBSD__ - atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH"); + sleep(3); #endif /* * As usual, ESRCH should follow if * we try to detach an invalid thread. */ +#ifdef __NetBSD__ rv = pthread_cancel(NULL); +#else + rv = pthread_cancel(t); +#endif ATF_REQUIRE(rv == ESRCH); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 01:16:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90ED0486; Sat, 17 Jan 2015 01:16:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C563BF1; Sat, 17 Jan 2015 01:16:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H1G4jr010278; Sat, 17 Jan 2015 01:16:04 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H1G4gc010277; Sat, 17 Jan 2015 01:16:04 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501170116.t0H1G4gc010277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 17 Jan 2015 01:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277279 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 01:16:04 -0000 Author: jamie Date: Sat Jan 17 01:16:03 2015 New Revision: 277279 URL: https://svnweb.freebsd.org/changeset/base/277279 Log: MFC r277158: Don't set prison's pr_ip4s or pr_ip6s to -1. PR: 196474 Modified: stable/10/sys/kern/kern_jail.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Sat Jan 17 00:58:24 2015 (r277278) +++ stable/10/sys/kern/kern_jail.c Sat Jan 17 01:16:03 2015 (r277279) @@ -799,7 +799,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET error = vfs_getopt(opts, "ip4.addr", &op, &ip4s); if (error == ENOENT) - ip4s = (pr_flags & PR_IP4_DISABLE) ? 0 : -1; + ip4s = 0; else if (error != 0) goto done_free; else if (ip4s & (sizeof(*ip4) - 1)) { @@ -857,7 +857,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET6 error = vfs_getopt(opts, "ip6.addr", &op, &ip6s); if (error == ENOENT) - ip6s = (pr_flags & PR_IP6_DISABLE) ? 0 : -1; + ip6s = 0; else if (error != 0) goto done_free; else if (ip6s & (sizeof(*ip6) - 1)) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 01:16:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BED2A5B7; Sat, 17 Jan 2015 01:16:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA343BF9; Sat, 17 Jan 2015 01:16:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H1GPYX010378; Sat, 17 Jan 2015 01:16:25 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H1GP5m010377; Sat, 17 Jan 2015 01:16:25 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501170116.t0H1GP5m010377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 17 Jan 2015 01:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277280 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 01:16:25 -0000 Author: jamie Date: Sat Jan 17 01:16:24 2015 New Revision: 277280 URL: https://svnweb.freebsd.org/changeset/base/277280 Log: MFC r277158: Don't set prison's pr_ip4s or pr_ip6s to -1. PR: 196474 Modified: stable/9/sys/kern/kern_jail.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Sat Jan 17 01:16:03 2015 (r277279) +++ stable/9/sys/kern/kern_jail.c Sat Jan 17 01:16:24 2015 (r277280) @@ -797,7 +797,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET error = vfs_getopt(opts, "ip4.addr", &op, &ip4s); if (error == ENOENT) - ip4s = (pr_flags & PR_IP4_DISABLE) ? 0 : -1; + ip4s = 0; else if (error != 0) goto done_free; else if (ip4s & (sizeof(*ip4) - 1)) { @@ -855,7 +855,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET6 error = vfs_getopt(opts, "ip6.addr", &op, &ip6s); if (error == ENOENT) - ip6s = (pr_flags & PR_IP6_DISABLE) ? 0 : -1; + ip6s = 0; else if (error != 0) goto done_free; else if (ip6s & (sizeof(*ip6) - 1)) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 01:20:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2FDC834; Sat, 17 Jan 2015 01:20:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD8A7C37; Sat, 17 Jan 2015 01:20:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H1KTxH013602; Sat, 17 Jan 2015 01:20:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H1KScX013410; Sat, 17 Jan 2015 01:20:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501170120.t0H1KScX013410@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 17 Jan 2015 01:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277281 - stable/10/contrib/tcp_wrappers X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 01:20:29 -0000 Author: pfg Date: Sat Jan 17 01:20:28 2015 New Revision: 277281 URL: https://svnweb.freebsd.org/changeset/base/277281 Log: MFC r272947, r272950: tcpd: complete function prototypes. tcpd.h: add prototype for hosts_ctl This clears up at least a build issues on mysql-server ports. While here also replace some spaces with tabs in our headers. PR: 32808 PR: 42336 Modified: stable/10/contrib/tcp_wrappers/inetcf.h stable/10/contrib/tcp_wrappers/mystdarg.h stable/10/contrib/tcp_wrappers/tcpd.h stable/10/contrib/tcp_wrappers/tli-sequent.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tcp_wrappers/inetcf.h ============================================================================== --- stable/10/contrib/tcp_wrappers/inetcf.h Sat Jan 17 01:16:24 2015 (r277280) +++ stable/10/contrib/tcp_wrappers/inetcf.h Sat Jan 17 01:20:28 2015 (r277281) @@ -8,7 +8,7 @@ extern char *inet_cfg(); /* read inetd. extern void inet_set(); /* remember internet service */ extern int inet_get(); /* look up internet service */ -#define WR_UNKNOWN (-1) /* service unknown */ -#define WR_NOT 1 /* may not be wrapped */ -#define WR_MAYBE 2 /* may be wrapped */ +#define WR_UNKNOWN (-1) /* service unknown */ +#define WR_NOT 1 /* may not be wrapped */ +#define WR_MAYBE 2 /* may be wrapped */ #define WR_YES 3 /* service is wrapped */ Modified: stable/10/contrib/tcp_wrappers/mystdarg.h ============================================================================== --- stable/10/contrib/tcp_wrappers/mystdarg.h Sat Jan 17 01:16:24 2015 (r277280) +++ stable/10/contrib/tcp_wrappers/mystdarg.h Sat Jan 17 01:20:28 2015 (r277281) @@ -6,14 +6,14 @@ #ifdef __STDC__ #include -#define VARARGS(func,type,arg) func(type arg, ...) -#define VASTART(ap,type,name) va_start(ap,name) -#define VAEND(ap) va_end(ap) +#define VARARGS(func,type,arg) func(type arg, ...) +#define VASTART(ap,type,name) va_start(ap,name) +#define VAEND(ap) va_end(ap) #else #include -#define VARARGS(func,type,arg) func(va_alist) va_dcl -#define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type) -#define VAEND(ap) va_end(ap);} +#define VARARGS(func,type,arg) func(va_alist) va_dcl +#define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type) +#define VAEND(ap) va_end(ap);} #endif extern char *percent_m(); Modified: stable/10/contrib/tcp_wrappers/tcpd.h ============================================================================== --- stable/10/contrib/tcp_wrappers/tcpd.h Sat Jan 17 01:16:24 2015 (r277280) +++ stable/10/contrib/tcp_wrappers/tcpd.h Sat Jan 17 01:20:28 2015 (r277281) @@ -8,7 +8,7 @@ /* Structure to describe one communications endpoint. */ -#define STRING_LENGTH 128 /* hosts, users, processes */ +#define STRING_LENGTH 128 /* hosts, users, processes */ struct host_info { char name[STRING_LENGTH]; /* access via eval_hostname(host) */ @@ -31,21 +31,21 @@ struct request_info { char pid[10]; /* access via eval_pid(request) */ struct host_info client[1]; /* client endpoint info */ struct host_info server[1]; /* server endpoint info */ - void (*sink) (); /* datagram sink function or 0 */ - void (*hostname) (); /* address to printable hostname */ - void (*hostaddr) (); /* address to printable address */ - void (*cleanup) (); /* cleanup function or 0 */ + void (*sink) (int); /* datagram sink function or 0 */ + void (*hostname) (struct host_info *); /* address to printable hostname */ + void (*hostaddr) (struct host_info *); /* address to printable address */ + void (*cleanup) (struct request_info *); /* cleanup function or 0 */ struct netconfig *config; /* netdir handle */ }; /* Common string operations. Less clutter should be more readable. */ -#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; } +#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; } -#define STRN_EQ(x,y,l) (strncasecmp((x),(y),(l)) == 0) -#define STRN_NE(x,y,l) (strncasecmp((x),(y),(l)) != 0) -#define STR_EQ(x,y) (strcasecmp((x),(y)) == 0) -#define STR_NE(x,y) (strcasecmp((x),(y)) != 0) +#define STRN_EQ(x,y,l) (strncasecmp((x),(y),(l)) == 0) +#define STRN_NE(x,y,l) (strncasecmp((x),(y),(l)) != 0) +#define STR_EQ(x,y) (strcasecmp((x),(y)) == 0) +#define STR_NE(x,y) (strcasecmp((x),(y)) != 0) /* * Initially, all above strings have the empty value. Information that @@ -54,25 +54,26 @@ struct request_info { * that we do not believe in is set to "paranoid". */ -#define STRING_UNKNOWN "unknown" /* lookup failed */ -#define STRING_PARANOID "paranoid" /* hostname conflict */ +#define STRING_UNKNOWN "unknown" /* lookup failed */ +#define STRING_PARANOID "paranoid" /* hostname conflict */ extern char unknown[]; extern char paranoid[]; -#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid)) +#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid)) -#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0) +#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0) /* Global functions. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) extern void fromhost(); /* get/validate client host info */ #else -#define fromhost sock_host /* no TLI support needed */ +#define fromhost sock_host /* no TLI support needed */ #endif extern int hosts_access(); /* access control */ +extern int hosts_ctl(); /* wrapper around request_init() */ extern void shell_cmd(); /* execute shell command */ extern char *percent_x(); /* do % expansion */ extern void rfc931(); /* client name from RFC 931 daemon */ @@ -105,15 +106,15 @@ extern struct request_info *request_init extern struct request_info *request_set(); /* update request structure */ #endif -#define RQ_FILE 1 /* file descriptor */ -#define RQ_DAEMON 2 /* server process (argv[0]) */ -#define RQ_USER 3 /* client user name */ -#define RQ_CLIENT_NAME 4 /* client host name */ -#define RQ_CLIENT_ADDR 5 /* client host address */ -#define RQ_CLIENT_SIN 6 /* client endpoint (internal) */ -#define RQ_SERVER_NAME 7 /* server host name */ -#define RQ_SERVER_ADDR 8 /* server host address */ -#define RQ_SERVER_SIN 9 /* server endpoint (internal) */ +#define RQ_FILE 1 /* file descriptor */ +#define RQ_DAEMON 2 /* server process (argv[0]) */ +#define RQ_USER 3 /* client user name */ +#define RQ_CLIENT_NAME 4 /* client host name */ +#define RQ_CLIENT_ADDR 5 /* client host address */ +#define RQ_CLIENT_SIN 6 /* client endpoint (internal) */ +#define RQ_SERVER_NAME 7 /* server host name */ +#define RQ_SERVER_ADDR 8 /* server host address */ +#define RQ_SERVER_SIN 9 /* server endpoint (internal) */ /* * Routines for delayed evaluation of request attributes. Each attribute @@ -129,15 +130,15 @@ extern char *eval_hostaddr(); /* printa extern char *eval_hostinfo(); /* host name or address */ extern char *eval_client(); /* whatever is available */ extern char *eval_server(); /* whatever is available */ -#define eval_daemon(r) ((r)->daemon) /* daemon process name */ -#define eval_pid(r) ((r)->pid) /* process id */ +#define eval_daemon(r) ((r)->daemon) /* daemon process name */ +#define eval_pid(r) ((r)->pid) /* process id */ /* Socket-specific methods, including DNS hostname lookups. */ extern void sock_host(); /* look up endpoint addresses */ extern void sock_hostname(); /* translate address to hostname */ extern void sock_hostaddr(); /* address to printable address */ -#define sock_methods(r) \ +#define sock_methods(r) \ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } /* The System V Transport-Level Interface (TLI) interface. */ @@ -173,9 +174,9 @@ extern struct tcpd_context tcpd_context; * (-1) returns are here because zero is already taken by longjmp(). */ -#define AC_PERMIT 1 /* permit access */ -#define AC_DENY (-1) /* deny_access */ -#define AC_ERROR AC_DENY /* XXX */ +#define AC_PERMIT 1 /* permit access */ +#define AC_DENY (-1) /* deny_access */ +#define AC_ERROR AC_DENY /* XXX */ /* * In verification mode an option function should just say what it would do, @@ -190,36 +191,36 @@ extern int dry_run; /* verification fl /* Bug workarounds. */ #ifdef INET_ADDR_BUG /* inet_addr() returns struct */ -#define inet_addr fix_inet_addr +#define inet_addr fix_inet_addr extern long fix_inet_addr(); #endif #ifdef BROKEN_FGETS /* partial reads from sockets */ -#define fgets fix_fgets +#define fgets fix_fgets extern char *fix_fgets(); #endif #ifdef RECVFROM_BUG /* no address family info */ -#define recvfrom fix_recvfrom +#define recvfrom fix_recvfrom extern int fix_recvfrom(); #endif #ifdef GETPEERNAME_BUG /* claims success with UDP */ -#define getpeername fix_getpeername +#define getpeername fix_getpeername extern int fix_getpeername(); #endif #ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */ -#define gethostbyname fix_gethostbyname +#define gethostbyname fix_gethostbyname extern struct hostent *fix_gethostbyname(); #endif #ifdef USE_STRSEP /* libc calls strtok() */ -#define strtok fix_strtok +#define strtok fix_strtok extern char *fix_strtok(); #endif #ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */ -#define strtok my_strtok +#define strtok my_strtok extern char *my_strtok(); #endif Modified: stable/10/contrib/tcp_wrappers/tli-sequent.h ============================================================================== --- stable/10/contrib/tcp_wrappers/tli-sequent.h Sat Jan 17 01:16:24 2015 (r277280) +++ stable/10/contrib/tcp_wrappers/tli-sequent.h Sat Jan 17 01:20:28 2015 (r277281) @@ -1,7 +1,7 @@ #ifdef __STDC__ -#define __P(X) X +#define __P(X) X #else -#define __P(X) () +#define __P(X) () #endif extern int t_sync __P((int)); From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 01:21:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06DDF9D4; Sat, 17 Jan 2015 01:21:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5930CDB; Sat, 17 Jan 2015 01:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H1LVUX014959; Sat, 17 Jan 2015 01:21:31 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H1LUd4014955; Sat, 17 Jan 2015 01:21:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501170121.t0H1LUd4014955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 17 Jan 2015 01:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277282 - stable/9/contrib/tcp_wrappers X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 01:21:32 -0000 Author: pfg Date: Sat Jan 17 01:21:30 2015 New Revision: 277282 URL: https://svnweb.freebsd.org/changeset/base/277282 Log: MFC r272947, r272950: tcpd: complete function prototypes. tcpd.h: add prototype for hosts_ctl This clears up at least a build issues on mysql-server ports. While here also replace some spaces with tabs in our headers. PR: 32808 PR: 42336 Modified: stable/9/contrib/tcp_wrappers/inetcf.h stable/9/contrib/tcp_wrappers/mystdarg.h stable/9/contrib/tcp_wrappers/tcpd.h stable/9/contrib/tcp_wrappers/tli-sequent.h Modified: stable/9/contrib/tcp_wrappers/inetcf.h ============================================================================== --- stable/9/contrib/tcp_wrappers/inetcf.h Sat Jan 17 01:20:28 2015 (r277281) +++ stable/9/contrib/tcp_wrappers/inetcf.h Sat Jan 17 01:21:30 2015 (r277282) @@ -8,7 +8,7 @@ extern char *inet_cfg(); /* read inetd. extern void inet_set(); /* remember internet service */ extern int inet_get(); /* look up internet service */ -#define WR_UNKNOWN (-1) /* service unknown */ -#define WR_NOT 1 /* may not be wrapped */ -#define WR_MAYBE 2 /* may be wrapped */ +#define WR_UNKNOWN (-1) /* service unknown */ +#define WR_NOT 1 /* may not be wrapped */ +#define WR_MAYBE 2 /* may be wrapped */ #define WR_YES 3 /* service is wrapped */ Modified: stable/9/contrib/tcp_wrappers/mystdarg.h ============================================================================== --- stable/9/contrib/tcp_wrappers/mystdarg.h Sat Jan 17 01:20:28 2015 (r277281) +++ stable/9/contrib/tcp_wrappers/mystdarg.h Sat Jan 17 01:21:30 2015 (r277282) @@ -6,14 +6,14 @@ #ifdef __STDC__ #include -#define VARARGS(func,type,arg) func(type arg, ...) -#define VASTART(ap,type,name) va_start(ap,name) -#define VAEND(ap) va_end(ap) +#define VARARGS(func,type,arg) func(type arg, ...) +#define VASTART(ap,type,name) va_start(ap,name) +#define VAEND(ap) va_end(ap) #else #include -#define VARARGS(func,type,arg) func(va_alist) va_dcl -#define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type) -#define VAEND(ap) va_end(ap);} +#define VARARGS(func,type,arg) func(va_alist) va_dcl +#define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type) +#define VAEND(ap) va_end(ap);} #endif extern char *percent_m(); Modified: stable/9/contrib/tcp_wrappers/tcpd.h ============================================================================== --- stable/9/contrib/tcp_wrappers/tcpd.h Sat Jan 17 01:20:28 2015 (r277281) +++ stable/9/contrib/tcp_wrappers/tcpd.h Sat Jan 17 01:21:30 2015 (r277282) @@ -8,7 +8,7 @@ /* Structure to describe one communications endpoint. */ -#define STRING_LENGTH 128 /* hosts, users, processes */ +#define STRING_LENGTH 128 /* hosts, users, processes */ struct host_info { char name[STRING_LENGTH]; /* access via eval_hostname(host) */ @@ -31,21 +31,21 @@ struct request_info { char pid[10]; /* access via eval_pid(request) */ struct host_info client[1]; /* client endpoint info */ struct host_info server[1]; /* server endpoint info */ - void (*sink) (); /* datagram sink function or 0 */ - void (*hostname) (); /* address to printable hostname */ - void (*hostaddr) (); /* address to printable address */ - void (*cleanup) (); /* cleanup function or 0 */ + void (*sink) (int); /* datagram sink function or 0 */ + void (*hostname) (struct host_info *); /* address to printable hostname */ + void (*hostaddr) (struct host_info *); /* address to printable address */ + void (*cleanup) (struct request_info *); /* cleanup function or 0 */ struct netconfig *config; /* netdir handle */ }; /* Common string operations. Less clutter should be more readable. */ -#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; } +#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; } -#define STRN_EQ(x,y,l) (strncasecmp((x),(y),(l)) == 0) -#define STRN_NE(x,y,l) (strncasecmp((x),(y),(l)) != 0) -#define STR_EQ(x,y) (strcasecmp((x),(y)) == 0) -#define STR_NE(x,y) (strcasecmp((x),(y)) != 0) +#define STRN_EQ(x,y,l) (strncasecmp((x),(y),(l)) == 0) +#define STRN_NE(x,y,l) (strncasecmp((x),(y),(l)) != 0) +#define STR_EQ(x,y) (strcasecmp((x),(y)) == 0) +#define STR_NE(x,y) (strcasecmp((x),(y)) != 0) /* * Initially, all above strings have the empty value. Information that @@ -54,25 +54,26 @@ struct request_info { * that we do not believe in is set to "paranoid". */ -#define STRING_UNKNOWN "unknown" /* lookup failed */ -#define STRING_PARANOID "paranoid" /* hostname conflict */ +#define STRING_UNKNOWN "unknown" /* lookup failed */ +#define STRING_PARANOID "paranoid" /* hostname conflict */ extern char unknown[]; extern char paranoid[]; -#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid)) +#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid)) -#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0) +#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0) /* Global functions. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) extern void fromhost(); /* get/validate client host info */ #else -#define fromhost sock_host /* no TLI support needed */ +#define fromhost sock_host /* no TLI support needed */ #endif extern int hosts_access(); /* access control */ +extern int hosts_ctl(); /* wrapper around request_init() */ extern void shell_cmd(); /* execute shell command */ extern char *percent_x(); /* do % expansion */ extern void rfc931(); /* client name from RFC 931 daemon */ @@ -105,15 +106,15 @@ extern struct request_info *request_init extern struct request_info *request_set(); /* update request structure */ #endif -#define RQ_FILE 1 /* file descriptor */ -#define RQ_DAEMON 2 /* server process (argv[0]) */ -#define RQ_USER 3 /* client user name */ -#define RQ_CLIENT_NAME 4 /* client host name */ -#define RQ_CLIENT_ADDR 5 /* client host address */ -#define RQ_CLIENT_SIN 6 /* client endpoint (internal) */ -#define RQ_SERVER_NAME 7 /* server host name */ -#define RQ_SERVER_ADDR 8 /* server host address */ -#define RQ_SERVER_SIN 9 /* server endpoint (internal) */ +#define RQ_FILE 1 /* file descriptor */ +#define RQ_DAEMON 2 /* server process (argv[0]) */ +#define RQ_USER 3 /* client user name */ +#define RQ_CLIENT_NAME 4 /* client host name */ +#define RQ_CLIENT_ADDR 5 /* client host address */ +#define RQ_CLIENT_SIN 6 /* client endpoint (internal) */ +#define RQ_SERVER_NAME 7 /* server host name */ +#define RQ_SERVER_ADDR 8 /* server host address */ +#define RQ_SERVER_SIN 9 /* server endpoint (internal) */ /* * Routines for delayed evaluation of request attributes. Each attribute @@ -129,15 +130,15 @@ extern char *eval_hostaddr(); /* printa extern char *eval_hostinfo(); /* host name or address */ extern char *eval_client(); /* whatever is available */ extern char *eval_server(); /* whatever is available */ -#define eval_daemon(r) ((r)->daemon) /* daemon process name */ -#define eval_pid(r) ((r)->pid) /* process id */ +#define eval_daemon(r) ((r)->daemon) /* daemon process name */ +#define eval_pid(r) ((r)->pid) /* process id */ /* Socket-specific methods, including DNS hostname lookups. */ extern void sock_host(); /* look up endpoint addresses */ extern void sock_hostname(); /* translate address to hostname */ extern void sock_hostaddr(); /* address to printable address */ -#define sock_methods(r) \ +#define sock_methods(r) \ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } /* The System V Transport-Level Interface (TLI) interface. */ @@ -173,9 +174,9 @@ extern struct tcpd_context tcpd_context; * (-1) returns are here because zero is already taken by longjmp(). */ -#define AC_PERMIT 1 /* permit access */ -#define AC_DENY (-1) /* deny_access */ -#define AC_ERROR AC_DENY /* XXX */ +#define AC_PERMIT 1 /* permit access */ +#define AC_DENY (-1) /* deny_access */ +#define AC_ERROR AC_DENY /* XXX */ /* * In verification mode an option function should just say what it would do, @@ -190,36 +191,36 @@ extern int dry_run; /* verification fl /* Bug workarounds. */ #ifdef INET_ADDR_BUG /* inet_addr() returns struct */ -#define inet_addr fix_inet_addr +#define inet_addr fix_inet_addr extern long fix_inet_addr(); #endif #ifdef BROKEN_FGETS /* partial reads from sockets */ -#define fgets fix_fgets +#define fgets fix_fgets extern char *fix_fgets(); #endif #ifdef RECVFROM_BUG /* no address family info */ -#define recvfrom fix_recvfrom +#define recvfrom fix_recvfrom extern int fix_recvfrom(); #endif #ifdef GETPEERNAME_BUG /* claims success with UDP */ -#define getpeername fix_getpeername +#define getpeername fix_getpeername extern int fix_getpeername(); #endif #ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */ -#define gethostbyname fix_gethostbyname +#define gethostbyname fix_gethostbyname extern struct hostent *fix_gethostbyname(); #endif #ifdef USE_STRSEP /* libc calls strtok() */ -#define strtok fix_strtok +#define strtok fix_strtok extern char *fix_strtok(); #endif #ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */ -#define strtok my_strtok +#define strtok my_strtok extern char *my_strtok(); #endif Modified: stable/9/contrib/tcp_wrappers/tli-sequent.h ============================================================================== --- stable/9/contrib/tcp_wrappers/tli-sequent.h Sat Jan 17 01:20:28 2015 (r277281) +++ stable/9/contrib/tcp_wrappers/tli-sequent.h Sat Jan 17 01:21:30 2015 (r277282) @@ -1,7 +1,7 @@ #ifdef __STDC__ -#define __P(X) X +#define __P(X) X #else -#define __P(X) () +#define __P(X) () #endif extern int t_sync __P((int)); From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 02:17:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBFC188F; Sat, 17 Jan 2015 02:17:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8879211; Sat, 17 Jan 2015 02:17:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H2Hu2x038756; Sat, 17 Jan 2015 02:17:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H2HufT038755; Sat, 17 Jan 2015 02:17:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501170217.t0H2HufT038755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Jan 2015 02:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277283 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 02:17:56 -0000 Author: imp Date: Sat Jan 17 02:17:55 2015 New Revision: 277283 URL: https://svnweb.freebsd.org/changeset/base/277283 Log: The sn driver isn't UCODE sourceless. While it is true there's an binary FPGA image that's in an include file in this directory, that include file isn't actually used. It is only for certain Trump Cards that we don't yet support. When support was anticipated for them, we got permission to include the required FPGA image in our sources under the BSDL, but didn't start actually including the file. This was done to provide a public paper trail for this file. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jan 17 01:21:30 2015 (r277282) +++ head/sys/modules/Makefile Sat Jan 17 02:17:55 2015 (r277283) @@ -317,7 +317,7 @@ SUBDIR= \ sis \ sk \ ${_smbfs} \ - ${_sn} \ + sn \ ${_snc} \ snp \ ${_sound} \ @@ -438,7 +438,6 @@ _ispfw= ispfw _mwlfw= mwlfw _ralfw= ralfw _sf= sf -_sn= sn _ti= ti _txp= txp .endif From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 02:18:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAE6EAC5; Sat, 17 Jan 2015 02:18:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C81BF214; Sat, 17 Jan 2015 02:18:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H2I0Tl038858; Sat, 17 Jan 2015 02:18:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H2I0AW038857; Sat, 17 Jan 2015 02:18:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501170218.t0H2I0AW038857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Jan 2015 02:18:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277285 - head/sys/x86/isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 02:18:01 -0000 Author: imp Date: Sat Jan 17 02:17:59 2015 New Revision: 277285 URL: https://svnweb.freebsd.org/changeset/base/277285 Log: Need to include opt_mca.h to test for DEV_MCA. Modified: head/sys/x86/isa/atpic.c Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 (r277284) +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 (r277285) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_auto_eoi.h" #include "opt_isa.h" +#include "opt_mca.h" #include #include From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 02:17:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D30D4978; Sat, 17 Jan 2015 02:17:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFD27212; Sat, 17 Jan 2015 02:17:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H2Hw3L038806; Sat, 17 Jan 2015 02:17:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H2Hw0d038805; Sat, 17 Jan 2015 02:17:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501170217.t0H2Hw0d038805@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Jan 2015 02:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277284 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 02:17:58 -0000 Author: imp Date: Sat Jan 17 02:17:57 2015 New Revision: 277284 URL: https://svnweb.freebsd.org/changeset/base/277284 Log: Move DEV_ entries scattered to their common section. Add DEV_PCI. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 17 02:17:55 2015 (r277283) +++ head/sys/conf/options Sat Jan 17 02:17:57 2015 (r277284) @@ -396,11 +396,6 @@ BOOTP_NFSROOT opt_bootp.h BOOTP_NFSV3 opt_bootp.h BOOTP_WIRED_TO opt_bootp.h DEVICE_POLLING -DEV_ENC opt_enc.h -DEV_PF opt_pf.h -DEV_PFLOG opt_pf.h -DEV_PFSYNC opt_pf.h -DEV_VLAN opt_vlan.h DUMMYNET opt_ipdn.h INET opt_inet.h INET6 opt_inet6.h @@ -698,10 +693,16 @@ ISAPNP opt_isa.h # various 'device presence' options. DEV_BPF opt_bpf.h -DEV_NETMAP opt_global.h -DEV_MCA opt_mca.h DEV_CARP opt_carp.h +DEV_ENC opt_enc.h +DEV_MCA opt_mca.h +DEV_NETMAP opt_global.h +DEV_PCI opt_pci.h +DEV_PF opt_pf.h +DEV_PFLOG opt_pf.h +DEV_PFSYNC opt_pf.h DEV_SPLASH opt_splash.h +DEV_VLAN opt_vlan.h # EISA support DEV_EISA opt_eisa.h From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 06:17:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 614FD119; Sat, 17 Jan 2015 06:17:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CAEFC6D; Sat, 17 Jan 2015 06:17:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H6HtLn049522; Sat, 17 Jan 2015 06:17:55 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H6HtEG049521; Sat, 17 Jan 2015 06:17:55 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501170617.t0H6HtEG049521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 17 Jan 2015 06:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277286 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 06:17:55 -0000 Author: dchagin Date: Sat Jan 17 06:17:54 2015 New Revision: 277286 URL: https://svnweb.freebsd.org/changeset/base/277286 Log: MFC r276906: Allow clock_getcpuclockid() on the CPU-time clock for zombie process. Posix does not prohibit this. Modified: stable/9/sys/kern/kern_time.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_time.c ============================================================================== --- stable/9/sys/kern/kern_time.c Sat Jan 17 02:17:59 2015 (r277285) +++ stable/9/sys/kern/kern_time.c Sat Jan 17 06:17:54 2015 (r277286) @@ -199,13 +199,10 @@ kern_clock_getcpuclockid2(struct thread switch (which) { case CPUCLOCK_WHICH_PID: if (id != 0) { - p = pfind(id); - if (p == NULL) - return (ESRCH); - error = p_cansee(td, p); - PROC_UNLOCK(p); + error = pget(id, PGET_CANSEE | PGET_NOTID, &p); if (error != 0) return (error); + PROC_UNLOCK(p); pid = id; } else { pid = td->td_proc->p_pid; From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 06:18:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D00DF254; Sat, 17 Jan 2015 06:18:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB49AC79; Sat, 17 Jan 2015 06:18:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H6IkZw049672; Sat, 17 Jan 2015 06:18:46 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H6Ikrc049670; Sat, 17 Jan 2015 06:18:46 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501170618.t0H6Ikrc049670@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 17 Jan 2015 06:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277287 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 06:18:46 -0000 Author: dchagin Date: Sat Jan 17 06:18:45 2015 New Revision: 277287 URL: https://svnweb.freebsd.org/changeset/base/277287 Log: MFC r276906: Allow clock_getcpuclockid() on the CPU-time clock for zombie process. Posix does not prohibit this. Modified: stable/10/sys/kern/kern_time.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Sat Jan 17 06:17:54 2015 (r277286) +++ stable/10/sys/kern/kern_time.c Sat Jan 17 06:18:45 2015 (r277287) @@ -200,13 +200,10 @@ kern_clock_getcpuclockid2(struct thread switch (which) { case CPUCLOCK_WHICH_PID: if (id != 0) { - p = pfind(id); - if (p == NULL) - return (ESRCH); - error = p_cansee(td, p); - PROC_UNLOCK(p); + error = pget(id, PGET_CANSEE | PGET_NOTID, &p); if (error != 0) return (error); + PROC_UNLOCK(p); pid = id; } else { pid = td->td_proc->p_pid; From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 06:43:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D32474A2; Sat, 17 Jan 2015 06:43:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEAFFEAF; Sat, 17 Jan 2015 06:43:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H6hV52062863; Sat, 17 Jan 2015 06:43:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H6hVLm062862; Sat, 17 Jan 2015 06:43:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501170643.t0H6hVLm062862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 06:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277288 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 06:43:31 -0000 Author: adrian Date: Sat Jan 17 06:43:30 2015 New Revision: 277288 URL: https://svnweb.freebsd.org/changeset/base/277288 Log: Override the bt enable/disable methods for AR9462 (jupiter) and AR9565 (Aphrodite.) These need to use the MCI routines, not the legacy 2-wire / 3-wire bluetooth coexistence methods. Tested: * AR9462 (WB222); STA mode Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Jan 17 06:18:45 2015 (r277287) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Jan 17 06:43:30 2015 (r277288) @@ -250,6 +250,11 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_btCoexEnable = ar9300_bt_coex_enable; /* MCI bluetooth functions */ + if (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) { + ah->ah_btCoexSetWeights = ar9300_mci_bt_coex_set_weights; + ah->ah_btCoexDisable = ar9300_mci_bt_coex_disable; + ah->ah_btCoexEnable = ar9300_mci_bt_coex_enable; + } ah->ah_btMciSetup = ar9300_mci_setup; ah->ah_btMciSendMessage = ar9300_mci_send_message; ah->ah_btMciGetInterrupt = ar9300_mci_get_interrupt; From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 07:01:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B319B673; Sat, 17 Jan 2015 07:01:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EA79AD; Sat, 17 Jan 2015 07:01:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H71qEV071881; Sat, 17 Jan 2015 07:01:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H71qAB071880; Sat, 17 Jan 2015 07:01:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501170701.t0H71qAB071880@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 17 Jan 2015 07:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277289 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 07:01:52 -0000 Author: nwhitehorn Date: Sat Jan 17 07:01:51 2015 New Revision: 277289 URL: https://svnweb.freebsd.org/changeset/base/277289 Log: Return an appropriate error code in the case of a missing property rather than random numbers. MFC after: 1 week Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Sat Jan 17 06:43:30 2015 (r277288) +++ head/sys/dev/ofw/ofw_fdt.c Sat Jan 17 07:01:51 2015 (r277289) @@ -238,6 +238,9 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t return (sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp)); } + if (prop == NULL) + return (-1); + return (len); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 07:33:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B4FB92F; Sat, 17 Jan 2015 07:33:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27A16325; Sat, 17 Jan 2015 07:33:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H7X3Ar085647; Sat, 17 Jan 2015 07:33:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H7X3XI085646; Sat, 17 Jan 2015 07:33:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501170733.t0H7X3XI085646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 07:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277290 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 07:33:03 -0000 Author: adrian Date: Sat Jan 17 07:33:02 2015 New Revision: 277290 URL: https://svnweb.freebsd.org/changeset/base/277290 Log: Oops; correctly reload the CCA registers with the uncapped value in prep for the next NF calibration pass. Totally missing braces. Damn you C. Submitted by: Sascha Wildner MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sat Jan 17 07:01:51 2015 (r277289) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sat Jan 17 07:33:02 2015 (r277290) @@ -663,7 +663,7 @@ ar5416LoadNF(struct ath_hal *ah, const s * by the median we just loaded. This will be initial (and max) value * of next noise floor calibration the baseband does. */ - for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) + for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) { /* Don't write to EXT radio CCA registers unless in HT/40 mode */ /* XXX this check should really be cleaner! */ @@ -676,6 +676,7 @@ ar5416LoadNF(struct ath_hal *ah, const s val |= (((uint32_t)(-50) << 1) & 0x1ff); OS_REG_WRITE(ah, ar5416_cca_regs[i], val); } + } } /* From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 08:09:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD3DBF15; Sat, 17 Jan 2015 08:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 992A0813; Sat, 17 Jan 2015 08:09:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0H898ad099959; Sat, 17 Jan 2015 08:09:08 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H8980q099958; Sat, 17 Jan 2015 08:09:08 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201501170809.t0H8980q099958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Sat, 17 Jan 2015 08:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277291 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 08:09:08 -0000 Author: royger Date: Sat Jan 17 08:09:07 2015 New Revision: 277291 URL: https://svnweb.freebsd.org/changeset/base/277291 Log: loader: use correct types for parse_modmetadata Use the proper types in parse_modmetadata for the p_start and p_end parameters. This was causing problems in the ARM 32bit loader. Sponsored by: Citrix Systems R&D Reported and Tested by: ian Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sat Jan 17 07:33:02 2015 (r277290) +++ head/sys/boot/common/load_elf.c Sat Jan 17 08:09:07 2015 (r277291) @@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end); + Elf_Addr p_start, Elf_Addr p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file Elf_Size size; u_int fpcopy; Elf_Sym sym; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; dp = NULL; shdr = NULL; @@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloade Elf_Shdr *sh_data[2]; char *shstrtab = NULL; size_t size; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; bzero(&ef, sizeof(struct elf_file)); ef.fd = -1; @@ -820,7 +820,7 @@ out: int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end) + Elf_Addr p_start, Elf_Addr p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 08:19:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 964FD22F; Sat, 17 Jan 2015 08:19:13 +0000 (UTC) Date: Sat, 17 Jan 2015 08:19:13 +0000 From: Alexey Dokuchaev To: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150117081913.GA2064@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <54B7E21B.5080008@FreeBSD.org> <20150115162050.GA60729@FreeBSD.org> <5645C90D-2CC7-4517-8AD4-B238AF42AD51@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5645C90D-2CC7-4517-8AD4-B238AF42AD51@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 08:19:13 -0000 Among emails in this thread, Warner Losh wrote: [ so to avoid replying on per-email bases ] > (2) is the exact problem I'm working on. Since the design of that will > allow us to read from the kernel these modules, (1) becomes largely > irrelevant because the only /boot/loader incursion would be to load > drivers for any storage devices that are on the PCIe bus. ... > But you bring up a good point. i386 is easy, once the basics are done. > PowerPC is only slightly harder, since it has good /boot/loader support > as well as a GENERIC kernel or two. Ditto sparc64. But stepping into arm > and mips then all hell breaks loose. > > It's also desirable to refactor GENERIC, for the transition period, to be > include MINIMAL + more stuff. I'll do that as time permits. Thanks for these follow-ups, it certainly brings more clarity to what you are up to, and overall it all sounds pretty awesome. Keep it up! :) ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 08:30:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 6031753A; Sat, 17 Jan 2015 08:30:05 +0000 (UTC) Date: Sat, 17 Jan 2015 08:30:05 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150117083005.GA9496@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115132303.GA245@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 08:30:05 -0000 On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. Nice point I missed in earlier replies. In my stable/8 kernel config, now I have: options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH If I read stable/8/sys/modules/ufs/Makefile correctly, I can safely remove all four lines and still get ufs.ko with all these features (+ some more I don't really need, like QUOTA, but don't mind), right? ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 11:32:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2068BC8; Sat, 17 Jan 2015 11:32:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE59FC15; Sat, 17 Jan 2015 11:32:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HBW9f4096681; Sat, 17 Jan 2015 11:32:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HBW9Lq096680; Sat, 17 Jan 2015 11:32:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501171132.t0HBW9Lq096680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 17 Jan 2015 11:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277295 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 11:32:10 -0000 Author: ae Date: Sat Jan 17 11:32:09 2015 New Revision: 277295 URL: https://svnweb.freebsd.org/changeset/base/277295 Log: Fix condition and really sort ports. Also add comment describing the intent of this code. Reported by: sbruno MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat Jan 17 08:35:31 2015 (r277294) +++ head/sys/net/if_lagg.c Sat Jan 17 11:32:09 2015 (r277295) @@ -799,11 +799,16 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports. Keep ports sorted by if_index. */ + /* + * Insert into the list of ports. + * Keep ports sorted by if_index. It is handy, when configuration + * is predictable and `ifconfig laggN create ...` command + * will lead to the same result each time. + */ SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { if (tlp->lp_ifp->if_index < ifp->if_index && ( SLIST_NEXT(tlp, lp_entries) == NULL || - SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index > ifp->if_index)) break; } From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 11:41:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AECBDA5; Sat, 17 Jan 2015 11:41:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C304CEA; Sat, 17 Jan 2015 11:41:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HBf5Jk099717; Sat, 17 Jan 2015 11:41:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HBf5NK099716; Sat, 17 Jan 2015 11:41:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501171141.t0HBf5NK099716@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Jan 2015 11:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277296 - in stable: 10/lib/libmagic 9/lib/libmagic X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 11:41:05 -0000 Author: dim Date: Sat Jan 17 11:41:04 2015 New Revision: 277296 URL: https://svnweb.freebsd.org/changeset/base/277296 Log: MFC r277147: Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D1518 Modified: stable/9/lib/libmagic/config.h Directory Properties: stable/9/lib/libmagic/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libmagic/config.h ============================================================================== --- stable/9/lib/libmagic/config.h Sat Jan 17 11:32:09 2015 (r277295) +++ stable/9/lib/libmagic/config.h Sat Jan 17 11:41:04 2015 (r277296) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 1000002 || (__FreeBSD_version < 1000000 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -104,7 +114,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -197,7 +209,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -237,7 +251,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 1 From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 11:41:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FA94DA6; Sat, 17 Jan 2015 11:41:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E52A4CEB; Sat, 17 Jan 2015 11:41:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HBf50l099724; Sat, 17 Jan 2015 11:41:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HBf5jG099723; Sat, 17 Jan 2015 11:41:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501171141.t0HBf5jG099723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Jan 2015 11:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277296 - in stable: 10/lib/libmagic 9/lib/libmagic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 11:41:06 -0000 Author: dim Date: Sat Jan 17 11:41:04 2015 New Revision: 277296 URL: https://svnweb.freebsd.org/changeset/base/277296 Log: MFC r277147: Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D1518 Modified: stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libmagic/config.h Directory Properties: stable/9/lib/libmagic/ (props changed) Modified: stable/10/lib/libmagic/config.h ============================================================================== --- stable/10/lib/libmagic/config.h Sat Jan 17 11:32:09 2015 (r277295) +++ stable/10/lib/libmagic/config.h Sat Jan 17 11:41:04 2015 (r277296) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 1000002 || (__FreeBSD_version < 1000000 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -102,7 +112,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -195,7 +207,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -235,7 +249,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 1 From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 11:43:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7882E24F; Sat, 17 Jan 2015 11:43:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 594A3D11; Sat, 17 Jan 2015 11:43:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HBhEjU001893; Sat, 17 Jan 2015 11:43:14 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HBhDgZ001890; Sat, 17 Jan 2015 11:43:13 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501171143.t0HBhDgZ001890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 17 Jan 2015 11:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277297 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 11:43:14 -0000 Author: ae Date: Sat Jan 17 11:43:13 2015 New Revision: 277297 URL: https://svnweb.freebsd.org/changeset/base/277297 Log: MFC r276901: Move the recursion detection code into separate function gif_check_nesting(). Also make MTAG_GIF definition private to if_gif.c. MFC r276907: Restore Ethernet-within-IP Encapsulation support that was broken after r273087. Move all checks from gif_output() into gif_transmit(). Previously they were checked always, because if_start always called gif_output. Now gif_transmit() can be called directly from if_bridge() code and we need do checks here. PR: 196646 Modified: stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Sat Jan 17 11:41:04 2015 (r277296) +++ stable/10/sys/net/if_gif.c Sat Jan 17 11:43:13 2015 (r277297) @@ -120,6 +120,7 @@ void (*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); +static int gif_check_nesting(struct ifnet *, struct mbuf *); static int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static void gif_delete_tunnel(struct ifnet *); @@ -352,18 +353,32 @@ gif_transmit(struct ifnet *ifp, struct m uint8_t proto, ecn; int error; +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) { + m_freem(m); + goto err; + } +#endif error = ENETDOWN; sc = ifp->if_softc; - if (sc->gif_family == 0) { + if ((ifp->if_flags & IFF_MONITOR) != 0 || + (ifp->if_flags & IFF_UP) == 0 || + sc->gif_family == 0 || + (error = gif_check_nesting(ifp, m)) != 0) { m_freem(m); goto err; } /* Now pull back the af that we stashed in the csum_data. */ - af = m->m_pkthdr.csum_data; + if (ifp->if_bridge) + af = AF_LINK; + else + af = m->m_pkthdr.csum_data; + m->m_flags &= ~(M_BCAST|M_MCAST); + M_SETFIB(m, sc->gif_fibnum); BPF_MTAP2(ifp, &af, sizeof(af), m); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); - M_SETFIB(m, sc->gif_fibnum); /* inner AF-specific encapsulation */ ecn = 0; switch (af) { @@ -447,24 +462,12 @@ gif_qflush(struct ifnet *ifp __unused) } -int -gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +#define MTAG_GIF 1080679712 +static int +gif_check_nesting(struct ifnet *ifp, struct mbuf *m) { struct m_tag *mtag; - uint32_t af; - int gif_called; - int error = 0; -#ifdef MAC - error = mac_ifnet_check_transmit(ifp, m); - if (error) - goto err; -#endif - if ((ifp->if_flags & IFF_MONITOR) != 0 || - (ifp->if_flags & IFF_UP) == 0) { - error = ENETDOWN; - goto err; - } + int count; /* * gif may cause infinite recursion calls when misconfigured. @@ -473,42 +476,39 @@ gif_output(struct ifnet *ifp, struct mbu * High nesting level may cause stack exhaustion. * We'll prevent this by introducing upper limit. */ - gif_called = 1; - mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, NULL); - while (mtag != NULL) { + count = 1; + mtag = NULL; + while ((mtag = m_tag_locate(m, MTAG_GIF, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { - log(LOG_NOTICE, - "gif_output: loop detected on %s\n", - (*(struct ifnet **)(mtag + 1))->if_xname); - error = EIO; /* is there better errno? */ - goto err; + log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); + return (EIO); } - mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, mtag); - gif_called++; + count++; } - if (gif_called > V_max_gif_nesting) { + if (count > V_max_gif_nesting) { log(LOG_NOTICE, - "gif_output: recursively called too many times(%d)\n", - gif_called); - error = EIO; /* is there better errno? */ - goto err; - } - mtag = m_tag_alloc(MTAG_GIF, MTAG_GIF_CALLED, sizeof(struct ifnet *), - M_NOWAIT); - if (mtag == NULL) { - error = ENOMEM; - goto err; - } + "%s: if_output recursively called too many times(%d)\n", + if_name(ifp), count); + return (EIO); + } + mtag = m_tag_alloc(MTAG_GIF, 0, sizeof(struct ifnet *), M_NOWAIT); + if (mtag == NULL) + return (ENOMEM); *(struct ifnet **)(mtag + 1) = ifp; m_tag_prepend(m, mtag); + return (0); +} + +int +gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, + struct route *ro) +{ + uint32_t af; - m->m_flags &= ~(M_BCAST|M_MCAST); if (dst->sa_family == AF_UNSPEC) bcopy(dst->sa_data, &af, sizeof(af)); else af = dst->sa_family; - if (ifp->if_bridge) - af = AF_LINK; /* * Now save the af in the inbound pkt csum data, this is a cheat since * we are using the inbound csum_data field to carry the af over to @@ -516,10 +516,6 @@ gif_output(struct ifnet *ifp, struct mbu */ m->m_pkthdr.csum_data = af; return (ifp->if_transmit(ifp, m)); -err: - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - m_freem(m); - return (error); } void Modified: stable/10/sys/net/if_gif.h ============================================================================== --- stable/10/sys/net/if_gif.h Sat Jan 17 11:41:04 2015 (r277296) +++ stable/10/sys/net/if_gif.h Sat Jan 17 11:43:13 2015 (r277297) @@ -90,9 +90,6 @@ struct gif_softc { #define GIF_MTU_MIN (1280) /* Minimum MTU */ #define GIF_MTU_MAX (8192) /* Maximum MTU */ -#define MTAG_GIF 1080679712 -#define MTAG_GIF_CALLED 0 - struct etherip_header { #if BYTE_ORDER == LITTLE_ENDIAN u_int eip_resvl:4, /* reserved */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 12:31:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 151F1B4F; Sat, 17 Jan 2015 12:31:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0167C20B; Sat, 17 Jan 2015 12:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HCVRim024762; Sat, 17 Jan 2015 12:31:27 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HCVR2p024759; Sat, 17 Jan 2015 12:31:27 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501171231.t0HCVR2p024759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 17 Jan 2015 12:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277298 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 12:31:28 -0000 Author: br Date: Sat Jan 17 12:31:26 2015 New Revision: 277298 URL: https://svnweb.freebsd.org/changeset/base/277298 Log: o Notify USB host about connection when operating in device mode. Required when communicating to Mac OS X USB host stack. o Also don't set stall bit to TX pipe in device mode as seems Mac OS X don't clears it as it should. Discussed with: hselasky@ Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cdcereg.h Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Sat Jan 17 11:43:13 2015 (r277297) +++ head/sys/dev/usb/net/if_cdce.c Sat Jan 17 12:31:26 2015 (r277298) @@ -898,8 +898,14 @@ cdce_init(struct usb_ether *ue) usbd_transfer_start(sc->sc_xfer[CDCE_INTR_RX]); usbd_transfer_start(sc->sc_xfer[CDCE_INTR_TX]); - /* stall data write direction, which depends on USB mode */ - usbd_xfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); + /* + * Stall data write direction, which depends on USB mode. + * + * Some USB host stacks (e.g. Mac OS X) don't clears stall + * bit as it should, so set it in our host mode only. + */ + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) + usbd_xfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); /* start data transfers */ cdce_start(ue); @@ -1065,6 +1071,10 @@ tr_setup: static void cdce_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) { + struct cdce_softc *sc = usbd_xfer_softc(xfer); + struct usb_cdc_notification req; + struct usb_page_cache *pc; + uint32_t speed; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); @@ -1077,10 +1087,50 @@ cdce_intr_write_callback(struct usb_xfer /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: -#if 0 - usbd_xfer_set_frame_len(xfer, 0, XXX); - usbd_transfer_submit(xfer); -#endif + /* + * Inform host about connection. Required according to USB CDC + * specification and communicating to Mac OS X USB host stack. + * Some of the values seems ignored by Mac OS X though. + */ + if (sc->sc_notify_state == CDCE_NOTIFY_NETWORK_CONNECTION) { + req.bmRequestType = UCDC_NOTIFICATION; + req.bNotification = UCDC_N_NETWORK_CONNECTION; + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wValue, 1); /* Connected */ + USETW(req.wLength, 0); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; + + } else if (sc->sc_notify_state == CDCE_NOTIFY_SPEED_CHANGE) { + req.bmRequestType = UCDC_NOTIFICATION; + req.bNotification = UCDC_N_CONNECTION_SPEED_CHANGE; + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wValue, 0); + USETW(req.wLength, 8); + + /* Peak theoretical bulk trasfer rate in bits/s */ + if (usbd_get_speed(sc->sc_ue.ue_udev) == USB_SPEED_HIGH) + speed = (13 * 512 * 8 * 1000 * 8); + else + speed = (19 * 64 * 1 * 1000 * 8); + + USETDW(req.data + 0, speed); /* Upstream bit rate */ + USETDW(req.data + 4, speed); /* Downstream bit rate */ + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + sc->sc_notify_state = CDCE_NOTIFY_DONE; + } break; default: /* Error */ Modified: head/sys/dev/usb/net/if_cdcereg.h ============================================================================== --- head/sys/dev/usb/net/if_cdcereg.h Sat Jan 17 11:43:13 2015 (r277297) +++ head/sys/dev/usb/net/if_cdcereg.h Sat Jan 17 12:31:26 2015 (r277298) @@ -93,6 +93,10 @@ struct cdce_softc { uint8_t sc_eaddr_str_index; uint8_t sc_ifaces_index[2]; + uint8_t sc_notify_state; +#define CDCE_NOTIFY_NETWORK_CONNECTION 0 +#define CDCE_NOTIFY_SPEED_CHANGE 1 +#define CDCE_NOTIFY_DONE 2 }; #define CDCE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 12:54:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDD72EB4; Sat, 17 Jan 2015 12:54:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE90B3EB; Sat, 17 Jan 2015 12:54:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HCs3qk035851; Sat, 17 Jan 2015 12:54:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HCs3re035850; Sat, 17 Jan 2015 12:54:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501171254.t0HCs3re035850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Jan 2015 12:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277299 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 12:54:04 -0000 Author: dim Date: Sat Jan 17 12:54:02 2015 New Revision: 277299 URL: https://svnweb.freebsd.org/changeset/base/277299 Log: MFC r276517: Pull in r200010 from upstream libc++ trunk (by Marshall Clow): Rename some internal templates to avoid conflict with complier intrinsics. __is_constructible --> __libcpp_is_constructible, __is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and __is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No functionality change. Pull in r206805 from upstream libc++ trunk (by Marshall Clow): Use compiler intrinsic __is_constructible if available This should fix building parts of world with -std=c++11 enabled. Reported by: Oliver Hartmann Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/type_traits ============================================================================== --- stable/9/contrib/libc++/include/type_traits Sat Jan 17 12:31:26 2015 (r277298) +++ stable/9/contrib/libc++/include/type_traits Sat Jan 17 12:54:02 2015 (r277299) @@ -2015,10 +2015,24 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_F #endif // _LIBCPP_HAS_NO_VARIADICS -#ifndef _LIBCPP_HAS_NO_VARIADICS - // template struct is_constructible; +namespace __is_construct +{ +struct __nat {}; +} + +#if __has_feature(is_constructible) + +template +struct _LIBCPP_TYPE_VIS_ONLY is_constructible + : public integral_constant + {}; + +#else + +#ifndef _LIBCPP_HAS_NO_VARIADICS + // main is_constructible test template @@ -2030,7 +2044,7 @@ false_type __is_constructible_test(__any, _Args&& ...); template -struct __is_constructible // false, _Tp is not a scalar +struct __libcpp_is_constructible // false, _Tp is not a scalar : public common_type < decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...)) @@ -2040,7 +2054,7 @@ struct __is_constructible // false, _Tp // function types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2049,7 +2063,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public is_scalar<_Tp> {}; @@ -2064,7 +2078,7 @@ struct __is_constructible_ref }; template -struct __is_constructible +struct __libcpp_is_constructible : public common_type < decltype(__is_constructible_ref<_Tp>::__lxx(declval<_A0>())) @@ -2074,7 +2088,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2082,7 +2096,7 @@ struct __is_constructible struct __is_constructible_void_check - : public __is_constructible::value || is_reference<_Tp>::value, + : public __libcpp_is_constructible::value || is_reference<_Tp>::value, _Tp, _Args...> {}; @@ -2117,21 +2131,21 @@ struct _LIBCPP_TYPE_VIS_ONLY is_construc // is default constructible template -struct __is_constructible +struct __libcpp_is_constructible : public is_constructible::type> {}; // Otherwise array types are not constructible by this syntax template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; // Incomplete array types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2246,13 +2260,6 @@ struct __is_constructible2_void_check struct _LIBCPP_TYPE_VIS_ONLY is_constructible @@ -2317,6 +2324,7 @@ struct __is_constructible2_imp struct __is_nothrow_constructible; +template struct __libcpp_is_nothrow_constructible; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public integral_constant()...))> { }; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public false_type { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible - : __is_nothrow_constructible::value, _Tp, _Args...> + : __libcpp_is_nothrow_constructible::value, _Tp, _Args...> { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]> - : __is_nothrow_constructible::value, _Tp> + : __libcpp_is_nothrow_constructible::value, _Tp> { }; @@ -2743,23 +2751,23 @@ template struct _LIBCPP_TYPE #if __has_feature(cxx_noexcept) -template struct __is_nothrow_assignable; +template struct __libcpp_is_nothrow_assignable; template -struct __is_nothrow_assignable +struct __libcpp_is_nothrow_assignable : public false_type { }; template -struct __is_nothrow_assignable +struct __libcpp_is_nothrow_assignable : public integral_constant() = _VSTD::declval<_Arg>()) > { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable - : public __is_nothrow_assignable::value, _Tp, _Arg> + : public __libcpp_is_nothrow_assignable::value, _Tp, _Arg> { }; @@ -2829,23 +2837,23 @@ template struct _LIBCPP_TYPE #if __has_feature(cxx_noexcept) -template struct __is_nothrow_destructible; +template struct __libcpp_is_nothrow_destructible; template -struct __is_nothrow_destructible +struct __libcpp_is_nothrow_destructible : public false_type { }; template -struct __is_nothrow_destructible +struct __libcpp_is_nothrow_destructible : public integral_constant().~_Tp()) > { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible - : public __is_nothrow_destructible::value, _Tp> + : public __libcpp_is_nothrow_destructible::value, _Tp> { }; From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 12:54:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FA25EB5; Sat, 17 Jan 2015 12:54:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 508933EC; Sat, 17 Jan 2015 12:54:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HCs4Rl035857; Sat, 17 Jan 2015 12:54:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HCs44m035856; Sat, 17 Jan 2015 12:54:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501171254.t0HCs44m035856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Jan 2015 12:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277299 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 12:54:04 -0000 Author: dim Date: Sat Jan 17 12:54:02 2015 New Revision: 277299 URL: https://svnweb.freebsd.org/changeset/base/277299 Log: MFC r276517: Pull in r200010 from upstream libc++ trunk (by Marshall Clow): Rename some internal templates to avoid conflict with complier intrinsics. __is_constructible --> __libcpp_is_constructible, __is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and __is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No functionality change. Pull in r206805 from upstream libc++ trunk (by Marshall Clow): Use compiler intrinsic __is_constructible if available This should fix building parts of world with -std=c++11 enabled. Reported by: Oliver Hartmann Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/include/type_traits ============================================================================== --- stable/10/contrib/libc++/include/type_traits Sat Jan 17 12:31:26 2015 (r277298) +++ stable/10/contrib/libc++/include/type_traits Sat Jan 17 12:54:02 2015 (r277299) @@ -2015,10 +2015,24 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_F #endif // _LIBCPP_HAS_NO_VARIADICS -#ifndef _LIBCPP_HAS_NO_VARIADICS - // template struct is_constructible; +namespace __is_construct +{ +struct __nat {}; +} + +#if __has_feature(is_constructible) + +template +struct _LIBCPP_TYPE_VIS_ONLY is_constructible + : public integral_constant + {}; + +#else + +#ifndef _LIBCPP_HAS_NO_VARIADICS + // main is_constructible test template @@ -2030,7 +2044,7 @@ false_type __is_constructible_test(__any, _Args&& ...); template -struct __is_constructible // false, _Tp is not a scalar +struct __libcpp_is_constructible // false, _Tp is not a scalar : public common_type < decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...)) @@ -2040,7 +2054,7 @@ struct __is_constructible // false, _Tp // function types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2049,7 +2063,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public is_scalar<_Tp> {}; @@ -2064,7 +2078,7 @@ struct __is_constructible_ref }; template -struct __is_constructible +struct __libcpp_is_constructible : public common_type < decltype(__is_constructible_ref<_Tp>::__lxx(declval<_A0>())) @@ -2074,7 +2088,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2082,7 +2096,7 @@ struct __is_constructible struct __is_constructible_void_check - : public __is_constructible::value || is_reference<_Tp>::value, + : public __libcpp_is_constructible::value || is_reference<_Tp>::value, _Tp, _Args...> {}; @@ -2117,21 +2131,21 @@ struct _LIBCPP_TYPE_VIS_ONLY is_construc // is default constructible template -struct __is_constructible +struct __libcpp_is_constructible : public is_constructible::type> {}; // Otherwise array types are not constructible by this syntax template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; // Incomplete array types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2246,13 +2260,6 @@ struct __is_constructible2_void_check struct _LIBCPP_TYPE_VIS_ONLY is_constructible @@ -2317,6 +2324,7 @@ struct __is_constructible2_imp struct __is_nothrow_constructible; +template struct __libcpp_is_nothrow_constructible; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public integral_constant()...))> { }; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public false_type { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible - : __is_nothrow_constructible::value, _Tp, _Args...> + : __libcpp_is_nothrow_constructible::value, _Tp, _Args...> { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]> - : __is_nothrow_constructible::value, _Tp> + : __libcpp_is_nothrow_constructible::value, _Tp> { }; @@ -2743,23 +2751,23 @@ template struct _LIBCPP_TYPE #if __has_feature(cxx_noexcept) -template struct __is_nothrow_assignable; +template struct __libcpp_is_nothrow_assignable; template -struct __is_nothrow_assignable +struct __libcpp_is_nothrow_assignable : public false_type { }; template -struct __is_nothrow_assignable +struct __libcpp_is_nothrow_assignable : public integral_constant() = _VSTD::declval<_Arg>()) > { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable - : public __is_nothrow_assignable::value, _Tp, _Arg> + : public __libcpp_is_nothrow_assignable::value, _Tp, _Arg> { }; @@ -2829,23 +2837,23 @@ template struct _LIBCPP_TYPE #if __has_feature(cxx_noexcept) -template struct __is_nothrow_destructible; +template struct __libcpp_is_nothrow_destructible; template -struct __is_nothrow_destructible +struct __libcpp_is_nothrow_destructible : public false_type { }; template -struct __is_nothrow_destructible +struct __libcpp_is_nothrow_destructible : public integral_constant().~_Tp()) > { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible - : public __is_nothrow_destructible::value, _Tp> + : public __libcpp_is_nothrow_destructible::value, _Tp> { }; From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 13:31:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1ED1809; Sat, 17 Jan 2015 13:31:47 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 682FC919; Sat, 17 Jan 2015 13:31:47 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D928A25D37D1; Sat, 17 Jan 2015 13:31:43 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 50D22C770F1; Sat, 17 Jan 2015 13:31:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Rkvxlvc_bzp2; Sat, 17 Jan 2015 13:31:40 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a] (unknown [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C4A45C77042; Sat, 17 Jan 2015 13:31:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277285 - head/sys/x86/isa From: "Bjoern A. Zeeb" In-Reply-To: <201501170218.t0H2I0AW038857@svn.freebsd.org> Date: Sat, 17 Jan 2015 13:31:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> References: <201501170218.t0H2I0AW038857@svn.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 13:31:47 -0000 > On 17 Jan 2015, at 02:18 , Warner Losh wrote: >=20 > Author: imp > Date: Sat Jan 17 02:17:59 2015 > New Revision: 277285 > URL: https://svnweb.freebsd.org/changeset/base/277285 >=20 > Log: > Need to include opt_mca.h to test for DEV_MCA. >=20 > Modified: > head/sys/x86/isa/atpic.c i386 LINT kernels: /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of = undeclared identifier 'MCA_system' /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of = undeclared identifier 'MCA_system' >=20 > Modified: head/sys/x86/isa/atpic.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 = (r277284) > +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 = (r277285) > @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_auto_eoi.h" > #include "opt_isa.h" > +#include "opt_mca.h" >=20 > #include > #include >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 14:45:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 781FCFC9; Sat, 17 Jan 2015 14:45:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60E0AF51; Sat, 17 Jan 2015 14:45:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HEj6EZ086739; Sat, 17 Jan 2015 14:45:06 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HEj00e086683; Sat, 17 Jan 2015 14:45:00 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501171445.t0HEj00e086683@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sat, 17 Jan 2015 14:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277300 - in head: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/mdb/tools/common cddl/contrib/opensolaris/cmd/plockstat cddl/co... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 14:45:06 -0000 Author: smh Date: Sat Jan 17 14:44:59 2015 New Revision: 277300 URL: https://svnweb.freebsd.org/changeset/base/277300 Log: Mechanically convert cddl sun #ifdef's to illumos Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c head/cddl/contrib/opensolaris/cmd/lockstat/sym.c head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c head/cddl/contrib/opensolaris/common/util/strtolctype.h head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c head/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfconvert.c head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c head/cddl/contrib/opensolaris/tools/ctf/cvt/tdata.c head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c head/sys/cddl/contrib/opensolaris/common/util/strtolctype.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/os/callb.c head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c head/sys/cddl/contrib/opensolaris/uts/common/sys/ctf.h head/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h head/sys/cddl/contrib/opensolaris/uts/common/sys/u8_textprep.h head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c head/sys/cddl/dev/dtrace/amd64/instr_size.c head/sys/cddl/dev/dtrace/dtrace_ioctl.c head/sys/cddl/dev/dtrace/i386/instr_size.c head/sys/cddl/dev/dtrace/x86/regset.h Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Jan 17 14:44:59 2015 (r277300) @@ -43,11 +43,11 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif #include -#if defined(sun) +#ifdef illumos #include #endif @@ -101,7 +101,7 @@ static int g_grabanon = 0; static const char *g_ofile = NULL; static FILE *g_ofp; static dtrace_hdl_t *g_dtp; -#if defined(sun) +#ifdef illumos static char *g_etcfile = "/etc/system"; static const char *g_etcbegin = "* vvvv Added by DTrace"; static const char *g_etcend = "* ^^^^ Added by DTrace"; @@ -211,7 +211,7 @@ fatal(const char *fmt, ...) static void dfatal(const char *fmt, ...) { -#if !defined(sun) && defined(NEED_ERRLOC) +#if !defined(illumos) && defined(NEED_ERRLOC) char *p_errfile = NULL; int errline = 0; #endif @@ -232,7 +232,7 @@ dfatal(const char *fmt, ...) (void) fprintf(stderr, "%s\n", dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); } -#if !defined(sun) && defined(NEED_ERRLOC) +#if !defined(illumos) && defined(NEED_ERRLOC) dt_get_errloc(g_dtp, &p_errfile, &errline); if (p_errfile != NULL) printf("File '%s', line %d\n", p_errfile, errline); @@ -397,7 +397,7 @@ dof_prune(const char *fname) free(buf); } -#if defined(sun) +#ifdef illumos static void etcsystem_prune(void) { @@ -508,7 +508,7 @@ etcsystem_add(void) error("added forceload directives to %s\n", g_ofile); } -#endif +#endif /* illumos */ static void print_probe_info(const dtrace_probeinfo_t *p) @@ -643,7 +643,7 @@ anon_prog(const dtrace_cmd_t *dcp, dof_h p = (uchar_t *)dof; q = p + dof->dofh_loadsz; -#if defined(sun) +#ifdef illumos oprintf("dof-data-%d=0x%x", n, *p++); while (p < q) @@ -793,7 +793,7 @@ compile_str(dtrace_cmd_t *dcp) static void prochandler(struct ps_prochandle *P, const char *msg, void *arg) { -#if defined(sun) +#ifdef illumos const psinfo_t *prp = Ppsinfo(P); int pid = Pstatus(P)->pr_pid; char name[SIG2STR_MAX]; @@ -807,13 +807,13 @@ prochandler(struct ps_prochandle *P, con return; } -#if defined(sun) +#ifdef illumos switch (Pstate(P)) { #else switch (proc_state(P)) { #endif case PS_UNDEAD: -#if defined(sun) +#ifdef illumos /* * Ideally we would like to always report pr_wstat here, but it * isn't possible given current /proc semantics. If we grabbed @@ -831,7 +831,7 @@ prochandler(struct ps_prochandle *P, con notice("pid %d terminated by %d\n", pid, WTERMSIG(wstatus)); #endif -#if defined(sun) +#ifdef illumos } else if (prp != NULL && WEXITSTATUS(prp->pr_wstat) != 0) { notice("pid %d exited with status %d\n", pid, WEXITSTATUS(prp->pr_wstat)); @@ -1238,7 +1238,7 @@ installsighands(void) if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGTERM, &act, NULL); -#if !defined(sun) +#ifndef illumos if (sigaction(SIGPIPE, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGPIPE, &act, NULL); @@ -1720,7 +1720,7 @@ main(int argc, char *argv[]) case DMODE_ANON: if (g_ofile == NULL) -#if defined(sun) +#ifdef illumos g_ofile = "/kernel/drv/dtrace.conf"; #else /* @@ -1732,7 +1732,7 @@ main(int argc, char *argv[]) #endif dof_prune(g_ofile); /* strip out any old DOF directives */ -#if defined(sun) +#ifdef illumos etcsystem_prune(); /* string out any forceload directives */ #endif @@ -1765,7 +1765,7 @@ main(int argc, char *argv[]) * that itself contains a #pragma D option quiet. */ error("saved anonymous enabling in %s\n", g_ofile); -#if defined(sun) +#ifdef illumos etcsystem_add(); error("run update_drv(1M) or reboot to enable changes\n"); #endif Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c Sat Jan 17 14:44:59 2015 (r277300) @@ -46,10 +46,9 @@ #include #include -#if defined(sun) +#ifdef illumos #define GETOPT_EOF EOF #else -/* FreeBSD */ #include #include @@ -57,7 +56,7 @@ #define GETOPT_EOF (-1) typedef uintptr_t pc_t; -#endif /* defined(sun) */ +#endif #define LOCKSTAT_OPTSTR "x:bths:n:d:i:l:f:e:ckwWgCHEATID:RpPo:V" @@ -214,10 +213,9 @@ static ls_event_info_t g_event_info[LS_M { 'H', "Lock", "Unknown event (type 53)", "units" }, { 'H', "Lock", "Unknown event (type 54)", "units" }, { 'H', "Lock", "Unknown event (type 55)", "units" }, -#if defined(sun) +#ifdef illumos { 'I', "CPU+PIL", "Profiling interrupt", "nsec", #else - /* FreeBSD */ { 'I', "CPU+Pri_Class", "Profiling interrupt", "nsec", #endif "profile:::profile-97", NULL }, @@ -231,7 +229,7 @@ static ls_event_info_t g_event_info[LS_M { 'E', "Lock", "Lockstat record failure", "(N/A)" }, }; -#if !defined(sun) +#ifndef illumos static char *g_pri_class[] = { "", "Intr", @@ -598,7 +596,7 @@ filter_add(char **filt, char *what, uint *filt[0] = '\0'; } -#if defined(sun) +#ifdef illumos (void) sprintf(c, "%s(%s >= 0x%p && %s < 0x%p)", *filt[0] != '\0' ? " || " : "", what, (void *)base, what, (void *)(base + size)); #else @@ -676,7 +674,7 @@ dprog_addevent(int event) * the number of nanoseconds) is the number of nanoseconds * late -- and it's stored in arg2. */ -#if defined(sun) +#ifdef illumos arg0 = "(uintptr_t)curthread->t_cpu + \n" "\t curthread->t_cpu->cpu_profile_pil"; #else @@ -824,7 +822,7 @@ dprog_compile() } static void -#if defined(sun) +#ifdef illumos status_fire(void) #else status_fire(int i) @@ -1423,7 +1421,7 @@ main(int argc, char **argv) exit(127); } -#if defined(sun) +#ifdef illumos while (waitpid(child, &status, WEXITED) != child) #else while (waitpid(child, &status, 0) != child) @@ -1468,7 +1466,7 @@ main(int argc, char **argv) dfail("failed to walk aggregate"); } -#if defined(sun) +#ifdef illumos if ((data_buf = memalign(sizeof (uint64_t), (g_nrecs + 1) * g_recsize)) == NULL) #else @@ -1500,7 +1498,7 @@ main(int argc, char **argv) if (g_gflag) { lsrec_t *newlsp, *oldlsp; -#if defined(sun) +#ifdef illumos newlsp = memalign(sizeof (uint64_t), g_nrecs_used * LS_TIME * (g_stkdepth + 1)); #else @@ -1664,7 +1662,7 @@ format_symbol(char *buf, uintptr_t addr, else if (symoff == 0) (void) sprintf(buf, "%s", symname); else if (symoff < 16 && bcmp(symname, "cpu[", 4) == 0) /* CPU+PIL */ -#if defined(sun) +#ifdef illumos (void) sprintf(buf, "%s+%ld", symname, (long)symoff); #else (void) sprintf(buf, "%s+%s", symname, g_pri_class[(int)symoff]); Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Sat Jan 17 14:44:59 2015 (r277300) @@ -42,12 +42,11 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #include #else -/* FreeBSD */ #include #include #include @@ -66,7 +65,7 @@ static syment_t *symbol_table; static int nsyms, maxsyms; static char maxsymname[64]; -#if defined(sun) +#ifdef illumos #ifdef _ELF64 #define elf_getshdr elf64_getshdr #else @@ -105,7 +104,7 @@ remove_symbol(uintptr_t addr) sep->addr = 0; } -#if defined(sun) +#ifdef illumos static void fake_up_certain_popular_kernel_symbols(void) { @@ -133,8 +132,7 @@ fake_up_certain_popular_kernel_symbols(v } (void) kstat_close(kc); } -#else -/* FreeBSD */ +#else /* !illumos */ static void fake_up_certain_popular_kernel_symbols(void) { @@ -151,7 +149,7 @@ fake_up_certain_popular_kernel_symbols(v add_symbol(name, addr, sizeof (uintptr_t)); } } -#endif /* !defined(sun) */ +#endif /* illumos */ static int symcmp(const void *p1, const void *p2) @@ -177,12 +175,12 @@ symtab_init(void) int fd; int i; int strindex = -1; -#if !defined(sun) +#ifndef illumos void *ksyms; size_t sz; #endif -#if defined(__FreeBSD__) +#ifndef illumos if ((fd = open("/dev/ksyms", O_RDONLY)) == -1) { if (errno == ENOENT && modfind("ksyms") == -1) { kldload("ksyms"); @@ -196,12 +194,11 @@ symtab_init(void) return (-1); #endif -#if defined(sun) +#ifdef illumos (void) elf_version(EV_CURRENT); elf = elf_begin(fd, ELF_C_READ, NULL); #else - /* FreeBSD */ /* * XXX - libelf needs to be fixed so it will work with * non 'ordinary' files like /dev/ksyms. The following Modified: head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c Sat Jan 17 14:44:59 2015 (r277300) @@ -40,7 +40,7 @@ die(char *format, ...) { va_list ap; int err = errno; -#if !defined(sun) +#ifndef illumos const char *progname = getprogname(); #endif @@ -54,7 +54,7 @@ die(char *format, ...) if (format[strlen(format) - 1] != '\n') (void) fprintf(stderr, ": %s\n", strerror(err)); -#if defined(__FreeBSD__) +#ifndef illumos exit(0); #else exit(1); @@ -65,7 +65,7 @@ void elfdie(char *format, ...) { va_list ap; -#if !defined(sun) +#ifndef illumos const char *progname = getprogname(); #endif @@ -79,7 +79,7 @@ elfdie(char *format, ...) if (format[strlen(format) - 1] != '\n') (void) fprintf(stderr, ": %s\n", elf_errmsg(elf_errno())); -#if defined(__FreeBSD__) +#ifndef illumos exit(0); #else exit(1); Modified: head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h Sat Jan 17 14:44:59 2015 (r277300) @@ -40,7 +40,7 @@ extern int findelfsecidx(Elf *, char *); extern void die(char *, ...); extern void elfdie(char *, ...); -#if defined(sun) +#ifdef illumos extern const char *progname; #endif Modified: head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Sat Jan 17 14:44:59 2015 (r277300) @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#if defined(sun) +#ifdef illumos #pragma ident "%Z%%M% %I% %E% SMI" #endif @@ -505,7 +505,7 @@ getsym(struct ps_prochandle *P, uintptr_ { char name[256]; GElf_Sym sym; -#if defined(sun) +#ifdef illumos prsyminfo_t info; #else prmap_t *map; @@ -518,7 +518,7 @@ getsym(struct ps_prochandle *P, uintptr_ (void) snprintf(buf, size, "%#lx", addr); return (0); } -#if defined(sun) +#ifdef illumos if (info.prs_object == NULL) info.prs_object = ""; @@ -668,7 +668,7 @@ process_aggregate(const dtrace_aggdata_t static void prochandler(struct ps_prochandle *P, const char *msg, void *arg) { -#if defined(sun) +#ifdef illumos const psinfo_t *prp = Ppsinfo(P); int pid = Pstatus(P)->pr_pid; #else @@ -773,7 +773,7 @@ intr(int signo) int main(int argc, char **argv) { -#if defined(sun) +#ifdef illumos ucred_t *ucp; #endif int err; @@ -785,7 +785,7 @@ main(int argc, char **argv) g_pname = basename(argv[0]); argv[0] = g_pname; /* rewrite argv[0] for getopt errors */ -#if defined(sun) +#ifdef illumos /* * Make sure we have the required dtrace_proc privilege. */ @@ -988,7 +988,7 @@ main(int argc, char **argv) if (opt_v) (void) printf("%s: tracing enabled for pid %d\n", g_pname, -#if defined(sun) +#ifdef illumos (int)Pstatus(g_pr)->pr_pid); #else (int)proc_getpid(g_pr)); Modified: head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h Sat Jan 17 14:44:59 2015 (r277300) @@ -39,7 +39,7 @@ extern "C" { #endif #include -#if defined(sun) +#ifdef illumos #include #else #include Modified: head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h Sat Jan 17 14:44:59 2015 (r277300) @@ -48,7 +48,7 @@ extern "C" { #ifndef _ASM #include -#if defined(sun) +#ifdef illumos #include #else #include Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sat Jan 17 14:44:59 2015 (r277300) @@ -65,7 +65,7 @@ #include #include #include -#ifdef sun +#ifdef illumos #include #include #include @@ -2391,7 +2391,7 @@ userspace_cb(void *arg, const char *doma /* SMB */ char sid[ZFS_MAXNAMELEN + 32]; uid_t id; -#ifdef sun +#ifdef illumos int err; int flag = IDMAP_REQ_FLG_USE_CACHE; #endif @@ -2402,17 +2402,17 @@ userspace_cb(void *arg, const char *doma if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { type = USTYPE_SMB_GRP; -#ifdef sun +#ifdef illumos err = sid_to_id(sid, B_FALSE, &id); #endif } else { type = USTYPE_SMB_USR; -#ifdef sun +#ifdef illumos err = sid_to_id(sid, B_TRUE, &id); #endif } -#ifdef sun +#ifdef illumos if (err == 0) { rid = id; if (!cb->cb_sid2posix) { @@ -6110,7 +6110,7 @@ unshare_unmount_path(int op, char *path, /* * Search for the given (major,minor) pair in the mount table. */ -#ifdef sun +#ifdef illumos rewind(mnttab_file); while ((ret = getextmntent(mnttab_file, &entry, 0)) == 0) { if (entry.mnt_major == major(statbuf.st_dev) && Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Jan 17 14:44:59 2015 (r277300) @@ -112,7 +112,7 @@ vdev_error(const char *fmt, ...) va_end(ap); } -#ifdef sun +#ifdef illumos static void libdiskmgt_error(int error) { @@ -274,7 +274,7 @@ check_device(const char *path, boolean_t return (check_slice(path, force, B_FALSE, isspare)); } -#endif /* sun */ +#endif /* illumos */ /* * Check that a file is valid. All we can do in this case is check that it's @@ -290,7 +290,7 @@ check_file(const char *file, boolean_t f pool_state_t state; boolean_t inuse; -#ifdef sun +#ifdef illumos if (dm_inuse_swap(file, &err)) { if (err) libdiskmgt_error(err); @@ -377,7 +377,7 @@ check_device(const char *name, boolean_t static boolean_t is_whole_disk(const char *arg) { -#ifdef sun +#ifdef illumos struct dk_gpt *label; int fd; char path[MAXPATHLEN]; @@ -915,7 +915,7 @@ check_replication(nvlist_t *config, nvli return (ret); } -#ifdef sun +#ifdef illumos /* * Go through and find any whole disks in the vdev specification, labelling them * as appropriate. When constructing the vdev spec, we were unable to open this @@ -1019,7 +1019,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t return (0); } -#endif /* sun */ +#endif /* illumos */ /* * Determine if the given path is a hot spare within the given configuration. @@ -1098,7 +1098,7 @@ is_device_in_use(nvlist_t *config, nvlis * regardless of what libdiskmgt or zpool_in_use() says. */ if (replacing) { -#ifdef sun +#ifdef illumos if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_WHOLE_DISK, &wholedisk) == 0 && wholedisk) (void) snprintf(buf, sizeof (buf), "%ss0", @@ -1422,7 +1422,7 @@ split_mirror_vdev(zpool_handle_t *zhp, c return (NULL); } -#ifdef sun +#ifdef illumos if (!flags.dryrun && make_disks(zhp, newroot) != 0) { nvlist_free(newroot); return (NULL); @@ -1507,7 +1507,7 @@ make_root_vdev(zpool_handle_t *zhp, int return (NULL); } -#ifdef sun +#ifdef illumos /* * Run through the vdev specification and label any whole disks found. */ Modified: head/cddl/contrib/opensolaris/common/util/strtolctype.h ============================================================================== --- head/cddl/contrib/opensolaris/common/util/strtolctype.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/common/util/strtolctype.h Sat Jan 17 14:44:59 2015 (r277300) @@ -44,7 +44,7 @@ extern "C" { * safe in probe context. */ -#if defined(sun) && (defined(_KERNEL) || defined(_BOOT)) +#if defined(illumos) && (defined(_KERNEL) || defined(_BOOT)) #define isalnum(ch) (isalpha(ch) || isdigit(ch)) #define isalpha(ch) (isupper(ch) || islower(ch)) Modified: head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Sat Jan 17 14:44:59 2015 (r277300) @@ -34,14 +34,14 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #else #include #endif #include -#if defined(sun) +#ifdef illumos #ifdef _LP64 static const char *_libctf_zlib = "/usr/lib/64/libz.so"; #else @@ -58,7 +58,7 @@ static struct { static size_t _PAGESIZE; static size_t _PAGEMASK; -#if defined(sun) +#ifdef illumos #pragma init(_libctf_init) #else void _libctf_init(void) __attribute__ ((constructor)); @@ -66,7 +66,7 @@ void _libctf_init(void) __attribute__ void _libctf_init(void) { -#if defined(sun) +#ifdef illumos const char *p = getenv("LIBCTF_DECOMPRESSOR"); if (p != NULL) @@ -87,7 +87,7 @@ _libctf_init(void) void * ctf_zopen(int *errp) { -#if defined(sun) +#ifdef illumos ctf_dprintf("decompressing CTF data using %s\n", _libctf_zlib); if (zlib.z_dlp != NULL) Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Jan 17 14:44:59 2015 (r277300) @@ -56,13 +56,13 @@ */ static const char *devnamep = "/dev/dtrace/helper"; -#if defined(sun) +#ifdef illumos static const char *olddevname = "/devices/pseudo/dtrace@0:helper"; #endif static const char *modname; /* Name of this load object */ static int gen; /* DOF helper generation */ -#if defined(sun) +#ifdef illumos extern dof_hdr_t __SUNW_dof; /* DOF defined in the .SUNW_dof section */ #endif static boolean_t dof_init_debug = B_FALSE; /* From DTRACE_DOF_INIT_DEBUG */ @@ -90,7 +90,7 @@ dprintf(int debug, const char *fmt, ...) va_end(ap); } -#if defined(sun) +#ifdef illumos #pragma init(dtrace_dof_init) #else static void dtrace_dof_init(void) __attribute__ ((constructor)); @@ -99,7 +99,7 @@ static void dtrace_dof_init(void) __attr static void dtrace_dof_init(void) { -#if defined(sun) +#ifdef illumos dof_hdr_t *dof = &__SUNW_dof; #else dof_hdr_t *dof = NULL; @@ -111,14 +111,14 @@ dtrace_dof_init(void) #endif dof_helper_t dh; Link_map *lmp = NULL; -#if defined(sun) +#ifdef illumos Lmid_t lmid; #else u_long lmid = 0; #endif int fd; const char *p; -#if !defined(sun) +#ifndef illumos Elf *e; Elf_Scn *scn = NULL; Elf_Data *dofdata = NULL; @@ -141,7 +141,7 @@ dtrace_dof_init(void) return; } -#if defined(sun) +#ifdef illumos if (dlinfo(RTLD_SELF, RTLD_DI_LMID, &lmid) == -1) { dprintf(1, "couldn't discover link map ID\n"); return; @@ -152,7 +152,7 @@ dtrace_dof_init(void) modname = lmp->l_name; else modname++; -#if !defined(sun) +#ifndef illumos elf_version(EV_CURRENT); if ((efd = open(lmp->l_name, O_RDONLY, 0)) < 0) { dprintf(1, "couldn't open file for reading\n"); @@ -215,7 +215,7 @@ dtrace_dof_init(void) if ((fd = open64(devnamep, O_RDWR)) < 0) { dprintf(1, "failed to open helper device %s", devnamep); -#if defined(sun) +#ifdef illumos /* * If the device path wasn't explicitly set, try again with * the old device path. @@ -237,14 +237,14 @@ dtrace_dof_init(void) dprintf(1, "DTrace ioctl failed for DOF at %p", dof); else { dprintf(1, "DTrace ioctl succeeded for DOF at %p\n", dof); -#if !defined(sun) +#ifndef illumos gen = dh.gen; #endif } (void) close(fd); -#if !defined(sun) +#ifndef illumos /* End of while loop */ dof = dof_next; } @@ -254,7 +254,7 @@ dtrace_dof_init(void) #endif } -#if defined(sun) +#ifdef illumos #pragma fini(dtrace_dof_fini) #else static void dtrace_dof_fini(void) __attribute__ ((destructor)); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sat Jan 17 14:44:59 2015 (r277300) @@ -35,7 +35,7 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #else #include @@ -453,7 +453,7 @@ dt_aggregate_snap_cpu(dtrace_hdl_t *dtp, buf->dtbd_cpu = cpu; -#if defined(sun) +#ifdef illumos if (dt_ioctl(dtp, DTRACEIOC_AGGSNAP, buf) == -1) { #else if (dt_ioctl(dtp, DTRACEIOC_AGGSNAP, &buf) == -1) { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sat Jan 17 14:44:59 2015 (r277300) @@ -1888,7 +1888,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) char **argv = malloc(sizeof (char *) * (argc + 5)); FILE *ofp = tmpfile(); -#if defined(sun) +#ifdef illumos char ipath[20], opath[20]; /* big enough for /dev/fd/ + INT_MAX + \0 */ #endif char verdef[32]; /* big enough for -D__SUNW_D_VERSION=0x%08x + \0 */ @@ -1898,7 +1898,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) int wstat, estat; pid_t pid; -#if defined(sun) +#ifdef illumos off64_t off; #else off_t off = 0; @@ -1929,7 +1929,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) (void) fseeko64(ifp, off, SEEK_SET); } -#if defined(sun) +#ifdef illumos (void) snprintf(ipath, sizeof (ipath), "/dev/fd/%d", fileno(ifp)); (void) snprintf(opath, sizeof (opath), "/dev/fd/%d", fileno(ofp)); #endif @@ -1940,7 +1940,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) "-D__SUNW_D_VERSION=0x%08x", dtp->dt_vmax); argv[argc++] = verdef; -#if defined(sun) +#ifdef illumos switch (dtp->dt_stdcmode) { case DT_STDC_XA: case DT_STDC_XT: @@ -1982,7 +1982,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) } if (pid == 0) { -#if !defined(sun) +#ifndef illumos if (isatty(fileno(ifp)) == 0) lseek(fileno(ifp), off, SEEK_SET); dup2(fileno(ifp), 0); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Jan 17 14:44:59 2015 (r277300) @@ -35,12 +35,12 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif #include #include -#if !defined(sun) +#ifndef illumos #include #endif @@ -2958,7 +2958,7 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d buf->dtbd_size = size; buf->dtbd_cpu = cpu; -#if defined(sun) +#ifdef illumos if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, buf) == -1) { #else if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, &buf) == -1) { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sat Jan 17 14:44:59 2015 (r277300) @@ -26,12 +26,12 @@ */ #include -#if defined(sun) +#ifdef illumos #include #endif #include -#if defined(sun) +#ifdef illumos #include #endif #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Sat Jan 17 14:44:59 2015 (r277300) @@ -145,7 +145,7 @@ dtrace_errno(dtrace_hdl_t *dtp) return (dtp->dt_errno); } -#if defined(sun) +#ifdef illumos int dt_set_errno(dtrace_hdl_t *dtp, int err) { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Jan 17 14:44:59 2015 (r277300) @@ -31,7 +31,7 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c Sat Jan 17 14:44:59 2015 (r277300) @@ -28,18 +28,18 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#if defined(sun) +#ifdef illumos #include #endif #include #include -#if defined(sun) +#ifdef illumos #include #endif #include #include #include -#if defined(sun) +#ifdef illumos #include #endif #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sat Jan 17 14:44:59 2015 (r277300) @@ -34,7 +34,7 @@ #include #include -#if !defined(sun) +#ifndef illumos #include #include #include @@ -45,7 +45,7 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif @@ -142,7 +142,7 @@ typedef struct dt_module { GElf_Addr dm_bss_va; /* virtual address of BSS */ GElf_Xword dm_bss_size; /* size in bytes of BSS */ dt_idhash_t *dm_extern; /* external symbol definitions */ -#if !defined(sun) +#ifndef illumos caddr_t dm_reloc_offset; /* Symbol relocation offset. */ uintptr_t *dm_sec_offsets; #endif @@ -296,7 +296,7 @@ struct dtrace_hdl { int dt_version; /* library version requested by client */ int dt_ctferr; /* error resulting from last CTF failure */ int dt_errno; /* error resulting from last failed operation */ -#if !defined(sun) +#ifndef illumos const char *dt_errfile; int dt_errline; #endif @@ -305,7 +305,7 @@ struct dtrace_hdl { int dt_fterr; /* saved errno from failed open of dt_ftfd */ int dt_cdefs_fd; /* file descriptor for C CTF debugging cache */ int dt_ddefs_fd; /* file descriptor for D CTF debugging cache */ -#if defined(sun) +#ifdef illumos int dt_stdout_fd; /* file descriptor for saved stdout */ #else FILE *dt_freopen_fp; /* file pointer for freopened stdout */ @@ -596,7 +596,7 @@ extern int dt_version_defined(dt_version extern char *dt_cpp_add_arg(dtrace_hdl_t *, const char *); extern char *dt_cpp_pop_arg(dtrace_hdl_t *); -#if defined(sun) +#ifdef illumos extern int dt_set_errno(dtrace_hdl_t *, int); #else int _dt_set_errno(dtrace_hdl_t *, int, const char *, int); @@ -606,7 +606,7 @@ void dt_get_errloc(dtrace_hdl_t *, const extern void dt_set_errmsg(dtrace_hdl_t *, const char *, const char *, const char *, int, const char *, va_list); -#if defined(sun) +#ifdef illumos extern int dt_ioctl(dtrace_hdl_t *, int, void *); #else extern int dt_ioctl(dtrace_hdl_t *, u_long, void *); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sat Jan 17 14:44:59 2015 (r277300) @@ -44,7 +44,7 @@ * We need to undefine lex's input and unput macros so that references to these * call the functions provided at the end of this source file. */ -#if defined(sun) +#ifdef illumos #undef input #undef unput #else @@ -79,7 +79,7 @@ #endif static int id_or_type(const char *); -#if defined(sun) +#ifdef illumos static int input(void); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 15:19:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FD08A1A; Sat, 17 Jan 2015 15:19:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C87B2F5; Sat, 17 Jan 2015 15:19:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HFJJT6001603; Sat, 17 Jan 2015 15:19:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HFJJIx001602; Sat, 17 Jan 2015 15:19:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501171519.t0HFJJIx001602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 17 Jan 2015 15:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277301 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 15:19:19 -0000 Author: pfg Date: Sat Jan 17 15:19:18 2015 New Revision: 277301 URL: https://svnweb.freebsd.org/changeset/base/277301 Log: ext2: cosmetical issues Minor sorting and note when the cases are expected to fall through. MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_hash.c Modified: head/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Sat Jan 17 14:44:59 2015 (r277300) +++ head/sys/fs/ext2fs/ext2_hash.c Sat Jan 17 15:19:18 2015 (r277301) @@ -196,10 +196,10 @@ ext2_prep_hashbuf(const char *src, int s { uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24); uint32_t buf_val; - int len, i; - int buf_byte; const unsigned char *ubuf = (const unsigned char *)src; const signed char *sbuf = (const signed char *)src; + int len, i; + int buf_byte; if (slen > dlen) len = dlen; @@ -265,6 +265,7 @@ ext2_htree_hash(const char *name, int le switch (hash_version) { case EXT2_HTREE_TEA_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_TEA: while (len > 0) { ext2_prep_hashbuf(name, len, data, 16, unsigned_char); @@ -277,11 +278,13 @@ ext2_htree_hash(const char *name, int le break; case EXT2_HTREE_LEGACY_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_LEGACY: major = ext2_legacy_hash(name, len, unsigned_char); break; case EXT2_HTREE_HALF_MD4_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_HALF_MD4: while (len > 0) { ext2_prep_hashbuf(name, len, data, 32, unsigned_char); From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 16:36:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 963254C1; Sat, 17 Jan 2015 16:36:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E52AC69; Sat, 17 Jan 2015 16:36:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HGai8c039614; Sat, 17 Jan 2015 16:36:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HGadsf039591; Sat, 17 Jan 2015 16:36:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501171636.t0HGadsf039591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 17 Jan 2015 16:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 16:36:44 -0000 Author: hselasky Date: Sat Jan 17 16:36:39 2015 New Revision: 277302 URL: https://svnweb.freebsd.org/changeset/base/277302 Log: Start importing the basic OFED linux compatibility layer changes made by dumbbell@ to be able to compile this layer as a dependency module. Clean up some Makefiles and remove the no longer used OFED define. Currently only i386 and amd64 targets are supported. MFC after: 1 month Sponsored by: Mellanox Technologies Added: head/sys/modules/linuxapi/ head/sys/modules/linuxapi/Makefile (contents, props changed) head/sys/ofed/include/linux/linux_kmod.c (contents, props changed) head/sys/ofed/include/linux/linux_pci.c (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/sys/modules/ibcore/Makefile head/sys/modules/ipoib/Makefile head/sys/modules/mlx4/Makefile head/sys/modules/mlx4ib/Makefile head/sys/ofed/drivers/infiniband/core/device.c head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/pci.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/conf/files Sat Jan 17 16:36:39 2015 (r277302) @@ -3571,13 +3571,13 @@ nlm/nlm_prot_svc.c optional nfslockd | nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd +# Linux Kernel Compatibility API +ofed/include/linux/linux_kmod.c optional ofed | compat_linuxapi +ofed/include/linux/linux_compat.c optional ofed | compat_linuxapi +ofed/include/linux/linux_pci.c optional ofed | compat_linuxapi +ofed/include/linux/linux_idr.c optional ofed | compat_linuxapi +ofed/include/linux/linux_radix.c optional ofed | compat_linuxapi # OpenFabrics Enterprise Distribution (Infiniband) -ofed/include/linux/linux_compat.c optional ofed \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_idr.c optional ofed \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_radix.c optional ofed \ - no-depend compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.c optional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/conf/options Sat Jan 17 16:36:39 2015 (r277302) @@ -85,6 +85,7 @@ COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7 opt_compat.h COMPAT_FREEBSD9 opt_compat.h COMPAT_FREEBSD10 opt_compat.h +COMPAT_LINUXAPI opt_compat.h COMPILING_LINT opt_global.h COMPRESS_USER_CORES opt_core.h CY_PCI_FASTINTR @@ -907,7 +908,6 @@ FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack -OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -198,6 +198,7 @@ SUBDIR= \ ${_linprocfs} \ ${_linsysfs} \ ${_linux} \ + ${_linuxapi} \ lmc \ lpt \ mac_biba \ @@ -501,6 +502,7 @@ _ipoib= ipoib _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux +_linuxapi= linuxapi _ndis= ndis .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris Modified: head/sys/modules/ibcore/Makefile ============================================================================== --- head/sys/modules/ibcore/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/ibcore/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -2,19 +2,19 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/core .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = ibcore -SRCS = addr.c cm_msgs.h iwcm.c mad_rmpp.h sa_query.c ucma.c uverbs_cmd.c -SRCS+= agent.c local_sa.c iwcm.h multicast.c smi.c ud_header.c uverbs_main.c -SRCS+= agent.h core_priv.h mad.c notice.c smi.h umem.c uverbs_marshall.c -SRCS+= cache.c device.c mad_priv.h packer.c sysfs.c user_mad.c verbs.c -SRCS+= cm.c fmr_pool.c mad_rmpp.c sa.h ucm.c uverbs.h cma.c -SRCS+= linux_compat.c linux_radix.c linux_idr.c -SRCS+= vnode_if.h device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h +KMOD= ibcore +SRCS= addr.c iwcm.c sa_query.c ucma.c uverbs_cmd.c \ + agent.c local_sa.c multicast.c smi.c ud_header.c uverbs_main.c \ + mad.c notice.c umem.c uverbs_marshall.c \ + cache.c device.c packer.c sysfs.c user_mad.c verbs.c \ + cm.c fmr_pool.c mad_rmpp.c ucm.c cma.c \ + vnode_if.h device_if.h bus_if.h pci_if.h \ + opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/core CFLAGS+= -I${.CURDIR}/../mlx4ib CFLAGS+= -I${.CURDIR}/../../ofed/include/ -CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -DINET6 -DINET .include Modified: head/sys/modules/ipoib/Makefile ============================================================================== --- head/sys/modules/ipoib/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/ipoib/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -2,15 +2,16 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = ipoib -SRCS = device_if.h bus_if.h opt_ofed.h vnode_if.h opt_inet.h opt_inet6.h -SRCS += ipoib_cm.c ipoib_ib.c ipoib_main.c ipoib_multicast.c ipoib_verbs.c ipoib.h -SRCS+= linux_compat.c linux_radix.c linux_idr.c +KMOD= ipoib +SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ + opt_inet.h opt_inet6.h opt_ofed.h \ + ipoib_cm.c ipoib_ib.c ipoib_main.c \ + ipoib_multicast.c ipoib_verbs.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib CFLAGS+= -I${.CURDIR}/../ibcore CFLAGS+= -I${.CURDIR}/../../ofed/include/ -CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -DINET6 -DINET .include Added: head/sys/modules/linuxapi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/linuxapi/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -0,0 +1,18 @@ +# $FreeBSD$ +.PATH: ${.CURDIR}/../../ofed/include/linux + +KMOD= linuxapi +SRCS= linux_kmod.c \ + linux_compat.c \ + linux_pci.c \ + linux_radix.c \ + linux_idr.c + +SRCS+= bus_if.h \ + device_if.h \ + pci_if.h \ + vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../ofed/include/ + +.include Modified: head/sys/modules/mlx4/Makefile ============================================================================== --- head/sys/modules/mlx4/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/mlx4/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -1,10 +1,14 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = mlx4 -SRCS = device_if.h bus_if.h pci_if.h vnode_if.h opt_inet.h opt_inet6.h -SRCS+= alloc.c catas.c cmd.c cq.c eq.c fw.c icm.c intf.c main.c mcg.c mr.c linux_compat.c linux_radix.c linux_idr.c -SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c resource_tracker.c sys_tune.c + +KMOD= mlx4 +SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ + opt_inet.h opt_inet6.h \ + alloc.c catas.c cmd.c cq.c eq.c \ + fw.c icm.c intf.c main.c mcg.c mr.c \ + pd.c port.c profile.c qp.c reset.c sense.c \ + srq.c resource_tracker.c sys_tune.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ Modified: head/sys/modules/mlx4ib/Makefile ============================================================================== --- head/sys/modules/mlx4ib/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/mlx4ib/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -2,18 +2,16 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = mlx4ib -SRCS = device_if.h bus_if.h pci_if.h vnode_if.h -SRCS+= linux_compat.c linux_radix.c linux_idr.c -SRCS+= alias_GUID.c mcg.c sysfs.c ah.c cq.c doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c -SRCS+= opt_inet.h opt_inet6.h +KMOD= mlx4ib +SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ + opt_inet.h opt_inet6.h \ + alias_GUID.c mcg.c sysfs.c ah.c cq.c \ + doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c -#CFLAGS+= -I${.CURDIR}/../../ofed/include/ -#CFLAGS+= -I${.CURDIR}/../../../../include CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM -CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -DINET6 -DINET CFLAGS+= -fms-extensions .include Modified: head/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/device.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/infiniband/core/device.c Sat Jan 17 16:36:39 2015 (r277302) @@ -768,4 +768,5 @@ static moduledata_t ibcore_mod = { }; MODULE_VERSION(ibcore, 1); +MODULE_DEPEND(ibcore, linuxapi, 1, 1, 1); DECLARE_MODULE(ibcore, ibcore_mod, SI_SUB_SMP, SI_ORDER_ANY); Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -2420,3 +2420,4 @@ static moduledata_t mlx4ib_mod = { DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlx4ib, mlx4, 1, 1, 1); MODULE_DEPEND(mlx4ib, ibcore, 1, 1, 1); +MODULE_DEPEND(mlx4ib, linuxapi, 1, 1, 1); Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -1542,4 +1542,4 @@ static moduledata_t ipoib_mod = { DECLARE_MODULE(ipoib, ipoib_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_DEPEND(ipoib, ibcore, 1, 1, 1); - +MODULE_DEPEND(ipoib, linuxapi, 1, 1, 1); Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -349,3 +349,4 @@ static moduledata_t mlxen_mod = { }; DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlxen, mlx4, 1, 1, 1); +MODULE_DEPEND(mlxen, linuxapi, 1, 1, 1); Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/net/mlx4/main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -3796,3 +3796,5 @@ static moduledata_t mlx4_mod = { }; MODULE_VERSION(mlx4, 1); DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); +MODULE_DEPEND(mlx4, linuxapi, 1, 1, 1); + Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/include/linux/linux_compat.c Sat Jan 17 16:36:39 2015 (r277302) @@ -343,7 +343,8 @@ linux_dev_read(struct cdev *dev, struct bytes = filp->f_op->read(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); if (bytes >= 0) { - uio->uio_iov->iov_base += bytes; + uio->uio_iov->iov_base = + ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; } else @@ -377,7 +378,8 @@ linux_dev_write(struct cdev *dev, struct bytes = filp->f_op->write(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); if (bytes >= 0) { - uio->uio_iov->iov_base += bytes; + uio->uio_iov->iov_base = + ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; } else @@ -498,7 +500,8 @@ linux_file_read(struct file *file, struc bytes = filp->f_op->read(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); if (bytes >= 0) { - uio->uio_iov->iov_base += bytes; + uio->uio_iov->iov_base = + ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; } else @@ -736,7 +739,6 @@ linux_compat_init(void) for (i = 0; i < VMMAP_HASH_SIZE; i++) LIST_INIT(&vmmaphead[i]); } - SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); static void Added: head/sys/ofed/include/linux/linux_kmod.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ofed/include/linux/linux_kmod.c Sat Jan 17 16:36:39 2015 (r277302) @@ -0,0 +1,33 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2015 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +MODULE_VERSION(linuxapi, 1); +MODULE_DEPEND(linuxapi, pci, 1, 1, 1); + Added: head/sys/ofed/include/linux/linux_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ofed/include/linux/linux_pci.c Sat Jan 17 16:36:39 2015 (r277302) @@ -0,0 +1,206 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2015 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static device_probe_t linux_pci_probe; +static device_attach_t linux_pci_attach; +static device_detach_t linux_pci_detach; + +static device_method_t pci_methods[] = { + DEVMETHOD(device_probe, linux_pci_probe), + DEVMETHOD(device_attach, linux_pci_attach), + DEVMETHOD(device_detach, linux_pci_detach), + DEVMETHOD_END +}; + +static struct pci_driver * +linux_pci_find(device_t dev, const struct pci_device_id **idp) +{ + const struct pci_device_id *id; + struct pci_driver *pdrv; + uint16_t vendor; + uint16_t device; + + vendor = pci_get_vendor(dev); + device = pci_get_device(dev); + + spin_lock(&pci_lock); + list_for_each_entry(pdrv, &pci_drivers, links) { + for (id = pdrv->id_table; id->vendor != 0; id++) { + if (vendor == id->vendor && device == id->device) { + *idp = id; + spin_unlock(&pci_lock); + return (pdrv); + } + } + } + spin_unlock(&pci_lock); + return (NULL); +} + +static int +linux_pci_probe(device_t dev) +{ + const struct pci_device_id *id; + struct pci_driver *pdrv; + + if ((pdrv = linux_pci_find(dev, &id)) == NULL) + return (ENXIO); + if (device_get_driver(dev) != &pdrv->driver) + return (ENXIO); + device_set_desc(dev, pdrv->name); + return (0); +} + +static int +linux_pci_attach(device_t dev) +{ + struct resource_list_entry *rle; + struct pci_dev *pdev; + struct pci_driver *pdrv; + const struct pci_device_id *id; + int error; + + pdrv = linux_pci_find(dev, &id); + pdev = device_get_softc(dev); + pdev->dev.parent = &linux_rootdev; + pdev->dev.bsddev = dev; + INIT_LIST_HEAD(&pdev->dev.irqents); + pdev->device = id->device; + pdev->vendor = id->vendor; + pdev->dev.dma_mask = &pdev->dma_mask; + pdev->pdrv = pdrv; + kobject_init(&pdev->dev.kobj, &dev_ktype); + kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); + kobject_add(&pdev->dev.kobj, &linux_rootdev.kobj, + kobject_name(&pdev->dev.kobj)); + rle = _pci_get_rle(pdev, SYS_RES_IRQ, 0); + if (rle) + pdev->dev.irq = rle->start; + else + pdev->dev.irq = 0; + pdev->irq = pdev->dev.irq; + mtx_unlock(&Giant); + spin_lock(&pci_lock); + list_add(&pdev->links, &pci_devices); + spin_unlock(&pci_lock); + error = pdrv->probe(pdev, id); + mtx_lock(&Giant); + if (error) { + spin_lock(&pci_lock); + list_del(&pdev->links); + spin_unlock(&pci_lock); + put_device(&pdev->dev); + return (-error); + } + return (0); +} + +static int +linux_pci_detach(device_t dev) +{ + struct pci_dev *pdev; + + pdev = device_get_softc(dev); + mtx_unlock(&Giant); + pdev->pdrv->remove(pdev); + mtx_lock(&Giant); + spin_lock(&pci_lock); + list_del(&pdev->links); + spin_unlock(&pci_lock); + put_device(&pdev->dev); + + return (0); +} + +int +pci_register_driver(struct pci_driver *pdrv) +{ + devclass_t bus; + int error = 0; + + bus = devclass_find("pci"); + + spin_lock(&pci_lock); + list_add(&pdrv->links, &pci_drivers); + spin_unlock(&pci_lock); + pdrv->driver.name = pdrv->name; + pdrv->driver.methods = pci_methods; + pdrv->driver.size = sizeof(struct pci_dev); + mtx_lock(&Giant); + if (bus != NULL) { + error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT, + &pdrv->bsdclass); + } + mtx_unlock(&Giant); + return (-error); +} + +void +pci_unregister_driver(struct pci_driver *pdrv) +{ + devclass_t bus; + + bus = devclass_find("pci"); + + list_del(&pdrv->links); + mtx_lock(&Giant); + if (bus != NULL) + devclass_delete_driver(bus, &pdrv->driver); + mtx_unlock(&Giant); +} + Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/include/linux/pci.h Sat Jan 17 16:36:39 2015 (r277302) @@ -409,146 +409,8 @@ pci_write_config_dword(struct pci_dev *p return (0); } -static struct pci_driver * -linux_pci_find(device_t dev, const struct pci_device_id **idp) -{ - const struct pci_device_id *id; - struct pci_driver *pdrv; - uint16_t vendor; - uint16_t device; - - vendor = pci_get_vendor(dev); - device = pci_get_device(dev); - - spin_lock(&pci_lock); - list_for_each_entry(pdrv, &pci_drivers, links) { - for (id = pdrv->id_table; id->vendor != 0; id++) { - if (vendor == id->vendor && device == id->device) { - *idp = id; - spin_unlock(&pci_lock); - return (pdrv); - } - } - } - spin_unlock(&pci_lock); - return (NULL); -} - -static inline int -linux_pci_probe(device_t dev) -{ - const struct pci_device_id *id; - struct pci_driver *pdrv; - - if ((pdrv = linux_pci_find(dev, &id)) == NULL) - return (ENXIO); - if (device_get_driver(dev) != &pdrv->driver) - return (ENXIO); - device_set_desc(dev, pdrv->name); - return (0); -} - -static inline int -linux_pci_attach(device_t dev) -{ - struct resource_list_entry *rle; - struct pci_dev *pdev; - struct pci_driver *pdrv; - const struct pci_device_id *id; - int error; - - pdrv = linux_pci_find(dev, &id); - pdev = device_get_softc(dev); - pdev->dev.parent = &linux_rootdev; - pdev->dev.bsddev = dev; - INIT_LIST_HEAD(&pdev->dev.irqents); - pdev->device = id->device; - pdev->vendor = id->vendor; - pdev->dev.dma_mask = &pdev->dma_mask; - pdev->pdrv = pdrv; - kobject_init(&pdev->dev.kobj, &dev_ktype); - kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); - kobject_add(&pdev->dev.kobj, &linux_rootdev.kobj, - kobject_name(&pdev->dev.kobj)); - rle = _pci_get_rle(pdev, SYS_RES_IRQ, 0); - if (rle) - pdev->dev.irq = rle->start; - else - pdev->dev.irq = 0; - pdev->irq = pdev->dev.irq; - mtx_unlock(&Giant); - spin_lock(&pci_lock); - list_add(&pdev->links, &pci_devices); - spin_unlock(&pci_lock); - error = pdrv->probe(pdev, id); - mtx_lock(&Giant); - if (error) { - spin_lock(&pci_lock); - list_del(&pdev->links); - spin_unlock(&pci_lock); - put_device(&pdev->dev); - return (-error); - } - return (0); -} - -static inline int -linux_pci_detach(device_t dev) -{ - struct pci_dev *pdev; - - pdev = device_get_softc(dev); - mtx_unlock(&Giant); - pdev->pdrv->remove(pdev); - mtx_lock(&Giant); - spin_lock(&pci_lock); - list_del(&pdev->links); - spin_unlock(&pci_lock); - put_device(&pdev->dev); - - return (0); -} - -static device_method_t pci_methods[] = { - DEVMETHOD(device_probe, linux_pci_probe), - DEVMETHOD(device_attach, linux_pci_attach), - DEVMETHOD(device_detach, linux_pci_detach), - {0, 0} -}; - -static inline int -pci_register_driver(struct pci_driver *pdrv) -{ - devclass_t bus; - int error; - - spin_lock(&pci_lock); - list_add(&pdrv->links, &pci_drivers); - spin_unlock(&pci_lock); - bus = devclass_find("pci"); - pdrv->driver.name = pdrv->name; - pdrv->driver.methods = pci_methods; - pdrv->driver.size = sizeof(struct pci_dev); - mtx_lock(&Giant); - error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT, - &pdrv->bsdclass); - mtx_unlock(&Giant); - if (error) - return (-error); - return (0); -} - -static inline void -pci_unregister_driver(struct pci_driver *pdrv) -{ - devclass_t bus; - - list_del(&pdrv->links); - bus = devclass_find("pci"); - mtx_lock(&Giant); - devclass_delete_driver(bus, &pdrv->driver); - mtx_unlock(&Giant); -} +extern int pci_register_driver(struct pci_driver *pdrv); +extern void pci_unregister_driver(struct pci_driver *pdrv); struct msix_entry { int entry; @@ -837,5 +699,4 @@ static inline int pcie_capability_write_ return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val); } - #endif /* _LINUX_PCI_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 17:31:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9080223; Sat, 17 Jan 2015 17:31:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56A0219; Sat, 17 Jan 2015 17:31:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HHVmUo066478; Sat, 17 Jan 2015 17:31:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HHVmW8066460; Sat, 17 Jan 2015 17:31:48 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501171731.t0HHVmW8066460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 17:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277303 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 17:31:48 -0000 Author: adrian Date: Sat Jan 17 17:31:47 2015 New Revision: 277303 URL: https://svnweb.freebsd.org/changeset/base/277303 Log: Skip the OFDM weak signal threshold detection programming for AR9462/AR9565. This and some upcoming changes to the HAL for these chips should address some of the signal sensitivity reported by users. Tested: * AR9462 (WB222), STA mode Obtained from: Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Sat Jan 17 16:36:39 2015 (r277302) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Sat Jan 17 17:31:47 2015 (r277303) @@ -484,6 +484,9 @@ ar9300_ani_control(struct ath_hal *ah, H */ is_on = param ? 1 : 0; + if (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) + goto skip_ws_det; + /* * make register setting for default (weak sig detect ON) * come from INI file @@ -528,6 +531,7 @@ ar9300_ani_control(struct ath_hal *ah, H m1_thresh_ext); OS_REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT, AR_PHY_SFCORR_EXT_M2_THRESH, m2_thresh_ext); +skip_ws_det: if (is_on) { OS_REG_SET_BIT(ah, AR_PHY_SFCORR_LOW, AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 17:37:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03E1D573; Sat, 17 Jan 2015 17:37:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9F69279; Sat, 17 Jan 2015 17:37:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HHb9XK067725; Sat, 17 Jan 2015 17:37:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HHb9cD067723; Sat, 17 Jan 2015 17:37:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501171737.t0HHb9cD067723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 17:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277304 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 17:37:10 -0000 Author: adrian Date: Sat Jan 17 17:37:08 2015 New Revision: 277304 URL: https://svnweb.freebsd.org/changeset/base/277304 Log: Correct the descriptor length for AR9462/AR9565 and set the final field to zero - TX drops are otherwise reported. Tested: * AR9462 (WB222), STA mode Obtained from: Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Sat Jan 17 17:31:47 2015 (r277303) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Sat Jan 17 17:37:08 2015 (r277304) @@ -68,9 +68,11 @@ ar9300_fill_tx_desc( const void *ds0) { struct ar9300_txc *ads = AR9300TXC(ds); + short desclen; /* Fill TXC info field */ - ads->ds_info = TXC_INFO(qcu); + desclen = (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) ? 0x18 : 0x17; + ads->ds_info = TXC_INFO(qcu, desclen); /* Set the buffer addresses */ ads->ds_data0 = buf_addr[0]; @@ -124,6 +126,9 @@ ar9300_fill_tx_desc( ads->ds_ctl17 = SM(key_type, AR_encr_type); } + /* Only relevant for Jupiter/Aphrodite */ + ads->ds_ctl23 = 0; + return AH_TRUE; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Sat Jan 17 17:31:47 2015 (r277303) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Sat Jan 17 17:37:08 2015 (r277304) @@ -78,7 +78,8 @@ struct ar9300_txc { u_int32_t ds_ctl20; /* DMA control 20 */ u_int32_t ds_ctl21; /* DMA control 21 */ u_int32_t ds_ctl22; /* DMA control 22 */ - u_int32_t ds_pad[9]; /* pad to cache line (128 bytes/32 dwords) */ + u_int32_t ds_ctl23; /* DMA control 23 */ + u_int32_t ds_pad[8]; /* pad to cache line (128 bytes/32 dwords) */ }; @@ -429,11 +430,11 @@ struct ar9300_txc { #define RXSTATUS_NUMWORDS(ah) 11 -#define TXC_INFO(_qcu) (ATHEROS_VENDOR_ID << AR_desc_id_S) \ +#define TXC_INFO(_qcu, _desclen) (ATHEROS_VENDOR_ID << AR_desc_id_S) \ | (1 << AR_tx_rx_desc_S) \ | (1 << AR_ctrl_stat_S) \ | (_qcu << AR_tx_qcu_num_S) \ - | (0x17) + | (_desclen) #define VALID_KEY_TYPES \ ((1 << HAL_KEY_TYPE_CLEAR) | (1 << HAL_KEY_TYPE_WEP)|\ From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 18:40:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43BBD5E8; Sat, 17 Jan 2015 18:40:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FFE8B02; Sat, 17 Jan 2015 18:40:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HIelxw097599; Sat, 17 Jan 2015 18:40:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HIel6R097598; Sat, 17 Jan 2015 18:40:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501171840.t0HIel6R097598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 17 Jan 2015 18:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277305 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 18:40:47 -0000 Author: ian Date: Sat Jan 17 18:40:46 2015 New Revision: 277305 URL: https://svnweb.freebsd.org/changeset/base/277305 Log: Minor cleanups, comment changes. No need to load 3 values when setting up the stack for secondary cores, the other two values are only used for zeroing bss on the primary core. No need to store the size of the stack at the top of the stack (seems to be a leftover instruction from some cut-n-paste). Modified: head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Sat Jan 17 17:37:08 2015 (r277304) +++ head/sys/arm/arm/locore-v6.S Sat Jan 17 18:40:46 2015 (r277305) @@ -367,9 +367,9 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lstart: - .word _edata - .word _ebss - .word svcstk + .word _edata /* Note that these three items are */ + .word _ebss /* loaded with a single ldmia and */ + .word svcstk /* must remain in order together. */ .Lmainreturned: .asciz "main() returned" @@ -425,20 +425,19 @@ ASENTRY_NP(mpentry) bl init_mmu - adr r1, .Lstart - ldmia r1, {r1, r2, sp} /* Set initial stack and */ - mrc p15, 0, r0, c0, c0, 5 - and r0, r0, #15 + adr r1, .Lstart+8 /* Get initstack pointer from */ + ldr sp, [r1] /* startup data. */ + mrc CP15_MPIDR(r0) /* Get processor id number. */ + and r0, r0, #0x0f mov r1, #INIT_ARM_STACK_SIZE - mul r2, r1, r0 - add sp, sp, r2 - str r1, [sp] + mul r2, r1, r0 /* Point sp to initstack */ + add sp, sp, r2 /* area for this processor. */ /* Switch to virtual addresses. */ ldr pc, =1f 1: mov fp, #0 /* trace back starts here */ - bl _C_LABEL(init_secondary) /* Off we go */ + bl _C_LABEL(init_secondary)/* Off we go, cpu id in r0. */ adr r0, .Lmpreturned b _C_LABEL(panic) From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 18:56:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F37607F0; Sat, 17 Jan 2015 18:56:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5DE8BEC; Sat, 17 Jan 2015 18:56:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HIuNEA005382; Sat, 17 Jan 2015 18:56:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HIuN1a005381; Sat, 17 Jan 2015 18:56:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501171856.t0HIuN1a005381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 17 Jan 2015 18:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277306 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 18:56:24 -0000 Author: ian Date: Sat Jan 17 18:56:22 2015 New Revision: 277306 URL: https://svnweb.freebsd.org/changeset/base/277306 Log: Add defines for SDHCI 3.0 controllers. Submitted by: Michal Meloun Modified: head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:40:46 2015 (r277305) +++ head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:56:22 2015 (r277306) @@ -169,6 +169,10 @@ #define SDHCI_INT_CARD_INSERT 0x00000040 #define SDHCI_INT_CARD_REMOVE 0x00000080 #define SDHCI_INT_CARD_INT 0x00000100 +#define SDHCI_INT_INT_A 0x00000200 +#define SDHCI_INT_INT_B 0x00000400 +#define SDHCI_INT_INT_C 0x00000800 +#define SDHCI_INT_RETUNE 0x00001000 #define SDHCI_INT_ERROR 0x00008000 #define SDHCI_INT_TIMEOUT 0x00010000 #define SDHCI_INT_CRC 0x00020000 @@ -180,6 +184,7 @@ #define SDHCI_INT_BUS_POWER 0x00800000 #define SDHCI_INT_ACMD12ERR 0x01000000 #define SDHCI_INT_ADMAERR 0x02000000 +#define SDHCI_INT_TUNEERR 0x04000000 #define SDHCI_INT_NORMAL_MASK 0x00007FFF #define SDHCI_INT_ERROR_MASK 0xFFFF8000 @@ -195,6 +200,7 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C +#define SDHCI_HOST_CONTROL2 0x3E #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F @@ -214,8 +220,31 @@ #define SDHCI_CAN_VDD_300 0x02000000 #define SDHCI_CAN_VDD_180 0x04000000 #define SDHCI_CAN_DO_64BIT 0x10000000 +#define SDHCI_CAN_ASYNC_INTR 0x20000000 + +#define SDHCI_CAPABILITIES2 0x44 +#define SDHCI_CAN_SDR50 0x00000001 +#define SDHCI_CAN_SDR104 0x00000002 +#define SDHCI_CAN_DDR50 0x00000004 +#define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 +#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_RETUNE_CNT_MASK 0x00000F00 +#define SDHCI_RETUNE_CNT_SHIFT 8 +#define SDHCI_TUNE_SDR50 0x00002000 +#define SDHCI_RETUNE_MODES_MASK 0x0000C000 +#define SDHCI_RETUNE_MODES_SHIFT 14 +#define SDHCI_CLOCK_MULT_MASK 0x00FF0000 +#define SDHCI_CLOCK_MULT_SHIFT 16 #define SDHCI_MAX_CURRENT 0x48 +#define SDHCI_FORCE_AUTO_EVENT 0x50 +#define SDHCI_FORCE_INTR_EVENT 0x52 +#define SDHCI_ADMA_ERR 0x54 +#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ADDRESS_HI 0x5C +#define SDHCI_PRESET_VALUE 0x60 +#define SDHCI_SHARED_BUS_CTRL 0xE0 #define SDHCI_SLOT_INT_STATUS 0xFC From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 19:57:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 281A5483; Sat, 17 Jan 2015 19:57:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 092C0152; Sat, 17 Jan 2015 19:57:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0HJv4fv033597; Sat, 17 Jan 2015 19:57:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HJv4NG033594; Sat, 17 Jan 2015 19:57:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501171957.t0HJv4NG033594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 17 Jan 2015 19:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277307 - in head/sys: arm/broadcom/bcm2835 dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 19:57:05 -0000 Author: ian Date: Sat Jan 17 19:57:03 2015 New Revision: 277307 URL: https://svnweb.freebsd.org/changeset/base/277307 Log: Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Apparently some sdhci controllers, such as the one on a Raspberry Pi, mishandle the signal timing in high speed signaling mode, but run just fine in standard mode with the bus running at frequencies between 25-50MHz (which shouldn't work). This is the solution adopted by U-Boot and other OSes (linux and *BSD) for the timeouts on Raspberry Pi boards with certain SD cards. Some research shows that this quirk is also used on a few other boards, so the fix is a generic quirk instead of being in the RPi-specific driver code. This change is based on information discovered by Michal Meloun. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Jan 17 18:56:22 2015 (r277306) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Jan 17 19:57:03 2015 (r277307) @@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$"); * HS mode still can be enabled with the tunable. */ static int bcm2835_sdhci_min_freq = 400000; -static int bcm2835_sdhci_hs = 0; +static int bcm2835_sdhci_hs = 1; static int bcm2835_sdhci_pio_mode = 0; TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq); @@ -235,6 +235,7 @@ bcm_sdhci_attach(device_t dev) sc->sc_slot.caps |= (default_freq << SDHCI_CLOCK_BASE_SHIFT); sc->sc_slot.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL + | SDHCI_QUIRK_DONT_SET_HISPD_BIT | SDHCI_QUIRK_MISSING_CAPS; sdhci_init_slot(dev, &sc->sc_slot, 0); Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Jan 17 18:56:22 2015 (r277306) +++ head/sys/dev/sdhci/sdhci.c Sat Jan 17 19:57:03 2015 (r277307) @@ -696,7 +696,8 @@ sdhci_generic_update_ios(device_t brdev, slot->hostctrl |= SDHCI_CTRL_4BITBUS; else slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; - if (ios->timing == bus_timing_hs) + if (ios->timing == bus_timing_hs && + !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) slot->hostctrl |= SDHCI_CTRL_HISPD; else slot->hostctrl &= ~SDHCI_CTRL_HISPD; Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:56:22 2015 (r277306) +++ head/sys/dev/sdhci/sdhci.h Sat Jan 17 19:57:03 2015 (r277307) @@ -61,6 +61,8 @@ #define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13) /* Wait to see reset bit asserted before waiting for de-asserted */ #define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) +/* Leave controller in standard mode when putting card in HS mode. */ +#define SDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15) /* * Controller registers From owner-svn-src-all@FreeBSD.ORG Sat Jan 17 23:19:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F7E0BC4 for ; Sat, 17 Jan 2015 23:19:09 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C7A07DB for ; Sat, 17 Jan 2015 23:19:09 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id lf10so31202854pab.4 for ; Sat, 17 Jan 2015 15:19:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=ZFEJrFd+nBHj1+JVmLxobnwPnOvuAZG7zw5gcB5J5H4=; b=fvZxu1Type/J4AZmX/1G8Jmh1Ec3FTQ1hxiJeIpJzQHWccc5buTu3z7EpKKFsgq52L P4nJSKWTHuS4vJ/KH7F/3mgpsQQ21rGlm86exD6Uz+TU8bmDwSbg+jH1ARhIU7/hzULr Wz7KJQsKN1D+e5M9rPHvNhSgnTUHk3r2Fx3tCUQUiauV26ftO/XOiyR5jfNDBQk9uEmJ Gqf5v42OPLh5Q0XE1XD9s+/xngP+DMGBdxHTyDsQFwS9C3N4R52/xUfsbhKpaZs5cb3+ 26lDJPa+FwQGt1+nxh4ZE2VV0H7l4eK2zJRfS2UaBPwtS7BmmOimDdrtkfN7Xb14WY5p EX3g== X-Gm-Message-State: ALoCoQm4DfZXIiR4r0bUFA9jlmnSB3m/EJxgwSM6vQkEPB1LBZc5PbPdE/+ow3aUC77RVDmg52pd X-Received: by 10.70.40.139 with SMTP id x11mr33629844pdk.124.1421536748673; Sat, 17 Jan 2015 15:19:08 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id t4sm7625946pdh.9.2015.01.17.15.19.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Jan 2015 15:19:08 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277285 - head/sys/x86/isa Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> Date: Sat, 17 Jan 2015 16:19:05 -0700 Message-Id: <717DFAD4-3B25-4ED8-A154-E7F91B61C959@bsdimp.com> References: <201501170218.t0H2I0AW038857@svn.freebsd.org> <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 23:19:09 -0000 --Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 17, 2015, at 6:31 AM, Bjoern A. Zeeb wrote: >=20 >=20 >> On 17 Jan 2015, at 02:18 , Warner Losh wrote: >>=20 >> Author: imp >> Date: Sat Jan 17 02:17:59 2015 >> New Revision: 277285 >> URL: https://svnweb.freebsd.org/changeset/base/277285 >>=20 >> Log: >> Need to include opt_mca.h to test for DEV_MCA. >>=20 >> Modified: >> head/sys/x86/isa/atpic.c >=20 >=20 > i386 LINT kernels: >=20 > /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of = undeclared identifier 'MCA_system' > /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of = undeclared identifier =E2=80=98MCA_system' I don=E2=80=99t get that far. After =E2=80=98make LINT=E2=80=99 in i386, = I get OFED unknown option=E2=80=A6 Warner >>=20 >> Modified: head/sys/x86/isa/atpic.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 = (r277284) >> +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 = (r277285) >> @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >>=20 >> #include "opt_auto_eoi.h" >> #include "opt_isa.h" >> +#include "opt_mca.h" >>=20 >> #include >> #include >>=20 >=20 > =E2=80=94 > Bjoern A. Zeeb Charles Haddon = Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have = failed > beneath the bitterness of their trial had they not found a friend." >=20 --Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUuu3pAAoJEGwc0Sh9sBEA0g4QAMQLhdXaHBcWpQSoCnNejRKM XVgIxL1ljO9Jq/LOMgMMwAovcNl+dTRy2fIZijJB6Z2Bwy0wGK7KbpYYQpVGysRD U8tXepPO1oGzp6JsAcwrl+z4KEw3IMBR+g48pf1RZUKZIKMjWkl+H6fb01LcviOU kOERM27JDDOAftRC21YSLj3U84AcfMpEE9XDTWvoz1HUK0SeNJTX7Hf/2jAOkeUH sFWFejCNxs7S8hJM1KT3Lpwj/wfTYBMysW+wGvPUBbB3jPoSwTO9COlODcDsCLlf DF0FEXjfYmbHcM+KUVmpVp/MLztC31hXf/vSnxOq0d5nnL6uw1glPHVqbgx2Kk9s RTrukTJGZ/F/8GWr/PGe1AxXHNLf2S4VLL8JwR11U5gTbvZmeVo2/O1noXlB5M5/ Iopjje4hhy+E10NYZARXxNkpxB21aadxNapH2YfoUnZywUSGFswZNUa0/wFJ/W/u vJr8EWvKjkZQJUjjjzDd6bLWophQXxrNm26xvttr5j4LF5Otnr56SqdWrDs/X6dj IGsphtlauu2/4UPQAaVJnkJthSYE/a3T9qDLbLbbwik/5AI14tzTYEfrtiW3PALf oa3ukbAeMg9GFeT42AFGSKX6z7+TEKaZppXxukUYQsJjFOx4BM4thxU08NcxhDGB qEQQ5nBuUO0Ey7qe+5+9 =zzwg -----END PGP SIGNATURE----- --Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC--