From owner-svn-src-all@freebsd.org Sun Jul 3 00:08:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFEDCB811AA; Sun, 3 Jul 2016 00:08:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9020E2F69; Sun, 3 Jul 2016 00:08:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6308HJr069011; Sun, 3 Jul 2016 00:08:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6308HRQ069010; Sun, 3 Jul 2016 00:08:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607030008.u6308HRQ069010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Jul 2016 00:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302317 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 00:08:18 -0000 Author: kib Date: Sun Jul 3 00:08:17 2016 New Revision: 302317 URL: https://svnweb.freebsd.org/changeset/base/302317 Log: Change type of the 'dead' variable to boolean. Requested by: alc MFC after: 1 week Approved by: re (gjb) Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Jul 2 11:54:20 2016 (r302316) +++ head/sys/vm/vm_fault.c Sun Jul 3 00:08:17 2016 (r302317) @@ -285,14 +285,14 @@ vm_fault_hold(vm_map_t map, vm_offset_t { vm_prot_t prot; int alloc_req, era, faultcount, nera, result; - boolean_t growstack, is_first_object_locked, wired; + boolean_t dead, growstack, is_first_object_locked, wired; int map_generation; vm_object_t next_object; int hardfault; struct faultstate fs; struct vnode *vp; vm_page_t m; - int ahead, behind, cluster_offset, dead, error, locked; + int ahead, behind, cluster_offset, error, locked; hardfault = 0; growstack = TRUE; From owner-svn-src-all@freebsd.org Sun Jul 3 00:31:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70D9EB817F9; Sun, 3 Jul 2016 00:31:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 300502BE9; Sun, 3 Jul 2016 00:31:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u630VXFI080203; Sun, 3 Jul 2016 00:31:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u630VXlL080202; Sun, 3 Jul 2016 00:31:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607030031.u630VXlL080202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 3 Jul 2016 00:31: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: r302318 - stable/10/release/amd64 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 00:31:34 -0000 Author: gjb Date: Sun Jul 3 00:31:33 2016 New Revision: 302318 URL: https://svnweb.freebsd.org/changeset/base/302318 Log: Limit VOLUME_LABEL (first argument to the mkisoimages scripts) to 32 characters. This is a direct commit to stable/10, as UEFI support natively exists for 11.0-CURRENT and unsupported in 9-STABLE. Submitted by: Rick Miller PR: 210463 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/amd64/mkisoimages-uefi.sh Modified: stable/10/release/amd64/mkisoimages-uefi.sh ============================================================================== --- stable/10/release/amd64/mkisoimages-uefi.sh Sun Jul 3 00:08:17 2016 (r302317) +++ stable/10/release/amd64/mkisoimages-uefi.sh Sun Jul 3 00:31:33 2016 (r302318) @@ -50,7 +50,7 @@ if [ $# -lt 3 ]; then exit 1 fi -LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift +LABEL=`echo $1 | tr '[:lower:]' '[:upper:]' | cut -c 1-31`; shift NAME=$1; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" From owner-svn-src-all@freebsd.org Sun Jul 3 01:23:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 652B3B8F0C2; Sun, 3 Jul 2016 01:23:00 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 199ED2DE7; Sun, 3 Jul 2016 01:23:00 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u631MxSq098576; Sun, 3 Jul 2016 01:22:59 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u631Mxs5098575; Sun, 3 Jul 2016 01:22:59 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607030122.u631Mxs5098575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 3 Jul 2016 01:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302319 - head/usr.sbin/bsdinstall/scripts 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 01:23:00 -0000 Author: allanjude Date: Sun Jul 3 01:22:59 2016 New Revision: 302319 URL: https://svnweb.freebsd.org/changeset/base/302319 Log: Fix an error in bsdinstall when ZFS installation uses a bootpool A separate bootpool is used when the selected partition type is MBR or when the disk is GELI encrypted and a UEFI loader is selected. BIOS avoids the bootpool by using bootcode and loader that support GELI. bsdinstall did not remount the bootpool after creating the main pool, which caused an error when mkdir tried to create /boot/zfs PR: 210717 Approved by: re (gjb) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sun Jul 3 00:31:33 2016 (r302318) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sun Jul 3 01:22:59 2016 (r302319) @@ -218,6 +218,7 @@ SWAP_GMIRROR_LABEL='gmirror label swap % SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12' UMOUNT='umount "%s"' ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' +ZFS_MOUNT='zfs mount "%s"' ZFS_SET='zfs set "%s" "%s"' ZFS_UNMOUNT='zfs unmount "%s"' ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' @@ -1350,13 +1351,6 @@ zfs_create_boot() $BSDINSTALL_CHROOT$dir || return $FAILURE done - # Create symlink(s) - if [ "$ZFSBOOT_BOOT_POOL" ]; then - f_dprintf "$funcname: Creating /boot symlink for boot pool..." - f_eval_catch $funcname ln "$LN_SF" "$bootpool_name/boot" \ - $BSDINSTALL_CHROOT/boot || return $FAILURE - fi - # Set bootfs property local zroot_bootfs="$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME" f_dprintf "$funcname: Setting bootfs property..." @@ -1396,7 +1390,16 @@ zfs_create_boot() fi fi - # While this is apparently not needed, it seems to help MBR + # Remount bootpool and create symlink(s) + if [ "$ZFSBOOT_BOOT_POOL" ]; then + f_eval_catch $funcname zfs "$ZFS_MOUNT" "$bootpool_name" || + return $FAILURE + f_dprintf "$funcname: Creating /boot symlink for boot pool..." + f_eval_catch $funcname ln "$LN_SF" "$bootpool_name/boot" \ + $BSDINSTALL_CHROOT/boot || return $FAILURE + fi + + # zpool.cache is required to mount more than one pool at boot time f_dprintf "$funcname: Configuring zpool.cache for zroot..." f_eval_catch $funcname mkdir "$MKDIR_P" $BSDINSTALL_CHROOT/boot/zfs || return $FAILURE From owner-svn-src-all@freebsd.org Sun Jul 3 01:23:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55FCFB8F179; Sun, 3 Jul 2016 01:23:39 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26B942F56; Sun, 3 Jul 2016 01:23:39 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u631NcZg098657; Sun, 3 Jul 2016 01:23:38 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u631NcEQ098656; Sun, 3 Jul 2016 01:23:38 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607030123.u631NcEQ098656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 3 Jul 2016 01:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302320 - head/usr.sbin/bsdinstall/scripts 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 01:23:39 -0000 Author: allanjude Date: Sun Jul 3 01:23:38 2016 New Revision: 302320 URL: https://svnweb.freebsd.org/changeset/base/302320 Log: Add more machines to the bsdinstall workaround blacklist Apply the LenovoFix (fake partition in pMBR is 2nd rather than 1st) and GPT Active fix (mark the fake pMBR partition active) to respective hardware that is confirmed to require such to boot correct. Submitted by: Sam Fourman Jr. (ThinkPad W520) Submitted by: Matthias Apitz (Latitude E6330) Approved by: re (gjb) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Sun Jul 3 01:22:59 2016 (r302319) +++ head/usr.sbin/bsdinstall/scripts/auto Sun Jul 3 01:23:38 2016 (r302320) @@ -182,7 +182,7 @@ if f_interactive; then case "$sys_maker" in "LENOVO") case "$sys_version" in - "ThinkPad X220"|"ThinkPad T420"|"ThinkPad T520") + "ThinkPad X220"|"ThinkPad T420"|"ThinkPad T520"|"ThinkPad W520") dialog_workaround "$msg_lenovo_fix" retval=$? f_dprintf "lenovofix_prompt=[%s]" "$retval" @@ -195,7 +195,7 @@ if f_interactive; then ;; "Dell Inc.") case "$sys_model" in - "Latitude E7440"|"Latitude E7240"|"Precision Tower 5810") + "Latitude E6330"|"Latitude E7440"|"Latitude E7240"|"Precision Tower 5810") dialog_workaround "$msg_gpt_active_fix" retval=$? f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" From owner-svn-src-all@freebsd.org Sun Jul 3 01:35:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B69F1B8F3E5; Sun, 3 Jul 2016 01:35:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 853A9244A; Sun, 3 Jul 2016 01:35:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u631ZRbn002560; Sun, 3 Jul 2016 01:35:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u631ZRq3002558; Sun, 3 Jul 2016 01:35:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607030135.u631ZRq3002558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 3 Jul 2016 01:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302321 - in head/contrib/libxo: . tests/core 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 01:35:28 -0000 Author: ngie Date: Sun Jul 3 01:35:27 2016 New Revision: 302321 URL: https://svnweb.freebsd.org/changeset/base/302321 Log: Update libxo to 0.6.3 This fixes the 02 testcases on i386 (at least), and may fix the testcases in general on 32-bit platforms Differential Revision: https://reviews.freebsd.org/D7052 Approved by: phil (maintainer) Approved by: re (gjb) Reported by: asomers Reviewed by: phil Submitted by: phil Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/libxo/configure.ac head/contrib/libxo/tests/core/test_02.c Directory Properties: head/contrib/libxo/ (props changed) Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Sun Jul 3 01:23:38 2016 (r302320) +++ head/contrib/libxo/configure.ac Sun Jul 3 01:35:27 2016 (r302321) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.6.2], [phil@juniper.net]) +AC_INIT([libxo], [0.6.3], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/tests/core/test_02.c ============================================================================== --- head/contrib/libxo/tests/core/test_02.c Sun Jul 3 01:23:38 2016 (r302320) +++ head/contrib/libxo/tests/core/test_02.c Sun Jul 3 01:35:27 2016 (r302321) @@ -70,7 +70,7 @@ main (int argc, char **argv) xo_emit(" {:lines/%7ju} {:words/%7ju} " "{:characters/%7ju} {d:filename/%s}\n", - 20, 30, 40, "file"); + (uintmax_t) 20, (uintmax_t) 30, (uintmax_t) 40, "file"); int i; for (i = 0; i < 5; i++) From owner-svn-src-all@freebsd.org Sun Jul 3 01:56:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 319A5B8F801; Sun, 3 Jul 2016 01:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02ADB2C44; Sun, 3 Jul 2016 01:56:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u631unhn010299; Sun, 3 Jul 2016 01:56:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u631unVB010298; Sun, 3 Jul 2016 01:56:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607030156.u631unVB010298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Jul 2016 01:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302322 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 01:56:50 -0000 Author: kib Date: Sun Jul 3 01:56:48 2016 New Revision: 302322 URL: https://svnweb.freebsd.org/changeset/base/302322 Log: Remove racy assert. The thread which changes vnode usecount from 0 to 1 does it under the vnode interlock, but the interlock is not owned by the asserting thread. As result, we might read increased use counter but also still see VI_OWEINACT. In collaboration with: nwhitehorn Hardware donated by: IBM LTC Sponsored by: The FreeBSD Foundation (kib) Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jul 3 01:35:27 2016 (r302321) +++ head/sys/kern/vfs_subr.c Sun Jul 3 01:56:48 2016 (r302322) @@ -2536,11 +2536,8 @@ vget(struct vnode *vp, int flags, struct * * Upgrade our holdcnt to a usecount. */ - if (vp->v_type != VCHR && - vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { - VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, - ("vnode with usecount and VI_OWEINACT set")); - } else { + if (vp->v_type == VCHR || + !vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { VI_LOCK(vp); if ((vp->v_iflag & VI_OWEINACT) == 0) { oweinact = 0; From owner-svn-src-all@freebsd.org Sun Jul 3 11:45:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CF2CB90E58; Sun, 3 Jul 2016 11:45:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DA772C58; Sun, 3 Jul 2016 11:45:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63BjsKY029174; Sun, 3 Jul 2016 11:45:54 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63BjsQb029173; Sun, 3 Jul 2016 11:45:54 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201607031145.u63BjsQb029173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 3 Jul 2016 11:45: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: r302323 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 11:45:55 -0000 Author: jilles Date: Sun Jul 3 11:45:54 2016 New Revision: 302323 URL: https://svnweb.freebsd.org/changeset/base/302323 Log: MFC r302151: posixshm: Fix lock leak when mac_posixshm_check_read rejects read. While reading the code, I noticed that shm_read() returns without unlocking foffset and rangelock if mac_posixshm_check_read() rejects the read. Modified: stable/10/sys/kern/uipc_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Sun Jul 3 01:56:48 2016 (r302322) +++ stable/10/sys/kern/uipc_shm.c Sun Jul 3 11:45:54 2016 (r302323) @@ -293,14 +293,14 @@ shm_read(struct file *fp, struct uio *ui int error; shmfd = fp->f_data; - foffset_lock_uio(fp, uio, flags); - rl_cookie = rangelock_rlock(&shmfd->shm_rl, uio->uio_offset, - uio->uio_offset + uio->uio_resid, &shmfd->shm_mtx); #ifdef MAC error = mac_posixshm_check_read(active_cred, fp->f_cred, shmfd); if (error) return (error); #endif + foffset_lock_uio(fp, uio, flags); + rl_cookie = rangelock_rlock(&shmfd->shm_rl, uio->uio_offset, + uio->uio_offset + uio->uio_resid, &shmfd->shm_mtx); error = uiomove_object(shmfd->shm_object, shmfd->shm_size, uio); rangelock_unlock(&shmfd->shm_rl, rl_cookie, &shmfd->shm_mtx); foffset_unlock_uio(fp, uio, flags); From owner-svn-src-all@freebsd.org Sun Jul 3 15:00:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C0CDB90D93; Sun, 3 Jul 2016 15:00:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F02B226C; Sun, 3 Jul 2016 15:00:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63F0CGa099784; Sun, 3 Jul 2016 15:00:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63F0Cr8099783; Sun, 3 Jul 2016 15:00:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607031500.u63F0Cr8099783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 3 Jul 2016 15:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302324 - head/lib/libc/locale 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 15:00:13 -0000 Author: bapt Date: Sun Jul 3 15:00:12 2016 New Revision: 302324 URL: https://svnweb.freebsd.org/changeset/base/302324 Log: Fix a bad test resulting in a segfault with ISO-8859-5 locales Reported by: Lauri Tirkkonen from Illumos Approved by: re@ (gjb) Modified: head/lib/libc/locale/collate.c Modified: head/lib/libc/locale/collate.c ============================================================================== --- head/lib/libc/locale/collate.c Sun Jul 3 11:45:54 2016 (r302323) +++ head/lib/libc/locale/collate.c Sun Jul 3 15:00:12 2016 (r302324) @@ -310,7 +310,7 @@ _collate_lookup(struct xlocale_collate * if ((sptr = *state) != NULL) { *pri = *sptr; sptr++; - if ((sptr == *state) || (sptr == NULL)) + if ((sptr == *state) || (*sptr == 0)) *state = NULL; else *state = sptr; From owner-svn-src-all@freebsd.org Sun Jul 3 17:28:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26143B90323; Sun, 3 Jul 2016 17:28:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC0872EB1; Sun, 3 Jul 2016 17:28:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63HSedY056369; Sun, 3 Jul 2016 17:28:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63HSeME056368; Sun, 3 Jul 2016 17:28:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607031728.u63HSeME056368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 3 Jul 2016 17:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302325 - head/libexec/rtld-elf 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 17:28:41 -0000 Author: bdrewery Date: Sun Jul 3 17:28:39 2016 New Revision: 302325 URL: https://svnweb.freebsd.org/changeset/base/302325 Log: Fix race for incrementally rebuilding VERSION_MAP. The dependency is needed in PROG_FULL since only the build of PROG_FULL is using the LDFLAGS and depending on VERSION_MAP. This was not a problem with MK_DEBUG_FILES==no since it only builds PROG. This should probably be using bsd.lib.mk instead [1] Reported by: swills, gjb Reviewed by: emaste Noted by: rgrimes [1] Sponsored by: EMC / Isilon Storage Division Approved by: re (kib) Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sun Jul 3 15:00:12 2016 (r302324) +++ head/libexec/rtld-elf/Makefile Sun Jul 3 17:28:39 2016 (r302325) @@ -69,8 +69,6 @@ SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_MAP= Version.map LDFLAGS+= -Wl,--version-script=${VERSION_MAP} -${PROG}: ${VERSION_MAP} - .if exists(${.CURDIR}/${RTLD_ARCH}/Symbol.map) SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map .endif @@ -92,4 +90,5 @@ SUBDIR+= tests .endif .include +${PROG_FULL}: ${VERSION_MAP} .include From owner-svn-src-all@freebsd.org Sun Jul 3 17:51:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3897B907FA; Sun, 3 Jul 2016 17:51:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0D572A54; Sun, 3 Jul 2016 17:51:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63HpOZb066807; Sun, 3 Jul 2016 17:51:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63HpOEI066806; Sun, 3 Jul 2016 17:51:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607031751.u63HpOEI066806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 3 Jul 2016 17:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302326 - head/usr.bin/lastcomm/tests 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 17:51:25 -0000 Author: ngie Date: Sun Jul 3 17:51:24 2016 New Revision: 302326 URL: https://svnweb.freebsd.org/changeset/base/302326 Log: Output the diffs to standard error when comparing the expected vs the obtained output from lastcomm instead of just printing out a summary, e.g. "they differed". This will make failures with results more apparent when running kyua debug, kyua report-html, etc. Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff) MFC after: 1 week Approved by: re (gjb) Reviewed by: cem Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/lastcomm/tests/legacy_test.sh Modified: head/usr.bin/lastcomm/tests/legacy_test.sh ============================================================================== --- head/usr.bin/lastcomm/tests/legacy_test.sh Sun Jul 3 17:28:39 2016 (r302325) +++ head/usr.bin/lastcomm/tests/legacy_test.sh Sun Jul 3 17:51:24 2016 (r302326) @@ -14,7 +14,7 @@ check() shift # Remove tty field, which varies between systems. awk '{$4 = ""; print}' | - if diff -q - $1 + if diff -a - $1 >&2 then echo "ok $NUM" else From owner-svn-src-all@freebsd.org Sun Jul 3 17:52:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C8E2B908B9; Sun, 3 Jul 2016 17:52:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5810D2CC1; Sun, 3 Jul 2016 17:52:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63HqL4m067467; Sun, 3 Jul 2016 17:52:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63HqLBT067465; Sun, 3 Jul 2016 17:52:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607031752.u63HqLBT067465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 3 Jul 2016 17:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302327 - head/usr.bin/lastcomm/tests 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 17:52:22 -0000 Author: ngie Date: Sun Jul 3 17:52:21 2016 New Revision: 302327 URL: https://svnweb.freebsd.org/changeset/base/302327 Log: Fix .../usr.bin/lastcomm/legacy_test:main on i386 The time in the output files was ahead by 3 hours on i386. Fix the incorrect offset. Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff) MFC after: 1 week PR: 210329 Reported by: asomers Approved by: re (gjb) Reviewed by: cem Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/lastcomm/tests/v1-i386.out head/usr.bin/lastcomm/tests/v2-i386.out Modified: head/usr.bin/lastcomm/tests/v1-i386.out ============================================================================== --- head/usr.bin/lastcomm/tests/v1-i386.out Sun Jul 3 17:51:24 2016 (r302326) +++ head/usr.bin/lastcomm/tests/v1-i386.out Sun Jul 3 17:52:21 2016 (r302327) @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 11:34 -core -DX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 11:34 -cc - root 0.000 secs 0.000 us 0.000 sy 0.469 es Fri May 18 11:34 -ld - root 0.000 secs 0.000 us 0.000 sy 0.109 es Fri May 18 11:34 -as - root 0.000 secs 0.000 us 0.000 sy 0.047 es Fri May 18 11:34 -cc1 - root 0.016 secs 0.016 us 0.000 sy 0.203 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -123456789012345 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.359 es Fri May 18 11:34 -diff - root 0.312 secs 0.297 us 0.016 sy 0.359 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 11:34 -dd - root 0.016 secs 0.000 us 0.016 sy 0.031 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 11:34 -sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 3.406 es Fri May 18 11:34 -find - root 0.266 secs 0.062 us 0.203 sy 3.406 es Fri May 18 11:34 -time - root 0.000 secs 0.000 us 0.000 sy 5.047 es Fri May 18 11:33 -egrep - root 4.984 secs 4.984 us 0.000 sy 5.047 es Fri May 18 11:33 -time - root 0.000 secs 0.000 us 0.000 sy 0.484 es Fri May 18 11:33 -awk - root 0.453 secs 0.453 us 0.000 sy 0.453 es Fri May 18 11:33 -accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 11:33 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 +core -DX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 +cc - root 0.000 secs 0.000 us 0.000 sy 0.469 es Fri May 18 08:34 +ld - root 0.000 secs 0.000 us 0.000 sy 0.109 es Fri May 18 08:34 +as - root 0.000 secs 0.000 us 0.000 sy 0.047 es Fri May 18 08:34 +cc1 - root 0.016 secs 0.016 us 0.000 sy 0.203 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +123456789012345 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.359 es Fri May 18 08:34 +diff - root 0.312 secs 0.297 us 0.016 sy 0.359 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 +dd - root 0.016 secs 0.000 us 0.016 sy 0.031 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34 +sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 3.406 es Fri May 18 08:34 +find - root 0.266 secs 0.062 us 0.203 sy 3.406 es Fri May 18 08:34 +time - root 0.000 secs 0.000 us 0.000 sy 5.047 es Fri May 18 08:33 +egrep - root 4.984 secs 4.984 us 0.000 sy 5.047 es Fri May 18 08:33 +time - root 0.000 secs 0.000 us 0.000 sy 0.484 es Fri May 18 08:33 +awk - root 0.453 secs 0.453 us 0.000 sy 0.453 es Fri May 18 08:33 +accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:33 Modified: head/usr.bin/lastcomm/tests/v2-i386.out ============================================================================== --- head/usr.bin/lastcomm/tests/v2-i386.out Sun Jul 3 17:51:24 2016 (r302326) +++ head/usr.bin/lastcomm/tests/v2-i386.out Sun Jul 3 17:52:21 2016 (r302327) @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.005 es Fri May 18 15:13 -core -DX root 0.002 secs 0.000 us 0.002 sy 0.005 es Fri May 18 15:13 -cc - root 0.002 secs 0.000 us 0.002 sy 0.048 es Fri May 18 15:13 -ld - root 0.028 secs 0.019 us 0.009 sy 0.028 es Fri May 18 15:13 -as - root 0.002 secs 0.002 us 0.000 sy 0.002 es Fri May 18 15:13 -cc1 - root 0.016 secs 0.016 us 0.000 sy 0.016 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 15:13 -1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -time - root 0.001 secs 0.001 us 0.000 sy 0.002 es Fri May 18 15:13 -1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 15:13 -123456789012345 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.425 es Fri May 18 15:13 -diff - root 0.423 secs 0.392 us 0.031 sy 0.424 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.028 es Fri May 18 15:13 -dd - root 0.025 secs 0.000 us 0.025 sy 0.026 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 3.002 es Fri May 18 15:13 -sleep - root 0.001 secs 0.000 us 0.001 sy 3.001 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.250 es Fri May 18 15:13 -find - root 0.248 secs 0.078 us 0.171 sy 0.249 es Fri May 18 15:13 -time - root 0.001 secs 0.000 us 0.001 sy 6.724 es Fri May 18 15:12 -egrep - root 6.680 secs 6.680 us 0.000 sy 6.722 es Fri May 18 15:12 -time - root 0.001 secs 0.000 us 0.001 sy 0.450 es Fri May 18 15:12 -awk - root 0.448 secs 0.448 us 0.000 sy 0.449 es Fri May 18 15:12 -accton - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 15:12 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.005 es Fri May 18 12:13 +core -DX root 0.002 secs 0.000 us 0.002 sy 0.005 es Fri May 18 12:13 +cc - root 0.002 secs 0.000 us 0.002 sy 0.048 es Fri May 18 12:13 +ld - root 0.028 secs 0.019 us 0.009 sy 0.028 es Fri May 18 12:13 +as - root 0.002 secs 0.002 us 0.000 sy 0.002 es Fri May 18 12:13 +cc1 - root 0.016 secs 0.016 us 0.000 sy 0.016 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13 +1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +time - root 0.001 secs 0.001 us 0.000 sy 0.002 es Fri May 18 12:13 +1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13 +123456789012345 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.425 es Fri May 18 12:13 +diff - root 0.423 secs 0.392 us 0.031 sy 0.424 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.028 es Fri May 18 12:13 +dd - root 0.025 secs 0.000 us 0.025 sy 0.026 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 3.002 es Fri May 18 12:13 +sleep - root 0.001 secs 0.000 us 0.001 sy 3.001 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 0.250 es Fri May 18 12:13 +find - root 0.248 secs 0.078 us 0.171 sy 0.249 es Fri May 18 12:13 +time - root 0.001 secs 0.000 us 0.001 sy 6.724 es Fri May 18 12:12 +egrep - root 6.680 secs 6.680 us 0.000 sy 6.722 es Fri May 18 12:12 +time - root 0.001 secs 0.000 us 0.001 sy 0.450 es Fri May 18 12:12 +awk - root 0.448 secs 0.448 us 0.000 sy 0.449 es Fri May 18 12:12 +accton - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:12 From owner-svn-src-all@freebsd.org Sun Jul 3 18:19:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00125B90F4C; Sun, 3 Jul 2016 18:19:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B81032A4E; Sun, 3 Jul 2016 18:19:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63IJmqD075713; Sun, 3 Jul 2016 18:19:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63IJm79075708; Sun, 3 Jul 2016 18:19:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607031819.u63IJm79075708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Jul 2016 18:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302328 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 18:19:50 -0000 Author: kib Date: Sun Jul 3 18:19:48 2016 New Revision: 302328 URL: https://svnweb.freebsd.org/changeset/base/302328 Log: Provide helper macros to detect 'non-silent SBDRY' state and to calculate appropriate return value for stops. Simplify the code by using them. Fix typo in sig_suspend_threads(). The thread which sleep must be aborted is td2. (*) In issignal(), when handling stopping signal for thread in TD_SBDRY_INTR state, do not stop, this is wrong and fires assert. This is yet another place where execution should be forced out of SBDRY-protected region. For such case, return -1 from issignal() and translate it to corresponding error code in sleepq_catch_signals(). Assert that other consumers of cursig() are not affected by the new return value. (*) Micro-optimize, mostly VFS and VOP methods, by avoiding calling the functions when SIGDEFERSTOP_NOP non-change is requested. (**) Reported and tested by: pho (*) Requested by: bde (**) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb) Modified: head/sys/kern/kern_sig.c head/sys/kern/kern_thread.c head/sys/kern/subr_sleepqueue.c head/sys/sys/proc.h head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Jul 3 17:52:21 2016 (r302327) +++ head/sys/kern/kern_sig.c Sun Jul 3 18:19:48 2016 (r302328) @@ -1251,6 +1251,7 @@ kern_sigtimedwait(struct thread *td, sig mtx_lock(&ps->ps_mtx); sig = cursig(td); mtx_unlock(&ps->ps_mtx); + KASSERT(sig >= 0, ("sig %d", sig)); if (sig != 0 && SIGISMEMBER(waitset, sig)) { if (sigqueue_get(&td->td_sigqueue, sig, ksi) != 0 || sigqueue_get(&p->p_sigqueue, sig, ksi) != 0) { @@ -1512,8 +1513,10 @@ kern_sigsuspend(struct thread *td, sigse /* void */; thread_suspend_check(0); mtx_lock(&p->p_sigacts->ps_mtx); - while ((sig = cursig(td)) != 0) + while ((sig = cursig(td)) != 0) { + KASSERT(sig >= 0, ("sig %d", sig)); has_sig += postsig(sig); + } mtx_unlock(&p->p_sigacts->ps_mtx); } PROC_UNLOCK(p); @@ -2476,11 +2479,9 @@ sig_suspend_threads(struct thread *td, s */ KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); - if ((td2->td_flags & (TDF_SERESTART | - TDF_SEINTR)) != 0 && sending) { - wakeup_swapper |= sleepq_abort(td, - (td2->td_flags & TDF_SERESTART) - != 0 ? ERESTART : EINTR); + if (TD_SBDRY_INTR(td2) && sending) { + wakeup_swapper |= sleepq_abort(td2, + TD_SBDRY_ERRNO(td2)); } } else if (!TD_IS_SUSPENDED(td2)) { thread_suspend_one(td2); @@ -2628,7 +2629,7 @@ sigdeferstop_curr_flags(int cflags) * accesses below. */ int -sigdeferstop(int mode) +sigdeferstop_impl(int mode) { struct thread *td; int cflags, nflags; @@ -2655,11 +2656,11 @@ sigdeferstop(int mode) panic("sigdeferstop: invalid mode %x", mode); break; } - if (cflags != nflags) { - thread_lock(td); - td->td_flags = (td->td_flags & ~cflags) | nflags; - thread_unlock(td); - } + if (cflags == nflags) + return (SIGDEFERSTOP_VAL_NCHG); + thread_lock(td); + td->td_flags = (td->td_flags & ~cflags) | nflags; + thread_unlock(td); return (cflags); } @@ -2670,11 +2671,12 @@ sigdeferstop(int mode) * either via ast() or a subsequent interruptible sleep. */ void -sigallowstop(int prev) +sigallowstop_impl(int prev) { struct thread *td; int cflags; + KASSERT(prev != SIGDEFERSTOP_VAL_NCHG, ("failed sigallowstop")); KASSERT((prev & ~(TDF_SBDRY | TDF_SEINTR | TDF_SERESTART)) == 0, ("sigallowstop: incorrect previous mode %x", prev)); td = curthread; @@ -2835,6 +2837,11 @@ issignal(struct thread *td) (p->p_pgrp->pg_jobc == 0 && prop & SA_TTYSTOP)) break; /* == ignore */ + if (TD_SBDRY_INTR(td)) { + KASSERT((td->td_flags & TDF_SBDRY) != 0, + ("lost TDF_SBDRY")); + return (-1); + } mtx_unlock(&ps->ps_mtx); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Catching SIGSTOP"); Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sun Jul 3 17:52:21 2016 (r302327) +++ head/sys/kern/kern_thread.c Sun Jul 3 18:19:48 2016 (r302328) @@ -894,7 +894,7 @@ thread_suspend_check(int return_instead) { struct thread *td; struct proc *p; - int wakeup_swapper, r; + int wakeup_swapper; td = curthread; p = td->td_proc; @@ -927,21 +927,10 @@ thread_suspend_check(int return_instead) if ((td->td_flags & TDF_SBDRY) != 0) { KASSERT(return_instead, ("TDF_SBDRY set for unsafe thread_suspend_check")); - switch (td->td_flags & (TDF_SEINTR | TDF_SERESTART)) { - case 0: - r = 0; - break; - case TDF_SEINTR: - r = EINTR; - break; - case TDF_SERESTART: - r = ERESTART; - break; - default: - panic("both TDF_SEINTR and TDF_SERESTART"); - break; - } - return (r); + KASSERT((td->td_flags & (TDF_SEINTR | TDF_SERESTART)) != + (TDF_SEINTR | TDF_SERESTART), + ("both TDF_SEINTR and TDF_SERESTART")); + return (TD_SBDRY_INTR(td) ? TD_SBDRY_ERRNO(td) : 0); } /* Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Sun Jul 3 17:52:21 2016 (r302327) +++ head/sys/kern/subr_sleepqueue.c Sun Jul 3 18:19:48 2016 (r302328) @@ -453,7 +453,16 @@ sleepq_catch_signals(void *wchan, int pr ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); sig = cursig(td); - if (sig == 0) { + if (sig == -1) { + mtx_unlock(&ps->ps_mtx); + KASSERT((td->td_flags & TDF_SBDRY) != 0, ("lost TDF_SBDRY")); + KASSERT(TD_SBDRY_INTR(td), + ("lost TDF_SERESTART of TDF_SEINTR")); + KASSERT((td->td_flags & (TDF_SEINTR | TDF_SERESTART)) != + (TDF_SEINTR | TDF_SERESTART), + ("both TDF_SEINTR and TDF_SERESTART")); + ret = TD_SBDRY_ERRNO(td); + } else if (sig == 0) { mtx_unlock(&ps->ps_mtx); ret = thread_suspend_check(1); MPASS(ret == 0 || ret == EINTR || ret == ERESTART); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sun Jul 3 17:52:21 2016 (r302327) +++ head/sys/sys/proc.h Sun Jul 3 18:19:48 2016 (r302328) @@ -511,6 +511,11 @@ do { \ #define TD_SET_RUNQ(td) (td)->td_state = TDS_RUNQ #define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN +#define TD_SBDRY_INTR(td) \ + (((td)->td_flags & (TDF_SEINTR | TDF_SERESTART)) != 0) +#define TD_SBDRY_ERRNO(td) \ + (((td)->td_flags & TDF_SEINTR) != 0 ? EINTR : ERESTART) + /* * Process structure. */ Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sun Jul 3 17:52:21 2016 (r302327) +++ head/sys/sys/signalvar.h Sun Jul 3 18:19:48 2016 (r302328) @@ -337,9 +337,29 @@ extern struct mtx sigio_lock; #define SIGDEFERSTOP_EINTR 3 /* ignore STOPs, return EINTR */ #define SIGDEFERSTOP_ERESTART 4 /* ignore STOPs, return ERESTART */ +#define SIGDEFERSTOP_VAL_NCHG (-1) /* placeholder indicating no state change */ +int sigdeferstop_impl(int mode); +void sigallowstop_impl(int prev); + +static inline int +sigdeferstop(int mode) +{ + + if (mode == SIGDEFERSTOP_NOP) + return (SIGDEFERSTOP_VAL_NCHG); + return (sigdeferstop_impl(mode)); +} + +static inline void +sigallowstop(int prev) +{ + + if (prev == SIGDEFERSTOP_VAL_NCHG) + return; + sigallowstop_impl(prev); +} + int cursig(struct thread *td); -int sigdeferstop(int mode); -void sigallowstop(int prev); void execsigs(struct proc *p); void gsignal(int pgid, int sig, ksiginfo_t *ksi); void killproc(struct proc *p, char *why); From owner-svn-src-all@freebsd.org Sun Jul 3 18:21:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC300B90004; Sun, 3 Jul 2016 18:21:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 746372C3F; Sun, 3 Jul 2016 18:21:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63ILBj8076505; Sun, 3 Jul 2016 18:21:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63ILBL1076497; Sun, 3 Jul 2016 18:21:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607031821.u63ILBL1076497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 3 Jul 2016 18:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302329 - in head: . etc/mtree share share/colldef share/ctypedef share/locale-links share/monetdef share/msgdef share/numericdef share/timedef tools/build/mk tools/tools/locale/tools 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 18:21:12 -0000 Author: bapt Date: Sun Jul 3 18:21:11 2016 New Revision: 302329 URL: https://svnweb.freebsd.org/changeset/base/302329 Log: Posixify the locales name for variants For all locales with variants: - if no ambiguity on the locale (only one variant) just use the regular name - if ambiguity, pick one as default and append @ to the others respecting POSIX As a result: - All the 3 components locales added recently are renamed to the usual 2 components version for all but sr_RS.UTF-8 - Set sr_RS.UTF-8 to the cyrillic variant - Add sr_RS.UTF-8@latin - Remove the symlinks aliases they were created to represent the 2 components version as aliasas and are now useless - Update the OptionalObsoleteFiles.inc and ObsoleteFiles.inc to reflect those changes Discussed with: ache@ Approved by: re@ (gjb) Added: head/share/colldef/kk_KZ.UTF-8.src (contents, props changed) head/share/colldef/zh_CN.UTF-8.src (contents, props changed) head/share/colldef/zh_TW.UTF-8.src (contents, props changed) head/share/ctypedef/ja_JP.SJIS.src (contents, props changed) head/share/ctypedef/zh_CN.GB18030.src (contents, props changed) head/share/ctypedef/zh_TW.Big5.src (contents, props changed) head/share/monetdef/kk_KZ.UTF-8.src (contents, props changed) head/share/monetdef/mn_MN.UTF-8.src (contents, props changed) head/share/monetdef/sr_RS.UTF-8@latin.src (contents, props changed) head/share/monetdef/zh_CN.GB2312.src (contents, props changed) head/share/monetdef/zh_CN.GBK.src (contents, props changed) head/share/monetdef/zh_CN.UTF-8.src (contents, props changed) head/share/monetdef/zh_CN.eucCN.src (contents, props changed) head/share/monetdef/zh_HK.UTF-8.src (contents, props changed) head/share/monetdef/zh_TW.Big5.src (contents, props changed) head/share/monetdef/zh_TW.UTF-8.src (contents, props changed) head/share/msgdef/kk_KZ.UTF-8.src (contents, props changed) head/share/msgdef/mn_MN.UTF-8.src (contents, props changed) head/share/msgdef/sr_RS.ISO8859-5.src (contents, props changed) head/share/msgdef/sr_RS.UTF-8.src (contents, props changed) head/share/msgdef/sr_RS.UTF-8@latin.src (contents, props changed) head/share/msgdef/zh_CN.GB2312.src (contents, props changed) head/share/msgdef/zh_CN.GBK.src (contents, props changed) head/share/msgdef/zh_CN.UTF-8.src (contents, props changed) head/share/msgdef/zh_HK.UTF-8.src (contents, props changed) head/share/msgdef/zh_TW.Big5.src (contents, props changed) head/share/msgdef/zh_TW.UTF-8.src (contents, props changed) head/share/numericdef/zh_CN.GB2312.src (contents, props changed) head/share/numericdef/zh_CN.eucCN.src (contents, props changed) head/share/numericdef/zh_TW.Big5.src (contents, props changed) head/share/timedef/kk_KZ.UTF-8.src (contents, props changed) head/share/timedef/mn_MN.UTF-8.src (contents, props changed) head/share/timedef/sr_RS.ISO8859-2.src (contents, props changed) head/share/timedef/sr_RS.ISO8859-5.src (contents, props changed) head/share/timedef/sr_RS.UTF-8.src (contents, props changed) head/share/timedef/sr_RS.UTF-8@latin.src (contents, props changed) head/share/timedef/zh_CN.GB2312.src (contents, props changed) head/share/timedef/zh_CN.GBK.src (contents, props changed) head/share/timedef/zh_CN.UTF-8.src (contents, props changed) head/share/timedef/zh_CN.eucCN.src (contents, props changed) head/share/timedef/zh_HK.UTF-8.src (contents, props changed) head/share/timedef/zh_TW.Big5.src (contents, props changed) head/share/timedef/zh_TW.UTF-8.src (contents, props changed) Deleted: head/share/colldef/kk_Cyrl_KZ.UTF-8.src head/share/colldef/zh_Hans_CN.UTF-8.src head/share/colldef/zh_Hant_TW.UTF-8.src head/share/ctypedef/ja_JP.eucJP.src head/share/ctypedef/zh_Hans_CN.eucCN.src head/share/ctypedef/zh_Hant_TW.Big5.src head/share/locale-links/ head/share/monetdef/kk_Cyrl_KZ.UTF-8.src head/share/monetdef/mn_Cyrl_MN.UTF-8.src head/share/monetdef/sr_Latn_RS.UTF-8.src head/share/monetdef/zh_Hans_CN.GB2312.src head/share/monetdef/zh_Hans_CN.GBK.src head/share/monetdef/zh_Hans_CN.UTF-8.src head/share/monetdef/zh_Hans_CN.eucCN.src head/share/monetdef/zh_Hant_HK.UTF-8.src head/share/monetdef/zh_Hant_TW.Big5.src head/share/monetdef/zh_Hant_TW.UTF-8.src head/share/msgdef/kk_Cyrl_KZ.UTF-8.src head/share/msgdef/mn_Cyrl_MN.UTF-8.src head/share/msgdef/sr_Cyrl_RS.ISO8859-5.src head/share/msgdef/sr_Cyrl_RS.UTF-8.src head/share/msgdef/sr_Latn_RS.UTF-8.src head/share/msgdef/zh_Hans_CN.GB2312.src head/share/msgdef/zh_Hans_CN.GBK.src head/share/msgdef/zh_Hans_CN.UTF-8.src head/share/msgdef/zh_Hant_HK.UTF-8.src head/share/msgdef/zh_Hant_TW.Big5.src head/share/msgdef/zh_Hant_TW.UTF-8.src head/share/numericdef/zh_Hans_CN.GB2312.src head/share/numericdef/zh_Hans_CN.eucCN.src head/share/numericdef/zh_Hant_TW.Big5.src head/share/timedef/kk_Cyrl_KZ.UTF-8.src head/share/timedef/mn_Cyrl_MN.UTF-8.src head/share/timedef/sr_Cyrl_RS.ISO8859-5.src head/share/timedef/sr_Cyrl_RS.UTF-8.src head/share/timedef/sr_Latn_RS.ISO8859-2.src head/share/timedef/sr_Latn_RS.UTF-8.src head/share/timedef/zh_Hans_CN.GB2312.src head/share/timedef/zh_Hans_CN.GBK.src head/share/timedef/zh_Hans_CN.UTF-8.src head/share/timedef/zh_Hans_CN.eucCN.src head/share/timedef/zh_Hant_HK.UTF-8.src head/share/timedef/zh_Hant_TW.Big5.src head/share/timedef/zh_Hant_TW.UTF-8.src Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist head/share/Makefile head/share/colldef/Makefile head/share/ctypedef/Makefile head/share/monetdef/Makefile head/share/msgdef/Makefile head/share/numericdef/Makefile head/share/timedef/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/tools/tools/locale/tools/cldr2def.pl head/tools/tools/locale/tools/finalize Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jul 3 18:19:48 2016 (r302328) +++ head/ObsoleteFiles.inc Sun Jul 3 18:21:11 2016 (r302329) @@ -38,6 +38,105 @@ # xargs -n1 | sort | uniq -d; # done +# 20160703: POSIXify locales with variants +OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hant_TW.UTF-8 +OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hant_TW.Big5 +OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hant_HK.UTF-8 +OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hans_CN.eucCN +OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hans_CN.UTF-8 +OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hans_CN.GBK +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hans_CN.GB2312 +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_COLLATE +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_CTYPE +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_MESSAGES +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_MONETARY +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_NUMERIC +OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_TIME +OLD_DIRS+=usr/share/locale/zh_Hans_CN.GB18030 +OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/sr_Latn_RS.UTF-8 +OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_COLLATE +OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_CTYPE +OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_MESSAGES +OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_MONETARY +OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_NUMERIC +OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_TIME +OLD_DIRS+=usr/share/locale/sr_Latn_RS.ISO8859-2 +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/sr_Cyrl_RS.UTF-8 +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_COLLATE +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_CTYPE +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_MESSAGES +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_MONETARY +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_NUMERIC +OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_TIME +OLD_DIRS+=usr/share/locale/sr_Cyrl_RS.ISO8859-5 +OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/mn_Cyrl_MN.UTF-8 +OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_COLLATE +OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_CTYPE +OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_MESSAGES +OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_MONETARY +OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_NUMERIC +OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_TIME +OLD_DIRS+=usr/share/locale/kk_Cyrl_KZ.UTF-8 # 20160608: removed pam_verbose_error OLD_LIBS+=usr/lib/libpam.so.5 OLD_LIBS+=usr/lib/pam_chroot.so.5 @@ -398,13 +497,6 @@ OLD_FILES+=usr/share/locale/lt_LT.ISO885 OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_CTYPE OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_NUMERIC OLD_DIRS+=usr/share/locale/lt_LT.ISO8859-4 -OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/mn_MN.UTF-8 OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_COLLATE OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_CTYPE OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MESSAGES Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sun Jul 3 18:19:48 2016 (r302328) +++ head/etc/mtree/BSD.usr.dist Sun Jul 3 18:21:11 2016 (r302329) @@ -769,7 +769,7 @@ .. ja_JP.eucJP .. - kk_Cyrl_KZ.UTF-8 + kk_KZ.UTF-8 .. ko_KR.CP949 .. @@ -785,7 +785,7 @@ .. lv_LV.UTF-8 .. - mn_Cyrl_MN.UTF-8 + mn_MN.UTF-8 .. nb_NO.ISO8859-1 .. @@ -851,13 +851,13 @@ .. sl_SI.UTF-8 .. - sr_Cyrl_RS.ISO8859-5 + sr_RS.ISO8859-5 .. - sr_Cyrl_RS.UTF-8 + sr_RS.UTF-8 .. - sr_Latn_RS.ISO8859-2 + sr_RS.ISO8859-2 .. - sr_Latn_RS.UTF-8 + sr_RS.UTF-8@latin .. sv_FI.ISO8859-1 .. @@ -893,22 +893,6 @@ .. zh_CN.UTF-8 .. - zh_Hans_CN.GB18030 - .. - zh_Hans_CN.GB2312 - .. - zh_Hans_CN.GBK - .. - zh_Hans_CN.UTF-8 - .. - zh_Hans_CN.eucCN - .. - zh_Hant_HK.UTF-8 - .. - zh_Hant_TW.Big5 - .. - zh_Hant_TW.UTF-8 - .. zh_HK.UTF-8 .. zh_TW.Big5 Modified: head/share/Makefile ============================================================================== --- head/share/Makefile Sun Jul 3 18:19:48 2016 (r302328) +++ head/share/Makefile Sun Jul 3 18:21:11 2016 (r302329) @@ -13,7 +13,6 @@ SUBDIR= ${_colldef} \ ${_examples} \ ${_i18n} \ keys \ - ${_locale-links} \ ${_man} \ ${_me} \ misc \ @@ -61,7 +60,6 @@ _i18n= i18n .if ${MK_LOCALES} != "no" _colldef= colldef _ctypedef= ctypedef -_locale-links= locale-links _monetdef= monetdef _msgdef= msgdef _numericdef= numericdef Modified: head/share/colldef/Makefile ============================================================================== --- head/share/colldef/Makefile Sun Jul 3 18:19:48 2016 (r302328) +++ head/share/colldef/Makefile Sun Jul 3 18:21:11 2016 (r302329) @@ -9,7 +9,7 @@ MAPLOC= ${.CURDIR}/../../tools/tools/lo .src.LC_COLLATE: localedef -D -U -i ${.IMPSRC} \ - -f ${MAPLOC}/map.${.TARGET:T:R:E} ${.OBJDIR}/${.IMPSRC:T:R} + -f ${MAPLOC}/map.${.TARGET:T:R:E:C/@.*//} ${.OBJDIR}/${.IMPSRC:T:R} LOCALES+= af_ZA.UTF-8 LOCALES+= am_ET.UTF-8 @@ -30,7 +30,7 @@ LOCALES+= hu_HU.UTF-8 LOCALES+= hy_AM.UTF-8 LOCALES+= is_IS.UTF-8 LOCALES+= ja_JP.UTF-8 -LOCALES+= kk_Cyrl_KZ.UTF-8 +LOCALES+= kk_KZ.UTF-8 LOCALES+= ko_KR.UTF-8 LOCALES+= lt_LT.UTF-8 LOCALES+= lv_LV.UTF-8 @@ -44,15 +44,15 @@ LOCALES+= sl_SI.UTF-8 LOCALES+= sv_SE.UTF-8 LOCALES+= tr_TR.UTF-8 LOCALES+= uk_UA.UTF-8 -LOCALES+= zh_Hans_CN.UTF-8 -LOCALES+= zh_Hant_TW.UTF-8 +LOCALES+= zh_CN.UTF-8 +LOCALES+= zh_TW.UTF-8 LOCALES_MAPPED+= af_ZA.UTF-8 af_ZA.ISO8859-15 LOCALES_MAPPED+= af_ZA.UTF-8 af_ZA.ISO8859-1 LOCALES_MAPPED+= be_BY.UTF-8 be_BY.ISO8859-5 LOCALES_MAPPED+= be_BY.UTF-8 be_BY.CP1251 LOCALES_MAPPED+= be_BY.UTF-8 be_BY.CP1131 -LOCALES_MAPPED+= ru_RU.UTF-8 sr_Cyrl_RS.ISO8859-5 +LOCALES_MAPPED+= ru_RU.UTF-8 sr_RS.ISO8859-5 LOCALES_MAPPED+= ru_RU.UTF-8 ru_RU.KOI8-R LOCALES_MAPPED+= ru_RU.UTF-8 ru_RU.ISO8859-5 LOCALES_MAPPED+= ru_RU.UTF-8 ru_RU.CP866 @@ -66,7 +66,8 @@ LOCALES_MAPPED+= ca_AD.UTF-8 ca_ES.ISO88 LOCALES_MAPPED+= ca_AD.UTF-8 ca_ES.ISO8859-1 LOCALES_MAPPED+= ca_AD.UTF-8 ca_AD.ISO8859-15 LOCALES_MAPPED+= ca_AD.UTF-8 ca_AD.ISO8859-1 -LOCALES_MAPPED+= en_US.UTF-8 sr_Latn_RS.ISO8859-2 +LOCALES_MAPPED+= en_US.UTF-8 sr_RS.UTF-8@latin +LOCALES_MAPPED+= en_US.UTF-8 sr_RS.ISO8859-2 LOCALES_MAPPED+= en_US.UTF-8 pt_PT.ISO8859-15 LOCALES_MAPPED+= en_US.UTF-8 pt_PT.ISO8859-1 LOCALES_MAPPED+= en_US.UTF-8 pt_BR.ISO8859-1 @@ -147,9 +148,9 @@ LOCALES_MAPPED+= tr_TR.UTF-8 tr_TR.ISO88 LOCALES_MAPPED+= uk_UA.UTF-8 uk_UA.KOI8-U LOCALES_MAPPED+= uk_UA.UTF-8 uk_UA.ISO8859-5 LOCALES_MAPPED+= uk_UA.UTF-8 uk_UA.CP1251 -LOCALES_MAPPED+= zh_Hans_CN.UTF-8 zh_Hans_CN.GBK -LOCALES_MAPPED+= zh_Hans_CN.UTF-8 zh_Hans_CN.GB18030 -LOCALES_MAPPED+= zh_Hant_TW.UTF-8 zh_Hant_TW.Big5 +LOCALES_MAPPED+= zh_CN.UTF-8 zh_CN.GBK +LOCALES_MAPPED+= zh_CN.UTF-8 zh_CN.GB18030 +LOCALES_MAPPED+= zh_TW.UTF-8 zh_TW.Big5 LOCALES+= cs_CZ.ISO8859-2 LOCALES+= da_DK.ISO8859-1 @@ -159,8 +160,8 @@ LOCALES+= hu_HU.ISO8859-2 LOCALES+= nb_NO.ISO8859-1 LOCALES+= nb_NO.ISO8859-15 LOCALES+= sk_SK.ISO8859-2 -LOCALES+= zh_Hans_CN.GB2312 -LOCALES+= zh_Hans_CN.eucCN +LOCALES+= zh_CN.GB2312 +LOCALES+= zh_CN.eucCN SAME+= ar_SA.UTF-8 ar_QA.UTF-8 @@ -168,13 +169,12 @@ SAME+= ar_SA.UTF-8 ar_MA.UTF-8 SAME+= ar_SA.UTF-8 ar_JO.UTF-8 SAME+= ar_SA.UTF-8 ar_EG.UTF-8 SAME+= ar_SA.UTF-8 ar_AE.UTF-8 -SAME+= ru_RU.UTF-8 sr_Cyrl_RS.UTF-8 -SAME+= ru_RU.UTF-8 mn_Cyrl_MN.UTF-8 +SAME+= ru_RU.UTF-8 sr_RS.UTF-8 +SAME+= ru_RU.UTF-8 mn_MN.UTF-8 SAME+= ru_RU.UTF-8 bg_BG.UTF-8 SAME+= ca_AD.UTF-8 ca_IT.UTF-8 SAME+= ca_AD.UTF-8 ca_FR.UTF-8 SAME+= ca_AD.UTF-8 ca_ES.UTF-8 -SAME+= en_US.UTF-8 sr_Latn_RS.UTF-8 SAME+= en_US.UTF-8 pt_PT.UTF-8 SAME+= en_US.UTF-8 pt_BR.UTF-8 SAME+= en_US.UTF-8 nn_NO.UTF-8 @@ -204,7 +204,7 @@ SAME+= es_MX.UTF-8 es_CR.UTF-8 SAME+= es_MX.UTF-8 es_AR.UTF-8 SAME+= se_NO.UTF-8 se_FI.UTF-8 SAME+= sv_SE.UTF-8 sv_FI.UTF-8 -SAME+= zh_Hant_TW.UTF-8 zh_Hant_HK.UTF-8 +SAME+= zh_TW.UTF-8 zh_HK.UTF-8 SAME+= ko_KR.eucKR ko_KR.CP949 # legacy (same charset) FILES= ${LOCALES:S/$/.LC_COLLATE/} @@ -224,7 +224,7 @@ FILES+= $t.LC_COLLATE FILESDIR_$t.LC_COLLATE= ${LOCALEDIR}/$t $t.LC_COLLATE: ${.CURDIR}/$f.src localedef -D -U -i ${.ALLSRC} \ - -f ${MAPLOC}/map.${.TARGET:T:R:E} \ + -f ${MAPLOC}/map.${.TARGET:T:R:E:C/@.*//} \ ${.OBJDIR}/${.TARGET:T:R} .endfor Added: head/share/colldef/kk_KZ.UTF-8.src ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/colldef/kk_KZ.UTF-8.src Sun Jul 3 18:21:11 2016 (r302329) @@ -0,0 +1,1000 @@ +# Warning: Do not edit. This file is automatically extracted from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# ----------------------------------------------------------------------------- +comment_char * +escape_char / +LC_COLLATE +************* + + + +* Define collation weights as symbols + +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +order_start forward;forward;forward;forward + + +* collation weights in order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +* assignment of characters to weights + + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;;; + IGNORE;;; + IGNORE;;; + IGNORE;;; + IGNORE;;; + IGNORE;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + "";;""; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; +

;;;

+

;;;

" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + + +* Define collation weights as symbols + +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jul 3 19:33:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CCFAB90518; Sun, 3 Jul 2016 19:33:14 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 8C33F2A7C; Sun, 3 Jul 2016 19:33:13 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x236.google.com with SMTP id r201so90610185wme.1; Sun, 03 Jul 2016 12:33:13 -0700 (PDT) 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-disposition:in-reply-to:user-agent; bh=Axpt3/YSYj/wlOyiScSGM4QKYSYu2Q+C6goY0HGEqzQ=; b=lTOx/WxmrLTePLAZuixQxxfyr22EFFU6X/SPrVe5WvyPMJJFNKkQUBcv/vZH6F/MmJ 4jEiB8hsB4RupFvopDcbZfe40seK3Rm7wSrcLUBtd0VqD4+sexnEZ97lJ6bem4J1i3/z EbFEfJlV98AafG/psc5OTCG+hC45T/8QjTMQ5UWnw/VjOe3QE0GLHSek3C1rBGbSKoW4 89Y0LgrtpX7+dQc5UuklS4omSaAG8aFk7idZh6Koe4OzfoLoqHoZgI41u9iIXuQ+eBhV iWKlD4Gr77X5G2v76bgPPAZ7YZpM1EeX4p9o+QfVwCYI9bvEV3MeAcaFQ3b2amM8sEEd j4og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Axpt3/YSYj/wlOyiScSGM4QKYSYu2Q+C6goY0HGEqzQ=; b=eIPQWBWt4Ae8Es+5/zcO8H2z/TtvDROH4rbRsolpmH3HA2gR+QI96F2ETTWtk99W8a OKZpSqecR9ir4ZqbnPUkdRG3mfeVZvVf4tyLjfIZO3OFppei9NhVE0NVs2oQjh88gMwV HpnJ82sCAe/NHlGsNeH91goUug7dYXEQ/3CSFNUYp7gz0HjyvBBjviaQAOZeoVn4EBo8 zpqpaUKUdJV1rnitAQ5mdWKVAVuHTpEoWsfse06Eq7lNwr6eHoqrA8cwepeLyTrtLHjO td9yRh2Sf83J971RhVUdDO5eyfLyHBVPuvetfifIrMNK9cPMqyT3H5F5fGpstiTk54mj cwUg== X-Gm-Message-State: ALyK8tLbmn8ZKLtB8y2vGFm9LW9Mw2A3d1X7Azq37hobQxxypPRF2J8nRrIPcEIIrCxTsw== X-Received: by 10.194.90.81 with SMTP id bu17mr2594758wjb.43.1467574391140; Sun, 03 Jul 2016 12:33:11 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id r190sm4417931wme.17.2016.07.03.12.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2016 12:33:10 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 3 Jul 2016 21:33:09 +0200 From: Baptiste Daroussin To: Ivan Klymenko Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r302329 - in head: . etc/mtree share share/colldef share/ctypedef share/locale-links share/monetdef share/msgdef share/numericdef share/timedef tools/build/mk tools/tools/locale/tools Message-ID: <20160703193309.rlw6bgxamz45kdwo@ivaldir.etoilebsd.net> References: <201607031821.u63ILBL1076497@repo.freebsd.org> <20160703220607.1ffd20ca@nonamehost.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gvd5gy3g52qslmtv" Content-Disposition: inline In-Reply-To: <20160703220607.1ffd20ca@nonamehost.local> User-Agent: Mutt/1.6.1-neo (2016-06-11) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 19:33:14 -0000 --gvd5gy3g52qslmtv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 03, 2016 at 10:06:07PM +0300, Ivan Klymenko wrote: > On Sun, 3 Jul 2016 18:21:11 +0000 (UTC) > Baptiste Daroussin wrote: >=20 > > Author: bapt > > Date: Sun Jul 3 18:21:11 2016 > > New Revision: 302329 > > URL: https://svnweb.freebsd.org/changeset/base/302329 > >=20 > > Log: > > Posixify the locales name for variants > > =20 > > For all locales with variants: > > - if no ambiguity on the locale (only one variant) just use the > > regular name > > - if ambiguity, pick one as default and append @ to the > > others respecting POSIX > > =20 > > As a result: > > - All the 3 components locales added recently are renamed to the > > usual 2 components version for all but sr_RS.UTF-8 > > - Set sr_RS.UTF-8 to the cyrillic variant > > - Add sr_RS.UTF-8@latin > > - Remove the symlinks aliases they were created to represent the 2 > > components version as aliasas and are now useless > > - Update the OptionalObsoleteFiles.inc and ObsoleteFiles.inc to > > reflect those changes > > =20 > > Discussed with: ache@ > > Approved by: re@ (gjb) > >=20 > .. Fixed sorry I have forgotten a svn mv... Bapt --gvd5gy3g52qslmtv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXeWhzAAoJEGOJi9zxtz5aGewQALLYp0fVfmoze3I8Vchbkc44 4uI0ykT77daZvtbrsHm/CTKY2r0i8qvG2se3IciueAz1+R67Tfxz9hVXfWAuMwYt oP9QisSjIK/YNIQy5aos+Ee1KfCy8uQod0eCKwg6pLwfylTj2DQhl+uDpUZkVH/e 6G9e4crWFru4q/+vciZ6px7rYakZgh3BOoWisbglpGfMxIf5QLdv4pq1TwSbZEmZ 4Hj0EMkVn0jgpu8m5YPGWKqj81yFCsSnGNxrGr0I0FkHoAZX2lCkENQV7sEZjIoS p/TIZ5uqjVjId72s41NcvqFv+rgXgR9e7UEI/b7qTk5pTEREQGgDar3Ntp8iUNC4 E3WvKdOJdB39YISFt64BMtVLqOFoKAfFlXaGI2klcAcYIzxuqvoPwiqRZPqTT04q qgq5ViKi5gJSxm1UD7DjlYWoP8bMJQcFc8vPSv62Q5MqDgzH9I/18Echn4cLcGjf tTIcp1Z7EQW8tE2s1wFJ5nToXH+Gu6ylnWBxB5mFdC0tz0zmgxqRxMgHSs/5cvds ACqSzCvjLBZcNvTy7KKGx99g1za0YVJqt0SjPeoPaz/wGzwW8uHdLoxcBjYKGLrb 9eUWoXxUI28xZvNeOtJKb2IB+oOfSFVvEaFlTmMoPjMTDRJwd0dZayBHjw+arR/v MGPo7tvfROkyjPoggpL5 =zxSI -----END PGP SIGNATURE----- --gvd5gy3g52qslmtv-- From owner-svn-src-all@freebsd.org Mon Jul 4 00:47:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C26BB902BD; Mon, 4 Jul 2016 00:47:17 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com [IPv6:2607:f8b0:4003:c06::244]) (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 2D94E2DFD; Mon, 4 Jul 2016 00:47:17 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x244.google.com with SMTP id s17so21067961oih.1; Sun, 03 Jul 2016 17:47:17 -0700 (PDT) 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; bh=jBHi+L4gXs5FIxubSMcrKIeR+1Ikz8YB1Wx0Pl2I1xE=; b=suBhszZA6s9FbQXXQyMZO58sHFBXzA2vBlU8C18m2N/CQfEETXsp+EXYDZGU7H229Q JDgVoVQx9oRP61CSyGnpScT6ghs/Ae4cOxHnxi55n7kgQaOB4HkwaFDM85uYAMTVFUH3 xjz7v0Znio33y0m1qdOLss0CfJ89liZaqit5sg/tqlGQ5wkMKrWb2U9oIQov7xDTGfjB f2OBc6B1eQD7DwWppnTtibnBrerBZsE9v7lOqJquycC1ZHx7KT0lvbnUCVh/Y04BoC83 M6ja7iMQ8jXODvpWRFqIuYfK2WMM0byb+2bc51ApQQKscLY1YxGyUeAjNb0WXy8g56tw nphg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jBHi+L4gXs5FIxubSMcrKIeR+1Ikz8YB1Wx0Pl2I1xE=; b=MdhM1kGzkHQ09IEUzW2d6LE4cJaha+Yp8rre5Wb0b+QyClFWKqL/7pRx17TMe6QOeu yfXCLDnByFua50Cs81F6nE+vF/QEe9ykujDfVTwJasNDCnj2sEQDp5iYfaAAYiYvoquT W8BhrzLLEcrKRqy/ZLwFJtQPc2KHVUkSK7DzAZeG1UPwgefsK3DXxjvv+tAQAJ6OfVxw Rz1/BIBKdw8G/GGRmHIaLPGywyAPPkAYp3tyrD5RIQJHtgpFhrhhRN36S5ckG47G3Qfw RS1yi2OI7N9GOsdSXI9dvqgmt1URlhDk8jxheAUXOMgX1gv9sgqYqBQRDCLvJJgUC6Pq i7bg== X-Gm-Message-State: ALyK8tL6RvxlZJ5C4MkQOsBWXOWGYOrH9k8A2YrAvcMHPeHsbucPbPuZOCk5VowNMSd4SrOHSVnJynYG9U2Big== X-Received: by 10.157.38.207 with SMTP id i15mr5075841otd.47.1467593236444; Sun, 03 Jul 2016 17:47:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.44.176 with HTTP; Sun, 3 Jul 2016 17:47:15 -0700 (PDT) In-Reply-To: <20160702153817.O1458@besplex.bde.org> References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> From: Benjamin Kaduk Date: Sun, 3 Jul 2016 19:47:15 -0500 Message-ID: Subject: Re: svn commit: r302252 - head/sys/kern To: Bruce Evans Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 00:47:17 -0000 On Sat, Jul 2, 2016 at 3:04 AM, Bruce Evans wrote: > + .th_counter = &dummy_timecounter, >> + .th_scale = (uint64_t)-1 / 1000000, >> + .th_offset = {1, 0}, >> > > Is there a syntax for avoiding the explicit 0 in a nested initializer? > Something like th_offset.tv_sec = 1. C99 does not require complete initializers (though my habit of running with clang -Weverything does). Just .th_offset = {1} should give the desired result here. I did not think that .th_offset.tv_sec was valid, though, so when not-the-initial element is nonzero some zeros would still be needed. -Ben From owner-svn-src-all@freebsd.org Mon Jul 4 01:51:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFD72B90F8B; Mon, 4 Jul 2016 01:51:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 3CCE621B4; Mon, 4 Jul 2016 01:51:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u641pQFa079432 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 4 Jul 2016 04:51:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u641pQFa079432 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u641pQX4079431; Mon, 4 Jul 2016 04:51:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 4 Jul 2016 04:51:26 +0300 From: Konstantin Belousov To: Benjamin Kaduk Cc: Bruce Evans , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r302252 - head/sys/kern Message-ID: <20160704015126.GA38613@kib.kiev.ua> References: <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 01:51:33 -0000 On Sun, Jul 03, 2016 at 07:47:15PM -0500, Benjamin Kaduk wrote: > On Sat, Jul 2, 2016 at 3:04 AM, Bruce Evans wrote: > > > + .th_counter = &dummy_timecounter, > >> + .th_scale = (uint64_t)-1 / 1000000, > >> + .th_offset = {1, 0}, > >> > > > > Is there a syntax for avoiding the explicit 0 in a nested initializer? > > Something like th_offset.tv_sec = 1. > > > C99 does not require complete initializers (though my habit of running with > clang -Weverything does). Just .th_offset = {1} should give the desired > result here. I did not think that .th_offset.tv_sec was valid, though, so > when not-the-initial element is nonzero some zeros would still be needed. Of course .th_offset.sec is not valid, but the patch posted later contained the correct expression .th_offset = { .sec = 1 } From owner-svn-src-all@freebsd.org Mon Jul 4 03:19:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E07E4B90FC7; Mon, 4 Jul 2016 03:19:07 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAA3E21F3; Mon, 4 Jul 2016 03:19:07 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u643J6on078091; Mon, 4 Jul 2016 03:19:06 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u643J6a2078082; Mon, 4 Jul 2016 03:19:06 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201607040319.u643J6a2078082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 4 Jul 2016 03:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302332 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 03:19:08 -0000 Author: grehan Date: Mon Jul 4 03:19:06 2016 New Revision: 302332 URL: https://svnweb.freebsd.org/changeset/base/302332 Log: Import bhyve_graphics into CURRENT. Thanks to all who tested this on the branch. Original commit message: Initial bhyve native graphics support. This adds emulations for a raw framebuffer device, PS2 keyboard/mouse, XHCI USB controller and a USB tablet. A simple VNC server is provided for keyboard/mouse input, and graphics output. A VGA emulation is included, but is currently disconnected until an additional bhyve change to block out VGA memory is committed. Credits: - raw framebuffer, VNC server, XHCI controller, USB bus/device emulation and UEFI f/w support by Leon Dang - VGA, console/g, initial VNC server by tychon@ - PS2 keyboard/mouse jointly done by tychon@ and Leon Dang - hypervisor framebuffer mem support by neel@ Tested by: Michael Dexter, in a number of revisions of this code. With the appropriate UEFI image, FreeBSD, Windows and Linux guests can installed and run in graphics mode using the UEFI/GOP framebuffer. Approved by: re (gjb) Added: - copied unchanged from r302324, projects/bhyve_graphics/atkbdc.h - copied unchanged from r302324, projects/bhyve_graphics/bhyvegc.c - copied unchanged from r302324, projects/bhyve_graphics/bhyvegc.h - copied unchanged from r302324, projects/bhyve_graphics/console.c - copied unchanged from r302324, projects/bhyve_graphics/console.h - copied unchanged from r302324, projects/bhyve_graphics/pci_fbuf.c - copied unchanged from r302324, projects/bhyve_graphics/pci_xhci.c - copied unchanged from r302324, projects/bhyve_graphics/pci_xhci.h - copied unchanged from r302324, projects/bhyve_graphics/ps2kbd.c - copied unchanged from r302324, projects/bhyve_graphics/ps2kbd.h - copied unchanged from r302324, projects/bhyve_graphics/ps2mouse.c - copied unchanged from r302324, projects/bhyve_graphics/ps2mouse.h - copied unchanged from r302324, projects/bhyve_graphics/rfb.c - copied unchanged from r302324, projects/bhyve_graphics/rfb.h - copied unchanged from r302324, projects/bhyve_graphics/sockstream.c - copied unchanged from r302324, projects/bhyve_graphics/sockstream.h - copied unchanged from r302324, projects/bhyve_graphics/usb_emul.c - copied unchanged from r302324, projects/bhyve_graphics/usb_emul.h - copied unchanged from r302324, projects/bhyve_graphics/usb_mouse.c - copied unchanged from r302324, projects/bhyve_graphics/vga.c - copied unchanged from r302324, projects/bhyve_graphics/vga.h Directory Properties: head/usr.sbin/bhyve/atkbdc.h (props changed) head/usr.sbin/bhyve/bhyvegc.c (props changed) head/usr.sbin/bhyve/bhyvegc.h (props changed) head/usr.sbin/bhyve/console.c (props changed) head/usr.sbin/bhyve/console.h (props changed) head/usr.sbin/bhyve/pci_fbuf.c (props changed) head/usr.sbin/bhyve/pci_xhci.c (props changed) head/usr.sbin/bhyve/pci_xhci.h (props changed) head/usr.sbin/bhyve/ps2kbd.c (props changed) head/usr.sbin/bhyve/ps2kbd.h (props changed) head/usr.sbin/bhyve/ps2mouse.c (props changed) head/usr.sbin/bhyve/ps2mouse.h (props changed) head/usr.sbin/bhyve/rfb.c (props changed) head/usr.sbin/bhyve/rfb.h (props changed) head/usr.sbin/bhyve/sockstream.c (props changed) head/usr.sbin/bhyve/sockstream.h (props changed) head/usr.sbin/bhyve/usb_emul.c (props changed) head/usr.sbin/bhyve/usb_emul.h (props changed) head/usr.sbin/bhyve/usb_mouse.c (props changed) head/usr.sbin/bhyve/vga.c (props changed) head/usr.sbin/bhyve/vga.h (props changed) Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/atkbdc.c head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Sun Jul 3 19:31:21 2016 (r302331) +++ head/usr.sbin/bhyve/Makefile Mon Jul 4 03:19:06 2016 (r302332) @@ -14,9 +14,11 @@ BHYVE_SYSDIR?=${SRCTOP} SRCS= \ atkbdc.c \ acpi.c \ + bhyvegc.c \ bhyverun.c \ block_if.c \ bootrom.c \ + console.c \ consport.c \ dbgport.c \ fwctl.c \ @@ -27,6 +29,7 @@ SRCS= \ mptbl.c \ pci_ahci.c \ pci_emul.c \ + pci_fbuf.c \ pci_hostbridge.c \ pci_irq.c \ pci_lpc.c \ @@ -35,20 +38,30 @@ SRCS= \ pci_virtio_net.c \ pci_virtio_rnd.c \ pci_uart.c \ + pci_xhci.c \ pm.c \ post.c \ + ps2kbd.c \ + ps2mouse.c \ + rfb.c \ rtc.c \ smbiostbl.c \ + sockstream.c \ task_switch.c \ uart_emul.c \ + usb_emul.c \ + usb_mouse.c \ virtio.c \ + vga.c \ xmsr.c \ spinup_ap.c .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c -LIBADD= vmmapi md pthread +LIBADD= vmmapi md pthread z + +CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller WARNS?= 2 Modified: head/usr.sbin/bhyve/atkbdc.c ============================================================================== --- head/usr.sbin/bhyve/atkbdc.c Sun Jul 3 19:31:21 2016 (r302331) +++ head/usr.sbin/bhyve/atkbdc.c Mon Jul 4 03:19:06 2016 (r302332) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2014 Tycho Nightingale + * Copyright (c) 2015 Nahanni Systems Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,56 +36,548 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include +#include +#include +#include +#include +#include "acpi.h" #include "inout.h" +#include "pci_emul.h" +#include "pci_irq.h" #include "pci_lpc.h" +#include "ps2kbd.h" +#include "ps2mouse.h" #define KBD_DATA_PORT 0x60 #define KBD_STS_CTL_PORT 0x64 -#define KBD_SYS_FLAG 0x4 #define KBDC_RESET 0xfe +#define KBD_DEV_IRQ 1 +#define AUX_DEV_IRQ 12 + +/* controller commands */ +#define KBDC_SET_COMMAND_BYTE 0x60 +#define KBDC_GET_COMMAND_BYTE 0x20 +#define KBDC_DISABLE_AUX_PORT 0xa7 +#define KBDC_ENABLE_AUX_PORT 0xa8 +#define KBDC_TEST_AUX_PORT 0xa9 +#define KBDC_TEST_CTRL 0xaa +#define KBDC_TEST_KBD_PORT 0xab +#define KBDC_DISABLE_KBD_PORT 0xad +#define KBDC_ENABLE_KBD_PORT 0xae +#define KBDC_READ_INPORT 0xc0 +#define KBDC_READ_OUTPORT 0xd0 +#define KBDC_WRITE_OUTPORT 0xd1 +#define KBDC_WRITE_KBD_OUTBUF 0xd2 +#define KBDC_WRITE_AUX_OUTBUF 0xd3 +#define KBDC_WRITE_TO_AUX 0xd4 + +/* controller command byte (set by KBDC_SET_COMMAND_BYTE) */ +#define KBD_TRANSLATION 0x40 +#define KBD_SYS_FLAG_BIT 0x04 +#define KBD_DISABLE_KBD_PORT 0x10 +#define KBD_DISABLE_AUX_PORT 0x20 +#define KBD_ENABLE_AUX_INT 0x02 +#define KBD_ENABLE_KBD_INT 0x01 +#define KBD_KBD_CONTROL_BITS (KBD_DISABLE_KBD_PORT | KBD_ENABLE_KBD_INT) +#define KBD_AUX_CONTROL_BITS (KBD_DISABLE_AUX_PORT | KBD_ENABLE_AUX_INT) + +/* controller status bits */ +#define KBDS_KBD_BUFFER_FULL 0x01 +#define KBDS_SYS_FLAG 0x04 +#define KBDS_CTRL_FLAG 0x08 +#define KBDS_AUX_BUFFER_FULL 0x20 + +/* controller output port */ +#define KBDO_KBD_OUTFULL 0x10 +#define KBDO_AUX_OUTFULL 0x20 + +#define RAMSZ 32 +#define FIFOSZ 15 +#define CTRL_CMD_FLAG 0x8000 + +struct kbd_dev { + bool irq_active; + int irq; + + uint8_t buffer[FIFOSZ]; + int brd, bwr; + int bcnt; +}; + +struct aux_dev { + bool irq_active; + int irq; +}; + +struct atkbdc_softc { + struct vmctx *ctx; + pthread_mutex_t mtx; + + struct ps2kbd_softc *ps2kbd_sc; + struct ps2mouse_softc *ps2mouse_sc; + + uint8_t status; /* status register */ + uint8_t outport; /* controller output port */ + uint8_t ram[RAMSZ]; /* byte0 = controller config */ + + uint32_t curcmd; /* current command for next byte */ + uint32_t ctrlbyte; + + struct kbd_dev kbd; + struct aux_dev aux; +}; + +static void +atkbdc_assert_kbd_intr(struct atkbdc_softc *sc) +{ + if ((sc->ram[0] & KBD_ENABLE_KBD_INT) != 0) { + sc->kbd.irq_active = true; + vm_isa_pulse_irq(sc->ctx, sc->kbd.irq, sc->kbd.irq); + } +} + +static void +atkbdc_assert_aux_intr(struct atkbdc_softc *sc) +{ + if ((sc->ram[0] & KBD_ENABLE_AUX_INT) != 0) { + sc->aux.irq_active = true; + vm_isa_pulse_irq(sc->ctx, sc->aux.irq, sc->aux.irq); + } +} + +static int +atkbdc_kbd_queue_data(struct atkbdc_softc *sc, uint8_t val) +{ + assert(pthread_mutex_isowned_np(&sc->mtx)); + + if (sc->kbd.bcnt < FIFOSZ) { + sc->kbd.buffer[sc->kbd.bwr] = val; + sc->kbd.bwr = (sc->kbd.bwr + 1) % FIFOSZ; + sc->kbd.bcnt++; + sc->status |= KBDS_KBD_BUFFER_FULL; + sc->outport |= KBDO_KBD_OUTFULL; + } else { + printf("atkbd data buffer full\n"); + } + + return (sc->kbd.bcnt < FIFOSZ); +} + +static void +atkbdc_kbd_read(struct atkbdc_softc *sc) +{ + const uint8_t translation[256] = { + 0xff, 0x43, 0x41, 0x3f, 0x3d, 0x3b, 0x3c, 0x58, + 0x64, 0x44, 0x42, 0x40, 0x3e, 0x0f, 0x29, 0x59, + 0x65, 0x38, 0x2a, 0x70, 0x1d, 0x10, 0x02, 0x5a, + 0x66, 0x71, 0x2c, 0x1f, 0x1e, 0x11, 0x03, 0x5b, + 0x67, 0x2e, 0x2d, 0x20, 0x12, 0x05, 0x04, 0x5c, + 0x68, 0x39, 0x2f, 0x21, 0x14, 0x13, 0x06, 0x5d, + 0x69, 0x31, 0x30, 0x23, 0x22, 0x15, 0x07, 0x5e, + 0x6a, 0x72, 0x32, 0x24, 0x16, 0x08, 0x09, 0x5f, + 0x6b, 0x33, 0x25, 0x17, 0x18, 0x0b, 0x0a, 0x60, + 0x6c, 0x34, 0x35, 0x26, 0x27, 0x19, 0x0c, 0x61, + 0x6d, 0x73, 0x28, 0x74, 0x1a, 0x0d, 0x62, 0x6e, + 0x3a, 0x36, 0x1c, 0x1b, 0x75, 0x2b, 0x63, 0x76, + 0x55, 0x56, 0x77, 0x78, 0x79, 0x7a, 0x0e, 0x7b, + 0x7c, 0x4f, 0x7d, 0x4b, 0x47, 0x7e, 0x7f, 0x6f, + 0x52, 0x53, 0x50, 0x4c, 0x4d, 0x48, 0x01, 0x45, + 0x57, 0x4e, 0x51, 0x4a, 0x37, 0x49, 0x46, 0x54, + 0x80, 0x81, 0x82, 0x41, 0x54, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff + }; + uint8_t val; + uint8_t release = 0; + + assert(pthread_mutex_isowned_np(&sc->mtx)); + + if (sc->ram[0] & KBD_TRANSLATION) { + while (ps2kbd_read(sc->ps2kbd_sc, &val) != -1) { + if (val == 0xf0) { + release = 0x80; + continue; + } else { + val = translation[val] | release; + } + atkbdc_kbd_queue_data(sc, val); + break; + } + } else { + while (sc->kbd.bcnt < FIFOSZ) { + if (ps2kbd_read(sc->ps2kbd_sc, &val) != -1) + atkbdc_kbd_queue_data(sc, val); + else + break; + } + } + + if (((sc->ram[0] & KBD_DISABLE_AUX_PORT) || + ps2mouse_fifocnt(sc->ps2mouse_sc) == 0) && sc->kbd.bcnt > 0) + atkbdc_assert_kbd_intr(sc); +} + +static void +atkbdc_aux_poll(struct atkbdc_softc *sc) +{ + if (ps2mouse_fifocnt(sc->ps2mouse_sc) > 0) { + sc->status |= KBDS_AUX_BUFFER_FULL | KBDS_KBD_BUFFER_FULL; + sc->outport |= KBDO_AUX_OUTFULL; + atkbdc_assert_aux_intr(sc); + } +} + +static void +atkbdc_kbd_poll(struct atkbdc_softc *sc) +{ + assert(pthread_mutex_isowned_np(&sc->mtx)); + + atkbdc_kbd_read(sc); +} + +static void +atkbdc_poll(struct atkbdc_softc *sc) +{ + atkbdc_aux_poll(sc); + atkbdc_kbd_poll(sc); +} + +static void +atkbdc_dequeue_data(struct atkbdc_softc *sc, uint8_t *buf) +{ + assert(pthread_mutex_isowned_np(&sc->mtx)); + + if (ps2mouse_read(sc->ps2mouse_sc, buf) == 0) { + if (ps2mouse_fifocnt(sc->ps2mouse_sc) == 0) { + if (sc->kbd.bcnt == 0) + sc->status &= ~(KBDS_AUX_BUFFER_FULL | + KBDS_KBD_BUFFER_FULL); + else + sc->status &= ~(KBDS_AUX_BUFFER_FULL); + sc->outport &= ~KBDO_AUX_OUTFULL; + } + + atkbdc_poll(sc); + return; + } + + if (sc->kbd.bcnt > 0) { + *buf = sc->kbd.buffer[sc->kbd.brd]; + sc->kbd.brd = (sc->kbd.brd + 1) % FIFOSZ; + sc->kbd.bcnt--; + if (sc->kbd.bcnt == 0) { + sc->status &= ~KBDS_KBD_BUFFER_FULL; + sc->outport &= ~KBDO_KBD_OUTFULL; + } + + atkbdc_poll(sc); + } + + if (ps2mouse_fifocnt(sc->ps2mouse_sc) == 0 && sc->kbd.bcnt == 0) { + sc->status &= ~(KBDS_AUX_BUFFER_FULL | KBDS_KBD_BUFFER_FULL); + } +} + static int atkbdc_data_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) { + struct atkbdc_softc *sc; + uint8_t buf; + int retval; + if (bytes != 1) return (-1); + sc = arg; + retval = 0; + + pthread_mutex_lock(&sc->mtx); + if (in) { + sc->curcmd = 0; + if (sc->ctrlbyte != 0) { + *eax = sc->ctrlbyte & 0xff; + sc->ctrlbyte = 0; + } else { + /* read device buffer; includes kbd cmd responses */ + atkbdc_dequeue_data(sc, &buf); + *eax = buf; + } + + sc->status &= ~KBDS_CTRL_FLAG; + pthread_mutex_unlock(&sc->mtx); + return (retval); + } + + if (sc->status & KBDS_CTRL_FLAG) { + /* + * Command byte for the controller. + */ + switch (sc->curcmd) { + case KBDC_SET_COMMAND_BYTE: + sc->ram[0] = *eax; + if (sc->ram[0] & KBD_SYS_FLAG_BIT) + sc->status |= KBDS_SYS_FLAG; + else + sc->status &= ~KBDS_SYS_FLAG; + break; + case KBDC_WRITE_OUTPORT: + sc->outport = *eax; + break; + case KBDC_WRITE_TO_AUX: + ps2mouse_write(sc->ps2mouse_sc, *eax, 0); + atkbdc_poll(sc); + break; + case KBDC_WRITE_KBD_OUTBUF: + atkbdc_kbd_queue_data(sc, *eax); + break; + case KBDC_WRITE_AUX_OUTBUF: + ps2mouse_write(sc->ps2mouse_sc, *eax, 1); + sc->status |= (KBDS_AUX_BUFFER_FULL | KBDS_KBD_BUFFER_FULL); + atkbdc_aux_poll(sc); + break; + default: + /* write to particular RAM byte */ + if (sc->curcmd >= 0x61 && sc->curcmd <= 0x7f) { + int byten; + + byten = (sc->curcmd - 0x60) & 0x1f; + sc->ram[byten] = *eax & 0xff; + } + break; + } - *eax = 0; + sc->curcmd = 0; + sc->status &= ~KBDS_CTRL_FLAG; - return (0); + pthread_mutex_unlock(&sc->mtx); + return (retval); + } + + /* + * Data byte for the device. + */ + ps2kbd_write(sc->ps2kbd_sc, *eax); + atkbdc_poll(sc); + + pthread_mutex_unlock(&sc->mtx); + + return (retval); } static int atkbdc_sts_ctl_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) { - int error, retval; + struct atkbdc_softc *sc; + int error, retval; if (bytes != 1) return (-1); + sc = arg; retval = 0; + + pthread_mutex_lock(&sc->mtx); + if (in) { - *eax = KBD_SYS_FLAG; /* system passed POST */ - } else { - switch (*eax) { - case KBDC_RESET: /* Pulse "reset" line. */ - error = vm_suspend(ctx, VM_SUSPEND_RESET); - assert(error == 0 || errno == EALREADY); - break; + /* read status register */ + *eax = sc->status; + pthread_mutex_unlock(&sc->mtx); + return (retval); + } + + + sc->curcmd = 0; + sc->status |= KBDS_CTRL_FLAG; + sc->ctrlbyte = 0; + + switch (*eax) { + case KBDC_GET_COMMAND_BYTE: + sc->ctrlbyte = CTRL_CMD_FLAG | sc->ram[0]; + break; + case KBDC_TEST_CTRL: + sc->ctrlbyte = CTRL_CMD_FLAG | 0x55; + break; + case KBDC_TEST_AUX_PORT: + case KBDC_TEST_KBD_PORT: + sc->ctrlbyte = CTRL_CMD_FLAG | 0; + break; + case KBDC_READ_INPORT: + sc->ctrlbyte = CTRL_CMD_FLAG | 0; + break; + case KBDC_READ_OUTPORT: + sc->ctrlbyte = CTRL_CMD_FLAG | sc->outport; + break; + case KBDC_SET_COMMAND_BYTE: + case KBDC_WRITE_OUTPORT: + case KBDC_WRITE_KBD_OUTBUF: + case KBDC_WRITE_AUX_OUTBUF: + sc->curcmd = *eax; + break; + case KBDC_DISABLE_KBD_PORT: + sc->ram[0] |= KBD_DISABLE_KBD_PORT; + break; + case KBDC_ENABLE_KBD_PORT: + sc->ram[0] &= ~KBD_DISABLE_KBD_PORT; + if (sc->kbd.bcnt > 0) + sc->status |= KBDS_KBD_BUFFER_FULL; + atkbdc_poll(sc); + break; + case KBDC_WRITE_TO_AUX: + sc->curcmd = *eax; + break; + case KBDC_DISABLE_AUX_PORT: + sc->ram[0] |= KBD_DISABLE_AUX_PORT; + ps2mouse_toggle(sc->ps2mouse_sc, 0); + sc->status &= ~(KBDS_AUX_BUFFER_FULL | KBDS_KBD_BUFFER_FULL); + sc->outport &= ~KBDS_AUX_BUFFER_FULL; + break; + case KBDC_ENABLE_AUX_PORT: + sc->ram[0] &= ~KBD_DISABLE_AUX_PORT; + ps2mouse_toggle(sc->ps2mouse_sc, 1); + if (ps2mouse_fifocnt(sc->ps2mouse_sc) > 0) + sc->status |= KBDS_AUX_BUFFER_FULL | KBDS_KBD_BUFFER_FULL; + break; + case KBDC_RESET: /* Pulse "reset" line */ + error = vm_suspend(ctx, VM_SUSPEND_RESET); + assert(error == 0 || errno == EALREADY); + break; + default: + if (*eax >= 0x21 && *eax <= 0x3f) { + /* read "byte N" from RAM */ + int byten; + + byten = (*eax - 0x20) & 0x1f; + sc->ctrlbyte = CTRL_CMD_FLAG | sc->ram[byten]; } + break; + } + + pthread_mutex_unlock(&sc->mtx); + + if (sc->ctrlbyte != 0) { + sc->status |= KBDS_KBD_BUFFER_FULL; + sc->status &= ~KBDS_AUX_BUFFER_FULL; + atkbdc_assert_kbd_intr(sc); + } else if (ps2mouse_fifocnt(sc->ps2mouse_sc) > 0 && + (sc->ram[0] & KBD_DISABLE_AUX_PORT) == 0) { + sc->status |= KBDS_AUX_BUFFER_FULL | KBDS_KBD_BUFFER_FULL; + atkbdc_assert_aux_intr(sc); + } else if (sc->kbd.bcnt > 0 && (sc->ram[0] & KBD_DISABLE_KBD_PORT) == 0) { + sc->status |= KBDS_KBD_BUFFER_FULL; + atkbdc_assert_kbd_intr(sc); } return (retval); } -INOUT_PORT(atkdbc, KBD_DATA_PORT, IOPORT_F_INOUT, atkbdc_data_handler); -SYSRES_IO(KBD_DATA_PORT, 1); -INOUT_PORT(atkbdc, KBD_STS_CTL_PORT, IOPORT_F_INOUT, - atkbdc_sts_ctl_handler); -SYSRES_IO(KBD_STS_CTL_PORT, 1); +void +atkbdc_event(struct atkbdc_softc *sc, int iskbd) +{ + pthread_mutex_lock(&sc->mtx); + + if (iskbd) + atkbdc_kbd_poll(sc); + else + atkbdc_aux_poll(sc); + pthread_mutex_unlock(&sc->mtx); +} + +void +atkbdc_init(struct vmctx *ctx) +{ + struct inout_port iop; + struct atkbdc_softc *sc; + int error; + + sc = calloc(1, sizeof(struct atkbdc_softc)); + sc->ctx = ctx; + + pthread_mutex_init(&sc->mtx, NULL); + + bzero(&iop, sizeof(struct inout_port)); + iop.name = "atkdbc"; + iop.port = KBD_STS_CTL_PORT; + iop.size = 1; + iop.flags = IOPORT_F_INOUT; + iop.handler = atkbdc_sts_ctl_handler; + iop.arg = sc; + + error = register_inout(&iop); + assert(error == 0); + + bzero(&iop, sizeof(struct inout_port)); + iop.name = "atkdbc"; + iop.port = KBD_DATA_PORT; + iop.size = 1; + iop.flags = IOPORT_F_INOUT; + iop.handler = atkbdc_data_handler; + iop.arg = sc; + + error = register_inout(&iop); + assert(error == 0); + + pci_irq_reserve(KBD_DEV_IRQ); + sc->kbd.irq = KBD_DEV_IRQ; + + pci_irq_reserve(AUX_DEV_IRQ); + sc->aux.irq = AUX_DEV_IRQ; + + sc->ps2kbd_sc = ps2kbd_init(sc); + sc->ps2mouse_sc = ps2mouse_init(sc); +} + +static void +atkbdc_dsdt(void) +{ + + dsdt_line(""); + dsdt_line("Device (KBD)"); + dsdt_line("{"); + dsdt_line(" Name (_HID, EisaId (\"PNP0303\"))"); + dsdt_line(" Name (_CRS, ResourceTemplate ()"); + dsdt_line(" {"); + dsdt_indent(2); + dsdt_fixed_ioport(KBD_DATA_PORT, 1); + dsdt_fixed_ioport(KBD_STS_CTL_PORT, 1); + dsdt_fixed_irq(1); + dsdt_unindent(2); + dsdt_line(" })"); + dsdt_line("}"); + + dsdt_line(""); + dsdt_line("Device (MOU)"); + dsdt_line("{"); + dsdt_line(" Name (_HID, EisaId (\"PNP0F13\"))"); + dsdt_line(" Name (_CRS, ResourceTemplate ()"); + dsdt_line(" {"); + dsdt_indent(2); + dsdt_fixed_ioport(KBD_DATA_PORT, 1); + dsdt_fixed_ioport(KBD_STS_CTL_PORT, 1); + dsdt_fixed_irq(12); + dsdt_unindent(2); + dsdt_line(" })"); + dsdt_line("}"); +} +LPC_DSDT(atkbdc_dsdt); + Copied: head/usr.sbin/bhyve/atkbdc.h (from r302324, projects/bhyve_graphics/atkbdc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/atkbdc.h Mon Jul 4 03:19:06 2016 (r302332, copy of r302324, projects/bhyve_graphics/atkbdc.h) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2015 Tycho Nightingale + * 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 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 _ATKBDC_H_ +#define _ATKBDC_H_ + +struct atkbdc_softc; +struct vmctx; + +void atkbdc_init(struct vmctx *ctx); +void atkbdc_event(struct atkbdc_softc *sc, int iskbd); + +#endif /* _ATKBDC_H_ */ Copied: head/usr.sbin/bhyve/bhyvegc.c (from r302324, projects/bhyve_graphics/bhyvegc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/bhyvegc.c Mon Jul 4 03:19:06 2016 (r302332, copy of r302324, projects/bhyve_graphics/bhyvegc.c) @@ -0,0 +1,72 @@ +#include + +#include + +#include +#include +#include + +#include "bhyvegc.h" + +struct bhyvegc { + struct bhyvegc_image *gc_image; + int raw; +}; + +struct bhyvegc * +bhyvegc_init(int width, int height, void *fbaddr) +{ + struct bhyvegc *gc; + struct bhyvegc_image *gc_image; + + gc = calloc(1, sizeof (struct bhyvegc)); + + gc_image = calloc(1, sizeof(struct bhyvegc_image)); + gc_image->width = width; + gc_image->height = height; + if (fbaddr) { + gc_image->data = fbaddr; + gc->raw = 1; + } else { + gc_image->data = calloc(width * height, sizeof (uint32_t)); + gc->raw = 0; + } + + gc->gc_image = gc_image; + + return (gc); +} + +void +bhyvegc_set_fbaddr(struct bhyvegc *gc, void *fbaddr) +{ + gc->raw = 1; + if (gc->gc_image->data && gc->gc_image->data != fbaddr) + free(gc->gc_image->data); + gc->gc_image->data = fbaddr; +} + +void +bhyvegc_resize(struct bhyvegc *gc, int width, int height) +{ + struct bhyvegc_image *gc_image; + + gc_image = gc->gc_image; + + gc_image->width = width; + gc_image->height = height; + if (!gc->raw) { + gc_image->data = realloc(gc_image->data, + sizeof (uint32_t) * width * height); + memset(gc_image->data, 0, width * height * sizeof (uint32_t)); + } +} + +struct bhyvegc_image * +bhyvegc_get_image(struct bhyvegc *gc) +{ + if (gc == NULL) + return (NULL); + + return (gc->gc_image); +} Copied: head/usr.sbin/bhyve/bhyvegc.h (from r302324, projects/bhyve_graphics/bhyvegc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/bhyvegc.h Mon Jul 4 03:19:06 2016 (r302332, copy of r302324, projects/bhyve_graphics/bhyvegc.h) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2015 Tycho Nightingale + * 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 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 _BHYVEGC_H_ +#define _BHYVEGC_H_ + +struct bhyvegc; + +struct bhyvegc_image { + int vgamode; + int width; + int height; + uint32_t *data; +}; + +struct bhyvegc *bhyvegc_init(int width, int height, void *fbaddr); +void bhyvegc_set_fbaddr(struct bhyvegc *gc, void *fbaddr); +void bhyvegc_resize(struct bhyvegc *gc, int width, int height); +struct bhyvegc_image *bhyvegc_get_image(struct bhyvegc *gc); + +#endif /* _BHYVEGC_H_ */ Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Sun Jul 3 19:31:21 2016 (r302331) +++ head/usr.sbin/bhyve/bhyverun.c Mon Jul 4 03:19:06 2016 (r302332) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include "bhyverun.h" #include "acpi.h" +#include "atkbdc.h" #include "inout.h" #include "dbgport.h" #include "fwctl.h" @@ -125,7 +126,7 @@ usage(int code) fprintf(stderr, "Usage: %s [-abehuwxACHPSWY] [-c vcpus] [-g ] [-l ]\n" - " %*s [-m memsize[K|k|M|m|G|g|T|t]] [-p vcpu:hostcpu] [-s ] [-U uuid] \n" + " %*s [-m mem] [-p vcpu:hostcpu] [-s ] [-U uuid] \n" " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create ACPI tables\n" " -c: # cpus (default 1)\n" @@ -135,7 +136,7 @@ usage(int code) " -h: help\n" " -H: vmexit from the guest on hlt\n" " -l: LPC device configuration\n" - " -m: memory size\n" + " -m: memory size in MB\n" " -p: pin 'vcpu' to 'hostcpu'\n" " -P: vmexit from the guest on pause\n" " -s: PCI slot config\n" @@ -901,6 +902,7 @@ main(int argc, char *argv[]) init_mem(); init_inout(); + atkbdc_init(ctx); pci_irq_init(ctx); ioapic_init(ctx); Copied: head/usr.sbin/bhyve/console.c (from r302324, projects/bhyve_graphics/console.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/console.c Mon Jul 4 03:19:06 2016 (r302332, copy of r302324, projects/bhyve_graphics/console.c) @@ -0,0 +1,118 @@ +/*- + * Copyright (c) 2015 Tycho Nightingale + * 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 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 "bhyvegc.h" +#include "console.h" + +static struct { + struct bhyvegc *gc; + + fb_render_func_t fb_render_cb; + void *fb_arg; + + kbd_event_func_t kbd_event_cb; + void *kbd_arg; + int kbd_priority; + + ptr_event_func_t ptr_event_cb; + void *ptr_arg; + int ptr_priority; +} console; + +void +console_init(int w, int h, void *fbaddr) +{ + console.gc = bhyvegc_init(w, h, fbaddr); +} + +void +console_set_fbaddr(void *fbaddr) +{ + bhyvegc_set_fbaddr(console.gc, fbaddr); +} + +struct bhyvegc_image * +console_get_image(void) +{ + struct bhyvegc_image *bhyvegc_image; + + bhyvegc_image = bhyvegc_get_image(console.gc); + + return (bhyvegc_image); +} + +void +console_fb_register(fb_render_func_t render_cb, void *arg) +{ + console.fb_render_cb = render_cb; + console.fb_arg = arg; +} + +void +console_refresh(void) +{ + if (console.fb_render_cb) + (*console.fb_render_cb)(console.gc, console.fb_arg); +} + +void +console_kbd_register(kbd_event_func_t event_cb, void *arg, int pri) +{ + if (pri > console.kbd_priority) { + console.kbd_event_cb = event_cb; + console.kbd_arg = arg; + console.kbd_priority = pri; + } +} + +void +console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri) +{ + if (pri > console.ptr_priority) { + console.ptr_event_cb = event_cb; + console.ptr_arg = arg; + console.ptr_priority = pri; + } +} + +void +console_key_event(int down, uint32_t keysym) +{ + if (console.kbd_event_cb) + (*console.kbd_event_cb)(down, keysym, console.kbd_arg); +} + +void +console_ptr_event(uint8_t button, int x, int y) +{ + if (console.ptr_event_cb) + (*console.ptr_event_cb)(button, x, y, console.ptr_arg); +} Copied: head/usr.sbin/bhyve/console.h (from r302324, projects/bhyve_graphics/console.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/console.h Mon Jul 4 03:19:06 2016 (r302332, copy of r302324, projects/bhyve_graphics/console.h) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2015 Tycho Nightingale + * 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 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 _CONSOLE_H_ +#define _CONSOLE_H_ + +struct bhyvegc; + +typedef void (*fb_render_func_t)(struct bhyvegc *gc, void *arg); +typedef void (*kbd_event_func_t)(int down, uint32_t keysym, void *arg); +typedef void (*ptr_event_func_t)(uint8_t mask, int x, int y, void *arg); + +void console_init(int w, int h, void *fbaddr); + +void console_set_fbaddr(void *fbaddr); + +struct bhyvegc_image *console_get_image(void); + +void console_fb_register(fb_render_func_t render_cb, void *arg); +void console_refresh(void); + +void console_kbd_register(kbd_event_func_t event_cb, void *arg, int pri); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 4 04:08:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5F11B908DA; Mon, 4 Jul 2016 04:08:56 +0000 (UTC) (envelope-from bigboy53245@gmail.com) Received: from mail-vk0-x22a.google.com (mail-vk0-x22a.google.com [IPv6:2607:f8b0:400c:c05::22a]) (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 818A22768; Mon, 4 Jul 2016 04:08:56 +0000 (UTC) (envelope-from bigboy53245@gmail.com) Received: by mail-vk0-x22a.google.com with SMTP id i63so47782632vkb.2; Sun, 03 Jul 2016 21:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=utSuDUH9u1D6W6zULKniRAqRo9UgAB3RuePPXMhw/Cw=; b=leaRuRZIz6uJoUl0QfqhQq8THLS4dCBRRMPe8gBDmKjup5Me+7DqSHd+5UWtfn+2ho fmM5zsLslnHgpy3XM0WVnKkIkIb8dTPnx4mtx4FSFnh5FW7jnpVsVKq+u2vXPDkc09Rx g56nbqRVpNUbLuPjAiQ1ErIS7mKkZS+Uw8See3PBaJtc3OIyVGSvFvalOrEOsEhaSkhN Nb2/lciqbWRCld8g4DGw3VXD/g/+cixkWqQceY71HRc6Pz0ppUyonbW1ABM2TyWO0NdO ewMta45564HvX3zzv0HlSSH5uU3LBkpi9Rh8W4xA/9GBdp1m6iSM2EjHOeg63lT6xZaM FKFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=utSuDUH9u1D6W6zULKniRAqRo9UgAB3RuePPXMhw/Cw=; b=jk7TnUMQOe/f88bgQJ0ngCEQ939U4VAXLREs2FFUqxKAsZIN1KwRNpMLBOBsKLW1m9 6gsG/L9odWPI9fyuBaL7ILLO6CgBLcltR/QAcvq2EZjIWQyLGRBYWvdtNn7KZlbAxsNU RHDLjlFQCFa4fRD/HIpbpuFbzfnt9pBoYfMmZay0/GYyHu5YYUEiFXM3OFsT9zhKL9ID R2DdEXd0hbTsCbDgbUxCgswUaGPYq7yqiOYOYTXu7+WQCKeiakwTHytjk6/2BLweZ6SJ D7D3qxalOXszXPViJWarFOIqe2jLqIlPtAEMSHemo33w6tq11yYJbB/jH63G3FqIXIgv MOtw== X-Gm-Message-State: ALyK8tL+ohTxiBYVTcQNrQJ27zIk7D6YJc7x9UoqWc7o2XjEuecyUSXGK64UW1GgSrPrTEatVQnkLMTVUkysdQ== X-Received: by 10.31.151.139 with SMTP id z133mr3357889vkd.129.1467605335206; Sun, 03 Jul 2016 21:08:55 -0700 (PDT) MIME-Version: 1.0 References: <201606301455.u5UEtnLs090648@repo.freebsd.org> <20160702160916.GA1985@brick> In-Reply-To: <20160702160916.GA1985@brick> From: Daniel Torres Date: Mon, 04 Jul 2016 04:08:45 +0000 Message-ID: Subject: Re: svn commit: r302297 - in head/sys/cddl/contrib/opensolaris: common/acl uts/common/fs/zfs uts/common/sys To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 04:08:56 -0000 False On Sat, Jul 2, 2016, 11:09 AM Edward Tomasz Napiera=C5=82a wrote: > On 0630T1455, Alexander Motin wrote: > > Author: mav > > Date: Thu Jun 30 14:55:49 2016 > > New Revision: 302297 > > URL: https://svnweb.freebsd.org/changeset/base/302297 > > > > Log: > > Revert r299454 and r299448. > > > > Those changes were found confusing FreeBSD libc ACL code, that doesn'= t > > differentiate ACL for directories and files, and report ACLs for all > > directories created after those patches as non-trivial. On the other > > side these changes were considered wrong from POSIX and NFSv4 points = of > > view. Until further investigation done upstream, revert those change= s > > locally in preparation for FreeBSD 11.0 release. > > Thanks! But it still doesn't pass the regression tests, due to broken > (or at least incompatible) interaction between inheritance and umask. > > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > --=20 Daniel Torres From owner-svn-src-all@freebsd.org Mon Jul 4 04:46:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D717B9117D; Mon, 4 Jul 2016 04:46:46 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id B2BF822AC; Mon, 4 Jul 2016 04:46:45 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id DD788DAB7; Mon, 4 Jul 2016 04:46:38 +0000 (UTC) Subject: Re: svn commit: r302332 - head/usr.sbin/bhyve To: Peter Grehan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607040319.u643J6a2078082@repo.freebsd.org> From: Allan Jude Message-ID: <33a7fbbf-0f23-b957-bdaa-837aefad972d@freebsd.org> Date: Mon, 4 Jul 2016 00:46:34 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201607040319.u643J6a2078082@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GG1iTAUccciuHGS5NanEeM4ucnuGeV2RO" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 04:46:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GG1iTAUccciuHGS5NanEeM4ucnuGeV2RO Content-Type: multipart/mixed; boundary="lStJ0uowEkdXPgDC3W1a4fFq99X7sSvnu" From: Allan Jude To: Peter Grehan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <33a7fbbf-0f23-b957-bdaa-837aefad972d@freebsd.org> Subject: Re: svn commit: r302332 - head/usr.sbin/bhyve References: <201607040319.u643J6a2078082@repo.freebsd.org> In-Reply-To: <201607040319.u643J6a2078082@repo.freebsd.org> --lStJ0uowEkdXPgDC3W1a4fFq99X7sSvnu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-07-03 23:19, Peter Grehan wrote: > Author: grehan > Date: Mon Jul 4 03:19:06 2016 > New Revision: 302332 > URL: https://svnweb.freebsd.org/changeset/base/302332 >=20 > Log: > Import bhyve_graphics into CURRENT. Thanks to all who tested > this on the branch. > =20 > Original commit message: > Initial bhyve native graphics support. > =20 > This adds emulations for a raw framebuffer device, PS2 keyboard/mou= se, > XHCI USB controller and a USB tablet. > =20 > A simple VNC server is provided for keyboard/mouse input, and graph= ics > output. > =20 > A VGA emulation is included, but is currently disconnected until an= > additional bhyve change to block out VGA memory is committed. > =20 > Credits: > - raw framebuffer, VNC server, XHCI controller, USB bus/device emu= lation > and UEFI f/w support by Leon Dang > - VGA, console/g, initial VNC server by tychon@ > - PS2 keyboard/mouse jointly done by tychon@ and Leon Dang > - hypervisor framebuffer mem support by neel@ > =20 > Tested by: Michael Dexter, in a number of revisions of this code. > =20 > With the appropriate UEFI image, FreeBSD, Windows and Linux guests = can > installed and run in graphics mode using the UEFI/GOP framebuffer. > =20 > Approved by: re (gjb) >=20 Thank you very much for this work. --=20 Allan Jude --lStJ0uowEkdXPgDC3W1a4fFq99X7sSvnu-- --GG1iTAUccciuHGS5NanEeM4ucnuGeV2RO 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.0.22 (MingW32) iQIcBAEBAgAGBQJXeeotAAoJEBmVNT4SmAt+yhwP/jvBTyUioLLzDS2KgRtcIsKS //iKy2tjvxUb2M0B8sqfDs9yKqEr7iljjgyYNqXFxtfIWRbA3JwWzo+4o9h9Yg/I ryxWROUgnLL6o+akjmw9WgjK1b3KnW4hLZqyKtP0658EN43GnIQrGv2pholIXOxJ yjNlNhzUnoOhPHjvFZ9VMEEFF3v6AEzYiko9ONDxO5JI2gn7Kz6kMe0mNI7JBBFW OLoNThfjYrVVbmtyQaakliH1B0ZsfLKdw/K//aoY3z10yxA48CMGiHcaB1Lri10g qvc7LBxKa1kXqUKovTlbpUki8o/u3jUmdvF3REmpXkJqplEQm1I7QX6v4LSw8UNr e1aFZ8EbCCQCquvJG5wxfsXKYOz6KvZeLv575tggZzNQ8n/MWMImtIi/hlKG5sL6 UQfOkD9xsC+ZwyXoc3rtdtqFLDjeR05aI6V/pFUwEHre6zx89dteosvDNzjnW8qG 3Ii9tAguBMBk5696HwMWq2OCuLzi3AaIG8QKFTDidL8ih3nv//rW0OcflMF3L4aF tfN3HQpKQ5lGPsTwKOmKNzMJzGwDwuPd3dUq7Vxp8yW4Qb9dL1n3HJI+SVTBAiku NJL+gw/mjrLmcyQHoj7xmyoQXohQivoESA0AsBzsEde8AWw0/Ds3IIziNF04W6ic QlLB9Vu3U+OCBzimuMGw =uoSQ -----END PGP SIGNATURE----- --GG1iTAUccciuHGS5NanEeM4ucnuGeV2RO-- From owner-svn-src-all@freebsd.org Mon Jul 4 05:18:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF597B917D9 for ; Mon, 4 Jul 2016 05:18:14 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (onethreetwo.vfemail.net [199.16.11.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F0B4201E for ; Mon, 4 Jul 2016 05:18:14 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 90571 invoked by uid 89); 4 Jul 2016 05:18:06 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 4 Jul 2016 05:18:06 -0000 Received: (qmail 90422 invoked by uid 89); 4 Jul 2016 05:17:49 -0000 Received: by simscan 1.3.1 ppid: 90412, pid: 90416, t: 0.1294s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 4 Jul 2016 05:17:49 -0000 Received: (qmail 27030 invoked by uid 89); 4 Jul 2016 05:17:49 -0000 Received: by simscan 1.4.0 ppid: 27024, pid: 27027, t: 0.5233s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by mail.vfemail.net with ESMTPA; 4 Jul 2016 05:17:48 -0000 From: Jan Beich To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302163 - in head/sys: cam conf References: <201606232320.u5NNKwR9094246@repo.freebsd.org> Date: Mon, 04 Jul 2016 07:17:34 +0200 In-Reply-To: <201606232320.u5NNKwR9094246@repo.freebsd.org> (Warner Losh's message of "Thu, 23 Jun 2016 23:20:58 +0000 (UTC)") Message-ID: <7fd2-m175-wny@vfemail.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 05:18:14 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Warner Losh writes: > Author: imp > Date: Thu Jun 23 23:20:58 2016 > New Revision: 302163 > URL: https://svnweb.freebsd.org/changeset/base/302163 > > Log: > Rename CAM_NETFLIX_IOSCHED to CAM_IOSCHED_DYNAMIC to better reflect > its nature. >=20=20=20 > Approved by: re > Reviewed By: jhb > Differential Revision: https://reviews.freebsd.org/D6811 Do you plan to rename kern.cam.do_netflix_iosched sysctl as well? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJXefFuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bFvEIAJqYJ3ad8d/auP15sznzkbF1 Fjwrd2DjydrETrVyp0u7KAVI9E+r9B57eqSBM9HpZs+xxBfODYGk6x3+KxjY9oxX mRtnj9CJ2emZCr4dlsExri/NmumB7MHyHmyDjgUS5KMSB7py8/NrFvYkrHiizlMw ZHBArW6eP7lhDr/XJ2rWTY1v63sJ+cNqaZtwJ/xJibHDKWKAO/3rk11of9P7A84R +0VGXvC0DM61+ICnB9q8OK79Ru5Dq/tw/tC3zI/TiErhDcqU/xyQHKIAjOUx5IJt 68HuKe0Qk6No4uwjiZFvWtTYtdBQ8R7fZjSgGf0d82ngdkqH8KinZgeRrvStJj0= =rtGt -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-all@freebsd.org Mon Jul 4 08:26:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E9B7B8F73A for ; Mon, 4 Jul 2016 08:26:02 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (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 02846277A for ; Mon, 4 Jul 2016 08:26:01 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x229.google.com with SMTP id i12so34517580ywa.1 for ; Mon, 04 Jul 2016 01:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+Z/uq2QjOF3xCQhWqCMJI0YI3WgYDEUnCH0XFD/KO+Y=; b=1cFdYdapv+8SbXC9IYGQuZ55fWB4JBuaIJ2LRs1R8xVLGWONakZtyF0X9e73u6HLTO uSEnB5Xjmzhra9JgNhxztGxsOAYBwXMxGKK39qkfRcYIUtAQgQeEg0FrOHgS1i0uDBCF 87gwjhDel7I5T7BfafFdarR8v3MLD6oFKMHUYa6OWc9IZaR9x6dmdImzkLPLU5DGLTIb xMc7McHkheJx6Dn0sjnaLavWzrSj0HMaodaMRFjzJllJtz6HGizpbzTwsIRpdGoFzLjI GGp3+yeOpRVU0PcgIcEs9v4skTTBXg4Z6lx6fJhzJVu+fFWp+l0k9lSxYHW4umUdWxQU JFIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+Z/uq2QjOF3xCQhWqCMJI0YI3WgYDEUnCH0XFD/KO+Y=; b=Pbgd/Mpe/RRPsRB8LeLPu8rZc4NVfy4icP2GkRMc1aE9m/Ur55SVwJY3sn33JBZEhu eDEAk1nAhjcFxEfwpMmGgCFZvudOslL837mf4inGCCab3paxdVTZm5efQMEMGppd67Gy 9ZmD41rOIe2hn+JsqUFr4qLpXraNEZ9SkzCIP2lp7xCxnbeOqdLj6RZBgOtbqJyGhgEs 0BUimP0Du7rpuEdNbpVpdw0ZY1pEyIXNJ06cwk6N/P/YalfLVuYoFix0coj05YbqXbKa iCW3A0Mbas+B+w5mFSYyexo0JwokLGtH/xam1mh4KCFpEtyyVUKf1uarG7Nt5xW3GfOP sJpQ== X-Gm-Message-State: ALyK8tKHovltC5ElScauYPXzk88D46D1P9D1M0DUtzG3TN5Ieerq5eCqXZbHYbASg7YyBJPvdkMh4lrIHjjjRQ== X-Received: by 10.129.131.193 with SMTP id t184mr6612728ywf.116.1467620761031; Mon, 04 Jul 2016 01:26:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.128.69 with HTTP; Mon, 4 Jul 2016 01:26:00 -0700 (PDT) In-Reply-To: References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> From: Ed Schouten Date: Mon, 4 Jul 2016 10:26:00 +0200 Message-ID: Subject: Re: svn commit: r302252 - head/sys/kern To: Benjamin Kaduk Cc: Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 08:26:02 -0000 2016-07-04 2:47 GMT+02:00 Benjamin Kaduk : > I did not think that .th_offset.tv_sec was valid [...] It is valid. The ".field = value" construct is called a 'designator' in C's grammar specification. What's on the left of the assignment is called a 'designator-list', which may consist of 1 or more 'designators'. There are two types of designators: '[constant-expression]' and '.identifier'. In other words, it is completely valid to write the following: struct foo bar = { .field[123].something = 456, .field[124].somethingelse = 789, }; Which is the same as: struct foo bar = { .field = { [123].something = 456, [124].somethingelse = 789, }, }; And: struct foo bar = { .field = { [123] = { .something = 456 }, [124] = { .somethingelse = 789 }, }, }; Best regards, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Jul 4 08:28:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DA05B8F7A0 for ; Mon, 4 Jul 2016 08:28:01 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 18B1B2905 for ; Mon, 4 Jul 2016 08:28:01 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22a.google.com with SMTP id i12so34548673ywa.1 for ; Mon, 04 Jul 2016 01:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RgRDXFZKm/gwHV7/O737l5zXDPLXhM1w0xJpsKhZLuQ=; b=FayuLsdX60/HJMbWUgNfT+qOMMYEXlCSMgh6f0s/ioZaTe5nj6qQVP+hsqKVxSFgJO dDF1n8z7OqAq9AxN8mQHoigTK6LbCj42yInNyMzQfqJ6RBbmeciDXyH+GlHjsjZoO7Ny jRsveCVEPvhkASAgr0YKMJchVWi3J+IIDITEvpV9rXvLIYZ+C+MBajmwWUeQa57ZSYLB o100iaHpBFVw3M9bDhgGV4L6b/UMZKuPCtXBsJ6AwBezrxEpephW3VAlkbVrd8MgizSn BGBBKgNudJP4P6HjOXbgA6T0thdV7lsnBiSXaXGFTWjILThf7d19lcpXLLlDXRk4ALNj 8rlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RgRDXFZKm/gwHV7/O737l5zXDPLXhM1w0xJpsKhZLuQ=; b=QajUDny8ejHrSQk+hQlLevQ4l6nHGPdBJxqk09RaEF8wPDRSmqLJu9s6T3076GxtUf rlZNhwnBMl1CJ9gmv1JiNaBVyLVeLnuQgbTE7SB92LDMUt3OV+7L5XTHDkYd9zgSUekP 0YJC+BFlw6WOvddkHFYDySoh3T6yX4O8fTGOby1Ql1hqzYbqI/a1t9oC5ZE+9wNNCYVH 6tGkMiVoO/VsMQM9NBzgS3RIePyfTV2eEmXb8+46UsPIr1tAzAVSQZxZdjLgOdSQTnkJ 683kEsO/wcX0N4XgPLZUv9MyEYMkrkPgF8YqdlG4FBKofPwHuw4WYY9rg6z/wtV6+UBE On/g== X-Gm-Message-State: ALyK8tKERjJWFiWlha6IL3WkZwjDugCWWgilzCN65xmdtRo4K6EFBZ0tphP8Sy7ydpG7AXxkpUEVnWnJl6iKQQ== X-Received: by 10.129.129.131 with SMTP id r125mr6640541ywf.20.1467620880292; Mon, 04 Jul 2016 01:28:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.128.69 with HTTP; Mon, 4 Jul 2016 01:27:59 -0700 (PDT) In-Reply-To: References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> From: Ed Schouten Date: Mon, 4 Jul 2016 10:27:59 +0200 Message-ID: Subject: Re: svn commit: r302252 - head/sys/kern To: Benjamin Kaduk Cc: Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 08:28:01 -0000 2016-07-04 10:26 GMT+02:00 Ed Schouten : > It is valid. The ".field = value" construct is called a 'designator' > in C's grammar specification. Typo: this is called a 'designation'. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Jul 4 13:22:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3030EB91C20; Mon, 4 Jul 2016 13:22:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F25772813; Mon, 4 Jul 2016 13:22:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u64DMEZ1003760; Mon, 4 Jul 2016 13:22:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u64DMEJW003757; Mon, 4 Jul 2016 13:22:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607041322.u64DMEJW003757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Jul 2016 13:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r302333 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 13:22:15 -0000 Author: kib Date: Mon Jul 4 13:22:13 2016 New Revision: 302333 URL: https://svnweb.freebsd.org/changeset/base/302333 Log: Enable Eric Badger commit bit. I and Eric van Gyzen are mentors. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Jul 4 03:19:06 2016 (r302332) +++ svnadmin/conf/access Mon Jul 4 13:22:13 2016 (r302333) @@ -38,6 +38,7 @@ asomers avatar avg avos +badger bapt bde bdrewery Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Jul 4 03:19:06 2016 (r302332) +++ svnadmin/conf/mentors Mon Jul 4 13:22:13 2016 (r302333) @@ -13,6 +13,7 @@ achim scottl Co-mentor: emaste anish neel Co-mentor: grehan agc scottl Co-mentor: emax +badger kib Co-mentor: vangyzen benl philip Co-mentor: simon carl jimharris cherry gibbs From owner-svn-src-all@freebsd.org Mon Jul 4 14:23:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F21FB91125; Mon, 4 Jul 2016 14:23:37 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 188D52631; Mon, 4 Jul 2016 14:23:37 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u64ENaI0028350; Mon, 4 Jul 2016 14:23:36 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u64ENamN028349; Mon, 4 Jul 2016 14:23:36 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201607041423.u64ENamN028349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Mon, 4 Jul 2016 14:23: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: r302334 - stable/10/bin/sh 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.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 14:23:37 -0000 Author: wblock (doc committer) Date: Mon Jul 4 14:23:36 2016 New Revision: 302334 URL: https://svnweb.freebsd.org/changeset/base/302334 Log: MFC r301007: Clarify the explanations for the hostname and FQDN entries. Modified: stable/10/bin/sh/sh.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/sh.1 ============================================================================== --- stable/10/bin/sh/sh.1 Mon Jul 4 13:22:13 2016 (r302333) +++ stable/10/bin/sh/sh.1 Mon Jul 4 14:23:36 2016 (r302334) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 24, 2016 +.Dd May 30, 2016 .Dt SH 1 .Os .Sh NAME @@ -1371,9 +1371,9 @@ may include any of the following formatt which are replaced by the given information: .Bl -tag -width indent .It Li \eH -The fully-qualified hostname. +This system's fully-qualified hostname (FQDN). .It Li \eh -The local hostname. +This system's hostname. .It Li \eW The final component of the current working directory. .It Li \ew From owner-svn-src-all@freebsd.org Mon Jul 4 16:50:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67614B90DA8; Mon, 4 Jul 2016 16:50:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3770C2491; Mon, 4 Jul 2016 16:50:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u64GoLxs082334; Mon, 4 Jul 2016 16:50:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u64GoLA8082333; Mon, 4 Jul 2016 16:50:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607041650.u64GoLA8082333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 4 Jul 2016 16:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302335 - head/sys/boot/efi/boot1 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.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 16:50:22 -0000 Author: emaste Date: Mon Jul 4 16:50:21 2016 New Revision: 302335 URL: https://svnweb.freebsd.org/changeset/base/302335 Log: boot1.efi: fix assignment / comparison expression PR: 210706 Submitted by: David Binderman Approved by: re (kib) MFC after: 1 week Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Mon Jul 4 14:23:36 2016 (r302334) +++ head/sys/boot/efi/boot1/boot1.c Mon Jul 4 16:50:21 2016 (r302335) @@ -629,7 +629,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_T case EFI_BUFFER_TOO_SMALL: (void)bs->FreePool(handles); if ((status = bs->AllocatePool(EfiLoaderData, hsize, - (void **)&handles) != EFI_SUCCESS)) { + (void **)&handles)) != EFI_SUCCESS) { panic("Failed to allocate %zu handles (%lu)", hsize / sizeof(*handles), EFI_ERROR_CODE(status)); } From owner-svn-src-all@freebsd.org Mon Jul 4 17:12:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8824CB9179E; Mon, 4 Jul 2016 17:12:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE562908; Mon, 4 Jul 2016 17:12:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u64HCMXP092964; Mon, 4 Jul 2016 17:12:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u64HCMbT092963; Mon, 4 Jul 2016 17:12:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201607041712.u64HCMbT092963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Jul 2016 17:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302336 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 17:12:23 -0000 Author: hselasky Date: Mon Jul 4 17:12:22 2016 New Revision: 302336 URL: https://svnweb.freebsd.org/changeset/base/302336 Log: Fix interrupt loop when switching from USB device to USB host mode by clearing all endpoint interrupt bits. PR: 210736 Approved by: re (glebius) MFC after: 1 week Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Mon Jul 4 16:50:21 2016 (r302335) +++ head/sys/dev/usb/controller/dwc_otg.c Mon Jul 4 17:12:22 2016 (r302336) @@ -93,17 +93,6 @@ #define DWC_OTG_PC2UDEV(pc) \ (USB_DMATAG_TO_XROOT((pc)->tag_parent)->udev) -#define DWC_OTG_MSK_GINT_ENABLED \ - (GINTMSK_ENUMDONEMSK | \ - GINTMSK_USBRSTMSK | \ - GINTMSK_USBSUSPMSK | \ - GINTMSK_IEPINTMSK | \ - GINTMSK_SESSREQINTMSK | \ - GINTMSK_RXFLVLMSK | \ - GINTMSK_HCHINTMSK | \ - GINTMSK_OTGINTMSK | \ - GINTMSK_PRTINTMSK) - #define DWC_OTG_MSK_GINT_THREAD_IRQ \ (GINTSTS_USBRST | GINTSTS_ENUMDONE | GINTSTS_PRTINT | \ GINTSTS_WKUPINT | GINTSTS_USBSUSP | GINTMSK_OTGINTMSK | \ @@ -376,6 +365,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * /* enable all host channel interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, (1U << sc->sc_host_ch_max) - 1U); + + /* enable proper host channel interrupts */ + sc->sc_irq_mask |= GINTMSK_HCHINTMSK; + sc->sc_irq_mask &= ~GINTMSK_IEPINTMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } if (mode == DWC_MODE_DEVICE) { @@ -436,6 +430,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * pf->usb.max_in_frame_size, pf->usb.max_out_frame_size); } + + /* enable proper device channel interrupts */ + sc->sc_irq_mask &= ~GINTMSK_HCHINTMSK; + sc->sc_irq_mask |= GINTMSK_IEPINTMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); } /* reset RX FIFO */ @@ -2870,10 +2869,13 @@ dwc_otg_filter_interrupt(void *arg) for (x = 0; x != sc->sc_dev_in_ep_max; x++) { temp = DWC_OTG_READ_4(sc, DOTG_DIEPINT(x)); - if (temp & DIEPMSK_XFERCOMPLMSK) { - DWC_OTG_WRITE_4(sc, DOTG_DIEPINT(x), - DIEPMSK_XFERCOMPLMSK); - } + /* + * NOTE: Need to clear all interrupt bits, + * because some appears to be unmaskable and + * can cause an interrupt loop: + */ + if (temp != 0) + DWC_OTG_WRITE_4(sc, DOTG_DIEPINT(x), temp); } } @@ -3980,7 +3982,7 @@ dwc_otg_init(struct dwc_otg_softc *sc) } /* enable interrupts */ - sc->sc_irq_mask = DWC_OTG_MSK_GINT_ENABLED; + sc->sc_irq_mask |= DWC_OTG_MSK_GINT_THREAD_IRQ; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_DEVICE) { From owner-svn-src-all@freebsd.org Mon Jul 4 19:08:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90006B91422; Mon, 4 Jul 2016 19:08:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 486102AA6; Mon, 4 Jul 2016 19:08:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id f30so157881568ioj.2; Mon, 04 Jul 2016 12:08:02 -0700 (PDT) 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; bh=mdbXjOdFUe7BdvUoEFEYNtMWjtNxmGrtKUtrVVqfm7E=; b=RzpTlUKblIo2xm05LtITK5oXyajV0+I8B00wPhHuWCDyUDaimnFx6mWYg2Y5pQakuE 3bC7kJtsO1xd/nQJ+ectsrPl7YUDW0GB+5ZRELSDnmhNhXTkhhskSnPCtHoSHfuAhLyV YWdOdn/VXFq3sz/sfVLW7mqsB9mceVV66I0xikIwYTZF6kjIKsCYg2FGiKgMwuvhw3ud nx4nfRFkIAC9rGEm3wCvbni/wh6f2s7T/ZU/6dUit0WTkbRF8Opz0PHViqOuCAQgrmjv NH0UB6AtsTyWdNrnH40sxhY63DwpXhiw8sU7dsIVJq7JUtQRvXzyfgDBPQCGVBCvNdyd D3oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mdbXjOdFUe7BdvUoEFEYNtMWjtNxmGrtKUtrVVqfm7E=; b=a14ivuLam2EqGGWX7GiUSzWnYWhhaU6BXmcO/ZA+QplWOd5zB1nomrdo+UTWdLqvAo A8odlowfJzix8Ms3ju/KR2N+XIR3DWBPW9SdDJSPDFyWJ0LBLd0v5EMpziYtb1y3/WtS 9pA2Xc9O+F86DGCsMX9uutSwWdJjX/uZhOET4OYw01yWhIooqCwDwTsG5eTWUBD/BMVq ZyHHpukZH5Ai7G+PIM514uktUsxJrVXJD6MuIwmiPTWFjv30OUy0z6dy0gP1peuFnrAd sybmr1xRQrdtme2r0z6SPlzhnzp3z2N4SvnoVc1qR6wy6MRhL4GVibRWNd8WiVkste1H NUYA== X-Gm-Message-State: ALyK8tLfB8epLark/vRnMpgPijbsnFgbSigNjiUPQRX1y5u13aP8uzMEElW+g0mWVMVyKE3baTEkS3TdVgJvpQ== X-Received: by 10.107.144.86 with SMTP id s83mr9254956iod.165.1467659281785; Mon, 04 Jul 2016 12:08:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.210.212 with HTTP; Mon, 4 Jul 2016 12:08:00 -0700 (PDT) In-Reply-To: References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> From: Adrian Chadd Date: Mon, 4 Jul 2016 12:08:00 -0700 Message-ID: Subject: Re: svn commit: r302252 - head/sys/kern To: Ed Schouten Cc: Benjamin Kaduk , Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 19:08:02 -0000 Hi, Does the specification / implementation also mandate that the padding is zero'ed out or otherwise initialised? -a On 4 July 2016 at 01:27, Ed Schouten wrote: > 2016-07-04 10:26 GMT+02:00 Ed Schouten : >> It is valid. The ".field = value" construct is called a 'designator' >> in C's grammar specification. > > Typo: this is called a 'designation'. > > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > KvK-nr.: 62051717 > From owner-svn-src-all@freebsd.org Mon Jul 4 19:28:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88269B91B0A for ; Mon, 4 Jul 2016 19:28:41 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (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 410612704 for ; Mon, 4 Jul 2016 19:28:41 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x230.google.com with SMTP id i12so45786432ywa.1 for ; Mon, 04 Jul 2016 12:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gMGBTYmW2Q4LiH/mc69SU3tS/v1ydDYtZoL1uAhOJC0=; b=jJl5ggy2pWkQMND1xt6YvYpWZhZPrXDBxdr2OgHq0zrmDsegg1M+G1d6KVXo621NPF qs0IpLOncc+r9VSIfZvkyobxcoTjG7w3BZfPiSM2CwGxZU3EsTgm2yjgmmD1CRgF6VKi RleY1tdXASTcPz8rLlUJ8SJRRGnenipIh6BagyRKm74SAQl1kybIaR5rFcWwZiwFD+m2 rd3gOawTiS3DgUFzCvAJFYWLztOf8eAoVuP5DsgFCRUST34WMIivmLKBh5fnjWnGbpLw FoEazj0wa+vS8Jmch4xqL12u3+Gu67w516xMvAcpL020JFMDLV5PSr9yopLN/yA4h/oW 0Oew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gMGBTYmW2Q4LiH/mc69SU3tS/v1ydDYtZoL1uAhOJC0=; b=OxkIv1JoWwv6PGrFp0yBnCSRtDPc8c7QfwJ8TrqnxWy05Q0j8k21LeIfBPUiNuGjL4 beMfcSPc9mwLr36puesNY2BnNgmniaOPvWflDC62oC+4XfTFh5XZ8lNWF+ncPRYcIx8n IDIkNnuHwd+XknkEhWS8vwOcbFF3EoVf8KeXsJXUC9xLktfbbkICbKYTI60TLJg+iyBu swSzlIst4Fn7ypWP2WoK/K3u09macGCcrdm2X5GlkpDOXZxZl13IlLFOrgEoOapg8rtS Ns/bm36ValBZuiHRdSM1fwdFo4Ni/0+ukUR4c1lVChpFaBsddcYwn6FTFt8FEKinLOcD 8pAw== X-Gm-Message-State: ALyK8tJD4xYaPiU2cl+tIUpjPF7XFUkvVWyf0DLunUH0C0WTaIw8jvQAmh0zcs0LEZfMKYSnrXuvKFD3HNwQRg== X-Received: by 10.13.241.199 with SMTP id a190mr1258141ywf.54.1467660520370; Mon, 04 Jul 2016 12:28:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.128.69 with HTTP; Mon, 4 Jul 2016 12:28:39 -0700 (PDT) In-Reply-To: References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> From: Ed Schouten Date: Mon, 4 Jul 2016 21:28:39 +0200 Message-ID: Subject: Re: svn commit: r302252 - head/sys/kern To: Adrian Chadd Cc: Benjamin Kaduk , Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 19:28:41 -0000 2016-07-04 21:08 GMT+02:00 Adrian Chadd : > Does the specification / implementation also mandate that the padding > is zero'ed out or otherwise initialised? Well... That's tricky: https://stackoverflow.com/questions/13056364/is-zero-initialization-of-structures-guaranteed-to-wipe-padded-areas https://gustedt.wordpress.com/2012/10/24/c11-defects-initialization-of-padding/ -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Jul 4 20:09:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24BD6B9144B; Mon, 4 Jul 2016 20:09:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 DCB68294B; Mon, 4 Jul 2016 20:09:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id s63so158653940ioi.3; Mon, 04 Jul 2016 13:09:20 -0700 (PDT) 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; bh=lxPyjXmtF8+2Bp6BRrmY+z+Y4ooZo7Dqli9cpEUhLFc=; b=tiqz+T3bK23eHe+yfbUO41pccEmbH2S1hponnMbzTYUrLofZdo48cmlCMXjBa/4GBK CiixkyzyjRfpF2MrUC8Zzxjmqv/k8CJDFS/TzpN1nF+G148OpTrG1oNKtU9gk2mQTiqv wdKPRLOVyCATrTinxUrHLdE+00gB0pCMNd6kRzcvCCCBbx3vOvLgpfQ9sBEQRdyoKJ/b IH+1JpnL3QlQCrcg+GJa3FqQMjbWdBPl7t/0GalzfOIdxgJfY2VnCDD1/fmRcMK6bOzg L80bwekE5/RmweTdZBUWeI4N69S3CCSifrXh4H7ZXGxek2ld4uN2TwzF+ZuoY6qG6RNV sWIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lxPyjXmtF8+2Bp6BRrmY+z+Y4ooZo7Dqli9cpEUhLFc=; b=YrsW3cM6+1bFyDWIeBwYtYL7KiSIHLae7O9fi5VU/78ktuDqj1uLjlvqSjdGbv0RVo NxRHGtK2pWNk+kBhLuHLk7NhYvB0xczEimPq3ov9TNsVYaiYHUd0fckzDmHlyApN3P7K /rs0FMOTSL+qWZZSkvK+p6xGmMVVuOPedtG71vD7HjjeINVNa2D236wRFkpwXWSDDx3X 6qsIWrefMzkOAPUHFl2TYZhveES7kHFtnY/xbQBFDzTH8DIwugepvDR1xiuRb8eiLqPv PbTnrMZ12tsaf/t9pWi9rF1YKJO4xTR3YN4QGVZudSZYJYEdP1tPcFALMOXVv8yoUs0A dDSw== X-Gm-Message-State: ALyK8tKd8CT53hh+ODRCNWzUSZRN9W3Ab42v4N/W6CZMGYWacclTbvz+NVcnhNEKtqMdCwgYQ+5AvL8N7ojoyw== X-Received: by 10.107.144.86 with SMTP id s83mr9402195iod.165.1467662960352; Mon, 04 Jul 2016 13:09:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.210.212 with HTTP; Mon, 4 Jul 2016 13:09:19 -0700 (PDT) In-Reply-To: References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> From: Adrian Chadd Date: Mon, 4 Jul 2016 13:09:19 -0700 Message-ID: Subject: Re: svn commit: r302252 - head/sys/kern To: Ed Schouten Cc: Benjamin Kaduk , Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 20:09:21 -0000 On 4 July 2016 at 12:28, Ed Schouten wrote: > 2016-07-04 21:08 GMT+02:00 Adrian Chadd : >> Does the specification / implementation also mandate that the padding >> is zero'ed out or otherwise initialised? > > Well... That's tricky: > > https://stackoverflow.com/questions/13056364/is-zero-initialization-of-structures-guaranteed-to-wipe-padded-areas > https://gustedt.wordpress.com/2012/10/24/c11-defects-initialization-of-padding/ Right, so if we're not careful, we could leak bits of kernel memory, and it can also screw up key cache comparisons. (I asked this question because I've been screwed by it recentlyish, and it looks like the latest C standard didn't fix it..) -adrian From owner-svn-src-all@freebsd.org Mon Jul 4 21:18:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 400E4B91694; Mon, 4 Jul 2016 21:18:59 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 124ED29FF; Mon, 4 Jul 2016 21:18:59 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u64LIwqG003783; Mon, 4 Jul 2016 21:18:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u64LIw2Q003782; Mon, 4 Jul 2016 21:18:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607042118.u64LIw2Q003782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Jul 2016 21:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302337 - head/usr.sbin/ppp 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.22 Precedence: list List-Id: "SVN commit messages 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, 04 Jul 2016 21:18:59 -0000 Author: bapt Date: Mon Jul 4 21:18:57 2016 New Revision: 302337 URL: https://svnweb.freebsd.org/changeset/base/302337 Log: Fix build of ppp when WITHOUT_PAM is set PR: 210658 Reported by: madpilot Tested by: madpilot Approved by: re@ (kib) Modified: head/usr.sbin/ppp/Makefile Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Mon Jul 4 17:12:22 2016 (r302336) +++ head/usr.sbin/ppp/Makefile Mon Jul 4 21:18:57 2016 (r302337) @@ -107,6 +107,7 @@ SRCS+= netgraph.c .if defined(PPP_NO_PAM) CFLAGS+=-DNOPAM +LIBADD+= crypt .else LIBADD+= pam .endif From owner-svn-src-all@freebsd.org Tue Jul 5 00:53:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DC12B903CA; Tue, 5 Jul 2016 00:53:03 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9EDD26D9; Tue, 5 Jul 2016 00:53:02 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u650r2nd083802; Tue, 5 Jul 2016 00:53:02 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u650r2XE083801; Tue, 5 Jul 2016 00:53:02 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201607050053.u650r2XE083801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Tue, 5 Jul 2016 00:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302338 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 00:53:03 -0000 Author: truckman Date: Tue Jul 5 00:53:01 2016 New Revision: 302338 URL: https://svnweb.freebsd.org/changeset/base/302338 Log: Fix a race condition between the main thread in aqm_pie_cleanup() and the callout thread that can cause a kernel panic. Always do the final cleanup in the callout thread by passing a separate callout function for that task to callout_reset_sbt(). Protect the ref_count decrement in the callout with DN_BH_WLOCK(). All other ref_count manipulation is protected with this lock. There is still a tiny window between ref_count reaching zero and the end of the callout function where it is unsafe to unload the module. Fixing this would require the use of callout_drain(), but this can't be done because dummynet holds a mutex and callout_drain() might sleep. Remove the callout_pending(), callout_active(), and callout_deactivate() calls from calculate_drop_prob(). They are not needed because this callout uses callout_init_mtx(). Submitted by: Rasool Al-Saadi Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D6928 Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- head/sys/netpfil/ipfw/dn_aqm_pie.c Mon Jul 4 21:18:57 2016 (r302337) +++ head/sys/netpfil/ipfw/dn_aqm_pie.c Tue Jul 5 00:53:01 2016 (r302338) @@ -207,24 +207,6 @@ calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; - /* dealing with race condition */ - if (callout_pending(&pst->aqm_pie_callout)) { - /* callout was reset */ - mtx_unlock(&pst->lock_mtx); - return; - } - - if (!callout_active(&pst->aqm_pie_callout)) { - /* callout was stopped */ - mtx_unlock(&pst->lock_mtx); - mtx_destroy(&pst->lock_mtx); - free(x, M_DUMMYNET); - //pst->pq->aqm_status = NULL; - pie_desc.ref_count--; - return; - } - callout_deactivate(&pst->aqm_pie_callout); - pprms = pst->parms; prob = pst->drop_prob; @@ -576,7 +558,7 @@ aqm_pie_init(struct dn_queue *q) do { /* exit with break when error occurs*/ if (!pprms){ - D("AQM_PIE is not configured"); + DX(2, "AQM_PIE is not configured"); err = EINVAL; break; } @@ -615,6 +597,22 @@ aqm_pie_init(struct dn_queue *q) } /* + * Callout function to destroy pie mtx and free PIE status memory + */ +static void +pie_callout_cleanup(void *x) +{ + struct pie_status *pst = (struct pie_status *) x; + + mtx_unlock(&pst->lock_mtx); + mtx_destroy(&pst->lock_mtx); + free(x, M_DUMMYNET); + DN_BH_WLOCK(); + pie_desc.ref_count--; + DN_BH_WUNLOCK(); +} + +/* * Clean up PIE status for queue 'q' * Destroy memory allocated for PIE status. */ @@ -640,22 +638,19 @@ aqm_pie_cleanup(struct dn_queue *q) return 1; } + /* + * Free PIE status allocated memory using pie_callout_cleanup() callout + * function to avoid any potential race. + * We reset aqm_pie_callout to call pie_callout_cleanup() in next 1um. This + * stops the scheduled calculate_drop_prob() callout and call pie_callout_cleanup() + * which does memory freeing. + */ mtx_lock(&pst->lock_mtx); + callout_reset_sbt(&pst->aqm_pie_callout, + SBT_1US, 0, pie_callout_cleanup, pst, 0); + q->aqm_status = NULL; + mtx_unlock(&pst->lock_mtx); - /* stop callout timer */ - if (callout_stop(&pst->aqm_pie_callout) || !(pst->sflags & PIE_ACTIVE)) { - mtx_unlock(&pst->lock_mtx); - mtx_destroy(&pst->lock_mtx); - free(q->aqm_status, M_DUMMYNET); - q->aqm_status = NULL; - pie_desc.ref_count--; - return 0; - } else { - q->aqm_status = NULL; - mtx_unlock(&pst->lock_mtx); - DX(2, "PIE callout has not been stoped from cleanup!"); - return EBUSY; - } return 0; } From owner-svn-src-all@freebsd.org Tue Jul 5 01:29:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF4AAB90B41; Tue, 5 Jul 2016 01:29:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABF85249A; Tue, 5 Jul 2016 01:29:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u651TQ18095170; Tue, 5 Jul 2016 01:29:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u651TOw5095155; Tue, 5 Jul 2016 01:29:24 GMT (envelope-from np@FreeBSD.org) Message-Id: <201607050129.u651TOw5095155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 5 Jul 2016 01:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302339 - in head/sys/dev/cxgbe: . cxgbei iw_cxgbe tom 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 01:29:27 -0000 Author: np Date: Tue Jul 5 01:29:24 2016 New Revision: 302339 URL: https://svnweb.freebsd.org/changeset/base/302339 Log: cxgbe(4): Changes to the CPL-handler registration mechanism and code related to "shared" CPLs. a) Combine t4_set_tcb_field and t4_set_tcb_field_rpl into a single function. Allow callers to direct the response to any iq. Tidy up set_ulp_mode_iscsi while there to use names from t4_tcb.h instead of magic constants. b) Remove all CPL handler tables from struct adapter. This reduces its size by around 2KB. All handlers are now registered at MOD_LOAD instead of attach or some kind of initialization/activation. The registration functions do not need an adapter parameter any more. c) Add per-iq handlers to deal with CPLs whose destination cannot be determined solely from the opcode. There are 2 such CPLs in use right now: SET_TCB_RPL and L2T_WRITE_RPL. The base driver continues to send filter and L2T_WRITEs over the mgmtq and solicits the reply on fwq. t4_tom (including the DDP code) now uses the port's ctrlq to send L2T_WRITEs and SET_TCB_FIELDs and solicits the reply on an ofld_rxq. fwq and ofld_rxq have different handlers that know what kind of tid to expect in the reply. Update t4_write_l2e and callers to to support any wrq/iq combination. Approved by: re@ (kib@) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c head/sys/dev/cxgbe/iw_cxgbe/cm.c head/sys/dev/cxgbe/iw_cxgbe/device.c head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h head/sys/dev/cxgbe/t4_l2t.c head/sys/dev/cxgbe/t4_l2t.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h head/sys/dev/cxgbe/tom/t4_tom_l2t.c head/sys/dev/cxgbe/tom/t4_tom_l2t.h Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/adapter.h Tue Jul 5 01:29:24 2016 (r302339) @@ -372,6 +372,13 @@ enum { NM_BUSY = 2, }; +struct sge_iq; +struct rss_header; +typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *, + struct mbuf *); +typedef int (*an_handler_t)(struct sge_iq *, const struct rsp_ctrl *); +typedef int (*fw_msg_handler_t)(struct adapter *, const __be64 *); + /* * Ingress Queue: T4 is producer, driver is consumer. */ @@ -379,6 +386,8 @@ struct sge_iq { uint32_t flags; volatile int state; struct adapter *adapter; + cpl_handler_t set_tcb_rpl; + cpl_handler_t l2t_write_rpl; struct iq_desc *desc; /* KVA of descriptor ring */ int8_t intr_pktc_idx; /* packet count threshold index */ uint8_t gen; /* generation bit */ @@ -739,12 +748,6 @@ struct sge { struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES]; }; -struct rss_header; -typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *, - struct mbuf *); -typedef int (*an_handler_t)(struct sge_iq *, const struct rsp_ctrl *); -typedef int (*fw_msg_handler_t)(struct adapter *, const __be64 *); - struct adapter { SLIST_ENTRY(adapter) link; device_t dev; @@ -783,6 +786,7 @@ struct adapter { struct sge sge; int lro_timeout; + int sc_do_rxcopy; struct taskqueue *tq[MAX_NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; @@ -842,15 +846,9 @@ struct adapter { struct memwin memwin[NUM_MEMWIN]; /* memory windows */ - an_handler_t an_handler __aligned(CACHE_LINE_SIZE); - fw_msg_handler_t fw_msg_handler[7]; /* NUM_FW6_TYPES */ - cpl_handler_t cpl_handler[0xef]; /* NUM_CPL_CMDS */ - const char *last_op; const void *last_op_thr; int last_op_flags; - - int sc_do_rxcopy; }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) @@ -1080,9 +1078,6 @@ int t4_os_pci_restore_state(struct adapt void t4_os_portmod_changed(const struct adapter *, int); void t4_os_link_changed(struct adapter *, int, int, int); void t4_iterate(void (*)(struct adapter *, void *), void *); -int t4_register_cpl_handler(struct adapter *, int, cpl_handler_t); -int t4_register_an_handler(struct adapter *, an_handler_t); -int t4_register_fw_msg_handler(struct adapter *, int, fw_msg_handler_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); void doom_vi(struct adapter *, struct vi_info *); @@ -1107,7 +1102,6 @@ void t4_nm_intr(void *); void t4_sge_modload(void); void t4_sge_modunload(void); uint64_t t4_sge_extfree_refs(void); -void t4_init_sge_cpl_handlers(struct adapter *); void t4_tweak_chip_settings(struct adapter *); int t4_read_chip_settings(struct adapter *); int t4_create_dma_tag(struct adapter *); @@ -1129,6 +1123,9 @@ int parse_pkt(struct mbuf **); void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); int tnl_cong(struct port_info *, int); +int t4_register_an_handler(an_handler_t); +int t4_register_fw_msg_handler(int, fw_msg_handler_t); +int t4_register_cpl_handler(int, cpl_handler_t); /* t4_tracer.c */ struct t4_tracer; Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Tue Jul 5 01:29:24 2016 (r302339) @@ -745,24 +745,6 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const return (0); } -static void -t4_register_cpl_handler_with_tom(struct adapter *sc) -{ - - t4_register_cpl_handler(sc, CPL_ISCSI_HDR, do_rx_iscsi_hdr); - t4_register_cpl_handler(sc, CPL_ISCSI_DATA, do_rx_iscsi_data); - t4_register_cpl_handler(sc, CPL_RX_ISCSI_DDP, do_rx_iscsi_ddp); -} - -static void -t4_unregister_cpl_handler_with_tom(struct adapter *sc) -{ - - t4_register_cpl_handler(sc, CPL_ISCSI_HDR, NULL); - t4_register_cpl_handler(sc, CPL_ISCSI_DATA, NULL); - t4_register_cpl_handler(sc, CPL_RX_ISCSI_DDP, NULL); -} - /* initiator */ void cxgbei_conn_task_reserve_itt(void *conn, void **prv, @@ -835,7 +817,6 @@ cxgbei_activate(struct adapter *sc) return (rc); } - t4_register_cpl_handler_with_tom(sc); sc->iscsi_ulp_softc = ci; return (0); @@ -849,7 +830,6 @@ cxgbei_deactivate(struct adapter *sc) if (sc->iscsi_ulp_softc != NULL) { cxgbei_ddp_cleanup(sc->iscsi_ulp_softc); - t4_unregister_cpl_handler_with_tom(sc); free(sc->iscsi_ulp_softc, M_CXGBE); sc->iscsi_ulp_softc = NULL; } @@ -1062,6 +1042,10 @@ cxgbei_mod_load(void) { int rc; + t4_register_cpl_handler(CPL_ISCSI_HDR, do_rx_iscsi_hdr); + t4_register_cpl_handler(CPL_ISCSI_DATA, do_rx_iscsi_data); + t4_register_cpl_handler(CPL_RX_ISCSI_DDP, do_rx_iscsi_ddp); + rc = start_worker_threads(); if (rc != 0) return (rc); @@ -1088,6 +1072,10 @@ cxgbei_mod_unload(void) stop_worker_threads(); + t4_register_cpl_handler(CPL_ISCSI_HDR, NULL); + t4_register_cpl_handler(CPL_ISCSI_DATA, NULL); + t4_register_cpl_handler(CPL_RX_ISCSI_DDP, NULL); + return (0); } #endif Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Tue Jul 5 01:29:24 2016 (r302339) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include "common/common.h" +#include "common/t4_tcb.h" #include "tom/t4_tom.h" #include "cxgbei.h" @@ -584,19 +585,19 @@ send_iscsi_flowc_wr(struct adapter *sc, static void set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *toep, int hcrc, int dcrc) { - uint64_t val = 0; + uint64_t val = ULP_MODE_ISCSI; if (hcrc) - val |= ULP_CRC_HEADER; + val |= ULP_CRC_HEADER << 4; if (dcrc) - val |= ULP_CRC_DATA; - val <<= 4; - val |= ULP_MODE_ISCSI; + val |= ULP_CRC_DATA << 4; CTR4(KTR_CXGBE, "%s: tid %u, ULP_MODE_ISCSI, CRC hdr=%d data=%d", __func__, toep->tid, hcrc, dcrc); - t4_set_tcb_field(sc, toep, 1, 0, 0xfff, val); + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_ULP_TYPE, + V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val, + 0, 0, toep->ofld_rxq->iq.abs_id); } /* Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jul 5 01:29:24 2016 (r302339) @@ -2463,28 +2463,14 @@ static int terminate(struct sge_iq *iq, return 0; } - void -c4iw_cm_init_cpl(struct adapter *sc) -{ - - t4_register_cpl_handler(sc, CPL_RDMA_TERMINATE, terminate); - t4_register_fw_msg_handler(sc, FW6_TYPE_WR_RPL, fw6_wr_rpl); - t4_register_fw_msg_handler(sc, FW6_TYPE_CQE, fw6_cqe_handler); - t4_register_an_handler(sc, c4iw_ev_handler); -} - - void -c4iw_cm_term_cpl(struct adapter *sc) -{ - - t4_register_cpl_handler(sc, CPL_RDMA_TERMINATE, NULL); - t4_register_fw_msg_handler(sc, FW6_TYPE_WR_RPL, NULL); - t4_register_fw_msg_handler(sc, FW6_TYPE_CQE, NULL); -} - int __init c4iw_cm_init(void) { + t4_register_cpl_handler(CPL_RDMA_TERMINATE, terminate); + t4_register_fw_msg_handler(FW6_TYPE_WR_RPL, fw6_wr_rpl); + t4_register_fw_msg_handler(FW6_TYPE_CQE, fw6_cqe_handler); + t4_register_an_handler(c4iw_ev_handler); + TAILQ_INIT(&req_list); spin_lock_init(&req_lock); INIT_LIST_HEAD(&timeout_list); @@ -2496,7 +2482,6 @@ int __init c4iw_cm_init(void) if (!c4iw_taskq) return -ENOMEM; - return 0; } @@ -2506,5 +2491,10 @@ void __exit c4iw_cm_term(void) WARN_ON(!list_empty(&timeout_list)); flush_workqueue(c4iw_taskq); destroy_workqueue(c4iw_taskq); + + t4_register_cpl_handler(CPL_RDMA_TERMINATE, NULL); + t4_register_fw_msg_handler(FW6_TYPE_WR_RPL, NULL); + t4_register_fw_msg_handler(FW6_TYPE_CQE, NULL); + t4_register_an_handler(NULL); } #endif Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/device.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/iw_cxgbe/device.c Tue Jul 5 01:29:24 2016 (r302339) @@ -227,7 +227,6 @@ c4iw_activate(struct adapter *sc) } sc->iwarp_softc = iwsc; - c4iw_cm_init_cpl(sc); rc = -c4iw_register_device(iwsc); if (rc) { Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Jul 5 01:29:24 2016 (r302339) @@ -936,9 +936,6 @@ extern int c4iw_max_read_depth; #define L1_CACHE_BYTES 32 #endif -void c4iw_cm_init_cpl(struct adapter *); -void c4iw_cm_term_cpl(struct adapter *); - void your_reg_device(struct c4iw_dev *dev); #define SGE_CTRLQ_NUM 0 Modified: head/sys/dev/cxgbe/t4_l2t.c ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/t4_l2t.c Tue Jul 5 01:29:24 2016 (r302339) @@ -111,27 +111,34 @@ found: * The write may be synchronous or asynchronous. */ int -t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) +t4_write_l2e(struct l2t_entry *e, int sync) { + struct sge_wrq *wrq; + struct adapter *sc; struct wrq_cookie cookie; struct cpl_l2t_write_req *req; - int idx = e->idx + sc->vres.l2t.start; + int idx; mtx_assert(&e->lock, MA_OWNED); + MPASS(e->wrq != NULL); - req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), 16), &cookie); + wrq = e->wrq; + sc = wrq->adapter; + + req = start_wrq_wr(wrq, howmany(sizeof(*req), 16), &cookie); if (req == NULL) return (ENOMEM); + idx = e->idx + sc->vres.l2t.start; INIT_TP_WR(req, 0); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | - V_SYNC_WR(sync) | V_TID_QID(sc->sge.fwq.abs_id))); + V_SYNC_WR(sync) | V_TID_QID(e->iqid))); req->params = htons(V_L2T_W_PORT(e->lport) | V_L2T_W_NOREPLY(!sync)); req->l2t_idx = htons(idx); req->vlan = htons(e->vlan); memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); - commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); + commit_wrq_wr(wrq, req, &cookie); if (sync && e->state != L2T_STATE_SWITCHING) e->state = L2T_STATE_SYNC_WRITE; @@ -173,9 +180,11 @@ t4_l2t_set_switching(struct adapter *sc, e->vlan = vlan; e->lport = port; + e->wrq = &sc->sge.mgmtq; + e->iqid = sc->sge.fwq.abs_id; memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN); mtx_lock(&e->lock); - rc = t4_write_l2e(sc, e, 0); + rc = t4_write_l2e(e, 0); mtx_unlock(&e->lock); return (rc); } @@ -211,7 +220,6 @@ t4_init_l2t(struct adapter *sc, int flag } sc->l2t = d; - t4_register_cpl_handler(sc, CPL_L2T_WRITE_RPL, do_l2t_write_rpl); return (0); } Modified: head/sys/dev/cxgbe/t4_l2t.h ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.h Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/t4_l2t.h Tue Jul 5 01:29:24 2016 (r302339) @@ -61,6 +61,8 @@ struct l2t_entry { uint16_t state; /* entry state */ uint16_t idx; /* entry index */ uint32_t addr[4]; /* next hop IP or IPv6 address */ + uint32_t iqid; /* iqid for reply to write_l2e */ + struct sge_wrq *wrq; /* queue to use for write_l2e */ struct ifnet *ifp; /* outgoing interface */ uint16_t smt_idx; /* SMT index */ uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */ @@ -90,7 +92,7 @@ struct l2t_entry *t4_alloc_l2e(struct l2 struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *); int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t, uint8_t, uint8_t *); -int t4_write_l2e(struct adapter *, struct l2t_entry *, int); +int t4_write_l2e(struct l2t_entry *, int); int do_l2t_write_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/t4_main.c Tue Jul 5 01:29:24 2016 (r302339) @@ -458,10 +458,6 @@ static void vi_refresh_stats(struct adap static void cxgbe_refresh_stats(struct adapter *, struct port_info *); static void cxgbe_tick(void *); static void cxgbe_vlan_config(void *, struct ifnet *, uint16_t); -static int cpl_not_handled(struct sge_iq *, const struct rss_header *, - struct mbuf *); -static int an_not_handled(struct sge_iq *, const struct rsp_ctrl *); -static int fw_msg_not_handled(struct adapter *, const __be64 *); static void t4_sysctls(struct adapter *); static void cxgbe_sysctls(struct port_info *); static int sysctl_int_array(SYSCTL_HANDLER_ARGS); @@ -525,6 +521,8 @@ static int del_filter(struct adapter *, static void clear_filter(struct filter_entry *); static int set_filter_wr(struct adapter *, int); static int del_filter_wr(struct adapter *, int); +static int set_tcb_rpl(struct sge_iq *, const struct rss_header *, + struct mbuf *); static int get_sge_context(struct adapter *, struct t4_sge_context *); static int load_fw(struct adapter *, struct t4_data *); static int read_card_mem(struct adapter *, int, struct t4_mem_range *); @@ -589,11 +587,6 @@ struct { CTASSERT(offsetof(struct sge_ofld_rxq, iq) == offsetof(struct sge_rxq, iq)); CTASSERT(offsetof(struct sge_ofld_rxq, fl) == offsetof(struct sge_rxq, fl)); #endif - -/* No easy way to include t4_msg.h before adapter.h so we check this way */ -CTASSERT(nitems(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); -CTASSERT(nitems(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); - CTASSERT(sizeof(struct cluster_metadata) <= CL_METADATA_SIZE); static int @@ -739,15 +732,6 @@ t4_attach(device_t dev) sc->mbox = sc->pf; memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); - sc->an_handler = an_not_handled; - for (i = 0; i < nitems(sc->cpl_handler); i++) - sc->cpl_handler[i] = cpl_not_handled; - for (i = 0; i < nitems(sc->fw_msg_handler); i++) - sc->fw_msg_handler[i] = fw_msg_not_handled; - t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, t4_filter_rpl); - t4_register_cpl_handler(sc, CPL_TRACE_PKT, t4_trace_pkt); - t4_register_cpl_handler(sc, CPL_T5_TRACE_PKT, t5_trace_pkt); - t4_init_sge_cpl_handlers(sc); /* Prepare the adapter for operation. */ buf = malloc(PAGE_SIZE, M_CXGBE, M_ZERO | M_WAITOK); @@ -4500,98 +4484,6 @@ cxgbe_vlan_config(void *arg, struct ifne VLAN_SETCOOKIE(vlan, ifp); } -static int -cpl_not_handled(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) -{ - -#ifdef INVARIANTS - panic("%s: opcode 0x%02x on iq %p with payload %p", - __func__, rss->opcode, iq, m); -#else - log(LOG_ERR, "%s: opcode 0x%02x on iq %p with payload %p\n", - __func__, rss->opcode, iq, m); - m_freem(m); -#endif - return (EDOOFUS); -} - -int -t4_register_cpl_handler(struct adapter *sc, int opcode, cpl_handler_t h) -{ - uintptr_t *loc, new; - - if (opcode >= nitems(sc->cpl_handler)) - return (EINVAL); - - new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled; - loc = (uintptr_t *) &sc->cpl_handler[opcode]; - atomic_store_rel_ptr(loc, new); - - return (0); -} - -static int -an_not_handled(struct sge_iq *iq, const struct rsp_ctrl *ctrl) -{ - -#ifdef INVARIANTS - panic("%s: async notification on iq %p (ctrl %p)", __func__, iq, ctrl); -#else - log(LOG_ERR, "%s: async notification on iq %p (ctrl %p)\n", - __func__, iq, ctrl); -#endif - return (EDOOFUS); -} - -int -t4_register_an_handler(struct adapter *sc, an_handler_t h) -{ - uintptr_t *loc, new; - - new = h ? (uintptr_t)h : (uintptr_t)an_not_handled; - loc = (uintptr_t *) &sc->an_handler; - atomic_store_rel_ptr(loc, new); - - return (0); -} - -static int -fw_msg_not_handled(struct adapter *sc, const __be64 *rpl) -{ - const struct cpl_fw6_msg *cpl = - __containerof(rpl, struct cpl_fw6_msg, data[0]); - -#ifdef INVARIANTS - panic("%s: fw_msg type %d", __func__, cpl->type); -#else - log(LOG_ERR, "%s: fw_msg type %d\n", __func__, cpl->type); -#endif - return (EDOOFUS); -} - -int -t4_register_fw_msg_handler(struct adapter *sc, int type, fw_msg_handler_t h) -{ - uintptr_t *loc, new; - - if (type >= nitems(sc->fw_msg_handler)) - return (EINVAL); - - /* - * These are dispatched by the handler for FW{4|6}_CPL_MSG using the CPL - * handler dispatch table. Reject any attempt to install a handler for - * this subtype. - */ - if (type == FW_TYPE_RSSCPL || type == FW6_TYPE_RSSCPL) - return (EINVAL); - - new = h ? (uintptr_t)h : (uintptr_t)fw_msg_not_handled; - loc = (uintptr_t *) &sc->fw_msg_handler[type]; - atomic_store_rel_ptr(loc, new); - - return (0); -} - /* * Should match fw_caps_config_ enums in t4fw_interface.h */ @@ -8262,39 +8154,54 @@ t4_filter_rpl(struct sge_iq *iq, const s KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__, rss->opcode)); + MPASS(iq == &sc->sge.fwq); + MPASS(is_ftid(sc, idx)); - if (is_ftid(sc, idx)) { - - idx -= sc->tids.ftid_base; - f = &sc->tids.ftid_tab[idx]; - rc = G_COOKIE(rpl->cookie); - - mtx_lock(&sc->tids.ftid_lock); - if (rc == FW_FILTER_WR_FLT_ADDED) { - KASSERT(f->pending, ("%s: filter[%u] isn't pending.", - __func__, idx)); - f->smtidx = (be64toh(rpl->oldval) >> 24) & 0xff; - f->pending = 0; /* asynchronous setup completed */ - f->valid = 1; - } else { - if (rc != FW_FILTER_WR_FLT_DELETED) { - /* Add or delete failed, display an error */ - log(LOG_ERR, - "filter %u setup failed with error %u\n", - idx, rc); - } - - clear_filter(f); - sc->tids.ftids_in_use--; + idx -= sc->tids.ftid_base; + f = &sc->tids.ftid_tab[idx]; + rc = G_COOKIE(rpl->cookie); + + mtx_lock(&sc->tids.ftid_lock); + if (rc == FW_FILTER_WR_FLT_ADDED) { + KASSERT(f->pending, ("%s: filter[%u] isn't pending.", + __func__, idx)); + f->smtidx = (be64toh(rpl->oldval) >> 24) & 0xff; + f->pending = 0; /* asynchronous setup completed */ + f->valid = 1; + } else { + if (rc != FW_FILTER_WR_FLT_DELETED) { + /* Add or delete failed, display an error */ + log(LOG_ERR, + "filter %u setup failed with error %u\n", + idx, rc); } - wakeup(&sc->tids.ftid_tab); - mtx_unlock(&sc->tids.ftid_lock); + + clear_filter(f); + sc->tids.ftids_in_use--; } + wakeup(&sc->tids.ftid_tab); + mtx_unlock(&sc->tids.ftid_lock); return (0); } static int +set_tcb_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +{ + + MPASS(iq->set_tcb_rpl != NULL); + return (iq->set_tcb_rpl(iq, rss, m)); +} + +static int +l2t_write_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +{ + + MPASS(iq->l2t_write_rpl != NULL); + return (iq->l2t_write_rpl(iq, rss, m)); +} + +static int get_sge_context(struct adapter *sc, struct t4_sge_context *cntxt) { int rc; @@ -9469,6 +9376,10 @@ mod_event(module_t mod, int cmd, void *a sx_xlock(&mlu); if (loaded++ == 0) { t4_sge_modload(); + t4_register_cpl_handler(CPL_SET_TCB_RPL, set_tcb_rpl); + t4_register_cpl_handler(CPL_L2T_WRITE_RPL, l2t_write_rpl); + t4_register_cpl_handler(CPL_TRACE_PKT, t4_trace_pkt); + t4_register_cpl_handler(CPL_T5_TRACE_PKT, t5_trace_pkt); sx_init(&t4_list_lock, "T4/T5 adapters"); SLIST_INIT(&t4_list); #ifdef TCP_OFFLOAD Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/t4_sge.c Tue Jul 5 01:29:24 2016 (r302339) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs.h" #include "common/t4_regs_values.h" #include "common/t4_msg.h" +#include "t4_l2t.h" #include "t4_mp_ring.h" #ifdef T4_PKT_TIMESTAMP @@ -253,12 +254,110 @@ static int sysctl_tc(SYSCTL_HANDLER_ARGS static counter_u64_t extfree_refs; static counter_u64_t extfree_rels; +an_handler_t t4_an_handler; +fw_msg_handler_t t4_fw_msg_handler[NUM_FW6_TYPES]; +cpl_handler_t t4_cpl_handler[NUM_CPL_CMDS]; + + +static int +an_not_handled(struct sge_iq *iq, const struct rsp_ctrl *ctrl) +{ + +#ifdef INVARIANTS + panic("%s: async notification on iq %p (ctrl %p)", __func__, iq, ctrl); +#else + log(LOG_ERR, "%s: async notification on iq %p (ctrl %p)\n", + __func__, iq, ctrl); +#endif + return (EDOOFUS); +} + +int +t4_register_an_handler(an_handler_t h) +{ + uintptr_t *loc, new; + + new = h ? (uintptr_t)h : (uintptr_t)an_not_handled; + loc = (uintptr_t *) &t4_an_handler; + atomic_store_rel_ptr(loc, new); + + return (0); +} + +static int +fw_msg_not_handled(struct adapter *sc, const __be64 *rpl) +{ + const struct cpl_fw6_msg *cpl = + __containerof(rpl, struct cpl_fw6_msg, data[0]); + +#ifdef INVARIANTS + panic("%s: fw_msg type %d", __func__, cpl->type); +#else + log(LOG_ERR, "%s: fw_msg type %d\n", __func__, cpl->type); +#endif + return (EDOOFUS); +} + +int +t4_register_fw_msg_handler(int type, fw_msg_handler_t h) +{ + uintptr_t *loc, new; + + if (type >= nitems(t4_fw_msg_handler)) + return (EINVAL); + + /* + * These are dispatched by the handler for FW{4|6}_CPL_MSG using the CPL + * handler dispatch table. Reject any attempt to install a handler for + * this subtype. + */ + if (type == FW_TYPE_RSSCPL || type == FW6_TYPE_RSSCPL) + return (EINVAL); + + new = h ? (uintptr_t)h : (uintptr_t)fw_msg_not_handled; + loc = (uintptr_t *) &t4_fw_msg_handler[type]; + atomic_store_rel_ptr(loc, new); + + return (0); +} + +static int +cpl_not_handled(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +{ + +#ifdef INVARIANTS + panic("%s: opcode 0x%02x on iq %p with payload %p", + __func__, rss->opcode, iq, m); +#else + log(LOG_ERR, "%s: opcode 0x%02x on iq %p with payload %p\n", + __func__, rss->opcode, iq, m); + m_freem(m); +#endif + return (EDOOFUS); +} + +int +t4_register_cpl_handler(int opcode, cpl_handler_t h) +{ + uintptr_t *loc, new; + + if (opcode >= nitems(t4_cpl_handler)) + return (EINVAL); + + new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled; + loc = (uintptr_t *) &t4_cpl_handler[opcode]; + atomic_store_rel_ptr(loc, new); + + return (0); +} + /* * Called on MOD_LOAD. Validates and calculates the SGE tunables. */ void t4_sge_modload(void) { + int i; if (fl_pktshift < 0 || fl_pktshift > 7) { printf("Invalid hw.cxgbe.fl_pktshift value (%d)," @@ -291,6 +390,18 @@ t4_sge_modload(void) extfree_rels = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); counter_u64_zero(extfree_rels); + + t4_an_handler = an_not_handled; + for (i = 0; i < nitems(t4_fw_msg_handler); i++) + t4_fw_msg_handler[i] = fw_msg_not_handled; + for (i = 0; i < nitems(t4_cpl_handler); i++) + t4_cpl_handler[i] = cpl_not_handled; + + t4_register_cpl_handler(CPL_FW4_MSG, handle_fw_msg); + t4_register_cpl_handler(CPL_FW6_MSG, handle_fw_msg); + t4_register_cpl_handler(CPL_SGE_EGR_UPDATE, handle_sge_egr_update); + t4_register_cpl_handler(CPL_RX_PKT, t4_eth_rx); + t4_register_fw_msg_handler(FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); } void @@ -312,17 +423,6 @@ t4_sge_extfree_refs(void) return (refs - rels); } -void -t4_init_sge_cpl_handlers(struct adapter *sc) -{ - - t4_register_cpl_handler(sc, CPL_FW4_MSG, handle_fw_msg); - t4_register_cpl_handler(sc, CPL_FW6_MSG, handle_fw_msg); - t4_register_cpl_handler(sc, CPL_SGE_EGR_UPDATE, handle_sge_egr_update); - t4_register_cpl_handler(sc, CPL_RX_PKT, t4_eth_rx); - t4_register_fw_msg_handler(sc, FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); -} - static inline void setup_pad_and_pack_boundaries(struct adapter *sc) { @@ -1316,7 +1416,7 @@ service_iq(struct sge_iq *iq, int budget KASSERT(d->rss.opcode < NUM_CPL_CMDS, ("%s: bad opcode %02x.", __func__, d->rss.opcode)); - sc->cpl_handler[d->rss.opcode](iq, &d->rss, m0); + t4_cpl_handler[d->rss.opcode](iq, &d->rss, m0); break; case X_RSPD_TYPE_INTR: @@ -1338,7 +1438,7 @@ service_iq(struct sge_iq *iq, int budget * iWARP async notification. */ if (lq >= 1024) { - sc->an_handler(iq, &d->rsp); + t4_an_handler(iq, &d->rsp); break; } @@ -2789,6 +2889,8 @@ alloc_fwq(struct adapter *sc) init_iq(fwq, sc, 0, 0, FW_IQ_QSIZE); fwq->flags |= IQ_INTR; /* always */ intr_idx = sc->intr_count > 1 ? 1 : 0; + fwq->set_tcb_rpl = t4_filter_rpl; + fwq->l2t_write_rpl = do_l2t_write_rpl; rc = alloc_iq_fl(&sc->port[0]->vi[0], fwq, NULL, intr_idx, -1); if (rc != 0) { device_printf(sc->dev, @@ -4674,10 +4776,10 @@ handle_fw_msg(struct sge_iq *iq, const s const struct rss_header *rss2; rss2 = (const struct rss_header *)&cpl->data[0]; - return (sc->cpl_handler[rss2->opcode](iq, rss2, m)); + return (t4_cpl_handler[rss2->opcode](iq, rss2, m)); } - return (sc->fw_msg_handler[cpl->type](sc, &cpl->data[0])); + return (t4_fw_msg_handler[cpl->type](sc, &cpl->data[0])); } static int Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/tom/t4_connect.c Tue Jul 5 01:29:24 2016 (r302339) @@ -261,11 +261,11 @@ calc_opt2a(struct socket *so, struct toe } void -t4_init_connect_cpl_handlers(struct adapter *sc) +t4_init_connect_cpl_handlers(void) { - t4_register_cpl_handler(sc, CPL_ACT_ESTABLISH, do_act_establish); - t4_register_cpl_handler(sc, CPL_ACT_OPEN_RPL, do_act_open_rpl); + t4_register_cpl_handler(CPL_ACT_ESTABLISH, do_act_establish); + t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl); } #define DONT_OFFLOAD_ACTIVE_OPEN(x) do { \ Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jul 5 01:29:24 2016 (r302339) @@ -1679,7 +1679,7 @@ do_fw4_ack(struct sge_iq *iq, const stru return (0); } -static int +int do_set_tcb_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct adapter *sc = iq->adapter; @@ -1693,9 +1693,7 @@ do_set_tcb_rpl(struct sge_iq *iq, const KASSERT(opcode == CPL_SET_TCB_RPL, ("%s: unexpected opcode 0x%x", __func__, opcode)); KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); - - if (is_ftid(sc, tid)) - return (t4_filter_rpl(iq, rss, m)); /* TCB is a filter */ + MPASS(iq != &sc->sge.fwq); toep = lookup_tid(sc, tid); if (toep->ulp_mode == ULP_MODE_TCPDDP) { @@ -1720,47 +1718,26 @@ do_set_tcb_rpl(struct sge_iq *iq, const } void -t4_set_tcb_field(struct adapter *sc, struct toepcb *toep, int ctrl, - uint16_t word, uint64_t mask, uint64_t val) +t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, int tid, + uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie, int iqid) { struct wrqe *wr; struct cpl_set_tcb_field *req; - wr = alloc_wrqe(sizeof(*req), ctrl ? toep->ctrlq : toep->ofld_txq); - if (wr == NULL) { - /* XXX */ - panic("%s: allocation failure.", __func__); - } - req = wrtod(wr); - - INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid); - req->reply_ctrl = htobe16(V_NO_REPLY(1) | - V_QUEUENO(toep->ofld_rxq->iq.abs_id)); - req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0)); - req->mask = htobe64(mask); - req->val = htobe64(val); - - t4_wrq_tx(sc, wr); -} - -void -t4_set_tcb_field_rpl(struct adapter *sc, struct toepcb *toep, int ctrl, - uint16_t word, uint64_t mask, uint64_t val, uint8_t cookie) -{ - struct wrqe *wr; - struct cpl_set_tcb_field *req; + MPASS((cookie & ~M_COOKIE) == 0); + MPASS((iqid & ~M_QUEUENO) == 0); - KASSERT((cookie & ~M_COOKIE) == 0, ("%s: invalid cookie %#x", __func__, - cookie)); - wr = alloc_wrqe(sizeof(*req), ctrl ? toep->ctrlq : toep->ofld_txq); + wr = alloc_wrqe(sizeof(*req), wrq); if (wr == NULL) { /* XXX */ panic("%s: allocation failure.", __func__); } req = wrtod(wr); - INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid); - req->reply_ctrl = htobe16(V_QUEUENO(toep->ofld_rxq->iq.abs_id)); + INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, tid); + req->reply_ctrl = htobe16(V_QUEUENO(iqid)); + if (reply == 0) + req->reply_ctrl |= htobe16(F_NO_REPLY); req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(cookie)); req->mask = htobe64(mask); req->val = htobe64(val); @@ -1769,22 +1746,26 @@ t4_set_tcb_field_rpl(struct adapter *sc, } void -t4_init_cpl_io_handlers(struct adapter *sc) +t4_init_cpl_io_handlers(void) { - t4_register_cpl_handler(sc, CPL_PEER_CLOSE, do_peer_close); - t4_register_cpl_handler(sc, CPL_CLOSE_CON_RPL, do_close_con_rpl); - t4_register_cpl_handler(sc, CPL_ABORT_REQ_RSS, do_abort_req); - t4_register_cpl_handler(sc, CPL_ABORT_RPL_RSS, do_abort_rpl); - t4_register_cpl_handler(sc, CPL_RX_DATA, do_rx_data); - t4_register_cpl_handler(sc, CPL_FW4_ACK, do_fw4_ack); - t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, do_set_tcb_rpl); + t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close); + t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl); + t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req); + t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl); + t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); + t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); } void -t4_uninit_cpl_io_handlers(struct adapter *sc) +t4_uninit_cpl_io_handlers(void) { - t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, t4_filter_rpl); + t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close); + t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl); + t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req); + t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl); + t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); + t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); } #endif Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Tue Jul 5 00:53:01 2016 (r302338) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Jul 5 01:29:24 2016 (r302339) @@ -786,6 +786,8 @@ handle_ddp_close(struct toepcb *toep, st F_DDP_INVALID_TAG | F_DDP_COLOR_ERR | F_DDP_TID_MISMATCH |\ F_DDP_INVALID_PPOD | F_DDP_HDRCRC_ERR | F_DDP_DATACRC_ERR) +extern cpl_handler_t t4_cpl_handler[]; + static int do_rx_data_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { @@ -807,7 +809,7 @@ do_rx_data_ddp(struct sge_iq *iq, const } if (toep->ulp_mode == ULP_MODE_ISCSI) { - sc->cpl_handler[CPL_RX_ISCSI_DDP](iq, rss, m); + t4_cpl_handler[CPL_RX_ISCSI_DDP](iq, rss, m); return (0); } @@ -848,13 +850,14 @@ enable_ddp(struct adapter *sc, struct to DDP_ASSERT_LOCKED(toep); toep->ddp_flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep, 1, W_TCB_RX_DDP_FLAGS, + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | V_TF_DDP_INDICATE_OUT(1) | V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1) | V_TF_DDP_BUF0_VALID(1) | V_TF_DDP_BUF1_VALID(1), - V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1)); - t4_set_tcb_field(sc, toep, 1, W_TCB_T_FLAGS, - V_TF_RCV_COALESCE_ENABLE(1), 0); + V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0, + toep->ofld_rxq->iq.abs_id); + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_T_FLAGS, + V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0, toep->ofld_rxq->iq.abs_id); } static int @@ -1070,9 +1073,6 @@ t4_init_ddp(struct adapter *sc, struct t td->ppod_start = sc->vres.ddp.start; td->ppod_arena = vmem_create("DDP page pods", sc->vres.ddp.start, sc->vres.ddp.size, 1, 32, M_FIRSTFIT | M_NOWAIT); - - t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, do_rx_data_ddp); - t4_register_cpl_handler(sc, CPL_RX_DDP_COMPLETE, do_rx_ddp_complete); } void @@ -1683,8 +1683,10 @@ t4_aio_cancel_active(struct kaiocb *job) */ valid_flag = i == 0 ? V_TF_DDP_BUF0_VALID(1) : V_TF_DDP_BUF1_VALID(1); - t4_set_tcb_field_rpl(sc, toep, 1, W_TCB_RX_DDP_FLAGS, - valid_flag, 0, i + DDP_BUF0_INVALIDATED); + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, + W_TCB_RX_DDP_FLAGS, valid_flag, 0, 1, + i + DDP_BUF0_INVALIDATED, + toep->ofld_rxq->iq.abs_id); toep->db[i].cancel_pending = 1; CTR2(KTR_CXGBE, "%s: request %p marked pending", __func__, job); @@ -1756,6 +1758,8 @@ int t4_ddp_mod_load(void) { + t4_register_cpl_handler(CPL_RX_DATA_DDP, do_rx_data_ddp); + t4_register_cpl_handler(CPL_RX_DDP_COMPLETE, do_rx_ddp_complete); TAILQ_INIT(&ddp_orphan_pagesets); mtx_init(&ddp_orphan_pagesets_lock, "ddp orphans", NULL, MTX_DEF); TASK_INIT(&ddp_orphan_task, 0, ddp_free_orphan_pagesets, NULL); @@ -1769,5 +1773,7 @@ t4_ddp_mod_unload(void) taskqueue_drain(taskqueue_thread, &ddp_orphan_task); MPASS(TAILQ_EMPTY(&ddp_orphan_pagesets)); mtx_destroy(&ddp_orphan_pagesets_lock); + t4_register_cpl_handler(CPL_RX_DATA_DDP, NULL); + t4_register_cpl_handler(CPL_RX_DDP_COMPLETE, NULL); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 5 03:15:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EA1B92D05 for ; Tue, 5 Jul 2016 03:15:52 +0000 (UTC) (envelope-from julio@meroh.net) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (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 0773526BE for ; Tue, 5 Jul 2016 03:15:51 +0000 (UTC) (envelope-from julio@meroh.net) Received: by mail-qk0-x230.google.com with SMTP id t127so278537019qkf.1 for ; Mon, 04 Jul 2016 20:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meroh.net; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1BVzn+QsuN2o+B7qx1xQGQqqseSYEzfmls9KPZi1jyo=; b=cA5qALIwKEC4+eQsZsWl5ErOvmMizYSlw57hax/K5lFHLJp3hFUfExZzF2aIWWYyfS i5a4Pk4CkmeON1AGA5fri1Abde/KqEvnTPZ+Qe2XIvu++dsZJo5m7mAHYvutJN8DJGN9 h9alAzVos8g9vzomsNvMRI/ARElF/fuxHlVnHO7Xf/ej59AFFCjhshiCg0LSMSewKD3Y v9A0No3hAUaA3uRaaRb0hkoJcVb0gHbTLFZIF2HAGVY7kYD91cx0xsOOgk6yjH/F1wJs yZyqaiB/s0oVqCtU04K0oQlmCz6NmOuzucuYw8SC82O1sa+oDLILBvdErzv0JFay2EkC bV6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1BVzn+QsuN2o+B7qx1xQGQqqseSYEzfmls9KPZi1jyo=; b=KJvGJkxCKNtF/GaTmsufZlrczmtQQYA6iTYwnY1buVt8+t0GHpzmNHDPuC/KOXJ/kM NM4HYndJNK/eDsg7QHOzRDSFJ7MuJBC9CE+5Mg+eduhn9gOtxioaIpW0/LFGGZoZ45iT FkegwIGLz3W8Ezkp9gkrJw+bgIABkxGsA+vWKLigJ2Zk0RZHn9COutXYy9zJdi8vgf7Z RNeAWJXCHE44Q+7BBOkrSbjmfkSHRpzXLmHcXafpptX1TuqHh8p5DkwQMHpT3dE8a9fC 9FdPa+uZ4RcXJXTHlpHs1XHsAv9fOJ6eVes+qJlIfdgFd1ducMu0JF9PsFVkZDfcIzDn 6jaw== X-Gm-Message-State: ALyK8tKmaA3kCO3iwIlZv+FHYauvLPbz+RL1Pc0Z8UVB1hZGYFY6JaHXs/YHZdJz/v+81OO45ZVj8Edb3VIzjQ== X-Received: by 10.55.212.147 with SMTP id s19mr20208834qks.64.1467688550990; Mon, 04 Jul 2016 20:15:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.55.67 with HTTP; Mon, 4 Jul 2016 20:15:31 -0700 (PDT) X-Originating-IP: [2604:2000:c650:dc00:4cad:1729:89de:1059] In-Reply-To: <201605112339.u4BNdehd062987@repo.freebsd.org> References: <201605112339.u4BNdehd062987@repo.freebsd.org> From: Julio Merino Date: Mon, 4 Jul 2016 23:15:31 -0400 Message-ID: Subject: Re: svn commit: r299496 - head/contrib/atf/atf-c/detail To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 03:15:52 -0000 On Wed, May 11, 2016 at 7:39 PM, Conrad E. Meyer wrote: > Author: cem > Date: Wed May 11 23:39:39 2016 > New Revision: 299496 > URL: https://svnweb.freebsd.org/changeset/base/299496 > > Log: > atf map: Fix double-free in low memory error path > > If atf_list_append(, X, ) fails, X is freed. Don't free it again. This fix seems bogus. I think the following is correct: https://github.com/jmmv/atf/commit/710d1cf96f3ab716e76b569714fd7303292d93b2 -- Julio Merino -- http://julio.meroh.net/ From owner-svn-src-all@freebsd.org Tue Jul 5 03:20:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05B4AB92DA6; Tue, 5 Jul 2016 03:20:08 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (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 C5CFB2873; Tue, 5 Jul 2016 03:20:07 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id l125so51653365ywb.2; Mon, 04 Jul 2016 20:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=u76UuP5SABCJgDd9biN+ai3BD4VfpWNppx8t0k+t8/M=; b=AvU74MQyyO3Pad6LIUap7w9vob8vx+EwDkLQjtoEkGK9eTuY9R1Wi6TrjXTKOUZnS9 Z6fhJw0x54fwtUF1HDCREjNpGJW0KYXaCApTp7Z5jbnfIKfzDq8b4xGLcEXEy+fqBl1m Gl3r1dQaGm364TDbXMEX1YUBr7SGhJ+x4qLlqb+J8oMXggUeJpivWQnDKyEiT2kA+Egp FnrETbPGRkNL3dR0R5YmfXPhr8WR7dcHsPx8ZzLCd/T+WfCV+jHn/ENZfzFsQoT4c9ME /z+Bsg1JsSO9SQXrUGQtyTbtvKk9ZEzcRGcMtHu/1qV2d/ob/Wutft+DGTvXGUoH3XI1 apPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=u76UuP5SABCJgDd9biN+ai3BD4VfpWNppx8t0k+t8/M=; b=F8iXy2uRRdn8Yf7xIaoAIzqSJrkWaIx7xPSlmqoqFC45pKRY5woXQgRtJvg963pQBo Dg9T7PEa2IPHxbQOBUrHPKWFYmi8ONBhZHxkdMGt6wCYuevhFBSkNQUqU3aWrw3cMTUT yiCUJ9+WJc09spZZBlCKfwINJbT4vKxAAw5BJvVXrQMa4qkvm40XjFkZF4Mrig9SQ4ZA HFz7ddCXffXaM9TzYaryJQrZh24+wr6wXydsq0LJoDd8dZ7QdtJa44G1rryMU9lUQky2 dFAJpYkQrHeKoP+xSqPFHbYMdyHoBUWJdWeISmAc45EobOtMZCZ+Z12d4LRTZwaRIt5W Tt3w== X-Gm-Message-State: ALyK8tKuuRlXSHMEzohUxHzucCB2bFAkOj+xH1ABrsWEd3ZF3ePjcOxm2aMSkGDGNsnYoSoLSccEPOpcXTAPOw== X-Received: by 10.37.90.135 with SMTP id o129mr8523785ybb.161.1467688806746; Mon, 04 Jul 2016 20:20:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.10.212 with HTTP; Mon, 4 Jul 2016 20:20:06 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <201605112339.u4BNdehd062987@repo.freebsd.org> References: <201605112339.u4BNdehd062987@repo.freebsd.org> From: Marcelo Araujo Date: Tue, 5 Jul 2016 11:20:06 +0800 Message-ID: Subject: Re: svn commit: r299496 - head/contrib/atf/atf-c/detail To: "Conrad E. Meyer" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 03:20:08 -0000 Isn't need to have approve from re@ to commit now? As we are closer to have 11-RELEASE. Best, 2016-05-12 7:39 GMT+08:00 Conrad E. Meyer : > Author: cem > Date: Wed May 11 23:39:39 2016 > New Revision: 299496 > URL: https://svnweb.freebsd.org/changeset/base/299496 > > Log: > atf map: Fix double-free in low memory error path > > If atf_list_append(, X, ) fails, X is freed. Don't free it again. > > If anyone wants to walk this patch upstream, be my guest. I literally > cannot > upstream it myself due to Google's stupid CLA. > > Reported by: Coverity > CID: 979936 > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/contrib/atf/atf-c/detail/map.c > > Modified: head/contrib/atf/atf-c/detail/map.c > > ============================================================================== > --- head/contrib/atf/atf-c/detail/map.c Wed May 11 23:25:59 2016 > (r299495) > +++ head/contrib/atf/atf-c/detail/map.c Wed May 11 23:39:39 2016 > (r299496) > @@ -360,7 +360,6 @@ atf_map_insert(atf_map_t *m, const char > if (atf_is_error(err)) { > if (managed) > free(value); > - free(me); > } > } > } else { > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Tue Jul 5 03:21:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F35E7B92E60; Tue, 5 Jul 2016 03:21:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (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 BFD542B04; Tue, 5 Jul 2016 03:21:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x22a.google.com with SMTP id b13so63261557pat.0; Mon, 04 Jul 2016 20:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=oEP5k5VszO+5IMaoooz2ZX4Rno2LBlvI8Ra8pw81GuQ=; b=Zv2IPqNu3d3e8mywaLYoamKJNSPRRSu8pgMmlLjBcBC/SOcAGM1htvKkWMXmjIen/g Yi2RKNA+f5VHEQYY/JKYmILLDjGCJxW+aQ6RHdhjVgn2h7Qj3kSCJGwJwOGdxyT03j+R pHdB5pnBJm5VH/33o0x2VMULQ6gdAc+KGWicgufux47PWFcfydqqXdnXivBQx44x5GGj Y+WW8EFo25weYvRuzEO9QOdeLoeQPbdSDWoDaiHk+6NCw9KL55DAK/vtNSfpnOnZS4vr v2GSD8xI94zKhkPDuMbA9hVzV84ACQZatk5FGMZZPxLthuObleXCrwTtMXdVZ6NodaL+ /gpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=oEP5k5VszO+5IMaoooz2ZX4Rno2LBlvI8Ra8pw81GuQ=; b=SBsG32XodXla4Uo4pvpVvXFLP9OVQ9QyBuBn5hwOo9CKSGLbuaUpxfA7cB/TSgH0MR 6epIyCsWmrad6QslZJ669y7BFaAbZrtFeSgTJEwqpH81RZic5TIltji4Yfa3aDrzIXlN SO6kZIt9mYtb5CNjhOJPK7sts1L4AwX8DAP1xH4DuinrdxAjzpHNiO1V8V2kg8QfRlFJ IWKaE+3DUOLsUwnB4dbFnzVl+YpWDuS/8b85PKQfM6DYWivt7l7/1/KumvGZFtRg4BWU 2iqFJhFb++4EiY4WQQzzJ++v1YkXUgH6DRXwalYo9faZUx9lGRFh1TQUrn2wWa8B+Q09 h4sw== X-Gm-Message-State: ALyK8tI3Cf9zPD72pL3ud+Qdiy34oDi4EFM/GeQY3Mwa8mPVeclnriFOvEBM4rue5iU/sQ== X-Received: by 10.66.175.45 with SMTP id bx13mr25128827pac.23.1467688869177; Mon, 04 Jul 2016 20:21:09 -0700 (PDT) Received: from [192.168.20.18] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s12sm373505pfj.57.2016.07.04.20.21.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Jul 2016 20:21:08 -0700 (PDT) Subject: Re: svn commit: r299496 - head/contrib/atf/atf-c/detail Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BBABC54F-EADB-40E5-B476-890DBB074019"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Mon, 4 Jul 2016 20:21:06 -0700 Cc: "Conrad E. Meyer" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <3D64473F-DA1A-4674-BE81-5C4AC3B6ED44@gmail.com> References: <201605112339.u4BNdehd062987@repo.freebsd.org> To: araujo@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 03:21:10 -0000 --Apple-Mail=_BBABC54F-EADB-40E5-B476-890DBB074019 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 4, 2016, at 20:20, Marcelo Araujo = wrote: >=20 > Isn't need to have approve from re@ to commit now? As we are closer to = have 11-RELEASE. >=20 > Best, The commit date was prior to the freeze. Thanks, -Ngie --Apple-Mail=_BBABC54F-EADB-40E5-B476-890DBB074019 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 iQIcBAEBCgAGBQJXeyejAAoJEPWDqSZpMIYVQSwQAKyfz8ur1qc3Gaxrh5QTA/ZZ va5PE4RZovC7roEeDSoYUIdI3RqDEuWB+hDAZC+R1PpzMVk6mkdzxTgN0Dihtple YkLbcFzfK5ROE+WmZhLiAyvfcbktVh3wrNJmURMklpjFEcnzqUDBjltJZk7f6jNw yeX8t7npthlxo2bwFPRERqPkId2qxk6DLKhT1SwpL5pmdvwVOROpkqqShggXhaJE P0EfcrNnXxFYXvs9YMgZV4DXq9nrLPMB++fLsrEVb/V3dkjM7P+U0Ughq7kNhqCY /nTk+2aw3VoJZtbSpbWoOGi8YKwkl95fmWL/pXy5vZt8q4HN7pSGRrSyeSoIoNf1 7mvgu2uTX4iJh8TWACT2UC7kRgOMRGVCW+vVg4my1eN0RDicoMoQk6gBH28j6Yhy mFucVZZNUFRhomvt7N2vvbrzw27ym9Z4Fyr19QPuT2nsPGZRvbmC2f4oOdW/D2kP JLcYBCFuUlkHUrnxQMQ+Fk+IIpJD7sHIXVe1KckpLkzDsv4UAP+VqZvT0UEwLzDp kpaDln+59GnqIW3Kg0YQQ5V80DwhetyGxFiZQJopTAiybs9sqGGiveNgH5ny8v2f TUvjIkfhC0TFBFEO01t5FVaIWLFwsCI4NT0X9+WzgrJBRUHkTl2NfGjWIsOAVAh0 wmdtbFYiA1en/OxwZ/9q =ZZMT -----END PGP SIGNATURE----- --Apple-Mail=_BBABC54F-EADB-40E5-B476-890DBB074019-- From owner-svn-src-all@freebsd.org Tue Jul 5 03:22:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D9D7B92F7E; Tue, 5 Jul 2016 03:22:35 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (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 567292D2E; Tue, 5 Jul 2016 03:22:35 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x22c.google.com with SMTP id l125so51680210ywb.2; Mon, 04 Jul 2016 20:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hmFVKwUFM6xb5lwH3JMNyBfjbg/bpz7uNQvVA9dPgWw=; b=L/00aw8EwsQ8I+bqTNzLvw6lk84INaV0USl2ItLkOr7yXLV4ovdR9kiL831NDZXScN D/UhM5gnMxeF+6xK9Gk2dT5iJ3iQbRL344n4ziEUd9wiiIp/pkH1EMg5VGNgvr9qxlz+ /BM+Pvw0lNwB78SrycRyLfXmosuouEKaDK9VTFBxZpJi8a4jLkdwJSpXMJ19QHjLMaiu P6dy+pZ0a96vV2ekRzbB3sng/QQa2/iHxkqDllO8d6eTK8B0DeMmbebfC6MMRdIoWRF7 /lEI7KDpoXAI9VlE7kwk06m+EbOCuJHRcsuuW2nGaDYwmidis/M2H8hrc/w9Y6G2DG+P Yzyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=hmFVKwUFM6xb5lwH3JMNyBfjbg/bpz7uNQvVA9dPgWw=; b=N5jhv58lsdqddGEE1j31WG6YWNPY7vK75kYr3boSrK1+jAHCfThJ+GR/RcAeNy2rCo TCqlZZrHKRDCNP7gaU167jGtf+Jfw77rC5iTLc9l8wGFSycY9YiewZbixu8OQoyxcniX +oK/ItfTYruImWUWC+ER1qGaMktXmmZ4fWMRAHMfsj02chIoU9vqHC75VVa9xZTBrg5G 4ewgGbEzTXVxgqP54pSvqu/AOG4s4ZF6QauZ9a9mo975DpfXniQzmuqgJ5y1/Y90A7qR GzwB8oSgHoyHPj5/e00iTQNJ0xOJdNMUUL9JMZtx2bx/ZNBOGjdo2BkE3zFv9nKLeBq1 XQog== X-Gm-Message-State: ALyK8tJxsaZgIH3md1B7PfsjEcp5VZn9xLUJMy25n84DuiPl68v/wWO9s+1FXATrN7Z0vQASVEIjgSGJ6Q5igA== X-Received: by 10.129.177.68 with SMTP id p65mr10005212ywh.10.1467688954707; Mon, 04 Jul 2016 20:22:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.10.212 with HTTP; Mon, 4 Jul 2016 20:22:34 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <3D64473F-DA1A-4674-BE81-5C4AC3B6ED44@gmail.com> References: <201605112339.u4BNdehd062987@repo.freebsd.org> <3D64473F-DA1A-4674-BE81-5C4AC3B6ED44@gmail.com> From: Marcelo Araujo Date: Tue, 5 Jul 2016 11:22:34 +0800 Message-ID: Subject: Re: svn commit: r299496 - head/contrib/atf/atf-c/detail To: "Ngie Cooper (yaneurabeya)" Cc: "Conrad E. Meyer" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 03:22:35 -0000 Wow yes, didn't notice.. sorry for the noise :) 2016-07-05 11:21 GMT+08:00 Ngie Cooper (yaneurabeya) : > > > On Jul 4, 2016, at 20:20, Marcelo Araujo > wrote: > > > > Isn't need to have approve from re@ to commit now? As we are closer to > have 11-RELEASE. > > > > Best, > > The commit date was prior to the freeze. > Thanks, > -Ngie > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Tue Jul 5 06:14:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31792B91157; Tue, 5 Jul 2016 06:14:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E73FF2ECF; Tue, 5 Jul 2016 06:14:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u656EOWo002430; Tue, 5 Jul 2016 06:14:24 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u656EOpv002429; Tue, 5 Jul 2016 06:14:24 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201607050614.u656EOpv002429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 5 Jul 2016 06:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302340 - head/sys/powerpc/mpc85xx 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 06:14:25 -0000 Author: jhibbits Date: Tue Jul 5 06:14:23 2016 New Revision: 302340 URL: https://svnweb.freebsd.org/changeset/base/302340 Log: Unbreak the LBC driver, broken with the large RMan and 36-bit physical address changes. Remove the use of fdt_data_to_res(), and instead construct the resources manually. Additionally, avoid the 32-bit size limitation of fdt_data_get(), by building physical addresses manually from the lbc ranges property. Approved by: re@(gjb) Modified: head/sys/powerpc/mpc85xx/lbc.c Modified: head/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.c Tue Jul 5 01:29:24 2016 (r302339) +++ head/sys/powerpc/mpc85xx/lbc.c Tue Jul 5 06:14:23 2016 (r302340) @@ -362,17 +362,17 @@ static int fdt_lbc_reg_decode(phandle_t node, struct lbc_softc *sc, struct lbc_devinfo *di) { - u_long start, end, count; + rman_res_t start, end, count; pcell_t *reg, *regptr; pcell_t addr_cells, size_cells; int tuple_size, tuples; - int i, rv, bank; + int i, j, rv, bank; if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells) != 0) return (ENXIO); tuple_size = sizeof(pcell_t) * (addr_cells + size_cells); - tuples = OF_getprop_alloc(node, "reg", tuple_size, (void **)®); + tuples = OF_getencprop_alloc(node, "reg", tuple_size, (void **)®); debugf("addr_cells = %d, size_cells = %d\n", addr_cells, size_cells); debugf("tuples = %d, tuple size = %d\n", tuples, tuple_size); if (tuples <= 0) @@ -387,11 +387,14 @@ fdt_lbc_reg_decode(phandle_t node, struc reg += 1; /* Get address/size. */ - rv = fdt_data_to_res(reg, addr_cells - 1, size_cells, &start, - &count); - if (rv != 0) { - resource_list_free(&di->di_res); - goto out; + start = count = 0; + for (j = 0; j < addr_cells; j++) { + start <<= 32; + start |= reg[j]; + } + for (j = 0; j < size_cells; j++) { + count <<= 32; + count |= reg[addr_cells + j - 1]; } reg += addr_cells - 1 + size_cells; @@ -399,15 +402,14 @@ fdt_lbc_reg_decode(phandle_t node, struc start = sc->sc_banks[bank].kva + start; end = start + count - 1; - debugf("reg addr bank = %d, start = %lx, end = %lx, " - "count = %lx\n", bank, start, end, count); + debugf("reg addr bank = %d, start = %jx, end = %jx, " + "count = %jx\n", bank, start, end, count); /* Use bank (CS) cell as rid. */ resource_list_add(&di->di_res, SYS_RES_MEMORY, bank, start, end, count); } rv = 0; -out: OF_prop_free(regptr); return (rv); } @@ -442,13 +444,14 @@ lbc_attach(device_t dev) struct lbc_softc *sc; struct lbc_devinfo *di; struct rman *rm; - u_long offset, start, size; + uintmax_t offset, size; + vm_paddr_t start; device_t cdev; phandle_t node, child; pcell_t *ranges, *rangesptr; int tuple_size, tuples; int par_addr_cells; - int bank, error, i; + int bank, error, i, j; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -540,7 +543,7 @@ lbc_attach(device_t dev) tuple_size = sizeof(pcell_t) * (sc->sc_addr_cells + par_addr_cells + sc->sc_size_cells); - tuples = OF_getprop_alloc(node, "ranges", tuple_size, + tuples = OF_getencprop_alloc(node, "ranges", tuple_size, (void **)&ranges); if (tuples < 0) { device_printf(dev, "could not retrieve 'ranges' property\n"); @@ -558,7 +561,7 @@ lbc_attach(device_t dev) for (i = 0; i < tuples; i++) { /* The first cell is the bank (chip select) number. */ - bank = fdt_data_get((void *)ranges, 1); + bank = fdt_data_get(ranges, 1); if (bank < 0 || bank > LBC_DEV_MAX) { device_printf(dev, "bank out of range: %d\n", bank); error = ERANGE; @@ -570,17 +573,25 @@ lbc_attach(device_t dev) * Remaining cells of the child address define offset into * this CS. */ - offset = fdt_data_get((void *)ranges, sc->sc_addr_cells - 1); - ranges += sc->sc_addr_cells - 1; + offset = 0; + for (j = 0; j < sc->sc_addr_cells - 1; j++) { + offset <<= sizeof(pcell_t) * 8; + offset |= *ranges; + ranges++; + } /* Parent bus start address of this bank. */ - start = fdt_data_get((void *)ranges, par_addr_cells); - ranges += par_addr_cells; + start = 0; + for (j = 0; j < par_addr_cells; j++) { + start <<= sizeof(pcell_t) * 8; + start |= *ranges; + ranges++; + } size = fdt_data_get((void *)ranges, sc->sc_size_cells); ranges += sc->sc_size_cells; - debugf("bank = %d, start = %lx, size = %lx\n", bank, - start, size); + debugf("bank = %d, start = %jx, size = %jx\n", bank, + (uintmax_t)start, size); sc->sc_banks[bank].addr = start + offset; sc->sc_banks[bank].size = size; From owner-svn-src-all@freebsd.org Tue Jul 5 06:16:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2ED1B91223; Tue, 5 Jul 2016 06:16:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A056511BE; Tue, 5 Jul 2016 06:16:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u656GgqH002565; Tue, 5 Jul 2016 06:16:42 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u656Gghq002559; Tue, 5 Jul 2016 06:16:42 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201607050616.u656Gghq002559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 5 Jul 2016 06:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302341 - in head/sys: contrib/ncsw/inc contrib/ncsw/inc/integrations contrib/ncsw/inc/integrations/P2041 contrib/ncsw/inc/integrations/P3041 contrib/ncsw/inc/integrations/P5020 contrib... 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 06:16:43 -0000 Author: jhibbits Date: Tue Jul 5 06:16:42 2016 New Revision: 302341 URL: https://svnweb.freebsd.org/changeset/base/302341 Log: Remove SoC-specific integrations from dTSEC, to make it SoC agnostic. This will allow a single kernel to run on all SoCs supported by the dTSEC driver. Approved by: re@(gjb) Added: head/sys/contrib/ncsw/inc/integrations/dpaa_integration_ext.h (contents, props changed) head/sys/contrib/ncsw/integrations/fman_ctrl_code/ - copied from r302340, head/sys/contrib/ncsw/integrations/P3041/fman_ctrl_code/ Deleted: head/sys/contrib/ncsw/inc/integrations/P2041/ head/sys/contrib/ncsw/inc/integrations/P3041/ head/sys/contrib/ncsw/inc/integrations/P5020/ head/sys/contrib/ncsw/integrations/P2041/ head/sys/contrib/ncsw/integrations/P3041/ head/sys/contrib/ncsw/integrations/P5020/ head/sys/powerpc/conf/dpaa/config.p2041 head/sys/powerpc/conf/dpaa/config.p3041 head/sys/powerpc/conf/dpaa/config.p5020 head/sys/powerpc/conf/dpaa/files.p2041 head/sys/powerpc/conf/dpaa/files.p3041 head/sys/powerpc/conf/dpaa/files.p5020 Modified: head/sys/contrib/ncsw/inc/error_ext.h head/sys/contrib/ncsw/inc/integrations/part_ext.h head/sys/contrib/ncsw/integrations/fman_ucode.h head/sys/powerpc/conf/dpaa/config.dpaa Modified: head/sys/contrib/ncsw/inc/error_ext.h ============================================================================== --- head/sys/contrib/ncsw/inc/error_ext.h Tue Jul 5 06:14:23 2016 (r302340) +++ head/sys/contrib/ncsw/inc/error_ext.h Tue Jul 5 06:16:42 2016 (r302341) @@ -353,6 +353,7 @@ int ERROR_DYNAMIC_LEVEL = ERROR_GLOBAL_L #define PRINT_FORMAT "[CPU%02d, %s:%d %s]" #define PRINT_FMT_PARAMS CORE_GetId(), __FILE__, __LINE__, __FUNCTION__ +#define ERR_STRING(err) #err #if (!(defined(DEBUG_ERRORS)) || (DEBUG_ERRORS == 0)) /* No debug/error/event messages at all */ @@ -398,7 +399,7 @@ extern const char *eventStrings[]; if (REPORT_LEVEL_##_level <= DEBUG_DYNAMIC_LEVEL) { \ XX_Print("> %s (%s) " PRINT_FORMAT ": ", \ dbgLevelStrings[REPORT_LEVEL_##_level - 1], \ - moduleStrings[__ERR_MODULE__ >> 16], \ + ERR_STRING(__ERR_MODULE__), \ PRINT_FMT_PARAMS); \ XX_Print _vmsg; \ XX_Print("\r\n"); \ @@ -412,7 +413,7 @@ extern const char *eventStrings[]; if (REPORT_LEVEL_##_level <= ERROR_DYNAMIC_LEVEL) { \ XX_Print("! %s %s Error " PRINT_FORMAT ": %s; ", \ dbgLevelStrings[REPORT_LEVEL_##_level - 1], \ - moduleStrings[__ERR_MODULE__ >> 16], \ + ERR_STRING(__ERR_MODULE__), \ PRINT_FMT_PARAMS, \ errTypeStrings[(GET_ERROR_TYPE(_err) - E_OK - 1)]); \ XX_Print _vmsg; \ @@ -435,7 +436,7 @@ extern const char *eventStrings[]; if (_ev##_LEVEL <= EVENT_DYNAMIC_LEVEL) { \ XX_Print("~ %s %s Event " PRINT_FORMAT ": %s (flags: 0x%04x); ", \ dbgLevelStrings[_ev##_LEVEL - 1], \ - moduleStrings[__ERR_MODULE__ >> 16], \ + ERR_STRING(__ERR_MODULE__), \ PRINT_FMT_PARAMS, \ eventStrings[((_ev) - EV_NO_EVENT - 1)], \ (uint16_t)(_flg)); \ Added: head/sys/contrib/ncsw/inc/integrations/dpaa_integration_ext.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/ncsw/inc/integrations/dpaa_integration_ext.h Tue Jul 5 06:16:42 2016 (r302341) @@ -0,0 +1,378 @@ +/****************************************************************************** + + © 1995-2003, 2004, 2005-2011 Freescale Semiconductor, Inc. + All rights reserved. + + This is proprietary source code of Freescale Semiconductor Inc., + and its use is subject to the NetComm Device Drivers EULA. + The copyright notice above does not evidence any actual or intended + publication of such source code. + + ALTERNATIVELY, redistribution and use in source and binary forms, with + or without modification, are permitted provided that the following + conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Freescale Semiconductor 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 Freescale Semiconductor ``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 Freescale Semiconductor 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. + + **************************************************************************/ +/** + + @File dpaa_integration_ext.h + + @Description P5020 FM external definitions and structures. +*//***************************************************************************/ +#ifndef __DPAA_INTEGRATION_EXT_H +#define __DPAA_INTEGRATION_EXT_H + +#include "std_ext.h" + + +/**************************************************************************//** + @Description DPAA SW Portals Enumeration. +*//***************************************************************************/ +typedef enum +{ + e_DPAA_SWPORTAL0 = 0, + e_DPAA_SWPORTAL1, + e_DPAA_SWPORTAL2, + e_DPAA_SWPORTAL3, + e_DPAA_SWPORTAL4, + e_DPAA_SWPORTAL5, + e_DPAA_SWPORTAL6, + e_DPAA_SWPORTAL7, + e_DPAA_SWPORTAL8, + e_DPAA_SWPORTAL9, + e_DPAA_SWPORTAL_DUMMY_LAST +} e_DpaaSwPortal; + +/**************************************************************************//** + @Description DPAA Direct Connect Portals Enumeration. +*//***************************************************************************/ +typedef enum +{ + e_DPAA_DCPORTAL0 = 0, + e_DPAA_DCPORTAL1, + e_DPAA_DCPORTAL2, + e_DPAA_DCPORTAL3, + e_DPAA_DCPORTAL4, + e_DPAA_DCPORTAL_DUMMY_LAST +} e_DpaaDcPortal; + +#define DPAA_MAX_NUM_OF_SW_PORTALS e_DPAA_SWPORTAL_DUMMY_LAST +#define DPAA_MAX_NUM_OF_DC_PORTALS e_DPAA_DCPORTAL_DUMMY_LAST + +/***************************************************************************** + QMan INTEGRATION-SPECIFIC DEFINITIONS +******************************************************************************/ +#define QM_MAX_NUM_OF_POOL_CHANNELS 15 /**< Total number of channels, dedicated and pool */ +#define QM_MAX_NUM_OF_WQ 8 /**< Number of work queues per channel */ +#define QM_MAX_NUM_OF_CGS 256 /**< Congestion groups number */ +#define QM_MAX_NUM_OF_FQIDS (16 * MEGABYTE) + /**< FQIDs range - 24 bits */ + +/**************************************************************************//** + @Description Work Queue Channel assignments in QMan. +*//***************************************************************************/ +typedef enum +{ + e_QM_FQ_CHANNEL_SWPORTAL0 = 0, /**< Dedicated channels serviced by software portals 0 to 9 */ + e_QM_FQ_CHANNEL_SWPORTAL1, + e_QM_FQ_CHANNEL_SWPORTAL2, + e_QM_FQ_CHANNEL_SWPORTAL3, + e_QM_FQ_CHANNEL_SWPORTAL4, + e_QM_FQ_CHANNEL_SWPORTAL5, + e_QM_FQ_CHANNEL_SWPORTAL6, + e_QM_FQ_CHANNEL_SWPORTAL7, + e_QM_FQ_CHANNEL_SWPORTAL8, + e_QM_FQ_CHANNEL_SWPORTAL9, + + e_QM_FQ_CHANNEL_POOL1 = 0x21, /**< Pool channels that can be serviced by any of the software portals */ + e_QM_FQ_CHANNEL_POOL2, + e_QM_FQ_CHANNEL_POOL3, + e_QM_FQ_CHANNEL_POOL4, + e_QM_FQ_CHANNEL_POOL5, + e_QM_FQ_CHANNEL_POOL6, + e_QM_FQ_CHANNEL_POOL7, + e_QM_FQ_CHANNEL_POOL8, + e_QM_FQ_CHANNEL_POOL9, + e_QM_FQ_CHANNEL_POOL10, + e_QM_FQ_CHANNEL_POOL11, + e_QM_FQ_CHANNEL_POOL12, + e_QM_FQ_CHANNEL_POOL13, + e_QM_FQ_CHANNEL_POOL14, + e_QM_FQ_CHANNEL_POOL15, + + e_QM_FQ_CHANNEL_FMAN0_SP0 = 0x40, /**< Dedicated channels serviced by Direct Connect Portal 0: + connected to FMan 0; assigned in incrementing order to + each sub-portal (SP) in the portal */ + e_QM_FQ_CHANNEL_FMAN0_SP1, + e_QM_FQ_CHANNEL_FMAN0_SP2, + e_QM_FQ_CHANNEL_FMAN0_SP3, + e_QM_FQ_CHANNEL_FMAN0_SP4, + e_QM_FQ_CHANNEL_FMAN0_SP5, + e_QM_FQ_CHANNEL_FMAN0_SP6, + e_QM_FQ_CHANNEL_FMAN0_SP7, + e_QM_FQ_CHANNEL_FMAN0_SP8, + e_QM_FQ_CHANNEL_FMAN0_SP9, + e_QM_FQ_CHANNEL_FMAN0_SP10, + e_QM_FQ_CHANNEL_FMAN0_SP11, + + e_QM_FQ_CHANNEL_RMAN_SP2 = 0x62, /**< Dedicated channels serviced by Direct Connect Portal 1: connected to RMan */ + e_QM_FQ_CHANNEL_RMAN_SP3, + + e_QM_FQ_CHANNEL_CAAM = 0x80, /**< Dedicated channel serviced by Direct Connect Portal 2: + connected to SEC 4.x */ + + e_QM_FQ_CHANNEL_PME = 0xA0, /**< Dedicated channel serviced by Direct Connect Portal 3: + connected to PME */ + e_QM_FQ_CHANNEL_RAID = 0xC0 /**< Dedicated channel serviced by Direct Connect Portal 4: + connected to RAID */ +} e_QmFQChannel; + +/***************************************************************************** + BMan INTEGRATION-SPECIFIC DEFINITIONS +******************************************************************************/ +#define BM_MAX_NUM_OF_POOLS 64 /**< Number of buffers pools */ + +/***************************************************************************** + FM INTEGRATION-SPECIFIC DEFINITIONS +******************************************************************************/ +#define INTG_MAX_NUM_OF_FM 1 + +/* Ports defines */ +#define FM_MAX_NUM_OF_1G_MACS 5 +#define FM_MAX_NUM_OF_10G_MACS 1 +#define FM_MAX_NUM_OF_MACS (FM_MAX_NUM_OF_1G_MACS + FM_MAX_NUM_OF_10G_MACS) +#define FM_MAX_NUM_OF_OH_PORTS 7 + +#define FM_MAX_NUM_OF_1G_RX_PORTS FM_MAX_NUM_OF_1G_MACS +#define FM_MAX_NUM_OF_10G_RX_PORTS FM_MAX_NUM_OF_10G_MACS +#define FM_MAX_NUM_OF_RX_PORTS (FM_MAX_NUM_OF_10G_RX_PORTS + FM_MAX_NUM_OF_1G_RX_PORTS) + +#define FM_MAX_NUM_OF_1G_TX_PORTS FM_MAX_NUM_OF_1G_MACS +#define FM_MAX_NUM_OF_10G_TX_PORTS FM_MAX_NUM_OF_10G_MACS +#define FM_MAX_NUM_OF_TX_PORTS (FM_MAX_NUM_OF_10G_TX_PORTS + FM_MAX_NUM_OF_1G_TX_PORTS) + +#define FM_PORT_MAX_NUM_OF_EXT_POOLS 8 /**< Number of external BM pools per Rx port */ +#define FM_PORT_NUM_OF_CONGESTION_GRPS 256 /**< Total number of congestion groups in QM */ +#define FM_MAX_NUM_OF_SUB_PORTALS 12 +#define FM_PORT_MAX_NUM_OF_OBSERVED_EXT_POOLS 0 + +/* RAMs defines */ +#define FM_MURAM_SIZE (160 * KILOBYTE) +#define FM_IRAM_SIZE ( 64 * KILOBYTE) + +/* PCD defines */ +#define FM_PCD_PLCR_NUM_ENTRIES 256 /**< Total number of policer profiles */ +#define FM_PCD_KG_NUM_OF_SCHEMES 32 /**< Total number of KG schemes */ +#define FM_PCD_MAX_NUM_OF_CLS_PLANS 256 /**< Number of classification plan entries. */ + +/* RTC defines */ +#define FM_RTC_NUM_OF_ALARMS 2 /**< RTC number of alarms */ +#define FM_RTC_NUM_OF_PERIODIC_PULSES 2 /**< RTC number of periodic pulses */ +#define FM_RTC_NUM_OF_EXT_TRIGGERS 2 /**< RTC number of external triggers */ + +/* QMI defines */ +#define QMI_MAX_NUM_OF_TNUMS 64 +#define MAX_QMI_DEQ_SUBPORTAL 12 +#define QMI_DEF_TNUMS_THRESH 48 + +/* FPM defines */ +#define FM_NUM_OF_FMAN_CTRL_EVENT_REGS 4 + +/* DMA defines */ +#define DMA_THRESH_MAX_COMMQ 31 +#define DMA_THRESH_MAX_BUF 127 + +/* BMI defines */ +#define BMI_MAX_NUM_OF_TASKS 128 +#define BMI_MAX_NUM_OF_DMAS 32 +#define BMI_MAX_FIFO_SIZE (FM_MURAM_SIZE) +#define PORT_MAX_WEIGHT 16 + + +/**************************************************************************//** + @Description Enum for inter-module interrupts registration +*//***************************************************************************/ +typedef enum e_FmEventModules +{ + e_FM_MOD_PRS, /**< Parser event */ + e_FM_MOD_KG, /**< Keygen event */ + e_FM_MOD_PLCR, /**< Policer event */ + e_FM_MOD_10G_MAC, /**< 10G MAC error event */ + e_FM_MOD_1G_MAC, /**< 1G MAC error event */ + e_FM_MOD_TMR, /**< Timer event */ + e_FM_MOD_1G_MAC_TMR, /**< 1G MAC timer event */ + e_FM_MOD_FMAN_CTRL, /**< FMAN Controller timer event */ + e_FM_MOD_DUMMY_LAST +} e_FmEventModules; + +/**************************************************************************//** + @Description Enum for interrupts types +*//***************************************************************************/ +typedef enum e_FmIntrType +{ + e_FM_INTR_TYPE_ERR, + e_FM_INTR_TYPE_NORMAL +} e_FmIntrType; + +/**************************************************************************//** + @Description Enum for inter-module interrupts registration +*//***************************************************************************/ +typedef enum e_FmInterModuleEvent +{ + e_FM_EV_PRS, /**< Parser event */ + e_FM_EV_ERR_PRS, /**< Parser error event */ + e_FM_EV_KG, /**< Keygen event */ + e_FM_EV_ERR_KG, /**< Keygen error event */ + e_FM_EV_PLCR, /**< Policer event */ + e_FM_EV_ERR_PLCR, /**< Policer error event */ + e_FM_EV_ERR_10G_MAC0, /**< 10G MAC 0 error event */ + e_FM_EV_ERR_1G_MAC0, /**< 1G MAC 0 error event */ + e_FM_EV_ERR_1G_MAC1, /**< 1G MAC 1 error event */ + e_FM_EV_ERR_1G_MAC2, /**< 1G MAC 2 error event */ + e_FM_EV_ERR_1G_MAC3, /**< 1G MAC 3 error event */ + e_FM_EV_ERR_1G_MAC4, /**< 1G MAC 4 error event */ + e_FM_EV_TMR, /**< Timer event */ + e_FM_EV_1G_MAC0_TMR, /**< 1G MAC 0 timer event */ + e_FM_EV_1G_MAC1_TMR, /**< 1G MAC 1 timer event */ + e_FM_EV_1G_MAC2_TMR, /**< 1G MAC 2 timer event */ + e_FM_EV_1G_MAC3_TMR, /**< 1G MAC 3 timer event */ + e_FM_EV_1G_MAC4_TMR, /**< 1G MAC 4 timer event */ + e_FM_EV_FMAN_CTRL_0, /**< Fman controller event 0 */ + e_FM_EV_FMAN_CTRL_1, /**< Fman controller event 1 */ + e_FM_EV_FMAN_CTRL_2, /**< Fman controller event 2 */ + e_FM_EV_FMAN_CTRL_3, /**< Fman controller event 3 */ + e_FM_EV_DUMMY_LAST +} e_FmInterModuleEvent; + +#define GET_FM_MODULE_EVENT(mod, id, intrType, event) \ + switch(mod){ \ + case e_FM_MOD_PRS: \ + if (id) event = e_FM_EV_DUMMY_LAST; \ + else event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_PRS : e_FM_EV_PRS; \ + break; \ + case e_FM_MOD_KG: \ + if (id) event = e_FM_EV_DUMMY_LAST; \ + else event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_KG : e_FM_EV_DUMMY_LAST; \ + break; \ + case e_FM_MOD_PLCR: \ + if (id) event = e_FM_EV_DUMMY_LAST; \ + else event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_PLCR : e_FM_EV_PLCR; \ + break; \ + case e_FM_MOD_10G_MAC: \ + if (id) event = e_FM_EV_DUMMY_LAST; \ + else event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_10G_MAC0 : e_FM_EV_DUMMY_LAST; \ + break; \ + case e_FM_MOD_1G_MAC: \ + switch(id){ \ + case(0): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_1G_MAC0 : e_FM_EV_DUMMY_LAST; break; \ + case(1): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_1G_MAC1 : e_FM_EV_DUMMY_LAST; break; \ + case(2): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_1G_MAC2 : e_FM_EV_DUMMY_LAST; break; \ + case(3): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_1G_MAC3 : e_FM_EV_DUMMY_LAST; break; \ + case(4): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_ERR_1G_MAC4 : e_FM_EV_DUMMY_LAST; break; \ + } \ + break; \ + case e_FM_MOD_TMR: \ + if (id) event = e_FM_EV_DUMMY_LAST; \ + else event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_DUMMY_LAST : e_FM_EV_TMR; \ + break; \ + case e_FM_MOD_1G_MAC_TMR: \ + switch(id){ \ + case(0): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_DUMMY_LAST : e_FM_EV_1G_MAC0_TMR; break; \ + case(1): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_DUMMY_LAST : e_FM_EV_1G_MAC1_TMR; break; \ + case(2): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_DUMMY_LAST : e_FM_EV_1G_MAC2_TMR; break; \ + case(3): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_DUMMY_LAST : e_FM_EV_1G_MAC3_TMR; break; \ + case(4): event = (intrType == e_FM_INTR_TYPE_ERR) ? e_FM_EV_DUMMY_LAST : e_FM_EV_1G_MAC4_TMR; break; \ + } \ + break; \ + case e_FM_MOD_FMAN_CTRL: \ + if (intrType == e_FM_INTR_TYPE_ERR) event = e_FM_EV_DUMMY_LAST; \ + else switch(id){ \ + case(0): event = e_FM_EV_FMAN_CTRL_0; break; \ + case(1): event = e_FM_EV_FMAN_CTRL_1; break; \ + case(2): event = e_FM_EV_FMAN_CTRL_2; break; \ + case(3): event = e_FM_EV_FMAN_CTRL_3; break; \ + } \ + break; \ + default: event = e_FM_EV_DUMMY_LAST; \ + break;} + +#define FM_CHECK_PORT_RESTRICTIONS(__validPorts, __newPortIndx) TRUE + +/* P5020 unique features */ +#define FM_QMI_DEQ_OPTIONS_SUPPORT +#define FM_NO_DISPATCH_RAM_ECC +#define FM_FIFO_ALLOCATION_OLD_ALG +#define FM_NO_WATCHDOG +#define FM_NO_TNUM_AGING +#define FM_NO_TGEC_LOOPBACK +#define FM_KG_NO_BYPASS_FQID_GEN +#define FM_KG_NO_BYPASS_PLCR_PROFILE_GEN +#define FM_NO_BACKUP_POOLS +#define FM_NO_OP_OBSERVED_POOLS +#define FM_NO_ADVANCED_RATE_LIMITER +#define FM_NO_OP_OBSERVED_CGS + +/* FM erratas (P5020, P3041) */ +#define FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 +#define FM_TX_SHORT_FRAME_BAD_TS_ERRATA_10GMAC_A006 /* No implementation, Out of LLD scope */ +#define FM_TX_FIFO_CORRUPTION_ERRATA_10GMAC_A007 +#define FM_ECC_HALT_NO_SYNC_ERRATA_10GMAC_A008 + +#define FM_NO_RX_PREAM_ERRATA_DTSECx1 +#define FM_GRS_ERRATA_DTSEC_A002 +#define FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 +#define FM_GTS_ERRATA_DTSEC_A004 +#define FM_PAUSE_BLOCK_ERRATA_DTSEC_A006 /* do nothing */ +#define FM_RESERVED_ACCESS_TO_DISABLED_DEV_ERRATA_DTSEC_A0011 /* do nothing */ +#define FM_GTS_AFTER_MAC_ABORTED_FRAME_ERRATA_DTSEC_A0012 FM_GTS_ERRATA_DTSEC_A004 +#define FM_10_100_SGMII_NO_TS_ERRATA_DTSEC3 +#define FM_TX_LOCKUP_ERRATA_DTSEC6 + +#define FM_IM_TX_SYNC_SKIP_TNUM_ERRATA_FMAN_A001 /* Implemented by ucode */ +#define FM_HC_DEF_FQID_ONLY_ERRATA_FMAN_A003 /* Implemented by ucode */ +#define FM_IM_TX_SHARED_TNUM_ERRATA_FMAN4 /* Implemented by ucode */ +#define FM_IM_GS_DEADLOCK_ERRATA_FMAN5 /* Implemented by ucode */ +#define FM_IM_DEQ_PIPELINE_DEPTH_ERRATA_FMAN10 /* Implemented by ucode */ +#define FM_CC_GEN6_MISSMATCH_ERRATA_FMAN12 /* Implemented by ucode */ +#define FM_CC_CHANGE_SHARED_TNUM_ERRATA_FMAN13 /* Implemented by ucode */ +#define FM_IM_LARGE_MRBLR_ERRATA_FMAN15 /* Implemented by ucode */ +#define FM_BMI_TO_RISC_ENQ_ERRATA_FMANc /* No implementation, Out of LLD scope */ +#define FM_INVALID_SWPRS_DATA_ERRATA_FMANd +//#define FM_PRS_MPLS_SSA_ERRATA_FMANj /* No implementation, No patch yet */ +//#define FM_PRS_INITIAL_PLANID_ERRATA_FMANk /* No implementation, No patch yet */ + +#define FM_NO_COPY_CTXA_CTXB_ERRATA_FMAN_SW001 + +#define FM_10G_REM_N_LCL_FLT_EX_ERRATA_10GMAC001 + +/* P2041 */ +#define FM_BAD_VLAN_DETECT_ERRATA_10GMAC_A010 + +/* Common to all */ +#define FM_RX_PREAM_4_ERRATA_DTSEC_A001 FM_NO_RX_PREAM_ERRATA_DTSECx1 +#define FM_UCODE_NOT_RESET_ERRATA_BUGZILLA6173 +#define FM_MAGIC_PACKET_UNRECOGNIZED_ERRATA_DTSEC2 /* No implementation, Out of LLD scope */ +#define FM_PRS_MEM_ERRATA_FMAN_SW003 +#define FM_LEN_CHECK_ERRATA_FMAN_SW002 + + +#endif /* __DPAA_INTEGRATION_EXT_H */ Modified: head/sys/contrib/ncsw/inc/integrations/part_ext.h ============================================================================== --- head/sys/contrib/ncsw/inc/integrations/part_ext.h Tue Jul 5 06:14:23 2016 (r302340) +++ head/sys/contrib/ncsw/inc/integrations/part_ext.h Tue Jul 5 06:16:42 2016 (r302341) @@ -41,32 +41,24 @@ #define __PART_EXT_H #include "std_ext.h" -#include "part_integration_ext.h" +#include "enet_ext.h" +#include "dpaa_integration_ext.h" +#define CORE_E500MC -#if !(defined(MPC8306) || \ - defined(MPC8309) || \ - defined(MPC834x) || \ - defined(MPC836x) || \ - defined(MPC832x) || \ - defined(MPC837x) || \ - defined(MPC8568) || \ - defined(MPC8569) || \ - defined(P1020) || \ - defined(P1021) || \ - defined(P1022) || \ - defined(P1023) || \ - defined(P2020) || \ - defined(P2040) || \ - defined(P2041) || \ - defined(P3041) || \ - defined(P4080) || \ - defined(SC4080) || \ - defined(P5020) || \ - defined(MSC814x)) -#error "unable to proceed without chip-definition" -#endif /* !(defined(MPC834x) || ... */ - +/***************************************************************************** + INTEGRATION-SPECIFIC MODULE CODES +******************************************************************************/ +#define MODULE_MEM 0x00010000 +#define MODULE_MM 0x00020000 +#define MODULE_QM 0x000d0000 +#define MODULE_BM 0x000e0000 +#define MODULE_FM 0x00130000 +#define MODULE_FM_MURAM 0x00140000 +#define MODULE_FM_PCD 0x00150000 +#define MODULE_FM_RTC 0x00160000 +#define MODULE_FM_MAC 0x00170000 +#define MODULE_FM_PORT 0x00180000 /**************************************************************************//* @Description Part data structure - must be contained in any integration @@ -74,10 +66,6 @@ *//***************************************************************************/ typedef struct t_Part { - uintptr_t (* f_GetModuleBase)(t_Handle h_Part, e_ModuleId moduleId); - /**< Returns the address of the module's memory map base. */ - e_ModuleId (* f_GetModuleIdByBase)(t_Handle h_Part, uintptr_t baseAddress); - /**< Returns the module's ID according to its memory map base. */ } t_Part; Modified: head/sys/contrib/ncsw/integrations/fman_ucode.h ============================================================================== --- head/sys/contrib/ncsw/integrations/fman_ucode.h Tue Jul 5 06:14:23 2016 (r302340) +++ head/sys/contrib/ncsw/integrations/fman_ucode.h Tue Jul 5 06:16:42 2016 (r302341) @@ -38,7 +38,7 @@ /** * Header with actual uCode rel_101_8. */ -#include "P3041/fman_ctrl_code/p3041_r1.0.h" +#include "fman_ctrl_code/p3041_r1.0.h" /** * Generic macro. Modified: head/sys/powerpc/conf/dpaa/config.dpaa ============================================================================== --- head/sys/powerpc/conf/dpaa/config.dpaa Tue Jul 5 06:14:23 2016 (r302340) +++ head/sys/powerpc/conf/dpaa/config.dpaa Tue Jul 5 06:16:42 2016 (r302341) @@ -1,6 +1,8 @@ # $FreeBSD$ -makeoptions DPAA_COMPILE_CMD_COMMON="${NORMAL_C} \ +files "dpaa/files.dpaa" + +makeoptions DPAA_COMPILE_CMD="${NORMAL_C} \ -Wno-cast-qual -Wno-unused-function -Wno-init-self -fms-extensions \ -include $S/contrib/ncsw/build/dflags.h \ -I$S/contrib/ncsw/build/ \ From owner-svn-src-all@freebsd.org Tue Jul 5 07:01:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9746A92E28; Tue, 5 Jul 2016 07:01:43 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 745822527; Tue, 5 Jul 2016 07:01:43 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6571gMa019922; Tue, 5 Jul 2016 07:01:42 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6571gqU019921; Tue, 5 Jul 2016 07:01:42 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607050701.u6571gqU019921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 5 Jul 2016 07:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302342 - head/sbin/ping6 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 07:01:43 -0000 Author: araujo Date: Tue Jul 5 07:01:42 2016 New Revision: 302342 URL: https://svnweb.freebsd.org/changeset/base/302342 Log: Fix a regression introduced on revision r271909, when using argument -g or several hops we have segmentation fault because we overwrite the same structure to store information for host and gateway. Submitted by: Maryse Levavasseur Reworked by: hrs Approved by: re (hrs) Differential Revision: https://reviews.freebsd.org/D6980 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Tue Jul 5 06:16:42 2016 (r302341) +++ head/sbin/ping6/ping6.c Tue Jul 5 07:01:42 2016 (r302342) @@ -515,7 +515,6 @@ main(int argc, char *argv[]) memcpy(&src, res->ai_addr, res->ai_addrlen); srclen = res->ai_addrlen; freeaddrinfo(res); - res = NULL; options |= F_SRCADDR; break; case 's': /* size of packet to send */ @@ -631,7 +630,7 @@ main(int argc, char *argv[]) if (error) errx(1, "%s", gai_strerror(error)); if (res->ai_canonname) - hostname = res->ai_canonname; + hostname = strdup(res->ai_canonname); else hostname = target; @@ -643,6 +642,7 @@ main(int argc, char *argv[]) if ((s = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) < 0) err(1, "socket"); + freeaddrinfo(res); /* set the source address if specified. */ if ((options & F_SRCADDR) != 0) { @@ -1208,9 +1208,6 @@ main(int argc, char *argv[]) sigaction(SIGALRM, &si_sa, 0); summary(); - if (res != NULL) - freeaddrinfo(res); - if(packet != NULL) free(packet); From owner-svn-src-all@freebsd.org Tue Jul 5 08:30:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6655B204BF; Tue, 5 Jul 2016 08:30:28 +0000 (UTC) (envelope-from dc552@hermes.cam.ac.uk) Received: from ppsw-31.csi.cam.ac.uk (ppsw-31.csi.cam.ac.uk [131.111.8.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98AAE1D56; Tue, 5 Jul 2016 08:30:28 +0000 (UTC) (envelope-from dc552@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from cpc91230-cmbg18-2-0-cust661.5-4.cable.virginm.net ([82.1.230.150]:55858 helo=[192.168.0.7]) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:465) with esmtpsa (PLAIN:dc552) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bKLkO-000Ruv-LL (Exim 4.86_36-e07b163) (return-path ); Tue, 05 Jul 2016 09:30:24 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r302252 - head/sys/kern From: David Chisnall In-Reply-To: Date: Tue, 5 Jul 2016 09:30:24 +0100 Cc: Ed Schouten , Benjamin Kaduk , Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <453A6F3B-6488-4ACC-AD82-60E4AE7A150A@cl.cam.ac.uk> References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> To: Adrian Chadd X-Mailer: Apple Mail (2.3124) Sender: "Dr D. Chisnall" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 08:30:29 -0000 On 4 Jul 2016, at 21:09, Adrian Chadd wrote: >=20 > Right, so if we're not careful, we could leak bits of kernel memory, > and it can also screw up key cache comparisons. >=20 > (I asked this question because I've been screwed by it recentlyish, > and it looks like the latest C standard didn't fix it..) It was discussed at the WG14 meeting in London in April, but I don=E2=80=99= t think that there was a clear consensus. It gets particularly tricky = for _Atomic types, and I think that there=E2=80=99s now a clarification = (or will be in C2x, if not) that any padding in _Atomic types is zeroed. Generally, compilers will turn this into a bzero and then a set of the = remaining fields, so you=E2=80=99re likely to end up with the right = thing, but it=E2=80=99s not guaranteed by the standard. David From owner-svn-src-all@freebsd.org Tue Jul 5 09:07:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E791B203F1; Tue, 5 Jul 2016 09:07:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) (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 D70851649; Tue, 5 Jul 2016 09:07:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x229.google.com with SMTP id uj8so6046310pab.3; Tue, 05 Jul 2016 02:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=bUvruqMEf3zuyvWap1N4K2ou9BXk9FgnOttbxjFPHKo=; b=VpJcDDNYz12MaiNkVkhQpXCQwLwaM17k/f5EEqMOEG1popBs/F6Ekcad84A9UnZStU 9PosofQ14MFm1vQIAwKAOKy36bDoVAZkQLi8qWeIISGsyTP3LgE/Q5dWPOcC5oQaTDdI bwoTtchmShiRftTGdJDWVDQSCz1j1RsCi4KcgH0D5R48SbIqqQhdTBV0oVFH8yCE904Z oOGFm4u1dIxoCSZoqX7PT8R7PVOCQFbosCYZLvmhKm0Wpuc+6c/G8TH1lx6IubXIQYA2 myqujat3w6EKCBN58QWqVDmUXB4e34bSxv7FirnAl18WBfcPhA8yCczCFNtdxQnLZPk7 pzhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=bUvruqMEf3zuyvWap1N4K2ou9BXk9FgnOttbxjFPHKo=; b=K8qSKtXc6hLbRB9RtFRhe3BVbOzSB+bA3Q+EOypp3t9HIJAR56am31PHCxO8wM7ubq oHx8I4YgoeDhf/FoOiU9BfOQdo86mrBT1ZsyL0XpyAmCmC5MKy7+h2Fy2I2TJOxPYG3e kVw31g+onC3HroJwndi8ywF/hWCx9td9nckR6dZVnAfLfHOQVRnIHTr4ax0GIJ6i+GDg s58R/KDucvCbxGO1McU47XyWGi83f/8+3pppe+S5hAcHvTivzGvD6MH1dS/YGzef15oH NZ9NEAoH2fwcBW925I3orgxgHYq6ElR1QXIKwULKuu5W9bKPJzcDN7Z3Wma70Oluhj5h 9wfw== X-Gm-Message-State: ALyK8tLgS9Tvngo+QeyqFfOQUEe5w8WsuBNWUahnDlA/HqAFpYjsfrGChs3jZkG07YrWMw== X-Received: by 10.66.25.43 with SMTP id z11mr25852891paf.63.1467709627231; Tue, 05 Jul 2016 02:07:07 -0700 (PDT) Received: from [192.168.20.19] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id um1sm3494973pac.41.2016.07.05.02.07.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 02:07:06 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r302342 - head/sbin/ping6 From: Ngie Cooper X-Mailer: iPhone Mail (13F69) In-Reply-To: <201607050701.u6571gqU019921@repo.freebsd.org> Date: Tue, 5 Jul 2016 02:07:05 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <7648F613-BEF7-419F-9CC4-0A3D590D7298@gmail.com> References: <201607050701.u6571gqU019921@repo.freebsd.org> To: Marcelo Araujo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 09:07:08 -0000 > On Jul 5, 2016, at 00:01, Marcelo Araujo wrote: > > Author: araujo > Date: Tue Jul 5 07:01:42 2016 > New Revision: 302342 > URL: https://svnweb.freebsd.org/changeset/base/302342 > > Log: > Fix a regression introduced on revision r271909, when using argument -g > or several hops we have segmentation fault because we overwrite the same > structure to store information for host and gateway. > > Submitted by: Maryse Levavasseur > Reworked by: hrs > Approved by: re (hrs) > Differential Revision: https://reviews.freebsd.org/D6980 This should be mfced. Thanks, -Ngie From owner-svn-src-all@freebsd.org Tue Jul 5 09:19:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E937B209EF; Tue, 5 Jul 2016 09:19:52 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mail.madpilot.net (grunt.madpilot.net [78.47.145.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAA5716B0; Tue, 5 Jul 2016 09:19:50 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mail (mail [192.168.254.3]) by mail.madpilot.net (Postfix) with ESMTP id 3rkJHl22LczZxg; Tue, 5 Jul 2016 11:19:47 +0200 (CEST) Received: from mail.madpilot.net ([192.168.254.3]) by mail (mail.madpilot.net [192.168.254.3]) (amavisd-new, port 10024) with ESMTP id Af_gtq_ua19Y; Tue, 5 Jul 2016 11:19:45 +0200 (CEST) Received: from marvin.madpilot.net (micro.madpilot.net [88.149.173.206]) by mail.madpilot.net (Postfix) with ESMTPSA; Tue, 5 Jul 2016 11:19:45 +0200 (CEST) Subject: Re: svn commit: r302337 - head/usr.sbin/ppp To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607042118.u64LIw2Q003782@repo.freebsd.org> From: Guido Falsi Message-ID: <4e3818c1-244b-9982-7292-d25778a203cc@FreeBSD.org> Date: Tue, 5 Jul 2016 11:19:44 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201607042118.u64LIw2Q003782@repo.freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 09:19:52 -0000 On 07/04/16 23:18, Baptiste Daroussin wrote: > Author: bapt > Date: Mon Jul 4 21:18:57 2016 > New Revision: 302337 > URL: https://svnweb.freebsd.org/changeset/base/302337 > > Log: > Fix build of ppp when WITHOUT_PAM is set > > PR: 210658 > Reported by: madpilot > Tested by: madpilot > Approved by: re@ (kib) > Thanks! -- Guido Falsi From owner-svn-src-all@freebsd.org Tue Jul 5 10:08:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51746B21729; Tue, 5 Jul 2016 10:08:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3B81D6A; Tue, 5 Jul 2016 10:08:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c110-21-100-149.carlnfd1.nsw.optusnet.com.au [110.21.100.149]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 459041A519B; Tue, 5 Jul 2016 20:08:42 +1000 (AEST) Date: Tue, 5 Jul 2016 20:08:42 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302328 - in head/sys: kern sys In-Reply-To: <201607031819.u63IJm79075708@repo.freebsd.org> Message-ID: <20160705200552.Y1821@besplex.bde.org> References: <201607031819.u63IJm79075708@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=XDAe9YG+7EcdVXYrgT+/UQ==:117 a=XDAe9YG+7EcdVXYrgT+/UQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=RtYHprBuA76D4Ga1t8EA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 10:08:50 -0000 On Sun, 3 Jul 2016, Konstantin Belousov wrote: This is mostly a test reply (replying to src-committers has stopped working for newer commits). > Log: > Provide helper macros to detect 'non-silent SBDRY' state and to > calculate appropriate return value for stops. Simplify the code by > using them. > > Fix typo in sig_suspend_threads(). The thread which sleep must be > aborted is td2. (*) > > In issignal(), when handling stopping signal for thread in > TD_SBDRY_INTR state, do not stop, this is wrong and fires assert. > This is yet another place where execution should be forced out of > SBDRY-protected region. For such case, return -1 from issignal() and > translate it to corresponding error code in sleepq_catch_signals(). > Assert that other consumers of cursig() are not affected by the new > return value. (*) > > Micro-optimize, mostly VFS and VOP methods, by avoiding calling the > functions when SIGDEFERSTOP_NOP non-change is requested. (**) > > Reported and tested by: pho (*) > Requested by: bde (**) > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Approved by: re (gjb) Thanks, but this is still very slow (even slower than beore the micro-optimization). Bruce From owner-svn-src-all@freebsd.org Tue Jul 5 10:22:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04D9AB219FB; Tue, 5 Jul 2016 10:22:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id B51AE1611; Tue, 5 Jul 2016 10:22:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c110-21-100-149.carlnfd1.nsw.optusnet.com.au [110.21.100.149]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id AE3A83C15D9; Tue, 5 Jul 2016 20:22:46 +1000 (AEST) Date: Tue, 5 Jul 2016 20:22:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Adrian Chadd cc: Ed Schouten , Benjamin Kaduk , Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r302252 - head/sys/kern In-Reply-To: Message-ID: <20160705202144.S1961@besplex.bde.org> References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=OtmysHLt c=1 sm=1 tr=0 a=XDAe9YG+7EcdVXYrgT+/UQ==:117 a=XDAe9YG+7EcdVXYrgT+/UQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=Z5fnprLDicSC4eaaG4IA:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 10:22:56 -0000 On Mon, 4 Jul 2016, Adrian Chadd wrote: > On 4 July 2016 at 12:28, Ed Schouten wrote: >> 2016-07-04 21:08 GMT+02:00 Adrian Chadd : >>> Does the specification / implementation also mandate that the padding >>> is zero'ed out or otherwise initialised? Only QOI and POLA require it. >> Well... That's tricky: >> >> [URLs lost to fighting with spam filter] Hmm, it's worse than that. C11 adds the requirement that padding in aggregates and unions is initialized to all-bits-zero. This is half-baked since it doesn't apply to pointers or arithmetic types, though it seems to unintentionally apply to pointers and arithmetic types within aggregates (since it says "any" bits). The padding bits in integers are explicitly unspecified elsewhere, except that ordinary stores (and initializations?) must not set them to trap respresentations. Since they are not explicitly specifued here, they are unspecified throughout. Thus, padding bits in at least integers can be set to a representation of the user's password. Low quality implementations do this accidentantly. A perverse implementation would make plain int large enough to hold any password; then whenever a positive value of N is stored to the value bits, it would store the password for user N to the padding bits :-). > Right, so if we're not careful, we could leak bits of kernel memory, > and it can also screw up key cache comparisons. This requires more than a reasonable amount of care for perverse implementations. It is necessary to find and zero all the padding bits in most cases. This is possible by copying to an array of bytes, zeroing the bits there, and copying back. Bruce From owner-svn-src-all@freebsd.org Tue Jul 5 11:21:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD864B2196F; Tue, 5 Jul 2016 11:21:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 906D012B0; Tue, 5 Jul 2016 11:21:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65BL2Vo030959; Tue, 5 Jul 2016 11:21:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65BL2kw030958; Tue, 5 Jul 2016 11:21:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607051121.u65BL2kw030958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 5 Jul 2016 11:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302343 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 11:21:03 -0000 Author: kib Date: Tue Jul 5 11:21:02 2016 New Revision: 302343 URL: https://svnweb.freebsd.org/changeset/base/302343 Log: Clarify the vnode_destroy_vobject() logic handling for already terminated objects. Assert that there is no new waiters for the already terminated objects. Old waiters should have been notified by the termination calling vnode_pager_dealloc() (old/new are with regard of the lock acquisition interval). Only clear the vp->v_object for the case of already terminated object, since other branches call vnode_pager_dealloc(), which should clear the pointer. Assert this. Tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb) Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Tue Jul 5 07:01:42 2016 (r302342) +++ head/sys/vm/vnode_pager.c Tue Jul 5 11:21:02 2016 (r302343) @@ -169,10 +169,21 @@ vnode_destroy_vobject(struct vnode *vp) /* * don't double-terminate the object */ - if ((obj->flags & OBJ_DEAD) == 0) + if ((obj->flags & OBJ_DEAD) == 0) { vm_object_terminate(obj); - else + } else { + /* + * Waiters were already handled during object + * termination. The exclusive vnode lock hopefully + * prevented new waiters from referencing the dying + * object. + */ + KASSERT((obj->flags & OBJ_DISCONNECTWNT) == 0, + ("OBJ_DISCONNECTWNT set obj %p flags %x", + obj, obj->flags)); + vp->v_object = NULL; VM_OBJECT_WUNLOCK(obj); + } } else { /* * Woe to the process that tries to page now :-). @@ -180,7 +191,7 @@ vnode_destroy_vobject(struct vnode *vp) vm_pager_deallocate(obj); VM_OBJECT_WUNLOCK(obj); } - vp->v_object = NULL; + KASSERT(vp->v_object == NULL, ("vp %p obj %p", vp, vp->v_object)); } From owner-svn-src-all@freebsd.org Tue Jul 5 14:46:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC89B2119D; Tue, 5 Jul 2016 14:46:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59ADE1A3C; Tue, 5 Jul 2016 14:46:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65Ek6lu007888; Tue, 5 Jul 2016 14:46:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65Ek6EP007887; Tue, 5 Jul 2016 14:46:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607051446.u65Ek6EP007887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Jul 2016 14:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302344 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 14:46:07 -0000 Author: emaste Date: Tue Jul 5 14:46:06 2016 New Revision: 302344 URL: https://svnweb.freebsd.org/changeset/base/302344 Log: add description for debug.elf{32,64}_legacy_coredump sysctl Approved by: re (kib) MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Jul 5 11:21:02 2016 (r302343) +++ head/sys/kern/imgact_elf.c Tue Jul 5 14:46:06 2016 (r302344) @@ -113,7 +113,8 @@ SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WOR static int elf_legacy_coredump = 0; SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW, - &elf_legacy_coredump, 0, ""); + &elf_legacy_coredump, 0, + "include all and only RW pages in core dumps"); int __elfN(nxstack) = #if defined(__amd64__) || defined(__powerpc64__) /* both 64 and 32 bit */ || \ From owner-svn-src-all@freebsd.org Tue Jul 5 16:37:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D99BB71F86; Tue, 5 Jul 2016 16:37:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F23A11598; Tue, 5 Jul 2016 16:37:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65Gb2l8049611; Tue, 5 Jul 2016 16:37:02 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65Gb2UD049610; Tue, 5 Jul 2016 16:37:02 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201607051637.u65Gb2UD049610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Tue, 5 Jul 2016 16:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302345 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 16:37:03 -0000 Author: rwatson Date: Tue Jul 5 16:37:01 2016 New Revision: 302345 URL: https://svnweb.freebsd.org/changeset/base/302345 Log: Call audit hooks to capture vnode attributes for three file-descriptor method implementations: fstat(2), close(2), and poll(2). This change synchronises auditing here with similar auditing for VFS-specific system calls such as stat(2) that audit more complete vnode information. Sponsored by: DARPA, AFRL Approved by: re (kib) MFC after: 1 week Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Tue Jul 5 14:46:06 2016 (r302344) +++ head/sys/kern/vfs_vnops.c Tue Jul 5 16:37:01 2016 (r302345) @@ -440,6 +440,7 @@ vn_close(vp, flags, file_cred, td) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, lock_flags | LK_RETRY); + AUDIT_ARG_VNODE1(vp); if ((flags & (FWRITE | FOPENFAILED)) == FWRITE) { VNASSERT(vp->v_writecount > 0, vp, ("vn_close: negative writecount")); @@ -1362,6 +1363,7 @@ vn_stat(vp, sb, active_cred, file_cred, int error; u_short mode; + AUDIT_ARG_VNODE1(vp); #ifdef MAC error = mac_vnode_check_stat(active_cred, file_cred, vp); if (error) @@ -1511,6 +1513,7 @@ vn_poll(fp, events, active_cred, td) vp = fp->f_vnode; #ifdef MAC vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + AUDIT_ARG_VNODE1(vp); error = mac_vnode_check_poll(active_cred, fp->f_cred, vp); VOP_UNLOCK(vp, 0); if (!error) From owner-svn-src-all@freebsd.org Tue Jul 5 17:59:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AEE7B737E1; Tue, 5 Jul 2016 17:59:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A104165E; Tue, 5 Jul 2016 17:59:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65Hx46f079333; Tue, 5 Jul 2016 17:59:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65Hx4qg079332; Tue, 5 Jul 2016 17:59:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607051759.u65Hx4qg079332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Jul 2016 17:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302346 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 17:59:05 -0000 Author: markj Date: Tue Jul 5 17:59:04 2016 New Revision: 302346 URL: https://svnweb.freebsd.org/changeset/base/302346 Log: Ensure that spinlock sections are balanced even after a panic. vpanic() uses spinlock_enter() to disable interrupts before dumping core. However, when the scheduler is stopped and INVARIANTS is not configured, thread_lock() does not acquire a spinlock section, while thread_unlock() releases one. This can result in interrupts staying enabled while the kernel dumps core, complicating post-mortem analysis of the crash. Approved by: re (gjb) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Jul 5 16:37:01 2016 (r302345) +++ head/sys/kern/kern_mutex.c Tue Jul 5 17:59:04 2016 (r302346) @@ -657,8 +657,15 @@ thread_lock_flags_(struct thread *td, in i = 0; tid = (uintptr_t)curthread; - if (SCHEDULER_STOPPED()) + if (SCHEDULER_STOPPED()) { + /* + * Ensure that spinlock sections are balanced even when the + * scheduler is stopped, since we may otherwise inadvertently + * re-enable interrupts while dumping core. + */ + spinlock_enter(); return; + } #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&td->td_lock->lock_object); From owner-svn-src-all@freebsd.org Tue Jul 5 18:00:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C9E9B738C5; Tue, 5 Jul 2016 18:00:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDE5B1929; Tue, 5 Jul 2016 18:00:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65I0P7o079577; Tue, 5 Jul 2016 18:00:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65I0OFG079564; Tue, 5 Jul 2016 18:00:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607051800.u65I0OFG079564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Jul 2016 18:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r302347 - in vendor/llvm-libunwind/dist: include src 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 18:00:26 -0000 Author: emaste Date: Tue Jul 5 18:00:23 2016 New Revision: 302347 URL: https://svnweb.freebsd.org/changeset/base/302347 Log: Import LLVM libunwind snapshot revision 272680 Significant upstream revisions: 260595: [AArch64] Fix libunwind build when using GNU assembler 270692: Introduce a native-only unwinder build. 270972: Disable cross-unwinding by default. 271004: [libunwind] Improve unwinder stack usage - II 272680: [libunwind] Improve unwinder stack usage - III Obtained from: https://llvm.org/svn/llvm-project/libunwind/trunk/ Modified: vendor/llvm-libunwind/dist/include/__libunwind_config.h vendor/llvm-libunwind/dist/include/libunwind.h vendor/llvm-libunwind/dist/src/AddressSpace.hpp vendor/llvm-libunwind/dist/src/CompactUnwinder.hpp vendor/llvm-libunwind/dist/src/Registers.hpp vendor/llvm-libunwind/dist/src/Unwind-EHABI.cpp vendor/llvm-libunwind/dist/src/UnwindCursor.hpp vendor/llvm-libunwind/dist/src/UnwindLevel1.c vendor/llvm-libunwind/dist/src/UnwindRegistersRestore.S vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S vendor/llvm-libunwind/dist/src/config.h vendor/llvm-libunwind/dist/src/libunwind.cpp Modified: vendor/llvm-libunwind/dist/include/__libunwind_config.h ============================================================================== --- vendor/llvm-libunwind/dist/include/__libunwind_config.h Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/include/__libunwind_config.h Tue Jul 5 18:00:23 2016 (r302347) @@ -17,4 +17,43 @@ #define _LIBUNWIND_ARM_EHABI 0 #endif +#if defined(_LIBUNWIND_IS_NATIVE_ONLY) +# if defined(__i386__) +# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_CONTEXT_SIZE 8 +# define _LIBUNWIND_CURSOR_SIZE 19 +# elif defined(__x86_64__) +# define _LIBUNWIND_TARGET_X86_64 1 +# define _LIBUNWIND_CONTEXT_SIZE 21 +# define _LIBUNWIND_CURSOR_SIZE 33 +# elif defined(__ppc__) +# define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_CONTEXT_SIZE 117 +# define _LIBUNWIND_CURSOR_SIZE 128 +# elif defined(__aarch64__) +# define _LIBUNWIND_TARGET_AARCH64 1 +# define _LIBUNWIND_CONTEXT_SIZE 66 +# define _LIBUNWIND_CURSOR_SIZE 78 +# elif defined(__arm__) +# define _LIBUNWIND_TARGET_ARM 1 +# define _LIBUNWIND_CONTEXT_SIZE 60 +# define _LIBUNWIND_CURSOR_SIZE 67 +# elif defined(__or1k__) +# define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_CONTEXT_SIZE 16 +# define _LIBUNWIND_CURSOR_SIZE 28 +# else +# error "Unsupported architecture." +# endif +#else // !_LIBUNWIND_IS_NATIVE_ONLY +# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_TARGET_X86_64 1 +# define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_TARGET_AARCH64 1 +# define _LIBUNWIND_TARGET_ARM 1 +# define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_CONTEXT_SIZE 128 +# define _LIBUNWIND_CURSOR_SIZE 140 +#endif // _LIBUNWIND_IS_NATIVE_ONLY + #endif // ____LIBUNWIND_CONFIG_H__ Modified: vendor/llvm-libunwind/dist/include/libunwind.h ============================================================================== --- vendor/llvm-libunwind/dist/include/libunwind.h Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/include/libunwind.h Tue Jul 5 18:00:23 2016 (r302347) @@ -46,12 +46,12 @@ enum { }; struct unw_context_t { - uint64_t data[128]; + uint64_t data[_LIBUNWIND_CONTEXT_SIZE]; }; typedef struct unw_context_t unw_context_t; struct unw_cursor_t { - uint64_t data[140]; + uint64_t data[_LIBUNWIND_CURSOR_SIZE]; }; typedef struct unw_cursor_t unw_cursor_t; Modified: vendor/llvm-libunwind/dist/src/AddressSpace.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/AddressSpace.hpp Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/AddressSpace.hpp Tue Jul 5 18:00:23 2016 (r302347) @@ -35,7 +35,7 @@ namespace libunwind { #include "Registers.hpp" #if _LIBUNWIND_ARM_EHABI -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) typedef void *_Unwind_Ptr; @@ -61,7 +61,8 @@ extern EHTEntry __exidx_end; #endif // !defined(_LIBUNWIND_IS_BAREMETAL) #endif // _LIBUNWIND_ARM_EHABI -#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__linux__) +#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__linux__) || \ + defined(__NetBSD__) #if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX #include // Macro for machine-independent access to the ELF program headers. This Modified: vendor/llvm-libunwind/dist/src/CompactUnwinder.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/CompactUnwinder.hpp Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/CompactUnwinder.hpp Tue Jul 5 18:00:23 2016 (r302347) @@ -27,6 +27,7 @@ namespace libunwind { +#if defined(_LIBUNWIND_TARGET_I386) /// CompactUnwinder_x86 uses a compact unwind info to virtually "step" (aka /// unwind) by modifying a Registers_x86 register set template @@ -255,8 +256,10 @@ void CompactUnwinder_x86::framelessUn // old esp is before return address registers.setSP((uint32_t)returnAddressLocation + 4); } +#endif // _LIBUNWIND_TARGET_I386 +#if defined(_LIBUNWIND_TARGET_X86_64) /// CompactUnwinder_x86_64 uses a compact unwind info to virtually "step" (aka /// unwind) by modifying a Registers_x86_64 register set template @@ -484,9 +487,11 @@ void CompactUnwinder_x86_64::frameles // old esp is before return address registers.setSP(returnAddressLocation + 8); } +#endif // _LIBUNWIND_TARGET_X86_64 +#if defined(_LIBUNWIND_TARGET_AARCH64) /// CompactUnwinder_arm64 uses a compact unwind info to virtually "step" (aka /// unwind) by modifying a Registers_arm64 register set template @@ -686,6 +691,7 @@ int CompactUnwinder_arm64::stepWithCo return UNW_STEP_SUCCESS; } +#endif // _LIBUNWIND_TARGET_AARCH64 } // namespace libunwind Modified: vendor/llvm-libunwind/dist/src/Registers.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/Registers.hpp Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/Registers.hpp Tue Jul 5 18:00:23 2016 (r302347) @@ -25,6 +25,7 @@ namespace libunwind { struct v128 { uint32_t vec[4]; }; +#if defined(_LIBUNWIND_TARGET_I386) /// Registers_x86 holds the register state of a thread in a 32-bit intel /// process. class _LIBUNWIND_HIDDEN Registers_x86 { @@ -86,8 +87,8 @@ private: }; inline Registers_x86::Registers_x86(const void *registers) { - static_assert(sizeof(Registers_x86) < sizeof(unw_context_t), - "x86 registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "x86 registers do not fit into unw_context_t"); memcpy(&_registers, registers, sizeof(_registers)); } @@ -211,8 +212,10 @@ inline v128 Registers_x86::getVectorRegi inline void Registers_x86::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("no x86 vector registers"); } +#endif // _LIBUNWIND_TARGET_I386 +#if defined(_LIBUNWIND_TARGET_X86_64) /// Registers_x86_64 holds the register state of a thread in a 64-bit intel /// process. class _LIBUNWIND_HIDDEN Registers_x86_64 { @@ -278,8 +281,8 @@ private: }; inline Registers_x86_64::Registers_x86_64(const void *registers) { - static_assert(sizeof(Registers_x86_64) < sizeof(unw_context_t), - "x86_64 registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "x86_64 registers do not fit into unw_context_t"); memcpy(&_registers, registers, sizeof(_registers)); } @@ -459,8 +462,10 @@ inline v128 Registers_x86_64::getVectorR inline void Registers_x86_64::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("no x86_64 vector registers"); } +#endif // _LIBUNWIND_TARGET_X86_64 +#if defined(_LIBUNWIND_TARGET_PPC) /// Registers_ppc holds the register state of a thread in a 32-bit PowerPC /// process. class _LIBUNWIND_HIDDEN Registers_ppc { @@ -543,8 +548,8 @@ private: }; inline Registers_ppc::Registers_ppc(const void *registers) { - static_assert(sizeof(Registers_ppc) < sizeof(unw_context_t), - "ppc registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "ppc registers do not fit into unw_context_t"); memcpy(&_registers, static_cast(registers), sizeof(_registers)); static_assert(sizeof(ppc_thread_state_t) == 160, @@ -1023,8 +1028,10 @@ inline const char *Registers_ppc::getReg } } +#endif // _LIBUNWIND_TARGET_PPC +#if defined(_LIBUNWIND_TARGET_AARCH64) /// Registers_arm64 holds the register state of a thread in a 64-bit arm /// process. class _LIBUNWIND_HIDDEN Registers_arm64 { @@ -1071,8 +1078,8 @@ private: }; inline Registers_arm64::Registers_arm64(const void *registers) { - static_assert(sizeof(Registers_arm64) < sizeof(unw_context_t), - "arm64 registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "arm64 registers do not fit into unw_context_t"); memcpy(&_registers, registers, sizeof(_registers)); static_assert(sizeof(GPRs) == 0x110, "expected VFP registers to be at offset 272"); @@ -1289,7 +1296,9 @@ inline v128 Registers_arm64::getVectorRe inline void Registers_arm64::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("no arm64 vector register support yet"); } +#endif // _LIBUNWIND_TARGET_AARCH64 +#if defined(_LIBUNWIND_TARGET_ARM) /// Registers_arm holds the register state of a thread in a 32-bit arm /// process. /// @@ -1395,8 +1404,8 @@ inline Registers_arm::Registers_arm(cons _saved_vfp_d16_d31(false), _saved_iwmmx(false), _saved_iwmmx_control(false) { - static_assert(sizeof(Registers_arm) < sizeof(unw_context_t), - "arm registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "arm registers do not fit into unw_context_t"); // See unw_getcontext() note about data. memcpy(&_registers, registers, sizeof(_registers)); memset(&_vfp_d0_d15_pad, 0, sizeof(_vfp_d0_d15_pad)); @@ -1711,6 +1720,10 @@ inline v128 Registers_arm::getVectorRegi inline void Registers_arm::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("ARM vector support not implemented"); } +#endif // _LIBUNWIND_TARGET_ARM + + +#if defined(_LIBUNWIND_TARGET_OR1K) /// Registers_or1k holds the register state of a thread in an OpenRISC1000 /// process. class _LIBUNWIND_HIDDEN Registers_or1k { @@ -1745,8 +1758,8 @@ private: }; inline Registers_or1k::Registers_or1k(const void *registers) { - static_assert(sizeof(Registers_or1k) < sizeof(unw_context_t), - "or1k registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "or1k registers do not fit into unw_context_t"); memcpy(&_registers, static_cast(registers), sizeof(_registers)); } @@ -1893,6 +1906,7 @@ inline const char *Registers_or1k::getRe } } +#endif // _LIBUNWIND_TARGET_OR1K } // namespace libunwind #endif // __REGISTERS_HPP__ Modified: vendor/llvm-libunwind/dist/src/Unwind-EHABI.cpp ============================================================================== --- vendor/llvm-libunwind/dist/src/Unwind-EHABI.cpp Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/Unwind-EHABI.cpp Tue Jul 5 18:00:23 2016 (r302347) @@ -438,39 +438,21 @@ extern "C" _Unwind_Reason_Code __aeabi_u } static _Unwind_Reason_Code -unwind_phase1(unw_context_t *uc, _Unwind_Exception *exception_object) { +unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { // EHABI #7.3 discusses preserving the VRS in a "temporary VRS" during // phase 1 and then restoring it to the "primary VRS" for phase 2. The // effect is phase 2 doesn't see any of the VRS manipulations from phase 1. // In this implementation, the phases don't share the VRS backing store. // Instead, they are passed the original |uc| and they create a new VRS // from scratch thus achieving the same effect. - unw_cursor_t cursor1; - unw_init_local(&cursor1, uc); + unw_init_local(cursor, uc); // Walk each frame looking for a place to stop. for (bool handlerNotFound = true; handlerNotFound;) { -#if !_LIBUNWIND_ARM_EHABI - // Ask libuwind to get next frame (skip over first which is - // _Unwind_RaiseException). - int stepResult = unw_step(&cursor1); - if (stepResult == 0) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", - static_cast(exception_object)); - return _URC_END_OF_STACK; - } else if (stepResult < 0) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step failed => " - "_URC_FATAL_PHASE1_ERROR\n", - static_cast(exception_object)); - return _URC_FATAL_PHASE1_ERROR; - } -#endif - // See if frame has code to run (has personality routine). unw_proc_info_t frameInfo; - if (unw_get_proc_info(&cursor1, &frameInfo) != UNW_ESUCCESS) { + if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_get_proc_info " "failed => _URC_FATAL_PHASE1_ERROR\n", static_cast(exception_object)); @@ -482,12 +464,12 @@ unwind_phase1(unw_context_t *uc, _Unwind char functionBuf[512]; const char *functionName = functionBuf; unw_word_t offset; - if ((unw_get_proc_name(&cursor1, functionBuf, sizeof(functionBuf), + if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), &offset) != UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip)) functionName = ".anonymous."; unw_word_t pc; - unw_get_reg(&cursor1, UNW_REG_IP, &pc); + unw_get_reg(cursor, UNW_REG_IP, &pc); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): pc=0x%llX, start_ip=0x%llX, func=%s, " "lsda=0x%llX, personality=0x%llX\n", @@ -505,7 +487,7 @@ unwind_phase1(unw_context_t *uc, _Unwind "unwind_phase1(ex_ojb=%p): calling personality function %p\n", static_cast(exception_object), reinterpret_cast(reinterpret_cast(p))); - struct _Unwind_Context *context = (struct _Unwind_Context *)(&cursor1); + struct _Unwind_Context *context = (struct _Unwind_Context *)(cursor); exception_object->pr_cache.fnstart = frameInfo.start_ip; exception_object->pr_cache.ehtp = (_Unwind_EHT_Header *)frameInfo.unwind_info; @@ -553,12 +535,11 @@ unwind_phase1(unw_context_t *uc, _Unwind return _URC_NO_REASON; } -static _Unwind_Reason_Code unwind_phase2(unw_context_t *uc, +static _Unwind_Reason_Code unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object, bool resume) { // See comment at the start of unwind_phase1 regarding VRS integrity. - unw_cursor_t cursor2; - unw_init_local(&cursor2, uc); + unw_init_local(cursor, uc); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)\n", static_cast(exception_object)); @@ -580,31 +561,16 @@ static _Unwind_Reason_Code unwind_phase2 // for. After this, continue unwinding as if normal. // // See #7.4.6 for details. - unw_set_reg(&cursor2, UNW_REG_IP, + unw_set_reg(cursor, UNW_REG_IP, exception_object->unwinder_cache.reserved2); resume = false; } -#if !_LIBUNWIND_ARM_EHABI - int stepResult = unw_step(&cursor2); - if (stepResult == 0) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", - static_cast(exception_object)); - return _URC_END_OF_STACK; - } else if (stepResult < 0) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step failed => " - "_URC_FATAL_PHASE1_ERROR\n", - static_cast(exception_object)); - return _URC_FATAL_PHASE2_ERROR; - } -#endif - // Get info about this frame. unw_word_t sp; unw_proc_info_t frameInfo; - unw_get_reg(&cursor2, UNW_REG_SP, &sp); - if (unw_get_proc_info(&cursor2, &frameInfo) != UNW_ESUCCESS) { + unw_get_reg(cursor, UNW_REG_SP, &sp); + if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info " "failed => _URC_FATAL_PHASE1_ERROR\n", static_cast(exception_object)); @@ -616,7 +582,7 @@ static _Unwind_Reason_Code unwind_phase2 char functionBuf[512]; const char *functionName = functionBuf; unw_word_t offset; - if ((unw_get_proc_name(&cursor2, functionBuf, sizeof(functionBuf), + if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), &offset) != UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip)) functionName = ".anonymous."; @@ -632,7 +598,7 @@ static _Unwind_Reason_Code unwind_phase2 if (frameInfo.handler != 0) { __personality_routine p = (__personality_routine)(long)(frameInfo.handler); - struct _Unwind_Context *context = (struct _Unwind_Context *)(&cursor2); + struct _Unwind_Context *context = (struct _Unwind_Context *)(cursor); // EHABI #7.2 exception_object->pr_cache.fnstart = frameInfo.start_ip; exception_object->pr_cache.ehtp = @@ -661,8 +627,8 @@ static _Unwind_Reason_Code unwind_phase2 // We may get control back if landing pad calls _Unwind_Resume(). if (_LIBUNWIND_TRACING_UNWINDING) { unw_word_t pc; - unw_get_reg(&cursor2, UNW_REG_IP, &pc); - unw_get_reg(&cursor2, UNW_REG_SP, &sp); + unw_get_reg(cursor, UNW_REG_IP, &pc); + unw_get_reg(cursor, UNW_REG_SP, &sp); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering " "user code with ip=0x%llX, sp=0x%llX\n", static_cast(exception_object), @@ -673,10 +639,10 @@ static _Unwind_Reason_Code unwind_phase2 // EHABI #7.4.1 says we need to preserve pc for when _Unwind_Resume // is called back, to find this same frame. unw_word_t pc; - unw_get_reg(&cursor2, UNW_REG_IP, &pc); + unw_get_reg(cursor, UNW_REG_IP, &pc); exception_object->unwinder_cache.reserved2 = (uint32_t)pc; } - unw_resume(&cursor2); + unw_resume(cursor); // unw_resume() only returns if there was an error. return _URC_FATAL_PHASE2_ERROR; @@ -705,6 +671,7 @@ _Unwind_RaiseException(_Unwind_Exception _LIBUNWIND_TRACE_API("_Unwind_RaiseException(ex_obj=%p)\n", static_cast(exception_object)); unw_context_t uc; + unw_cursor_t cursor; unw_getcontext(&uc); // This field for is for compatibility with GCC to say this isn't a forced @@ -712,12 +679,12 @@ _Unwind_RaiseException(_Unwind_Exception exception_object->unwinder_cache.reserved1 = 0; // phase 1: the search phase - _Unwind_Reason_Code phase1 = unwind_phase1(&uc, exception_object); + _Unwind_Reason_Code phase1 = unwind_phase1(&uc, &cursor, exception_object); if (phase1 != _URC_NO_REASON) return phase1; // phase 2: the clean up phase - return unwind_phase2(&uc, exception_object, false); + return unwind_phase2(&uc, &cursor, exception_object, false); } _LIBUNWIND_EXPORT void _Unwind_Complete(_Unwind_Exception* exception_object) { @@ -742,12 +709,13 @@ _Unwind_Resume(_Unwind_Exception *except _LIBUNWIND_TRACE_API("_Unwind_Resume(ex_obj=%p)\n", static_cast(exception_object)); unw_context_t uc; + unw_cursor_t cursor; unw_getcontext(&uc); // _Unwind_RaiseException on EHABI will always set the reserved1 field to 0, // which is in the same position as private_1 below. // TODO(ajwong): Who wronte the above? Why is it true? - unwind_phase2(&uc, exception_object, true); + unwind_phase2(&uc, &cursor, exception_object, true); // Clients assume _Unwind_Resume() does not return, so all we can do is abort. _LIBUNWIND_ABORT("_Unwind_Resume() can't return"); Modified: vendor/llvm-libunwind/dist/src/UnwindCursor.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/UnwindCursor.hpp Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/UnwindCursor.hpp Tue Jul 5 18:00:23 2016 (r302347) @@ -481,30 +481,39 @@ private: return stepWithCompactEncoding(dummy); } +#if defined(_LIBUNWIND_TARGET_X86_64) int stepWithCompactEncoding(Registers_x86_64 &) { return CompactUnwinder_x86_64::stepWithCompactEncoding( _info.format, _info.start_ip, _addressSpace, _registers); } +#endif +#if defined(_LIBUNWIND_TARGET_I386) int stepWithCompactEncoding(Registers_x86 &) { return CompactUnwinder_x86::stepWithCompactEncoding( _info.format, (uint32_t)_info.start_ip, _addressSpace, _registers); } +#endif +#if defined(_LIBUNWIND_TARGET_PPC) int stepWithCompactEncoding(Registers_ppc &) { return UNW_EINVAL; } +#endif +#if defined(_LIBUNWIND_TARGET_AARCH64) int stepWithCompactEncoding(Registers_arm64 &) { return CompactUnwinder_arm64::stepWithCompactEncoding( _info.format, _info.start_ip, _addressSpace, _registers); } +#endif bool compactSaysUseDwarf(uint32_t *offset=NULL) const { R dummy; return compactSaysUseDwarf(dummy, offset); } +#if defined(_LIBUNWIND_TARGET_X86_64) bool compactSaysUseDwarf(Registers_x86_64 &, uint32_t *offset) const { if ((_info.format & UNWIND_X86_64_MODE_MASK) == UNWIND_X86_64_MODE_DWARF) { if (offset) @@ -513,7 +522,9 @@ private: } return false; } +#endif +#if defined(_LIBUNWIND_TARGET_I386) bool compactSaysUseDwarf(Registers_x86 &, uint32_t *offset) const { if ((_info.format & UNWIND_X86_MODE_MASK) == UNWIND_X86_MODE_DWARF) { if (offset) @@ -522,11 +533,15 @@ private: } return false; } +#endif +#if defined(_LIBUNWIND_TARGET_PPC) bool compactSaysUseDwarf(Registers_ppc &, uint32_t *) const { return true; } +#endif +#if defined(_LIBUNWIND_TARGET_AARCH64) bool compactSaysUseDwarf(Registers_arm64 &, uint32_t *offset) const { if ((_info.format & UNWIND_ARM64_MODE_MASK) == UNWIND_ARM64_MODE_DWARF) { if (offset) @@ -535,6 +550,7 @@ private: } return false; } +#endif #endif // _LIBUNWIND_SUPPORT_COMPACT_UNWIND #if _LIBUNWIND_SUPPORT_DWARF_UNWIND @@ -543,25 +559,35 @@ private: return dwarfEncoding(dummy); } +#if defined(_LIBUNWIND_TARGET_X86_64) compact_unwind_encoding_t dwarfEncoding(Registers_x86_64 &) const { return UNWIND_X86_64_MODE_DWARF; } +#endif +#if defined(_LIBUNWIND_TARGET_I386) compact_unwind_encoding_t dwarfEncoding(Registers_x86 &) const { return UNWIND_X86_MODE_DWARF; } +#endif +#if defined(_LIBUNWIND_TARGET_PPC) compact_unwind_encoding_t dwarfEncoding(Registers_ppc &) const { return 0; } +#endif +#if defined(_LIBUNWIND_TARGET_AARCH64) compact_unwind_encoding_t dwarfEncoding(Registers_arm64 &) const { return UNWIND_ARM64_MODE_DWARF; } +#endif +#if defined (_LIBUNWIND_TARGET_OR1K) compact_unwind_encoding_t dwarfEncoding(Registers_or1k &) const { return 0; } +#endif #endif // _LIBUNWIND_SUPPORT_DWARF_UNWIND @@ -577,7 +603,7 @@ template UnwindCursor::UnwindCursor(unw_context_t *context, A &as) : _addressSpace(as), _registers(context), _unwindInfoMissing(false), _isSignalFrame(false) { - static_assert(sizeof(UnwindCursor) < sizeof(unw_cursor_t), + static_assert((check_fit, unw_cursor_t>::does_fit), "UnwindCursor<> does not fit in unw_cursor_t"); memset(&_info, 0, sizeof(_info)); } Modified: vendor/llvm-libunwind/dist/src/UnwindLevel1.c ============================================================================== --- vendor/llvm-libunwind/dist/src/UnwindLevel1.c Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/UnwindLevel1.c Tue Jul 5 18:00:23 2016 (r302347) @@ -33,16 +33,15 @@ #if !_LIBUNWIND_ARM_EHABI static _Unwind_Reason_Code -unwind_phase1(unw_context_t *uc, _Unwind_Exception *exception_object) { - unw_cursor_t cursor1; - unw_init_local(&cursor1, uc); +unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { + unw_init_local(cursor, uc); // Walk each frame looking for a place to stop. bool handlerNotFound = true; while (handlerNotFound) { // Ask libuwind to get next frame (skip over first which is // _Unwind_RaiseException). - int stepResult = unw_step(&cursor1); + int stepResult = unw_step(cursor); if (stepResult == 0) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached " "bottom => _URC_END_OF_STACK\n", @@ -58,7 +57,7 @@ unwind_phase1(unw_context_t *uc, _Unwind // See if frame has code to run (has personality routine). unw_proc_info_t frameInfo; unw_word_t sp; - if (unw_get_proc_info(&cursor1, &frameInfo) != UNW_ESUCCESS) { + if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_get_proc_info " "failed => _URC_FATAL_PHASE1_ERROR\n", (void *)exception_object); @@ -70,12 +69,12 @@ unwind_phase1(unw_context_t *uc, _Unwind char functionBuf[512]; const char *functionName = functionBuf; unw_word_t offset; - if ((unw_get_proc_name(&cursor1, functionBuf, sizeof(functionBuf), + if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), &offset) != UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip)) functionName = ".anonymous."; unw_word_t pc; - unw_get_reg(&cursor1, UNW_REG_IP, &pc); + unw_get_reg(cursor, UNW_REG_IP, &pc); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): pc=0x%" PRIx64 ", start_ip=0x%" PRIx64 ", func=%s, lsda=0x%" PRIx64 ", personality=0x%" PRIx64 "\n", @@ -93,13 +92,13 @@ unwind_phase1(unw_context_t *uc, _Unwind (void *)exception_object, (void *)(uintptr_t)p); _Unwind_Reason_Code personalityResult = (*p)(1, _UA_SEARCH_PHASE, exception_object->exception_class, - exception_object, (struct _Unwind_Context *)(&cursor1)); + exception_object, (struct _Unwind_Context *)(cursor)); switch (personalityResult) { case _URC_HANDLER_FOUND: // found a catch clause or locals that need destructing in this frame // stop search and remember stack pointer at the frame handlerNotFound = false; - unw_get_reg(&cursor1, UNW_REG_SP, &sp); + unw_get_reg(cursor, UNW_REG_SP, &sp); exception_object->private_2 = (uintptr_t)sp; _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): _URC_HANDLER_FOUND \n", @@ -127,9 +126,8 @@ unwind_phase1(unw_context_t *uc, _Unwind static _Unwind_Reason_Code -unwind_phase2(unw_context_t *uc, _Unwind_Exception *exception_object) { - unw_cursor_t cursor2; - unw_init_local(&cursor2, uc); +unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { + unw_init_local(cursor, uc); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)\n", (void *)exception_object); @@ -139,7 +137,7 @@ unwind_phase2(unw_context_t *uc, _Unwind // Ask libuwind to get next frame (skip over first which is // _Unwind_RaiseException). - int stepResult = unw_step(&cursor2); + int stepResult = unw_step(cursor); if (stepResult == 0) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached " "bottom => _URC_END_OF_STACK\n", @@ -155,8 +153,8 @@ unwind_phase2(unw_context_t *uc, _Unwind // Get info about this frame. unw_word_t sp; unw_proc_info_t frameInfo; - unw_get_reg(&cursor2, UNW_REG_SP, &sp); - if (unw_get_proc_info(&cursor2, &frameInfo) != UNW_ESUCCESS) { + unw_get_reg(cursor, UNW_REG_SP, &sp); + if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info " "failed => _URC_FATAL_PHASE1_ERROR\n", (void *)exception_object); @@ -168,7 +166,7 @@ unwind_phase2(unw_context_t *uc, _Unwind char functionBuf[512]; const char *functionName = functionBuf; unw_word_t offset; - if ((unw_get_proc_name(&cursor2, functionBuf, sizeof(functionBuf), + if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), &offset) != UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip)) functionName = ".anonymous."; @@ -191,7 +189,7 @@ unwind_phase2(unw_context_t *uc, _Unwind } _Unwind_Reason_Code personalityResult = (*p)(1, action, exception_object->exception_class, exception_object, - (struct _Unwind_Context *)(&cursor2)); + (struct _Unwind_Context *)(cursor)); switch (personalityResult) { case _URC_CONTINUE_UNWIND: // Continue unwinding @@ -212,14 +210,14 @@ unwind_phase2(unw_context_t *uc, _Unwind // We may get control back if landing pad calls _Unwind_Resume(). if (_LIBUNWIND_TRACING_UNWINDING) { unw_word_t pc; - unw_get_reg(&cursor2, UNW_REG_IP, &pc); - unw_get_reg(&cursor2, UNW_REG_SP, &sp); + unw_get_reg(cursor, UNW_REG_IP, &pc); + unw_get_reg(cursor, UNW_REG_SP, &sp); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering " "user code with ip=0x%" PRIx64 ", sp=0x%" PRIx64 "\n", (void *)exception_object, pc, sp); } - unw_resume(&cursor2); + unw_resume(cursor); // unw_resume() only returns if there was an error. return _URC_FATAL_PHASE2_ERROR; default: @@ -237,18 +235,17 @@ unwind_phase2(unw_context_t *uc, _Unwind } static _Unwind_Reason_Code -unwind_phase2_forced(unw_context_t *uc, +unwind_phase2_forced(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object, _Unwind_Stop_Fn stop, void *stop_parameter) { - unw_cursor_t cursor2; - unw_init_local(&cursor2, uc); + unw_init_local(cursor, uc); // Walk each frame until we reach where search phase said to stop - while (unw_step(&cursor2) > 0) { + while (unw_step(cursor) > 0) { // Update info about this frame. unw_proc_info_t frameInfo; - if (unw_get_proc_info(&cursor2, &frameInfo) != UNW_ESUCCESS) { + if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): unw_step " "failed => _URC_END_OF_STACK\n", (void *)exception_object); @@ -260,7 +257,7 @@ unwind_phase2_forced(unw_context_t *uc, char functionBuf[512]; const char *functionName = functionBuf; unw_word_t offset; - if ((unw_get_proc_name(&cursor2, functionBuf, sizeof(functionBuf), + if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), &offset) != UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip)) functionName = ".anonymous."; @@ -276,7 +273,7 @@ unwind_phase2_forced(unw_context_t *uc, (_Unwind_Action)(_UA_FORCE_UNWIND | _UA_CLEANUP_PHASE); _Unwind_Reason_Code stopResult = (*stop)(1, action, exception_object->exception_class, exception_object, - (struct _Unwind_Context *)(&cursor2), stop_parameter); + (struct _Unwind_Context *)(cursor), stop_parameter); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase2_forced(ex_ojb=%p): stop function returned %d\n", (void *)exception_object, stopResult); @@ -296,7 +293,7 @@ unwind_phase2_forced(unw_context_t *uc, (void *)exception_object, (void *)(uintptr_t)p); _Unwind_Reason_Code personalityResult = (*p)(1, action, exception_object->exception_class, exception_object, - (struct _Unwind_Context *)(&cursor2)); + (struct _Unwind_Context *)(cursor)); switch (personalityResult) { case _URC_CONTINUE_UNWIND: _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " @@ -311,7 +308,7 @@ unwind_phase2_forced(unw_context_t *uc, "_URC_INSTALL_CONTEXT\n", (void *)exception_object); // We may get control back if landing pad calls _Unwind_Resume(). - unw_resume(&cursor2); + unw_resume(cursor); break; default: // Personality routine returned an unknown result code. @@ -332,7 +329,7 @@ unwind_phase2_forced(unw_context_t *uc, _Unwind_Action lastAction = (_Unwind_Action)(_UA_FORCE_UNWIND | _UA_CLEANUP_PHASE | _UA_END_OF_STACK); (*stop)(1, lastAction, exception_object->exception_class, exception_object, - (struct _Unwind_Context *)(&cursor2), stop_parameter); + (struct _Unwind_Context *)(cursor), stop_parameter); // Clean up phase did not resume at the frame that the search phase said it // would. @@ -346,6 +343,7 @@ _Unwind_RaiseException(_Unwind_Exception _LIBUNWIND_TRACE_API("_Unwind_RaiseException(ex_obj=%p)\n", (void *)exception_object); unw_context_t uc; + unw_cursor_t cursor; unw_getcontext(&uc); // Mark that this is a non-forced unwind, so _Unwind_Resume() @@ -354,12 +352,12 @@ _Unwind_RaiseException(_Unwind_Exception exception_object->private_2 = 0; // phase 1: the search phase - _Unwind_Reason_Code phase1 = unwind_phase1(&uc, exception_object); + _Unwind_Reason_Code phase1 = unwind_phase1(&uc, &cursor, exception_object); if (phase1 != _URC_NO_REASON) return phase1; // phase 2: the clean up phase - return unwind_phase2(&uc, exception_object); + return unwind_phase2(&uc, &cursor, exception_object); } @@ -379,14 +377,15 @@ _LIBUNWIND_EXPORT void _Unwind_Resume(_Unwind_Exception *exception_object) { _LIBUNWIND_TRACE_API("_Unwind_Resume(ex_obj=%p)\n", (void *)exception_object); unw_context_t uc; + unw_cursor_t cursor; unw_getcontext(&uc); if (exception_object->private_1 != 0) - unwind_phase2_forced(&uc, exception_object, + unwind_phase2_forced(&uc, &cursor, exception_object, (_Unwind_Stop_Fn) exception_object->private_1, (void *)exception_object->private_2); else - unwind_phase2(&uc, exception_object); + unwind_phase2(&uc, &cursor, exception_object); // Clients assume _Unwind_Resume() does not return, so all we can do is abort. _LIBUNWIND_ABORT("_Unwind_Resume() can't return"); @@ -403,6 +402,7 @@ _Unwind_ForcedUnwind(_Unwind_Exception * _LIBUNWIND_TRACE_API("_Unwind_ForcedUnwind(ex_obj=%p, stop=%p)\n", (void *)exception_object, (void *)(uintptr_t)stop); unw_context_t uc; + unw_cursor_t cursor; unw_getcontext(&uc); // Mark that this is a forced unwind, so _Unwind_Resume() can do @@ -411,7 +411,7 @@ _Unwind_ForcedUnwind(_Unwind_Exception * exception_object->private_2 = (uintptr_t) stop_parameter; // do it - return unwind_phase2_forced(&uc, exception_object, stop, stop_parameter); + return unwind_phase2_forced(&uc, &cursor, exception_object, stop, stop_parameter); } Modified: vendor/llvm-libunwind/dist/src/UnwindRegistersRestore.S ============================================================================== --- vendor/llvm-libunwind/dist/src/UnwindRegistersRestore.S Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/UnwindRegistersRestore.S Tue Jul 5 18:00:23 2016 (r302347) @@ -282,8 +282,8 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9li ldp x22,x23, [x0, #0x0B0] ldp x24,x25, [x0, #0x0C0] ldp x26,x27, [x0, #0x0D0] - ldp x28,fp, [x0, #0x0E0] - ldr lr, [x0, #0x100] // restore pc into lr + ldp x28,x29, [x0, #0x0E0] + ldr x30, [x0, #0x100] // restore pc into lr ldr x1, [x0, #0x0F8] mov sp,x1 // restore sp @@ -306,7 +306,7 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9li ldr d31, [x0, #0x208] ldp x0, x1, [x0, #0x000] // restore x0,x1 - ret lr // jump to pc + ret x30 // jump to pc #elif defined(__arm__) && !defined(__APPLE__) Modified: vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S ============================================================================== --- vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S Tue Jul 5 18:00:23 2016 (r302347) @@ -263,11 +263,11 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext stp x22,x23, [x0, #0x0B0] stp x24,x25, [x0, #0x0C0] stp x26,x27, [x0, #0x0D0] - stp x28,fp, [x0, #0x0E0] - str lr, [x0, #0x0F0] + stp x28,x29, [x0, #0x0E0] + str x30, [x0, #0x0F0] mov x1,sp str x1, [x0, #0x0F8] - str lr, [x0, #0x100] // store return address as pc + str x30, [x0, #0x100] // store return address as pc // skip cpsr stp d0, d1, [x0, #0x110] stp d2, d3, [x0, #0x120] Modified: vendor/llvm-libunwind/dist/src/config.h ============================================================================== --- vendor/llvm-libunwind/dist/src/config.h Tue Jul 5 17:59:04 2016 (r302346) +++ vendor/llvm-libunwind/dist/src/config.h Tue Jul 5 18:00:23 2016 (r302347) @@ -16,6 +16,7 @@ #include #include +#include // Define static_assert() unless already defined by compiler. #ifndef __has_feature @@ -29,28 +30,6 @@ // Platform specific configuration defines. #ifdef __APPLE__ - #include - #ifdef __cplusplus - extern "C" { - #endif - void __assert_rtn(const char *, const char *, int, const char *) - __attribute__((noreturn)); - #ifdef __cplusplus - } - #endif - - #define _LIBUNWIND_BUILD_ZERO_COST_APIS (defined(__i386__) || \ - defined(__x86_64__) || \ - defined(__arm64__) || \ - defined(__mips__)) - #define _LIBUNWIND_BUILD_SJLJ_APIS defined(__arm__) - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ - defined(__x86_64__)) - #define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) - #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) - #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__) - #define _LIBUNWIND_ABORT(msg) __assert_rtn(__func__, __FILE__, __LINE__, msg) - #if defined(FOR_DYLD) #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1 #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 0 @@ -60,35 +39,51 @@ #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 #define _LIBUNWIND_SUPPORT_DWARF_INDEX 0 #endif +#else + #if defined(__ARM_DWARF_EH__) || !defined(__arm__) + #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0 + #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 + #define _LIBUNWIND_SUPPORT_DWARF_INDEX 1 + #else + #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0 + #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 0 + #define _LIBUNWIND_SUPPORT_DWARF_INDEX 0 + #endif +#endif + +// FIXME: these macros are not correct for COFF targets +#define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) +#define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) + +#if (defined(__APPLE__) && defined(__arm__)) || defined(__USING_SJLJ_EXCEPTIONS__) +#define _LIBUNWIND_BUILD_SJLJ_APIS 1 +#else +#define _LIBUNWIND_BUILD_SJLJ_APIS 0 +#endif +#if defined(__i386__) || defined(__x86_64__) +#define _LIBUNWIND_SUPPORT_FRAME_APIS 1 #else - #include +#define _LIBUNWIND_SUPPORT_FRAME_APIS 0 +#endif - static inline void assert_rtn(const char* func, const char* file, int line, const char* msg) __attribute__ ((noreturn)); - static inline void assert_rtn(const char* func, const char* file, int line, const char* msg) { - fprintf(stderr, "libunwind: %s %s:%d - %s\n", func, file, line, msg); - assert(false); - abort(); - } - - #define _LIBUNWIND_BUILD_ZERO_COST_APIS (defined(__i386__) || \ - defined(__x86_64__) || \ - defined(__arm__) || \ - defined(__aarch64__)) - #define _LIBUNWIND_BUILD_SJLJ_APIS 0 - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ - defined(__x86_64__)) - #define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) - #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) - #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__) - #define _LIBUNWIND_ABORT(msg) assert_rtn(__func__, __FILE__, __LINE__, msg) - - #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0 - #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \ - defined(__ARM_DWARF_EH__) - #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND +#if defined(__i386__) || defined(__x86_64__) || \ + (!defined(__APPLE__) && defined(__arm__)) || \ + (defined(__arm64__) || defined(__aarch64__)) || \ + (defined(__APPLE__) && defined(__mips__)) +#define _LIBUNWIND_BUILD_ZERO_COST_APIS 1 +#else +#define _LIBUNWIND_BUILD_ZERO_COST_APIS 0 #endif +#define _LIBUNWIND_ABORT(msg) \ + do { \ + fprintf(stderr, "libunwind: %s %s:%d - %s\n", __func__, __FILE__, \ + __LINE__, msg); \ + fflush(stderr); \ + abort(); \ + } while (0) +#define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__) // Macros that define away in non-Debug builds #ifdef NDEBUG @@ -124,5 +119,25 @@ #define _LIBUNWIND_TRACING_UNWINDING logUnwinding() #endif +#ifdef __cplusplus +// Used to fit UnwindCursor and Registers_xxx types against unw_context_t / +// unw_cursor_t sized memory blocks. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 5 18:02:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F453B73AF4; Tue, 5 Jul 2016 18:02:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23C801D93; Tue, 5 Jul 2016 18:02:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65I2Hi9082883; Tue, 5 Jul 2016 18:02:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65I2H8D082882; Tue, 5 Jul 2016 18:02:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607051802.u65I2H8D082882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Jul 2016 18:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r302348 - vendor/llvm-libunwind/libunwind-r272680 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 18:02:18 -0000 Author: emaste Date: Tue Jul 5 18:02:17 2016 New Revision: 302348 URL: https://svnweb.freebsd.org/changeset/base/302348 Log: Tag LLVM libunwind r272680 Added: vendor/llvm-libunwind/libunwind-r272680/ - copied from r302347, vendor/llvm-libunwind/dist/ From owner-svn-src-all@freebsd.org Tue Jul 5 18:34:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FA7CB203AA; Tue, 5 Jul 2016 18:34:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 722F61ED1; Tue, 5 Jul 2016 18:34:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65IYYuq095311; Tue, 5 Jul 2016 18:34:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65IYYXA095308; Tue, 5 Jul 2016 18:34:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201607051834.u65IYYXA095308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 5 Jul 2016 18:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302349 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 18:34:35 -0000 Author: glebius Date: Tue Jul 5 18:34:34 2016 New Revision: 302349 URL: https://svnweb.freebsd.org/changeset/base/302349 Log: Compile in the kassert_panic() function with INVARIANT_SUPPORT option, not INVARIANTS. The function is required if we want to load in a module that is compiled with INVARIANTS. Reviewed by: jhb Approved by: re (gjb) Modified: head/sys/kern/kern_shutdown.c head/sys/sys/systm.h Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Tue Jul 5 18:02:17 2016 (r302348) +++ head/sys/kern/kern_shutdown.c Tue Jul 5 18:34:34 2016 (r302349) @@ -556,7 +556,7 @@ shutdown_reset(void *junk, int howto) /* NOTREACHED */ /* assuming reset worked */ } -#if defined(WITNESS) || defined(INVARIANTS) +#if defined(WITNESS) || defined(INVARIANT_SUPPORT) static int kassert_warn_only = 0; #ifdef KDB static int kassert_do_kdb = 0; Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Tue Jul 5 18:02:17 2016 (r302348) +++ head/sys/sys/systm.h Tue Jul 5 18:34:34 2016 (r302349) @@ -76,7 +76,7 @@ extern int vm_guest; /* Running as virt enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV, VM_GUEST_VMWARE, VM_LAST }; -#if defined(WITNESS) || defined(INVARIANTS) +#if defined(WITNESS) || defined(INVARIANT_SUPPORT) void kassert_panic(const char *fmt, ...) __printflike(1, 2); #endif From owner-svn-src-all@freebsd.org Tue Jul 5 18:47:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DB3EB206DF; Tue, 5 Jul 2016 18:47:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48D2A1761; Tue, 5 Jul 2016 18:47:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65IlIEK000905; Tue, 5 Jul 2016 18:47:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65IlIYf000901; Tue, 5 Jul 2016 18:47:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201607051847.u65IlIYf000901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 5 Jul 2016 18:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302350 - in head: share/man/man9 sys/kern 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 18:47:19 -0000 Author: glebius Date: Tue Jul 5 18:47:17 2016 New Revision: 302350 URL: https://svnweb.freebsd.org/changeset/base/302350 Log: The paradigm of a callout is that it has three consequent states: not scheduled -> scheduled -> running -> not scheduled. The API and the manual page assume that, some comments in the code assume that, and looks like some contributors to the code also did. The problem is that this paradigm isn't true. A callout can be scheduled and running at the same time, which makes API description ambigouous. In such case callout_stop() family of functions/macros should return 1 and 0 at the same time, since it successfully unscheduled future callout but the current one is running. Before this change we returned 1 in such a case, with an exception that if running callout was migrating we returned 0, unless CS_MIGRBLOCK was specified. With this change, we now return 0 in case if future callout was unscheduled, but another one is still in action, indicating to API users that resources are not yet safe to be freed. However, the sleepqueue code relies on getting 1 return code in that case, and there already was CS_MIGRBLOCK flag, that covered one of the edge cases. In the new return path we will also use this flag, to keep sleepqueue safe. Since the flag CS_MIGRBLOCK doesn't block migration and now isn't limited to migration edge case, rename it to CS_EXECUTING. This change fixes panics on a high loaded TCP server. Reviewed by: jch, hselasky, rrs, kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7042 Modified: head/share/man/man9/timeout.9 head/sys/kern/kern_timeout.c head/sys/kern/subr_sleepqueue.c head/sys/sys/callout.h Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Tue Jul 5 18:34:34 2016 (r302349) +++ head/share/man/man9/timeout.9 Tue Jul 5 18:47:17 2016 (r302350) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2015 +.Dd July 4, 2016 .Dt TIMEOUT 9 .Os .Sh NAME @@ -247,6 +247,10 @@ has already been serviced, then negative one is returned. If the callout is currently being serviced and cannot be stopped, then zero will be returned. +If the callout is currently being serviced and cannot be stopped, and at the +same time a next invocation of the same callout is also scheduled, then +.Fn callout_stop +unschedules the next run and returns zero. If the callout has an associated lock, then that lock must be held when this function is called. .Pp @@ -814,7 +818,7 @@ and .Fn callout_drain functions return a value of one if the callout was still pending when it was called, a zero if the callout could not be stopped and a negative one is it -was either not running or haas already completed. +was either not running or has already completed. The .Fn timeout function returns a Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Jul 5 18:34:34 2016 (r302349) +++ head/sys/kern/kern_timeout.c Tue Jul 5 18:47:17 2016 (r302350) @@ -1166,7 +1166,7 @@ _callout_stop_safe(struct callout *c, in struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; - int not_on_a_list; + int cancelled, not_on_a_list; if ((flags & CS_DRAIN) != 0) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, @@ -1236,28 +1236,14 @@ again: } /* - * If the callout isn't pending, it's not on the queue, so - * don't attempt to remove it from the queue. We can try to - * stop it by other means however. + * If the callout is running, try to stop it or drain it. */ - if (!(c->c_iflags & CALLOUT_PENDING)) { + if (cc_exec_curr(cc, direct) == c) { /* - * If it wasn't on the queue and it isn't the current - * callout, then we can't stop it, so just bail. - * It probably has already been run (if locking - * is properly done). You could get here if the caller - * calls stop twice in a row for example. The second - * call would fall here without CALLOUT_ACTIVE set. + * Succeed we to stop it or not, we must clear the + * active flag - this is what API users expect. */ c->c_flags &= ~CALLOUT_ACTIVE; - if (cc_exec_curr(cc, direct) != c) { - CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", - c, c->c_func, c->c_arg); - CC_UNLOCK(cc); - if (sq_locked) - sleepq_release(&cc_exec_waiting(cc, direct)); - return (-1); - } if ((flags & CS_DRAIN) != 0) { /* @@ -1376,20 +1362,28 @@ again: cc_exec_drain(cc, direct) = drain; } CC_UNLOCK(cc); - return ((flags & CS_MIGRBLOCK) != 0); + return ((flags & CS_EXECUTING) != 0); } CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); if (drain) { cc_exec_drain(cc, direct) = drain; } - CC_UNLOCK(cc); KASSERT(!sq_locked, ("sleepqueue chain still locked")); - return (0); - } + cancelled = ((flags & CS_EXECUTING) != 0); + } else + cancelled = 1; + if (sq_locked) sleepq_release(&cc_exec_waiting(cc, direct)); + if ((c->c_iflags & CALLOUT_PENDING) == 0) { + CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", + c, c->c_func, c->c_arg); + CC_UNLOCK(cc); + return (cancelled); + } + c->c_iflags &= ~CALLOUT_PENDING; c->c_flags &= ~CALLOUT_ACTIVE; @@ -1406,7 +1400,7 @@ again: } callout_cc_del(c, cc); CC_UNLOCK(cc); - return (1); + return (cancelled); } void Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Tue Jul 5 18:34:34 2016 (r302349) +++ head/sys/kern/subr_sleepqueue.c Tue Jul 5 18:47:17 2016 (r302350) @@ -600,7 +600,7 @@ sleepq_check_timeout(void) * another CPU, so synchronize with it to avoid having it * accidentally wake up a subsequent sleep. */ - else if (_callout_stop_safe(&td->td_slpcallout, CS_MIGRBLOCK, NULL) + else if (_callout_stop_safe(&td->td_slpcallout, CS_EXECUTING, NULL) == 0) { td->td_flags |= TDF_TIMEOUT; TD_SET_SLEEPING(td); Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Tue Jul 5 18:34:34 2016 (r302349) +++ head/sys/sys/callout.h Tue Jul 5 18:47:17 2016 (r302350) @@ -64,9 +64,8 @@ struct callout_handle { /* Flags for callout_stop_safe() */ #define CS_DRAIN 0x0001 /* callout_drain(), wait allowed */ -#define CS_MIGRBLOCK 0x0002 /* Block migration, return value - indicates that the callout was - executing */ +#define CS_EXECUTING 0x0002 /* Positive return value indicates that + the callout was executing */ #ifdef _KERNEL /* From owner-svn-src-all@freebsd.org Tue Jul 5 18:48:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B7A8B20762; Tue, 5 Jul 2016 18:48:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (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 58F441927; Tue, 5 Jul 2016 18:48:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x232.google.com with SMTP id uj8so9829778pab.3; Tue, 05 Jul 2016 11:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cSQIfAWTnz1s2+8EHbpPAb3YJXIvZSH1GLPiEMF9SwY=; b=oF3kDRoqlRosQ5gyGKA8V5EJ2VDNI0aqKDGEeZd7AxPYATRyFTk1t8R8DmmgI1R6M5 lkL4pds6wGED//XpozvEPfqnFAWAisBZ4ERFmTvl7xFox8sRHIFBQ72XAp6fGf/pjs2/ 1eLz8uce0Drw/UpmGMK0OZ+O1gtMjDoOXknnyWwN0SpMTivpNaIctClJxJsf6ad9YWig hXlLzevsomwIR8b1IHqyhg3daJVDExLDx9UqMLCj/seKk16a3OT0NFo0d8TyBziM66GZ 2cpQgv9vrLmnk4nDLpNlhJ9UNXOp/0LKB9g5JvqmMCVoqX+cDRvcuG0JNdzbazRbg1x6 eLqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cSQIfAWTnz1s2+8EHbpPAb3YJXIvZSH1GLPiEMF9SwY=; b=PACKl/edZoD2c2sBSWac9qC2ehd3QyPkU3v/hVBcaPb5OmAk15l6ffwGDu/W25civX JCoIB5blXt5wOOFcC42EOUUH3zO/33DHq8IYARa8ZjH4QwpDWVIJVVWD0/YTd6ACmglm Fm3elI6jUE8qbt9prEhUVHykfkeHAhGjd4WTlNp1DxJGKYiRlXWaw89kOZMaPB8lZJ4i hc6STY4EfZIEXgpHtX4fm3HAAla/z2AuLZtVeaAWG/zlW20g/C6+nQnJiuqo3GP3t1BB wmkWvhtl4vFMBhp8C4daPEnBcfqGFqD3dFJ+rGfBL2OKT60M1l7Qg5ZLtDB0HA5MmZpn ay7Q== X-Gm-Message-State: ALyK8tLuJPDoikOwPAb7CrcRH0SVzLN4gIVs9M59LQFwGRBtvTvmdFYHxhxou7mVNcRVag== X-Received: by 10.66.80.3 with SMTP id n3mr34442361pax.92.1467744538742; Tue, 05 Jul 2016 11:48:58 -0700 (PDT) Received: from [192.168.20.18] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id z127sm6547537pfz.20.2016.07.05.11.48.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 11:48:57 -0700 (PDT) Subject: Re: svn commit: r302350 - in head: share/man/man9 sys/kern sys/sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201607051847.u65IlIYf000901@repo.freebsd.org> Date: Tue, 5 Jul 2016 11:48:56 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201607051847.u65IlIYf000901@repo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 18:48:59 -0000 --Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 5, 2016, at 11:47, Gleb Smirnoff wrote: >=20 > Author: glebius > Date: Tue Jul 5 18:47:17 2016 > New Revision: 302350 > URL: https://svnweb.freebsd.org/changeset/base/302350 >=20 > Log: > The paradigm of a callout is that it has three consequent states: > not scheduled -> scheduled -> running -> not scheduled. The API and = the > manual page assume that, some comments in the code assume that, and = looks > like some contributors to the code also did. The problem is that this > paradigm isn't true. A callout can be scheduled and running at the = same > time, which makes API description ambigouous. In such case = callout_stop() > family of functions/macros should return 1 and 0 at the same time, = since it > successfully unscheduled future callout but the current one is = running. > Before this change we returned 1 in such a case, with an exception = that > if running callout was migrating we returned 0, unless CS_MIGRBLOCK = was > specified. >=20 > With this change, we now return 0 in case if future callout was = unscheduled, > but another one is still in action, indicating to API users that = resources > are not yet safe to be freed. >=20 > However, the sleepqueue code relies on getting 1 return code in that = case, > and there already was CS_MIGRBLOCK flag, that covered one of the edge = cases. > In the new return path we will also use this flag, to keep sleepqueue = safe. >=20 > Since the flag CS_MIGRBLOCK doesn't block migration and now isn't = limited to > migration edge case, rename it to CS_EXECUTING. >=20 > This change fixes panics on a high loaded TCP server. >=20 > Reviewed by: jch, hselasky, rrs, kib > Approved by: re (gjb) > Differential Revision: https://reviews.freebsd.org/D7042 >=20 > Modified: > head/share/man/man9/timeout.9 > head/sys/kern/kern_timeout.c > head/sys/kern/subr_sleepqueue.c > head/sys/sys/callout.h Should __FreeBSD_version be bumped for the change? Thanks, -Ngie --Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018 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 iQIcBAEBCgAGBQJXfAEYAAoJEPWDqSZpMIYVdvUP/jwdy5lq8SLLHslu4LQPXhkH 4SeKq/2uo3kajYGyyOq2MEZUwG5mMnL3YdAI0H/wPio9moml+0wscbCI4rZyGXdl /gaG1KLtR/TUsfPwzC3lTRekasaQcZUkUL+fPPlRD0UDz1+tSFOKBWzp33kjGtAW J4e57o999gNSn8JtImjOaIbIa9skdh7BAqxHQIGl13dEWmA3AM//SfsJEhL0cBI7 vKf9ew785PLy1ptuyLk9PQMKe/3zLMrXBsVnkTBPar6JjM8zAU5jX7BGnVg5Qy0k NzyTGoGcQ2rkZBe1r5F4dVAnJwvH45/JqybWTA8mGSrx24h9wOpRTLZcX30dV8IF MTcbB2VHeW+yT2j6GdQyAgZ+eYQWfPQpaHtJvTSBbuVAdHUeNupQu1XrU7joCYJY 3qswVjwnzpItj974ZmTBP3h34GYJc0L0gd1JF4FqpOhN7U1ZLEzWBcATalQFs0mw cpyl2mSKJIqqkYEejpfykJtSAO7lH3ga0GPtMeMa8P8+gL7jKwAjA2FPeSW85DsB 0/K3OlBivvk7hR/AaHO4by4qnztAJCJIfGLOUD/tFZAFVVEX95ZjDmz9KV8oeSay 1z1caW1NgOY5AMzuOmTv7hHYWiJJ8axAqbO3dC5VSvvap23X24qxBrZVlKVYPZtn 6vRLmvx3GuWUXkzPc53P =KISx -----END PGP SIGNATURE----- --Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018-- From owner-svn-src-all@freebsd.org Tue Jul 5 19:22:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42476B214C3; Tue, 5 Jul 2016 19:22:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C525151B; Tue, 5 Jul 2016 19:22:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u65JMHSo001272 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Jul 2016 12:22:18 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u65JMHgx001271; Tue, 5 Jul 2016 12:22:17 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 5 Jul 2016 12:22:17 -0700 From: Gleb Smirnoff To: "Ngie Cooper (yaneurabeya)" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r302350 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20160705192217.GC1076@FreeBSD.org> References: <201607051847.u65IlIYf000901@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 19:22:19 -0000 On Tue, Jul 05, 2016 at 11:48:56AM -0700, Ngie Cooper (yaneurabeya) wrote: N> > Author: glebius N> > Date: Tue Jul 5 18:47:17 2016 N> > New Revision: 302350 N> > URL: https://svnweb.freebsd.org/changeset/base/302350 N> > N> > Log: N> > The paradigm of a callout is that it has three consequent states: N> > not scheduled -> scheduled -> running -> not scheduled. The API and the N> > manual page assume that, some comments in the code assume that, and looks N> > like some contributors to the code also did. The problem is that this N> > paradigm isn't true. A callout can be scheduled and running at the same N> > time, which makes API description ambigouous. In such case callout_stop() N> > family of functions/macros should return 1 and 0 at the same time, since it N> > successfully unscheduled future callout but the current one is running. N> > Before this change we returned 1 in such a case, with an exception that N> > if running callout was migrating we returned 0, unless CS_MIGRBLOCK was N> > specified. N> > N> > With this change, we now return 0 in case if future callout was unscheduled, N> > but another one is still in action, indicating to API users that resources N> > are not yet safe to be freed. N> > N> > However, the sleepqueue code relies on getting 1 return code in that case, N> > and there already was CS_MIGRBLOCK flag, that covered one of the edge cases. N> > In the new return path we will also use this flag, to keep sleepqueue safe. N> > N> > Since the flag CS_MIGRBLOCK doesn't block migration and now isn't limited to N> > migration edge case, rename it to CS_EXECUTING. N> > N> > This change fixes panics on a high loaded TCP server. N> > N> > Reviewed by: jch, hselasky, rrs, kib N> > Approved by: re (gjb) N> > Differential Revision: https://reviews.freebsd.org/D7042 N> > N> > Modified: N> > head/share/man/man9/timeout.9 N> > head/sys/kern/kern_timeout.c N> > head/sys/kern/subr_sleepqueue.c N> > head/sys/sys/callout.h N> N> Should __FreeBSD_version be bumped for the change? No. We consider the new behavior more matching the documentation rather than old one. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Tue Jul 5 20:49:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D93F3B71E22; Tue, 5 Jul 2016 20:49:00 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8B1819CA; Tue, 5 Jul 2016 20:49:00 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65KmxpC050707; Tue, 5 Jul 2016 20:48:59 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65Kmx9N050706; Tue, 5 Jul 2016 20:48:59 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607052048.u65Kmx9N050706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Tue, 5 Jul 2016 20:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302351 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 20:49:00 -0000 Author: skreuzer (doc,ports committer) Date: Tue Jul 5 20:48:59 2016 New Revision: 302351 URL: https://svnweb.freebsd.org/changeset/base/302351 Log: Document 302332, Native graphics support has been added to bhyve Approved by: re (gjb, implicit, relnotes) 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 Tue Jul 5 18:47:17 2016 (r302350) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 5 20:48:59 2016 (r302351) @@ -1413,6 +1413,9 @@ updated to support DSM TRIM commands for virtual AHCI disks. + Native graphics support has been added to + the &man.bhyve.8; hypervisor. + Support for the QEMU virt system has been added. From owner-svn-src-all@freebsd.org Tue Jul 5 20:51:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0D70B71FA8; Tue, 5 Jul 2016 20:51:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C4C91D80; Tue, 5 Jul 2016 20:51:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65Kpq3B054193; Tue, 5 Jul 2016 20:51:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65Kpqvh054191; Tue, 5 Jul 2016 20:51:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607052051.u65Kpqvh054191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 5 Jul 2016 20:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302352 - head/sys/dev/ioat 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 20:51:53 -0000 Author: cem Date: Tue Jul 5 20:51:52 2016 New Revision: 302352 URL: https://svnweb.freebsd.org/changeset/base/302352 Log: ioat(4): Split timer into poll and shrink functions Poll should happen quickly, while shrink should happen infrequently. Protect is_completion_pending with submit_lock. Reviewed by: markj Approved by: re Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7097 Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_internal.h Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Tue Jul 5 20:48:59 2016 (r302351) +++ head/sys/dev/ioat/ioat.c Tue Jul 5 20:51:52 2016 (r302352) @@ -61,8 +61,8 @@ __FBSDID("$FreeBSD$"); #ifndef BUS_SPACE_MAXADDR_40BIT #define BUS_SPACE_MAXADDR_40BIT 0xFFFFFFFFFFULL #endif -#define IOAT_INTR_TIMO (hz / 10) #define IOAT_REFLK (&ioat->submit_lock) +#define IOAT_SHRINK_PERIOD (10 * hz) static int ioat_probe(device_t device); static int ioat_attach(device_t device); @@ -96,7 +96,8 @@ static int ring_grow(struct ioat_softc * static int ring_shrink(struct ioat_softc *, uint32_t oldorder, struct ioat_descriptor **); static void ioat_halted_debug(struct ioat_softc *, uint32_t); -static void ioat_timer_callback(void *arg); +static void ioat_poll_timer_callback(void *arg); +static void ioat_shrink_timer_callback(void *arg); static void dump_descriptor(void *hw_desc); static void ioat_submit_single(struct ioat_softc *ioat); static void ioat_comp_update_map(void *arg, bus_dma_segment_t *seg, int nseg, @@ -332,7 +333,8 @@ ioat_detach(device_t device) mtx_unlock(IOAT_REFLK); ioat_teardown_intr(ioat); - callout_drain(&ioat->timer); + callout_drain(&ioat->poll_timer); + callout_drain(&ioat->shrink_timer); pci_disable_busmaster(device); @@ -428,7 +430,8 @@ ioat3_attach(device_t device) mtx_init(&ioat->submit_lock, "ioat_submit", NULL, MTX_DEF); mtx_init(&ioat->cleanup_lock, "ioat_cleanup", NULL, MTX_DEF); - callout_init(&ioat->timer, 1); + callout_init(&ioat->poll_timer, 1); + callout_init(&ioat->shrink_timer, 1); TASK_INIT(&ioat->reset_task, 0, ioat_reset_hw_task, ioat); /* Establish lock order for Witness */ @@ -634,6 +637,7 @@ ioat_process_events(struct ioat_softc *i struct bus_dmadesc *dmadesc; uint64_t comp_update, status; uint32_t completed, chanerr; + boolean_t pending; int error; mtx_lock(&ioat->cleanup_lock); @@ -668,19 +672,33 @@ ioat_process_events(struct ioat_softc *i } ioat->last_seen = desc->hw_desc_bus_addr; - - if (ioat->head == ioat->tail) { - ioat->is_completion_pending = FALSE; - callout_reset(&ioat->timer, IOAT_INTR_TIMO, - ioat_timer_callback, ioat); - } - ioat->stats.descriptors_processed += completed; out: ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); + + /* Perform a racy check first; only take the locks if it passes. */ + pending = (ioat_get_active(ioat) != 0); + if (!pending && ioat->is_completion_pending) { + mtx_unlock(&ioat->cleanup_lock); + mtx_lock(&ioat->submit_lock); + mtx_lock(&ioat->cleanup_lock); + + pending = (ioat_get_active(ioat) != 0); + if (!pending && ioat->is_completion_pending) { + ioat->is_completion_pending = FALSE; + callout_reset(&ioat->shrink_timer, IOAT_SHRINK_PERIOD, + ioat_shrink_timer_callback, ioat); + callout_stop(&ioat->poll_timer); + } + mtx_unlock(&ioat->submit_lock); + } mtx_unlock(&ioat->cleanup_lock); + if (pending) + callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback, + ioat); + if (completed != 0) { ioat_putn(ioat, completed, IOAT_ACTIVE_DESCR_REF); wakeup(&ioat->tail); @@ -1602,7 +1620,18 @@ ioat_halted_debug(struct ioat_softc *ioa } static void -ioat_timer_callback(void *arg) +ioat_poll_timer_callback(void *arg) +{ + struct ioat_softc *ioat; + + ioat = arg; + ioat_log_message(3, "%s\n", __func__); + + ioat_process_events(ioat); +} + +static void +ioat_shrink_timer_callback(void *arg) { struct ioat_descriptor **newring; struct ioat_softc *ioat; @@ -1611,11 +1640,6 @@ ioat_timer_callback(void *arg) ioat = arg; ioat_log_message(1, "%s\n", __func__); - if (ioat->is_completion_pending) { - ioat_process_events(ioat); - return; - } - /* Slowly scale the ring down if idle. */ mtx_lock(&ioat->submit_lock); order = ioat->ring_size_order; @@ -1641,8 +1665,8 @@ ioat_timer_callback(void *arg) out: if (ioat->ring_size_order > IOAT_MIN_ORDER) - callout_reset(&ioat->timer, 10 * hz, - ioat_timer_callback, ioat); + callout_reset(&ioat->poll_timer, IOAT_SHRINK_PERIOD, + ioat_shrink_timer_callback, ioat); } /* @@ -1658,8 +1682,9 @@ ioat_submit_single(struct ioat_softc *io if (!ioat->is_completion_pending) { ioat->is_completion_pending = TRUE; - callout_reset(&ioat->timer, IOAT_INTR_TIMO, - ioat_timer_callback, ioat); + callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback, + ioat); + callout_stop(&ioat->shrink_timer); } ioat->stats.descriptors_submitted++; @@ -2126,12 +2151,19 @@ DB_SHOW_COMMAND(ioat, db_show_ioat) db_printf(" cached_intrdelay: %u\n", sc->cached_intrdelay); db_printf(" *comp_update: 0x%jx\n", (uintmax_t)*sc->comp_update); - db_printf(" timer:\n"); - db_printf(" c_time: %ju\n", (uintmax_t)sc->timer.c_time); - db_printf(" c_arg: %p\n", sc->timer.c_arg); - db_printf(" c_func: %p\n", sc->timer.c_func); - db_printf(" c_lock: %p\n", sc->timer.c_lock); - db_printf(" c_flags: 0x%x\n", (unsigned)sc->timer.c_flags); + db_printf(" poll_timer:\n"); + db_printf(" c_time: %ju\n", (uintmax_t)sc->poll_timer.c_time); + db_printf(" c_arg: %p\n", sc->poll_timer.c_arg); + db_printf(" c_func: %p\n", sc->poll_timer.c_func); + db_printf(" c_lock: %p\n", sc->poll_timer.c_lock); + db_printf(" c_flags: 0x%x\n", (unsigned)sc->poll_timer.c_flags); + + db_printf(" shrink_timer:\n"); + db_printf(" c_time: %ju\n", (uintmax_t)sc->shrink_timer.c_time); + db_printf(" c_arg: %p\n", sc->shrink_timer.c_arg); + db_printf(" c_func: %p\n", sc->shrink_timer.c_func); + db_printf(" c_lock: %p\n", sc->shrink_timer.c_lock); + db_printf(" c_flags: 0x%x\n", (unsigned)sc->shrink_timer.c_flags); db_printf(" quiescing: %d\n", (int)sc->quiescing); db_printf(" destroying: %d\n", (int)sc->destroying); Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Tue Jul 5 20:48:59 2016 (r302351) +++ head/sys/dev/ioat/ioat_internal.h Tue Jul 5 20:51:52 2016 (r302352) @@ -480,13 +480,14 @@ struct ioat_softc { uint64_t *comp_update; bus_addr_t comp_update_bus_addr; - struct callout timer; + struct callout poll_timer; + struct callout shrink_timer; struct task reset_task; boolean_t quiescing; boolean_t destroying; boolean_t is_resize_pending; - boolean_t is_completion_pending; + boolean_t is_completion_pending; /* submit_lock */ boolean_t is_reset_pending; boolean_t is_channel_running; boolean_t intrdelay_supported; From owner-svn-src-all@freebsd.org Tue Jul 5 20:52:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FE09B72086; Tue, 5 Jul 2016 20:52:37 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB5131179; Tue, 5 Jul 2016 20:52:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65KqaK6054262; Tue, 5 Jul 2016 20:52:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65KqagW054260; Tue, 5 Jul 2016 20:52:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607052052.u65KqagW054260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 5 Jul 2016 20:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302353 - head/sys/dev/ioat 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 20:52:37 -0000 Author: cem Date: Tue Jul 5 20:52:35 2016 New Revision: 302353 URL: https://svnweb.freebsd.org/changeset/base/302353 Log: ioat(4): Serialize ioat_reset_hw invocations Reviewed by: markj Approved by: re Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7097 Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_internal.h Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Tue Jul 5 20:51:52 2016 (r302352) +++ head/sys/dev/ioat/ioat.c Tue Jul 5 20:52:35 2016 (r302353) @@ -326,6 +326,7 @@ ioat_detach(device_t device) ioat->quiescing = TRUE; ioat->destroying = TRUE; wakeup(&ioat->quiescing); + wakeup(&ioat->resetting); ioat_channel[ioat->chan_idx] = NULL; @@ -1699,6 +1700,14 @@ ioat_reset_hw(struct ioat_softc *ioat) int error; mtx_lock(IOAT_REFLK); + while (ioat->resetting && !ioat->destroying) + msleep(&ioat->resetting, IOAT_REFLK, 0, "IRH_drain", 0); + if (ioat->destroying) { + mtx_unlock(IOAT_REFLK); + return (ENXIO); + } + ioat->resetting = TRUE; + ioat->quiescing = TRUE; ioat_drain_locked(ioat); mtx_unlock(IOAT_REFLK); @@ -1792,6 +1801,9 @@ ioat_reset_hw(struct ioat_softc *ioat) out: mtx_lock(IOAT_REFLK); + ioat->resetting = FALSE; + wakeup(&ioat->resetting); + ioat->quiescing = FALSE; wakeup(&ioat->quiescing); mtx_unlock(IOAT_REFLK); @@ -2172,6 +2184,7 @@ DB_SHOW_COMMAND(ioat, db_show_ioat) db_printf(" is_reset_pending: %d\n", (int)sc->is_reset_pending); db_printf(" is_channel_running: %d\n", (int)sc->is_channel_running); db_printf(" intrdelay_supported: %d\n", (int)sc->intrdelay_supported); + db_printf(" resetting: %d\n", (int)sc->resetting); db_printf(" head: %u\n", sc->head); db_printf(" tail: %u\n", sc->tail); Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Tue Jul 5 20:51:52 2016 (r302352) +++ head/sys/dev/ioat/ioat_internal.h Tue Jul 5 20:52:35 2016 (r302353) @@ -491,6 +491,7 @@ struct ioat_softc { boolean_t is_reset_pending; boolean_t is_channel_running; boolean_t intrdelay_supported; + boolean_t resetting; uint32_t head; uint32_t tail; From owner-svn-src-all@freebsd.org Tue Jul 5 20:53:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CEB7B72112; Tue, 5 Jul 2016 20:53:34 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEC751309; Tue, 5 Jul 2016 20:53:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65KrX6c054334; Tue, 5 Jul 2016 20:53:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65KrWV5054332; Tue, 5 Jul 2016 20:53:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607052053.u65KrWV5054332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 5 Jul 2016 20:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302354 - head/sys/dev/ioat 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 20:53:34 -0000 Author: cem Date: Tue Jul 5 20:53:32 2016 New Revision: 302354 URL: https://svnweb.freebsd.org/changeset/base/302354 Log: ioat(4): Block asynchronous work during HW reset Fix the race between ioat_reset_hw and ioat_process_events. HW reset isn't protected by a lock because it can sleep for a long time (40.1 ms). This resulted in a race where we would process bogus parts of the descriptor ring as if it had completed. This looked like duplicate completions on old events, if your ring had looped at least once. Block callout and interrupt work while reset runs so the completion end of things does not observe indeterminate state and process invalid parts of the ring. Start the channel with a manually implemented ioat_null() to keep other submitters quiesced while we wait for the channel to start (100 us). r295605 may have made the race between ioat_reset_hw and ioat_process_events wider, but I believe it already existed before that revision. ioat_process_events can be invoked by two asynchronous sources: callout (softclock) and device interrupt. Those could race each other, to the same effect. Reviewed by: markj Approved by: re Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7097 Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_internal.h Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Tue Jul 5 20:52:35 2016 (r302353) +++ head/sys/dev/ioat/ioat.c Tue Jul 5 20:53:32 2016 (r302354) @@ -376,12 +376,32 @@ ioat_teardown_intr(struct ioat_softc *io static int ioat_start_channel(struct ioat_softc *ioat) { + struct ioat_dma_hw_descriptor *hw_desc; + struct ioat_descriptor *desc; + struct bus_dmadesc *dmadesc; uint64_t status; uint32_t chanerr; int i; ioat_acquire(&ioat->dmaengine); - ioat_null(&ioat->dmaengine, NULL, NULL, 0); + + /* Submit 'NULL' operation manually to avoid quiescing flag */ + desc = ioat_get_ring_entry(ioat, ioat->head); + dmadesc = &desc->bus_dmadesc; + hw_desc = desc->u.dma; + + dmadesc->callback_fn = NULL; + dmadesc->callback_arg = NULL; + + hw_desc->u.control_raw = 0; + hw_desc->u.control_generic.op = IOAT_OP_COPY; + hw_desc->u.control_generic.completion_update = 1; + hw_desc->size = 8; + hw_desc->src_addr = 0; + hw_desc->dest_addr = 0; + hw_desc->u.control.null = 1; + + ioat_submit_single(ioat); ioat_release(&ioat->dmaengine); for (i = 0; i < 100; i++) { @@ -496,6 +516,7 @@ ioat3_attach(device_t device) ioat->head = ioat->hw_head = 0; ioat->tail = 0; ioat->last_seen = 0; + *ioat->comp_update = 0; return (0); } @@ -641,14 +662,24 @@ ioat_process_events(struct ioat_softc *i boolean_t pending; int error; + CTR0(KTR_IOAT, __func__); + mtx_lock(&ioat->cleanup_lock); + /* + * Don't run while the hardware is being reset. Reset is responsible + * for blocking new work and draining & completing existing work, so + * there is nothing to do until new work is queued after reset anyway. + */ + if (ioat->resetting_cleanup) { + mtx_unlock(&ioat->cleanup_lock); + return; + } + completed = 0; comp_update = *ioat->comp_update; status = comp_update & IOAT_CHANSTS_COMPLETED_DESCRIPTOR_MASK; - CTR0(KTR_IOAT, __func__); - if (status == ioat->last_seen) { /* * If we landed in process_events and nothing has been @@ -1643,6 +1674,13 @@ ioat_shrink_timer_callback(void *arg) /* Slowly scale the ring down if idle. */ mtx_lock(&ioat->submit_lock); + + /* Don't run while the hardware is being reset. */ + if (ioat->resetting) { + mtx_unlock(&ioat->submit_lock); + return; + } + order = ioat->ring_size_order; if (ioat->is_resize_pending || order == IOAT_MIN_ORDER) { mtx_unlock(&ioat->submit_lock); @@ -1712,6 +1750,14 @@ ioat_reset_hw(struct ioat_softc *ioat) ioat_drain_locked(ioat); mtx_unlock(IOAT_REFLK); + /* + * Suspend ioat_process_events while the hardware and softc are in an + * indeterminate state. + */ + mtx_lock(&ioat->cleanup_lock); + ioat->resetting_cleanup = TRUE; + mtx_unlock(&ioat->cleanup_lock); + status = ioat_get_chansts(ioat); if (is_ioat_active(status) || is_ioat_idle(status)) ioat_suspend(ioat); @@ -1793,6 +1839,7 @@ ioat_reset_hw(struct ioat_softc *ioat) */ ioat->tail = ioat->head = ioat->hw_head = 0; ioat->last_seen = 0; + *ioat->comp_update = 0; ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); @@ -1800,16 +1847,27 @@ ioat_reset_hw(struct ioat_softc *ioat) error = 0; out: - mtx_lock(IOAT_REFLK); - ioat->resetting = FALSE; - wakeup(&ioat->resetting); + /* + * Resume completions now that ring state is consistent. + * ioat_start_channel will add a pending completion and if we are still + * blocking completions, we may livelock. + */ + mtx_lock(&ioat->cleanup_lock); + ioat->resetting_cleanup = FALSE; + mtx_unlock(&ioat->cleanup_lock); + + /* Enqueues a null operation and ensures it completes. */ + if (error == 0) + error = ioat_start_channel(ioat); + /* Unblock submission of new work */ + mtx_lock(IOAT_REFLK); ioat->quiescing = FALSE; wakeup(&ioat->quiescing); - mtx_unlock(IOAT_REFLK); - if (error == 0) - error = ioat_start_channel(ioat); + ioat->resetting = FALSE; + wakeup(&ioat->resetting); + mtx_unlock(IOAT_REFLK); return (error); } Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Tue Jul 5 20:52:35 2016 (r302353) +++ head/sys/dev/ioat/ioat_internal.h Tue Jul 5 20:53:32 2016 (r302354) @@ -491,7 +491,8 @@ struct ioat_softc { boolean_t is_reset_pending; boolean_t is_channel_running; boolean_t intrdelay_supported; - boolean_t resetting; + boolean_t resetting; /* submit_lock */ + boolean_t resetting_cleanup; /* cleanup_lock */ uint32_t head; uint32_t tail; From owner-svn-src-all@freebsd.org Tue Jul 5 20:56:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F3A4B72239; Tue, 5 Jul 2016 20:56:54 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E58B2164D; Tue, 5 Jul 2016 20:56:53 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65Kur5A054504; Tue, 5 Jul 2016 20:56:53 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65Kurax054503; Tue, 5 Jul 2016 20:56:53 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607052056.u65Kurax054503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Tue, 5 Jul 2016 20:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302355 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 20:56:54 -0000 Author: skreuzer (doc,ports committer) Date: Tue Jul 5 20:56:52 2016 New Revision: 302355 URL: https://svnweb.freebsd.org/changeset/base/302355 Log: Document 300207, Support for Shingled Magnetic Recording (SMR) drives. Approved by: re (gjb, implicit, relnotes) 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 Tue Jul 5 20:53:32 2016 (r302354) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 5 20:56:52 2016 (r302355) @@ -1570,6 +1570,10 @@ &man.diskinfo.8; and the names of /dev/diskid/DISK-* device nodes, among other things. + + Support for managing Shingled Magnetic Recording (SMR) drives + has been added. + From owner-svn-src-all@freebsd.org Tue Jul 5 21:57:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DBA5B72E93; Tue, 5 Jul 2016 21:57:26 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 700761230; Tue, 5 Jul 2016 21:57:26 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65LvPTN076469; Tue, 5 Jul 2016 21:57:25 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65LvPpK076468; Tue, 5 Jul 2016 21:57:25 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607052157.u65LvPpK076468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Tue, 5 Jul 2016 21:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302356 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 21:57:26 -0000 Author: skreuzer (doc,ports committer) Date: Tue Jul 5 21:57:25 2016 New Revision: 302356 URL: https://svnweb.freebsd.org/changeset/base/302356 Log: Remove reference to casperd Reported by: bapt Approved by: re (gjb, implicit, relnotes) 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 Tue Jul 5 20:56:52 2016 (r302355) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 5 21:57:25 2016 (r302356) @@ -182,12 +182,6 @@ Userland Application 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 From owner-svn-src-all@freebsd.org Tue Jul 5 22:07:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F460B731E8; Tue, 5 Jul 2016 22:07:43 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3A4B18B5; Tue, 5 Jul 2016 22:07:42 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65M7gng080061; Tue, 5 Jul 2016 22:07:42 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65M7gia080060; Tue, 5 Jul 2016 22:07:42 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607052207.u65M7gia080060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Tue, 5 Jul 2016 22:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302357 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 22:07:43 -0000 Author: skreuzer (doc,ports committer) Date: Tue Jul 5 22:07:41 2016 New Revision: 302357 URL: https://svnweb.freebsd.org/changeset/base/302357 Log: Document r302221, file has been updated to version 5.28 Approved by: re (gjb, implicit, relnotes) 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 Tue Jul 5 21:57:25 2016 (r302356) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 5 22:07:41 2016 (r302357) @@ -574,8 +574,8 @@ &man.jemalloc.3; has been updated to version 4.0.2. - The &man.file.1; utility has been - updated to version 5.26. + The &man.file.1; utility has been + updated to version 5.28. The &man.nc.1; utility has been updated to the OpenBSD 5.8 version. From owner-svn-src-all@freebsd.org Tue Jul 5 22:30:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCC96B73B07; Tue, 5 Jul 2016 22:30:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACBC31621; Tue, 5 Jul 2016 22:30:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65MUT9G087531; Tue, 5 Jul 2016 22:30:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65MUTTK087530; Tue, 5 Jul 2016 22:30:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607052230.u65MUTTK087530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 5 Jul 2016 22:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302358 - head/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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 22:30:31 -0000 Author: pfg Date: Tue Jul 5 22:30:29 2016 New Revision: 302358 URL: https://svnweb.freebsd.org/changeset/base/302358 Log: Remove incorrect attributes from posix_memalign(3) declaration. Both __alloc_align and __alloc_size can't be used when the function returns a pointer to memory. This fixes breakage when building with clang 3.4: In file included from /usr/src/svn/usr.sbin/bhyve/atkbdc.c:40: /usr/include/stdlib.h:176:6: error: '__alloc_size__' attribute only applies to functions that return a pointer [-Werror,-Wignored-attributes] Pointed out by: ngie, cem Approved by: re (gjb) Modified: head/include/stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Tue Jul 5 22:07:41 2016 (r302357) +++ head/include/stdlib.h Tue Jul 5 22:30:29 2016 (r302358) @@ -172,8 +172,7 @@ char *realpath(const char * __restrict, int rand_r(unsigned *); /* (TSF) */ #endif #if __POSIX_VISIBLE >= 200112 -int posix_memalign(void **, size_t, size_t) __nonnull(1) __alloc_align(2) - __alloc_size(3); /* (ADV) */ +int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ int setenv(const char *, const char *, int); int unsetenv(const char *); #endif From owner-svn-src-all@freebsd.org Tue Jul 5 22:52:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB6EBB71430; Tue, 5 Jul 2016 22:52:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id CEA9112D3; Tue, 5 Jul 2016 22:52:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id C34411A33; Tue, 5 Jul 2016 22:52:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 953A7223CD; Tue, 5 Jul 2016 22:52:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id yG0M_XIDWNWF; Tue, 5 Jul 2016 22:52:03 +0000 (UTC) Subject: Re: svn commit: r302332 - head/usr.sbin/bhyve DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8D6AE223C8 To: Peter Grehan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607040319.u643J6a2078082@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Tue, 5 Jul 2016 15:52:03 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201607040319.u643J6a2078082@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SFof0iPNla0i9sUCvg5jJt2ogEuco9EHi" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 22:52:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SFof0iPNla0i9sUCvg5jJt2ogEuco9EHi Content-Type: multipart/mixed; boundary="UJXnXqOkO0n9fOEaFlsHJ8NjsFOI2bIoD" From: Bryan Drewery To: Peter Grehan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r302332 - head/usr.sbin/bhyve References: <201607040319.u643J6a2078082@repo.freebsd.org> In-Reply-To: <201607040319.u643J6a2078082@repo.freebsd.org> --UJXnXqOkO0n9fOEaFlsHJ8NjsFOI2bIoD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 7/3/2016 8:19 PM, Peter Grehan wrote: > Author: grehan > Date: Mon Jul 4 03:19:06 2016 > New Revision: 302332 > URL: https://svnweb.freebsd.org/changeset/base/302332 >=20 > Log: > Import bhyve_graphics into CURRENT. Thanks to all who tested > this on the branch. > =20 > Original commit message: > Initial bhyve native graphics support. > =20 > This adds emulations for a raw framebuffer device, PS2 keyboard/mou= se, > XHCI USB controller and a USB tablet. > =20 > A simple VNC server is provided for keyboard/mouse input, and graph= ics > output. > =20 > A VGA emulation is included, but is currently disconnected until an= > additional bhyve change to block out VGA memory is committed. > =20 > Credits: > - raw framebuffer, VNC server, XHCI controller, USB bus/device emu= lation > and UEFI f/w support by Leon Dang > - VGA, console/g, initial VNC server by tychon@ > - PS2 keyboard/mouse jointly done by tychon@ and Leon Dang > - hypervisor framebuffer mem support by neel@ > =20 > Tested by: Michael Dexter, in a number of revisions of this code. > =20 > With the appropriate UEFI image, FreeBSD, Windows and Linux guests = can > installed and run in graphics mode using the UEFI/GOP framebuffer. This breaks the external GCC 5.2 build: /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c: In function 'sse42_supported': /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c:885:17: error: 'bit_SSE42' undeclared (first use in this function) return ((ecx & bit_SSE42) !=3D 0); ^ https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1334/console --=20 Regards, Bryan Drewery --UJXnXqOkO0n9fOEaFlsHJ8NjsFOI2bIoD-- --SFof0iPNla0i9sUCvg5jJt2ogEuco9EHi 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 iQEcBAEBAgAGBQJXfDoTAAoJEDXXcbtuRpfP5vMH/iedbR2o9D7hhFRrvcnlIryn uwhcKNJytG/p7/o+AsflwwU2n350akiNhUKX3x675uGZQR+ApnHgd27w+iOsk6dA 1SSFBC4YMpeAxrIuZ59SybK3RCDsH4+E0lucimoifDDEC0tQfl/lUoDnCal9LUF9 EiaOSgm7ws9B0d1FgLzpNk0MeKQ+ggx6QMAeIla9wg3X1DPODfoZm5LqwVqUSvUZ bi1ahEoMCakbbrI71eVFHf3yb6iH49aHggOX7h6ny0dtA4YwhoroxQRoZ3e5ZPe7 esl48jr9QYNmUF9fKGZWXQ7r6ZPMPqfDDQi5zDsZXFiHkBGiPc1t87aaiXZ/fqk= =E8nh -----END PGP SIGNATURE----- --SFof0iPNla0i9sUCvg5jJt2ogEuco9EHi-- From owner-svn-src-all@freebsd.org Tue Jul 5 22:53:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A026B714AD for ; Tue, 5 Jul 2016 22:53:41 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id DC63F14E1 for ; Tue, 5 Jul 2016 22:53:40 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 6BD23209C01F for ; Wed, 6 Jul 2016 08:53:27 +1000 (AEST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 62624281116 for ; Wed, 6 Jul 2016 08:53:27 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nJLtMWbSI0R9 for ; Wed, 6 Jul 2016 08:53:27 +1000 (AEST) Received: from Peters-MacBook-Pro-2.local (unknown [96.82.80.65]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id E3F16280A32; Wed, 6 Jul 2016 08:53:24 +1000 (AEST) Subject: Re: svn commit: r302332 - head/usr.sbin/bhyve To: Bryan Drewery References: <201607040319.u643J6a2078082@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Peter Grehan Message-ID: <127befff-2487-cf5e-84ab-af129a98e282@freebsd.org> Date: Tue, 5 Jul 2016 15:53:27 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=PNRNwriC c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=mwgbnDbW7alINpy3vhoKyg==:17 a=IkcTkHD0fZMA:10 a=cAmyUtKerLwA:10 a=6I5d2MoRAAAA:8 a=oJLq2Tumtkx4b9tx2mQA:9 a=egvnGC1rm1kA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 22:53:41 -0000 > This breaks the external GCC 5.2 build: Fix being worked on in https://reviews.freebsd.org/D7119 later, Peter. From owner-svn-src-all@freebsd.org Tue Jul 5 22:53:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5ED2B714E9; Tue, 5 Jul 2016 22:53:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) (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 72CA51658; Tue, 5 Jul 2016 22:53:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22c.google.com with SMTP id c2so74126406pfa.2; Tue, 05 Jul 2016 15:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=1vS60r40S6Sw6BDYf+ZAkp4tJRmpFOQD+Dfw4EyUg+E=; b=rCgXW4tBvShSS97u4mFGHSi39OiuRtrdVJGEiHwNi2ytnWdT/VkiMYxTEkoRf7VTWe +QvlpVQ9GfJt0DTsgmY/bKQeNSlqD96dN3IppKVVtFqy9u/29Uau9vjU5PkK/2Q4xX2i 0kXVO1TJtsuFSlUlX2RgQKH53B+KknadRxrNJ+j09zKk15q5JTW/xJLjlAiEzS6WQ98v focixjJz/D7T7bKxxshPgJSPRbV/CLXp8pwFd2P5PMkTZtqWJDZTE8c5hySU6rsHgA9X 6KwgX/wx/yRIxdhK3FKn61NvlG38GzkgG7iVyYcCLKmXEL8rBxCRbqHVLyYvuvzW7tk2 1s+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=1vS60r40S6Sw6BDYf+ZAkp4tJRmpFOQD+Dfw4EyUg+E=; b=Nb89ov++cePRlXhrQbWrGBTAM2pph+NywsftojdOtVdLdh7F3seR/OpPwuSeFopvq5 drP7QQqYM3fQVnVkXrTLw4LluvQwfxoL0cB1KHK4gEgG7ne6wVhePyVG0PDY9oMWFCX7 /o1lAri0RosCQvJ3eWiwNK2LOyK4gmNmGnJXuQHJzsDvDS1HKPbwT6VwQjj6z4+FzhSl ZF1PptWesx/L/A2zvzAmJlPJgxLSO/rAJHgva0t0lHqn/K+7NbWieZ0XHrCuxAnbugVI haIbUFpxuiEn8Qx04vSTI1dd4ncpH7IdfyDrneSf36U5lJInZBFj4PAPaBKsATQ4DT17 VYYw== X-Gm-Message-State: ALyK8tI8hU7VHpdEAOwWg4QFV9aDFlR2FgdSZ09ub2jfZD6SdlGgOZc9He8GDh5WVXyUcg== X-Received: by 10.98.110.195 with SMTP id j186mr36319857pfc.49.1467759234789; Tue, 05 Jul 2016 15:53:54 -0700 (PDT) Received: from [192.168.100.143] ([199.231.240.59]) by smtp.gmail.com with ESMTPSA id y70sm6781400pff.25.2016.07.05.15.53.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 15:53:53 -0700 (PDT) Subject: Re: svn commit: r302332 - head/usr.sbin/bhyve Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_37AEB319-371B-4D9F-8A3C-7FEAC3BFFB4C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 5 Jul 2016 15:53:44 -0700 Cc: Peter Grehan , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2E25807A-B622-467B-B842-F40192273597@gmail.com> References: <201607040319.u643J6a2078082@repo.freebsd.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 22:53:55 -0000 --Apple-Mail=_37AEB319-371B-4D9F-8A3C-7FEAC3BFFB4C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 5, 2016, at 15:52, Bryan Drewery wrote: >=20 > On 7/3/2016 8:19 PM, Peter Grehan wrote: >> Author: grehan >> Date: Mon Jul 4 03:19:06 2016 >> New Revision: 302332 >> URL: https://svnweb.freebsd.org/changeset/base/302332 >>=20 >> Log: >> Import bhyve_graphics into CURRENT. Thanks to all who tested >> this on the branch. >>=20 >> Original commit message: >> Initial bhyve native graphics support. >>=20 >> This adds emulations for a raw framebuffer device, PS2 = keyboard/mouse, >> XHCI USB controller and a USB tablet. >>=20 >> A simple VNC server is provided for keyboard/mouse input, and = graphics >> output. >>=20 >> A VGA emulation is included, but is currently disconnected until = an >> additional bhyve change to block out VGA memory is committed. >>=20 >> Credits: >> - raw framebuffer, VNC server, XHCI controller, USB bus/device = emulation >> and UEFI f/w support by Leon Dang >> - VGA, console/g, initial VNC server by tychon@ >> - PS2 keyboard/mouse jointly done by tychon@ and Leon Dang >> - hypervisor framebuffer mem support by neel@ >>=20 >> Tested by: Michael Dexter, in a number of revisions of this code. >>=20 >> With the appropriate UEFI image, FreeBSD, Windows and Linux guests = can >> installed and run in graphics mode using the UEFI/GOP framebuffer. >=20 > This breaks the external GCC 5.2 build: >=20 > /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c: In function > 'sse42_supported': > /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c:885:17: error: > 'bit_SSE42' undeclared (first use in this function) > return ((ecx & bit_SSE42) !=3D 0); > ^ > https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1334/console It breaks gcc compilation in general. Here=E2=80=99s my proposed fix in = progress: https://reviews.freebsd.org/D7119 . Thanks, -Ngie --Apple-Mail=_37AEB319-371B-4D9F-8A3C-7FEAC3BFFB4C 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 iQIcBAEBCgAGBQJXfDp5AAoJEPWDqSZpMIYVFggP/j4CiPggv8oohMNdWdLT3O5L DxNXi171YtvrpWNcLtw2mTivlquHL3YDEBMewfly+pk/pbuQLkoqjrXBzTvkiQWi sPkte5D9zY7yzuCBqRbV5xY6v5QinhHlVstaA6dL2U37utBm+mgJASfiTunf6M8m KkvmzIvjfkuGFFDuuUPUez7LceSUmQRL5AniUGjNoPKv1enbOaMojSWGglO7IOIK YKcbeGaYRMM8ba5Ax7dGCliwyUVieChJEvThfGAleTFe9k8hhBF02of+wpPgT3na JJUqvVDmRceDiLrTqs2DbRcbbBnZ1ySXCVYQLgEBir91O3jN760KngjCL6VXgS16 FQBkui6uV87dWy547H2GEdl0u89k0mamgmZURop/SGuMG5xQ8RKTa3cqW7TYuwCp DeC8sJP1ZMbkTxNNrNUR7dT+nTZRCKxd3AHaVOtoBfrj0SGDA5LDIVJSOtmR/Hm2 0//IRpIS/a1KWCzTfA1X1bn44BXUwGxYY8c24xJrbHtcJ9xmtzt4zA5kXg9BeDqP RvSefz4nzLZij4zEEKo07/4+b7bWKBBH5IoxxAKB207A49EXDPnrbjpAKNjEdLRA xuddyU249cKhHbKQ9LgAOxjTOrJe0UZxEpeeksbNEvRHT0/juftz4ETa+FDfpl1F NzkAg5gjB4zj2GJ4jN7V =zs2b -----END PGP SIGNATURE----- --Apple-Mail=_37AEB319-371B-4D9F-8A3C-7FEAC3BFFB4C-- From owner-svn-src-all@freebsd.org Tue Jul 5 23:03:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5C1DB7184C; Tue, 5 Jul 2016 23:03:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (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 929121C82; Tue, 5 Jul 2016 23:03:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x232.google.com with SMTP id c2so74185214pfa.2; Tue, 05 Jul 2016 16:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=pYqZLEqGp6dh4z7fQ6j/jbyIX7q6i98rPXst+H+ZR90=; b=oCrtggFZaiJZYfwSDmdlPzdGAHt9lziHML/3PXVdPlPARbhHZ+H5BlVuN/OnSntLv4 MhW343PxLlck3Ddk5V21Rm2gB9T+6yTEN00puiffEBp9qHfuxxnyOri4mFK3s3Vfd23N qKQzQe5CSy9QpHoOBKvNfRmZtbSmF611cgpbQwH3ZeOq/lK1kIST9OGcbUQXQnguGyzo r93nxLjuPBIGr+dXW2kmZwMr6RnNqAeR8rddGGcrs1ccpwryomQNdvUZw7YlXdVFxep6 CACDUHIMLhtQSFYjo4TfdKZPLik578PNECn6xblSDGlrhDVlzMCoCIWNttsANfxz1F2q pdAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=pYqZLEqGp6dh4z7fQ6j/jbyIX7q6i98rPXst+H+ZR90=; b=Muoy8Gd3xkkVNW/T3qr5q18CWT9v0FY/yrliEHMt2cfOukCl6PysUXhtEA+OvHiDpq TyMZlVdtcA7D3TWaPqy+VcQWTVSVJicc0P5Sxxf78Sih8Yeshhhs2zKGZBnTtf/m2eGs 57ZsmDsSXlgXRxhEFKIMrZ6qndAT8W7svnHJ+vAJNJLAtM6pF920eIFidEwTtmdQ5bF9 9yFOe16wpBF4S9iG8rYLSQBuYnLWZBPPN96cDCZYBWjci94DbtGI9ucTyo/6hIY81alh 5nIOLI5RW+51DDjzpxBfn3niZ4dDxttaeKLWt7TRsLzvmdXoAui1wbiH9fv3Nwfzf+a6 qIKg== X-Gm-Message-State: ALyK8tJnhqnmcE5Z/jOVOK7gp+2n7IZuyUNiJ7TQ5zbTX+s5BbQdXHH3EezxOxnSndCQNg== X-Received: by 10.98.0.83 with SMTP id 80mr36452206pfa.0.1467759782925; Tue, 05 Jul 2016 16:03:02 -0700 (PDT) Received: from [192.168.100.143] ([199.231.240.59]) by smtp.gmail.com with ESMTPSA id br6sm6308181pac.0.2016.07.05.16.03.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 16:03:02 -0700 (PDT) Subject: Re: svn commit: r302328 - in head/sys: kern sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_78F091A8-40F8-49B6-BA14-68BBF36D0336"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20160705200552.Y1821@besplex.bde.org> Date: Tue, 5 Jul 2016 16:02:46 -0700 Cc: Konstantin Belousov , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201607031819.u63IJm79075708@repo.freebsd.org> <20160705200552.Y1821@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 23:03:03 -0000 --Apple-Mail=_78F091A8-40F8-49B6-BA14-68BBF36D0336 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 5, 2016, at 03:08, Bruce Evans wrote: >=20 > On Sun, 3 Jul 2016, Konstantin Belousov wrote: >=20 > This is mostly a test reply (replying to src-committers has stopped > working for newer commits). >=20 >> Log: >> Provide helper macros to detect 'non-silent SBDRY' state and to >> calculate appropriate return value for stops. Simplify the code by >> using them. >>=20 >> Fix typo in sig_suspend_threads(). The thread which sleep must be >> aborted is td2. (*) >>=20 >> In issignal(), when handling stopping signal for thread in >> TD_SBDRY_INTR state, do not stop, this is wrong and fires assert. >> This is yet another place where execution should be forced out of >> SBDRY-protected region. For such case, return -1 from issignal() and >> translate it to corresponding error code in sleepq_catch_signals(). >> Assert that other consumers of cursig() are not affected by the new >> return value. (*) >>=20 >> Micro-optimize, mostly VFS and VOP methods, by avoiding calling the >> functions when SIGDEFERSTOP_NOP non-change is requested. (**) >>=20 >> Reported and tested by: pho (*) >> Requested by: bde (**) >> Sponsored by: The FreeBSD Foundation >> MFC after: 2 weeks >> Approved by: re (gjb) >=20 > Thanks, but this is still very slow (even slower than beore the > micro-optimization). Could you please bump __FreeBSD_version ? This change broke = emulators/open-vm-tools from pkg.FreeBSD.org , so it needs to be = rebuilt. Thanks, -Ngie $ sudo service vmware-kmod start Loading vmmemctl kernel module: already loaded. Loading vmxnet kernel module: already loaded. Loading vmblock kernel module: failed. Cannot 'start' vmware_guest_vmhgfs. Set vmware_guest_vmhgfs_enable to = YES in /etc/rc.conf or use 'onestart' instead of 'start'. $ tail -n 3 /var/log/messages Jul 5 15:59:03 fbsd11 fetch: gethostby*.getanswer: asked for = "mirror.easthsia.com IN AAAA", got type "A" Jul 5 16:01:43 fbsd11 kernel: link_elf_obj: symbol sigdeferstop = undefined Jul 5 16:01:43 fbsd11 kernel: linker_load_file: Unsupported file type --Apple-Mail=_78F091A8-40F8-49B6-BA14-68BBF36D0336 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 iQIcBAEBCgAGBQJXfDyWAAoJEPWDqSZpMIYVDG8P/3R8XdRh5swGYWQVDCHykNwB E8yFBoUedMSkSoyHoLW4Zjcn+goFDFctgQGewQlTxGoqBPFv/5QpnjHALmc9dF3s NG6QWaEVpNoVW1ZKBVLHdcRlvzTTHrkWKdokqQQYez/2oKQ7Svs3C2VqToMrkTly 7Gdg6EUol68Zoha/EI3EP7t0590IrxkPi0tZFxcfqCbbZNPAZG36r/23oCQqubLA pSisv6JcXqLUbBgiUd6IcVNXp9q7aZ2HZEDCmm/Be8DVTUUo6KTc0FJOas8M6usY EeBRv8/RZiZNYbIOudWHw2mJfPVA4X9t50c0xQgn5OhTAsZEpXZ4ztsAhfjYcZp8 XBwPmpThC9gSvgWiOjkgi9GxKL37qwwbFpbXx7sIavsafqLaU1Kj5k/CVyLugatT +4jekgpiOiPlJyBARCN7YRU3XJQHsRNu+nLteDp5bUDnCLHhmRALPTksuLvGmDsV RwLluI8a2keq8R8L1JsLw4y8W6aOwufMQCB9HDRb/hEUHcEDFggCdBbJ9LkNveYK buDO4PZIwjkPIj8g1iFnL65wNfh/iZMV5zxiBKmo/wKFZ0+gDVg2uG5n66dYEA3J R8l0CJ342Wqw8a8cABWwb3/utUcnsn9NG5fvprpK18ajmRNUmZwc2K6BW5r6aiy9 FRgiLe9gJTWb4AIlkFqx =jVft -----END PGP SIGNATURE----- --Apple-Mail=_78F091A8-40F8-49B6-BA14-68BBF36D0336-- From owner-svn-src-all@freebsd.org Tue Jul 5 23:03:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47D4DB718B4; Tue, 5 Jul 2016 23:03:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18B7B1DE3; Tue, 5 Jul 2016 23:03:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u65N3vbN001896; Tue, 5 Jul 2016 23:03:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u65N3vBw001895; Tue, 5 Jul 2016 23:03:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607052303.u65N3vBw001895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 5 Jul 2016 23:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302359 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 05 Jul 2016 23:03:58 -0000 Author: gjb Date: Tue Jul 5 23:03:57 2016 New Revision: 302359 URL: https://svnweb.freebsd.org/changeset/base/302359 Log: Correct a manual page reference. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/capsicum.4 Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Tue Jul 5 22:30:29 2016 (r302358) +++ head/share/man/man4/capsicum.4 Tue Jul 5 23:03:57 2016 (r302359) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2016 +.Dd July 5, 2016 .Dt CAPSICUM 4 .Os .Sh NAME @@ -104,7 +104,7 @@ associated with file descriptors; descri .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , -.Xr casper 3 , +.Xr libcasper 3 , .Xr procdesc 4 .Sh HISTORY .Nm From owner-svn-src-all@freebsd.org Wed Jul 6 00:02:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF229B72D20; Wed, 6 Jul 2016 00:02:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1DAD1BFD; Wed, 6 Jul 2016 00:02:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66024Hj022731; Wed, 6 Jul 2016 00:02:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66024PW022730; Wed, 6 Jul 2016 00:02:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607060002.u66024PW022730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 6 Jul 2016 00:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r302360 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 00:02:06 -0000 Author: gjb Date: Wed Jul 6 00:02:04 2016 New Revision: 302360 URL: https://svnweb.freebsd.org/changeset/base/302360 Log: Premptively add stable/11 and releng/11.0 entries to the approvers file. Note, these are commented out for now. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Tue Jul 5 23:03:57 2016 (r302359) +++ svnadmin/conf/approvers Wed Jul 6 00:02:04 2016 (r302360) @@ -17,8 +17,10 @@ # $FreeBSD$ # ^head/ re +#^stable/11/ re #^stable/10/ re ^release/ re +#^releng/11.0/ re ^releng/10.[0-3]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) ^releng/8.[0-4]/ (security-officer|so) From owner-svn-src-all@freebsd.org Wed Jul 6 03:23:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA4EDB21A66; Wed, 6 Jul 2016 03:23:08 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FFD21FBE; Wed, 6 Jul 2016 03:23:08 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u663N7uH000106; Wed, 6 Jul 2016 03:23:07 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u663N7BM000105; Wed, 6 Jul 2016 03:23:07 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201607060323.u663N7BM000105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Wed, 6 Jul 2016 03:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302361 - head/share/misc 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 03:23:08 -0000 Author: badger Date: Wed Jul 6 03:23:07 2016 New Revision: 302361 URL: https://svnweb.freebsd.org/changeset/base/302361 Log: Add myself to the src committers graph. Approved by: re (gjb), kib (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Jul 6 00:02:04 2016 (r302360) +++ head/share/misc/committers-src.dot Wed Jul 6 03:23:07 2016 (r302361) @@ -120,6 +120,7 @@ arybchik [label="Andrew Rybchenko\narybc asomers [label="Alan Somers\nasomers@FreeBSD.org\n2013/04/24"] avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"] avos [label="Andriy Voskoboinyk\navos@FreeBSD.org\n2015/09/24"] +badger [label="Eric Badger\nbadger@FreeBSD.org\n2016/07/01"] bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] bdrewery [label="Bryan Drewery\nbdrewery@FreeBSD.org\n2013/12/14"] benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"] @@ -588,6 +589,7 @@ ken -> asomers ken -> slm kib -> ae +kib -> badger kib -> dchagin kib -> gjb kib -> jah @@ -767,6 +769,8 @@ ume -> jinmei ume -> suz ume -> tshiozak +vangyzen -> badger + wes -> scf wkoszek -> jceel From owner-svn-src-all@freebsd.org Wed Jul 6 04:56:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C96B719F0; Wed, 6 Jul 2016 04:56:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357CF12B8; Wed, 6 Jul 2016 04:56:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u664ujeV033424; Wed, 6 Jul 2016 04:56:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u664ujqx033423; Wed, 6 Jul 2016 04:56:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060456.u664ujqx033423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 04:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302362 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 04:56:46 -0000 Author: ngie Date: Wed Jul 6 04:56:45 2016 New Revision: 302362 URL: https://svnweb.freebsd.org/changeset/base/302362 Log: Fix gcc warnings - Remove -Wunused-but-set-variable (newcpu) - Always return VMEXIT_CONTINUE as the code always set retval to that value. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Wed Jul 6 03:23:07 2016 (r302361) +++ head/usr.sbin/bhyve/bhyverun.c Wed Jul 6 04:56:45 2016 (r302362) @@ -388,13 +388,11 @@ vmexit_wrmsr(struct vmctx *ctx, struct v static int vmexit_spinup_ap(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) { - int newcpu; - int retval = VMEXIT_CONTINUE; - newcpu = spinup_ap(ctx, *pvcpu, - vme->u.spinup_ap.vcpu, vme->u.spinup_ap.rip); + (void)spinup_ap(ctx, *pvcpu, + vme->u.spinup_ap.vcpu, vme->u.spinup_ap.rip); - return (retval); + return (VMEXIT_CONTINUE); } #define DEBUG_EPT_MISCONFIG From owner-svn-src-all@freebsd.org Wed Jul 6 04:58:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88F10B71A77; Wed, 6 Jul 2016 04:58:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59593146E; Wed, 6 Jul 2016 04:58:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u664wgtm033526; Wed, 6 Jul 2016 04:58:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u664wg9N033525; Wed, 6 Jul 2016 04:58:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060458.u664wg9N033525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 04:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302363 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 04:58:43 -0000 Author: ngie Date: Wed Jul 6 04:58:42 2016 New Revision: 302363 URL: https://svnweb.freebsd.org/changeset/base/302363 Log: Fix gcc warnings Put cfl/prdt under AHCI_DEBUG #defines as they are only used in those cases. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Wed Jul 6 04:56:45 2016 (r302362) +++ head/usr.sbin/bhyve/pci_ahci.c Wed Jul 6 04:58:42 2016 (r302363) @@ -1717,19 +1717,25 @@ static void ahci_handle_slot(struct ahci_port *p, int slot) { struct ahci_cmd_hdr *hdr; +#ifdef AHCI_DEBUG struct ahci_prdt_entry *prdt; +#endif struct pci_ahci_softc *sc; uint8_t *cfis; +#ifdef AHCI_DEBUG int cfl; +#endif sc = p->pr_sc; hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); +#ifdef AHCI_DEBUG cfl = (hdr->flags & 0x1f) * 4; +#endif cfis = paddr_guest2host(ahci_ctx(sc), hdr->ctba, 0x80 + hdr->prdtl * sizeof(struct ahci_prdt_entry)); +#ifdef AHCI_DEBUG prdt = (struct ahci_prdt_entry *)(cfis + 0x80); -#ifdef AHCI_DEBUG DPRINTF("\ncfis:"); for (i = 0; i < cfl; i++) { if (i % 10 == 0) From owner-svn-src-all@freebsd.org Wed Jul 6 05:03:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 127F0B71C28; Wed, 6 Jul 2016 05:03:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B334E1833; Wed, 6 Jul 2016 05:03:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6652xbq036954; Wed, 6 Jul 2016 05:02:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6652xEK036953; Wed, 6 Jul 2016 05:02:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060502.u6652xEK036953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 05:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302364 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:03:01 -0000 Author: ngie Date: Wed Jul 6 05:02:59 2016 New Revision: 302364 URL: https://svnweb.freebsd.org/changeset/base/302364 Log: Fix gcc warnings Add `WRAPPED_CTASSERT` macro by annotating CTASSERTs with __unused to deal with -Wunused-local-typedefs warnings from gcc 4.8+. All other compilers (clang, etc) use CTASSERT as-is. A more generic solution for this issue will be proposed after ^/stable/11 is forked. Consolidate all CTASSERTs under one block instead of inlining them in functions. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Wed Jul 6 04:58:42 2016 (r302363) +++ head/usr.sbin/bhyve/pci_emul.c Wed Jul 6 05:02:59 2016 (r302364) @@ -755,13 +755,21 @@ pci_emul_init(struct vmctx *ctx, struct return (err); } +#ifdef __GNU_C__ +#define WRAPPED_CTASSERT(x) CTASSERT(x) __unused +#else +#define WRAPPED_CTASSERT(x) CTASSERT(x) +#endif + +WRAPPED_CTASSERT(sizeof(struct msicap) == 14); +WRAPPED_CTASSERT(sizeof(struct msixcap) == 12); +WRAPPED_CTASSERT(sizeof(struct pciecap) == 60); + void pci_populate_msicap(struct msicap *msicap, int msgnum, int nextptr) { int mmc; - CTASSERT(sizeof(struct msicap) == 14); - /* Number of msi messages must be a power of 2 between 1 and 32 */ assert((msgnum & (msgnum - 1)) == 0 && msgnum >= 1 && msgnum <= 32); mmc = ffs(msgnum) - 1; @@ -786,7 +794,6 @@ static void pci_populate_msixcap(struct msixcap *msixcap, int msgnum, int barnum, uint32_t msix_tab_size) { - CTASSERT(sizeof(struct msixcap) == 12); assert(msix_tab_size % 4096 == 0); @@ -937,8 +944,6 @@ pci_emul_add_pciecap(struct pci_devinst int err; struct pciecap pciecap; - CTASSERT(sizeof(struct pciecap) == 60); - if (type != PCIEM_TYPE_ROOT_PORT) return (-1); From owner-svn-src-all@freebsd.org Wed Jul 6 05:05:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE7AAB71C95; Wed, 6 Jul 2016 05:05:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0EE419AD; Wed, 6 Jul 2016 05:05:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66553K5037073; Wed, 6 Jul 2016 05:05:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66553lR037072; Wed, 6 Jul 2016 05:05:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060505.u66553lR037072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 05:05:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302365 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:05:04 -0000 Author: ngie Date: Wed Jul 6 05:05:03 2016 New Revision: 302365 URL: https://svnweb.freebsd.org/changeset/base/302365 Log: Fix gcc warnings Remove -Wunused-but-set-variable (`error`). Cast calls with `(void)` to note that the return value is explicitly ignored. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/pci_passthru.c Modified: head/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- head/usr.sbin/bhyve/pci_passthru.c Wed Jul 6 05:02:59 2016 (r302364) +++ head/usr.sbin/bhyve/pci_passthru.c Wed Jul 6 05:05:03 2016 (r302365) @@ -361,7 +361,7 @@ msix_table_write(struct vmctx *ctx, int uint64_t *dest64; size_t entry_offset; uint32_t vector_control; - int error, index; + int index; pi = sc->psc_pi; if (offset >= pi->pi_msix.pba_offset && @@ -416,8 +416,8 @@ msix_table_write(struct vmctx *ctx, int /* If the entry is masked, don't set it up */ if ((entry->vector_control & PCIM_MSIX_VCTRL_MASK) == 0 || (vector_control & PCIM_MSIX_VCTRL_MASK) == 0) { - error = vm_setup_pptdev_msix(ctx, vcpu, - sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, + (void)vm_setup_pptdev_msix(ctx, vcpu, + sc->psc_sel.pc_bus, sc->psc_sel.pc_dev, sc->psc_sel.pc_func, index, entry->addr, entry->msg_data, entry->vector_control); } From owner-svn-src-all@freebsd.org Wed Jul 6 05:09:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78104B71E69; Wed, 6 Jul 2016 05:09:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2944D1D24; Wed, 6 Jul 2016 05:09:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6659DQd037262; Wed, 6 Jul 2016 05:09:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6659DH7037261; Wed, 6 Jul 2016 05:09:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060509.u6659DH7037261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 05:09:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302366 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:09:14 -0000 Author: ngie Date: Wed Jul 6 05:09:13 2016 New Revision: 302366 URL: https://svnweb.freebsd.org/changeset/base/302366 Log: Fix gcc warnings - Put parentheses around bitwise OR'ed values in the `FIELD_COPY(..)` and `FIELD_REPLACE(..)` macros to mute warning from gcc 4.2.1. - Remove -Wunused-but-set-variable's (`setup_addr`, `status_addr`). Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week X-MFC with: r302332 Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/pci_xhci.c Modified: head/usr.sbin/bhyve/pci_xhci.c ============================================================================== --- head/usr.sbin/bhyve/pci_xhci.c Wed Jul 6 05:05:03 2016 (r302365) +++ head/usr.sbin/bhyve/pci_xhci.c Wed Jul 6 05:09:13 2016 (r302366) @@ -143,10 +143,10 @@ static int xhci_debug = 0; #define MASK_64_HI(x) ((x) & ~0xFFFFFFFFULL) #define MASK_64_LO(x) ((x) & 0xFFFFFFFFULL) -#define FIELD_REPLACE(a,b,m,s) ((a) & ~((m) << (s)) | \ - ((b) & (m)) << (s)) -#define FIELD_COPY(a,b,m,s) ((a) & ~((m) << (s)) | \ - ((b) & ((m) << (s)))) +#define FIELD_REPLACE(a,b,m,s) (((a) & ~((m) << (s))) | \ + (((b) & (m)) << (s))) +#define FIELD_COPY(a,b,m,s) (((a) & ~((m) << (s))) | \ + (((b) & ((m) << (s))))) struct pci_xhci_trb_ring { uint64_t ringaddr; /* current dequeue guest address */ @@ -1700,7 +1700,7 @@ pci_xhci_handle_transfer(struct pci_xhci struct xhci_trb *setup_trb; struct usb_data_xfer *xfer; struct usb_data_xfer_block *xfer_block; - uint64_t val, setup_addr, status_addr; + uint64_t val; uint32_t trbflags; int do_intr, err; int do_retry; @@ -1718,8 +1718,6 @@ retry: do_retry = 0; do_intr = 0; setup_trb = NULL; - setup_addr = 0; - status_addr = 0; while (1) { pci_xhci_dump_trb(trb); @@ -1754,7 +1752,6 @@ retry: goto errout; } setup_trb = trb; - setup_addr = addr; val = trb->qwTrb0; if (!xfer->ureq) @@ -1786,7 +1783,6 @@ retry: break; case XHCI_TRB_TYPE_STATUS_STAGE: - status_addr = addr; xfer_block = usb_data_xfer_append(xfer, NULL, 0, (void *)addr, ccs); break; @@ -1842,7 +1838,6 @@ retry: err = USB_ERR_NOT_STARTED; if (dev->dev_ue->ue_request != NULL) err = dev->dev_ue->ue_request(dev->dev_sc, xfer); - status_addr = 0; setup_trb = NULL; } else { /* handle data transfer */ From owner-svn-src-all@freebsd.org Wed Jul 6 05:11:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19266B72087; Wed, 6 Jul 2016 05:11:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF3DE1F6F; Wed, 6 Jul 2016 05:11:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u665BerL040618; Wed, 6 Jul 2016 05:11:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u665Be0x040616; Wed, 6 Jul 2016 05:11:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060511.u665Be0x040616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 05:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302367 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:11:41 -0000 Author: ngie Date: Wed Jul 6 05:11:39 2016 New Revision: 302367 URL: https://svnweb.freebsd.org/changeset/base/302367 Log: Fix gcc warnings Remove unused function (`fifo_available`) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week X-MFC with: r302332 Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/ps2kbd.c Modified: head/usr.sbin/bhyve/ps2kbd.c ============================================================================== --- head/usr.sbin/bhyve/ps2kbd.c Wed Jul 6 05:09:13 2016 (r302366) +++ head/usr.sbin/bhyve/ps2kbd.c Wed Jul 6 05:11:39 2016 (r302367) @@ -93,15 +93,6 @@ fifo_reset(struct ps2kbd_softc *sc) fifo->size = sizeof(((struct fifo *)0)->buf); } -static int -fifo_available(struct ps2kbd_softc *sc) -{ - struct fifo *fifo; - - fifo = &sc->fifo; - return (fifo->num < fifo->size); -} - static void fifo_put(struct ps2kbd_softc *sc, uint8_t val) { From owner-svn-src-all@freebsd.org Wed Jul 6 05:17:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6A3AB72167; Wed, 6 Jul 2016 05:17:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67CB613C5; Wed, 6 Jul 2016 05:17:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u665H7Jp040839; Wed, 6 Jul 2016 05:17:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u665H7dp040838; Wed, 6 Jul 2016 05:17:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060517.u665H7dp040838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 05:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302368 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:17:08 -0000 Author: ngie Date: Wed Jul 6 05:17:07 2016 New Revision: 302368 URL: https://svnweb.freebsd.org/changeset/base/302368 Log: Fix gcc build errors with SSE 4.2 detection and gcc warnings - Remove -Wunused-but-set-variable's (`len`, etc). - Replace clang-specific tests in sse42_supported(..) with generic, FreeBSD-supported CPU feature tests, using macros and functions from machine/cpufunc.h and machine/specialreg.h . The previous method for determining SSE4.2 availability was only compatible with clang. - Sort #includes per style(9). Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week X-MFC with: r302332 Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/rfb.c Modified: head/usr.sbin/bhyve/rfb.c ============================================================================== --- head/usr.sbin/bhyve/rfb.c Wed Jul 6 05:11:39 2016 (r302367) +++ head/usr.sbin/bhyve/rfb.c Wed Jul 6 05:17:07 2016 (r302368) @@ -28,12 +28,14 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#include #include -#include -#include +#include #include +#include +#include +#include #include #include @@ -46,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "bhyvegc.h" #include "console.h" @@ -177,7 +178,6 @@ rfb_send_server_init_msg(int cfd) { struct bhyvegc_image *gc_image; struct rfb_srvr_info sinfo; - int len; gc_image = console_get_image(); @@ -194,8 +194,8 @@ rfb_send_server_init_msg(int cfd) sinfo.pixfmt.green_shift = 8; sinfo.pixfmt.blue_shift = 0; sinfo.namelen = htonl(strlen("bhyve")); - len = stream_write(cfd, &sinfo, sizeof(sinfo)); - len = stream_write(cfd, "bhyve", strlen("bhyve")); + (void)stream_write(cfd, &sinfo, sizeof(sinfo)); + (void)stream_write(cfd, "bhyve", strlen("bhyve")); } static void @@ -223,9 +223,8 @@ static void rfb_recv_set_pixfmt_msg(struct rfb_softc *rc, int cfd) { struct rfb_pixfmt_msg pixfmt_msg; - int len; - len = stream_read(cfd, ((void *)&pixfmt_msg)+1, sizeof(pixfmt_msg)-1); + (void)stream_read(cfd, ((void *)&pixfmt_msg)+1, sizeof(pixfmt_msg)-1); } @@ -233,14 +232,14 @@ static void rfb_recv_set_encodings_msg(struct rfb_softc *rc, int cfd) { struct rfb_enc_msg enc_msg; - int len, i; + int i; uint32_t encoding; assert((sizeof(enc_msg) - 1) == 3); - len = stream_read(cfd, ((void *)&enc_msg)+1, sizeof(enc_msg)-1); + (void)stream_read(cfd, ((void *)&enc_msg)+1, sizeof(enc_msg)-1); for (i = 0; i < htons(enc_msg.numencs); i++) { - len = stream_read(cfd, &encoding, sizeof(encoding)); + (void)stream_read(cfd, &encoding, sizeof(encoding)); switch (htonl(encoding)) { case RFB_ENCODING_RAW: rc->enc_raw_ok = true; @@ -256,27 +255,6 @@ rfb_recv_set_encodings_msg(struct rfb_so } } -static void -rfb_resize_update(struct rfb_softc *rc, int fd) -{ - struct rfb_srvr_updt_msg supdt_msg; - struct rfb_srvr_rect_hdr srect_hdr; - - /* Number of rectangles: 1 */ - supdt_msg.type = 0; - supdt_msg.pad = 0; - supdt_msg.numrects = htons(1); - stream_write(fd, &supdt_msg, sizeof(struct rfb_srvr_updt_msg)); - - /* Rectangle header */ - srect_hdr.x = htons(0); - srect_hdr.y = htons(0); - srect_hdr.width = htons(rc->width); - srect_hdr.height = htons(rc->height); - srect_hdr.encoding = htonl(RFB_ENCODING_RESIZE); - stream_write(fd, &srect_hdr, sizeof(struct rfb_srvr_rect_hdr)); -} - /* * Calculate CRC32 using SSE4.2; Intel or AMD Bulldozer+ CPUs only */ @@ -636,9 +614,8 @@ rfb_recv_update_msg(struct rfb_softc *rc { struct rfb_updt_msg updt_msg; struct bhyvegc_image *gc_image; - int len; - len = stream_read(cfd, ((void *)&updt_msg) + 1 , sizeof(updt_msg) - 1); + (void)stream_read(cfd, ((void *)&updt_msg) + 1 , sizeof(updt_msg) - 1); console_refresh(); gc_image = console_get_image(); @@ -666,9 +643,8 @@ static void rfb_recv_key_msg(struct rfb_softc *rc, int cfd) { struct rfb_key_msg key_msg; - int len; - len = stream_read(cfd, ((void *)&key_msg) + 1, sizeof(key_msg) - 1); + (void)stream_read(cfd, ((void *)&key_msg) + 1, sizeof(key_msg) - 1); console_key_event(key_msg.down, htonl(key_msg.code)); } @@ -677,9 +653,8 @@ static void rfb_recv_ptr_msg(struct rfb_softc *rc, int cfd) { struct rfb_ptr_msg ptr_msg; - int len; - len = stream_read(cfd, ((void *)&ptr_msg) + 1, sizeof(ptr_msg) - 1); + (void)stream_read(cfd, ((void *)&ptr_msg) + 1, sizeof(ptr_msg) - 1); console_ptr_event(ptr_msg.button, htons(ptr_msg.x), htons(ptr_msg.y)); } @@ -876,13 +851,15 @@ rfb_thr(void *arg) } static int -sse42_supported() +sse42_supported(void) { - unsigned int eax, ebx, ecx, edx; - - __get_cpuid(1, &eax, &ebx, &ecx, &edx); - - return ((ecx & bit_SSE42) != 0); + u_int cpu_registers[4], ecx; + + do_cpuid(1, cpu_registers); + + ecx = cpu_registers[2]; + + return ((ecx & CPUID2_SSE42) != 0); } int From owner-svn-src-all@freebsd.org Wed Jul 6 05:17:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E1DDB721D2; Wed, 6 Jul 2016 05:17:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A0D515A8; Wed, 6 Jul 2016 05:17:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u665HuZN040905; Wed, 6 Jul 2016 05:17:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u665HuQx040904; Wed, 6 Jul 2016 05:17:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607060517.u665HuQx040904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 05:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302369 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:17:57 -0000 Author: ngie Date: Wed Jul 6 05:17:56 2016 New Revision: 302369 URL: https://svnweb.freebsd.org/changeset/base/302369 Log: Fix gcc warning Remove -Wunused-but-set-variable (`mopt`). Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week X-MFC with: r302332 Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/usb_mouse.c Modified: head/usr.sbin/bhyve/usb_mouse.c ============================================================================== --- head/usr.sbin/bhyve/usb_mouse.c Wed Jul 6 05:17:07 2016 (r302368) +++ head/usr.sbin/bhyve/usb_mouse.c Wed Jul 6 05:17:56 2016 (r302369) @@ -297,9 +297,6 @@ static void * umouse_init(struct usb_hci *hci, char *opt) { struct umouse_softc *sc; - char *mopt; - - mopt = opt; sc = calloc(1, sizeof(struct umouse_softc)); sc->hci = hci; From owner-svn-src-all@freebsd.org Wed Jul 6 05:41:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 498A7B747CB for ; Wed, 6 Jul 2016 05:41:48 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (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 0A20F177D for ; Wed, 6 Jul 2016 05:41:48 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22d.google.com with SMTP id v77so79749422ywg.0 for ; Tue, 05 Jul 2016 22:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ENTLfcQtn61+Txmj/v/DxuQa2kbG2NSAQSTpBg2HkDk=; b=ZbhvaUGOBs5e//PL7W6HN0cO+clz/22YaNka8Pb2gdlYKbNjvvXgkHNT4W1XzwxvSO kgktXD0d649nB7jHfNSslvxzFiKUErWKMtxRAU7xn1Xs0qLMqus82xHgKkNRu0Nsq0FD 36Hhixghu4pVM1hZddopRMKvPI0qdcvEzR3ebLVvZ/lk9ZR8lc53TiEwTIpska6ZJEFh gxoW4WuF1dxUJSUT3XtUErsGQ1j/L5yHSvzI+spk8T4NYnj3wBSc13ktvd0b2pqBuRYA HzUY8Kv6M0+p279g8HlwKuy67Oq1v5n3EvAABy7OI7HkHaGDzuh9kjRGi3aO9p1C9P73 Cb6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ENTLfcQtn61+Txmj/v/DxuQa2kbG2NSAQSTpBg2HkDk=; b=BgwL7H5eiBf+ABIM1IsutSFpy2fHXFaQFg/PtRiCzgDXPmb0iQ98fY8ZYRoY7WiHGS NYxF/AOHi6RMwtwPGld/rtWYqjho9gePdOF4JocfwMtMZ0rPhhUcvoxTz/dNzhxanFr7 Ty2K2ewkydRyHWcT/dofCC2wo8acRTlExHXsTVX8xr/44Hr7Iz9GpZxvWhHgeAWw1xpw Kby2/Az7HTprAA2gz+j/M6JcfaKmLJSnrRVRm1vFJQUei/a5rrBWhiPFe/19ETV/7wrZ nRedSTubDB3JmTxw18q9uQzrHpi54XDrfuUI58x50DhIEVRGjfqvJeryZZ1j99y5tl3s URuw== X-Gm-Message-State: ALyK8tI/JG45nZkK1j9ocjmagWIjmquIgrRaL9sVOA5O62iWy2Tn+8kp6PiaJDyDEK6vOzVrOrTke8jsvrm9xw== X-Received: by 10.129.90.7 with SMTP id o7mr14275040ywb.313.1467783707280; Tue, 05 Jul 2016 22:41:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.128.69 with HTTP; Tue, 5 Jul 2016 22:41:46 -0700 (PDT) In-Reply-To: <201607060502.u6652xEK036953@repo.freebsd.org> References: <201607060502.u6652xEK036953@repo.freebsd.org> From: Ed Schouten Date: Wed, 6 Jul 2016 07:41:46 +0200 Message-ID: Subject: Re: svn commit: r302364 - head/usr.sbin/bhyve To: Garrett Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 05:41:48 -0000 2016-07-06 7:02 GMT+02:00 Garrett Cooper : > Add `WRAPPED_CTASSERT` macro by annotating CTASSERTs with __unused > to deal with -Wunused-local-typedefs warnings from gcc 4.8+. > All other compilers (clang, etc) use CTASSERT as-is. A more generic > solution for this issue will be proposed after ^/stable/11 is forked. This problem shouldn't exist when using C11's _Static_assert(), right? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Wed Jul 6 10:29:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 026FBB74E09; Wed, 6 Jul 2016 10:29:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C75971CEE; Wed, 6 Jul 2016 10:29:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66ATU3D056575; Wed, 6 Jul 2016 10:29:30 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66ATUh9056574; Wed, 6 Jul 2016 10:29:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201607061029.u66ATUh9056574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 6 Jul 2016 10:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302370 - head/sys/contrib/ipfilter/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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 10:29:31 -0000 Author: bz Date: Wed Jul 6 10:29:29 2016 New Revision: 302370 URL: https://svnweb.freebsd.org/changeset/base/302370 Log: Only set the ipfilter running state to 'not running' if we are doing the teardown. ipf_destroy_all() may free ipfmain in case of ipf_dynamic_softc being true, thus we are avoiding a possible memory modified after free as well. Reported by: Coverity Coverity CID: 1357320 Approved by: re (hrs) MFC after: 10 days Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Jul 6 05:17:56 2016 (r302369) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Jul 6 10:29:29 2016 (r302370) @@ -291,13 +291,14 @@ vnet_ipf_uninit(void) return; if (V_ipfmain.ipf_running >= 0) { + if (ipfdetach(&V_ipfmain) != 0) return; + V_ipfmain.ipf_running = -2; + ipf_destroy_all(&V_ipfmain); } - - V_ipfmain.ipf_running = -2; } VNET_SYSUNINIT(vnet_ipf_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD, vnet_ipf_uninit, NULL); From owner-svn-src-all@freebsd.org Wed Jul 6 10:57:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF95AB744C8; Wed, 6 Jul 2016 10:57:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE8B01A6E; Wed, 6 Jul 2016 10:57:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66Av4O3067727; Wed, 6 Jul 2016 10:57:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66Av44H067726; Wed, 6 Jul 2016 10:57:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201607061057.u66Av44H067726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 6 Jul 2016 10:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302371 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 10:57:06 -0000 Author: hselasky Date: Wed Jul 6 10:57:04 2016 New Revision: 302371 URL: https://svnweb.freebsd.org/changeset/base/302371 Log: Fix regression issue with XHCI on 32-bit ARMv7 Armada-38x. Make sure "struct xhci_dev_ctx_addr" fits into a single 4K page until further. Approved by: re (hrs) MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Wed Jul 6 10:29:29 2016 (r302370) +++ head/sys/dev/usb/controller/xhci.h Wed Jul 6 10:57:04 2016 (r302371) @@ -30,7 +30,7 @@ #define XHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) #define XHCI_MAX_ENDPOINTS 32 /* hardcoded - do not change */ -#define XHCI_MAX_SCRATCHPADS 1024 +#define XHCI_MAX_SCRATCHPADS 256 /* theoretical max is 1023 */ #define XHCI_MAX_EVENTS (16 * 13) #define XHCI_MAX_COMMANDS (16 * 1) #define XHCI_MAX_RSEG 1 From owner-svn-src-all@freebsd.org Wed Jul 6 14:09:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24DFEB75CCB; Wed, 6 Jul 2016 14:09:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E676C1D60; Wed, 6 Jul 2016 14:09:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66E9pln037952; Wed, 6 Jul 2016 14:09:51 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66E9nfV037939; Wed, 6 Jul 2016 14:09:49 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201607061409.u66E9nfV037939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 6 Jul 2016 14:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302372 - in head/sys: amd64/include cddl/compat/opensolaris/sys dev/cpuctl i386/include kern net netinet powerpc/include powerpc/powerpc 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 14:09:52 -0000 Author: nwhitehorn Date: Wed Jul 6 14:09:49 2016 New Revision: 302372 URL: https://svnweb.freebsd.org/changeset/base/302372 Log: Replace a number of conflations of mp_ncpus and mp_maxid with either mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of places in the kernel that assumed CPU IDs are dense in [0, mp_ncpus) and would try, for example, to run tasks on CPUs that did not exist or to allocate too few buffers on systems with sparse CPU IDs in which there are holes in the range and mp_maxid > mp_ncpus. Such circumstances generally occur on systems with SMT, but on which SMT is disabled. This patch restores system operation at least on POWER8 systems configured in this way. There are a number of other places in the kernel with potential problems in these situations, but where sparse CPU IDs are not currently known to occur, mostly in the ARM machine-dependent code. These will be fixed in a follow-up commit after the stable/11 branch. PR: kern/210106 Reviewed by: jhb Approved by: re (glebius) Modified: head/sys/amd64/include/counter.h head/sys/cddl/compat/opensolaris/sys/proc.h head/sys/dev/cpuctl/cpuctl.c head/sys/i386/include/counter.h head/sys/kern/subr_pcpu.c head/sys/kern/subr_taskqueue.c head/sys/net/flowtable.c head/sys/net/iflib.c head/sys/netinet/ip_id.c head/sys/powerpc/include/counter.h head/sys/powerpc/powerpc/mp_machdep.c head/sys/vm/uma.h head/sys/vm/uma_core.c Modified: head/sys/amd64/include/counter.h ============================================================================== --- head/sys/amd64/include/counter.h Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/amd64/include/counter.h Wed Jul 6 14:09:49 2016 (r302372) @@ -51,7 +51,7 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) r += counter_u64_read_one((uint64_t *)p, i); return (r); Modified: head/sys/cddl/compat/opensolaris/sys/proc.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/proc.h Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/cddl/compat/opensolaris/sys/proc.h Wed Jul 6 14:09:49 2016 (r302372) @@ -45,8 +45,8 @@ #define CPU curcpu #define minclsyspri PRIBIO #define maxclsyspri PVM -#define max_ncpus mp_ncpus -#define boot_max_ncpus mp_ncpus +#define max_ncpus (mp_maxid + 1) +#define boot_max_ncpus (mp_maxid + 1) #define TS_RUN 0 Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/dev/cpuctl/cpuctl.c Wed Jul 6 14:09:49 2016 (r302372) @@ -120,7 +120,7 @@ static void set_cpu(int cpu, struct thread *td) { - KASSERT(cpu >= 0 && cpu < mp_ncpus && cpu_enabled(cpu), + KASSERT(cpu >= 0 && cpu <= mp_maxid && cpu_enabled(cpu), ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); thread_lock(td); sched_bind(td, cpu); @@ -133,7 +133,7 @@ static void restore_cpu(int oldcpu, int is_bound, struct thread *td) { - KASSERT(oldcpu >= 0 && oldcpu < mp_ncpus && cpu_enabled(oldcpu), + KASSERT(oldcpu >= 0 && oldcpu <= mp_maxid && cpu_enabled(oldcpu), ("[cpuctl,%d]: bad cpu number %d", __LINE__, oldcpu)); thread_lock(td); if (is_bound == 0) @@ -150,7 +150,7 @@ cpuctl_ioctl(struct cdev *dev, u_long cm int ret; int cpu = dev2unit(dev); - if (cpu >= mp_ncpus || !cpu_enabled(cpu)) { + if (cpu > mp_maxid || !cpu_enabled(cpu)) { DPRINTF("[cpuctl,%d]: bad cpu number %d\n", __LINE__, cpu); return (ENXIO); } @@ -201,7 +201,7 @@ cpuctl_do_cpuid_count(int cpu, cpuctl_cp int is_bound = 0; int oldcpu; - KASSERT(cpu >= 0 && cpu < mp_ncpus, + KASSERT(cpu >= 0 && cpu <= mp_maxid, ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); /* Explicitly clear cpuid data to avoid returning stale info. */ @@ -245,7 +245,7 @@ cpuctl_do_msr(int cpu, cpuctl_msr_args_t int oldcpu; int ret; - KASSERT(cpu >= 0 && cpu < mp_ncpus, + KASSERT(cpu >= 0 && cpu <= mp_maxid, ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); /* @@ -296,7 +296,7 @@ cpuctl_do_update(int cpu, cpuctl_update_ char vendor[13]; int ret; - KASSERT(cpu >= 0 && cpu < mp_ncpus, + KASSERT(cpu >= 0 && cpu <= mp_maxid, ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); DPRINTF("[cpuctl,%d]: XXX %d", __LINE__, cpu); @@ -512,7 +512,7 @@ cpuctl_open(struct cdev *dev, int flags, int cpu; cpu = dev2unit(dev); - if (cpu >= mp_ncpus || !cpu_enabled(cpu)) { + if (cpu > mp_maxid || !cpu_enabled(cpu)) { DPRINTF("[cpuctl,%d]: incorrect cpu number %d\n", __LINE__, cpu); return (ENXIO); @@ -531,15 +531,15 @@ cpuctl_modevent(module_t mod __unused, i case MOD_LOAD: if (bootverbose) printf("cpuctl: access to MSR registers/cpuid info.\n"); - cpuctl_devs = malloc(sizeof(*cpuctl_devs) * mp_ncpus, M_CPUCTL, + cpuctl_devs = malloc(sizeof(*cpuctl_devs) * (mp_maxid + 1), M_CPUCTL, M_WAITOK | M_ZERO); - for (cpu = 0; cpu < mp_ncpus; cpu++) + CPU_FOREACH(cpu) if (cpu_enabled(cpu)) cpuctl_devs[cpu] = make_dev(&cpuctl_cdevsw, cpu, UID_ROOT, GID_KMEM, 0640, "cpuctl%d", cpu); break; case MOD_UNLOAD: - for (cpu = 0; cpu < mp_ncpus; cpu++) { + CPU_FOREACH(cpu) { if (cpuctl_devs[cpu] != NULL) destroy_dev(cpuctl_devs[cpu]); } Modified: head/sys/i386/include/counter.h ============================================================================== --- head/sys/i386/include/counter.h Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/i386/include/counter.h Wed Jul 6 14:09:49 2016 (r302372) @@ -98,13 +98,13 @@ counter_u64_fetch_inline(uint64_t *p) * critical section as well. */ critical_enter(); - for (i = 0; i < mp_ncpus; i++) { + CPU_FOREACH(i) { res += *(uint64_t *)((char *)p + sizeof(struct pcpu) * i); } critical_exit(); } else { - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) res += counter_u64_read_one_8b((uint64_t *)((char *)p + sizeof(struct pcpu) * i)); } @@ -144,7 +144,7 @@ counter_u64_zero_inline(counter_u64_t c) if ((cpu_feature & CPUID_CX8) == 0) { critical_enter(); - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) *(uint64_t *)((char *)c + sizeof(struct pcpu) * i) = 0; critical_exit(); } else { Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/kern/subr_pcpu.c Wed Jul 6 14:09:49 2016 (r302372) @@ -248,7 +248,7 @@ dpcpu_copy(void *s, int size) uintptr_t dpcpu; int i; - for (i = 0; i < mp_ncpus; ++i) { + CPU_FOREACH(i) { dpcpu = dpcpu_off[i]; if (dpcpu == 0) continue; @@ -289,7 +289,7 @@ sysctl_dpcpu_quad(SYSCTL_HANDLER_ARGS) int i; count = 0; - for (i = 0; i < mp_ncpus; ++i) { + CPU_FOREACH(i) { dpcpu = dpcpu_off[i]; if (dpcpu == 0) continue; @@ -306,7 +306,7 @@ sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS) int i; count = 0; - for (i = 0; i < mp_ncpus; ++i) { + CPU_FOREACH(i) { dpcpu = dpcpu_off[i]; if (dpcpu == 0) continue; @@ -323,7 +323,7 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS) int i; count = 0; - for (i = 0; i < mp_ncpus; ++i) { + CPU_FOREACH(i) { dpcpu = dpcpu_off[i]; if (dpcpu == 0) continue; Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/kern/subr_taskqueue.c Wed Jul 6 14:09:49 2016 (r302372) @@ -832,6 +832,7 @@ static void taskqgroup_cpu_create(struct taskqgroup *qgroup, int idx) { struct taskqgroup_cpu *qcpu; + int i, j; qcpu = &qgroup->tqg_queue[idx]; LIST_INIT(&qcpu->tgc_tasks); @@ -839,7 +840,15 @@ taskqgroup_cpu_create(struct taskqgroup taskqueue_thread_enqueue, &qcpu->tgc_taskq); taskqueue_start_threads(&qcpu->tgc_taskq, 1, PI_SOFT, "%s_%d", qgroup->tqg_name, idx); - qcpu->tgc_cpu = idx * qgroup->tqg_stride; + + for (i = CPU_FIRST(), j = 0; j < idx * qgroup->tqg_stride; + j++, i = CPU_NEXT(i)) { + /* + * Wait: evaluate the idx * qgroup->tqg_stride'th CPU, + * potentially wrapping the actual count + */ + } + qcpu->tgc_cpu = i; } static void @@ -1017,13 +1026,14 @@ _taskqgroup_adjust(struct taskqgroup *qg LIST_HEAD(, grouptask) gtask_head = LIST_HEAD_INITIALIZER(NULL); cpuset_t mask; struct grouptask *gtask; - int i, old_cnt, qid; + int i, k, old_cnt, qid, cpu; mtx_assert(&qgroup->tqg_lock, MA_OWNED); if (cnt < 1 || cnt * stride > mp_ncpus || !smp_started) { - printf("taskqgroup_adjust failed cnt: %d stride: %d mp_ncpus: %d smp_started: %d\n", - cnt, stride, mp_ncpus, smp_started); + printf("taskqgroup_adjust failed cnt: %d stride: %d " + "mp_ncpus: %d smp_started: %d\n", cnt, stride, mp_ncpus, + smp_started); return (EINVAL); } if (qgroup->tqg_adjusting) { @@ -1081,8 +1091,11 @@ _taskqgroup_adjust(struct taskqgroup *qg /* * Set new CPU and IRQ affinity */ + cpu = CPU_FIRST(); for (i = 0; i < cnt; i++) { - qgroup->tqg_queue[i].tgc_cpu = i * qgroup->tqg_stride; + qgroup->tqg_queue[i].tgc_cpu = cpu; + for (k = 0; k < qgroup->tqg_stride; k++) + cpu = CPU_NEXT(cpu); CPU_ZERO(&mask); CPU_SET(qgroup->tqg_queue[i].tgc_cpu, &mask); LIST_FOREACH(gtask, &qgroup->tqg_queue[i].tgc_tasks, gt_list) { Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/net/flowtable.c Wed Jul 6 14:09:49 2016 (r302372) @@ -746,7 +746,7 @@ flowtable_alloc(struct flowtable *ft) ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | M_ZERO); ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK); - for (int i = 0; i < mp_ncpus; i++) { + CPU_FOREACH(i) { bitstr_t **b; b = zpcpu_get_cpu(ft->ft_masks, i); Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/net/iflib.c Wed Jul 6 14:09:49 2016 (r302372) @@ -3848,7 +3848,7 @@ iflib_queues_alloc(if_ctx_t ctx) iflib_txq_t txq; iflib_rxq_t rxq; iflib_fl_t fl = NULL; - int i, j, err, txconf, rxconf, fl_ifdi_offset; + int i, j, cpu, err, txconf, rxconf, fl_ifdi_offset; iflib_dma_info_t ifdip; uint32_t *rxqsizes = sctx->isc_rxqsizes; uint32_t *txqsizes = sctx->isc_txqsizes; @@ -3897,7 +3897,7 @@ iflib_queues_alloc(if_ctx_t ctx) /* * XXX handle allocation failure */ - for (txconf = i = 0; i < ntxqsets; i++, txconf++, txq++) { + for (txconf = i = 0, cpu = CPU_FIRST(); i < ntxqsets; i++, txconf++, txq++, cpu = CPU_NEXT(cpu)) { /* Set up some basics */ if ((ifdip = malloc(sizeof(struct iflib_dma_info) * ntxqs, M_IFLIB, M_WAITOK|M_ZERO)) == NULL) { @@ -3917,8 +3917,8 @@ iflib_queues_alloc(if_ctx_t ctx) txq->ift_ctx = ctx; txq->ift_id = i; /* XXX fix this */ - txq->ift_timer.c_cpu = i % mp_ncpus; - txq->ift_db_check.c_cpu = i % mp_ncpus; + txq->ift_timer.c_cpu = cpu; + txq->ift_db_check.c_cpu = cpu; txq->ift_nbr = nbuf_rings; if (iflib_txsd_alloc(txq)) { Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/netinet/ip_id.c Wed Jul 6 14:09:49 2016 (r302372) @@ -275,10 +275,12 @@ ip_fillid(struct ip *ip) static void ipid_sysinit(void) { + int i; mtx_init(&V_ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); V_ip_id = counter_u64_alloc(M_WAITOK); - for (int i = 0; i < mp_ncpus; i++) + + CPU_FOREACH(i) arc4rand(zpcpu_get_cpu(V_ip_id, i), sizeof(uint64_t), 0); } VNET_SYSINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysinit, NULL); Modified: head/sys/powerpc/include/counter.h ============================================================================== --- head/sys/powerpc/include/counter.h Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/powerpc/include/counter.h Wed Jul 6 14:09:49 2016 (r302372) @@ -54,7 +54,7 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) r += counter_u64_read_one((uint64_t *)p, i); return (r); Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/powerpc/powerpc/mp_machdep.c Wed Jul 6 14:09:49 2016 (r302372) @@ -113,20 +113,16 @@ cpu_mp_setmaxid(void) int error; mp_ncpus = 0; + mp_maxid = 0; error = platform_smp_first_cpu(&cpuref); while (!error) { mp_ncpus++; + mp_maxid = max(cpuref.cr_cpuid, mp_maxid); error = platform_smp_next_cpu(&cpuref); } /* Sanity. */ if (mp_ncpus == 0) mp_ncpus = 1; - - /* - * Set the largest cpuid we're going to use. This is necessary - * for VM initialization. - */ - mp_maxid = min(mp_ncpus, MAXCPU) - 1; } int Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/vm/uma.h Wed Jul 6 14:09:49 2016 (r302372) @@ -276,7 +276,7 @@ uma_zone_t uma_zcache_create(char *name, * mini-dumps. */ #define UMA_ZONE_PCPU 0x8000 /* - * Allocates mp_ncpus slabs sized to + * Allocates mp_maxid + 1 slabs sized to * sizeof(struct pcpu). */ Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Jul 6 10:57:04 2016 (r302371) +++ head/sys/vm/uma_core.c Wed Jul 6 14:09:49 2016 (r302372) @@ -1227,7 +1227,7 @@ keg_small_init(uma_keg_t keg) u_int shsize; if (keg->uk_flags & UMA_ZONE_PCPU) { - u_int ncpus = mp_ncpus ? mp_ncpus : MAXCPU; + u_int ncpus = (mp_maxid + 1) ? (mp_maxid + 1) : MAXCPU; keg->uk_slabsize = sizeof(struct pcpu); keg->uk_ppera = howmany(ncpus * sizeof(struct pcpu), @@ -3265,9 +3265,10 @@ uma_large_free(uma_slab_t slab) static void uma_zero_item(void *item, uma_zone_t zone) { + int i; if (zone->uz_flags & UMA_ZONE_PCPU) { - for (int i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) bzero(zpcpu_get_cpu(item, i), zone->uz_size); } else bzero(item, zone->uz_size); From owner-svn-src-all@freebsd.org Wed Jul 6 16:02:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71E88B7594D; Wed, 6 Jul 2016 16:02:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD281F51; Wed, 6 Jul 2016 16:02:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66G2GB4080767; Wed, 6 Jul 2016 16:02:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66G2GXq080763; Wed, 6 Jul 2016 16:02:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607061602.u66G2GXq080763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jul 2016 16:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302373 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 16:02:17 -0000 Author: ngie Date: Wed Jul 6 16:02:15 2016 New Revision: 302373 URL: https://svnweb.freebsd.org/changeset/base/302373 Log: Fix CTASSERT issue in a more clean way - Replace all CTASSERT macro instances with static_assert's. - Remove the WRAPPED_CTASSERT macro; it's now an unnecessary obfuscation. - Localize all static_assert's to the structures being tested. - Sort some headers per-style(9). Approved by: re (hrs) Differential Revision: https://reviews.freebsd.org/D7130 MFC after: 1 week X-MFC with: r302364 Reviewed by: ed, grehan (maintainer) Submitted by: ed Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bhyve/bhyverun.h head/usr.sbin/bhyve/pci_emul.c head/usr.sbin/bhyve/pci_emul.h head/usr.sbin/bhyve/task_switch.c Modified: head/usr.sbin/bhyve/bhyverun.h ============================================================================== --- head/usr.sbin/bhyve/bhyverun.h Wed Jul 6 14:09:49 2016 (r302372) +++ head/usr.sbin/bhyve/bhyverun.h Wed Jul 6 16:02:15 2016 (r302373) @@ -29,12 +29,6 @@ #ifndef _FBSDRUN_H_ #define _FBSDRUN_H_ -#ifndef CTASSERT /* Allow lint to override */ -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif - #define VMEXIT_CONTINUE (0) #define VMEXIT_ABORT (-1) Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Wed Jul 6 14:09:49 2016 (r302372) +++ head/usr.sbin/bhyve/pci_emul.c Wed Jul 6 16:02:15 2016 (r302373) @@ -31,9 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include #include #include #include @@ -755,16 +755,6 @@ pci_emul_init(struct vmctx *ctx, struct return (err); } -#ifdef __GNU_C__ -#define WRAPPED_CTASSERT(x) CTASSERT(x) __unused -#else -#define WRAPPED_CTASSERT(x) CTASSERT(x) -#endif - -WRAPPED_CTASSERT(sizeof(struct msicap) == 14); -WRAPPED_CTASSERT(sizeof(struct msixcap) == 12); -WRAPPED_CTASSERT(sizeof(struct pciecap) == 60); - void pci_populate_msicap(struct msicap *msicap, int msgnum, int nextptr) { Modified: head/usr.sbin/bhyve/pci_emul.h ============================================================================== --- head/usr.sbin/bhyve/pci_emul.h Wed Jul 6 14:09:49 2016 (r302372) +++ head/usr.sbin/bhyve/pci_emul.h Wed Jul 6 16:02:15 2016 (r302373) @@ -160,6 +160,7 @@ struct msicap { uint32_t addrhi; uint16_t msgdata; } __packed; +static_assert(sizeof(struct msicap) == 14, "compile-time assertion failed"); struct msixcap { uint8_t capid; @@ -168,6 +169,7 @@ struct msixcap { uint32_t table_info; /* bar index and offset within it */ uint32_t pba_info; /* bar index and offset within it */ } __packed; +static_assert(sizeof(struct msixcap) == 12, "compile-time assertion failed"); struct pciecap { uint8_t capid; @@ -202,6 +204,7 @@ struct pciecap { uint16_t slot_control2; uint16_t slot_status2; } __packed; +static_assert(sizeof(struct pciecap) == 60, "compile-time assertion failed"); typedef void (*pci_lintr_cb)(int b, int s, int pin, int pirq_pin, int ioapic_irq, void *arg); Modified: head/usr.sbin/bhyve/task_switch.c ============================================================================== --- head/usr.sbin/bhyve/task_switch.c Wed Jul 6 14:09:49 2016 (r302372) +++ head/usr.sbin/bhyve/task_switch.c Wed Jul 6 16:02:15 2016 (r302373) @@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include -#include -#include #include @@ -91,7 +91,7 @@ struct tss32 { uint16_t tss_trap; uint16_t tss_iomap; }; -CTASSERT(sizeof(struct tss32) == 104); +static_assert(sizeof(struct tss32) == 104, "compile-time assertion failed"); #define SEL_START(sel) (((sel) & ~0x7)) #define SEL_LIMIT(sel) (((sel) | 0x7)) From owner-svn-src-all@freebsd.org Wed Jul 6 16:17:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CD0EB75C7F; Wed, 6 Jul 2016 16:17:15 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE6A194D; Wed, 6 Jul 2016 16:17:15 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66GHErQ086717; Wed, 6 Jul 2016 16:17:14 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66GHEsY086712; Wed, 6 Jul 2016 16:17:14 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201607061617.u66GHEsY086712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Wed, 6 Jul 2016 16:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302374 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 16:17:15 -0000 Author: jtl Date: Wed Jul 6 16:17:13 2016 New Revision: 302374 URL: https://svnweb.freebsd.org/changeset/base/302374 Log: The TCPPCAP debugging feature caches recently-used mbufs for use in debugging TCP connections. This commit provides a mechanism to free those mbufs when the system is under memory pressure. Because this will result in lost debugging information, the behavior is controllable by a sysctl. The default setting is to free the mbufs. Reviewed by: gnn Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D6931 Input from: novice_techie.com Modified: head/sys/netinet/tcp_pcap.c head/sys/netinet/tcp_pcap.h head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_pcap.c ============================================================================== --- head/sys/netinet/tcp_pcap.c Wed Jul 6 16:02:15 2016 (r302373) +++ head/sys/netinet/tcp_pcap.c Wed Jul 6 16:17:13 2016 (r302374) @@ -42,9 +42,13 @@ #define M_LEADINGSPACE_NOWRITE(m) \ ((m)->m_data - M_START(m)) +int tcp_pcap_aggressive_free = 1; static int tcp_pcap_clusters_referenced_cur = 0; static int tcp_pcap_clusters_referenced_max = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_aggressive_free, + CTLFLAG_RW, &tcp_pcap_aggressive_free, 0, + "Free saved packets when the memory system comes under pressure"); SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_clusters_referenced_cur, CTLFLAG_RD, &tcp_pcap_clusters_referenced_cur, 0, "Number of clusters currently referenced on TCP PCAP queues"); Modified: head/sys/netinet/tcp_pcap.h ============================================================================== --- head/sys/netinet/tcp_pcap.h Wed Jul 6 16:02:15 2016 (r302373) +++ head/sys/netinet/tcp_pcap.h Wed Jul 6 16:17:13 2016 (r302374) @@ -36,4 +36,6 @@ void tcp_pcap_tcpcb_init(struct tcpcb *t void tcp_pcap_set_sock_max(struct mbufq *queue, int newval); int tcp_pcap_get_sock_max(struct mbufq *queue); +extern int tcp_pcap_aggressive_free; + #endif /* _NETINET_TCP_PCAP_H_ */ Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Jul 6 16:02:15 2016 (r302373) +++ head/sys/netinet/tcp_subr.c Wed Jul 6 16:17:13 2016 (r302374) @@ -1605,6 +1605,13 @@ tcp_drain(void) if ((tcpb = intotcpcb(inpb)) != NULL) { tcp_reass_flush(tcpb); tcp_clean_sackreport(tcpb); +#ifdef TCPPCAP + if (tcp_pcap_aggressive_free) { + /* Free the TCP PCAP queues. */ + tcp_pcap_drain(&(tcpb->t_inpkts)); + tcp_pcap_drain(&(tcpb->t_outpkts)); + } +#endif } INP_WUNLOCK(inpb); } From owner-svn-src-all@freebsd.org Wed Jul 6 16:20:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F882B75D03; Wed, 6 Jul 2016 16:20:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F6551B09; Wed, 6 Jul 2016 16:20:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66GKAHG086881; Wed, 6 Jul 2016 16:20:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66GKAl2086880; Wed, 6 Jul 2016 16:20:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607061620.u66GKAl2086880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 6 Jul 2016 16:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302375 - in head/sys: arm64/arm64 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 16:20:11 -0000 Author: andrew Date: Wed Jul 6 16:20:10 2016 New Revision: 302375 URL: https://svnweb.freebsd.org/changeset/base/302375 Log: Remove the old pre-INTRNG arm64 interrupt framework. GENERIC was switched to INTRNG in r301565 with the old code no longer being built by default with no reports of issues on any supported hardware. Approved by: re (gjb) Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Deleted: head/sys/arm64/arm64/gic.c head/sys/arm64/arm64/gic_acpi.c head/sys/arm64/arm64/gic_fdt.c head/sys/arm64/arm64/gic_v3_its.c head/sys/arm64/arm64/intr_machdep.c head/sys/arm64/arm64/pic_if.m Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Jul 6 16:17:13 2016 (r302374) +++ head/sys/conf/files.arm64 Wed Jul 6 16:20:10 2016 (r302375) @@ -25,15 +25,10 @@ arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard -arm64/arm64/gic.c optional !intrng arm64/arm64/gicv3_its.c optional intrng -arm64/arm64/gic_acpi.c optional !intrng acpi -arm64/arm64/gic_fdt.c optional !intrng fdt arm64/arm64/gic_v3.c standard arm64/arm64/gic_v3_fdt.c optional fdt -arm64/arm64/gic_v3_its.c optional !intrng arm64/arm64/identcpu.c standard -arm64/arm64/intr_machdep.c optional !intrng arm64/arm64/in_cksum.c optional inet | inet6 arm64/arm64/locore.S standard no-obj arm64/arm64/machdep.c standard @@ -42,7 +37,6 @@ arm64/arm64/minidump_machdep.c standard arm64/arm64/mp_machdep.c optional smp arm64/arm64/nexus.c standard arm64/arm64/ofw_machdep.c optional fdt -arm64/arm64/pic_if.m optional !intrng arm64/arm64/pmap.c standard arm64/arm64/stack_machdep.c optional ddb | stack arm64/arm64/support.S standard From owner-svn-src-all@freebsd.org Wed Jul 6 16:58:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3425B753B3; Wed, 6 Jul 2016 16:58:04 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 755EF1DBE; Wed, 6 Jul 2016 16:58:04 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-141.nat-2.net.cam.ac.uk [131.111.5.141]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 5938DD78E6; Wed, 6 Jul 2016 16:57:33 +0000 (UTC) Date: Wed, 6 Jul 2016 17:57:32 +0100 From: Andrew Turner To: Nathan Whitehorn Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302372 - in head/sys: amd64/include cddl/compat/opensolaris/sys dev/cpuctl i386/include kern net netinet powerpc/include powerpc/powerpc vm Message-ID: <20160706175732.4a857719@zapp> In-Reply-To: <201607061409.u66E9nfV037939@repo.freebsd.org> References: <201607061409.u66E9nfV037939@repo.freebsd.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 16:58:04 -0000 On Wed, 6 Jul 2016 14:09:49 +0000 (UTC) Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Wed Jul 6 14:09:49 2016 > New Revision: 302372 > URL: https://svnweb.freebsd.org/changeset/base/302372 > > Log: > Replace a number of conflations of mp_ncpus and mp_maxid with either > mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of > places in the kernel that assumed CPU IDs are dense in [0, mp_ncpus) > and would try, for example, to run tasks on CPUs that did not exist > or to allocate too few buffers on systems with sparse CPU IDs in > which there are holes in the range and mp_maxid > mp_ncpus. Such > circumstances generally occur on systems with SMT, but on which SMT > is disabled. This patch restores system operation at least on POWER8 > systems configured in this way. > There are a number of other places in the kernel with potential > problems in these situations, but where sparse CPU IDs are not > currently known to occur, mostly in the ARM machine-dependent code. > These will be fixed in a follow-up commit after the stable/11 branch. > ... > Modified: head/sys/net/flowtable.c > ============================================================================== > --- head/sys/net/flowtable.c Wed Jul 6 10:57:04 2016 > (r302371) +++ head/sys/net/flowtable.c Wed Jul 6 14:09:49 > 2016 (r302372) @@ -746,7 +746,7 @@ flowtable_alloc(struct > flowtable *ft) ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | > M_ZERO); > ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK); > - for (int i = 0; i < mp_ncpus; i++) { > + CPU_FOREACH(i) { This is broken, it removed the declaration of i. Andrew From owner-svn-src-all@freebsd.org Wed Jul 6 17:00:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9182BB75665; Wed, 6 Jul 2016 17:00:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6585E12F4; Wed, 6 Jul 2016 17:00:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (c-50-139-166-237.hsd1.ma.comcast.net [50.139.166.237]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u66H08mB012518 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 6 Jul 2016 10:00:09 -0700 Subject: Re: svn commit: r302372 - in head/sys: amd64/include cddl/compat/opensolaris/sys dev/cpuctl i386/include kern net netinet powerpc/include powerpc/powerpc vm To: Andrew Turner References: <201607061409.u66E9nfV037939@repo.freebsd.org> <20160706175732.4a857719@zapp> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Nathan Whitehorn Message-ID: Date: Wed, 6 Jul 2016 10:00:08 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160706175732.4a857719@zapp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVZLfxDDxBNPFwJ7si41Ir434oTk1PFJHgFkHtKJl0wnPhAV/tNnw4JFLHWRNcNWI56PTlb7kvbF1udSLfVfBWlsBt6o8jNGMsw= X-Sonic-ID: C;2LdKGJtD5hGLgZNwxPCmMQ== M;pCq2GJtD5hGLgZNwxPCmMQ== 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 17:00:12 -0000 On 07/06/16 09:57, Andrew Turner wrote: > On Wed, 6 Jul 2016 14:09:49 +0000 (UTC) > Nathan Whitehorn wrote: > >> Author: nwhitehorn >> Date: Wed Jul 6 14:09:49 2016 >> New Revision: 302372 >> URL: https://svnweb.freebsd.org/changeset/base/302372 >> >> Log: >> Replace a number of conflations of mp_ncpus and mp_maxid with either >> mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of >> places in the kernel that assumed CPU IDs are dense in [0, mp_ncpus) >> and would try, for example, to run tasks on CPUs that did not exist >> or to allocate too few buffers on systems with sparse CPU IDs in >> which there are holes in the range and mp_maxid > mp_ncpus. Such >> circumstances generally occur on systems with SMT, but on which SMT >> is disabled. This patch restores system operation at least on POWER8 >> systems configured in this way. >> There are a number of other places in the kernel with potential >> problems in these situations, but where sparse CPU IDs are not >> currently known to occur, mostly in the ARM machine-dependent code. >> These will be fixed in a follow-up commit after the stable/11 branch. >> > ... >> Modified: head/sys/net/flowtable.c >> ============================================================================== >> --- head/sys/net/flowtable.c Wed Jul 6 10:57:04 2016 >> (r302371) +++ head/sys/net/flowtable.c Wed Jul 6 14:09:49 >> 2016 (r302372) @@ -746,7 +746,7 @@ flowtable_alloc(struct >> flowtable *ft) ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | >> M_ZERO); >> ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK); >> - for (int i = 0; i < mp_ncpus; i++) { >> + CPU_FOREACH(i) { > This is broken, it removed the declaration of i. > > Andrew > You are right. Somehow my build tests succeeded anyway. Will fix quickly. -Nathan From owner-svn-src-all@freebsd.org Wed Jul 6 17:05:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3771B7585A; Wed, 6 Jul 2016 17:05:29 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id AC61E1763; Wed, 6 Jul 2016 17:05:29 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-141.nat-2.net.cam.ac.uk [131.111.5.141]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 41CB8D78E6; Wed, 6 Jul 2016 17:04:59 +0000 (UTC) Date: Wed, 6 Jul 2016 18:04:58 +0100 From: Andrew Turner To: Nathan Whitehorn Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r302372 - in head/sys: amd64/include cddl/compat/opensolaris/sys dev/cpuctl i386/include kern net netinet powerpc/include powerpc/powerpc vm Message-ID: <20160706180458.370aa40a@zapp> In-Reply-To: References: <201607061409.u66E9nfV037939@repo.freebsd.org> <20160706175732.4a857719@zapp> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 17:05:30 -0000 On Wed, 6 Jul 2016 10:00:08 -0700 Nathan Whitehorn wrote: > On 07/06/16 09:57, Andrew Turner wrote: > > On Wed, 6 Jul 2016 14:09:49 +0000 (UTC) > > Nathan Whitehorn wrote: > > > >> Author: nwhitehorn > >> Date: Wed Jul 6 14:09:49 2016 > >> New Revision: 302372 > >> URL: https://svnweb.freebsd.org/changeset/base/302372 > >> > >> Log: > >> Replace a number of conflations of mp_ncpus and mp_maxid with > >> either mp_maxid or CPU_FOREACH() as appropriate. This fixes a > >> number of places in the kernel that assumed CPU IDs are dense in > >> [0, mp_ncpus) and would try, for example, to run tasks on CPUs > >> that did not exist or to allocate too few buffers on systems with > >> sparse CPU IDs in which there are holes in the range and mp_maxid > >> > mp_ncpus. Such circumstances generally occur on systems with > >> > SMT, but on which SMT > >> is disabled. This patch restores system operation at least on > >> POWER8 systems configured in this way. > >> There are a number of other places in the kernel with potential > >> problems in these situations, but where sparse CPU IDs are not > >> currently known to occur, mostly in the ARM machine-dependent code. > >> These will be fixed in a follow-up commit after the stable/11 > >> branch. > > ... > >> Modified: head/sys/net/flowtable.c > >> ============================================================================== > >> --- head/sys/net/flowtable.c Wed Jul 6 10:57:04 2016 > >> (r302371) +++ head/sys/net/flowtable.c Wed Jul 6 14:09:49 > >> 2016 (r302372) @@ -746,7 +746,7 @@ flowtable_alloc(struct > >> flowtable *ft) ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, > >> M_WAITOK | M_ZERO); > >> ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK); > >> - for (int i = 0; i < mp_ncpus; i++) { > >> + CPU_FOREACH(i) { > > This is broken, it removed the declaration of i. > > > > Andrew > > > > You are right. Somehow my build tests succeeded anyway. Will fix > quickly. -Nathan > It only seems to be enabled in LINT. Andrew From owner-svn-src-all@freebsd.org Wed Jul 6 17:42:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67B91B75FAD; Wed, 6 Jul 2016 17:42:11 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2805619E6; Wed, 6 Jul 2016 17:42:11 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66HgAvD019535; Wed, 6 Jul 2016 17:42:10 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66Hg9pF018824; Wed, 6 Jul 2016 17:42:09 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201607061742.u66Hg9pF018824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Wed, 6 Jul 2016 17:42:09 +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: r302376 - in stable/10: sbin/camcontrol sys/cam sys/cam/scsi 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 17:42:11 -0000 Author: truckman Date: Wed Jul 6 17:42:09 2016 New Revision: 302376 URL: https://svnweb.freebsd.org/changeset/base/302376 Log: MFC r299371 (by trasz) Add "camcontrol reprobe" subcommand, and implement it for da(4). This makes it possible to manually force updating capacity data after the disk got resized. Without it it might be neccessary to reboot before FreeBSD notices updated disk size under eg VMWare. Differential Revision: https://reviews.freebsd.org/D6108 Modified: stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c stable/10/sys/cam/cam_ccb.h stable/10/sys/cam/cam_xpt.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Wed Jul 6 16:20:10 2016 (r302375) +++ stable/10/sbin/camcontrol/camcontrol.8 Wed Jul 6 17:42:09 2016 (r302376) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2015 +.Dd April 26, 2016 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -98,6 +98,9 @@ .Op device id .Op generic args .Nm +.Ic reprobe +.Op device id +.Nm .Ic rescan .Aq all | bus Ns Op :target:lun .Nm @@ -518,6 +521,12 @@ are not specified). Print out the last logical block or the size of the device only, and omit the blocksize. .El +.Pp +Note that this command only displays the information, it does not update +the kernel data structures. +Use the +.Nm +reprobe subcommand to do that. .It Ic start Send the SCSI Start/Stop Unit (0x1B) command to the given device with the start bit set. @@ -539,6 +548,12 @@ The user may specify a scan of all busses, a single bus, or a lun. Scanning all luns on a target is not supported. +.It Ic reprobe +Tell the kernel to refresh the information about the device and +notify the upper layer, +.Xr GEOM 4 . +This includes sending the SCSI READ CAPACITY command and updating +the disk size visible to the rest of the system. .It Ic reset Tell the kernel to reset all busses in the system (with the .Ar all Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Wed Jul 6 16:20:10 2016 (r302375) +++ stable/10/sbin/camcontrol/camcontrol.c Wed Jul 6 17:42:09 2016 (r302376) @@ -100,7 +100,8 @@ typedef enum { CAM_CMD_APM = 0x00000021, CAM_CMD_AAM = 0x00000022, CAM_CMD_ATTRIB = 0x00000023, - CAM_CMD_OPCODES = 0x00000024 + CAM_CMD_OPCODES = 0x00000024, + CAM_CMD_REPROBE = 0x00000025 } cam_cmdmask; typedef enum { @@ -190,6 +191,7 @@ static struct camcontrol_opts option_tab {"eject", CAM_CMD_STARTSTOP, CAM_ARG_EJECT, NULL}, {"reportluns", CAM_CMD_REPORTLUNS, CAM_ARG_NONE, "clr:"}, {"readcapacity", CAM_CMD_READCAP, CAM_ARG_NONE, "bhHNqs"}, + {"reprobe", CAM_CMD_REPROBE, CAM_ARG_NONE, NULL}, #endif /* MINIMALISTIC */ {"rescan", CAM_CMD_RESCAN, CAM_ARG_NONE, NULL}, {"reset", CAM_CMD_RESET, CAM_ARG_NONE, NULL}, @@ -328,6 +330,7 @@ static int scsiprintopcodes(struct cam_d static int scsiopcodes(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout, int verbose); +static int scsireprobe(struct cam_device *device); #endif /* MINIMALISTIC */ #ifndef min @@ -8662,6 +8665,42 @@ bailout: #endif /* MINIMALISTIC */ +static int +scsireprobe(struct cam_device *device) +{ + union ccb *ccb; + int retval = 0; + + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("%s: error allocating ccb", __func__); + return (1); + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + ccb->ccb_h.func_code = XPT_REPROBE_LUN; + + if (cam_send_ccb(device, ccb) < 0) { + warn("error sending XPT_REPROBE_LUN CCB"); + retval = 1; + goto bailout; + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + retval = 1; + goto bailout; + } + +bailout: + cam_freeccb(ccb); + + return (retval); +} + void usage(int printlong) { @@ -8681,6 +8720,7 @@ usage(int printlong) " camcontrol stop [dev_id][generic args]\n" " camcontrol load [dev_id][generic args]\n" " camcontrol eject [dev_id][generic args]\n" +" camcontrol reprobe [dev_id][generic args]\n" #endif /* MINIMALISTIC */ " camcontrol rescan \n" " camcontrol reset \n" @@ -8753,6 +8793,7 @@ usage(int printlong) "stop send a Stop Unit command to the device\n" "load send a Start Unit command to the device with the load bit set\n" "eject send a Stop Unit command to the device with the eject bit set\n" +"reprobe update capacity information of the given device\n" "rescan rescan all busses, the given bus, or bus:target:lun\n" "reset reset all busses, the given bus, or bus:target:lun\n" "defects read the defect list of the specified device\n" @@ -9298,6 +9339,10 @@ main(int argc, char **argv) error = scsiopcodes(cam_dev, argc, argv, combinedopt, retry_count, timeout, arglist & CAM_ARG_VERBOSE); break; + case CAM_CMD_REPROBE: + error = scsireprobe(cam_dev); + break; + #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); Modified: stable/10/sys/cam/cam_ccb.h ============================================================================== --- stable/10/sys/cam/cam_ccb.h Wed Jul 6 16:20:10 2016 (r302375) +++ stable/10/sys/cam/cam_ccb.h Wed Jul 6 17:42:09 2016 (r302376) @@ -230,6 +230,8 @@ typedef enum { /* Notify Host Target driver of event */ XPT_NOTIFY_ACKNOWLEDGE = 0x37 | XPT_FC_QUEUED | XPT_FC_USER_CCB, /* Acknowledgement of event */ + XPT_REPROBE_LUN = 0x38 | XPT_FC_QUEUED | XPT_FC_USER_CCB, + /* Query device capacity and notify GEOM */ /* Vendor Unique codes: 0x80->0x8F */ XPT_VUNIQUE = 0x80 Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Wed Jul 6 16:20:10 2016 (r302375) +++ stable/10/sys/cam/cam_xpt.c Wed Jul 6 17:42:09 2016 (r302376) @@ -2991,6 +2991,11 @@ call_sim: xpt_freeze_devq(path, 1); start_ccb->ccb_h.status = CAM_REQ_CMP; break; + case XPT_REPROBE_LUN: + xpt_async(AC_INQ_CHANGED, path, NULL); + start_ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(start_ccb); + break; default: case XPT_SDEV_TYPE: case XPT_TERM_IO: Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Wed Jul 6 16:20:10 2016 (r302375) +++ stable/10/sys/cam/scsi/scsi_da.c Wed Jul 6 17:42:09 2016 (r302376) @@ -1758,6 +1758,11 @@ daasync(void *callback_arg, u_int32_t co ccbh->ccb_state |= DA_CCB_RETRY_UA; break; } + case AC_INQ_CHANGED: + softc = (struct da_softc *)periph->softc; + softc->flags &= ~DA_FLAG_PROBED; + dareprobe(periph); + break; default: break; } @@ -2239,8 +2244,8 @@ daregister(struct cam_periph *periph, vo * would be to not attach the device on failure. */ xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | - AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION, - daasync, periph, periph->path); + AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION | + AC_INQ_CHANGED, daasync, periph, periph->path); /* * Emit an attribute changed notification just in case From owner-svn-src-all@freebsd.org Wed Jul 6 17:45:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EE73B75034; Wed, 6 Jul 2016 17:45:40 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29F531BE2; Wed, 6 Jul 2016 17:45:40 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66HjdP0019749; Wed, 6 Jul 2016 17:45:39 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66Hjc5v019740; Wed, 6 Jul 2016 17:45:38 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201607061745.u66Hjc5v019740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Wed, 6 Jul 2016 17:45: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: r302377 - in stable/10: lib/libcam sbin/camcontrol sbin/iscontrol sys/cam usr.sbin/camdd usr.sbin/mptutil 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 17:45:40 -0000 Author: truckman Date: Wed Jul 6 17:45:38 2016 New Revision: 302377 URL: https://svnweb.freebsd.org/changeset/base/302377 Log: MFC r300547 Fix multiple Coverity Out-of-bounds access false postive issues in CAM The currently used idiom for clearing the part of a ccb after its header generates one or two Coverity errors for each time it is used. All instances generate an Out-of-bounds access (ARRAY_VS_SINGLETON) error because of the treatment of the header as a two element array, with a pointer to the non-existent second element being passed as the starting address to bzero(). Some instances also alsp generate Out-of-bounds access (OVERRUN) errors, probably because the space being cleared is larger than the sizeofstruct ccb_hdr). In addition, this idiom is difficult for humans to understand and it is error prone. The user has to chose the proper struct ccb_* type (which does not appear in the surrounding code) for the sizeof() in the length calculation. I found several instances where the length was incorrect, which could cause either an actual out of bounds write, or incompletely clear the ccb. A better way is to write the code to clear the ccb itself starting at sizeof(ccb_hdr) bytes from the start of the ccb, and calculate the length based on the specific type of struct ccb_* being cleared as specified by the union ccb member being used. The latter can normally be seen in the nearby code. This is friendlier for Coverity and other static analysis tools because they will see that the intent is to clear the trailing part of the ccb. Wrap all of the boilerplate code in a convenient macro that only requires a pointer to the desired union ccb member (or a pointer to the union ccb itself) as an argument. Reported by: Coverity CID: 1007578, 1008684, 1009724, 1009773, 1011304, 1011306 CID: 1011307, 1011308, 1011309, 1011310, 1011311, 1011312 CID: 1011313, 1011314, 1011315, 1011316, 1011317, 1011318 CID: 1011319, 1011320, 1011321, 1011322, 1011324, 1011325 CID: 1011326, 1011327, 1011328, 1011329, 1011330, 1011374 CID: 1011390, 1011391, 1011392, 1011393, 1011394, 1011395 CID: 1011396, 1011397, 1011398, 1011399, 1011400, 1011401 CID: 1011402, 1011403, 1011404, 1011405, 1011406, 1011408 CID: 1011409, 1011410, 1011411, 1011412, 1011413, 1011414 CID: 1017461, 1018387, 1086860, 1086874, 1194257, 1229897 CID: 1229968, 1306229, 1306234, 1331282, 1331283, 1331294 CID: 1331295, 1331535, 1331536, 1331539, 1331540, 1341623 CID: 1341624, 1341637, 1341638, 1355264, 1355324 Reviewed by: scottl, ken, delphij, imp MFH: 1 month Differential Revision: https://reviews.freebsd.org/D6496 Modified: stable/10/lib/libcam/camlib.c stable/10/sbin/camcontrol/attrib.c stable/10/sbin/camcontrol/camcontrol.c stable/10/sbin/camcontrol/fwdownload.c stable/10/sbin/camcontrol/persist.c stable/10/sbin/iscontrol/fsm.c stable/10/sys/cam/cam_ccb.h stable/10/usr.sbin/camdd/camdd.c stable/10/usr.sbin/mptutil/mpt_cam.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/camlib.c ============================================================================== --- stable/10/lib/libcam/camlib.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/lib/libcam/camlib.c Wed Jul 6 17:45:38 2016 (r302377) @@ -619,7 +619,7 @@ cam_real_open_device(const char *path, i /* * Zero the payload, the kernel does look at the flags. */ - bzero(&(&ccb.ccb_h)[1], sizeof(struct ccb_trans_settings)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb.cts); /* * Get transfer settings for this device. Modified: stable/10/sbin/camcontrol/attrib.c ============================================================================== --- stable/10/sbin/camcontrol/attrib.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/sbin/camcontrol/attrib.c Wed Jul 6 17:45:38 2016 (r302377) @@ -137,8 +137,7 @@ scsiattrib(struct cam_device *device, in goto bailout; } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); STAILQ_INIT(&write_attr_list); Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/sbin/camcontrol/camcontrol.c Wed Jul 6 17:45:38 2016 (r302377) @@ -838,8 +838,7 @@ scsiinquiry(struct cam_device *device, i } /* cam_getccb cleans up the header, caller has to zero the payload */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); inq_buf = (struct scsi_inquiry_data *)malloc( sizeof(struct scsi_inquiry_data)); @@ -954,8 +953,7 @@ scsiserial(struct cam_device *device, in } /* cam_getccb cleans up the header, caller has to zero the payload */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); serial_buf = (struct scsi_vpd_unit_serial_number *) malloc(sizeof(*serial_buf)); @@ -1047,8 +1045,7 @@ camxferrate(struct cam_device *device) return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_trans_settings) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; ccb->cts.type = CTS_TYPE_CURRENT_SETTINGS; @@ -1601,8 +1598,7 @@ ata_do_pass_16(struct cam_device *device ata_flags |= AP_FLAG_TLEN_NO_DATA; } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_ata_pass_16(&ccb->csio, retries, @@ -1663,8 +1659,7 @@ ata_do_28bit_cmd(struct cam_device *devi timeout, quiet); } - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_ataio) - - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->ataio); cam_fill_ataio(&ccb->ataio, retries, NULL, @@ -1733,8 +1728,7 @@ ata_do_cmd(struct cam_device *device, un return (error); } - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_ataio) - - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->ataio); cam_fill_ataio(&ccb->ataio, retries, NULL, @@ -3184,8 +3178,7 @@ rescan_or_reset_bus(path_id_t bus, int r * no-op, sending a rescan to the xpt bus would result in a status of * CAM_REQ_INVALID. */ - bzero(&(&matchccb.ccb_h)[1], - sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&matchccb.cdm); matchccb.ccb_h.func_code = XPT_DEV_MATCH; matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; @@ -3533,8 +3526,7 @@ next_batch: * cam_getccb() zeros the CCB header only. So we need to zero the * payload portion of the ccb. */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_read_defects(&ccb->csio, /*retries*/ retry_count, @@ -3987,8 +3979,7 @@ mode_sense(struct cam_device *device, in if (ccb == NULL) errx(1, "mode_sense: couldn't allocate CCB"); - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_mode_sense(&ccb->csio, /* retries */ retry_count, @@ -4037,8 +4028,7 @@ mode_select(struct cam_device *device, i if (ccb == NULL) errx(1, "mode_select: couldn't allocate CCB"); - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_mode_select(&ccb->csio, /* retries */ retry_count, @@ -4155,8 +4145,7 @@ scsicmd(struct cam_device *device, int a return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(ccb); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { @@ -4657,8 +4646,7 @@ tagcontrol(struct cam_device *device, in cam_path_string(device, pathstr, sizeof(pathstr)); if (numtags >= 0) { - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_relsim) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->crs); ccb->ccb_h.func_code = XPT_REL_SIMQ; ccb->ccb_h.flags = CAM_DEV_QFREEZE; ccb->crs.release_flags = RELSIM_ADJUST_OPENINGS; @@ -4685,8 +4673,7 @@ tagcontrol(struct cam_device *device, in pathstr, ccb->crs.openings); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_getdevstats) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cgds); ccb->ccb_h.func_code = XPT_GDEV_STATS; @@ -4886,8 +4873,7 @@ get_cpi(struct cam_device *device, struc warnx("get_cpi: couldn't allocate CCB"); return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_pathinq) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cpi); ccb->ccb_h.func_code = XPT_PATH_INQ; if (cam_send_ccb(device, ccb) < 0) { warn("get_cpi: error sending Path Inquiry CCB"); @@ -4925,8 +4911,7 @@ get_cgd(struct cam_device *device, struc warnx("get_cgd: couldn't allocate CCB"); return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_pathinq) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cgd); ccb->ccb_h.func_code = XPT_GDEV_TYPE; if (cam_send_ccb(device, ccb) < 0) { warn("get_cgd: error sending Path Inquiry CCB"); @@ -4971,8 +4956,7 @@ dev_has_vpd_page(struct cam_device *dev, } /* cam_getccb cleans up the header, caller has to zero the payload */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); bzero(&sup_pages, sizeof(sup_pages)); @@ -5286,8 +5270,7 @@ get_print_cts(struct cam_device *device, return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_trans_settings) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; @@ -5427,8 +5410,7 @@ ratecontrol(struct cam_device *device, i break; } } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_pathinq) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cpi); /* * Grab path inquiry information, so we can determine whether * or not the initiator is capable of the things that the user @@ -5454,8 +5436,7 @@ ratecontrol(struct cam_device *device, i goto ratecontrol_bailout; } bcopy(&ccb->cpi, &cpi, sizeof(struct ccb_pathinq)); - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_trans_settings) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); if (quiet == 0) { fprintf(stdout, "%s parameters:\n", user_settings ? "User" : "Current"); @@ -5708,8 +5689,7 @@ scsiformat(struct cam_device *device, in return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { @@ -5857,8 +5837,7 @@ doreport: do { cam_status status; - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); /* * There's really no need to do error recovery or @@ -6005,8 +5984,7 @@ scsisanitize(struct cam_device *device, return(1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { @@ -6267,8 +6245,7 @@ doreport: do { cam_status status; - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); /* * There's really no need to do error recovery or @@ -6410,8 +6387,7 @@ scsireportluns(struct cam_device *device return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); countonly = 0; lunsonly = 0; @@ -6659,8 +6635,7 @@ scsireadcapacity(struct cam_device *devi return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { @@ -6864,8 +6839,7 @@ smpcmd(struct cam_device *device, int ar return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { @@ -7058,8 +7032,7 @@ smpreportgeneral(struct cam_device *devi return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { @@ -7121,8 +7094,7 @@ try_long: if ((response->long_response & SMP_RG_LONG_RESPONSE) && (long_response == 0)) { ccb->ccb_h.status = CAM_REQ_INPROG; - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); long_response = 1; goto try_long; } @@ -7204,8 +7176,7 @@ smpphycontrol(struct cam_device *device, return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { @@ -7462,8 +7433,7 @@ smpmaninfo(struct cam_device *device, in return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { @@ -7557,8 +7527,7 @@ getdevid(struct cam_devitem *item) goto bailout; } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cdai); /* * On the first try, we just probe for the size of the data, and @@ -7843,8 +7812,7 @@ smpphylist(struct cam_device *device, in return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); STAILQ_INIT(&devlist.dev_queue); rgrequest = malloc(sizeof(*rgrequest)); @@ -7948,8 +7916,7 @@ smpphylist(struct cam_device *device, in char tmpstr[256]; int j; - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); ccb->ccb_h.status = CAM_REQ_INPROG; ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; @@ -8238,8 +8205,7 @@ scsigetopcodes(struct cam_device *device } /* cam_getccb cleans up the header, caller has to zero the payload */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); if (opcode_set != 0) { options |= RSO_OPTIONS_OC; @@ -8678,8 +8644,7 @@ scsireprobe(struct cam_device *device) return (1); } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); ccb->ccb_h.func_code = XPT_REPROBE_LUN; Modified: stable/10/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/10/sbin/camcontrol/fwdownload.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/sbin/camcontrol/fwdownload.c Wed Jul 6 17:45:38 2016 (r302377) @@ -459,8 +459,7 @@ fw_validate_ibm(struct cam_device *dev, } /* cam_getccb cleans up the header, caller has to zero the payload */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); bzero(&vpd_page, sizeof(vpd_page)); @@ -666,8 +665,7 @@ fw_check_device_ready(struct cam_device goto bailout; } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(ccb); if (devtype != CC_DT_SCSI) { dxfer_len = sizeof(struct ata_params); @@ -789,8 +787,7 @@ fw_download_img(struct cam_device *cam_d goto bailout; } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(ccb); max_pkt_size = vp->max_pkt_size; if (max_pkt_size == 0) @@ -821,8 +818,7 @@ fw_download_img(struct cam_device *cam_d vp->cdb_byte2; cdb.buffer_id = vp->inc_cdb_buffer_id ? pkt_count : 0; /* Zero out payload of ccb union after ccb header. */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); /* * Copy previously constructed cdb into ccb_scsiio * struct. Modified: stable/10/sbin/camcontrol/persist.c ============================================================================== --- stable/10/sbin/camcontrol/persist.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/sbin/camcontrol/persist.c Wed Jul 6 17:45:38 2016 (r302377) @@ -450,8 +450,7 @@ scsipersist(struct cam_device *device, i goto bailout; } - bzero(&(&ccb->ccb_h)[1], - sizeof(union ccb) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { Modified: stable/10/sbin/iscontrol/fsm.c ============================================================================== --- stable/10/sbin/iscontrol/fsm.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/sbin/iscontrol/fsm.c Wed Jul 6 17:45:38 2016 (r302377) @@ -371,7 +371,7 @@ doCAM(isess_t *sess) debug(2, "pathstr=%s", pathstr); ccb = cam_getccb(sess->camdev); - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_relsim) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->crs); ccb->ccb_h.func_code = XPT_REL_SIMQ; ccb->crs.release_flags = RELSIM_ADJUST_OPENINGS; ccb->crs.openings = sess->op->tags; Modified: stable/10/sys/cam/cam_ccb.h ============================================================================== --- stable/10/sys/cam/cam_ccb.h Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/sys/cam/cam_ccb.h Wed Jul 6 17:45:38 2016 (r302377) @@ -1217,6 +1217,10 @@ union ccb { struct ccb_async casync; }; +#define CCB_CLEAR_ALL_EXCEPT_HDR(ccbp) \ + bzero((char *)(ccbp) + sizeof((ccbp)->ccb_h), \ + sizeof(*(ccbp)) - sizeof((ccbp)->ccb_h)) + __BEGIN_DECLS static __inline void cam_fill_csio(struct ccb_scsiio *csio, u_int32_t retries, Modified: stable/10/usr.sbin/camdd/camdd.c ============================================================================== --- stable/10/usr.sbin/camdd/camdd.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/usr.sbin/camdd/camdd.c Wed Jul 6 17:45:38 2016 (r302377) @@ -1305,8 +1305,7 @@ camdd_probe_pass(struct cam_device *cam_ goto bailout; } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_read_capacity(&ccb->csio, /*retries*/ probe_retry_count, @@ -1387,8 +1386,7 @@ rcap_done: goto bailout_error; } - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cpi); ccb->ccb_h.func_code = XPT_PATH_INQ; ccb->ccb_h.flags = CAM_DIR_NONE; @@ -2439,8 +2437,7 @@ camdd_pass_run(struct camdd_dev *dev) data = &buf->buf_type_spec.data; ccb = &data->ccb; - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); /* * In almost every case the number of blocks should be the device Modified: stable/10/usr.sbin/mptutil/mpt_cam.c ============================================================================== --- stable/10/usr.sbin/mptutil/mpt_cam.c Wed Jul 6 17:42:09 2016 (r302376) +++ stable/10/usr.sbin/mptutil/mpt_cam.c Wed Jul 6 17:45:38 2016 (r302377) @@ -241,8 +241,7 @@ fetch_scsi_capacity(struct cam_device *d return (ENOMEM); /* Zero the rest of the ccb. */ - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_read_capacity(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG, &rcap, SSD_FULL_SIZE, 5000); @@ -273,8 +272,7 @@ fetch_scsi_capacity(struct cam_device *d } /* Zero the rest of the ccb. */ - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); scsi_read_capacity_16(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG, 0, 0, 0, (uint8_t *)&rcaplong, sizeof(rcaplong), SSD_FULL_SIZE, 5000); @@ -355,8 +353,7 @@ fetch_scsi_inquiry(struct cam_device *de return (ENOMEM); /* Zero the rest of the ccb. */ - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - - sizeof(struct ccb_hdr)); + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); inq_buf = calloc(1, sizeof(*inq_buf)); if (inq_buf == NULL) { From owner-svn-src-all@freebsd.org Wed Jul 6 17:46:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4356CB750A0; Wed, 6 Jul 2016 17:46:50 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1535B1D32; Wed, 6 Jul 2016 17:46:50 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66Hkndr019841; Wed, 6 Jul 2016 17:46:49 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66Hkncx019840; Wed, 6 Jul 2016 17:46:49 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201607061746.u66Hkncx019840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 6 Jul 2016 17:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302378 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 17:46:50 -0000 Author: nwhitehorn Date: Wed Jul 6 17:46:49 2016 New Revision: 302378 URL: https://svnweb.freebsd.org/changeset/base/302378 Log: Add variable declaration missing in r302372. Submitted by: andrew Approved by: re (gjb, kib) Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Wed Jul 6 17:45:38 2016 (r302377) +++ head/sys/net/flowtable.c Wed Jul 6 17:46:49 2016 (r302378) @@ -739,6 +739,7 @@ flowtable_lookup_common(struct flowtable static void flowtable_alloc(struct flowtable *ft) { + int i; ft->ft_table = malloc(ft->ft_size * sizeof(struct flist), M_FTABLE, M_WAITOK); From owner-svn-src-all@freebsd.org Wed Jul 6 18:55:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3545FB75F76; Wed, 6 Jul 2016 18:55:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05F9711F9; Wed, 6 Jul 2016 18:55:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66Itkg6045695; Wed, 6 Jul 2016 18:55:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66Itk4H045694; Wed, 6 Jul 2016 18:55:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607061855.u66Itk4H045694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 6 Jul 2016 18:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302379 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 18:55:47 -0000 Author: jhb Date: Wed Jul 6 18:55:46 2016 New Revision: 302379 URL: https://svnweb.freebsd.org/changeset/base/302379 Log: Correct locking annotation for p_comm. p_comm is changed during exec, it is not read-only after fork. Pointed out by: rwatson Approved by: re (gjb, kib) MFC after: 1 week Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Jul 6 17:46:49 2016 (r302378) +++ head/sys/sys/proc.h Wed Jul 6 18:55:46 2016 (r302379) @@ -602,7 +602,7 @@ struct proc { u_int p_magic; /* (b) Magic number. */ int p_osrel; /* (x) osreldate for the binary (from ELF note, if any) */ - char p_comm[MAXCOMLEN + 1]; /* (b) Process name. */ + char p_comm[MAXCOMLEN + 1]; /* (x) Process name. */ struct sysentvec *p_sysent; /* (b) Syscall dispatch info. */ struct pargs *p_args; /* (c) Process arguments. */ rlim_t p_cpulimit; /* (c) Current CPU limit in seconds. */ From owner-svn-src-all@freebsd.org Wed Jul 6 20:48:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4098CB75A0B; Wed, 6 Jul 2016 20:48:44 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD16F1845; Wed, 6 Jul 2016 20:48:43 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66KmhPb086725; Wed, 6 Jul 2016 20:48:43 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66KmhCX086723; Wed, 6 Jul 2016 20:48:43 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201607062048.u66KmhCX086723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Wed, 6 Jul 2016 20:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302380 - head/sys/dev/isci/scil 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 20:48:44 -0000 Author: jimharris Date: Wed Jul 6 20:48:42 2016 New Revision: 302380 URL: https://svnweb.freebsd.org/changeset/base/302380 Log: isci: fix ATA PASSTHROUGH fixed sense data format PR: kern/191717 Submitted by: martin@lispworks.com Approved by: re (gjb) MFC after: 3 days Modified: head/sys/dev/isci/scil/sati_passthrough.c head/sys/dev/isci/scil/sati_util.c Modified: head/sys/dev/isci/scil/sati_passthrough.c ============================================================================== --- head/sys/dev/isci/scil/sati_passthrough.c Wed Jul 6 18:55:46 2016 (r302379) +++ head/sys/dev/isci/scil/sati_passthrough.c Wed Jul 6 20:48:42 2016 (r302380) @@ -230,9 +230,9 @@ void sati_passthrough_construct_sense( // Command specific section sati_set_sense_data_byte(sense_data, sense_len, 8, (PASSTHROUGH_CDB_EXTEND(cdb) << 7) | (sector_count_upper << 6) | (lba_upper << 5)); - sati_set_sense_data_byte(sense_data, sense_len, 9, sati_get_ata_lba_high(register_fis)); + sati_set_sense_data_byte(sense_data, sense_len, 9, sati_get_ata_lba_low(register_fis)); sati_set_sense_data_byte(sense_data, sense_len, 10, sati_get_ata_lba_mid(register_fis)); - sati_set_sense_data_byte(sense_data, sense_len, 11, sati_get_ata_lba_low(register_fis)); + sati_set_sense_data_byte(sense_data, sense_len, 11, sati_get_ata_lba_high(register_fis)); sequence->is_sense_response_set = TRUE; } Modified: head/sys/dev/isci/scil/sati_util.c ============================================================================== --- head/sys/dev/isci/scil/sati_util.c Wed Jul 6 18:55:46 2016 (r302379) +++ head/sys/dev/isci/scil/sati_util.c Wed Jul 6 20:48:42 2016 (r302380) @@ -932,7 +932,7 @@ void sati_scsi_fixed_sense_data_construc sati_set_sense_data_byte(sense_data, sense_len, 4, 0); sati_set_sense_data_byte(sense_data, sense_len, 5, 0); sati_set_sense_data_byte(sense_data, sense_len, 6, 0); - sati_set_sense_data_byte(sense_data, sense_len, 7, 0); + sati_set_sense_data_byte(sense_data, sense_len, 7, (sense_len < 18 ? sense_len - 1 : 17) - 7); sati_set_sense_data_byte(sense_data, sense_len, 8, 0); sati_set_sense_data_byte(sense_data, sense_len, 9, 0); sati_set_sense_data_byte(sense_data, sense_len, 10, 0); @@ -981,7 +981,7 @@ void sati_scsi_common_fixed_sense_constr //Bytes 3, 4, 5, 6 are set in read_error_sense_construct functions - sati_set_sense_data_byte(sense_data, sense_len, 7, 0); + sati_set_sense_data_byte(sense_data, sense_len, 7, (sense_len < 18 ? sense_len - 1 : 17) - 7); sati_set_sense_data_byte(sense_data, sense_len, 8, 0); sati_set_sense_data_byte(sense_data, sense_len, 9, 0); sati_set_sense_data_byte(sense_data, sense_len, 10, 0); From owner-svn-src-all@freebsd.org Wed Jul 6 22:21:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF9E7B75FF9; Wed, 6 Jul 2016 22:21:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D24A1AEF; Wed, 6 Jul 2016 22:21:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66MLMGI025400; Wed, 6 Jul 2016 22:21:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66MLMXl025399; Wed, 6 Jul 2016 22:21:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201607062221.u66MLMXl025399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 6 Jul 2016 22:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302381 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 22:21:23 -0000 Author: hselasky Date: Wed Jul 6 22:21:22 2016 New Revision: 302381 URL: https://svnweb.freebsd.org/changeset/base/302381 Log: Handle IOC_VOID special case of passing an integer IOCTL argument through CUSE. Submitted by: Vladimir Kondratyev Approved by: re (gjb) Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Wed Jul 6 20:48:42 2016 (r302380) +++ head/sys/fs/cuse/cuse.c Wed Jul 6 22:21:22 2016 (r302381) @@ -1656,7 +1656,7 @@ cuse_client_ioctl(struct cdev *dev, unsi cuse_cmd_lock(pccmd); - if (cmd & IOC_IN) + if (cmd & (IOC_IN | IOC_VOID)) memcpy(pcc->ioctl_buffer, data, len); /* From owner-svn-src-all@freebsd.org Wed Jul 6 23:49:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0409DB75F9E; Wed, 6 Jul 2016 23:49:21 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAA9C1469; Wed, 6 Jul 2016 23:49:20 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u66NnKTW054487; Wed, 6 Jul 2016 23:49:20 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u66NnKHC054486; Wed, 6 Jul 2016 23:49:20 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201607062349.u66NnKHC054486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 6 Jul 2016 23:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302382 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 06 Jul 2016 23:49:21 -0000 Author: smh Date: Wed Jul 6 23:49:19 2016 New Revision: 302382 URL: https://svnweb.freebsd.org/changeset/base/302382 Log: Fix ZFS ARC min / max tunable Due to ARC initial configuration not being done and kmem information not being available we need to blindly set zfs_arc_max and zfs_arc_min when configured via the tunable. This fixes vfs.zfs.arc_(min|max) configuration via loader.conf broken by r302265. Approved by: re(gjb) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 6 22:21:22 2016 (r302381) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 6 23:49:19 2016 (r302382) @@ -919,6 +919,12 @@ sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_AR if (err != 0 || req->newptr == NULL) return (err); + if (zfs_arc_max == 0) { + /* Loader tunable so blindly set */ + zfs_arc_max = val; + return (0); + } + if (val < arc_abs_min || val > kmem_size()) return (EINVAL); if (val < arc_c_min) @@ -956,6 +962,12 @@ sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_AR if (err != 0 || req->newptr == NULL) return (err); + if (zfs_arc_min == 0) { + /* Loader tunable so blindly set */ + zfs_arc_min = val; + return (0); + } + if (val < arc_abs_min || val > arc_c_max) return (EINVAL); From owner-svn-src-all@freebsd.org Thu Jul 7 02:23:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4C6B75CE3; Thu, 7 Jul 2016 02:23:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78D4E1312; Thu, 7 Jul 2016 02:23:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u672NqOA013084; Thu, 7 Jul 2016 02:23:52 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u672Nq06013083; Thu, 7 Jul 2016 02:23:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201607070223.u672Nq06013083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 7 Jul 2016 02:23:52 +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: r302383 - stable/10/contrib/ipfilter/tools 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 02:23:53 -0000 Author: cy Date: Thu Jul 7 02:23:52 2016 New Revision: 302383 URL: https://svnweb.freebsd.org/changeset/base/302383 Log: MFC r302296: Remove dead code. Modified: stable/10/contrib/ipfilter/tools/ipf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ipfilter/tools/ipf.c ============================================================================== --- stable/10/contrib/ipfilter/tools/ipf.c Wed Jul 6 23:49:19 2016 (r302382) +++ stable/10/contrib/ipfilter/tools/ipf.c Thu Jul 7 02:23:52 2016 (r302383) @@ -410,23 +410,6 @@ static void flushfilter(arg, filter) return; } -#ifdef SIOCIPFFA - if (!strcmp(arg, "u")) { - closedevice(); - /* - * Flush auth rules and packets - */ - if (opendevice(IPL_AUTH, 1) == -1) - perror("open(IPL_AUTH)"); - else { - if (ioctl(fd, SIOCIPFFA, &fl) == -1) - ipferror(fd, "ioctl(SIOCIPFFA)"); - } - closedevice(); - return; - } -#endif - if (strchr(arg, 'i') || strchr(arg, 'I')) fl = FR_INQUE; if (strchr(arg, 'o') || strchr(arg, 'O')) From owner-svn-src-all@freebsd.org Thu Jul 7 03:39:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BF4BB75D8B; Thu, 7 Jul 2016 03:39:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4361698; Thu, 7 Jul 2016 03:39:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u673dJ80039687; Thu, 7 Jul 2016 03:39:19 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u673dImL039679; Thu, 7 Jul 2016 03:39:18 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607070339.u673dImL039679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 7 Jul 2016 03:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302384 - in head/sys/dev: e1000 ixgb ixgbe 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 03:39:20 -0000 Author: sbruno Date: Thu Jul 7 03:39:18 2016 New Revision: 302384 URL: https://svnweb.freebsd.org/changeset/base/302384 Log: Do not initialize the adapter on MTU change when adapter status is down. This fixes long-standing problems when changing settings of the adapter. Discussed in: https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html Submitted by: arnaud.ysmal@stormshield.eu Reviewed by: erj@freebsd.org Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7030 Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/dev/ixgb/if_ixgb.c head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/e1000/if_em.c Thu Jul 7 03:39:18 2016 (r302384) @@ -1214,7 +1214,8 @@ em_ioctl(if_t ifp, u_long command, caddr if_setmtu(ifp, ifr->ifr_mtu); adapter->hw.mac.max_frame_size = if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN; - em_init_locked(adapter); + if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) + em_init_locked(adapter); EM_CORE_UNLOCK(adapter); break; } Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/e1000/if_igb.c Thu Jul 7 03:39:18 2016 (r302384) @@ -1106,7 +1106,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - igb_init_locked(adapter); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) + igb_init_locked(adapter); IGB_CORE_UNLOCK(adapter); break; } Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/e1000/if_lem.c Thu Jul 7 03:39:18 2016 (r302384) @@ -1053,7 +1053,8 @@ lem_ioctl(if_t ifp, u_long command, cadd if_setmtu(ifp, ifr->ifr_mtu); adapter->max_frame_size = if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN; - lem_init_locked(adapter); + if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING)) + lem_init_locked(adapter); EM_CORE_UNLOCK(adapter); break; } Modified: head/sys/dev/ixgb/if_ixgb.c ============================================================================== --- head/sys/dev/ixgb/if_ixgb.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/ixgb/if_ixgb.c Thu Jul 7 03:39:18 2016 (r302384) @@ -539,7 +539,8 @@ ixgb_ioctl(struct ifnet * ifp, IOCTL_CMD adapter->hw.max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - ixgb_init_locked(adapter); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixgb_init_locked(adapter); IXGB_UNLOCK(adapter); } break; Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/ixgbe/if_ix.c Thu Jul 7 03:39:18 2016 (r302384) @@ -893,7 +893,8 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = ifp->if_mtu + IXGBE_MTU_HDR; - ixgbe_init_locked(adapter); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixgbe_init_locked(adapter); #ifdef PCI_IOV ixgbe_recalculate_max_frame(adapter); #endif Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/ixgbe/if_ixv.c Thu Jul 7 03:39:18 2016 (r302384) @@ -578,7 +578,8 @@ ixv_ioctl(struct ifnet * ifp, u_long com ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = ifp->if_mtu + IXGBE_MTU_HDR; - ixv_init_locked(adapter); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixv_init_locked(adapter); IXGBE_CORE_UNLOCK(adapter); } break; Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/ixl/if_ixl.c Thu Jul 7 03:39:18 2016 (r302384) @@ -980,7 +980,8 @@ ixl_ioctl(struct ifnet * ifp, u_long com vsi->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; - ixl_init_locked(pf); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixl_init_locked(pf); IXL_PF_UNLOCK(pf); } break; Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Thu Jul 7 02:23:52 2016 (r302383) +++ head/sys/dev/ixl/if_ixlv.c Thu Jul 7 03:39:18 2016 (r302384) @@ -676,7 +676,8 @@ ixlv_ioctl(struct ifnet *ifp, u_long com vsi->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; - ixlv_init_locked(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixlv_init_locked(sc); } mtx_unlock(&sc->mtx); break; From owner-svn-src-all@freebsd.org Thu Jul 7 05:00:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD1A6B75637; Thu, 7 Jul 2016 05:00:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5A01C44; Thu, 7 Jul 2016 05:00:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u674xxEK068732; Thu, 7 Jul 2016 04:59:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u674xwHD068722; Thu, 7 Jul 2016 04:59:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607070459.u674xwHD068722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 7 Jul 2016 04:59:58 +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: r302385 - in stable/10/contrib/expat: . doc examples lib tests tests/benchmark xmlwf 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 05:00:00 -0000 Author: delphij Date: Thu Jul 7 04:59:58 2016 New Revision: 302385 URL: https://svnweb.freebsd.org/changeset/base/302385 Log: MFC r302305: MFV r302260: expat 2.2.0. Added: stable/10/contrib/expat/configure.ac - copied unchanged from r302305, head/contrib/expat/configure.ac stable/10/contrib/expat/doc/xmlwf.xml - copied unchanged from r302305, head/contrib/expat/doc/xmlwf.xml Deleted: stable/10/contrib/expat/configure.in stable/10/contrib/expat/doc/xmlwf.sgml Modified: stable/10/contrib/expat/COPYING stable/10/contrib/expat/Changes stable/10/contrib/expat/MANIFEST stable/10/contrib/expat/Makefile.in stable/10/contrib/expat/README stable/10/contrib/expat/doc/expat.png (contents, props changed) stable/10/contrib/expat/doc/reference.html stable/10/contrib/expat/doc/xmlwf.1 stable/10/contrib/expat/examples/elements.c stable/10/contrib/expat/examples/outline.c stable/10/contrib/expat/expat_config.h.in stable/10/contrib/expat/lib/expat.h stable/10/contrib/expat/lib/expat_external.h stable/10/contrib/expat/lib/internal.h stable/10/contrib/expat/lib/xmlparse.c stable/10/contrib/expat/lib/xmlrole.c stable/10/contrib/expat/lib/xmltok.c stable/10/contrib/expat/lib/xmltok.h stable/10/contrib/expat/lib/xmltok_impl.c stable/10/contrib/expat/tests/benchmark/README.txt stable/10/contrib/expat/tests/chardata.c stable/10/contrib/expat/tests/minicheck.c stable/10/contrib/expat/tests/minicheck.h stable/10/contrib/expat/tests/runtests.c stable/10/contrib/expat/tests/xmltest.sh stable/10/contrib/expat/xmlwf/codepage.c stable/10/contrib/expat/xmlwf/readfilemap.c stable/10/contrib/expat/xmlwf/unixfilemap.c stable/10/contrib/expat/xmlwf/xmlfile.c stable/10/contrib/expat/xmlwf/xmlwf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/expat/COPYING ============================================================================== --- stable/10/contrib/expat/COPYING Thu Jul 7 03:39:18 2016 (r302384) +++ stable/10/contrib/expat/COPYING Thu Jul 7 04:59:58 2016 (r302385) @@ -1,6 +1,5 @@ -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers. +Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper +Copyright (c) 2001-2016 Expat maintainers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Modified: stable/10/contrib/expat/Changes ============================================================================== --- stable/10/contrib/expat/Changes Thu Jul 7 03:39:18 2016 (r302384) +++ stable/10/contrib/expat/Changes Thu Jul 7 04:59:58 2016 (r302385) @@ -1,3 +1,67 @@ +Release 2.2.0 Tue June 21 2016 + Security fixes: + #537 CVE-2016-0718 -- Fix crash on malformed input + CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 / + CVE-2015-2716 introduced with Expat 2.1.1 + #499 CVE-2016-5300 -- Use more entropy for hash initialization + than the original fix to CVE-2012-0876 + #519 CVE-2012-6702 -- Resolve troublesome internal call to srand + that was introduced with Expat 2.1.0 + when addressing CVE-2012-0876 (issue #496) + + Bug fixes: + Fix uninitialized reads of size 1 + (e.g. in little2_updatePosition) + Fix detection of UTF-8 character boundaries + + Other changes: + #532 Fix compilation for Visual Studio 2010 (keyword "C99") + Autotools: Resolve use of "$<" to better support bmake + Autotools: Add QA script "qa.sh" (and make target "qa") + Autotools: Respect CXXFLAGS if given + Autotools: Fix "make run-xmltest" + Autotools: Have "make run-xmltest" check for expected output + p90 CMake: Fix static build (BUILD_shared=OFF) on Windows + #536 CMake: Add soversion, support -DNO_SONAME=yes to bypass + #323 CMake: Add suffix "d" to differentiate debug from release + CMake: Define WIN32 with CMake on Windows + Annotate memory allocators for GCC + Address all currently known compile warnings + Make sure that API symbols remain visible despite + -fvisibility=hidden + Remove executable flag from source files + Resolve COMPILED_FROM_DSP in favor of WIN32 + + Special thanks to: + Björn Lindahl + Christian Heimes + Cristian Rodríguez + Daniel Krügler + Gustavo Grieco + Karl Waclawek + László Böszörményi + Marco Grassi + Pascal Cuoq + Sergei Nikulov + Thomas Beutlich + Warren Young + Yann Droneaud + +Release 2.1.1 Sat March 12 2016 + Security fixes: + #582: CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer + + Bug fixes: + #502: Fix potential null pointer dereference + #520: Symbol XML_SetHashSalt was not exported + Output of "xmlwf -h" was incomplete + + Other changes: + #503: Document behavior of calling XML_SetHashSalt with salt 0 + Minor improvements to man page xmlwf(1) + Improvements to the experimental CMake build system + libtool now invoked with --verbose + Release 2.1.0 Sat March 24 2012 - Bug Fixes: #1742315: Harmful XML_ParserCreateNS suggestion. @@ -23,7 +87,7 @@ Release 2.1.0 Sat March 24 2012 #3312568: CMake support. #3446384: Report byte offsets for attr names and values. - New Features / API changes: - Added new API member XML_SetHashSalt() that allows setting an intial + Added new API member XML_SetHashSalt() that allows setting an initial value (salt) for hash calculations. This is part of the fix for bug #3496608 to randomize hash parameters. When compiled with XML_ATTR_INFO defined, adds new API member Modified: stable/10/contrib/expat/MANIFEST ============================================================================== --- stable/10/contrib/expat/MANIFEST Thu Jul 7 03:39:18 2016 (r302384) +++ stable/10/contrib/expat/MANIFEST Thu Jul 7 04:59:58 2016 (r302385) @@ -44,7 +44,7 @@ doc/reference.html doc/style.css doc/valid-xhtml10.png doc/xmlwf.1 -doc/xmlwf.sgml +doc/xmlwf.xml CMakeLists.txt CMake.README COPYING @@ -54,7 +54,7 @@ MANIFEST Makefile.in README configure -configure.in +configure.ac expat_config.h.in expat_config.h.cmake expat.pc.in Modified: stable/10/contrib/expat/Makefile.in ============================================================================== --- stable/10/contrib/expat/Makefile.in Thu Jul 7 03:39:18 2016 (r302384) +++ stable/10/contrib/expat/Makefile.in Thu Jul 7 04:59:58 2016 (r302385) @@ -42,7 +42,7 @@ INSTALL_DATA = @INSTALL_DATA@ mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs MANFILE = $(srcdir)/doc/xmlwf.1 -APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h +APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h expat_config.h LIBRARY = libexpat.la DESTDIR = $(INSTALL_ROOT) @@ -51,7 +51,7 @@ default: buildlib xmlwf/xmlwf@EXEEXT@ buildlib: $(LIBRARY) expat.pc -all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline +all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline $(MANFILE) clean: cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs @@ -77,7 +77,10 @@ check: tests/runtests tests/runtestspp tests/runtests tests/runtestspp -install: xmlwf/xmlwf@EXEEXT@ installlib +$(MANFILE): + $(MAKE) -C doc xmlwf.1 + +install: xmlwf/xmlwf@EXEEXT@ installlib $(MANFILE) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) @@ -116,7 +119,7 @@ CXXFLAGS = @CXXFLAGS@ VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ ### autoconf this? -LTFLAGS = --silent +LTFLAGS = --verbose COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS) @@ -154,11 +157,11 @@ xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIB examples/elements.@OBJEXT@: examples/elements.c examples/elements: examples/elements.@OBJEXT@ $(LIBRARY) - $(LINK_EXE) $< $(LIBRARY) + $(LINK_EXE) examples/elements.@OBJEXT@ $(LIBRARY) examples/outline.@OBJEXT@: examples/outline.c examples/outline: examples/outline.@OBJEXT@ $(LIBRARY) - $(LINK_EXE) $< $(LIBRARY) + $(LINK_EXE) examples/outline.@OBJEXT@ $(LIBRARY) tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h @@ -180,11 +183,19 @@ tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ http://www.w3.org/XML/Test/xmlts20080827.zip -tests/XML-Test-Suite: tests/xmlts.zip +tests/xmlconf: tests/xmlts.zip cd tests && unzip -q xmlts.zip -run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite - tests/xmltest.sh +run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/xmlconf + tests/xmltest.sh 2>&1 | tee tests/xmltest.log + diff -u tests/xmltest.log.expected tests/xmltest.log + +.PHONY: qa +qa: + ./qa.sh address + ./qa.sh memory + ./qa.sh undefined + ./qa.sh coverage .SUFFIXES: .c .cpp .lo .@OBJEXT@ Modified: stable/10/contrib/expat/README ============================================================================== --- stable/10/contrib/expat/README Thu Jul 7 03:39:18 2016 (r302384) +++ stable/10/contrib/expat/README Thu Jul 7 04:59:58 2016 (r302385) @@ -1,5 +1,5 @@ - Expat, Release 2.1.0 + Expat, Release 2.2.0 This is Expat, a C library for parsing XML, written by James Clark. Expat is a stream-oriented XML parser. This means that you register @@ -114,7 +114,7 @@ Note for Solaris users: The "ar" comman "/usr/ccs/bin", which is not in the default PATH. You will need to add this to your path for the "make" command, and probably also switch to GNU make (the "make" found in /usr/ccs/bin does not seem to work -properly -- appearantly it does not understand .PHONY directives). If +properly -- apparently it does not understand .PHONY directives). If you're using ksh or bash, use this command to build: PATH=/usr/ccs/bin:$PATH make Copied: stable/10/contrib/expat/configure.ac (from r302305, head/contrib/expat/configure.ac) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/expat/configure.ac Thu Jul 7 04:59:58 2016 (r302385, copy of r302305, head/contrib/expat/configure.ac) @@ -0,0 +1,157 @@ +dnl configuration script for expat +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright 2000 Clark Cooper +dnl +dnl This file is part of EXPAT. +dnl +dnl EXPAT is free software; you can redistribute it and/or modify it +dnl under the terms of the License (based on the MIT/X license) contained +dnl in the file COPYING that comes with this distribution. +dnl + +dnl Ensure that Expat is configured with autoconf 2.58 or newer +AC_PREREQ(2.58) + +dnl Get the version number of Expat, using m4's esyscmd() command to run +dnl the command at m4-generation time. This allows us to create an m4 +dnl symbol holding the correct version number. AC_INIT() requires the +dnl version number at m4-time, rather than when ./configure is run, so +dnl all this must happen as part of m4, not as part of the shell code +dnl contained in ./configure. +dnl +dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate +dnl test. I believe this test will work, but I don't have a place with non- +dnl GNU M4 to test it right now. +define([expat_version], ifdef([__gnu__], + [esyscmd(conftools/get-version.sh lib/expat.h)], + [2.2.x])) +AC_INIT(expat, expat_version, expat-bugs@libexpat.org) +undefine([expat_version]) + +AC_CONFIG_SRCDIR(Makefile.in) +AC_CONFIG_AUX_DIR(conftools) +AC_CONFIG_MACRO_DIR([m4]) + + +dnl +dnl Increment LIBREVISION if source code has changed at all +dnl +dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0 +dnl +dnl If the API changes compatibly (i.e. simply adding a new function +dnl without changing or removing earlier interfaces), then increment LIBAGE. +dnl +dnl If the API changes incompatibly set LIBAGE back to 0 +dnl + +LIBCURRENT=7 # sync +LIBREVISION=2 # with +LIBAGE=6 # CMakeLists.txt! + +AC_CONFIG_HEADER(expat_config.h) + +sinclude(conftools/ac_c_bigendian_cross.m4) + +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +AC_SUBST(LIBCURRENT) +AC_SUBST(LIBREVISION) +AC_SUBST(LIBAGE) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL + +if test "$GCC" = yes ; then + dnl + dnl Be careful about adding the -fexceptions option; some versions of + dnl GCC don't support it and it causes extra warnings that are only + dnl distracting; avoid. + dnl + OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" + CFLAGS="$OLDCFLAGS -fexceptions" + AC_MSG_CHECKING(whether $CC accepts -fexceptions) + AC_TRY_LINK( , , + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS") + if test "x$CXXFLAGS" = x ; then + CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` + fi +fi + +dnl Checks for header files. +AC_HEADER_STDC + +dnl Checks for typedefs, structures, and compiler characteristics. + +dnl Note: Avoid using AC_C_BIGENDIAN because it does not +dnl work in a cross compile. +AC_C_BIGENDIAN_CROSS + +AC_C_CONST +AC_TYPE_SIZE_T +AC_CHECK_FUNCS(memmove bcopy) + +dnl Only needed for xmlwf: +AC_CHECK_HEADERS(fcntl.h unistd.h) +AC_TYPE_OFF_T +AC_FUNC_MMAP + +if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then + FILEMAP=unixfilemap +else + FILEMAP=readfilemap +fi +AC_SUBST(FILEMAP) + +dnl Needed for the test support code; this was found at +dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html + +# AC_CPP_FUNC +# ------------------ # +# Checks to see if ANSI C99 CPP variable __func__ works. +# If not, perhaps __FUNCTION__ works instead. +# If not, we'll just define __func__ to "". +AC_DEFUN([AC_CPP_FUNC], +[AC_REQUIRE([AC_PROG_CC_STDC])dnl +AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[char *foo = __func__;]])], + [ac_cv_cpp_func=yes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[char *foo = __FUNCTION__;]])], + [ac_cv_cpp_func=__FUNCTION__], + [ac_cv_cpp_func=no])])]) +if test $ac_cv_cpp_func = __FUNCTION__; then + AC_DEFINE(__func__,__FUNCTION__, + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +elif test $ac_cv_cpp_func = no; then + AC_DEFINE(__func__,"", + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +fi +])# AC_CPP_FUNC + +AC_CPP_FUNC + + +dnl Some basic configuration: +AC_DEFINE([XML_NS], 1, + [Define to make XML Namespaces functionality available.]) +AC_DEFINE([XML_DTD], 1, + [Define to make parameter entity parsing functionality available.]) +AC_DEFINE([XML_CONTEXT_BYTES], 1024, + [Define to specify how much context to retain around the current parse point.]) + +AC_CONFIG_FILES([Makefile expat.pc]) +AC_OUTPUT + +abs_srcdir="`cd $srcdir && pwd`" +abs_builddir="`pwd`" +if test "$abs_srcdir" != "$abs_builddir"; then + make mkdir-init +fi Modified: stable/10/contrib/expat/doc/expat.png ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/10/contrib/expat/doc/reference.html ============================================================================== --- stable/10/contrib/expat/doc/reference.html Thu Jul 7 03:39:18 2016 (r302384) +++ stable/10/contrib/expat/doc/reference.html Thu Jul 7 04:59:58 2016 (r302385) @@ -2151,8 +2151,12 @@ Helps in preventing DoS attacks based on function behavior. In order to have an effect this must be called before parsing has started. Returns 1 if successful, 0 when called after XML_Parse or XML_ParseBuffer. -

Note: This call is optional, as the parser will auto-generate a new -random salt value if no value has been set at the start of parsing.

+

Note:This call is optional, as the parser will auto-generate +a new random salt value if no value has been set at the start of parsing. +

Note:One should not call XML_SetHashSalt with a +hash salt value of 0, as this value is used as sentinel value to indicate +that XML_SetHashSalt has not been called. Consequently +such a call will have no effect, even if it returns 1.


Modified: stable/10/contrib/expat/doc/xmlwf.1
==============================================================================
--- stable/10/contrib/expat/doc/xmlwf.1	Thu Jul  7 03:39:18 2016	(r302384)
+++ stable/10/contrib/expat/doc/xmlwf.1	Thu Jul  7 04:59:58 2016	(r302385)
@@ -1,33 +1,40 @@
-.\" This manpage has been automatically generated by docbook2man 
-.\" from a DocBook document.  This tool can be found at:
-.\"  
-.\" Please send any bug reports, improvements, comments, patches, 
-.\" etc. to Steve Cheng .
-.TH "XMLWF" "1" "24 January 2003" "" ""
+'\" -*- coding: us-ascii -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH XMLWF 1 "March 11, 2016" "" ""
 .SH NAME
 xmlwf \- Determines if an XML document is well-formed
 .SH SYNOPSIS
-
-\fBxmlwf\fR [ \fB-s\fR]  [ \fB-n\fR]  [ \fB-p\fR]  [ \fB-x\fR]  [ \fB-e \fIencoding\fB\fR]  [ \fB-w\fR]  [ \fB-d \fIoutput-dir\fB\fR]  [ \fB-c\fR]  [ \fB-m\fR]  [ \fB-r\fR]  [ \fB-t\fR]  [ \fB-v\fR]  [ \fBfile ...\fR] 
-
-.SH "DESCRIPTION"
-.PP
+'nh
+.fi
+.ad l
+\fBxmlwf\fR \kx
+.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
+'in \n(.iu+\nxu
+[\fB-s\fR] [\fB-n\fR] [\fB-p\fR] [\fB-x\fR] [\fB-e \fIencoding\fB\fR] [\fB-w\fR] [\fB-d \fIoutput-dir\fB\fR] [\fB-c\fR] [\fB-m\fR] [\fB-r\fR] [\fB-t\fR] [\fB-v\fR] [file ...]
+'in \n(.iu-\nxu
+.ad b
+'hy
+.SH DESCRIPTION
 \fBxmlwf\fR uses the Expat library to
-determine if an XML document is well-formed.  It is
+determine if an XML document is well-formed. It is
 non-validating.
 .PP
 If you do not specify any files on the command-line, and you
 have a recent version of \fBxmlwf\fR, the
 input file will be read from standard input.
 .SH "WELL-FORMED DOCUMENTS"
-.PP
 A well-formed document must adhere to the
 following rules:
 .TP 0.2i
 \(bu
-The file begins with an XML declaration.  For instance,
-.
-\fBNOTE:\fR
+The file begins with an XML declaration. For instance,
+\*(T<\*(T>.
+\fINOTE:\fR
 \fBxmlwf\fR does not currently
 check for a valid XML declaration.
 .TP 0.2i
@@ -36,8 +43,8 @@ Every start tag is either empty ()
 or has a corresponding end tag.
 .TP 0.2i
 \(bu
-There is exactly one root element.  This element must contain
-all other elements in the document.  Only comments, white
+There is exactly one root element. This element must contain
+all other elements in the document. Only comments, white
 space, and processing instructions may come after the close
 of the root element.
 .TP 0.2i
@@ -49,39 +56,38 @@ All attribute values are enclosed in quo
 or double).
 .PP
 If the document has a DTD, and it strictly complies with that
-DTD, then the document is also considered \fBvalid\fR.
+DTD, then the document is also considered \fIvalid\fR.
 \fBxmlwf\fR is a non-validating parser --
-it does not check the DTD.  However, it does support
-external entities (see the \fB-x\fR option).
-.SH "OPTIONS"
-.PP
+it does not check the DTD. However, it does support
+external entities (see the \*(T<\fB\-x\fR\*(T> option).
+.SH OPTIONS
 When an option includes an argument, you may specify the argument either
-separately ("\fB-d\fR output") or concatenated with the
-option ("\fB-d\fRoutput").  \fBxmlwf\fR
+separately ("\*(T<\fB\-d\fR\*(T> output") or concatenated with the
+option ("\*(T<\fB\-d\fR\*(T>output"). \fBxmlwf\fR
 supports both.
-.TP
-\fB-c\fR
+.TP 
+\*(T<\fB\-c\fR\*(T>
 If the input file is well-formed and \fBxmlwf\fR
 doesn't encounter any errors, the input file is simply copied to
 the output directory unchanged.
-This implies no namespaces (turns off \fB-n\fR) and
-requires \fB-d\fR to specify an output file.
-.TP
-\fB-d output-dir\fR
+This implies no namespaces (turns off \*(T<\fB\-n\fR\*(T>) and
+requires \*(T<\fB\-d\fR\*(T> to specify an output file.
+.TP 
+\*(T<\fB\-d output\-dir\fR\*(T>
 Specifies a directory to contain transformed
 representations of the input files.
-By default, \fB-d\fR outputs a canonical representation
+By default, \*(T<\fB\-d\fR\*(T> outputs a canonical representation
 (described below).
-You can select different output formats using \fB-c\fR
-and \fB-m\fR.
+You can select different output formats using \*(T<\fB\-c\fR\*(T>
+and \*(T<\fB\-m\fR\*(T>.
 
 The output filenames will
 be exactly the same as the input filenames or "STDIN" if the input is
-coming from standard input.  Therefore, you must be careful that the
+coming from standard input. Therefore, you must be careful that the
 output file does not go into the same directory as the input
-file.  Otherwise, \fBxmlwf\fR will delete the
+file. Otherwise, \fBxmlwf\fR will delete the
 input file before it generates the output file (just like running
-cat < file > file in most shells).
+\*(T file\*(T> in most shells).
 
 Two structurally equivalent XML documents have a byte-for-byte
 identical canonical XML representation.
@@ -89,39 +95,39 @@ Note that ignorable white space is consi
 is treated equivalently to data.
 More on canonical XML can be found at
 http://www.jclark.com/xml/canonxml.html .
-.TP
-\fB-e encoding\fR
+.TP 
+\*(T<\fB\-e encoding\fR\*(T>
 Specifies the character encoding for the document, overriding
-any document encoding declaration.  \fBxmlwf\fR
+any document encoding declaration. \fBxmlwf\fR
 supports four built-in encodings:
-US-ASCII,
-UTF-8,
-UTF-16, and
-ISO-8859-1.
-Also see the \fB-w\fR option.
-.TP
-\fB-m\fR
+\*(T,
+\*(T,
+\*(T, and
+\*(T.
+Also see the \*(T<\fB\-w\fR\*(T> option.
+.TP 
+\*(T<\fB\-m\fR\*(T>
 Outputs some strange sort of XML file that completely
 describes the input file, including character positions.
-Requires \fB-d\fR to specify an output file.
-.TP
-\fB-n\fR
-Turns on namespace processing.  (describe namespaces)
-\fB-c\fR disables namespaces.
-.TP
-\fB-p\fR
+Requires \*(T<\fB\-d\fR\*(T> to specify an output file.
+.TP 
+\*(T<\fB\-n\fR\*(T>
+Turns on namespace processing. (describe namespaces)
+\*(T<\fB\-c\fR\*(T> disables namespaces.
+.TP 
+\*(T<\fB\-p\fR\*(T>
 Tells xmlwf to process external DTDs and parameter
 entities.
 
 Normally \fBxmlwf\fR never parses parameter
-entities.  \fB-p\fR tells it to always parse them.
-\fB-p\fR implies \fB-x\fR.
-.TP
-\fB-r\fR
+entities. \*(T<\fB\-p\fR\*(T> tells it to always parse them.
+\*(T<\fB\-p\fR\*(T> implies \*(T<\fB\-x\fR\*(T>.
+.TP 
+\*(T<\fB\-r\fR\*(T>
 Normally \fBxmlwf\fR memory-maps the XML file
 before parsing; this can result in faster parsing on many
 platforms.
-\fB-r\fR turns off memory-mapping and uses normal file
+\*(T<\fB\-r\fR\*(T> turns off memory-mapping and uses normal file
 IO calls instead.
 Of course, memory-mapping is automatically turned off
 when reading from standard input.
@@ -131,34 +137,33 @@ substantially higher memory usage for
 \fBxmlwf\fR, but this appears to be a matter of
 the operating system reporting memory in a strange way; there is
 not a leak in \fBxmlwf\fR.
-.TP
-\fB-s\fR
+.TP 
+\*(T<\fB\-s\fR\*(T>
 Prints an error if the document is not standalone. 
 A document is standalone if it has no external subset and no
 references to parameter entities.
-.TP
-\fB-t\fR
-Turns on timings.  This tells Expat to parse the entire file,
+.TP 
+\*(T<\fB\-t\fR\*(T>
+Turns on timings. This tells Expat to parse the entire file,
 but not perform any processing.
 This gives a fairly accurate idea of the raw speed of Expat itself
 without client overhead.
-\fB-t\fR turns off most of the output options
-(\fB-d\fR, \fB-m\fR, \fB-c\fR,
-\&...).
-.TP
-\fB-v\fR
+\*(T<\fB\-t\fR\*(T> turns off most of the output options
+(\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-m\fR\*(T>, \*(T<\fB\-c\fR\*(T>, ...).
+.TP 
+\*(T<\fB\-v\fR\*(T>
 Prints the version of the Expat library being used, including some
 information on the compile-time configuration of the library, and
 then exits.
-.TP
-\fB-w\fR
+.TP 
+\*(T<\fB\-w\fR\*(T>
 Enables support for Windows code pages.
 Normally, \fBxmlwf\fR will throw an error if it
-runs across an encoding that it is not equipped to handle itself.  With
-\fB-w\fR, xmlwf will try to use a Windows code
-page.  See also \fB-e\fR.
-.TP
-\fB-x\fR
+runs across an encoding that it is not equipped to handle itself. With
+\*(T<\fB\-w\fR\*(T>, xmlwf will try to use a Windows code
+page. See also \*(T<\fB\-e\fR\*(T>.
+.TP 
+\*(T<\fB\-x\fR\*(T>
 Turns on parsing external entities.
 
 Non-validating parsers are not required to resolve external
@@ -172,80 +177,75 @@ data from outside the XML file currently
 This is an example of an internal entity:
 
 .nf
+
 
 .fi
 
 And here are some examples of external entities:
 
 .nf
-  (parsed)
+
+  (parsed)
          (unparsed)
 .fi
-.TP
-\fB--\fR
+.TP 
+\*(T<\fB\-\-\fR\*(T>
 (Two hyphens.)
-Terminates the list of options.  This is only needed if a filename
-starts with a hyphen.  For example:
+Terminates the list of options. This is only needed if a filename
+starts with a hyphen. For example:
 
 .nf
-xmlwf -- -myfile.xml
+
+xmlwf \-\- \-myfile.xml
 .fi
 
 will run \fBxmlwf\fR on the file
-\fI-myfile.xml\fR.
+\*(T<\fI\-myfile.xml\fR\*(T>.
 .PP
 Older versions of \fBxmlwf\fR do not support
 reading from standard input.
-.SH "OUTPUT"
-.PP
+.SH OUTPUT
 If an input file is not well-formed,
 \fBxmlwf\fR prints a single line describing
-the problem to standard output.  If a file is well formed,
+the problem to standard output. If a file is well formed,
 \fBxmlwf\fR outputs nothing.
-Note that the result code is \fBnot\fR set.
-.SH "BUGS"
-.PP
-According to the W3C standard, an XML file without a
-declaration at the beginning is not considered well-formed.
-However, \fBxmlwf\fR allows this to pass.
-.PP
+Note that the result code is \fInot\fR set.
+.SH BUGS
 \fBxmlwf\fR returns a 0 - noerr result,
-even if the file is not well-formed.  There is no good way for
+even if the file is not well-formed. There is no good way for
 a program to use \fBxmlwf\fR to quickly
 check a file -- it must parse \fBxmlwf\fR's
 standard output.
 .PP
 The errors should go to standard error, not standard output.
 .PP
-There should be a way to get \fB-d\fR to send its
+There should be a way to get \*(T<\fB\-d\fR\*(T> to send its
 output to standard output rather than forcing the user to send
 it to a file.
 .PP
 I have no idea why anyone would want to use the
-\fB-d\fR, \fB-c\fR, and
-\fB-m\fR options.  If someone could explain it to
+\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-c\fR\*(T>, and
+\*(T<\fB\-m\fR\*(T> options. If someone could explain it to
 me, I'd like to add this information to this manpage.
-.SH "ALTERNATIVES"
-.PP
+.SH ALTERNATIVES
 Here are some XML validators on the web:
 
 .nf
-http://www.hcrc.ed.ac.uk/~richard/xml-check.html
+
+http://www.hcrc.ed.ac.uk/~richard/xml\-check.html
 http://www.stg.brown.edu/service/xmlvalid/
 http://www.scripting.com/frontier5/xml/code/xmlValidator.html
 http://www.xml.com/pub/a/tools/ruwf/check.html
 .fi
 .SH "SEE ALSO"
-.PP
-
 .nf
+
 The Expat home page:        http://www.libexpat.org/
-The W3 XML specification:   http://www.w3.org/TR/REC-xml
+The W3 XML specification:   http://www.w3.org/TR/REC\-xml
 .fi
-.SH "AUTHOR"
-.PP
-This manual page was written by Scott Bronson  for
-the Debian GNU/Linux system (but may be used by others).  Permission is
+.SH AUTHOR
+This manual page was written by Scott Bronson <\*(T> for
+the Debian GNU/Linux system (but may be used by others). Permission is
 granted to copy, distribute and/or modify this document under
 the terms of the GNU Free Documentation
 License, Version 1.1.

Copied: stable/10/contrib/expat/doc/xmlwf.xml (from r302305, head/contrib/expat/doc/xmlwf.xml)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/contrib/expat/doc/xmlwf.xml	Thu Jul  7 04:59:58 2016	(r302385, copy of r302305, head/contrib/expat/doc/xmlwf.xml)
@@ -0,0 +1,440 @@
+
+  Scott">
+  Bronson">
+  
+  March 11, 2016">
+  
+  1">
+  bronson@rinspin.com">
+  
+  XMLWF">
+  
+
+  Debian GNU/Linux">
+  GNU">
+]>
+
+
+  
+    
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2001 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + Determines if an XML document is well-formed + + + + &dhpackage; + + + + + + + + + + + + + + + + + + file ... + + + + + DESCRIPTION + + + &dhpackage; uses the Expat library to + determine if an XML document is well-formed. It is + non-validating. + + + + If you do not specify any files on the command-line, and you + have a recent version of &dhpackage;, the + input file will be read from standard input. + + + + + + WELL-FORMED DOCUMENTS + + + A well-formed document must adhere to the + following rules: + + + + + The file begins with an XML declaration. For instance, + <?xml version="1.0" standalone="yes"?>. + NOTE: + &dhpackage; does not currently + check for a valid XML declaration. + + + Every start tag is either empty (<tag/>) + or has a corresponding end tag. + + + There is exactly one root element. This element must contain + all other elements in the document. Only comments, white + space, and processing instructions may come after the close + of the root element. + + + All elements nest properly. + + + All attribute values are enclosed in quotes (either single + or double). + + + + + If the document has a DTD, and it strictly complies with that + DTD, then the document is also considered valid. + &dhpackage; is a non-validating parser -- + it does not check the DTD. However, it does support + external entities (see the option). + + + + + OPTIONS + + +When an option includes an argument, you may specify the argument either +separately (" output") or concatenated with the +option ("output"). &dhpackage; +supports both. + + + + + + + + + If the input file is well-formed and &dhpackage; + doesn't encounter any errors, the input file is simply copied to + the output directory unchanged. + This implies no namespaces (turns off ) and + requires to specify an output file. + + + + + + + + + Specifies a directory to contain transformed + representations of the input files. + By default, outputs a canonical representation + (described below). + You can select different output formats using + and . + + + The output filenames will + be exactly the same as the input filenames or "STDIN" if the input is + coming from standard input. Therefore, you must be careful that the + output file does not go into the same directory as the input + file. Otherwise, &dhpackage; will delete the + input file before it generates the output file (just like running + cat < file > file in most shells). + + + Two structurally equivalent XML documents have a byte-for-byte + identical canonical XML representation. + Note that ignorable white space is considered significant and + is treated equivalently to data. + More on canonical XML can be found at + http://www.jclark.com/xml/canonxml.html . + + + + + + + + + Specifies the character encoding for the document, overriding + any document encoding declaration. &dhpackage; + supports four built-in encodings: + US-ASCII, + UTF-8, + UTF-16, and + ISO-8859-1. + Also see the option. + + + + + + + + + Outputs some strange sort of XML file that completely + describes the input file, including character positions. + Requires to specify an output file. + + + + + + + + + Turns on namespace processing. (describe namespaces) + disables namespaces. + + + + + + + + + Tells xmlwf to process external DTDs and parameter + entities. + + + Normally &dhpackage; never parses parameter + entities. tells it to always parse them. + implies . + + + + + + + + + Normally &dhpackage; memory-maps the XML file + before parsing; this can result in faster parsing on many + platforms. + turns off memory-mapping and uses normal file + IO calls instead. + Of course, memory-mapping is automatically turned off + when reading from standard input. + + + Use of memory-mapping can cause some platforms to report + substantially higher memory usage for + &dhpackage;, but this appears to be a matter of + the operating system reporting memory in a strange way; there is + not a leak in &dhpackage;. + + + + + + + + + Prints an error if the document is not standalone. + A document is standalone if it has no external subset and no + references to parameter entities. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 7 05:04:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA6B5B758E9; Thu, 7 Jul 2016 05:04:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B58F7139F; Thu, 7 Jul 2016 05:04:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6754LgH072589; Thu, 7 Jul 2016 05:04:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6754L8c072579; Thu, 7 Jul 2016 05:04:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607070504.u6754L8c072579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 7 Jul 2016 05:04:21 +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: r302386 - in stable/9/contrib/expat: . doc examples lib tests tests/benchmark xmlwf 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 05:04:23 -0000 Author: delphij Date: Thu Jul 7 05:04:20 2016 New Revision: 302386 URL: https://svnweb.freebsd.org/changeset/base/302386 Log: MFC r302305: MFV r302260: expat 2.2.0. Added: stable/9/contrib/expat/configure.ac - copied unchanged from r302305, head/contrib/expat/configure.ac stable/9/contrib/expat/doc/xmlwf.xml - copied unchanged from r302305, head/contrib/expat/doc/xmlwf.xml Deleted: stable/9/contrib/expat/configure.in stable/9/contrib/expat/doc/xmlwf.sgml Modified: stable/9/contrib/expat/COPYING stable/9/contrib/expat/Changes stable/9/contrib/expat/MANIFEST stable/9/contrib/expat/Makefile.in stable/9/contrib/expat/README stable/9/contrib/expat/doc/expat.png (contents, props changed) stable/9/contrib/expat/doc/reference.html stable/9/contrib/expat/doc/xmlwf.1 stable/9/contrib/expat/examples/elements.c stable/9/contrib/expat/examples/outline.c stable/9/contrib/expat/expat_config.h.in stable/9/contrib/expat/lib/expat.h stable/9/contrib/expat/lib/expat_external.h stable/9/contrib/expat/lib/internal.h stable/9/contrib/expat/lib/xmlparse.c stable/9/contrib/expat/lib/xmlrole.c stable/9/contrib/expat/lib/xmltok.c stable/9/contrib/expat/lib/xmltok.h stable/9/contrib/expat/lib/xmltok_impl.c stable/9/contrib/expat/tests/benchmark/README.txt stable/9/contrib/expat/tests/chardata.c stable/9/contrib/expat/tests/minicheck.c stable/9/contrib/expat/tests/minicheck.h stable/9/contrib/expat/tests/runtests.c stable/9/contrib/expat/tests/xmltest.sh stable/9/contrib/expat/xmlwf/codepage.c stable/9/contrib/expat/xmlwf/readfilemap.c stable/9/contrib/expat/xmlwf/unixfilemap.c stable/9/contrib/expat/xmlwf/xmlfile.c stable/9/contrib/expat/xmlwf/xmlwf.c Directory Properties: stable/9/contrib/expat/ (props changed) Modified: stable/9/contrib/expat/COPYING ============================================================================== --- stable/9/contrib/expat/COPYING Thu Jul 7 04:59:58 2016 (r302385) +++ stable/9/contrib/expat/COPYING Thu Jul 7 05:04:20 2016 (r302386) @@ -1,6 +1,5 @@ -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers. +Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper +Copyright (c) 2001-2016 Expat maintainers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Modified: stable/9/contrib/expat/Changes ============================================================================== --- stable/9/contrib/expat/Changes Thu Jul 7 04:59:58 2016 (r302385) +++ stable/9/contrib/expat/Changes Thu Jul 7 05:04:20 2016 (r302386) @@ -1,3 +1,67 @@ +Release 2.2.0 Tue June 21 2016 + Security fixes: + #537 CVE-2016-0718 -- Fix crash on malformed input + CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 / + CVE-2015-2716 introduced with Expat 2.1.1 + #499 CVE-2016-5300 -- Use more entropy for hash initialization + than the original fix to CVE-2012-0876 + #519 CVE-2012-6702 -- Resolve troublesome internal call to srand + that was introduced with Expat 2.1.0 + when addressing CVE-2012-0876 (issue #496) + + Bug fixes: + Fix uninitialized reads of size 1 + (e.g. in little2_updatePosition) + Fix detection of UTF-8 character boundaries + + Other changes: + #532 Fix compilation for Visual Studio 2010 (keyword "C99") + Autotools: Resolve use of "$<" to better support bmake + Autotools: Add QA script "qa.sh" (and make target "qa") + Autotools: Respect CXXFLAGS if given + Autotools: Fix "make run-xmltest" + Autotools: Have "make run-xmltest" check for expected output + p90 CMake: Fix static build (BUILD_shared=OFF) on Windows + #536 CMake: Add soversion, support -DNO_SONAME=yes to bypass + #323 CMake: Add suffix "d" to differentiate debug from release + CMake: Define WIN32 with CMake on Windows + Annotate memory allocators for GCC + Address all currently known compile warnings + Make sure that API symbols remain visible despite + -fvisibility=hidden + Remove executable flag from source files + Resolve COMPILED_FROM_DSP in favor of WIN32 + + Special thanks to: + Björn Lindahl + Christian Heimes + Cristian Rodríguez + Daniel Krügler + Gustavo Grieco + Karl Waclawek + László Böszörményi + Marco Grassi + Pascal Cuoq + Sergei Nikulov + Thomas Beutlich + Warren Young + Yann Droneaud + +Release 2.1.1 Sat March 12 2016 + Security fixes: + #582: CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer + + Bug fixes: + #502: Fix potential null pointer dereference + #520: Symbol XML_SetHashSalt was not exported + Output of "xmlwf -h" was incomplete + + Other changes: + #503: Document behavior of calling XML_SetHashSalt with salt 0 + Minor improvements to man page xmlwf(1) + Improvements to the experimental CMake build system + libtool now invoked with --verbose + Release 2.1.0 Sat March 24 2012 - Bug Fixes: #1742315: Harmful XML_ParserCreateNS suggestion. @@ -23,7 +87,7 @@ Release 2.1.0 Sat March 24 2012 #3312568: CMake support. #3446384: Report byte offsets for attr names and values. - New Features / API changes: - Added new API member XML_SetHashSalt() that allows setting an intial + Added new API member XML_SetHashSalt() that allows setting an initial value (salt) for hash calculations. This is part of the fix for bug #3496608 to randomize hash parameters. When compiled with XML_ATTR_INFO defined, adds new API member Modified: stable/9/contrib/expat/MANIFEST ============================================================================== --- stable/9/contrib/expat/MANIFEST Thu Jul 7 04:59:58 2016 (r302385) +++ stable/9/contrib/expat/MANIFEST Thu Jul 7 05:04:20 2016 (r302386) @@ -44,7 +44,7 @@ doc/reference.html doc/style.css doc/valid-xhtml10.png doc/xmlwf.1 -doc/xmlwf.sgml +doc/xmlwf.xml CMakeLists.txt CMake.README COPYING @@ -54,7 +54,7 @@ MANIFEST Makefile.in README configure -configure.in +configure.ac expat_config.h.in expat_config.h.cmake expat.pc.in Modified: stable/9/contrib/expat/Makefile.in ============================================================================== --- stable/9/contrib/expat/Makefile.in Thu Jul 7 04:59:58 2016 (r302385) +++ stable/9/contrib/expat/Makefile.in Thu Jul 7 05:04:20 2016 (r302386) @@ -42,7 +42,7 @@ INSTALL_DATA = @INSTALL_DATA@ mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs MANFILE = $(srcdir)/doc/xmlwf.1 -APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h +APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h expat_config.h LIBRARY = libexpat.la DESTDIR = $(INSTALL_ROOT) @@ -51,7 +51,7 @@ default: buildlib xmlwf/xmlwf@EXEEXT@ buildlib: $(LIBRARY) expat.pc -all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline +all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline $(MANFILE) clean: cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs @@ -77,7 +77,10 @@ check: tests/runtests tests/runtestspp tests/runtests tests/runtestspp -install: xmlwf/xmlwf@EXEEXT@ installlib +$(MANFILE): + $(MAKE) -C doc xmlwf.1 + +install: xmlwf/xmlwf@EXEEXT@ installlib $(MANFILE) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) @@ -116,7 +119,7 @@ CXXFLAGS = @CXXFLAGS@ VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ ### autoconf this? -LTFLAGS = --silent +LTFLAGS = --verbose COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS) @@ -154,11 +157,11 @@ xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIB examples/elements.@OBJEXT@: examples/elements.c examples/elements: examples/elements.@OBJEXT@ $(LIBRARY) - $(LINK_EXE) $< $(LIBRARY) + $(LINK_EXE) examples/elements.@OBJEXT@ $(LIBRARY) examples/outline.@OBJEXT@: examples/outline.c examples/outline: examples/outline.@OBJEXT@ $(LIBRARY) - $(LINK_EXE) $< $(LIBRARY) + $(LINK_EXE) examples/outline.@OBJEXT@ $(LIBRARY) tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h @@ -180,11 +183,19 @@ tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ http://www.w3.org/XML/Test/xmlts20080827.zip -tests/XML-Test-Suite: tests/xmlts.zip +tests/xmlconf: tests/xmlts.zip cd tests && unzip -q xmlts.zip -run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite - tests/xmltest.sh +run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/xmlconf + tests/xmltest.sh 2>&1 | tee tests/xmltest.log + diff -u tests/xmltest.log.expected tests/xmltest.log + +.PHONY: qa +qa: + ./qa.sh address + ./qa.sh memory + ./qa.sh undefined + ./qa.sh coverage .SUFFIXES: .c .cpp .lo .@OBJEXT@ Modified: stable/9/contrib/expat/README ============================================================================== --- stable/9/contrib/expat/README Thu Jul 7 04:59:58 2016 (r302385) +++ stable/9/contrib/expat/README Thu Jul 7 05:04:20 2016 (r302386) @@ -1,5 +1,5 @@ - Expat, Release 2.1.0 + Expat, Release 2.2.0 This is Expat, a C library for parsing XML, written by James Clark. Expat is a stream-oriented XML parser. This means that you register @@ -114,7 +114,7 @@ Note for Solaris users: The "ar" comman "/usr/ccs/bin", which is not in the default PATH. You will need to add this to your path for the "make" command, and probably also switch to GNU make (the "make" found in /usr/ccs/bin does not seem to work -properly -- appearantly it does not understand .PHONY directives). If +properly -- apparently it does not understand .PHONY directives). If you're using ksh or bash, use this command to build: PATH=/usr/ccs/bin:$PATH make Copied: stable/9/contrib/expat/configure.ac (from r302305, head/contrib/expat/configure.ac) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/expat/configure.ac Thu Jul 7 05:04:20 2016 (r302386, copy of r302305, head/contrib/expat/configure.ac) @@ -0,0 +1,157 @@ +dnl configuration script for expat +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright 2000 Clark Cooper +dnl +dnl This file is part of EXPAT. +dnl +dnl EXPAT is free software; you can redistribute it and/or modify it +dnl under the terms of the License (based on the MIT/X license) contained +dnl in the file COPYING that comes with this distribution. +dnl + +dnl Ensure that Expat is configured with autoconf 2.58 or newer +AC_PREREQ(2.58) + +dnl Get the version number of Expat, using m4's esyscmd() command to run +dnl the command at m4-generation time. This allows us to create an m4 +dnl symbol holding the correct version number. AC_INIT() requires the +dnl version number at m4-time, rather than when ./configure is run, so +dnl all this must happen as part of m4, not as part of the shell code +dnl contained in ./configure. +dnl +dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate +dnl test. I believe this test will work, but I don't have a place with non- +dnl GNU M4 to test it right now. +define([expat_version], ifdef([__gnu__], + [esyscmd(conftools/get-version.sh lib/expat.h)], + [2.2.x])) +AC_INIT(expat, expat_version, expat-bugs@libexpat.org) +undefine([expat_version]) + +AC_CONFIG_SRCDIR(Makefile.in) +AC_CONFIG_AUX_DIR(conftools) +AC_CONFIG_MACRO_DIR([m4]) + + +dnl +dnl Increment LIBREVISION if source code has changed at all +dnl +dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0 +dnl +dnl If the API changes compatibly (i.e. simply adding a new function +dnl without changing or removing earlier interfaces), then increment LIBAGE. +dnl +dnl If the API changes incompatibly set LIBAGE back to 0 +dnl + +LIBCURRENT=7 # sync +LIBREVISION=2 # with +LIBAGE=6 # CMakeLists.txt! + +AC_CONFIG_HEADER(expat_config.h) + +sinclude(conftools/ac_c_bigendian_cross.m4) + +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +AC_SUBST(LIBCURRENT) +AC_SUBST(LIBREVISION) +AC_SUBST(LIBAGE) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL + +if test "$GCC" = yes ; then + dnl + dnl Be careful about adding the -fexceptions option; some versions of + dnl GCC don't support it and it causes extra warnings that are only + dnl distracting; avoid. + dnl + OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" + CFLAGS="$OLDCFLAGS -fexceptions" + AC_MSG_CHECKING(whether $CC accepts -fexceptions) + AC_TRY_LINK( , , + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS") + if test "x$CXXFLAGS" = x ; then + CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` + fi +fi + +dnl Checks for header files. +AC_HEADER_STDC + +dnl Checks for typedefs, structures, and compiler characteristics. + +dnl Note: Avoid using AC_C_BIGENDIAN because it does not +dnl work in a cross compile. +AC_C_BIGENDIAN_CROSS + +AC_C_CONST +AC_TYPE_SIZE_T +AC_CHECK_FUNCS(memmove bcopy) + +dnl Only needed for xmlwf: +AC_CHECK_HEADERS(fcntl.h unistd.h) +AC_TYPE_OFF_T +AC_FUNC_MMAP + +if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then + FILEMAP=unixfilemap +else + FILEMAP=readfilemap +fi +AC_SUBST(FILEMAP) + +dnl Needed for the test support code; this was found at +dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html + +# AC_CPP_FUNC +# ------------------ # +# Checks to see if ANSI C99 CPP variable __func__ works. +# If not, perhaps __FUNCTION__ works instead. +# If not, we'll just define __func__ to "". +AC_DEFUN([AC_CPP_FUNC], +[AC_REQUIRE([AC_PROG_CC_STDC])dnl +AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[char *foo = __func__;]])], + [ac_cv_cpp_func=yes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[char *foo = __FUNCTION__;]])], + [ac_cv_cpp_func=__FUNCTION__], + [ac_cv_cpp_func=no])])]) +if test $ac_cv_cpp_func = __FUNCTION__; then + AC_DEFINE(__func__,__FUNCTION__, + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +elif test $ac_cv_cpp_func = no; then + AC_DEFINE(__func__,"", + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +fi +])# AC_CPP_FUNC + +AC_CPP_FUNC + + +dnl Some basic configuration: +AC_DEFINE([XML_NS], 1, + [Define to make XML Namespaces functionality available.]) +AC_DEFINE([XML_DTD], 1, + [Define to make parameter entity parsing functionality available.]) +AC_DEFINE([XML_CONTEXT_BYTES], 1024, + [Define to specify how much context to retain around the current parse point.]) + +AC_CONFIG_FILES([Makefile expat.pc]) +AC_OUTPUT + +abs_srcdir="`cd $srcdir && pwd`" +abs_builddir="`pwd`" +if test "$abs_srcdir" != "$abs_builddir"; then + make mkdir-init +fi Modified: stable/9/contrib/expat/doc/expat.png ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/9/contrib/expat/doc/reference.html ============================================================================== --- stable/9/contrib/expat/doc/reference.html Thu Jul 7 04:59:58 2016 (r302385) +++ stable/9/contrib/expat/doc/reference.html Thu Jul 7 05:04:20 2016 (r302386) @@ -2151,8 +2151,12 @@ Helps in preventing DoS attacks based on function behavior. In order to have an effect this must be called before parsing has started. Returns 1 if successful, 0 when called after XML_Parse or XML_ParseBuffer. -

Note: This call is optional, as the parser will auto-generate a new -random salt value if no value has been set at the start of parsing.

+

Note:This call is optional, as the parser will auto-generate +a new random salt value if no value has been set at the start of parsing. +

Note:One should not call XML_SetHashSalt with a +hash salt value of 0, as this value is used as sentinel value to indicate +that XML_SetHashSalt has not been called. Consequently +such a call will have no effect, even if it returns 1.


Modified: stable/9/contrib/expat/doc/xmlwf.1
==============================================================================
--- stable/9/contrib/expat/doc/xmlwf.1	Thu Jul  7 04:59:58 2016	(r302385)
+++ stable/9/contrib/expat/doc/xmlwf.1	Thu Jul  7 05:04:20 2016	(r302386)
@@ -1,33 +1,40 @@
-.\" This manpage has been automatically generated by docbook2man 
-.\" from a DocBook document.  This tool can be found at:
-.\"  
-.\" Please send any bug reports, improvements, comments, patches, 
-.\" etc. to Steve Cheng .
-.TH "XMLWF" "1" "24 January 2003" "" ""
+'\" -*- coding: us-ascii -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH XMLWF 1 "March 11, 2016" "" ""
 .SH NAME
 xmlwf \- Determines if an XML document is well-formed
 .SH SYNOPSIS
-
-\fBxmlwf\fR [ \fB-s\fR]  [ \fB-n\fR]  [ \fB-p\fR]  [ \fB-x\fR]  [ \fB-e \fIencoding\fB\fR]  [ \fB-w\fR]  [ \fB-d \fIoutput-dir\fB\fR]  [ \fB-c\fR]  [ \fB-m\fR]  [ \fB-r\fR]  [ \fB-t\fR]  [ \fB-v\fR]  [ \fBfile ...\fR] 
-
-.SH "DESCRIPTION"
-.PP
+'nh
+.fi
+.ad l
+\fBxmlwf\fR \kx
+.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
+'in \n(.iu+\nxu
+[\fB-s\fR] [\fB-n\fR] [\fB-p\fR] [\fB-x\fR] [\fB-e \fIencoding\fB\fR] [\fB-w\fR] [\fB-d \fIoutput-dir\fB\fR] [\fB-c\fR] [\fB-m\fR] [\fB-r\fR] [\fB-t\fR] [\fB-v\fR] [file ...]
+'in \n(.iu-\nxu
+.ad b
+'hy
+.SH DESCRIPTION
 \fBxmlwf\fR uses the Expat library to
-determine if an XML document is well-formed.  It is
+determine if an XML document is well-formed. It is
 non-validating.
 .PP
 If you do not specify any files on the command-line, and you
 have a recent version of \fBxmlwf\fR, the
 input file will be read from standard input.
 .SH "WELL-FORMED DOCUMENTS"
-.PP
 A well-formed document must adhere to the
 following rules:
 .TP 0.2i
 \(bu
-The file begins with an XML declaration.  For instance,
-.
-\fBNOTE:\fR
+The file begins with an XML declaration. For instance,
+\*(T<\*(T>.
+\fINOTE:\fR
 \fBxmlwf\fR does not currently
 check for a valid XML declaration.
 .TP 0.2i
@@ -36,8 +43,8 @@ Every start tag is either empty ()
 or has a corresponding end tag.
 .TP 0.2i
 \(bu
-There is exactly one root element.  This element must contain
-all other elements in the document.  Only comments, white
+There is exactly one root element. This element must contain
+all other elements in the document. Only comments, white
 space, and processing instructions may come after the close
 of the root element.
 .TP 0.2i
@@ -49,39 +56,38 @@ All attribute values are enclosed in quo
 or double).
 .PP
 If the document has a DTD, and it strictly complies with that
-DTD, then the document is also considered \fBvalid\fR.
+DTD, then the document is also considered \fIvalid\fR.
 \fBxmlwf\fR is a non-validating parser --
-it does not check the DTD.  However, it does support
-external entities (see the \fB-x\fR option).
-.SH "OPTIONS"
-.PP
+it does not check the DTD. However, it does support
+external entities (see the \*(T<\fB\-x\fR\*(T> option).
+.SH OPTIONS
 When an option includes an argument, you may specify the argument either
-separately ("\fB-d\fR output") or concatenated with the
-option ("\fB-d\fRoutput").  \fBxmlwf\fR
+separately ("\*(T<\fB\-d\fR\*(T> output") or concatenated with the
+option ("\*(T<\fB\-d\fR\*(T>output"). \fBxmlwf\fR
 supports both.
-.TP
-\fB-c\fR
+.TP 
+\*(T<\fB\-c\fR\*(T>
 If the input file is well-formed and \fBxmlwf\fR
 doesn't encounter any errors, the input file is simply copied to
 the output directory unchanged.
-This implies no namespaces (turns off \fB-n\fR) and
-requires \fB-d\fR to specify an output file.
-.TP
-\fB-d output-dir\fR
+This implies no namespaces (turns off \*(T<\fB\-n\fR\*(T>) and
+requires \*(T<\fB\-d\fR\*(T> to specify an output file.
+.TP 
+\*(T<\fB\-d output\-dir\fR\*(T>
 Specifies a directory to contain transformed
 representations of the input files.
-By default, \fB-d\fR outputs a canonical representation
+By default, \*(T<\fB\-d\fR\*(T> outputs a canonical representation
 (described below).
-You can select different output formats using \fB-c\fR
-and \fB-m\fR.
+You can select different output formats using \*(T<\fB\-c\fR\*(T>
+and \*(T<\fB\-m\fR\*(T>.
 
 The output filenames will
 be exactly the same as the input filenames or "STDIN" if the input is
-coming from standard input.  Therefore, you must be careful that the
+coming from standard input. Therefore, you must be careful that the
 output file does not go into the same directory as the input
-file.  Otherwise, \fBxmlwf\fR will delete the
+file. Otherwise, \fBxmlwf\fR will delete the
 input file before it generates the output file (just like running
-cat < file > file in most shells).
+\*(T file\*(T> in most shells).
 
 Two structurally equivalent XML documents have a byte-for-byte
 identical canonical XML representation.
@@ -89,39 +95,39 @@ Note that ignorable white space is consi
 is treated equivalently to data.
 More on canonical XML can be found at
 http://www.jclark.com/xml/canonxml.html .
-.TP
-\fB-e encoding\fR
+.TP 
+\*(T<\fB\-e encoding\fR\*(T>
 Specifies the character encoding for the document, overriding
-any document encoding declaration.  \fBxmlwf\fR
+any document encoding declaration. \fBxmlwf\fR
 supports four built-in encodings:
-US-ASCII,
-UTF-8,
-UTF-16, and
-ISO-8859-1.
-Also see the \fB-w\fR option.
-.TP
-\fB-m\fR
+\*(T,
+\*(T,
+\*(T, and
+\*(T.
+Also see the \*(T<\fB\-w\fR\*(T> option.
+.TP 
+\*(T<\fB\-m\fR\*(T>
 Outputs some strange sort of XML file that completely
 describes the input file, including character positions.
-Requires \fB-d\fR to specify an output file.
-.TP
-\fB-n\fR
-Turns on namespace processing.  (describe namespaces)
-\fB-c\fR disables namespaces.
-.TP
-\fB-p\fR
+Requires \*(T<\fB\-d\fR\*(T> to specify an output file.
+.TP 
+\*(T<\fB\-n\fR\*(T>
+Turns on namespace processing. (describe namespaces)
+\*(T<\fB\-c\fR\*(T> disables namespaces.
+.TP 
+\*(T<\fB\-p\fR\*(T>
 Tells xmlwf to process external DTDs and parameter
 entities.
 
 Normally \fBxmlwf\fR never parses parameter
-entities.  \fB-p\fR tells it to always parse them.
-\fB-p\fR implies \fB-x\fR.
-.TP
-\fB-r\fR
+entities. \*(T<\fB\-p\fR\*(T> tells it to always parse them.
+\*(T<\fB\-p\fR\*(T> implies \*(T<\fB\-x\fR\*(T>.
+.TP 
+\*(T<\fB\-r\fR\*(T>
 Normally \fBxmlwf\fR memory-maps the XML file
 before parsing; this can result in faster parsing on many
 platforms.
-\fB-r\fR turns off memory-mapping and uses normal file
+\*(T<\fB\-r\fR\*(T> turns off memory-mapping and uses normal file
 IO calls instead.
 Of course, memory-mapping is automatically turned off
 when reading from standard input.
@@ -131,34 +137,33 @@ substantially higher memory usage for
 \fBxmlwf\fR, but this appears to be a matter of
 the operating system reporting memory in a strange way; there is
 not a leak in \fBxmlwf\fR.
-.TP
-\fB-s\fR
+.TP 
+\*(T<\fB\-s\fR\*(T>
 Prints an error if the document is not standalone. 
 A document is standalone if it has no external subset and no
 references to parameter entities.
-.TP
-\fB-t\fR
-Turns on timings.  This tells Expat to parse the entire file,
+.TP 
+\*(T<\fB\-t\fR\*(T>
+Turns on timings. This tells Expat to parse the entire file,
 but not perform any processing.
 This gives a fairly accurate idea of the raw speed of Expat itself
 without client overhead.
-\fB-t\fR turns off most of the output options
-(\fB-d\fR, \fB-m\fR, \fB-c\fR,
-\&...).
-.TP
-\fB-v\fR
+\*(T<\fB\-t\fR\*(T> turns off most of the output options
+(\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-m\fR\*(T>, \*(T<\fB\-c\fR\*(T>, ...).
+.TP 
+\*(T<\fB\-v\fR\*(T>
 Prints the version of the Expat library being used, including some
 information on the compile-time configuration of the library, and
 then exits.
-.TP
-\fB-w\fR
+.TP 
+\*(T<\fB\-w\fR\*(T>
 Enables support for Windows code pages.
 Normally, \fBxmlwf\fR will throw an error if it
-runs across an encoding that it is not equipped to handle itself.  With
-\fB-w\fR, xmlwf will try to use a Windows code
-page.  See also \fB-e\fR.
-.TP
-\fB-x\fR
+runs across an encoding that it is not equipped to handle itself. With
+\*(T<\fB\-w\fR\*(T>, xmlwf will try to use a Windows code
+page. See also \*(T<\fB\-e\fR\*(T>.
+.TP 
+\*(T<\fB\-x\fR\*(T>
 Turns on parsing external entities.
 
 Non-validating parsers are not required to resolve external
@@ -172,80 +177,75 @@ data from outside the XML file currently
 This is an example of an internal entity:
 
 .nf
+
 
 .fi
 
 And here are some examples of external entities:
 
 .nf
-  (parsed)
+
+  (parsed)
          (unparsed)
 .fi
-.TP
-\fB--\fR
+.TP 
+\*(T<\fB\-\-\fR\*(T>
 (Two hyphens.)
-Terminates the list of options.  This is only needed if a filename
-starts with a hyphen.  For example:
+Terminates the list of options. This is only needed if a filename
+starts with a hyphen. For example:
 
 .nf
-xmlwf -- -myfile.xml
+
+xmlwf \-\- \-myfile.xml
 .fi
 
 will run \fBxmlwf\fR on the file
-\fI-myfile.xml\fR.
+\*(T<\fI\-myfile.xml\fR\*(T>.
 .PP
 Older versions of \fBxmlwf\fR do not support
 reading from standard input.
-.SH "OUTPUT"
-.PP
+.SH OUTPUT
 If an input file is not well-formed,
 \fBxmlwf\fR prints a single line describing
-the problem to standard output.  If a file is well formed,
+the problem to standard output. If a file is well formed,
 \fBxmlwf\fR outputs nothing.
-Note that the result code is \fBnot\fR set.
-.SH "BUGS"
-.PP
-According to the W3C standard, an XML file without a
-declaration at the beginning is not considered well-formed.
-However, \fBxmlwf\fR allows this to pass.
-.PP
+Note that the result code is \fInot\fR set.
+.SH BUGS
 \fBxmlwf\fR returns a 0 - noerr result,
-even if the file is not well-formed.  There is no good way for
+even if the file is not well-formed. There is no good way for
 a program to use \fBxmlwf\fR to quickly
 check a file -- it must parse \fBxmlwf\fR's
 standard output.
 .PP
 The errors should go to standard error, not standard output.
 .PP
-There should be a way to get \fB-d\fR to send its
+There should be a way to get \*(T<\fB\-d\fR\*(T> to send its
 output to standard output rather than forcing the user to send
 it to a file.
 .PP
 I have no idea why anyone would want to use the
-\fB-d\fR, \fB-c\fR, and
-\fB-m\fR options.  If someone could explain it to
+\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-c\fR\*(T>, and
+\*(T<\fB\-m\fR\*(T> options. If someone could explain it to
 me, I'd like to add this information to this manpage.
-.SH "ALTERNATIVES"
-.PP
+.SH ALTERNATIVES
 Here are some XML validators on the web:
 
 .nf
-http://www.hcrc.ed.ac.uk/~richard/xml-check.html
+
+http://www.hcrc.ed.ac.uk/~richard/xml\-check.html
 http://www.stg.brown.edu/service/xmlvalid/
 http://www.scripting.com/frontier5/xml/code/xmlValidator.html
 http://www.xml.com/pub/a/tools/ruwf/check.html
 .fi
 .SH "SEE ALSO"
-.PP
-
 .nf
+
 The Expat home page:        http://www.libexpat.org/
-The W3 XML specification:   http://www.w3.org/TR/REC-xml
+The W3 XML specification:   http://www.w3.org/TR/REC\-xml
 .fi
-.SH "AUTHOR"
-.PP
-This manual page was written by Scott Bronson  for
-the Debian GNU/Linux system (but may be used by others).  Permission is
+.SH AUTHOR
+This manual page was written by Scott Bronson <\*(T> for
+the Debian GNU/Linux system (but may be used by others). Permission is
 granted to copy, distribute and/or modify this document under
 the terms of the GNU Free Documentation
 License, Version 1.1.

Copied: stable/9/contrib/expat/doc/xmlwf.xml (from r302305, head/contrib/expat/doc/xmlwf.xml)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/contrib/expat/doc/xmlwf.xml	Thu Jul  7 05:04:20 2016	(r302386, copy of r302305, head/contrib/expat/doc/xmlwf.xml)
@@ -0,0 +1,440 @@
+
+  Scott">
+  Bronson">
+  
+  March 11, 2016">
+  
+  1">
+  bronson@rinspin.com">
+  
+  XMLWF">
+  
+
+  Debian GNU/Linux">
+  GNU">
+]>
+
+
+  
+    
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2001 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + Determines if an XML document is well-formed + + + + &dhpackage; + + + + + + + + + + + + + + + + + + file ... + + + + + DESCRIPTION + + + &dhpackage; uses the Expat library to + determine if an XML document is well-formed. It is + non-validating. + + + + If you do not specify any files on the command-line, and you + have a recent version of &dhpackage;, the + input file will be read from standard input. + + + + + + WELL-FORMED DOCUMENTS + + + A well-formed document must adhere to the + following rules: + + + + + The file begins with an XML declaration. For instance, + <?xml version="1.0" standalone="yes"?>. + NOTE: + &dhpackage; does not currently + check for a valid XML declaration. + + + Every start tag is either empty (<tag/>) + or has a corresponding end tag. + + + There is exactly one root element. This element must contain + all other elements in the document. Only comments, white + space, and processing instructions may come after the close + of the root element. + + + All elements nest properly. + + + All attribute values are enclosed in quotes (either single + or double). + + + + + If the document has a DTD, and it strictly complies with that + DTD, then the document is also considered valid. + &dhpackage; is a non-validating parser -- + it does not check the DTD. However, it does support + external entities (see the option). + + + + + OPTIONS + + +When an option includes an argument, you may specify the argument either +separately (" output") or concatenated with the +option ("output"). &dhpackage; +supports both. + + + + + + + + + If the input file is well-formed and &dhpackage; + doesn't encounter any errors, the input file is simply copied to + the output directory unchanged. + This implies no namespaces (turns off ) and + requires to specify an output file. + + + + + + + + + Specifies a directory to contain transformed + representations of the input files. + By default, outputs a canonical representation + (described below). + You can select different output formats using + and . + + + The output filenames will + be exactly the same as the input filenames or "STDIN" if the input is + coming from standard input. Therefore, you must be careful that the + output file does not go into the same directory as the input + file. Otherwise, &dhpackage; will delete the + input file before it generates the output file (just like running + cat < file > file in most shells). + + + Two structurally equivalent XML documents have a byte-for-byte + identical canonical XML representation. + Note that ignorable white space is considered significant and + is treated equivalently to data. + More on canonical XML can be found at + http://www.jclark.com/xml/canonxml.html . + + + + + + + + + Specifies the character encoding for the document, overriding + any document encoding declaration. &dhpackage; + supports four built-in encodings: + US-ASCII, + UTF-8, + UTF-16, and + ISO-8859-1. + Also see the option. + + + + + + + + + Outputs some strange sort of XML file that completely + describes the input file, including character positions. + Requires to specify an output file. + + + + + + + + + Turns on namespace processing. (describe namespaces) + disables namespaces. + + + + + + + + + Tells xmlwf to process external DTDs and parameter + entities. + + + Normally &dhpackage; never parses parameter + entities. tells it to always parse them. + implies . + + + + + + + + + Normally &dhpackage; memory-maps the XML file + before parsing; this can result in faster parsing on many + platforms. + turns off memory-mapping and uses normal file + IO calls instead. + Of course, memory-mapping is automatically turned off + when reading from standard input. + + + Use of memory-mapping can cause some platforms to report + substantially higher memory usage for + &dhpackage;, but this appears to be a matter of + the operating system reporting memory in a strange way; there is + not a leak in &dhpackage;. + + + + + + + + + Prints an error if the document is not standalone. + A document is standalone if it has no external subset and no + references to parameter entities. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 7 05:47:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FB4DB76380; Thu, 7 Jul 2016 05:47:43 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10EC41B16; Thu, 7 Jul 2016 05:47:42 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u675lgIZ087538; Thu, 7 Jul 2016 05:47:42 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u675lgmS087537; Thu, 7 Jul 2016 05:47:42 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201607070547.u675lgmS087537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Thu, 7 Jul 2016 05:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302387 - head/release/arm64 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 05:47:43 -0000 Author: wma Date: Thu Jul 7 05:47:42 2016 New Revision: 302387 URL: https://svnweb.freebsd.org/changeset/base/302387 Log: ARM64: move to GPT scheme in sysinstall It's time to abandon MBR installations on ARM64 platforms. Obtained from: Semihalf Submitted by: Dominik Ermel Sponsored by: Cavium Reviewed by: gjb, emaste, marcel Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D6798 Modified: head/release/arm64/make-memstick.sh Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Thu Jul 7 05:04:20 2016 (r302386) +++ head/release/arm64/make-memstick.sh Thu Jul 7 05:47:42 2016 (r302387) @@ -38,6 +38,6 @@ fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s mbr -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2} +mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2} rm ${2}.part From owner-svn-src-all@freebsd.org Thu Jul 7 09:03:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96B5CB74158; Thu, 7 Jul 2016 09:03:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 730F51CF1; Thu, 7 Jul 2016 09:03:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6793vdk060721; Thu, 7 Jul 2016 09:03:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6793vI4060716; Thu, 7 Jul 2016 09:03:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607070903.u6793vI4060716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 7 Jul 2016 09:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302388 - in head: sbin/umount sys/kern sys/sys usr.sbin/autofs 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 09:03:58 -0000 Author: trasz Date: Thu Jul 7 09:03:57 2016 New Revision: 302388 URL: https://svnweb.freebsd.org/changeset/base/302388 Log: Add new unmount(2) flag, MNT_NONBUSY, to check whether there are any open vnodes before proceeding. Make autounmound(8) use this flag. Without it, even an unsuccessfull unmount causes filesystem flush, which interferes with normal operation. Reviewed by: kib@ Approved by: re (gjb@) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7047 Modified: head/sbin/umount/umount.8 head/sbin/umount/umount.c head/sys/kern/vfs_mount.c head/sys/sys/mount.h head/usr.sbin/autofs/autounmountd.c Modified: head/sbin/umount/umount.8 ============================================================================== --- head/sbin/umount/umount.8 Thu Jul 7 05:47:42 2016 (r302387) +++ head/sbin/umount/umount.8 Thu Jul 7 09:03:57 2016 (r302388) @@ -28,7 +28,7 @@ .\" @(#)umount.8 8.2 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd June 17, 2015 +.Dd July 7, 2016 .Dt UMOUNT 8 .Os .Sh NAME @@ -36,12 +36,12 @@ .Nd unmount file systems .Sh SYNOPSIS .Nm -.Op Fl fv +.Op Fl fnv .Ar special ... | node ... | fsid ... .Nm .Fl a | A .Op Fl F Ar fstab -.Op Fl fv +.Op Fl fnv .Op Fl h Ar host .Op Fl t Ar type .Sh DESCRIPTION @@ -94,6 +94,15 @@ option and, unless otherwise specified w option, will only unmount .Tn NFS file systems. +.It Fl n +Unless the +.Fl f +is used, the +.Nm +will not unmount an active file system. +It will, however, perform a flush. +This flag disables this behaviour, preventing the flush +if there are any files open. .It Fl t Ar type Is used to indicate the actions should only be taken on file systems of the specified type. Modified: head/sbin/umount/umount.c ============================================================================== --- head/sbin/umount/umount.c Thu Jul 7 05:47:42 2016 (r302387) +++ head/sbin/umount/umount.c Thu Jul 7 09:03:57 2016 (r302388) @@ -91,7 +91,7 @@ main(int argc, char *argv[]) struct addrinfo hints; all = errs = 0; - while ((ch = getopt(argc, argv, "AaF:fh:t:v")) != -1) + while ((ch = getopt(argc, argv, "AaF:fh:nt:v")) != -1) switch (ch) { case 'A': all = 2; @@ -103,12 +103,15 @@ main(int argc, char *argv[]) setfstab(optarg); break; case 'f': - fflag = MNT_FORCE; + fflag |= MNT_FORCE; break; case 'h': /* -h implies -A. */ all = 2; nfshost = optarg; break; + case 'n': + fflag |= MNT_NONBUSY; + break; case 't': if (typelist != NULL) err(1, "only one -t option may be specified"); @@ -124,8 +127,11 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if ((fflag & MNT_FORCE) != 0 && (fflag & MNT_NONBUSY) != 0) + err(1, "-f and -n are mutually exclusive"); + /* Start disks transferring immediately. */ - if ((fflag & MNT_FORCE) == 0) + if ((fflag & (MNT_FORCE | MNT_NONBUSY)) == 0) sync(); if ((argc == 0 && !all) || (argc != 0 && all)) @@ -609,7 +615,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: umount [-fv] special ... | node ... | fsid ...", - " umount -a | -A [-F fstab] [-fv] [-h host] [-t type]"); + "usage: umount [-fnv] special ... | node ... | fsid ...", + " umount -a | -A [-F fstab] [-fnv] [-h host] [-t type]"); exit(1); } Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Jul 7 05:47:42 2016 (r302387) +++ head/sys/kern/vfs_mount.c Thu Jul 7 09:03:57 2016 (r302388) @@ -1205,6 +1205,28 @@ sys_unmount(struct thread *td, struct un } /* + * Return error if any of the vnodes, ignoring the root vnode + * and the syncer vnode, have non-zero usecount. + */ +static int +vfs_check_usecounts(struct mount *mp) +{ + struct vnode *vp, *mvp; + + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if ((vp->v_vflag & VV_ROOT) == 0 && vp->v_type != VNON && + vp->v_usecount != 0) { + VI_UNLOCK(vp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); + return (EBUSY); + } + VI_UNLOCK(vp); + } + + return (0); +} + +/* * Do the actual filesystem unmount. */ int @@ -1260,6 +1282,21 @@ dounmount(struct mount *mp, int flags, s return (EBUSY); } mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ; + if (flags & MNT_NONBUSY) { + MNT_IUNLOCK(mp); + error = vfs_check_usecounts(mp); + MNT_ILOCK(mp); + if (error != 0) { + mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ); + MNT_IUNLOCK(mp); + if (coveredvp != NULL) { + VOP_UNLOCK(coveredvp, 0); + vdrop(coveredvp); + } + vn_finished_write(mp); + return (error); + } + } /* Allow filesystems to detect that a forced unmount is in progress. */ if (flags & MNT_FORCE) { mp->mnt_kern_flag |= MNTK_UNMOUNTF; Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Thu Jul 7 05:47:42 2016 (r302387) +++ head/sys/sys/mount.h Thu Jul 7 09:03:57 2016 (r302388) @@ -312,17 +312,21 @@ void __mnt_vnode_markerfree_act * External filesystem command modifier flags. * Unmount can use the MNT_FORCE flag. * XXX: These are not STATES and really should be somewhere else. - * XXX: MNT_BYFSID collides with MNT_ACLS, but because MNT_ACLS is only used for - * mount(2) and MNT_BYFSID is only used for unmount(2) it's harmless. + * XXX: MNT_BYFSID and MNT_NONBUSY collide with MNT_ACLS and MNT_MULTILABEL, + * but because MNT_ACLS and MNT_MULTILABEL are only used for mount(2), + * and MNT_BYFSID and MNT_NONBUSY are only used for unmount(2), + * it's harmless. */ #define MNT_UPDATE 0x0000000000010000ULL /* not real mount, just update */ #define MNT_DELEXPORT 0x0000000000020000ULL /* delete export host lists */ #define MNT_RELOAD 0x0000000000040000ULL /* reload filesystem data */ #define MNT_FORCE 0x0000000000080000ULL /* force unmount or readonly */ #define MNT_SNAPSHOT 0x0000000001000000ULL /* snapshot the filesystem */ +#define MNT_NONBUSY 0x0000000004000000ULL /* check vnode use counts. */ #define MNT_BYFSID 0x0000000008000000ULL /* specify filesystem by ID. */ #define MNT_CMDFLAGS (MNT_UPDATE | MNT_DELEXPORT | MNT_RELOAD | \ - MNT_FORCE | MNT_SNAPSHOT | MNT_BYFSID) + MNT_FORCE | MNT_SNAPSHOT | MNT_NONBUSY | \ + MNT_BYFSID) /* * Internal filesystem control flags stored in mnt_kern_flag. * Modified: head/usr.sbin/autofs/autounmountd.c ============================================================================== --- head/usr.sbin/autofs/autounmountd.c Thu Jul 7 05:47:42 2016 (r302387) +++ head/usr.sbin/autofs/autounmountd.c Thu Jul 7 09:03:57 2016 (r302388) @@ -161,7 +161,7 @@ unmount_by_fsid(const fsid_t fsid, const if (ret < 0) log_err(1, "asprintf"); - error = unmount(fsid_str, MNT_BYFSID); + error = unmount(fsid_str, MNT_NONBUSY | MNT_BYFSID); if (error != 0) { if (errno == EBUSY) { log_debugx("cannot unmount %s (%s): %s", From owner-svn-src-all@freebsd.org Thu Jul 7 09:22:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE1FCB7454F; Thu, 7 Jul 2016 09:22:42 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 807801648; Thu, 7 Jul 2016 09:22:42 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u679Mf3U067932; Thu, 7 Jul 2016 09:22:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u679MfEu067931; Thu, 7 Jul 2016 09:22:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607070922.u679MfEu067931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 7 Jul 2016 09:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r302389 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 09:22:42 -0000 Author: andrew Date: Thu Jul 7 09:22:41 2016 New Revision: 302389 URL: https://svnweb.freebsd.org/changeset/base/302389 Log: Free Emmanuel Vadot from mentorship to collect his own pointy hats. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Jul 7 09:03:57 2016 (r302388) +++ svnadmin/conf/mentors Thu Jul 7 09:22:41 2016 (r302389) @@ -26,7 +26,6 @@ kadesai ken Co-mentor: scottl, ambrisk karels gnn landonf adrian mahrens mckusick -manu andrew Co-mentor: cognet miwi rwatson monthadar adrian peterj jhb Co-mentor: grog From owner-svn-src-all@freebsd.org Thu Jul 7 14:29:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD5FEB82253; Thu, 7 Jul 2016 14:29:24 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969B61A01; Thu, 7 Jul 2016 14:29:24 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67ETN9i080559; Thu, 7 Jul 2016 14:29:23 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67ETN8j080558; Thu, 7 Jul 2016 14:29:23 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607071429.u67ETN8j080558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Thu, 7 Jul 2016 14:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302390 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 14:29:24 -0000 Author: skreuzer (doc,ports committer) Date: Thu Jul 7 14:29:23 2016 New Revision: 302390 URL: https://svnweb.freebsd.org/changeset/base/302390 Log: Document 299786, Support for X-Powers AXP813 and AXP818 PMIC Approved by: re (gjb, implicit, relnotes) 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 Thu Jul 7 09:22:41 2016 (r302389) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 7 14:29:23 2016 (r302390) @@ -1513,6 +1513,9 @@ Support for the Allwinner H3 SoC has been added. + Support for X-Powers AXP813 and + AXP818 power management integrated circuits have been added. + Support for GPIO, Sensors and interrupts on AXP209 power management integrated circuits have been added. From owner-svn-src-all@freebsd.org Thu Jul 7 15:25:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68948B82BEA; Thu, 7 Jul 2016 15:25:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 389E813E5; Thu, 7 Jul 2016 15:25:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67FPEVw002660; Thu, 7 Jul 2016 15:25:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67FPE5F002659; Thu, 7 Jul 2016 15:25:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607071525.u67FPE5F002659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 7 Jul 2016 15:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302391 - head 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 15:25:15 -0000 Author: andrew Date: Thu Jul 7 15:25:14 2016 New Revision: 302391 URL: https://svnweb.freebsd.org/changeset/base/302391 Log: Stop deleting ofwdump.8.gz on arm and arm64 when running make delete-old, it is installed on these architectures. Approved by: re (kib) Sponsored by: ABT Systems Ltd Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jul 7 14:29:23 2016 (r302390) +++ head/ObsoleteFiles.inc Thu Jul 7 15:25:14 2016 (r302391) @@ -8014,7 +8014,9 @@ OLD_FILES+=usr/share/man/man5/usbd.conf. .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif -.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && ${TARGET_ARCH} != "sparc64" +.if ${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && \ + ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ + ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz .endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz From owner-svn-src-all@freebsd.org Thu Jul 7 17:22:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40D7DB82716; Thu, 7 Jul 2016 17:22:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DBE81C9C; Thu, 7 Jul 2016 17:22:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67HMDwL046481; Thu, 7 Jul 2016 17:22:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67HMDoU046479; Thu, 7 Jul 2016 17:22:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607071722.u67HMDoU046479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 7 Jul 2016 17:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302392 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 17:22:14 -0000 Author: adrian Date: Thu Jul 7 17:22:13 2016 New Revision: 302392 URL: https://svnweb.freebsd.org/changeset/base/302392 Log: [ath] obey the short-GI vap config flag when transmitting. This makes 'ifconfig wlanX -shortgi' work correctly. Tested: * AR9380, STA mode Approved by: re (gjb) Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Thu Jul 7 15:25:14 2016 (r302391) +++ head/sys/dev/ath/if_ath_tx_ht.c Thu Jul 7 17:22:13 2016 (r302392) @@ -222,6 +222,7 @@ void ath_tx_rate_fill_rcflags(struct ath_softc *sc, struct ath_buf *bf) { struct ieee80211_node *ni = bf->bf_node; + struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; const HAL_RATE_TABLE *rt = sc->sc_currates; struct ath_rc_series *rc = bf->bf_state.bfs_rc; @@ -280,12 +281,14 @@ ath_tx_rate_fill_rcflags(struct ath_soft if (ni->ni_chw == 40 && ic->ic_htcaps & IEEE80211_HTCAP_SHORTGI40 && - ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) + ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40 && + vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40) rc[i].flags |= ATH_RC_SGI_FLAG; if (ni->ni_chw == 20 && ic->ic_htcaps & IEEE80211_HTCAP_SHORTGI20 && - ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20) + ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20 && + vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) rc[i].flags |= ATH_RC_SGI_FLAG; /* From owner-svn-src-all@freebsd.org Thu Jul 7 17:41:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DA95B82A9D; Thu, 7 Jul 2016 17:41:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 ECA0216A3; Thu, 7 Jul 2016 17:41:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x230.google.com with SMTP id f30so28338261ioj.2; Thu, 07 Jul 2016 10:41:46 -0700 (PDT) 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; bh=ShEgo5gdGuu+9lqpo+U17SqPTWZf8AXl77i2knmjpzs=; b=LMRenEc2LLgwLNHb5Hhke1ZJE4PmUzScm1LZQ9fEaILNHRZHXzDCDApWACHFdFJLrZ 2xRZNh0KdbqAInzZ8zg0lD3ITfrlagsM2v7krKKczPTkAMVRCs3dBuMw8zL1em8rLCQi 3cIftBAgCIHLV0vR6fadC3rBwh6ctE2xLii8bMj5M3JjrrBQp+WbYl1xI1QpBAefpnST ZOW+bCEGJtYYMDXvPhWt83dporol8P+HqaFm3HeVU/Nkq6khL35huH95VBSEcm17jKyh MN6FIdrLI9bcksMphHyy9zyGElxHCBp8g1AYG7U/YSKJtDWlOjzo3jwVkvr3bBR9gcFv XVvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ShEgo5gdGuu+9lqpo+U17SqPTWZf8AXl77i2knmjpzs=; b=Su7WT4oMFoew4RwyBuom9xmniXPh9HDJcvhUtOGKICXLm73g8jyIyDp7Aan0pEL3EY eg7w5sA8BJhlvebEESG9ToARXxeRCw0+zfwEZM0Ufv7G6ZXs41Oo0Y0V+Si4wvIMn6Rh FG2mZY/AKaMxHOZzjyrGuj0biAwPutw+MOyhPAOtSyDy1U9hJoT1BnNNtqkVXyWJPeAY rSv8p2CcTQXegT5egK+pJqty/bHydMtmUZMvkarOWbkrit09JQitw+n5pGZNGeC4IVW5 xOv779yQX4kPjf+c2hdJjx4RW0mCvLAlxf5VQLzaolhibG57vsr+HO6SiGevzZBjSK8G 1ccg== X-Gm-Message-State: ALyK8tKN4FA2lDhvRtZgQG/WaGTMqwOZkxnyTs9qKEKFe5H7E2W052cb41aIzu98pGTK8PEtuX2tv78WmN7LWQ== X-Received: by 10.107.159.16 with SMTP id i16mr4090374ioe.29.1467913306192; Thu, 07 Jul 2016 10:41:46 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.6.213 with HTTP; Thu, 7 Jul 2016 10:41:26 -0700 (PDT) In-Reply-To: <201607071525.u67FPE5F002659@repo.freebsd.org> References: <201607071525.u67FPE5F002659@repo.freebsd.org> From: Ed Maste Date: Thu, 7 Jul 2016 13:41:26 -0400 X-Google-Sender-Auth: y1XEkzaAEze3uWVh6tn1wMoyYYY Message-ID: Subject: Re: svn commit: r302391 - head To: Andrew Turner Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 17:41:47 -0000 On 7 July 2016 at 11:25, Andrew Turner wrote: > Author: andrew > Date: Thu Jul 7 15:25:14 2016 > New Revision: 302391 > URL: https://svnweb.freebsd.org/changeset/base/302391 > > Log: > Stop deleting ofwdump.8.gz on arm and arm64 when running make delete-old, > it is installed on these architectures. It's also installed on MIPS. From owner-svn-src-all@freebsd.org Thu Jul 7 18:09:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E8AB7514C; Thu, 7 Jul 2016 18:09:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id B7195156C; Thu, 7 Jul 2016 18:09:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id B09B11148; Thu, 7 Jul 2016 18:09:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 638E518B21; Thu, 7 Jul 2016 18:09:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id UtcdDaDmtcRP; Thu, 7 Jul 2016 18:09:02 +0000 (UTC) Subject: Re: svn commit: r302391 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E295518B17 To: Andrew Turner , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607071525.u67FPE5F002659@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <66204d85-cda5-9fe5-7d75-67672b57b54b@FreeBSD.org> Date: Thu, 7 Jul 2016 11:08:59 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607071525.u67FPE5F002659@repo.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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 18:09:05 -0000 On 7/7/16 8:25 AM, Andrew Turner wrote: > Author: andrew > Date: Thu Jul 7 15:25:14 2016 > New Revision: 302391 > URL: https://svnweb.freebsd.org/changeset/base/302391 > > Log: > Stop deleting ofwdump.8.gz on arm and arm64 when running make delete-old, > it is installed on these architectures. > > Approved by: re (kib) > Sponsored by: ABT Systems Ltd > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Thu Jul 7 14:29:23 2016 (r302390) > +++ head/ObsoleteFiles.inc Thu Jul 7 15:25:14 2016 (r302391) > @@ -8014,7 +8014,9 @@ OLD_FILES+=usr/share/man/man5/usbd.conf. > .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" > OLD_FILES+=usr/share/man/man8/boot_i386.8.gz > .endif > -.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && ${TARGET_ARCH} != "sparc64" > +.if ${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && \ TARGET_CPUARCH is not valid here. # make check-old make[1]: "/root/git/freebsd/ObsoleteFiles.inc" line 8019: Malformed conditional (${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && ${TARGET_ARCH} != "sparc64") make[1]: Fatal errors encountered -- cannot continue make[1]: stopped in /root/git/freebsd > + ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ > + ${TARGET_ARCH} != "sparc64" > OLD_FILES+=usr/share/man/man8/ofwdump.8.gz > .endif > OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz > -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Jul 7 18:16:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E034B75374 for ; Thu, 7 Jul 2016 18:16:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (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 CB0921A77 for ; Thu, 7 Jul 2016 18:16:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id h190so26371785ith.1 for ; Thu, 07 Jul 2016 11:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=db/JZW84ChpgKebV28egscRQ59TuSy/ZKLXK+DZ8rVM=; b=u9DOOxBo22jakxMU4JL49qPyvPD178ygPP274bTw7OAwbWJlngpp2n0omX4iGD8A+J O9nbxfBoOQkOAlQ38nbKBosJMrRtsN16xAuHD7qUBo1tu/Qg45UFeKhi4XhdDM44AYoi 2IBpRyxoSsBnkAMu7sNuM+rw64S40Os5WespnunvNcyO4pgHowvmRWD+Oo6HO7BZuaNx P+7H87NXiDCY+QCV0RPMUOC2AlN1lwSAG6fkz6HYrLxpGlvxrQggUOUjlD2LKMTTqmat Q6U7A5Xm3hRxOkaFaL9EcFyzzUoZKtNhgC49bB4Y4rt8+JBehquYoXK50h1YIX+WCS23 wjBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=db/JZW84ChpgKebV28egscRQ59TuSy/ZKLXK+DZ8rVM=; b=MO85WTlAN34ROs/RNc3W4zfIQbeRXzGRf+ilXky7yylHSnTvwubvuRly5g5VeGIJNF Lvzm1S/wfoxL7BcYuWoV6pxx1cqF06kNnX9s+n4XxIzTnVr1ecleMcnxVUTNwh0F8olB MLxg/CB5bcYmdC8TqtXQS5PCUkMPW3VZie/IcqzJEGqdjyV2cAgM2x3ytuTaRhDFohmw oWEiaRiTG0HfqnN2+Y3ksNXNaDKRTThWaWMv+tlqYcpskFsggy0MU85EfYggz1X/FsRu Ad1GTjfx+XxWrz9mVMsLcqY8V4ogbvgRNYeQE6i9Ab2Bu+Yj2fTYL0i0buZonK4f5nvw a+pg== X-Gm-Message-State: ALyK8tKJbO43Ynu6sw+qZLDkHwW9AhOXMxmKlzLiwgISI2FXbUycVeXv0ZtqW3BSImlHwSHc9k6esbgnLxJR2w== X-Received: by 10.36.41.16 with SMTP id p16mr4708367itp.60.1467915391404; Thu, 07 Jul 2016 11:16:31 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.137.131 with HTTP; Thu, 7 Jul 2016 11:16:30 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <66204d85-cda5-9fe5-7d75-67672b57b54b@FreeBSD.org> References: <201607071525.u67FPE5F002659@repo.freebsd.org> <66204d85-cda5-9fe5-7d75-67672b57b54b@FreeBSD.org> From: Warner Losh Date: Thu, 7 Jul 2016 12:16:30 -0600 X-Google-Sender-Auth: VDFAOVJeTbpy_X5I9htlNmAML50 Message-ID: Subject: Re: svn commit: r302391 - head To: Bryan Drewery Cc: Andrew Turner , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 18:16:33 -0000 On Thu, Jul 7, 2016 at 12:08 PM, Bryan Drewery wrote: > On 7/7/16 8:25 AM, Andrew Turner wrote: >> Author: andrew >> Date: Thu Jul 7 15:25:14 2016 >> New Revision: 302391 >> URL: https://svnweb.freebsd.org/changeset/base/302391 >> >> Log: >> Stop deleting ofwdump.8.gz on arm and arm64 when running make delete-old, >> it is installed on these architectures. >> >> Approved by: re (kib) >> Sponsored by: ABT Systems Ltd >> >> Modified: >> head/ObsoleteFiles.inc >> >> Modified: head/ObsoleteFiles.inc >> ============================================================================== >> --- head/ObsoleteFiles.inc Thu Jul 7 14:29:23 2016 (r302390) >> +++ head/ObsoleteFiles.inc Thu Jul 7 15:25:14 2016 (r302391) >> @@ -8014,7 +8014,9 @@ OLD_FILES+=usr/share/man/man5/usbd.conf. >> .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" >> OLD_FILES+=usr/share/man/man8/boot_i386.8.gz >> .endif >> -.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && ${TARGET_ARCH} != "sparc64" >> +.if ${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && \ > > TARGET_CPUARCH is not valid here. Also, shouldn't we have some MK variable that controls this in the first place? This ifdef soup needs to be cleaned up. Warner > # make check-old > make[1]: "/root/git/freebsd/ObsoleteFiles.inc" line 8019: Malformed > conditional (${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" > && ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && > ${TARGET_ARCH} != "sparc64") > make[1]: Fatal errors encountered -- cannot continue > make[1]: stopped in /root/git/freebsd > >> + ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ >> + ${TARGET_ARCH} != "sparc64" >> OLD_FILES+=usr/share/man/man8/ofwdump.8.gz >> .endif >> OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz >> > > > -- > Regards, > Bryan Drewery > From owner-svn-src-all@freebsd.org Thu Jul 7 18:37:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA072B757F6; Thu, 7 Jul 2016 18:37:13 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A149A15CA; Thu, 7 Jul 2016 18:37:13 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67IbCA0073600; Thu, 7 Jul 2016 18:37:12 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67IbCCo073598; Thu, 7 Jul 2016 18:37:12 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201607071837.u67IbCCo073598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 7 Jul 2016 18:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302393 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 18:37:13 -0000 Author: cperciva Date: Thu Jul 7 18:37:12 2016 New Revision: 302393 URL: https://svnweb.freebsd.org/changeset/base/302393 Log: Autotune the number of pages set aside for UMA startup based on the number of CPUs present. On amd64 this unbreaks the boot for systems with 92 or more CPUs; the limit will vary on other systems depending on the size of their uma_zone and uma_cache structures. The major consumer of pages during UMA startup is the 19 zone structures which are set up before UMA has bootstrapped itself sufficiently to use the rest of the available memory: UMA Slabs, UMA Hash, 4 / 6 / 8 / 12 / 16 / 32 / 64 / 128 / 256 Bucket, vmem btag, VM OBJECT, RADIX NODE, MAP, KMAP ENTRY, MAP ENTRY, VMSPACE, and fakepg. If the zone structures occupy more than one page, they will not share pages and the number of pages currently needed for startup is 19 * pages_per_zone + N, where N is the number of pages used for allocating other structures; on amd64 N = 3 at present (2 pages are allocated for UMA Kegs, and one page for UMA Hash). This patch adds a new definition UMA_BOOT_PAGES_ZONES, currently set to 32, and if a zone structure does not fit into a single page sets boot_pages to UMA_BOOT_PAGES_ZONES * pages_per_zone instead of UMA_BOOT_PAGES (which remains at 64). Consequently this patch has no effect on systems where the zone structure fits into 2 or fewer pages (on amd64, 59 or fewer CPUs), but increases boot_pages sufficiently on systems where the large number of CPUs makes this structure larger. It seems safe to assume that systems with 60+ CPUs can afford to set aside an additional 128kB of memory per 32 CPUs. The vm.boot_pages tunable continues to override this computation, but is unlikely to be necessary in the future. Tested on: EC2 x1.32xlarge Relnotes: FreeBSD can now boot on 92+ CPU systems without requiring vm.boot_pages to be manually adjusted. Reviewed by: jeff, alc, adrian Approved by: re (kib) Modified: head/sys/vm/uma_int.h head/sys/vm/vm_page.c Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Thu Jul 7 17:22:13 2016 (r302392) +++ head/sys/vm/uma_int.h Thu Jul 7 18:37:12 2016 (r302393) @@ -110,6 +110,8 @@ #define UMA_SLAB_SHIFT PAGE_SHIFT /* Number of bits PAGE_MASK */ #define UMA_BOOT_PAGES 64 /* Pages allocated for startup */ +#define UMA_BOOT_PAGES_ZONES 32 /* Multiplier for pages to reserve */ + /* if uma_zone > PAGE_SIZE */ /* Max waste percentage before going to off page slab management */ #define UMA_MAX_WASTE 10 Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Jul 7 17:22:13 2016 (r302392) +++ head/sys/vm/vm_page.c Thu Jul 7 18:37:12 2016 (r302393) @@ -99,6 +99,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -426,6 +427,7 @@ vm_page_startup(vm_offset_t vaddr) vm_paddr_t biggestsize; vm_paddr_t low_water, high_water; int biggestone; + int pages_per_zone; biggestsize = 0; biggestone = 0; @@ -470,6 +472,19 @@ vm_page_startup(vm_offset_t vaddr) vm_page_domain_init(&vm_dom[i]); /* + * Almost all of the pages needed for boot strapping UMA are used + * for zone structures, so if the number of CPUs results in those + * structures taking more than one page each, we set aside more pages + * in proportion to the zone structure size. + */ + pages_per_zone = howmany(sizeof(struct uma_zone) + + sizeof(struct uma_cache) * (mp_maxid + 1), UMA_SLAB_SIZE); + if (pages_per_zone > 1) { + /* Reserve more pages so that we don't run out. */ + boot_pages = UMA_BOOT_PAGES_ZONES * pages_per_zone; + } + + /* * Allocate memory for use when boot strapping the kernel memory * allocator. * From owner-svn-src-all@freebsd.org Thu Jul 7 20:01:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8845B82A56; Thu, 7 Jul 2016 20:01:04 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C79B1D27; Thu, 7 Jul 2016 20:01:04 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67K13Lo006742; Thu, 7 Jul 2016 20:01:03 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67K13Nh006740; Thu, 7 Jul 2016 20:01:03 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201607072001.u67K13Nh006740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 7 Jul 2016 20:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302394 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 20:01:04 -0000 Author: loos Date: Thu Jul 7 20:01:03 2016 New Revision: 302394 URL: https://svnweb.freebsd.org/changeset/base/302394 Log: Fix a lockup in tx path for cspw. Sometimes the software loses the race when appending more descriptors to the tx ring and the tx queue stops. This commit detects this condition and restart the tx queue whenever it stall. Tested by: sobomax@, Keith White , Paul Mather Sponsored by: Rubicon Communications (Netgate) Approved by: re (kib) Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswvar.h Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Jul 7 18:37:12 2016 (r302393) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Jul 7 20:01:03 2016 (r302394) @@ -1874,6 +1874,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) return; } else if (last_old_slot == NULL) { /* Start a fresh queue. */ + sc->swsc->last_hdp = cpsw_cpdma_bd_paddr(sc->swsc, first_new_slot); cpsw_write_hdp_slot(sc->swsc, &sc->swsc->tx, first_new_slot); } else { /* Add buffers to end of current queue. */ @@ -1882,6 +1883,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) /* If underrun, restart queue. */ if (cpsw_cpdma_read_bd_flags(sc->swsc, last_old_slot) & CPDMA_BD_EOQ) { + sc->swsc->last_hdp = cpsw_cpdma_bd_paddr(sc->swsc, first_new_slot); cpsw_write_hdp_slot(sc->swsc, &sc->swsc->tx, first_new_slot); } @@ -1897,6 +1899,7 @@ static int cpsw_tx_dequeue(struct cpsw_softc *sc) { struct cpsw_slot *slot, *last_removed_slot = NULL; + struct cpsw_cpdma_bd bd; uint32_t flags, removed = 0; slot = STAILQ_FIRST(&sc->tx.active); @@ -1931,13 +1934,26 @@ cpsw_tx_dequeue(struct cpsw_softc *sc) } /* TearDown complete is only marked on the SOP for the packet. */ - if (flags & CPDMA_BD_TDOWNCMPLT) { + if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) == + (CPDMA_BD_EOP | CPDMA_BD_TDOWNCMPLT)) { CPSW_DEBUGF(sc, ("TX teardown in progress")); cpsw_write_cp(sc, &sc->tx, 0xfffffffc); // TODO: Increment a count of dropped TX packets sc->tx.running = 0; break; } + + if ((flags & CPDMA_BD_EOP) == 0) + flags = cpsw_cpdma_read_bd_flags(sc, last_removed_slot); + if ((flags & (CPDMA_BD_EOP | CPDMA_BD_EOQ)) == + (CPDMA_BD_EOP | CPDMA_BD_EOQ)) { + cpsw_cpdma_read_bd(sc, last_removed_slot, &bd); + if (bd.next != 0 && bd.next != sc->last_hdp) { + /* Restart the queue. */ + sc->last_hdp = bd.next; + cpsw_write_4(sc, sc->tx.hdp_offset, bd.next); + } + } } if (removed != 0) { Modified: head/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswvar.h Thu Jul 7 18:37:12 2016 (r302393) +++ head/sys/arm/ti/cpsw/if_cpswvar.h Thu Jul 7 20:01:03 2016 (r302394) @@ -83,6 +83,7 @@ struct cpsw_softc { /* RX and TX buffer tracking */ struct cpsw_queue rx, tx; + uint32_t last_hdp; /* We expect 1 memory resource and 4 interrupts from the device tree. */ int mem_rid; From owner-svn-src-all@freebsd.org Thu Jul 7 20:31:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 180CEB75139; Thu, 7 Jul 2016 20:31:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7C481F75; Thu, 7 Jul 2016 20:31:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67KVaUM015865; Thu, 7 Jul 2016 20:31:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67KVaZ9015864; Thu, 7 Jul 2016 20:31:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607072031.u67KVaZ9015864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 7 Jul 2016 20:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302396 - head/sys/cam 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 20:31:37 -0000 Author: imp Date: Thu Jul 7 20:31:35 2016 New Revision: 302396 URL: https://svnweb.freebsd.org/changeset/base/302396 Log: Tidy up loose ends from Netflix I/O sched rename to dynamic I/O sched. Rename kern.cam.do_netflix_iosched sysctl to kern.cam.do_dynamic_iosched. Approved by: re (kib@) Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Thu Jul 7 20:28:57 2016 (r302395) +++ head/sys/cam/cam_iosched.c Thu Jul 7 20:31:35 2016 (r302396) @@ -59,15 +59,19 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/ * Default I/O scheduler for FreeBSD. This implementation is just a thin-vineer * over the bioq_* interface, with notions of separate calls for normal I/O and * for trims. + * + * When CAM_IOSCHED_DYNAMIC is defined, the scheduler is enhanced to dynamically + * steer the rate of one type of traffic to help other types of traffic (eg + * limit writes when read latency deteriorates on SSDs). */ #ifdef CAM_IOSCHED_DYNAMIC -static int do_netflix_iosched = 1; -TUNABLE_INT("kern.cam.do_netflix_iosched", &do_netflix_iosched); -SYSCTL_INT(_kern_cam, OID_AUTO, do_netflix_iosched, CTLFLAG_RD, - &do_netflix_iosched, 1, - "Enable Netflix I/O scheduler optimizations."); +static int do_dynamic_iosched = 1; +TUNABLE_INT("kern.cam.do_dynamic_iosched", &do_dynamic_iosched); +SYSCTL_INT(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD, + &do_dynamic_iosched, 1, + "Enable Dynamic I/O scheduler optimizations."); static int alpha_bits = 9; TUNABLE_INT("kern.cam.iosched_alpha_bits", &alpha_bits); @@ -640,7 +644,7 @@ static inline int cam_iosched_has_io(struct cam_iosched_softc *isc) { #ifdef CAM_IOSCHED_DYNAMIC - if (do_netflix_iosched) { + if (do_dynamic_iosched) { struct bio *rbp = bioq_first(&isc->bio_queue); struct bio *wbp = bioq_first(&isc->write_queue); int can_write = wbp != NULL && @@ -954,7 +958,7 @@ cam_iosched_init(struct cam_iosched_soft bioq_init(&(*iscp)->bio_queue); bioq_init(&(*iscp)->trim_queue); #ifdef CAM_IOSCHED_DYNAMIC - if (do_netflix_iosched) { + if (do_dynamic_iosched) { bioq_init(&(*iscp)->write_queue); (*iscp)->read_bias = 100; (*iscp)->current_read_bias = 100; @@ -1019,7 +1023,7 @@ void cam_iosched_sysctl_init(struct cam_ "Sort IO queue to try and optimise disk access patterns"); #ifdef CAM_IOSCHED_DYNAMIC - if (!do_netflix_iosched) + if (!do_dynamic_iosched) return; isc->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx, @@ -1061,7 +1065,7 @@ cam_iosched_flush(struct cam_iosched_sof bioq_flush(&isc->bio_queue, stp, err); bioq_flush(&isc->trim_queue, stp, err); #ifdef CAM_IOSCHED_DYNAMIC - if (do_netflix_iosched) + if (do_dynamic_iosched) bioq_flush(&isc->write_queue, stp, err); #endif } @@ -1206,7 +1210,7 @@ cam_iosched_next_bio(struct cam_iosched_ * See if we have any pending writes, and room in the queue for them, * and if so, those are next. */ - if (do_netflix_iosched) { + if (do_dynamic_iosched) { if ((bp = cam_iosched_get_write(isc)) != NULL) return bp; } @@ -1223,7 +1227,7 @@ cam_iosched_next_bio(struct cam_iosched_ * For the netflix scheduler, bio_queue is only for reads, so enforce * the limits here. Enforce only for reads. */ - if (do_netflix_iosched) { + if (do_dynamic_iosched) { if (bp->bio_cmd == BIO_READ && cam_iosched_limiter_iop(&isc->read_stats, bp) != 0) return NULL; @@ -1231,7 +1235,7 @@ cam_iosched_next_bio(struct cam_iosched_ #endif bioq_remove(&isc->bio_queue, bp); #ifdef CAM_IOSCHED_DYNAMIC - if (do_netflix_iosched) { + if (do_dynamic_iosched) { if (bp->bio_cmd == BIO_READ) { isc->read_stats.queued--; isc->read_stats.total++; @@ -1268,7 +1272,7 @@ cam_iosched_queue_work(struct cam_iosche #endif } #ifdef CAM_IOSCHED_DYNAMIC - else if (do_netflix_iosched && + else if (do_dynamic_iosched && (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) { if (cam_iosched_sort_queue(isc)) bioq_disksort(&isc->write_queue, bp); @@ -1332,7 +1336,7 @@ cam_iosched_bio_complete(struct cam_iosc { int retval = 0; #ifdef CAM_IOSCHED_DYNAMIC - if (!do_netflix_iosched) + if (!do_dynamic_iosched) return retval; if (iosched_debug > 10) From owner-svn-src-all@freebsd.org Thu Jul 7 20:51:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F4A6B756D3; Thu, 7 Jul 2016 20:51:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C3101ABE; Thu, 7 Jul 2016 20:51:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67Kp0TG022081; Thu, 7 Jul 2016 20:51:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67Kp0qW022080; Thu, 7 Jul 2016 20:51:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607072051.u67Kp0qW022080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 7 Jul 2016 20:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302398 - head/usr.bin/lorder 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 20:51:01 -0000 Author: emaste Date: Thu Jul 7 20:50:59 2016 New Revision: 302398 URL: https://svnweb.freebsd.org/changeset/base/302398 Log: lorder: produce locale-independent symbol ordering Found by the Debian reproducible builds effort -- Debian bug 830259. Reported by: Reiner Herrmann Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/lorder/lorder.sh Modified: head/usr.bin/lorder/lorder.sh ============================================================================== --- head/usr.bin/lorder/lorder.sh Thu Jul 7 20:36:07 2016 (r302397) +++ head/usr.bin/lorder/lorder.sh Thu Jul 7 20:50:59 2016 (r302398) @@ -73,6 +73,7 @@ ${NM} ${NMFLAGS} -go $* | sed " d " +export LC_ALL=C # eliminate references that can be resolved by the same library. if [ $(expr "$*" : '.*\.a[[:>:]]') -ne 0 ]; then sort -u -o $S $S From owner-svn-src-all@freebsd.org Thu Jul 7 20:58:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 198ABB75893; Thu, 7 Jul 2016 20:58:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E88361E49; Thu, 7 Jul 2016 20:58:17 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67KwH3b025566; Thu, 7 Jul 2016 20:58:17 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67KwGlH025561; Thu, 7 Jul 2016 20:58:16 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201607072058.u67KwGlH025561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 7 Jul 2016 20:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302399 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 20:58:18 -0000 Author: alc Date: Thu Jul 7 20:58:16 2016 New Revision: 302399 URL: https://svnweb.freebsd.org/changeset/base/302399 Log: Change the type of the map entry's next_read field from a vm_pindex_t to a vm_offset_t. (This field is used to detect sequential access to the virtual address range represented by the map entry.) There are three reasons to make this change. First, a vm_offset_t is smaller on 32-bit architectures. Consequently, a struct vm_map_entry is now smaller on 32-bit architectures. Second, a vm_offset_t can be written atomically, whereas it may not be possible to write a vm_pindex_t atomically on a 32-bit architecture. Third, using a vm_pindex_t makes the next_read field dependent on which object in the shadow chain is being read from. Replace an "XXX" comment. Reviewed by: kib Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu Jul 7 20:50:59 2016 (r302398) +++ head/sys/vm/vm_fault.c Thu Jul 7 20:58:16 2016 (r302399) @@ -570,9 +570,9 @@ readrest: behind = 0; nera = VM_FAULT_READ_AHEAD_MAX; ahead = nera; - if (fs.pindex == fs.entry->next_read) + if (vaddr == fs.entry->next_read) vm_fault_dontneed(&fs, vaddr, ahead); - } else if (fs.pindex == fs.entry->next_read) { + } else if (vaddr == fs.entry->next_read) { /* * This is a sequential fault. Arithmetically * increase the requested number of pages in @@ -927,15 +927,15 @@ vnode_locked: prot &= retry_prot; } } + /* - * If the page was filled by a pager, update the map entry's - * last read offset. - * - * XXX The following assignment modifies the map - * without holding a write lock on it. + * If the page was filled by a pager, save the virtual address that + * should be faulted on next under a sequential access pattern to the + * map entry. A read lock on the map suffices to update this address + * safely. */ if (hardfault) - fs.entry->next_read = fs.pindex + ahead + 1; + fs.entry->next_read = vaddr + ptoa(ahead) + PAGE_SIZE; vm_fault_dirty(fs.entry, fs.m, prot, fault_type, fault_flags, TRUE); vm_page_assert_xbusied(fs.m); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jul 7 20:50:59 2016 (r302398) +++ head/sys/vm/vm_map.c Thu Jul 7 20:58:16 2016 (r302399) @@ -1330,7 +1330,7 @@ charged: new_entry->wired_count = 0; new_entry->wiring_thread = NULL; new_entry->read_ahead = VM_FAULT_READ_AHEAD_INIT; - new_entry->next_read = OFF_TO_IDX(offset); + new_entry->next_read = start; KASSERT(cred == NULL || !ENTRY_CHARGED(new_entry), ("OVERCOMMIT: vm_map_insert leaks vm_map %p", new_entry)); Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Thu Jul 7 20:50:59 2016 (r302398) +++ head/sys/vm/vm_map.h Thu Jul 7 20:58:16 2016 (r302399) @@ -104,6 +104,7 @@ struct vm_map_entry { vm_offset_t start; /* start address */ vm_offset_t end; /* end address */ vm_offset_t avail_ssize; /* amt can grow if this is a stack */ + vm_offset_t next_read; /* vaddr of the next sequential read */ vm_size_t adj_free; /* amount of adjacent free space */ vm_size_t max_free; /* max free space in subtree */ union vm_map_object object; /* object I point to */ @@ -114,7 +115,6 @@ struct vm_map_entry { vm_inherit_t inheritance; /* inheritance */ uint8_t read_ahead; /* pages in the read-ahead window */ int wired_count; /* can be paged if = 0 */ - vm_pindex_t next_read; /* index of the next sequential read */ struct ucred *cred; /* tmp storage for creator ref */ struct thread *wiring_thread; }; From owner-svn-src-all@freebsd.org Thu Jul 7 21:03:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D82B75B4E; Thu, 7 Jul 2016 21:03:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 048E6160C; Thu, 7 Jul 2016 21:03:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67L3oNC029501; Thu, 7 Jul 2016 21:03:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67L3opm029500; Thu, 7 Jul 2016 21:03:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607072103.u67L3opm029500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Jul 2016 21:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302400 - head 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 21:03:51 -0000 Author: bdrewery Date: Thu Jul 7 21:03:50 2016 New Revision: 302400 URL: https://svnweb.freebsd.org/changeset/base/302400 Log: WITH_SYSTEM_COMPILER: Don't enable for xdev or native-xtools. Otherwise they get no compiler. Reported by: swills Tested by: swills Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jul 7 20:58:16 2016 (r302399) +++ head/Makefile.inc1 Thu Jul 7 21:03:50 2016 (r302400) @@ -82,7 +82,7 @@ MK_CROSS_COMPILER= no # Check if there is a local compiler that can satisfy as an external compiler. .if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ - !make(showconfig) + !make(showconfig) && !make(native-xtools) && !make(xdev*) # Which compiler is expected to be used? .if ${MK_CLANG_BOOTSTRAP} == "yes" _expected_compiler_type= clang From owner-svn-src-all@freebsd.org Thu Jul 7 21:45:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBE5CB8237B; Thu, 7 Jul 2016 21:45:00 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7776714F0; Thu, 7 Jul 2016 21:45:00 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67Lixub044086; Thu, 7 Jul 2016 21:44:59 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67LixYh044085; Thu, 7 Jul 2016 21:44:59 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201607072144.u67LixYh044085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 7 Jul 2016 21:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302401 - head/lib/libc/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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 21:45:00 -0000 Author: jilles Date: Thu Jul 7 21:44:59 2016 New Revision: 302401 URL: https://svnweb.freebsd.org/changeset/base/302401 Log: fcntl(2): Document interrupt/restart for file locks. Since r302216, thread suspension causes advisory file locks to restart (instead of continuing to wait) and for a long time SA_RESTART has affected advisory file locks. These are both not compliant to POSIX.1. To clarify that restarting means something, add a paragraph about fair queuing. Note that the network lock manager does not implement fair queuing. Reviewed by: kib (previous version) Approved by: re (gjb) Modified: head/lib/libc/sys/fcntl.2 Modified: head/lib/libc/sys/fcntl.2 ============================================================================== --- head/lib/libc/sys/fcntl.2 Thu Jul 7 21:03:50 2016 (r302400) +++ head/lib/libc/sys/fcntl.2 Thu Jul 7 21:44:59 2016 (r302401) @@ -28,7 +28,7 @@ .\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd February 8, 2013 +.Dd July 7, 2016 .Dt FCNTL 2 .Os .Sh NAME @@ -363,6 +363,13 @@ request fails or blocks respectively whe locks on bytes in the specified region and the type of any of those locks conflicts with the type specified in the request. .Pp +The queuing for +.Dv F_SETLKW +requests on local files is fair; +that is, while the thread is blocked, +subsequent requests conflicting with its requests will not be granted, +even if these requests do not conflict with existing locks. +.Pp This interface follows the completely stupid semantics of System V and .St -p1003.1-88 that require that all locks associated with a file for a given process are @@ -646,6 +653,20 @@ The .Dv F_DUP2FD constant is non portable. It is provided for compatibility with AIX and Solaris. +.Pp +Per +.St -susv4 , +a call with +.Dv F_SETLKW +should fail with +.Bq Er EINTR +after any caught signal +and should continue waiting during thread suspension such as a stop signal. +However, in this implementation a call with +.Dv F_SETLKW +is restarted after catching a signal with a +.Dv SA_RESTART +handler or a thread suspension such as a stop signal. .Sh HISTORY The .Fn fcntl From owner-svn-src-all@freebsd.org Thu Jul 7 22:10:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85F54B825FB; Thu, 7 Jul 2016 22:10:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9731ED8; Thu, 7 Jul 2016 22:10:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67MAAX5051860; Thu, 7 Jul 2016 22:10:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67MAAZb051858; Thu, 7 Jul 2016 22:10:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607072210.u67MAAZb051858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 7 Jul 2016 22:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302402 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 22:10:11 -0000 Author: mav Date: Thu Jul 7 22:10:10 2016 New Revision: 302402 URL: https://svnweb.freebsd.org/changeset/base/302402 Log: Fix ahci(4) driver attach to controller with 32 ports. Incorrect sign expansion in variables that supposed to be a bit fields caused infinite loop. Fixing this allows system properly detect maximal possible 32 devices configured on AHCI HBA of BHyVe. That case did not happen in a wild before due to lack of hardware AHCI HBAs with 32 ports. Approved by: re (gjb@) MFC after: 1 week Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu Jul 7 21:44:59 2016 (r302401) +++ head/sys/dev/ahci/ahci.c Thu Jul 7 22:10:10 2016 (r302402) @@ -166,8 +166,8 @@ int ahci_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); - int error, i, u, speed, unit; - u_int32_t version; + int error, i, speed, unit; + uint32_t u, version; device_t child; ctlr->dev = dev; Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Thu Jul 7 21:44:59 2016 (r302401) +++ head/sys/dev/ahci/ahci.h Thu Jul 7 22:10:10 2016 (r302402) @@ -474,7 +474,7 @@ struct ahci_enclosure { uint8_t status[AHCI_MAX_PORTS][4]; /* ArrayDev statuses */ int quirks; int channels; - int ichannels; + uint32_t ichannels; }; /* structure describing a AHCI controller */ @@ -509,7 +509,7 @@ struct ahci_controller { int quirks; int numirqs; int channels; - int ichannels; + uint32_t ichannels; int ccc; /* CCC timeout */ int cccv; /* CCC vector */ int direct; /* Direct command completion */ From owner-svn-src-all@freebsd.org Thu Jul 7 22:44:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A237EB82CE8; Thu, 7 Jul 2016 22:44:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 731231435; Thu, 7 Jul 2016 22:44:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67MiNGV066433; Thu, 7 Jul 2016 22:44:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67MiNpj066432; Thu, 7 Jul 2016 22:44:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607072244.u67MiNpj066432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 7 Jul 2016 22:44:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302403 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 22:44:24 -0000 Author: ngie Date: Thu Jul 7 22:44:23 2016 New Revision: 302403 URL: https://svnweb.freebsd.org/changeset/base/302403 Log: Do not use -fformat-extensions with non-base versions of gcc Ports versions of gcc do not have -fformat-extensions support. This unbreaks compiling the kernel/modules with non-base gcc (4.8, 5.0, etc) if MK_FORMAT_EXTENSIONS=yes (the default). Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7150 Reviewed by: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Jul 7 22:10:10 2016 (r302402) +++ head/sys/conf/kern.mk Thu Jul 7 22:44:23 2016 (r302403) @@ -62,7 +62,7 @@ CWARNEXTRA?= -Wno-uninitialized FORMAT_EXTENSIONS= -Wno-format .elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ -.else +.elif ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} == 40201 FORMAT_EXTENSIONS= -fformat-extensions .endif From owner-svn-src-all@freebsd.org Thu Jul 7 23:17:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FDCBB823E4; Thu, 7 Jul 2016 23:17:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7270413B0; Thu, 7 Jul 2016 23:17:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u67NH0ku077581; Thu, 7 Jul 2016 23:17:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u67NH0UK077580; Thu, 7 Jul 2016 23:17:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607072317.u67NH0UK077580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 7 Jul 2016 23:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r302404 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 07 Jul 2016 23:17:01 -0000 Author: gjb Date: Thu Jul 7 23:17:00 2016 New Revision: 302404 URL: https://svnweb.freebsd.org/changeset/base/302404 Log: Enable the stable/11 approvers entry in preparation for branching. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Thu Jul 7 22:44:23 2016 (r302403) +++ svnadmin/conf/approvers Thu Jul 7 23:17:00 2016 (r302404) @@ -17,7 +17,7 @@ # $FreeBSD$ # ^head/ re -#^stable/11/ re +^stable/11/ re #^stable/10/ re ^release/ re #^releng/11.0/ re From owner-svn-src-all@freebsd.org Fri Jul 8 00:04:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81044B82D4A; Fri, 8 Jul 2016 00:04:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F441AA7; Fri, 8 Jul 2016 00:04:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6804jZv095977; Fri, 8 Jul 2016 00:04:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6804jFt095976; Fri, 8 Jul 2016 00:04:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080004.u6804jFt095976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r302407 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:04:46 -0000 Author: gjb Date: Fri Jul 8 00:04:45 2016 New Revision: 302407 URL: https://svnweb.freebsd.org/changeset/base/302407 Log: Add stable/11 to the allowed paths. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Thu Jul 7 23:19:16 2016 (r302406) +++ svnadmin/conf/paths Fri Jul 8 00:04:45 2016 (r302407) @@ -18,6 +18,7 @@ ^stable/8/ ^stable/9/ ^stable/10/ +^stable/11/ # Feature branches. ^user/ From owner-svn-src-all@freebsd.org Fri Jul 8 00:04:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02B32B82DB7; Fri, 8 Jul 2016 00:04:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D41471C03; Fri, 8 Jul 2016 00:04:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6804w7i096028; Fri, 8 Jul 2016 00:04:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6804wv1096027; Fri, 8 Jul 2016 00:04:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080004.u6804wv1096027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302408 - in stable/11: . contrib/top lib/libc/locale usr.sbin/bhyve X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:04:59 -0000 Author: gjb Date: Fri Jul 8 00:04:57 2016 New Revision: 302408 URL: https://svnweb.freebsd.org/changeset/base/302408 Log: Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here. Additional commits post-branch will follow. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: - copied from r302406, head/ Directory Properties: stable/11/ (props changed) Modified: Directory Properties: stable/11/MAINTAINERS (props changed) stable/11/cddl/ (props changed) stable/11/cddl/contrib/opensolaris/ (props changed) stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) stable/11/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/11/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/11/contrib/amd/ (props changed) stable/11/contrib/apr/ (props changed) stable/11/contrib/apr-util/ (props changed) stable/11/contrib/atf/ (props changed) stable/11/contrib/binutils/ (props changed) stable/11/contrib/bmake/ (props changed) stable/11/contrib/byacc/ (props changed) stable/11/contrib/bzip2/ (props changed) stable/11/contrib/com_err/ (props changed) stable/11/contrib/compiler-rt/ (props changed) stable/11/contrib/dialog/ (props changed) stable/11/contrib/dma/ (props changed) stable/11/contrib/dtc/ (props changed) stable/11/contrib/ee/ (props changed) stable/11/contrib/elftoolchain/ (props changed) stable/11/contrib/elftoolchain/ar/ (props changed) stable/11/contrib/elftoolchain/brandelf/ (props changed) stable/11/contrib/elftoolchain/elfdump/ (props changed) stable/11/contrib/expat/ (props changed) stable/11/contrib/file/ (props changed) stable/11/contrib/gcc/ (props changed) stable/11/contrib/gcclibs/libgomp/ (props changed) stable/11/contrib/gdb/ (props changed) stable/11/contrib/gdtoa/ (props changed) stable/11/contrib/groff/ (props changed) stable/11/contrib/ipfilter/ (props changed) stable/11/contrib/ldns/ (props changed) stable/11/contrib/ldns-host/ (props changed) stable/11/contrib/less/ (props changed) stable/11/contrib/libarchive/ (props changed) stable/11/contrib/libarchive/cpio/ (props changed) stable/11/contrib/libarchive/libarchive/ (props changed) stable/11/contrib/libarchive/libarchive_fe/ (props changed) stable/11/contrib/libarchive/tar/ (props changed) stable/11/contrib/libc++/ (props changed) stable/11/contrib/libc-vis/ (props changed) stable/11/contrib/libcxxrt/ (props changed) stable/11/contrib/libexecinfo/ (props changed) stable/11/contrib/libpcap/ (props changed) stable/11/contrib/libstdc++/ (props changed) stable/11/contrib/libucl/ (props changed) stable/11/contrib/libxo/ (props changed) stable/11/contrib/llvm/ (props changed) stable/11/contrib/llvm/projects/libunwind/ (props changed) stable/11/contrib/llvm/tools/clang/ (props changed) stable/11/contrib/llvm/tools/lldb/ (props changed) stable/11/contrib/llvm/tools/llvm-dwarfdump/ (props changed) stable/11/contrib/llvm/tools/llvm-lto/ (props changed) stable/11/contrib/mdocml/ (props changed) stable/11/contrib/mtree/ (props changed) stable/11/contrib/ncurses/ (props changed) stable/11/contrib/netcat/ (props changed) stable/11/contrib/ntp/ (props changed) stable/11/contrib/nvi/ (props changed) stable/11/contrib/one-true-awk/ (props changed) stable/11/contrib/openbsm/ (props changed) stable/11/contrib/openpam/ (props changed) stable/11/contrib/openresolv/ (props changed) stable/11/contrib/pf/ (props changed) stable/11/contrib/sendmail/ (props changed) stable/11/contrib/serf/ (props changed) stable/11/contrib/sqlite3/ (props changed) stable/11/contrib/subversion/ (props changed) stable/11/contrib/tcpdump/ (props changed) stable/11/contrib/tcsh/ (props changed) stable/11/contrib/tnftp/ (props changed) stable/11/contrib/top/ (props changed) stable/11/contrib/top/install-sh (props changed) stable/11/contrib/tzcode/stdtime/ (props changed) stable/11/contrib/tzcode/zic/ (props changed) stable/11/contrib/tzdata/ (props changed) stable/11/contrib/unbound/ (props changed) stable/11/contrib/vis/ (props changed) stable/11/contrib/wpa/ (props changed) stable/11/contrib/xz/ (props changed) stable/11/crypto/heimdal/ (props changed) stable/11/crypto/openssh/ (props changed) stable/11/crypto/openssl/ (props changed) stable/11/gnu/lib/ (props changed) stable/11/gnu/usr.bin/binutils/ (props changed) stable/11/gnu/usr.bin/cc/cc_tools/ (props changed) stable/11/gnu/usr.bin/gdb/ (props changed) stable/11/lib/libc/locale/ascii.c (props changed) stable/11/sys/cddl/contrib/opensolaris/ (props changed) stable/11/sys/contrib/dev/acpica/ (props changed) stable/11/sys/contrib/ipfilter/ (props changed) stable/11/sys/contrib/libfdt/ (props changed) stable/11/sys/contrib/octeon-sdk/ (props changed) stable/11/sys/contrib/x86emu/ (props changed) stable/11/sys/contrib/xz-embedded/ (props changed) stable/11/usr.sbin/bhyve/atkbdc.h (props changed) stable/11/usr.sbin/bhyve/bhyvegc.c (props changed) stable/11/usr.sbin/bhyve/bhyvegc.h (props changed) stable/11/usr.sbin/bhyve/console.c (props changed) stable/11/usr.sbin/bhyve/console.h (props changed) stable/11/usr.sbin/bhyve/pci_fbuf.c (props changed) stable/11/usr.sbin/bhyve/pci_xhci.c (props changed) stable/11/usr.sbin/bhyve/pci_xhci.h (props changed) stable/11/usr.sbin/bhyve/ps2kbd.c (props changed) stable/11/usr.sbin/bhyve/ps2kbd.h (props changed) stable/11/usr.sbin/bhyve/ps2mouse.c (props changed) stable/11/usr.sbin/bhyve/ps2mouse.h (props changed) stable/11/usr.sbin/bhyve/rfb.c (props changed) stable/11/usr.sbin/bhyve/rfb.h (props changed) stable/11/usr.sbin/bhyve/sockstream.c (props changed) stable/11/usr.sbin/bhyve/sockstream.h (props changed) stable/11/usr.sbin/bhyve/usb_emul.c (props changed) stable/11/usr.sbin/bhyve/usb_emul.h (props changed) stable/11/usr.sbin/bhyve/usb_mouse.c (props changed) stable/11/usr.sbin/bhyve/vga.c (props changed) stable/11/usr.sbin/bhyve/vga.h (props changed) From owner-svn-src-all@freebsd.org Fri Jul 8 00:12:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0619B75032; Fri, 8 Jul 2016 00:12:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B5121208; Fri, 8 Jul 2016 00:12:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u680CUeo099609; Fri, 8 Jul 2016 00:12:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u680CUAv099602; Fri, 8 Jul 2016 00:12:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080012.u680CUAv099602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302409 - in head: . gnu/usr.bin/cc/cc_tools gnu/usr.bin/groff/tmac lib/clang release/doc/share/xml sys/conf 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:12:31 -0000 Author: gjb Date: Fri Jul 8 00:12:29 2016 New Revision: 302409 URL: https://svnweb.freebsd.org/changeset/base/302409 Log: Reflect head is now 12.0-CURRENT. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/UPDATING head/gnu/usr.bin/cc/cc_tools/freebsd-native.h head/gnu/usr.bin/groff/tmac/mdoc.local.in head/lib/clang/clang.build.mk head/release/doc/share/xml/release.ent head/sys/conf/newvers.sh head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jul 8 00:04:57 2016 (r302408) +++ head/UPDATING Fri Jul 8 00:12:29 2016 (r302409) @@ -16,7 +16,7 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. -NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW: +NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: FreeBSD 11.x has many debugging features turned on, in both the kernel and userland. These features attempt to detect incorrect use of system primitives, and encourage loud failure through extra sanity Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:04:57 2016 (r302408) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:12:29 2016 (r302409) @@ -7,8 +7,8 @@ #define FREEBSD_NATIVE 1 /* Fake out gcc/config/freebsd.h. */ -#define FBSD_MAJOR 11 -#define FBSD_CC_VER 1100002 /* form like __FreeBSD_version */ +#define FBSD_MAJOR 12 +#define FBSD_CC_VER 1100000 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Jul 8 00:04:57 2016 (r302408) +++ head/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Jul 8 00:12:29 2016 (r302409) @@ -63,6 +63,7 @@ .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 .ds doc-operating-system-FreeBSD-11.0 11.0 +.ds doc-operating-system-FreeBSD-11.0 12.0 . .\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Fri Jul 8 00:04:57 2016 (r302408) +++ head/lib/clang/clang.build.mk Fri Jul 8 00:12:29 2016 (r302409) @@ -32,8 +32,8 @@ TARGET_ABI= gnueabi TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd12.0 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-freebsd12.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" Modified: head/release/doc/share/xml/release.ent ============================================================================== --- head/release/doc/share/xml/release.ent Fri Jul 8 00:04:57 2016 (r302408) +++ head/release/doc/share/xml/release.ent Fri Jul 8 00:12:29 2016 (r302409) @@ -19,10 +19,10 @@ - + - + Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Jul 8 00:04:57 2016 (r302408) +++ head/sys/conf/newvers.sh Fri Jul 8 00:12:29 2016 (r302409) @@ -31,8 +31,8 @@ # $FreeBSD$ TYPE="FreeBSD" -REVISION="11.0" -BRANCH="ALPHA6" +REVISION="12.0" +BRANCH="CURRENT" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Jul 8 00:04:57 2016 (r302408) +++ head/sys/sys/param.h Fri Jul 8 00:12:29 2016 (r302409) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100120 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Jul 8 00:22:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 873F8B752F1; Fri, 8 Jul 2016 00:22:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 443341716; Fri, 8 Jul 2016 00:22:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u680MFhR003695; Fri, 8 Jul 2016 00:22:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u680MEb1003687; Fri, 8 Jul 2016 00:22:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080022.u680MEb1003687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302410 - in stable/11: . contrib/jemalloc/include/jemalloc etc/defaults sys/amd64/conf sys/i386/conf sys/powerpc/conf sys/sparc64/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:22:16 -0000 Author: gjb Date: Fri Jul 8 00:22:14 2016 New Revision: 302410 URL: https://svnweb.freebsd.org/changeset/base/302410 Log: - Remove debugging from GENERIC* kernel configurations - Enable MALLOC_PRODUCTION - Default dumpdev=NO - Remove UPDATING entry regarding debugging features Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/UPDATING stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h stable/11/etc/defaults/rc.conf stable/11/sys/amd64/conf/GENERIC stable/11/sys/i386/conf/GENERIC stable/11/sys/powerpc/conf/GENERIC stable/11/sys/sparc64/conf/GENERIC Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/UPDATING Fri Jul 8 00:22:14 2016 (r302410) @@ -16,21 +16,6 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. -NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW: - FreeBSD 11.x has many debugging features turned on, in both the kernel - and userland. These features attempt to detect incorrect use of - system primitives, and encourage loud failure through extra sanity - checking and fail stop semantics. They also substantially impact - system performance. If you want to do performance measurement, - benchmarking, and optimization, you'll want to turn them off. This - includes various WITNESS- related kernel options, INVARIANTS, malloc - debugging flags in userland, and various verbose features in the - kernel. Many developers choose to disable these features on build - machines to maximize performance. (To completely disable malloc - debugging, define MALLOC_PRODUCTION in /etc/make.conf, or to merely - disable the most expensive debugging functionality run - "ln -s 'abort:false,junk:false' /etc/malloc.conf".) - 20160622: The libc stub for the pipe(2) system call has been replaced with a wrapper which calls the pipe2(2) system call and the pipe(2) is now Modified: stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h ============================================================================== --- stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Fri Jul 8 00:22:14 2016 (r302410) @@ -5,6 +5,9 @@ #undef JEMALLOC_OVERRIDE_VALLOC #ifndef MALLOC_PRODUCTION +#define MALLOC_PRODUCTION +#endif +#ifndef MALLOC_PRODUCTION #define JEMALLOC_DEBUG #endif Modified: stable/11/etc/defaults/rc.conf ============================================================================== --- stable/11/etc/defaults/rc.conf Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/etc/defaults/rc.conf Fri Jul 8 00:22:14 2016 (r302410) @@ -609,7 +609,7 @@ lpd_flags="" # Flags to lpd (if enabled nscd_enable="NO" # Run the nsswitch caching daemon. chkprintcap_enable="NO" # Run chkprintcap(8) before running lpd. chkprintcap_flags="-d" # Create missing directories by default. -dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO). +dumpdev="NO" # Device to crashdump to (device name, AUTO, or NO). dumpdir="/var/crash" # Directory where crash dumps are to be stored savecore_enable="YES" # Extract core from dump devices if any savecore_flags="-m 10" # Used if dumpdev is enabled above, and present. Modified: stable/11/sys/amd64/conf/GENERIC ============================================================================== --- stable/11/sys/amd64/conf/GENERIC Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/sys/amd64/conf/GENERIC Fri Jul 8 00:22:14 2016 (r302410) @@ -81,15 +81,6 @@ options RCTL # Resource limits # 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 Modified: stable/11/sys/i386/conf/GENERIC ============================================================================== --- stable/11/sys/i386/conf/GENERIC Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/sys/i386/conf/GENERIC Fri Jul 8 00:22:14 2016 (r302410) @@ -81,15 +81,6 @@ options RCTL # Resource limits # 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 # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel Modified: stable/11/sys/powerpc/conf/GENERIC ============================================================================== --- stable/11/sys/powerpc/conf/GENERIC Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/sys/powerpc/conf/GENERIC Fri Jul 8 00:22:14 2016 (r302410) @@ -85,14 +85,6 @@ options RCTL # Resource limits # 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 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 Modified: stable/11/sys/sparc64/conf/GENERIC ============================================================================== --- stable/11/sys/sparc64/conf/GENERIC Fri Jul 8 00:12:29 2016 (r302409) +++ stable/11/sys/sparc64/conf/GENERIC Fri Jul 8 00:22:14 2016 (r302410) @@ -75,15 +75,6 @@ options RCTL # Resource limits # 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 From owner-svn-src-all@freebsd.org Fri Jul 8 00:25:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 470F7B7539B; Fri, 8 Jul 2016 00:25:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED8491954; Fri, 8 Jul 2016 00:25:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u680PXfv003868; Fri, 8 Jul 2016 00:25:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u680PXM7003867; Fri, 8 Jul 2016 00:25:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080025.u680PXM7003867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302411 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:25:34 -0000 Author: gjb Date: Fri Jul 8 00:25:32 2016 New Revision: 302411 URL: https://svnweb.freebsd.org/changeset/base/302411 Log: Missed a few entries in the previous commit, documentation related. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/release.ent Modified: stable/11/release/doc/share/xml/release.ent ============================================================================== --- stable/11/release/doc/share/xml/release.ent Fri Jul 8 00:22:14 2016 (r302410) +++ stable/11/release/doc/share/xml/release.ent Fri Jul 8 00:25:32 2016 (r302411) @@ -6,23 +6,23 @@ - + - + - + - + - + @@ -31,16 +31,16 @@ - + - + - + From owner-svn-src-all@freebsd.org Fri Jul 8 00:26:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92217B753FA; Fri, 8 Jul 2016 00:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61A771ACE; Fri, 8 Jul 2016 00:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u680QcOT003976; Fri, 8 Jul 2016 00:26:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u680Qc5i003975; Fri, 8 Jul 2016 00:26:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080026.u680Qc5i003975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302412 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:26:39 -0000 Author: gjb Date: Fri Jul 8 00:26:38 2016 New Revision: 302412 URL: https://svnweb.freebsd.org/changeset/base/302412 Log: Switch 11.0 from -ALPHA6 to -BETA1 to prepare for builds. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Fri Jul 8 00:25:32 2016 (r302411) +++ stable/11/sys/conf/newvers.sh Fri Jul 8 00:26:38 2016 (r302412) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="ALPHA6" +BRANCH="BETA1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Jul 8 00:52:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 182B2B75A6B; Fri, 8 Jul 2016 00:52:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEF2616F7; Fri, 8 Jul 2016 00:52:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u680qsr9014805; Fri, 8 Jul 2016 00:52:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u680qs2h014804; Fri, 8 Jul 2016 00:52:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080052.u680qs2h014804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302413 - head/gnu/usr.bin/cc/cc_tools 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:52:55 -0000 Author: gjb Date: Fri Jul 8 00:52:53 2016 New Revision: 302413 URL: https://svnweb.freebsd.org/changeset/base/302413 Log: Spell 1200000 correctly. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:26:38 2016 (r302412) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:52:53 2016 (r302413) @@ -8,7 +8,7 @@ /* Fake out gcc/config/freebsd.h. */ #define FBSD_MAJOR 12 -#define FBSD_CC_VER 1100000 /* form like __FreeBSD_version */ +#define FBSD_CC_VER 1200000 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ From owner-svn-src-all@freebsd.org Fri Jul 8 00:54:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B69DB75B08; Fri, 8 Jul 2016 00:54:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3691890; Fri, 8 Jul 2016 00:54:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u680sLcJ014896; Fri, 8 Jul 2016 00:54:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u680sLrX014895; Fri, 8 Jul 2016 00:54:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080054.u680sLrX014895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 00:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302414 - head/gnu/usr.bin/groff/tmac 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 00:54:22 -0000 Author: gjb Date: Fri Jul 8 00:54:21 2016 New Revision: 302414 URL: https://svnweb.freebsd.org/changeset/base/302414 Log: Default manual pages to 12.0 in head, and add missing 10.x releases. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Jul 8 00:52:53 2016 (r302413) +++ head/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Jul 8 00:54:21 2016 (r302414) @@ -50,7 +50,7 @@ .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~11.0 +.ds doc-default-operating-system FreeBSD\~12.0 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-2.2.9 2.2.9 @@ -62,6 +62,8 @@ .ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 +.ds doc-operating-system-FreeBSD-10.1 10.2 +.ds doc-operating-system-FreeBSD-10.1 10.3 .ds doc-operating-system-FreeBSD-11.0 11.0 .ds doc-operating-system-FreeBSD-11.0 12.0 . From owner-svn-src-all@freebsd.org Fri Jul 8 01:43:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2928B76509; Fri, 8 Jul 2016 01:43:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id B23E611E6; Fri, 8 Jul 2016 01:43:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id AC2D91566; Fri, 8 Jul 2016 01:43:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 6092D21690; Fri, 8 Jul 2016 01:43:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id dvFHcjTiZfDV; Fri, 8 Jul 2016 01:43:12 +0000 (UTC) Subject: Re: svn commit: r302413 - head/gnu/usr.bin/cc/cc_tools DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com A58D721687 To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607080052.u680qs2h014804@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: Date: Thu, 7 Jul 2016 18:43:08 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607080052.u680qs2h014804@repo.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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 01:43:15 -0000 On 7/7/16 5:52 PM, Glen Barber wrote: > Author: gjb > Date: Fri Jul 8 00:52:53 2016 > New Revision: 302413 > URL: https://svnweb.freebsd.org/changeset/base/302413 > > Log: > Spell 1200000 correctly. > > Approved by: re (implicit) > Sponsored by: The FreeBSD Foundation > > Modified: > head/gnu/usr.bin/cc/cc_tools/freebsd-native.h > > Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h > ============================================================================== > --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:26:38 2016 (r302412) > +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:52:53 2016 (r302413) > @@ -8,7 +8,7 @@ > > /* Fake out gcc/config/freebsd.h. */ > #define FBSD_MAJOR 12 > -#define FBSD_CC_VER 1100000 /* form like __FreeBSD_version */ > +#define FBSD_CC_VER 1200000 /* form like __FreeBSD_version */ > > #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ > #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ > lib/clang/freebsd_cc_version.h has the clang equivalent -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Fri Jul 8 01:47:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CF5FB7657F; Fri, 8 Jul 2016 01:47:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4186139B; Fri, 8 Jul 2016 01:47:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u681l2AW033734; Fri, 8 Jul 2016 01:47:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u681l2kf033733; Fri, 8 Jul 2016 01:47:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080147.u681l2kf033733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 01:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302417 - head/lib/clang 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 01:47:03 -0000 Author: gjb Date: Fri Jul 8 01:47:01 2016 New Revision: 302417 URL: https://svnweb.freebsd.org/changeset/base/302417 Log: Bump FREEBSD_CC_VERSION in lib/clang/freebsd_cc_version.h Submitted by: bdrewery Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/lib/clang/freebsd_cc_version.h Modified: head/lib/clang/freebsd_cc_version.h ============================================================================== --- head/lib/clang/freebsd_cc_version.h Fri Jul 8 01:32:43 2016 (r302416) +++ head/lib/clang/freebsd_cc_version.h Fri Jul 8 01:47:01 2016 (r302417) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1100004 +#define FREEBSD_CC_VERSION 1200000 From owner-svn-src-all@freebsd.org Fri Jul 8 01:47:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F18B765CD; Fri, 8 Jul 2016 01:47:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7E254157A; Fri, 8 Jul 2016 01:47:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id 2BAF41837; Fri, 8 Jul 2016 01:47:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Fri, 8 Jul 2016 01:47:28 +0000 From: Glen Barber To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302413 - head/gnu/usr.bin/cc/cc_tools Message-ID: <20160708014728.GX19626@FreeBSD.org> References: <201607080052.u680qs2h014804@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dwN3S3mscniL3FCL" 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 X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 01:47:29 -0000 --dwN3S3mscniL3FCL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 07, 2016 at 06:43:08PM -0700, Bryan Drewery wrote: > On 7/7/16 5:52 PM, Glen Barber wrote: > > Author: gjb > > Date: Fri Jul 8 00:52:53 2016 > > New Revision: 302413 > > URL: https://svnweb.freebsd.org/changeset/base/302413 > >=20 > > Log: > > Spell 1200000 correctly. > > =20 > > Approved by: re (implicit) > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > head/gnu/usr.bin/cc/cc_tools/freebsd-native.h > >=20 > > Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:26:38 2= 016 (r302412) > > +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri Jul 8 00:52:53 2= 016 (r302413) > > @@ -8,7 +8,7 @@ > > =20 > > /* Fake out gcc/config/freebsd.h. */ > > #define FBSD_MAJOR 12 > > -#define FBSD_CC_VER 1100000 /* form like __FreeBSD_version */ > > +#define FBSD_CC_VER 1200000 /* form like __FreeBSD_version */ > > =20 > > #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ > > #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ > >=20 >=20 > lib/clang/freebsd_cc_version.h has the clang equivalent >=20 Fixed in r302417. Thank you for pointing this out. Glen --dwN3S3mscniL3FCL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXfwYrAAoJEAMUWKVHj+KTtZQQAJsRgyJ83kig8dONdzGBghWn t6yHJiRSBMLAM5TVxvfXPZ6ZzM9OoYpat18swhj8y31w2McTTEfw++5skgSJgw40 QjTGjbc8VjrXUkudDA/Ww0n9g/qipgXbwUnAEl0AzSHvuGN0bys81B5+zd3mm75i 26dPLwhvHXyT/PXtHLnq2dgvpDcYspp85i2mx4eGe3cP15GqmZudJu0B+UCl2DbL jGSNBfVvqlnhuRvgznB/oZtWP6d11UTkLbVjKQ5ruSwRANEKw6ThTMR0eh48JzGN gNZo5oGMwCJU4ll338aht3WorhdYUw9KqCEBHUvaxdttBNCWB2WJh4N54OKnzJU5 Oi0/9BF3M5K+ngRrzzJVL9jOUQj9SFLTwrlCSBZpcrWtHldLSXtGlpTTsa3nUj6a 9pr3xsZgSn1NgQMBXUPyefYladXnSgHWqibtlqF/zBNxk+4MdA/5a1cw7eMP+aBn gljwX8pU1o7he/H4TVqqZeGAZ5rDp87aLRargCIwjGT751D0Zp3k5bAWfWbPjzTd hGi6PNo8/U6bHWg2VZdsR5T34AXn+Wy2ndygGzZ3b6c8/FVzbOnf3JsQlaLV518E HMR1kU5sPtskMNALGxDnmDBGY3A/5SZSAW5PE3YxySTgLbSbWp2GrXr8xqo/MxvC kqhoXRGZ1q6NR3+eGO0Y =YptI -----END PGP SIGNATURE----- --dwN3S3mscniL3FCL-- From owner-svn-src-all@freebsd.org Fri Jul 8 01:56:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0256B7687E; Fri, 8 Jul 2016 01:56:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF2EC1C29; Fri, 8 Jul 2016 01:56:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u681uqse037483; Fri, 8 Jul 2016 01:56:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u681uqcS037482; Fri, 8 Jul 2016 01:56:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080156.u681uqcS037482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 01:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302418 - head/contrib/gcc 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 01:56:54 -0000 Author: gjb Date: Fri Jul 8 01:56:52 2016 New Revision: 302418 URL: https://svnweb.freebsd.org/changeset/base/302418 Log: Add freebsd12 to contrib/gcc/config.gcc. Submitted by: bdrewery Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/contrib/gcc/config.gcc Modified: head/contrib/gcc/config.gcc ============================================================================== --- head/contrib/gcc/config.gcc Fri Jul 8 01:47:01 2016 (r302417) +++ head/contrib/gcc/config.gcc Fri Jul 8 01:56:52 2016 (r302418) @@ -432,6 +432,8 @@ case ${target} in tm_defines="${tm_defines} FBSD_MAJOR=10" ;; *-*-freebsd11 | *-*-freebsd11.*) tm_defines="${tm_defines} FBSD_MAJOR=11" ;; + *-*-freebsd12 | *-*-freebsd12.*) + tm_defines="${tm_defines} FBSD_MAJOR=12" ;; *) echo 'Please update *-*-freebsd* in gcc/config.gcc' exit 1 From owner-svn-src-all@freebsd.org Fri Jul 8 02:03:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BE06B76A8A; Fri, 8 Jul 2016 02:03:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B76211CF; Fri, 8 Jul 2016 02:03:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6823gbc041093; Fri, 8 Jul 2016 02:03:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6823gPh041092; Fri, 8 Jul 2016 02:03:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080203.u6823gPh041092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 02:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302419 - head/gnu/usr.bin/groff/tmac 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 02:03:43 -0000 Author: gjb Date: Fri Jul 8 02:03:42 2016 New Revision: 302419 URL: https://svnweb.freebsd.org/changeset/base/302419 Log: Spell 10.2, 10.3, 12.0 correctly in various places. Submitted by: markj Approved by: re (implicit) Pointyhat: gjb (myself) Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in Modified: head/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Jul 8 01:56:52 2016 (r302418) +++ head/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Jul 8 02:03:42 2016 (r302419) @@ -62,10 +62,10 @@ .ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 -.ds doc-operating-system-FreeBSD-10.1 10.2 -.ds doc-operating-system-FreeBSD-10.1 10.3 +.ds doc-operating-system-FreeBSD-10.2 10.2 +.ds doc-operating-system-FreeBSD-10.3 10.3 .ds doc-operating-system-FreeBSD-11.0 11.0 -.ds doc-operating-system-FreeBSD-11.0 12.0 +.ds doc-operating-system-FreeBSD-12.0 12.0 . .\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 From owner-svn-src-all@freebsd.org Fri Jul 8 02:16:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E09D3B76C7F for ; Fri, 8 Jul 2016 02:16:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm1-vm1.bullet.mail.bf1.yahoo.com (nm1-vm1.bullet.mail.bf1.yahoo.com [98.139.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98C89178C for ; Fri, 8 Jul 2016 02:16:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1467944169; bh=Mnuim7oMZYSAICF7/Ey3EywER7fdqeRSMbDmqHs4BtQ=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=Xr5fWbJPwFGJxiNAGLioDe/9Wxl5AgvkYhPReESX4Rp/bO53JKZseNz9iKdQHo945XO/qupJ/L2YPPb29Lpz6WtMCgJ22nibigBoLhXyYrTRACQ6zlZ7i8mZdIr+xXj2CVkXtfPxc5JzIOQ9o6AKXsHCrbOshgdjD1fzHX9pDV9NEOpe9LfBOrS64lONVxBrloKZ1ZAktnO0pMdgvang3dvrpAYMr+zH+8yZj8B2HhMzMi2DHKkcujKbj8sushwA5AdsnxO7Wn87hxVwIxqMstUUP4u9EwYOoVH4Oc1LnKvD+htyB5b8dlxXvECh/O36EOVx0IA3Ba/q1pLVYJibGw== Received: from [98.139.170.179] by nm1.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2016 02:16:09 -0000 Received: from [98.139.211.199] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2016 02:16:09 -0000 Received: from [127.0.0.1] by smtp208.mail.bf1.yahoo.com with NNFMP; 08 Jul 2016 02:16:09 -0000 X-Yahoo-Newman-Id: 23765.39422.bm@smtp208.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 0qfEoLoVM1meqCuEdksG8NeM8Vq.a9Ya3Kq.ltZVLTWBYM7 y0iqZGof.69ezcW0B8pUpf.3fS5kbq19gM4_oUOPUo46wAyvx3jrTLGTeeTt xqbI2lyy82IwgwogPkG3ItkjNfgZi5qau2hxc91sHNYxoPLrcNz7OxJIOuj2 Lz9vmy6BrvOvLEziUsChAorZ0tVGQFxBqaM7WNXJ5bpyJECapJeluW6U3YpE OoPN_hSClzY1I8O7ntp0YXoPQkrrwZS736tggPbHN1ImgUaLo3t80O.xTgwM nOKdABFd0QjTQ06uM1H7HI7SlqDX5e0K13PYyfPzlYsUe.GVLsTeTKZU2QC0 JCOECWHBZsRaluYGvdNVuFp_GrnZA6N4Uv3XFzElBKcFAlUbOUzIG3qpmB_Q xDufNlUzPk56MPCfluJPAM35Up_rMaB8X2OEDfGkynBwL5yvSueH2_QfRdt5 uq3PcH2RkXNglC2IOVaaRdAmAJzoNpVBChu6KhRexCLvwz0JzpvdIKaaFJCY TRTBfjm2bxXsw0u_.pz6U9W37mh44Gx2lXlmRgUkbX79i8Q-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r302418 - head/contrib/gcc To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607080156.u681uqcS037482@repo.freebsd.org> From: Pedro Giffuni Message-ID: Date: Thu, 7 Jul 2016 21:16:18 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201607080156.u681uqcS037482@repo.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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 02:16:17 -0000 On 07/07/16 20:56, Glen Barber wrote: > Author: gjb > Date: Fri Jul 8 01:56:52 2016 > New Revision: 302418 > URL: https://svnweb.freebsd.org/changeset/base/302418 > > Log: > Add freebsd12 to contrib/gcc/config.gcc. > > Submitted by: bdrewery > Approved by: re (implicit) > Sponsored by: The FreeBSD Foundation > > Modified: > head/contrib/gcc/config.gcc > > Modified: head/contrib/gcc/config.gcc > ============================================================================== > --- head/contrib/gcc/config.gcc Fri Jul 8 01:47:01 2016 (r302417) > +++ head/contrib/gcc/config.gcc Fri Jul 8 01:56:52 2016 (r302418) > @@ -432,6 +432,8 @@ case ${target} in > tm_defines="${tm_defines} FBSD_MAJOR=10" ;; > *-*-freebsd11 | *-*-freebsd11.*) > tm_defines="${tm_defines} FBSD_MAJOR=11" ;; > + *-*-freebsd12 | *-*-freebsd12.*) > + tm_defines="${tm_defines} FBSD_MAJOR=12" ;; > *) > echo 'Please update *-*-freebsd* in gcc/config.gcc' > exit 1 > For the record: this is not needed since we don't use GNU configure to configure/build GCC. We should really kill GCC42 early in current-12. Pedro. From owner-svn-src-all@freebsd.org Fri Jul 8 02:19:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBF2DB76D26; Fri, 8 Jul 2016 02:19:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 896161998; Fri, 8 Jul 2016 02:19:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u682J9mk044887; Fri, 8 Jul 2016 02:19:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u682J9qh044886; Fri, 8 Jul 2016 02:19:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607080219.u682J9qh044886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 02:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302420 - head 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 02:19:10 -0000 Author: gjb Date: Fri Jul 8 02:19:09 2016 New Revision: 302420 URL: https://svnweb.freebsd.org/changeset/base/302420 Log: Spell '12.x' correctly in UPDATING. Submitted by: lidl Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jul 8 02:03:42 2016 (r302419) +++ head/UPDATING Fri Jul 8 02:19:09 2016 (r302420) @@ -17,7 +17,7 @@ the tip of head, and then rebuild withou from older version of current across the gcc/clang cutover is a bit fragile. NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: - FreeBSD 11.x has many debugging features turned on, in both the kernel + FreeBSD 12.x has many debugging features turned on, in both the kernel and userland. These features attempt to detect incorrect use of system primitives, and encourage loud failure through extra sanity checking and fail stop semantics. They also substantially impact From owner-svn-src-all@freebsd.org Fri Jul 8 02:21:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778D7B76DB4; Fri, 8 Jul 2016 02:21:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 67E821B76; Fri, 8 Jul 2016 02:21:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id 1445A1307; Fri, 8 Jul 2016 02:21:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Fri, 8 Jul 2016 02:21:02 +0000 From: Glen Barber To: Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302418 - head/contrib/gcc Message-ID: <20160708022102.GA19626@FreeBSD.org> References: <201607080156.u681uqcS037482@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="F+wU6CH2q8RBGewX" 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 X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 02:21:03 -0000 --F+wU6CH2q8RBGewX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 07, 2016 at 09:16:18PM -0500, Pedro Giffuni wrote: > On 07/07/16 20:56, Glen Barber wrote: > >Author: gjb > >Date: Fri Jul 8 01:56:52 2016 > >New Revision: 302418 > >URL: https://svnweb.freebsd.org/changeset/base/302418 > > > >Log: > > Add freebsd12 to contrib/gcc/config.gcc. > > > > Submitted by: bdrewery > > Approved by: re (implicit) > > Sponsored by: The FreeBSD Foundation > > > >Modified: > > head/contrib/gcc/config.gcc > > > >Modified: head/contrib/gcc/config.gcc > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/contrib/gcc/config.gcc Fri Jul 8 01:47:01 2016 (r302417) > >+++ head/contrib/gcc/config.gcc Fri Jul 8 01:56:52 2016 (r302418) > >@@ -432,6 +432,8 @@ case ${target} in > > tm_defines=3D"${tm_defines} FBSD_MAJOR=3D10" ;; > > *-*-freebsd11 | *-*-freebsd11.*) > > tm_defines=3D"${tm_defines} FBSD_MAJOR=3D11" ;; > >+ *-*-freebsd12 | *-*-freebsd12.*) > >+ tm_defines=3D"${tm_defines} FBSD_MAJOR=3D12" ;; > > *) > > echo 'Please update *-*-freebsd* in gcc/config.gcc' > > exit 1 > > >=20 > For the record: this is not needed since we don't use GNU configure to > configure/build GCC. >=20 > We should really kill GCC42 early in current-12. >=20 Agreed. Let's wait until after the thaw, however. Glen --F+wU6CH2q8RBGewX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXfw4OAAoJEAMUWKVHj+KTgd8P/1A+fHHWYjhmS+YhNp0DFnqg vA8OSfdoE4t18QxmCoZ2aTnnTwordrzGHuuCmzaHbDpFOLW74MMXT7HjF/t9PKlw Q+Do/TGDvmKjzgxzl03VR2xfZiACeFrZjcwTPF/BXsjq/QOHpd/Fi1t6nWL7v1Kc Y8BRGE0H6Nl3lOQH9+hKPBZ/Ue7U7QITRv2rYfQ8r6Y9hNrm71+O3TI/3dmToxj1 cd7um+Ij+0t2l6otZ0T6qwZJVegz2pfCrBsI52X6lVrlLHKa68rTX6J2vWWai7cN keZ8MUfUJ/sJ381NDeWMtOxvqj3LVxjl9IQ0BwVYu0OWPnWalVIl1QXIzC7Z4xa7 DefI90CYL+PQM61TeZ8G53DNnJnep5k5uHoI2SSqqRdLis74nQL/dnGVhQ4LpyeQ JJnA0C0qREwvvMpc4FkBZLnHsgznm8cemFPmR3HSffgVXi3b5VJkZhe7eSTRjviu q4+QET+rOwSqzv0yIkmxkrRdrz21Yqf77+jb330lrgHLi+txRmSYcEPMwJAKeEG/ JLK1cJwaGzMsf3wiFs4Lpa7cQmgW7aG+u4W0HluPWYuD7p4wI08RDpJbM8yrtbIi Ofw7jYTrxWkmr4lW07w0rTBiXIoa1n85MBwz5we8xRMHMB+BFjcxsb7dWpQrJklR YztFdsESsA/DtTtAm7hr =bUC4 -----END PGP SIGNATURE----- --F+wU6CH2q8RBGewX-- From owner-svn-src-all@freebsd.org Fri Jul 8 02:34:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C899B83073; Fri, 8 Jul 2016 02:34:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC55F1369; Fri, 8 Jul 2016 02:34:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u682Y5Uh051893; Fri, 8 Jul 2016 02:34:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u682Y5cg051892; Fri, 8 Jul 2016 02:34:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607080234.u682Y5cg051892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Jul 2016 02:34: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: r302421 - stable/10/sys/fs/nfsclient 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 02:34:06 -0000 Author: kib Date: Fri Jul 8 02:34:04 2016 New Revision: 302421 URL: https://svnweb.freebsd.org/changeset/base/302421 Log: MFC r302196 Since VOP_INACTIVE() is not guaranteed to be called, all cleanups executed by inactive methods, must be repeated on reclaim. MFC r302210: Clean other flags in ncl_inactive, only. Modified: stable/10/sys/fs/nfsclient/nfs_clnode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clnode.c Fri Jul 8 02:19:09 2016 (r302420) +++ stable/10/sys/fs/nfsclient/nfs_clnode.c Fri Jul 8 02:34:04 2016 (r302421) @@ -200,15 +200,40 @@ nfs_freesillyrename(void *arg, __unused free(sp, M_NEWNFSREQ); } -int -ncl_inactive(struct vop_inactive_args *ap) +static void +ncl_releasesillyrename(struct vnode *vp, struct thread *td) { struct nfsnode *np; struct sillyrename *sp; - struct vnode *vp = ap->a_vp; - boolean_t retv; + ASSERT_VOP_ELOCKED(vp, "releasesillyrename"); np = VTONFS(vp); + mtx_assert(&np->n_mtx, MA_OWNED); + if (vp->v_type != VDIR) { + sp = np->n_sillyrename; + np->n_sillyrename = NULL; + } else + sp = NULL; + if (sp != NULL) { + mtx_unlock(&np->n_mtx); + (void) ncl_vinvalbuf(vp, 0, td, 1); + /* + * Remove the silly file that was rename'd earlier + */ + ncl_removeit(sp, vp); + crfree(sp->s_cred); + TASK_INIT(&sp->s_task, 0, nfs_freesillyrename, sp); + taskqueue_enqueue(taskqueue_thread, &sp->s_task); + mtx_lock(&np->n_mtx); + } +} + +int +ncl_inactive(struct vop_inactive_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct nfsnode *np; + boolean_t retv; if (NFS_ISV4(vp) && vp->v_type == VREG) { /* @@ -230,24 +255,15 @@ ncl_inactive(struct vop_inactive_args *a } } + np = VTONFS(vp); mtx_lock(&np->n_mtx); - if (vp->v_type != VDIR) { - sp = np->n_sillyrename; - np->n_sillyrename = NULL; - } else - sp = NULL; - if (sp) { - mtx_unlock(&np->n_mtx); - (void) ncl_vinvalbuf(vp, 0, ap->a_td, 1); - /* - * Remove the silly file that was rename'd earlier - */ - ncl_removeit(sp, vp); - crfree(sp->s_cred); - TASK_INIT(&sp->s_task, 0, nfs_freesillyrename, sp); - taskqueue_enqueue(taskqueue_thread, &sp->s_task); - mtx_lock(&np->n_mtx); - } + ncl_releasesillyrename(vp, ap->a_td); + + /* + * NMODIFIED means that there might be dirty/stale buffers + * associated with the NFS vnode. None of the other flags are + * meaningful after the vnode is unused. + */ np->n_flag &= NMODIFIED; mtx_unlock(&np->n_mtx); return (0); @@ -270,6 +286,10 @@ ncl_reclaim(struct vop_reclaim_args *ap) if (nfs_reclaim_p != NULL) nfs_reclaim_p(ap); + mtx_lock(&np->n_mtx); + ncl_releasesillyrename(vp, ap->a_td); + mtx_unlock(&np->n_mtx); + /* * Destroy the vm object and flush associated pages. */ From owner-svn-src-all@freebsd.org Fri Jul 8 02:52:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32002B833D3; Fri, 8 Jul 2016 02:52:40 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 089621BE0; Fri, 8 Jul 2016 02:52:39 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u682qdZI059412; Fri, 8 Jul 2016 02:52:39 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u682qdx7059411; Fri, 8 Jul 2016 02:52:39 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201607080252.u682qdx7059411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Fri, 8 Jul 2016 02:52: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: r302422 - stable/10/sys/netpfil/ipfw 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 02:52:40 -0000 Author: truckman Date: Fri Jul 8 02:52:39 2016 New Revision: 302422 URL: https://svnweb.freebsd.org/changeset/base/302422 Log: MFC r302338 Fix a race condition between the main thread in aqm_pie_cleanup() and the callout thread that can cause a kernel panic. Always do the final cleanup in the callout thread by passing a separate callout function for that task to callout_reset_sbt(). Protect the ref_count decrement in the callout with DN_BH_WLOCK(). All other ref_count manipulation is protected with this lock. There is still a tiny window between ref_count reaching zero and the end of the callout function where it is unsafe to unload the module. Fixing this would require the use of callout_drain(), but this can't be done because dummynet holds a mutex and callout_drain() might sleep. Remove the callout_pending(), callout_active(), and callout_deactivate() calls from calculate_drop_prob(). They are not needed because this callout uses callout_init_mtx(). Submitted by: Rasool Al-Saadi Differential Revision: https://reviews.freebsd.org/D6928 Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Fri Jul 8 02:34:04 2016 (r302421) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Fri Jul 8 02:52:39 2016 (r302422) @@ -207,24 +207,6 @@ calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; - /* dealing with race condition */ - if (callout_pending(&pst->aqm_pie_callout)) { - /* callout was reset */ - mtx_unlock(&pst->lock_mtx); - return; - } - - if (!callout_active(&pst->aqm_pie_callout)) { - /* callout was stopped */ - mtx_unlock(&pst->lock_mtx); - mtx_destroy(&pst->lock_mtx); - free(x, M_DUMMYNET); - //pst->pq->aqm_status = NULL; - pie_desc.ref_count--; - return; - } - callout_deactivate(&pst->aqm_pie_callout); - pprms = pst->parms; prob = pst->drop_prob; @@ -576,7 +558,7 @@ aqm_pie_init(struct dn_queue *q) do { /* exit with break when error occurs*/ if (!pprms){ - D("AQM_PIE is not configured"); + DX(2, "AQM_PIE is not configured"); err = EINVAL; break; } @@ -615,6 +597,22 @@ aqm_pie_init(struct dn_queue *q) } /* + * Callout function to destroy pie mtx and free PIE status memory + */ +static void +pie_callout_cleanup(void *x) +{ + struct pie_status *pst = (struct pie_status *) x; + + mtx_unlock(&pst->lock_mtx); + mtx_destroy(&pst->lock_mtx); + free(x, M_DUMMYNET); + DN_BH_WLOCK(); + pie_desc.ref_count--; + DN_BH_WUNLOCK(); +} + +/* * Clean up PIE status for queue 'q' * Destroy memory allocated for PIE status. */ @@ -640,22 +638,19 @@ aqm_pie_cleanup(struct dn_queue *q) return 1; } + /* + * Free PIE status allocated memory using pie_callout_cleanup() callout + * function to avoid any potential race. + * We reset aqm_pie_callout to call pie_callout_cleanup() in next 1um. This + * stops the scheduled calculate_drop_prob() callout and call pie_callout_cleanup() + * which does memory freeing. + */ mtx_lock(&pst->lock_mtx); + callout_reset_sbt(&pst->aqm_pie_callout, + SBT_1US, 0, pie_callout_cleanup, pst, 0); + q->aqm_status = NULL; + mtx_unlock(&pst->lock_mtx); - /* stop callout timer */ - if (callout_stop(&pst->aqm_pie_callout) || !(pst->sflags & PIE_ACTIVE)) { - mtx_unlock(&pst->lock_mtx); - mtx_destroy(&pst->lock_mtx); - free(q->aqm_status, M_DUMMYNET); - q->aqm_status = NULL; - pie_desc.ref_count--; - return 0; - } else { - q->aqm_status = NULL; - mtx_unlock(&pst->lock_mtx); - DX(2, "PIE callout has not been stoped from cleanup!"); - return EBUSY; - } return 0; } From owner-svn-src-all@freebsd.org Fri Jul 8 03:39:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CAA0B83C24; Fri, 8 Jul 2016 03:39:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37DD511D3; Fri, 8 Jul 2016 03:39:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u683dANr075269; Fri, 8 Jul 2016 03:39:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u683dAx9075268; Fri, 8 Jul 2016 03:39:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607080339.u683dAx9075268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 8 Jul 2016 03:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r302423 - vendor/gcc/dist/gcc/config/i386 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 03:39:11 -0000 Author: pfg Date: Fri Jul 8 03:39:10 2016 New Revision: 302423 URL: https://svnweb.freebsd.org/changeset/base/302423 Log: Vendor GCC: Bring older verbatim version of cpuid.h This is mainly for reference: clang has a similar file with minor differences that may be affecting portability. Obtained from: GCC (gcc-4_3-branch, rev. 129548, pre GPLv3) Added: vendor/gcc/dist/gcc/config/i386/cpuid.h (contents, props changed) Added: vendor/gcc/dist/gcc/config/i386/cpuid.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gcc/dist/gcc/config/i386/cpuid.h Fri Jul 8 03:39:10 2016 (r302423) @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2007 Free Software Foundation, Inc. + * + * This file is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * In addition to the permissions in the GNU General Public License, the + * Free Software Foundation gives you unlimited permission to link the + * compiled version of this file with other programs, and to distribute + * those programs without any restriction coming from the use of this + * file. (The General Public License restrictions do apply in other + * respects; for example, they cover modification of the file, and + * distribution when not linked into another program.) + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * As a special exception, if you link this library with files + * compiled with GCC to produce an executable, this does not cause + * the resulting executable to be covered by the GNU General Public License. + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + */ + +/* %ecx */ +#define bit_SSE3 (1 << 0) +#define bit_SSSE3 (1 << 9) +#define bit_CMPXCHG16B (1 << 13) +#define bit_SSE4_1 (1 << 19) +#define bit_SSE4_2 (1 << 20) +#define bit_POPCNT (1 << 23) + +/* %edx */ +#define bit_CMPXCHG8B (1 << 8) +#define bit_CMOV (1 << 15) +#define bit_MMX (1 << 23) +#define bit_FXSAVE (1 << 24) +#define bit_SSE (1 << 25) +#define bit_SSE2 (1 << 26) + +/* Extended Features */ +/* %ecx */ +#define bit_LAHF_LM (1 << 0) +#define bit_SSE4a (1 << 6) +#define bit_SSE5 (1 << 11) + +/* %edx */ +#define bit_LM (1 << 29) +#define bit_3DNOWP (1 << 30) +#define bit_3DNOW (1 << 31) + + +#if defined(__i386__) && defined(__PIC__) +/* %ebx may be the PIC register. */ +#define __cpuid(level, a, b, c, d) \ + __asm__ ("xchg{l}\t{%%}ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchg{l}\t{%%}ebx, %1\n\t" \ + : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ + : "0" (level)) +#else +#define __cpuid(level, a, b, c, d) \ + __asm__ ("cpuid\n\t" \ + : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ + : "0" (level)) +#endif + +/* Return highest supported input value for cpuid instruction. ext can + be either 0x0 or 0x8000000 to return highest supported value for + basic or extended cpuid information. Function returns 0 if cpuid + is not supported or whatever cpuid returns in eax register. If sig + pointer is non-null, then first four bytes of the signature + (as found in ebx register) are returned in location pointed by sig. */ + +static __inline unsigned int +__get_cpuid_max (unsigned int __ext, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; + +#ifndef __x86_64__ + /* See if we can use cpuid. On AMD64 we always can. */ + __asm__ ("pushf{l|d}\n\t" + "pushf{l|d}\n\t" + "pop{l}\t%0\n\t" + "mov{l}\t{%0, %1|%1, %0}\n\t" + "xor{l}\t{%2, %0|%0, %2}\n\t" + "push{l}\t%0\n\t" + "popf{l|d}\n\t" + "pushf{l|d}\n\t" + "pop{l}\t%0\n\t" + "popf{l|d}\n\t" + : "=&r" (__eax), "=&r" (__ebx) + : "i" (0x00200000)); + + if (!((__eax ^ __ebx) & 0x00200000)) + return 0; +#endif + + /* Host supports cpuid. Return highest supported cpuid input value. */ + __cpuid (__ext, __eax, __ebx, __ecx, __edx); + + if (__sig) + *__sig = __ebx; + + return __eax; +} + +/* Return cpuid data for requested cpuid level, as found in returned + eax, ebx, ecx and edx registers. The function checks if cpuid is + supported and returns 1 for valid cpuid information or 0 for + unsupported cpuid level. All pointers are required to be non-null. */ + +static __inline int +__get_cpuid (unsigned int __level, + unsigned int *__eax, unsigned int *__ebx, + unsigned int *__ecx, unsigned int *__edx) +{ + unsigned int __ext = __level & 0x80000000; + + if (__get_cpuid_max (__ext, 0) < __level) + return 0; + + __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx); + return 1; +} From owner-svn-src-all@freebsd.org Fri Jul 8 10:06:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEFF5B76AE6; Fri, 8 Jul 2016 10:06:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 722B01F0E; Fri, 8 Jul 2016 10:06:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68A63Oe018213; Fri, 8 Jul 2016 10:06:03 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68A63KC018207; Fri, 8 Jul 2016 10:06:03 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201607081006.u68A63KC018207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Fri, 8 Jul 2016 10:06: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: r302425 - in stable/10/contrib/libarchive: libarchive libarchive/test libarchive_fe 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 10:06:04 -0000 Author: mm Date: Fri Jul 8 10:06:02 2016 New Revision: 302425 URL: https://svnweb.freebsd.org/changeset/base/302425 Log: MFC r302294: Sync libarchive with vendor, bugfixes for tests: - fix tests on filesystems without birthtime support, e.g. UFS1 (1) - vendor issue #729: avoid use of C99 for-scope declarations in test_write_format_gnutar_filenames.c PR: 204157 (1) Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_string.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/test/main.c stable/10/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c stable/10/contrib/libarchive/libarchive_fe/passphrase.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Fri Jul 8 04:34:13 2016 (r302424) +++ stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Fri Jul 8 10:06:02 2016 (r302425) @@ -1504,7 +1504,11 @@ setup_current_filesystem(struct archive_ struct tree *t = a->tree; struct statfs sfs; #if defined(HAVE_GETVFSBYNAME) && defined(VFCF_SYNTHETIC) +# if defined(HAVE_STRUCT_VFSCONF) + struct vfsconf vfc; +# else struct xvfsconf vfc; +# endif #endif int r, xr = 0; #if !defined(HAVE_STRUCT_STATFS_F_NAMEMAX) Modified: stable/10/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_string.c Fri Jul 8 04:34:13 2016 (r302424) +++ stable/10/contrib/libarchive/libarchive/archive_string.c Fri Jul 8 10:06:02 2016 (r302425) @@ -559,7 +559,8 @@ archive_wstring_append_from_mbs_in_codep } if (count == 0 && length != 0) ret = -1; - } while (0); + break; + } while (1); } dest->length += count; dest->s[dest->length] = L'\0'; @@ -3552,18 +3553,19 @@ win_strncat_from_utf16(struct archive_st ll = WideCharToMultiByte(sc->to_cp, 0, (LPCWSTR)u16, (int)bytes>>1, mbs, (int)mbs_size, NULL, &defchar); - if (ll == 0 && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - /* Need more buffer for MBS. */ - ll = WideCharToMultiByte(sc->to_cp, 0, - (LPCWSTR)u16, (int)bytes, NULL, 0, NULL, NULL); - if (archive_string_ensure(as, ll +1) == NULL) - return (-1); - mbs = as->s + as->length; - mbs_size = as->buffer_length - as->length -1; - continue; + /* Exit loop if we succeeded */ + if (ll != 0 || + GetLastError() != ERROR_INSUFFICIENT_BUFFER) { + break; } - } while (0); + /* Else expand buffer and loop to try again. */ + ll = WideCharToMultiByte(sc->to_cp, 0, + (LPCWSTR)u16, (int)bytes, NULL, 0, NULL, NULL); + if (archive_string_ensure(as, ll +1) == NULL) + return (-1); + mbs = as->s + as->length; + mbs_size = as->buffer_length - as->length -1; + } while (1); archive_string_free(&tmp); as->length += ll; as->s[as->length] = '\0'; @@ -3634,19 +3636,20 @@ win_strncat_to_utf16(struct archive_stri do { count = MultiByteToWideChar(sc->from_cp, MB_PRECOMPOSED, s, (int)length, (LPWSTR)u16, (int)avail>>1); - if (count == 0 && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - /* Need more buffer for UTF-16 string */ - count = MultiByteToWideChar(sc->from_cp, - MB_PRECOMPOSED, s, (int)length, NULL, 0); - if (archive_string_ensure(as16, (count +1) * 2) - == NULL) - return (-1); - u16 = as16->s + as16->length; - avail = as16->buffer_length - 2; - continue; + /* Exit loop if we succeeded */ + if (count != 0 || + GetLastError() != ERROR_INSUFFICIENT_BUFFER) { + break; } - } while (0); + /* Expand buffer and try again */ + count = MultiByteToWideChar(sc->from_cp, + MB_PRECOMPOSED, s, (int)length, NULL, 0); + if (archive_string_ensure(as16, (count +1) * 2) + == NULL) + return (-1); + u16 = as16->s + as16->length; + avail = as16->buffer_length - 2; + } while (1); as16->length += count * 2; as16->s[as16->length] = 0; as16->s[as16->length+1] = 0; Modified: stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c Fri Jul 8 04:34:13 2016 (r302424) +++ stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c Fri Jul 8 10:06:02 2016 (r302425) @@ -3487,6 +3487,9 @@ exit_xattr: static int copy_acls(struct archive_write_disk *a, int tmpfd, int dffd) { +#ifndef HAVE_SYS_ACL_H + return 0; +#else acl_t acl, dfacl = NULL; int acl_r, ret = ARCHIVE_OK; @@ -3514,6 +3517,7 @@ exit_acl: if (dfacl) acl_free(dfacl); return (ret); +#endif } static int Modified: stable/10/contrib/libarchive/libarchive/test/main.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/test/main.c Fri Jul 8 04:34:13 2016 (r302424) +++ stable/10/contrib/libarchive/libarchive/test/main.c Fri Jul 8 10:06:02 2016 (r302425) @@ -1292,6 +1292,11 @@ assertion_file_time(const char *file, in switch (type) { case 'a': filet_nsec = st.st_atimespec.tv_nsec; break; case 'b': filet = st.st_birthtime; + /* FreeBSD filesystems that don't support birthtime + * (e.g., UFS1) always return -1 here. */ + if (filet == -1) { + return (1); + } filet_nsec = st.st_birthtimespec.tv_nsec; break; case 'm': filet_nsec = st.st_mtimespec.tv_nsec; break; default: fprintf(stderr, "INTERNAL: Bad type %c for file time", type); Modified: stable/10/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c Fri Jul 8 04:34:13 2016 (r302424) +++ stable/10/contrib/libarchive/libarchive/test/test_write_format_gnutar_filenames.c Fri Jul 8 10:06:02 2016 (r302425) @@ -42,6 +42,7 @@ DEFINE_TEST(test_write_format_gnutar_fil struct archive_entry *ae, *template; struct archive *a; size_t used; + int i; buff = malloc(buffsize); /* million bytes of work area */ assert(buff != NULL); @@ -55,7 +56,7 @@ DEFINE_TEST(test_write_format_gnutar_fil archive_entry_set_mode(template, S_IFREG | 0755); archive_entry_set_size(template, 8); - for (int i = 0; i < 2000; ++i) { + for (i = 0; i < 2000; ++i) { filename[i] = 'a'; filename[i + 1] = '\0'; archive_entry_copy_pathname(template, filename); @@ -97,6 +98,7 @@ DEFINE_TEST(test_write_format_gnutar_lin struct archive_entry *ae, *template; struct archive *a; size_t used; + int i; buff = malloc(buffsize); /* million bytes of work area */ assert(buff != NULL); @@ -110,7 +112,7 @@ DEFINE_TEST(test_write_format_gnutar_lin archive_entry_set_mode(template, S_IFLNK | 0755); archive_entry_copy_pathname(template, "link"); - for (int i = 0; i < 2000; ++i) { + for (i = 0; i < 2000; ++i) { filename[i] = 'a'; filename[i + 1] = '\0'; archive_entry_copy_symlink(template, filename); Modified: stable/10/contrib/libarchive/libarchive_fe/passphrase.c ============================================================================== --- stable/10/contrib/libarchive/libarchive_fe/passphrase.c Fri Jul 8 04:34:13 2016 (r302424) +++ stable/10/contrib/libarchive/libarchive_fe/passphrase.c Fri Jul 8 10:06:02 2016 (r302425) @@ -132,6 +132,10 @@ readpassphrase(const char *prompt, char #include #include +#ifndef _PATH_TTY +#define _PATH_TTY "/dev/tty" +#endif + #ifdef TCSASOFT # define _T_FLUSH (TCSAFLUSH|TCSASOFT) #else From owner-svn-src-all@freebsd.org Fri Jul 8 10:12:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19C87B76C84; Fri, 8 Jul 2016 10:12:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) 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 C7EFF149B; Fri, 8 Jul 2016 10:12:20 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bLSFK-00052A-Vg; Fri, 08 Jul 2016 12:38:54 +0300 Date: Fri, 8 Jul 2016 12:38:54 +0300 From: Slawa Olhovchenkov To: Glen Barber Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302420 - head Message-ID: <20160708093854.GC20831@zxy.spb.ru> References: <201607080219.u682J9qh044886@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201607080219.u682J9qh044886@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 10:12:21 -0000 On Fri, Jul 08, 2016 at 02:19:09AM +0000, Glen Barber wrote: > Author: gjb > Date: Fri Jul 8 02:19:09 2016 > New Revision: 302420 > URL: https://svnweb.freebsd.org/changeset/base/302420 > > Log: > Spell '12.x' correctly in UPDATING. > > Submitted by: lidl > Approved by: re (implicit) > Sponsored by: The FreeBSD Foundation > > Modified: > head/UPDATING > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Fri Jul 8 02:03:42 2016 (r302419) > +++ head/UPDATING Fri Jul 8 02:19:09 2016 (r302420) > @@ -17,7 +17,7 @@ the tip of head, and then rebuild withou > from older version of current across the gcc/clang cutover is a bit fragile. > > NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > - FreeBSD 11.x has many debugging features turned on, in both the kernel > + FreeBSD 12.x has many debugging features turned on, in both the kernel > and userland. These features attempt to detect incorrect use of > system primitives, and encourage loud failure through extra sanity > checking and fail stop semantics. They also substantially impact 11.x still have debugging features turned on? From owner-svn-src-all@freebsd.org Fri Jul 8 10:22:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 117F1B76E72; Fri, 8 Jul 2016 10:22:30 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C67431ADC; Fri, 8 Jul 2016 10:22:29 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from [192.168.228.1] (vega.codepro.be [IPv6:2a01:4f8:162:1127::3]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 93E592A15B; Fri, 8 Jul 2016 12:22:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1467973346; bh=WJ3vwVBRB6nqbel0M3/aYZORWCaHsw2bB3G8Xu9lp7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=y79NvwEo8KXjXuuP7cLMTR1SxP2270W7YCLV4utwQQu3t+LtiXHZWujJZMbK5GKyd Rw3zxoJeWrWZhJKuWxOrNgsE8+5rdi5BTpHWhCBVjKHWZkTmQeK/cOoDmYrZ8U0mzc Kofi9nxRPrSw6m6bH1zUj49iTGlqwJGEGsNSjGDQ= From: "Kristof Provost" To: "Slawa Olhovchenkov" Cc: "Glen Barber" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302420 - head Date: Fri, 08 Jul 2016 12:22:26 +0200 Message-ID: <9FD6ABC4-2793-4567-B1CD-2FBA4EA998C1@sigsegv.be> In-Reply-To: <20160708093854.GC20831@zxy.spb.ru> References: <201607080219.u682J9qh044886@repo.freebsd.org> <20160708093854.GC20831@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailer: MailMate (2.0BETAr6042) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 10:22:30 -0000 On 8 Jul 2016, at 11:38, Slawa Olhovchenkov wrote: > On Fri, Jul 08, 2016 at 02:19:09AM +0000, Glen Barber wrote: > >> Author: gjb >> Date: Fri Jul 8 02:19:09 2016 >> New Revision: 302420 >> URL: https://svnweb.freebsd.org/changeset/base/302420 >> >> Log: >> Spell '12.x' correctly in UPDATING. >> >> Submitted by: lidl >> Approved by: re (implicit) >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/UPDATING >> >> Modified: head/UPDATING >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/UPDATING Fri Jul 8 02:03:42 2016 (r302419) >> +++ head/UPDATING Fri Jul 8 02:19:09 2016 (r302420) >> @@ -17,7 +17,7 @@ the tip of head, and then rebuild withou >> from older version of current across the gcc/clang cutover is a bit = >> fragile. >> >> NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: >> - FreeBSD 11.x has many debugging features turned on, in both the = >> kernel >> + FreeBSD 12.x has many debugging features turned on, in both the = >> kernel >> and userland. These features attempt to detect incorrect use of >> system primitives, and encourage loud failure through extra sanity >> checking and fail stop semantics. They also substantially impact > > 11.x still have debugging features turned on? > Glen turned them off in r302410. Regards, Kristof From owner-svn-src-all@freebsd.org Fri Jul 8 11:36:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B44EB76611; Fri, 8 Jul 2016 11:36:05 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from pv33p00im-asmtp002.me.com (pv33p00im-asmtp002.me.com [17.142.194.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEB221742; Fri, 8 Jul 2016 11:36:01 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.pv33p00im-asmtp002.me.com by pv33p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0O9Z00F00RZRPF00@pv33p00im-asmtp002.me.com>; Fri, 08 Jul 2016 10:35:55 +0000 (GMT) Received: from [192.168.1.46] (unknown [117.200.30.51]) by pv33p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0O9Z00M3NS3OMJ20@pv33p00im-asmtp002.me.com>; Fri, 08 Jul 2016 10:35:55 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-08_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1607080105 User-Agent: Microsoft-MacOutlook/f.17.0.160611 Date: Fri, 08 Jul 2016 16:05:38 +0530 Subject: Re: svn commit: r302410 - in stable/11: . contrib/jemalloc/include/jemalloc etc/defaults sys/amd64/conf sys/i386/conf sys/powerpc/conf sys/sparc64/conf From: Ravi Pokala Sender: "Pokala, Ravi" To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-id: <61B19F6B-17BD-41ED-AAAE-43EC5D5ED0B0@panasas.com> Thread-topic: svn commit: r302410 - in stable/11: . contrib/jemalloc/include/jemalloc etc/defaults sys/amd64/conf sys/i386/conf sys/powerpc/conf sys/sparc64/conf References: <201607080022.u680MEb1003687@repo.freebsd.org> In-reply-to: <201607080022.u680MEb1003687@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1467974155; bh=MsEPGY0sDya9m86thizgSlpp/CqfcAKfbtdgf7XsSI4=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=I+UOVQ/mhL/3iD8GZtcQzX1mC+Q+dBEpjSat4L9OFPeNI4BriUmQjPnKRQlBrGbAR GS4FSjg+cha14EE5qOIAeLTZ+qKJkuegrpiYI5m5/Ig1qxo27cfU6KrHvwrGrjtytF 8STu+VEeQ73OWSDFhY8Jx1JMU9IX2rBNN1DLA+WLOpJ7rlr3T33zXYl4kU81DHh3KT 171dUc5BWLO2pinzZL+f1W/Hd4sJFcqSBGMzKt934RB7lF6YoBGccggkGmgqtHj+Wv bssS87sHlpNBwXoczQQpw21yLkyzK/BM7kqaV/Vi5/FmJo7MkEXbmVlKscR8DQTOAJ ZsOJJwbQysOcQ== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 11:36:05 -0000 -----Original Message----- > From: on behalf of Glen Barber > Date: 2016-07-08, Friday at 05:52 > To: , , , > Subject: svn commit: r302410 - in stable/11: . contrib/jemalloc/include/jemalloc etc/defaults sys/amd64/conf sys/i386/conf sys/powerpc/conf sys/sparc64/conf > > Author: gjb > Date: Fri Jul 8 00:22:14 2016 > New Revision: 302410 > URL: https://svnweb.freebsd.org/changeset/base/302410 > > Log: > - Remove debugging from GENERIC* kernel configurations > - Enable MALLOC_PRODUCTION > - Default dumpdev=NO > - Remove UPDATING entry regarding debugging features > > Approved by: re (implicit) > Sponsored by: The FreeBSD Foundation > > Modified: > stable/11/UPDATING > stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h > stable/11/etc/defaults/rc.conf > stable/11/sys/amd64/conf/GENERIC > stable/11/sys/i386/conf/GENERIC > stable/11/sys/powerpc/conf/GENERIC > stable/11/sys/sparc64/conf/GENERIC Just as we have MI sys/conf/NOTES and MD sys//conf/NOTES, would it make sense to have an MI sys/conf/GENERIC for the truly universal options, which could then be included by the MD sys//conf/GENERIC versions? That would reduce duplication and make it easier to twiddle knobs like this across the board when needed. If that sounds reasonable to people, I'll take a swing at that in August, when I get back from my vacation. Thanks, Ravi (rpokala@) From owner-svn-src-all@freebsd.org Fri Jul 8 13:08:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC252B837CA; Fri, 8 Jul 2016 13:08:27 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E30C1F41; Fri, 8 Jul 2016 13:08:27 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68D8QX5085203; Fri, 8 Jul 2016 13:08:26 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68D8QvJ085202; Fri, 8 Jul 2016 13:08:26 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607081308.u68D8QvJ085202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Fri, 8 Jul 2016 13:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302431 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 13:08:27 -0000 Author: skreuzer (doc,ports committer) Date: Fri Jul 8 13:08:26 2016 New Revision: 302431 URL: https://svnweb.freebsd.org/changeset/base/302431 Log: Document 302110, Merge netmap support from ncxgbe/ncxl to vcxgbe/vcxl Approved by: re (gjb, implicit, relnotes) 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 Jul 8 12:47:09 2016 (r302430) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jul 8 13:08:26 2016 (r302431) @@ -1296,6 +1296,11 @@ The &man.lagg.4; driver has been updated to remove support for the fec protocol. + + netmap + support from the ncxgbe/ncxl interfaces has been merged into the + vcxgbe/vcxl interfaces for the &man.cxgbe.4; driver. + From owner-svn-src-all@freebsd.org Fri Jul 8 13:09:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3E03B83848; Fri, 8 Jul 2016 13:09:56 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A31B9126A; Fri, 8 Jul 2016 13:09:56 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68D9t2X085309; Fri, 8 Jul 2016 13:09:55 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68D9tLQ085308; Fri, 8 Jul 2016 13:09:55 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607081309.u68D9tLQ085308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Fri, 8 Jul 2016 13:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302432 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 13:09:56 -0000 Author: skreuzer (doc,ports committer) Date: Fri Jul 8 13:09:55 2016 New Revision: 302432 URL: https://svnweb.freebsd.org/changeset/base/302432 Log: Document 289549, Update hostapd/wpa_supplicant to version 2.5. Approved by: re (gjb, implicit, relnotes) 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 Jul 8 13:08:26 2016 (r302431) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jul 8 13:09:55 2016 (r302432) @@ -505,9 +505,9 @@ The &man.nvi.1; utility has been updated to version 2.1.3. - The &man.wpa.supplicant.8; and + The &man.wpa.supplicant.8; and &man.hostapd.8; utilities have been updated to version - 2.4. + 2.5. The &man.resolvconf.8; utility has been updated to version From owner-svn-src-all@freebsd.org Fri Jul 8 13:12:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4984B839BF; Fri, 8 Jul 2016 13:12:25 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73D5516CF; Fri, 8 Jul 2016 13:12:25 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68DCO9w088720; Fri, 8 Jul 2016 13:12:24 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68DCOC0088719; Fri, 8 Jul 2016 13:12:24 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607081312.u68DCOC0088719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Fri, 8 Jul 2016 13:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302433 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 13:12:25 -0000 Author: skreuzer (doc,ports committer) Date: Fri Jul 8 13:12:24 2016 New Revision: 302433 URL: https://svnweb.freebsd.org/changeset/base/302433 Log: Document 293190, Update less to v481 Approved by: re (gjb, implicit, relnotes) 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 Jul 8 13:09:55 2016 (r302432) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jul 8 13:12:24 2016 (r302433) @@ -513,6 +513,9 @@ &man.resolvconf.8; utility has been updated to version 3.7.3. + less has + been updated to version v481. + bmake has been updated to version 20150606. From owner-svn-src-all@freebsd.org Fri Jul 8 13:21:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 110CCB83B88; Fri, 8 Jul 2016 13:21:53 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D19C71CA7; Fri, 8 Jul 2016 13:21:52 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68DLpPd091622; Fri, 8 Jul 2016 13:21:51 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68DLp1M091621; Fri, 8 Jul 2016 13:21:51 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607081321.u68DLp1M091621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Fri, 8 Jul 2016 13:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302434 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 13:21:53 -0000 Author: skreuzer (doc,ports committer) Date: Fri Jul 8 13:21:51 2016 New Revision: 302434 URL: https://svnweb.freebsd.org/changeset/base/302434 Log: Document 300436, bsdinstall/zfsboot GPT+BIOS+GELI installs make use of GELIBOOT Approved by: re (gjb, implicit, relnotes) 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 Jul 8 13:12:24 2016 (r302433) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jul 8 13:21:51 2016 (r302434) @@ -639,6 +639,11 @@ and &man.sade.8; utility have been updated to include native ZFS support. + + &man.bsdinstall.8;/zfsboot GPT+BIOS+GELI installs now make use + of GELIBOOT which allows ZFS Boot Environments to be used with + GELI encrypted ZFS pools. + The &os; installation utility, &man.bsdinstall.8;, has been updated to set the canmount &man.zfs.8; property to From owner-svn-src-all@freebsd.org Fri Jul 8 13:26:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9813CB83DAC; Fri, 8 Jul 2016 13:26:18 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A12D11D8; Fri, 8 Jul 2016 13:26:18 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68DQHMR092574; Fri, 8 Jul 2016 13:26:17 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68DQH0V092573; Fri, 8 Jul 2016 13:26:17 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607081326.u68DQH0V092573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Fri, 8 Jul 2016 13:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302435 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 13:26:18 -0000 Author: skreuzer (doc,ports committer) Date: Fri Jul 8 13:26:17 2016 New Revision: 302435 URL: https://svnweb.freebsd.org/changeset/base/302435 Log: Document 301973, Add bsdconfig `wifi' (aka `wireless' or `wlan') module Approved by: re (gjb, implicit, relnotes) 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 Jul 8 13:21:51 2016 (r302434) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jul 8 13:26:17 2016 (r302435) @@ -644,6 +644,9 @@ of GELIBOOT which allows ZFS Boot Environments to be used with GELI encrypted ZFS pools. + A module to configure wifi devices has been added + to &man.bsdinstall.8; + The &os; installation utility, &man.bsdinstall.8;, has been updated to set the canmount &man.zfs.8; property to From owner-svn-src-all@freebsd.org Fri Jul 8 13:29:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E7EB83E56; Fri, 8 Jul 2016 13:29:48 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95CA31438; Fri, 8 Jul 2016 13:29:48 +0000 (UTC) (envelope-from skreuzer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68DTlKY092723; Fri, 8 Jul 2016 13:29:47 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68DTlBr092722; Fri, 8 Jul 2016 13:29:47 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201607081329.u68DTlBr092722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Fri, 8 Jul 2016 13:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302436 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 13:29:48 -0000 Author: skreuzer (doc,ports committer) Date: Fri Jul 8 13:29:47 2016 New Revision: 302436 URL: https://svnweb.freebsd.org/changeset/base/302436 Log: Document 300291, Enable NEW_PCIB on arm64. Approved by: re (gjb, implicit, relnotes) 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 Jul 8 13:26:17 2016 (r302435) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jul 8 13:29:47 2016 (r302436) @@ -1038,6 +1038,10 @@ To retain the previous behavior, add KERN_DEBUGDIR="" to &man.src.conf.5;. + + + NEW_PCIB is enabled by default. + From owner-svn-src-all@freebsd.org Fri Jul 8 15:57:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6A9EB82A61; Fri, 8 Jul 2016 15:57:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73FD11C10; Fri, 8 Jul 2016 15:57:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68Fvtt0049318; Fri, 8 Jul 2016 15:57:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68Fvtss049317; Fri, 8 Jul 2016 15:57:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607081557.u68Fvtss049317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 8 Jul 2016 15:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r302437 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 15:57:56 -0000 Author: gjb Date: Fri Jul 8 15:57:55 2016 New Revision: 302437 URL: https://svnweb.freebsd.org/changeset/base/302437 Log: Thaw head (12.0-CURRENT) now that stable/11 has branched. Committers are requested to excercise caution for the duration of the 11.0-RELEASE cycle, especially regarding changes that are eligible (or proposed) for MFC to stable/11. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Jul 8 13:29:47 2016 (r302436) +++ svnadmin/conf/approvers Fri Jul 8 15:57:55 2016 (r302437) @@ -16,7 +16,7 @@ # # $FreeBSD$ # -^head/ re +#^head/ re ^stable/11/ re #^stable/10/ re ^release/ re From owner-svn-src-all@freebsd.org Fri Jul 8 16:29:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A69ACB8377A; Fri, 8 Jul 2016 16:29:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 797BD19C6; Fri, 8 Jul 2016 16:29:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68GTjqV060617; Fri, 8 Jul 2016 16:29:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68GTjRG060616; Fri, 8 Jul 2016 16:29:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081629.u68GTjRG060616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 16:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302438 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 16:29:46 -0000 Author: ngie Date: Fri Jul 8 16:29:45 2016 New Revision: 302438 URL: https://svnweb.freebsd.org/changeset/base/302438 Log: Revert r302403 lang/gcc{48,49,5} lacks -fformat-extensions support (causing build errors, which is what prompted r302403 to be committed). devel/amd64-gcc on the other hand (which is used by Jenkins), has the support. This fixes the Jenkins failure emails due to excessive warnings being produced with "make buildkernel". Discussed with: lwhsu Reported by: Jenkins (FreeBSD_HEAD_amd64_gcc job) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Jul 8 15:57:55 2016 (r302437) +++ head/sys/conf/kern.mk Fri Jul 8 16:29:45 2016 (r302438) @@ -62,7 +62,7 @@ CWARNEXTRA?= -Wno-uninitialized FORMAT_EXTENSIONS= -Wno-format .elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ -.elif ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} == 40201 +.else FORMAT_EXTENSIONS= -fformat-extensions .endif From owner-svn-src-all@freebsd.org Fri Jul 8 17:04:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDD57B842D8; Fri, 8 Jul 2016 17:04:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE62F1330; Fri, 8 Jul 2016 17:04:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68H4LUv075333; Fri, 8 Jul 2016 17:04:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68H4Lqv075332; Fri, 8 Jul 2016 17:04:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607081704.u68H4Lqv075332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 8 Jul 2016 17:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302439 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 17:04:23 -0000 Author: cem Date: Fri Jul 8 17:04:21 2016 New Revision: 302439 URL: https://svnweb.freebsd.org/changeset/base/302439 Log: iflib: Fix typo in 'iflib_rx_miss_bufs' sysctl name It looks like these sysctls were copy-pasted from netmap. Most were changed from 'ixl_' prefix to 'iflib_', but this one was missed. Fix the "can't re-use a leaf (ixl_rx_miss_bufs)!" warning. Reported by: dim@ and others Sponsored by: EMC / Isilon Storage Division Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Jul 8 16:29:45 2016 (r302438) +++ head/sys/net/iflib.c Fri Jul 8 17:04:21 2016 (r302439) @@ -626,12 +626,12 @@ MODULE_DEPEND(iflib, netmap, 1, 1, 1); /* * device-specific sysctl variables: * - * ixl_crcstrip: 0: keep CRC in rx frames (default), 1: strip it. + * iflib_crcstrip: 0: keep CRC in rx frames (default), 1: strip it. * During regular operations the CRC is stripped, but on some * hardware reception of frames not multiple of 64 is slower, * so using crcstrip=0 helps in benchmarks. * - * ixl_rx_miss, ixl_rx_miss_bufs: + * iflib_rx_miss, iflib_rx_miss_bufs: * count packets that might be missed due to lost interrupts. */ SYSCTL_DECL(_dev_netmap); @@ -646,7 +646,7 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, iflib_ int iflib_rx_miss, iflib_rx_miss_bufs; SYSCTL_INT(_dev_netmap, OID_AUTO, iflib_rx_miss, CTLFLAG_RW, &iflib_rx_miss, 0, "potentially missed rx intr"); -SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss_bufs, +SYSCTL_INT(_dev_netmap, OID_AUTO, iflib_rx_miss_bufs, CTLFLAG_RW, &iflib_rx_miss_bufs, 0, "potentially missed rx intr bufs"); /* From owner-svn-src-all@freebsd.org Fri Jul 8 17:10:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FE3DB843F3; Fri, 8 Jul 2016 17:10:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 800D215EF; Fri, 8 Jul 2016 17:10:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 79AFB1DAC; Fri, 8 Jul 2016 17:10:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 2BA5822859; Fri, 8 Jul 2016 17:10:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 0xRRwZxgwcBF; Fri, 8 Jul 2016 17:10:33 +0000 (UTC) Subject: Re: svn commit: r302438 - head/sys/conf DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 03E0C2284F To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607081629.u68GTjRG060616@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <68b495b4-0448-48a1-b321-bbf91b9789c2@FreeBSD.org> Date: Fri, 8 Jul 2016 10:10:30 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607081629.u68GTjRG060616@repo.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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 17:10:36 -0000 On 7/8/16 9:29 AM, Garrett Cooper wrote: > Author: ngie > Date: Fri Jul 8 16:29:45 2016 > New Revision: 302438 > URL: https://svnweb.freebsd.org/changeset/base/302438 > > Log: > Revert r302403 > > lang/gcc{48,49,5} lacks -fformat-extensions support (causing build errors, which > is what prompted r302403 to be committed). devel/amd64-gcc on the other hand > (which is used by Jenkins), has the support. > > This fixes the Jenkins failure emails due to excessive warnings being produced > with "make buildkernel". > > Discussed with: lwhsu > Reported by: Jenkins (FreeBSD_HEAD_amd64_gcc job) > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/conf/kern.mk > > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Fri Jul 8 15:57:55 2016 (r302437) > +++ head/sys/conf/kern.mk Fri Jul 8 16:29:45 2016 (r302438) > @@ -62,7 +62,7 @@ CWARNEXTRA?= -Wno-uninitialized > FORMAT_EXTENSIONS= -Wno-format > .elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 > FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ > -.elif ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} == 40201 > +.else > FORMAT_EXTENSIONS= -fformat-extensions > .endif > > This needs to be MFC'd to stable/11. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Fri Jul 8 17:30:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41B45B84CC3; Fri, 8 Jul 2016 17:30:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (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 03B0C160A; Fri, 8 Jul 2016 17:30:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x231.google.com with SMTP id c2so14570151pfa.2; Fri, 08 Jul 2016 10:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LsuEcJXOl5CYrDGuaIP50aPG9X37uSg949Li9g+rezU=; b=LSSfojr6LxrmLu6+B0gG+eXH0F961uYYmOJ0lEexvsq1d9aKrfwYk6usEoFL88z6kK 6boU4oH8dlTOEL+OsXOSnopkCAukGL3+su+i0pOUj804j5Eluy8JLHewg/dhsBV1zd4y skT4qhlICddKlzJ6Sd2BquN1+HV5zS86abq9JlzWMIY+pyDesWLPzHn1T0uqabw24zrZ zN3Nili5g33lDRlT55Q0+2BcgTvkQtTceOsGACNn4nSa72CFV8J2u3IZ8I8zAnQX/Hyb crK4UxZVea05iVVAo7S9Bxfw2F8iCJoD56pUOnKE52t1SSXcr508jNDIDGDqx7MvRxfW LlJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LsuEcJXOl5CYrDGuaIP50aPG9X37uSg949Li9g+rezU=; b=PQM6kh2cH2R8LWYXWcVqtOZ2ZoxiFnXkGkoMFGLK56JN64W1EgJUyGDo5iTHF3vR/J h8fz3OeYqEhCVcB37/Nwuz6puQqMzcg7PSCx4LTMGGJAeTtZoLyKKJW6BmCNd4zOH7g6 2YtQeHh+fdRq2dvnPVMWT6SChQBpeREwkqd+lFrB2dQhu89rnijJZU3zsLB0ESFqIf1S JtbDuyokBpvfu584WiZaWf6/kqTs34eanx5OpINQqlTugGfQWgwPAcpngXocVfkdaTom v1m57uBJ5wrWfovmK5XM/tMpNBU/qFK2/chvj4KYs//2Qryh/NwCNF1b5fCsP/4s+d1A mIFQ== X-Gm-Message-State: ALyK8tICkyvanAVAO5WvEGBaZlORfoC6GwYWFbFudePGGZoQcabVUfGWYwKyNBdJH4C98A== X-Received: by 10.98.31.140 with SMTP id l12mr11874872pfj.51.1467999010326; Fri, 08 Jul 2016 10:30:10 -0700 (PDT) Received: from [192.168.20.9] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id k76sm3650771pfg.53.2016.07.08.10.30.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jul 2016 10:30:09 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r302438 - head/sys/conf From: Ngie Cooper X-Mailer: iPhone Mail (13F69) In-Reply-To: <68b495b4-0448-48a1-b321-bbf91b9789c2@FreeBSD.org> Date: Fri, 8 Jul 2016 10:30:07 -0700 Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201607081629.u68GTjRG060616@repo.freebsd.org> <68b495b4-0448-48a1-b321-bbf91b9789c2@FreeBSD.org> To: Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 17:30:11 -0000 > On Jul 8, 2016, at 10:10, Bryan Drewery wrote: ... > This needs to be MFC'd to stable/11. Yup. I'm going to open a commit request soon. Thanks :), -Ngie > > -- > Regards, > Bryan Drewery From owner-svn-src-all@freebsd.org Fri Jul 8 18:13:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E77B8B857F3; Fri, 8 Jul 2016 18:13:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC20D1D08; Fri, 8 Jul 2016 18:13:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68IDNgR001547; Fri, 8 Jul 2016 18:13:23 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68IDNNE001546; Fri, 8 Jul 2016 18:13:23 GMT (envelope-from np@FreeBSD.org) Message-Id: <201607081813.u68IDNNE001546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 8 Jul 2016 18:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302440 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 18:13:25 -0000 Author: np Date: Fri Jul 8 18:13:23 2016 New Revision: 302440 URL: https://svnweb.freebsd.org/changeset/base/302440 Log: cxgbe(4): Add sysctl to display the RSS indirection table size for an interface. dev.cxl..rss_size dev.vcxl..rss_size MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jul 8 17:04:21 2016 (r302439) +++ head/sys/dev/cxgbe/t4_main.c Fri Jul 8 18:13:23 2016 (r302440) @@ -4870,6 +4870,8 @@ vi_sysctls(struct vi_info *vi) &vi->first_rxq, 0, "index of first rx queue"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_txq", CTLFLAG_RD, &vi->first_txq, 0, "index of first tx queue"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rss_size", CTLFLAG_RD, NULL, + vi->rss_size, "size of RSS indirection table"); if (IS_MAIN_VI(vi)) { SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rsrv_noflowq", From owner-svn-src-all@freebsd.org Fri Jul 8 18:54:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DB9AB83124; Fri, 8 Jul 2016 18:54:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FBF61389; Fri, 8 Jul 2016 18:54:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68IsS6k016098; Fri, 8 Jul 2016 18:54:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68IsS4q016097; Fri, 8 Jul 2016 18:54:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081854.u68IsS4q016097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 18:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302441 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 18:54:29 -0000 Author: ngie Date: Fri Jul 8 18:54:28 2016 New Revision: 302441 URL: https://svnweb.freebsd.org/changeset/base/302441 Log: MFC r302438: Revert r302403 lang/gcc{48,49,5} lacks -fformat-extensions support (causing build errors, which is what prompted r302403 to be committed). devel/amd64-gcc on the other hand (which is used by Jenkins), has the support. This fixes the Jenkins failure emails due to excessive warnings being produced with "make buildkernel". Discussed with: lwhsu Approved by: re (gjb) Modified: stable/11/sys/conf/kern.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Fri Jul 8 18:13:23 2016 (r302440) +++ stable/11/sys/conf/kern.mk Fri Jul 8 18:54:28 2016 (r302441) @@ -62,7 +62,7 @@ CWARNEXTRA?= -Wno-uninitialized FORMAT_EXTENSIONS= -Wno-format .elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ -.elif ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} == 40201 +.else FORMAT_EXTENSIONS= -fformat-extensions .endif From owner-svn-src-all@freebsd.org Fri Jul 8 19:04:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3008CB833F7; Fri, 8 Jul 2016 19:04:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 004E11B49; Fri, 8 Jul 2016 19:04:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68J4q6S019902; Fri, 8 Jul 2016 19:04:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68J4qSA019901; Fri, 8 Jul 2016 19:04:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081904.u68J4qSA019901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 19:04:52 +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: r302442 - stable/10/lib/libc/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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:04:53 -0000 Author: ngie Date: Fri Jul 8 19:04:51 2016 New Revision: 302442 URL: https://svnweb.freebsd.org/changeset/base/302442 Log: MFC r301707: Use NULL instead of `0` in _ht_getnetbyname(..) - getnetent returns NULL on completion/error. - .h_aliases is NULL terminated. Modified: stable/10/lib/libc/net/getnetbyht.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getnetbyht.c ============================================================================== --- stable/10/lib/libc/net/getnetbyht.c Fri Jul 8 18:54:28 2016 (r302441) +++ stable/10/lib/libc/net/getnetbyht.c Fri Jul 8 19:04:51 2016 (r302442) @@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_da } _setnethtent(ned->stayopen, ned); - while ((error = getnetent_p(&ne, ned)) == 0) { + while ((error = getnetent_p(&ne, ned)) == NULL) { if (strcasecmp(ne.n_name, name) == 0) break; - for (cp = ne.n_aliases; *cp != 0; cp++) + for (cp = ne.n_aliases; *cp != NULL; cp++) if (strcasecmp(*cp, name) == 0) goto found; } From owner-svn-src-all@freebsd.org Fri Jul 8 19:09:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 924FEB834F5; Fri, 8 Jul 2016 19:09:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DBC71E4F; Fri, 8 Jul 2016 19:09:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68J9lJY020335; Fri, 8 Jul 2016 19:09:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68J9lbK020334; Fri, 8 Jul 2016 19:09:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081909.u68J9lbK020334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 19:09:47 +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: r302443 - stable/9/lib/libc/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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:09:48 -0000 Author: ngie Date: Fri Jul 8 19:09:47 2016 New Revision: 302443 URL: https://svnweb.freebsd.org/changeset/base/302443 Log: MFstable/10 r302442: MFC r301707: Use NULL instead of `0` in _ht_getnetbyname(..) - getnetent returns NULL on completion/error. - .h_aliases is NULL terminated. Modified: stable/9/lib/libc/net/getnetbyht.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getnetbyht.c ============================================================================== --- stable/9/lib/libc/net/getnetbyht.c Fri Jul 8 19:04:51 2016 (r302442) +++ stable/9/lib/libc/net/getnetbyht.c Fri Jul 8 19:09:47 2016 (r302443) @@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_da } _setnethtent(ned->stayopen, ned); - while ((error = getnetent_p(&ne, ned)) == 0) { + while ((error = getnetent_p(&ne, ned)) == NULL) { if (strcasecmp(ne.n_name, name) == 0) break; - for (cp = ne.n_aliases; *cp != 0; cp++) + for (cp = ne.n_aliases; *cp != NULL; cp++) if (strcasecmp(*cp, name) == 0) goto found; } From owner-svn-src-all@freebsd.org Fri Jul 8 19:13:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB39CB8366B; Fri, 8 Jul 2016 19:13:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B79601378; Fri, 8 Jul 2016 19:13:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68JDISX023765; Fri, 8 Jul 2016 19:13:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68JDIex023764; Fri, 8 Jul 2016 19:13:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081913.u68JDIex023764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 19:13: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: r302444 - stable/10/lib/libc/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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:13:20 -0000 Author: ngie Date: Fri Jul 8 19:13:18 2016 New Revision: 302444 URL: https://svnweb.freebsd.org/changeset/base/302444 Log: MFC r301708: Revert r301707 getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and I didn't verify that it worked before committing the change Pointyhat to: ngie Modified: stable/10/lib/libc/net/getnetbyht.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getnetbyht.c ============================================================================== --- stable/10/lib/libc/net/getnetbyht.c Fri Jul 8 19:09:47 2016 (r302443) +++ stable/10/lib/libc/net/getnetbyht.c Fri Jul 8 19:13:18 2016 (r302444) @@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_da } _setnethtent(ned->stayopen, ned); - while ((error = getnetent_p(&ne, ned)) == NULL) { + while ((error = getnetent_p(&ne, ned)) == 0) { if (strcasecmp(ne.n_name, name) == 0) break; - for (cp = ne.n_aliases; *cp != NULL; cp++) + for (cp = ne.n_aliases; *cp != 0; cp++) if (strcasecmp(*cp, name) == 0) goto found; } From owner-svn-src-all@freebsd.org Fri Jul 8 19:16:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8627B83753; Fri, 8 Jul 2016 19:16:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78C2115A5; Fri, 8 Jul 2016 19:16:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68JGjRV023949; Fri, 8 Jul 2016 19:16:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68JGjKQ023948; Fri, 8 Jul 2016 19:16:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081916.u68JGjKQ023948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 19:16:45 +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: r302445 - stable/9/lib/libc/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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:16:46 -0000 Author: ngie Date: Fri Jul 8 19:16:45 2016 New Revision: 302445 URL: https://svnweb.freebsd.org/changeset/base/302445 Log: MFstable/10 r302444: MFC r301708: Revert r301707 getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and I didn't verify that it worked before committing the change Pointyhat to: ngie Modified: stable/9/lib/libc/net/getnetbyht.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getnetbyht.c ============================================================================== --- stable/9/lib/libc/net/getnetbyht.c Fri Jul 8 19:13:18 2016 (r302444) +++ stable/9/lib/libc/net/getnetbyht.c Fri Jul 8 19:16:45 2016 (r302445) @@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_da } _setnethtent(ned->stayopen, ned); - while ((error = getnetent_p(&ne, ned)) == NULL) { + while ((error = getnetent_p(&ne, ned)) == 0) { if (strcasecmp(ne.n_name, name) == 0) break; - for (cp = ne.n_aliases; *cp != NULL; cp++) + for (cp = ne.n_aliases; *cp != 0; cp++) if (strcasecmp(*cp, name) == 0) goto found; } From owner-svn-src-all@freebsd.org Fri Jul 8 19:16:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF1DDB8378C; Fri, 8 Jul 2016 19:16:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D0F115FB; Fri, 8 Jul 2016 19:16:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68JGokA023999; Fri, 8 Jul 2016 19:16:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68JGoLd023998; Fri, 8 Jul 2016 19:16:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607081916.u68JGoLd023998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 19:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302446 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:16:52 -0000 Author: adrian Date: Fri Jul 8 19:16:50 2016 New Revision: 302446 URL: https://svnweb.freebsd.org/changeset/base/302446 Log: [ath_hal] extend the TX/RX descriptor layout to include location/beamforming fields. * extend the TX timestamp to 32 bits, as the AR5416 and later does a full 32 bit TX timestamp instead of 15 or 16 bits. * add RX descriptor fields for PHY uploaded information (coming soon) * add flags for RX/TX fast timestamp, hardware upload, etc * add a flag for TX to request ToD/ToA location information. Modified: head/sys/dev/ath/ath_hal/ah_desc.h Modified: head/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_desc.h Fri Jul 8 19:16:45 2016 (r302445) +++ head/sys/dev/ath/ath_hal/ah_desc.h Fri Jul 8 19:16:50 2016 (r302446) @@ -46,7 +46,8 @@ */ struct ath_tx_status { uint16_t ts_seqnum; /* h/w assigned sequence number */ - uint16_t ts_tstamp; /* h/w assigned timestamp */ + uint16_t ts_pad1[1]; + uint32_t ts_tstamp; /* h/w assigned timestamp */ uint8_t ts_status; /* frame status, 0 => xmit ok */ uint8_t ts_rate; /* h/w transmit rate index */ int8_t ts_rssi; /* tx ack RSSI */ @@ -86,6 +87,7 @@ struct ath_tx_status { #define HAL_TX_DESC_CFG_ERR 0x10 /* Error in 20/40 desc config */ #define HAL_TX_DATA_UNDERRUN 0x20 /* Tx buffer underrun */ #define HAL_TX_DELIM_UNDERRUN 0x40 /* Tx delimiter underrun */ +#define HAL_TX_FAST_TS 0x80 /* Tx locationing timestamp */ /* * Receive descriptor status. This structure is filled @@ -128,6 +130,9 @@ struct ath_rx_status { uint16_t rs_flags; /* misc flags */ uint8_t rs_num_delims; /* number of delims in aggr */ uint8_t rs_spare0; /* padding */ + uint8_t rs_ness; /* number of extension spatial streams */ + uint8_t rs_hw_upload_data_type; /* hw upload format */ + uint16_t rs_spare1; uint32_t rs_evm0; /* evm bytes */ uint32_t rs_evm1; uint32_t rs_evm2; @@ -156,6 +161,11 @@ struct ath_rx_status { #define HAL_RX_HI_RX_CHAIN 0x0080 /* SM power save: hi Rx chain control */ #define HAL_RX_IS_APSD 0x0100 /* Is ASPD trigger frame */ #define HAL_RX_STBC 0x0200 /* Is an STBC frame */ +#define HAL_RX_LOC_INFO 0x0400 /* RX locationing information */ + +#define HAL_RX_HW_UPLOAD_DATA 0x1000 /* This is a hardware data frame */ +#define HAL_RX_HW_SOUNDING 0x2000 /* Rx sounding frame (TxBF, positioning) */ +#define HAL_RX_UPLOAD_VALID 0x4000 /* This hardware data frame is valid */ /* * This is the format of RSSI[2] on the AR9285/AR9485. @@ -282,6 +292,7 @@ struct ath_desc_status { #define HAL_TXDESC_LOWRXCHAIN 0x0400 /* switch to low RX chain */ #define HAL_TXDESC_LDPC 0x1000 /* Set LDPC TX for all rates */ #define HAL_TXDESC_HWTS 0x2000 /* Request Azimuth Timestamp in TX payload */ +#define HAL_TXDESC_POS 0x4000 /* Request ToD/ToA locationing */ /* flags passed to rx descriptor setup methods */ #define HAL_RXDESC_INTREQ 0x0020 /* enable per-descriptor interrupt */ From owner-svn-src-all@freebsd.org Fri Jul 8 19:19:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA1A2B83840; Fri, 8 Jul 2016 19:19:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A5BF18E5; Fri, 8 Jul 2016 19:19:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68JJUop024146; Fri, 8 Jul 2016 19:19:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68JJUC1024145; Fri, 8 Jul 2016 19:19:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607081919.u68JJUC1024145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 19:19:30 +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: r302447 - stable/10/contrib/netbsd-tests/lib/libc/string 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:19:31 -0000 Author: ngie Date: Fri Jul 8 19:19:30 2016 New Revision: 302447 URL: https://svnweb.freebsd.org/changeset/base/302447 Log: MFC r301749: Add debug output to aid in determining why `goodResult` != `result` PR: 210619 (for diagnosis) Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Fri Jul 8 19:16:50 2016 (r302446) +++ stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Fri Jul 8 19:19:30 2016 (r302447) @@ -108,7 +108,12 @@ ATF_TC_BODY(memcpy_basic, tc) if (i != j) runTest(start[i], start[j]); MD5End(mc, result); +#ifdef __NetBSD__ ATF_REQUIRE_EQ(strcmp(result, goodResult), 0); +#else + ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s", + result, goodResult); +#endif } ATF_TC(memccpy_simple); From owner-svn-src-all@freebsd.org Fri Jul 8 19:55:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 127B2B8420F; Fri, 8 Jul 2016 19:55:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 CF78A1D68; Fri, 8 Jul 2016 19:55:49 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x22e.google.com with SMTP id f6so11896439ith.0; Fri, 08 Jul 2016 12:55:49 -0700 (PDT) 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; bh=ySeGR8k8LZbY5GUAhN4sC2Ln1xq9Smust2RsdhxHMns=; b=thW5lOp1fk3qTVWzIChKrbNa0x8sjZ/Q7zhbk+MenSS4mtvdqMw4Mqgcl4VdZvLeqq u/uMYI5+q5jbNOaQFBYw390DlGV+nEttDWUyLFoaFqcpA7Zt3GWYe9/tXtZOIYPulA7+ geiiO+WtWiZPzz9lyvvjFwnljiKVA9545k/a2gXd9t/4m9ZzP41Qx9tqsk/wrzzXXBv1 8QnX6mfvPkqYN2AWbhL9l4nKEZU/B60ehy3kxCbvQoC8W72p/FJnW0xSt9fux8szbl+l v8FZQVLQoWyPr7ORxBAhCAxDnixoLlvejJkBK4Nhiad2mrqCGlj1RYtZcvwTnStR2POq YfHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ySeGR8k8LZbY5GUAhN4sC2Ln1xq9Smust2RsdhxHMns=; b=aADnjaqT5/RISZ0yDV4pGI8temdBG8GTw/it2c6VX2MXUKKStYpdIlsYxYzjV3mtr1 souTbQOAnp+EvUoJ1D3c2qATgqcnHAhzuHKp3Q27/kJispyMC6M6pmunZ/ysxAjZzJ7V /xEnSKgKZ4DKWdBCjyYpWFIo5WtzvY1U/AbTSbhh3wkwLtdaNusYG7PnVTNWMGBPVU88 vZ2utNET7UIEGEhSjuTrVecOCYMcG54s+ria4Y8oFMrPLnSQymme3qDnVxvUPkHxc/zi NcerGCfTigKRTvn9aQeqfmLmx7wvL4G19+dbTg2vPZxv5lM4ipq6D0BdMtHmCPTbFEZ0 BuCQ== X-Gm-Message-State: ALyK8tJ+bFsPEbP8uwJmt0421u5cRZdE/g/nvaDX9E023S2ce/4NktNiUhkbxjgf2+6on+13M9CfkCgJ9SN4Kw== X-Received: by 10.36.73.32 with SMTP id z32mr5144440ita.68.1468007749089; Fri, 08 Jul 2016 12:55:49 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.6.213 with HTTP; Fri, 8 Jul 2016 12:55:29 -0700 (PDT) In-Reply-To: <201607081557.u68Fvtss049317@repo.freebsd.org> References: <201607081557.u68Fvtss049317@repo.freebsd.org> From: Ed Maste Date: Fri, 8 Jul 2016 15:55:29 -0400 X-Google-Sender-Auth: AOe-qcOe8t3cFLN2rTwyvnO4clw Message-ID: Subject: Re: svn commit: r302437 - svnadmin/conf To: Glen Barber Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-svnadmin@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 19:55:53 -0000 On 8 July 2016 at 11:57, Glen Barber wrote: > Author: gjb > Date: Fri Jul 8 15:57:55 2016 > New Revision: 302437 > URL: https://svnweb.freebsd.org/changeset/base/302437 > > Log: > Thaw head (12.0-CURRENT) now that stable/11 has branched. > > Committers are requested to excercise caution for the duration > of the 11.0-RELEASE cycle, especially regarding changes that > are eligible (or proposed) for MFC to stable/11. Specifically, I know several folks that have work in progress that they intend to commit to HEAD and request MFC before 11.0. It is vitally important that everyone take extra care to avoid breaking head. We have a "make tinderbox" target to check across architectures. All committers have access to a fast build machines (e.g. universe11a.freebsd.org) on which this can be run. Please make use of them. From owner-svn-src-all@freebsd.org Fri Jul 8 20:09:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49810B84461; Fri, 8 Jul 2016 20:09:23 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1646014CA; Fri, 8 Jul 2016 20:09:23 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68K9Mqe042772; Fri, 8 Jul 2016 20:09:22 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68K9M3G042770; Fri, 8 Jul 2016 20:09:22 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607082009.u68K9M3G042770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 8 Jul 2016 20:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302448 - in head/sys: amd64/cloudabi64 arm64/cloudabi64 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:09:23 -0000 Author: ed Date: Fri Jul 8 20:09:21 2016 New Revision: 302448 URL: https://svnweb.freebsd.org/changeset/base/302448 Log: Don't forget to set sa->narg for CloudABI system calls. It turns out that this value is not used within the system call code under normal conditions, except when using tracing tools like ktrace. If we forget to set this value, it is set to random garbage. This may cause ktrace to hang indefinitely, making it impossible to kill. Reported by: Michael Plass PR: 210800 MFC before: 11.0-RELEASE Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Fri Jul 8 19:19:30 2016 (r302447) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Fri Jul 8 20:09:21 2016 (r302448) @@ -96,6 +96,7 @@ cloudabi64_fetch_syscall_args(struct thr if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) return (ENOSYS); sa->callp = &cloudabi64_sysent[sa->code]; + sa->narg = sa->callp->sy_narg; /* Fetch system call arguments. */ sa->args[0] = frame->tf_rdi; Modified: head/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Fri Jul 8 19:19:30 2016 (r302447) +++ head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Fri Jul 8 20:09:21 2016 (r302448) @@ -77,6 +77,7 @@ cloudabi64_fetch_syscall_args(struct thr if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) return (ENOSYS); sa->callp = &cloudabi64_sysent[sa->code]; + sa->narg = sa->callp->sy_narg; /* Fetch system call arguments. */ for (i = 0; i < MAXARGS; i++) From owner-svn-src-all@freebsd.org Fri Jul 8 20:16:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4126DB846CF; Fri, 8 Jul 2016 20:16:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DFA619E3; Fri, 8 Jul 2016 20:15:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68KFxk2046284; Fri, 8 Jul 2016 20:15:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KFxiP046283; Fri, 8 Jul 2016 20:15:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607082015.u68KFxiP046283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 8 Jul 2016 20:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302449 - head 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:16:00 -0000 Author: bdrewery Date: Fri Jul 8 20:15:58 2016 New Revision: 302449 URL: https://svnweb.freebsd.org/changeset/base/302449 Log: Use TARGET here to fix check/delete-old after r302391. usr.bin/Makefie.arm is used to install ofwdump so TARGET=arm should cover all of the cases. MFC after: now Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jul 8 20:09:21 2016 (r302448) +++ head/ObsoleteFiles.inc Fri Jul 8 20:15:58 2016 (r302449) @@ -8014,7 +8014,7 @@ OLD_FILES+=usr/share/man/man5/usbd.conf. .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif -.if ${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && \ +.if ${TARGET_ARCH} != "aarch64" && ${TARGET} != "arm" && \ ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz From owner-svn-src-all@freebsd.org Fri Jul 8 20:20:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D349B84810; Fri, 8 Jul 2016 20:20:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1021D2D; Fri, 8 Jul 2016 20:20:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68KKltc047159; Fri, 8 Jul 2016 20:20:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KKkYf047151; Fri, 8 Jul 2016 20:20:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607082020.u68KKkYf047151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 8 Jul 2016 20:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302450 - in head/contrib/llvm/projects/libunwind: include 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:20:48 -0000 Author: emaste Date: Fri Jul 8 20:20:46 2016 New Revision: 302450 URL: https://svnweb.freebsd.org/changeset/base/302450 Log: libunwind: update to upstream snapshot r272680 The key improvement is that it may be built without cross-unwinding support, which significantly reduces the stack space requirement. MFC after: 1 week Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7123 Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h head/contrib/llvm/projects/libunwind/include/libunwind.h head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp head/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp head/contrib/llvm/projects/libunwind/src/Registers.hpp head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp head/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp head/contrib/llvm/projects/libunwind/src/UnwindLevel1.c head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S head/contrib/llvm/projects/libunwind/src/config.h head/contrib/llvm/projects/libunwind/src/libunwind.cpp Directory Properties: head/contrib/llvm/projects/libunwind/ (props changed) Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 8 20:15:58 2016 (r302449) +++ head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 8 20:20:46 2016 (r302450) @@ -17,4 +17,47 @@ #define _LIBUNWIND_ARM_EHABI 0 #endif +#if defined(_LIBUNWIND_IS_NATIVE_ONLY) +# if defined(__i386__) +# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_CONTEXT_SIZE 8 +# define _LIBUNWIND_CURSOR_SIZE 19 +# elif defined(__x86_64__) +# define _LIBUNWIND_TARGET_X86_64 1 +# define _LIBUNWIND_CONTEXT_SIZE 21 +# define _LIBUNWIND_CURSOR_SIZE 33 +# elif defined(__ppc__) +# define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_CONTEXT_SIZE 117 +# define _LIBUNWIND_CURSOR_SIZE 128 +# elif defined(__aarch64__) +# define _LIBUNWIND_TARGET_AARCH64 1 +# define _LIBUNWIND_CONTEXT_SIZE 66 +# define _LIBUNWIND_CURSOR_SIZE 78 +# elif defined(__arm__) +# define _LIBUNWIND_TARGET_ARM 1 +# define _LIBUNWIND_CONTEXT_SIZE 60 +# define _LIBUNWIND_CURSOR_SIZE 67 +# elif defined(__or1k__) +# define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_CONTEXT_SIZE 16 +# define _LIBUNWIND_CURSOR_SIZE 28 +# elif defined(__riscv__) +# define _LIBUNWIND_TARGET_RISCV 1 +# define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ +# define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# else +# error "Unsupported architecture." +# endif +#else // !_LIBUNWIND_IS_NATIVE_ONLY +# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_TARGET_X86_64 1 +# define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_TARGET_AARCH64 1 +# define _LIBUNWIND_TARGET_ARM 1 +# define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_CONTEXT_SIZE 128 +# define _LIBUNWIND_CURSOR_SIZE 140 +#endif // _LIBUNWIND_IS_NATIVE_ONLY + #endif // ____LIBUNWIND_CONFIG_H__ Modified: head/contrib/llvm/projects/libunwind/include/libunwind.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/libunwind.h Fri Jul 8 20:15:58 2016 (r302449) +++ head/contrib/llvm/projects/libunwind/include/libunwind.h Fri Jul 8 20:20:46 2016 (r302450) @@ -46,12 +46,12 @@ enum { }; struct unw_context_t { - uint64_t data[128]; + uint64_t data[_LIBUNWIND_CONTEXT_SIZE]; }; typedef struct unw_context_t unw_context_t; struct unw_cursor_t { - uint64_t data[140]; + uint64_t data[_LIBUNWIND_CURSOR_SIZE]; }; typedef struct unw_cursor_t unw_cursor_t; @@ -295,77 +295,6 @@ enum { UNW_PPC_SPEFSCR = 112 }; -// 64-bit RISC-V registers -enum { - UNW_RISCV_X0 = 0, - UNW_RISCV_X1 = 1, - UNW_RISCV_RA = 1, - UNW_RISCV_X2 = 2, - UNW_RISCV_SP = 2, - UNW_RISCV_X3 = 3, - UNW_RISCV_X4 = 4, - UNW_RISCV_X5 = 5, - UNW_RISCV_X6 = 6, - UNW_RISCV_X7 = 7, - UNW_RISCV_X8 = 8, - UNW_RISCV_X9 = 9, - UNW_RISCV_X10 = 10, - UNW_RISCV_X11 = 11, - UNW_RISCV_X12 = 12, - UNW_RISCV_X13 = 13, - UNW_RISCV_X14 = 14, - UNW_RISCV_X15 = 15, - UNW_RISCV_X16 = 16, - UNW_RISCV_X17 = 17, - UNW_RISCV_X18 = 18, - UNW_RISCV_X19 = 19, - UNW_RISCV_X20 = 20, - UNW_RISCV_X21 = 21, - UNW_RISCV_X22 = 22, - UNW_RISCV_X23 = 23, - UNW_RISCV_X24 = 24, - UNW_RISCV_X25 = 25, - UNW_RISCV_X26 = 26, - UNW_RISCV_X27 = 27, - UNW_RISCV_X28 = 28, - UNW_RISCV_X29 = 29, - UNW_RISCV_X30 = 30, - UNW_RISCV_X31 = 31, - // reserved block - UNW_RISCV_D0 = 64, - UNW_RISCV_D1 = 65, - UNW_RISCV_D2 = 66, - UNW_RISCV_D3 = 67, - UNW_RISCV_D4 = 68, - UNW_RISCV_D5 = 69, - UNW_RISCV_D6 = 70, - UNW_RISCV_D7 = 71, - UNW_RISCV_D8 = 72, - UNW_RISCV_D9 = 73, - UNW_RISCV_D10 = 74, - UNW_RISCV_D11 = 75, - UNW_RISCV_D12 = 76, - UNW_RISCV_D13 = 77, - UNW_RISCV_D14 = 78, - UNW_RISCV_D15 = 79, - UNW_RISCV_D16 = 80, - UNW_RISCV_D17 = 81, - UNW_RISCV_D18 = 82, - UNW_RISCV_D19 = 83, - UNW_RISCV_D20 = 84, - UNW_RISCV_D21 = 85, - UNW_RISCV_D22 = 86, - UNW_RISCV_D23 = 87, - UNW_RISCV_D24 = 88, - UNW_RISCV_D25 = 89, - UNW_RISCV_D26 = 90, - UNW_RISCV_D27 = 91, - UNW_RISCV_D28 = 92, - UNW_RISCV_D29 = 93, - UNW_RISCV_D30 = 94, - UNW_RISCV_D31 = 95, -}; - // 64-bit ARM64 registers enum { UNW_ARM64_X0 = 0, @@ -604,4 +533,75 @@ enum { UNW_OR1K_R31 = 31, }; +// 64-bit RISC-V registers +enum { + UNW_RISCV_X0 = 0, + UNW_RISCV_X1 = 1, + UNW_RISCV_RA = 1, + UNW_RISCV_X2 = 2, + UNW_RISCV_SP = 2, + UNW_RISCV_X3 = 3, + UNW_RISCV_X4 = 4, + UNW_RISCV_X5 = 5, + UNW_RISCV_X6 = 6, + UNW_RISCV_X7 = 7, + UNW_RISCV_X8 = 8, + UNW_RISCV_X9 = 9, + UNW_RISCV_X10 = 10, + UNW_RISCV_X11 = 11, + UNW_RISCV_X12 = 12, + UNW_RISCV_X13 = 13, + UNW_RISCV_X14 = 14, + UNW_RISCV_X15 = 15, + UNW_RISCV_X16 = 16, + UNW_RISCV_X17 = 17, + UNW_RISCV_X18 = 18, + UNW_RISCV_X19 = 19, + UNW_RISCV_X20 = 20, + UNW_RISCV_X21 = 21, + UNW_RISCV_X22 = 22, + UNW_RISCV_X23 = 23, + UNW_RISCV_X24 = 24, + UNW_RISCV_X25 = 25, + UNW_RISCV_X26 = 26, + UNW_RISCV_X27 = 27, + UNW_RISCV_X28 = 28, + UNW_RISCV_X29 = 29, + UNW_RISCV_X30 = 30, + UNW_RISCV_X31 = 31, + // reserved block + UNW_RISCV_D0 = 64, + UNW_RISCV_D1 = 65, + UNW_RISCV_D2 = 66, + UNW_RISCV_D3 = 67, + UNW_RISCV_D4 = 68, + UNW_RISCV_D5 = 69, + UNW_RISCV_D6 = 70, + UNW_RISCV_D7 = 71, + UNW_RISCV_D8 = 72, + UNW_RISCV_D9 = 73, + UNW_RISCV_D10 = 74, + UNW_RISCV_D11 = 75, + UNW_RISCV_D12 = 76, + UNW_RISCV_D13 = 77, + UNW_RISCV_D14 = 78, + UNW_RISCV_D15 = 79, + UNW_RISCV_D16 = 80, + UNW_RISCV_D17 = 81, + UNW_RISCV_D18 = 82, + UNW_RISCV_D19 = 83, + UNW_RISCV_D20 = 84, + UNW_RISCV_D21 = 85, + UNW_RISCV_D22 = 86, + UNW_RISCV_D23 = 87, + UNW_RISCV_D24 = 88, + UNW_RISCV_D25 = 89, + UNW_RISCV_D26 = 90, + UNW_RISCV_D27 = 91, + UNW_RISCV_D28 = 92, + UNW_RISCV_D29 = 93, + UNW_RISCV_D30 = 94, + UNW_RISCV_D31 = 95, +}; + #endif Modified: head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Fri Jul 8 20:15:58 2016 (r302449) +++ head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Fri Jul 8 20:20:46 2016 (r302450) @@ -35,7 +35,7 @@ namespace libunwind { #include "Registers.hpp" #if _LIBUNWIND_ARM_EHABI -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) #include typedef void *_Unwind_Ptr; @@ -62,7 +62,8 @@ extern EHTEntry __exidx_end; #endif // !defined(_LIBUNWIND_IS_BAREMETAL) #endif // _LIBUNWIND_ARM_EHABI -#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__linux__) +#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__linux__) || \ + defined(__NetBSD__) #if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX #include // Macro for machine-independent access to the ELF program headers. This Modified: head/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp Fri Jul 8 20:15:58 2016 (r302449) +++ head/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp Fri Jul 8 20:20:46 2016 (r302450) @@ -27,6 +27,7 @@ namespace libunwind { +#if defined(_LIBUNWIND_TARGET_I386) /// CompactUnwinder_x86 uses a compact unwind info to virtually "step" (aka /// unwind) by modifying a Registers_x86 register set template @@ -255,8 +256,10 @@ void CompactUnwinder_x86
::framelessUn // old esp is before return address registers.setSP((uint32_t)returnAddressLocation + 4); } +#endif // _LIBUNWIND_TARGET_I386 +#if defined(_LIBUNWIND_TARGET_X86_64) /// CompactUnwinder_x86_64 uses a compact unwind info to virtually "step" (aka /// unwind) by modifying a Registers_x86_64 register set template @@ -484,9 +487,11 @@ void CompactUnwinder_x86_64::frameles // old esp is before return address registers.setSP(returnAddressLocation + 8); } +#endif // _LIBUNWIND_TARGET_X86_64 +#if defined(_LIBUNWIND_TARGET_AARCH64) /// CompactUnwinder_arm64 uses a compact unwind info to virtually "step" (aka /// unwind) by modifying a Registers_arm64 register set template @@ -686,6 +691,7 @@ int CompactUnwinder_arm64::stepWithCo return UNW_STEP_SUCCESS; } +#endif // _LIBUNWIND_TARGET_AARCH64 } // namespace libunwind Modified: head/contrib/llvm/projects/libunwind/src/Registers.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/Registers.hpp Fri Jul 8 20:15:58 2016 (r302449) +++ head/contrib/llvm/projects/libunwind/src/Registers.hpp Fri Jul 8 20:20:46 2016 (r302450) @@ -25,6 +25,7 @@ namespace libunwind { struct v128 { uint32_t vec[4]; }; +#if defined(_LIBUNWIND_TARGET_I386) /// Registers_x86 holds the register state of a thread in a 32-bit intel /// process. class _LIBUNWIND_HIDDEN Registers_x86 { @@ -86,8 +87,8 @@ private: }; inline Registers_x86::Registers_x86(const void *registers) { - static_assert(sizeof(Registers_x86) < sizeof(unw_context_t), - "x86 registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "x86 registers do not fit into unw_context_t"); memcpy(&_registers, registers, sizeof(_registers)); } @@ -211,8 +212,10 @@ inline v128 Registers_x86::getVectorRegi inline void Registers_x86::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("no x86 vector registers"); } +#endif // _LIBUNWIND_TARGET_I386 +#if defined(_LIBUNWIND_TARGET_X86_64) /// Registers_x86_64 holds the register state of a thread in a 64-bit intel /// process. class _LIBUNWIND_HIDDEN Registers_x86_64 { @@ -278,8 +281,8 @@ private: }; inline Registers_x86_64::Registers_x86_64(const void *registers) { - static_assert(sizeof(Registers_x86_64) < sizeof(unw_context_t), - "x86_64 registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "x86_64 registers do not fit into unw_context_t"); memcpy(&_registers, registers, sizeof(_registers)); } @@ -459,8 +462,10 @@ inline v128 Registers_x86_64::getVectorR inline void Registers_x86_64::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("no x86_64 vector registers"); } +#endif // _LIBUNWIND_TARGET_X86_64 +#if defined(_LIBUNWIND_TARGET_PPC) /// Registers_ppc holds the register state of a thread in a 32-bit PowerPC /// process. class _LIBUNWIND_HIDDEN Registers_ppc { @@ -543,8 +548,8 @@ private: }; inline Registers_ppc::Registers_ppc(const void *registers) { - static_assert(sizeof(Registers_ppc) < sizeof(unw_context_t), - "ppc registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "ppc registers do not fit into unw_context_t"); memcpy(&_registers, static_cast(registers), sizeof(_registers)); static_assert(sizeof(ppc_thread_state_t) == 160, @@ -1023,266 +1028,10 @@ inline const char *Registers_ppc::getReg } } - -/// Registers_riscv holds the register state of a thread in a 64-bit RISC-V -/// process. -class _LIBUNWIND_HIDDEN Registers_riscv { -public: - Registers_riscv(); - Registers_riscv(const void *registers); - - bool validRegister(int num) const; - uint64_t getRegister(int num) const; - void setRegister(int num, uint64_t value); - bool validFloatRegister(int num) const; - double getFloatRegister(int num) const; - void setFloatRegister(int num, double value); - bool validVectorRegister(int num) const; - v128 getVectorRegister(int num) const; - void setVectorRegister(int num, v128 value); - const char *getRegisterName(int num); - void jumpto(); - static int lastDwarfRegNum() { return 95; } - - uint64_t getSP() const { return _registers.__x[2]; } - void setSP(uint64_t value) { _registers.__x[2] = value; } - uint64_t getIP() const { return _registers.__x[1]; } - void setIP(uint64_t value) { _registers.__x[1] = value; } - -private: - struct GPRs { - uint64_t __x[32]; // x0-x31 - }; - - GPRs _registers; - double _vectorHalfRegisters[32]; - // Currently only the lower double in 128-bit vectore registers - // is perserved during unwinding. We could define new register - // numbers (> 96) which mean whole vector registers, then this - // struct would need to change to contain whole vector registers. -}; - -inline Registers_riscv::Registers_riscv(const void *registers) { - static_assert(sizeof(Registers_riscv) < sizeof(unw_context_t), - "riscv registers do not fit into unw_context_t"); - memcpy(&_registers, registers, sizeof(_registers)); - static_assert(sizeof(GPRs) == 0x100, - "expected VFP registers to be at offset 256"); - memcpy(_vectorHalfRegisters, - static_cast(registers) + sizeof(GPRs), - sizeof(_vectorHalfRegisters)); -} - -inline Registers_riscv::Registers_riscv() { - memset(&_registers, 0, sizeof(_registers)); - memset(&_vectorHalfRegisters, 0, sizeof(_vectorHalfRegisters)); -} - -inline bool Registers_riscv::validRegister(int regNum) const { - if (regNum == UNW_REG_IP) - return true; - if (regNum == UNW_REG_SP) - return true; - if (regNum < 0) - return false; - if (regNum > 95) - return false; - if ((regNum > 31) && (regNum < 64)) - return false; - return true; -} - -inline uint64_t Registers_riscv::getRegister(int regNum) const { - if (regNum == UNW_REG_IP) - return _registers.__x[1]; - if (regNum == UNW_REG_SP) - return _registers.__x[2]; - if ((regNum >= 0) && (regNum < 32)) - return _registers.__x[regNum]; - _LIBUNWIND_ABORT("unsupported riscv register"); -} - -inline void Registers_riscv::setRegister(int regNum, uint64_t value) { - if (regNum == UNW_REG_IP) - _registers.__x[1] = value; - else if (regNum == UNW_REG_SP) - _registers.__x[2] = value; - else if ((regNum >= 0) && (regNum < 32)) - _registers.__x[regNum] = value; - else - _LIBUNWIND_ABORT("unsupported riscv register"); -} - -inline const char *Registers_riscv::getRegisterName(int regNum) { - switch (regNum) { - case UNW_REG_IP: - return "ra"; - case UNW_REG_SP: - return "sp"; - case UNW_RISCV_X0: - return "x0"; - case UNW_RISCV_X1: - return "ra"; - case UNW_RISCV_X2: - return "sp"; - case UNW_RISCV_X3: - return "x3"; - case UNW_RISCV_X4: - return "x4"; - case UNW_RISCV_X5: - return "x5"; - case UNW_RISCV_X6: - return "x6"; - case UNW_RISCV_X7: - return "x7"; - case UNW_RISCV_X8: - return "x8"; - case UNW_RISCV_X9: - return "x9"; - case UNW_RISCV_X10: - return "x10"; - case UNW_RISCV_X11: - return "x11"; - case UNW_RISCV_X12: - return "x12"; - case UNW_RISCV_X13: - return "x13"; - case UNW_RISCV_X14: - return "x14"; - case UNW_RISCV_X15: - return "x15"; - case UNW_RISCV_X16: - return "x16"; - case UNW_RISCV_X17: - return "x17"; - case UNW_RISCV_X18: - return "x18"; - case UNW_RISCV_X19: - return "x19"; - case UNW_RISCV_X20: - return "x20"; - case UNW_RISCV_X21: - return "x21"; - case UNW_RISCV_X22: - return "x22"; - case UNW_RISCV_X23: - return "x23"; - case UNW_RISCV_X24: - return "x24"; - case UNW_RISCV_X25: - return "x25"; - case UNW_RISCV_X26: - return "x26"; - case UNW_RISCV_X27: - return "x27"; - case UNW_RISCV_X28: - return "x28"; - case UNW_RISCV_X29: - return "x29"; - case UNW_RISCV_X30: - return "x30"; - case UNW_RISCV_X31: - return "x31"; - case UNW_RISCV_D0: - return "d0"; - case UNW_RISCV_D1: - return "d1"; - case UNW_RISCV_D2: - return "d2"; - case UNW_RISCV_D3: - return "d3"; - case UNW_RISCV_D4: - return "d4"; - case UNW_RISCV_D5: - return "d5"; - case UNW_RISCV_D6: - return "d6"; - case UNW_RISCV_D7: - return "d7"; - case UNW_RISCV_D8: - return "d8"; - case UNW_RISCV_D9: - return "d9"; - case UNW_RISCV_D10: - return "d10"; - case UNW_RISCV_D11: - return "d11"; - case UNW_RISCV_D12: - return "d12"; - case UNW_RISCV_D13: - return "d13"; - case UNW_RISCV_D14: - return "d14"; - case UNW_RISCV_D15: - return "d15"; - case UNW_RISCV_D16: - return "d16"; - case UNW_RISCV_D17: - return "d17"; - case UNW_RISCV_D18: - return "d18"; - case UNW_RISCV_D19: - return "d19"; - case UNW_RISCV_D20: - return "d20"; - case UNW_RISCV_D21: - return "d21"; - case UNW_RISCV_D22: - return "d22"; - case UNW_RISCV_D23: - return "d23"; - case UNW_RISCV_D24: - return "d24"; - case UNW_RISCV_D25: - return "d25"; - case UNW_RISCV_D26: - return "d26"; - case UNW_RISCV_D27: - return "d27"; - case UNW_RISCV_D28: - return "d28"; - case UNW_RISCV_D29: - return "d29"; - case UNW_RISCV_D30: - return "d30"; - case UNW_RISCV_D31: - return "d31"; - default: - return "unknown register"; - } -} - -inline bool Registers_riscv::validFloatRegister(int regNum) const { - if (regNum < UNW_RISCV_D0) - return false; - if (regNum > UNW_RISCV_D31) - return false; - return true; -} - -inline double Registers_riscv::getFloatRegister(int regNum) const { - assert(validFloatRegister(regNum)); - return _vectorHalfRegisters[regNum - UNW_RISCV_D0]; -} - -inline void Registers_riscv::setFloatRegister(int regNum, double value) { - assert(validFloatRegister(regNum)); - _vectorHalfRegisters[regNum - UNW_RISCV_D0] = value; -} - -inline bool Registers_riscv::validVectorRegister(int) const { - return false; -} - -inline v128 Registers_riscv::getVectorRegister(int) const { - _LIBUNWIND_ABORT("no riscv vector register support yet"); -} - -inline void Registers_riscv::setVectorRegister(int, v128) { - _LIBUNWIND_ABORT("no riscv vector register support yet"); -} +#endif // _LIBUNWIND_TARGET_PPC +#if defined(_LIBUNWIND_TARGET_AARCH64) /// Registers_arm64 holds the register state of a thread in a 64-bit arm /// process. class _LIBUNWIND_HIDDEN Registers_arm64 { @@ -1329,8 +1078,8 @@ private: }; inline Registers_arm64::Registers_arm64(const void *registers) { - static_assert(sizeof(Registers_arm64) < sizeof(unw_context_t), - "arm64 registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "arm64 registers do not fit into unw_context_t"); memcpy(&_registers, registers, sizeof(_registers)); static_assert(sizeof(GPRs) == 0x110, "expected VFP registers to be at offset 272"); @@ -1547,7 +1296,9 @@ inline v128 Registers_arm64::getVectorRe inline void Registers_arm64::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("no arm64 vector register support yet"); } +#endif // _LIBUNWIND_TARGET_AARCH64 +#if defined(_LIBUNWIND_TARGET_ARM) /// Registers_arm holds the register state of a thread in a 32-bit arm /// process. /// @@ -1653,8 +1404,8 @@ inline Registers_arm::Registers_arm(cons _saved_vfp_d16_d31(false), _saved_iwmmx(false), _saved_iwmmx_control(false) { - static_assert(sizeof(Registers_arm) < sizeof(unw_context_t), - "arm registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "arm registers do not fit into unw_context_t"); // See unw_getcontext() note about data. memcpy(&_registers, registers, sizeof(_registers)); memset(&_vfp_d0_d15_pad, 0, sizeof(_vfp_d0_d15_pad)); @@ -1969,6 +1720,10 @@ inline v128 Registers_arm::getVectorRegi inline void Registers_arm::setVectorRegister(int, v128) { _LIBUNWIND_ABORT("ARM vector support not implemented"); } +#endif // _LIBUNWIND_TARGET_ARM + + +#if defined(_LIBUNWIND_TARGET_OR1K) /// Registers_or1k holds the register state of a thread in an OpenRISC1000 /// process. class _LIBUNWIND_HIDDEN Registers_or1k { @@ -2003,8 +1758,8 @@ private: }; inline Registers_or1k::Registers_or1k(const void *registers) { - static_assert(sizeof(Registers_or1k) < sizeof(unw_context_t), - "or1k registers do not fit into unw_context_t"); + static_assert((check_fit::does_fit), + "or1k registers do not fit into unw_context_t"); memcpy(&_registers, static_cast(registers), sizeof(_registers)); } @@ -2151,6 +1906,268 @@ inline const char *Registers_or1k::getRe } } +#endif // _LIBUNWIND_TARGET_OR1K + + +#if defined(_LIBUNWIND_TARGET_RISCV) +/// Registers_riscv holds the register state of a thread in a 64-bit RISC-V +/// process. +class _LIBUNWIND_HIDDEN Registers_riscv { +public: + Registers_riscv(); + Registers_riscv(const void *registers); + + bool validRegister(int num) const; + uint64_t getRegister(int num) const; + void setRegister(int num, uint64_t value); + bool validFloatRegister(int num) const; + double getFloatRegister(int num) const; + void setFloatRegister(int num, double value); + bool validVectorRegister(int num) const; + v128 getVectorRegister(int num) const; + void setVectorRegister(int num, v128 value); + const char *getRegisterName(int num); + void jumpto(); + static int lastDwarfRegNum() { return 95; } + + uint64_t getSP() const { return _registers.__x[2]; } + void setSP(uint64_t value) { _registers.__x[2] = value; } + uint64_t getIP() const { return _registers.__x[1]; } + void setIP(uint64_t value) { _registers.__x[1] = value; } + +private: + struct GPRs { + uint64_t __x[32]; // x0-x31 + }; + + GPRs _registers; + double _vectorHalfRegisters[32]; + // Currently only the lower double in 128-bit vectore registers + // is perserved during unwinding. We could define new register + // numbers (> 96) which mean whole vector registers, then this + // struct would need to change to contain whole vector registers. +}; + +inline Registers_riscv::Registers_riscv(const void *registers) { + static_assert((check_fit::does_fit), + "riscv registers do not fit into unw_context_t"); + memcpy(&_registers, registers, sizeof(_registers)); + static_assert(sizeof(GPRs) == 0x100, + "expected VFP registers to be at offset 256"); + memcpy(_vectorHalfRegisters, + static_cast(registers) + sizeof(GPRs), + sizeof(_vectorHalfRegisters)); +} + +inline Registers_riscv::Registers_riscv() { + memset(&_registers, 0, sizeof(_registers)); + memset(&_vectorHalfRegisters, 0, sizeof(_vectorHalfRegisters)); +} + +inline bool Registers_riscv::validRegister(int regNum) const { + if (regNum == UNW_REG_IP) + return true; + if (regNum == UNW_REG_SP) + return true; + if (regNum < 0) + return false; + if (regNum > 95) + return false; + if ((regNum > 31) && (regNum < 64)) + return false; + return true; +} + +inline uint64_t Registers_riscv::getRegister(int regNum) const { + if (regNum == UNW_REG_IP) + return _registers.__x[1]; + if (regNum == UNW_REG_SP) + return _registers.__x[2]; + if ((regNum >= 0) && (regNum < 32)) + return _registers.__x[regNum]; + _LIBUNWIND_ABORT("unsupported riscv register"); +} + +inline void Registers_riscv::setRegister(int regNum, uint64_t value) { + if (regNum == UNW_REG_IP) + _registers.__x[1] = value; + else if (regNum == UNW_REG_SP) + _registers.__x[2] = value; + else if ((regNum >= 0) && (regNum < 32)) + _registers.__x[regNum] = value; + else + _LIBUNWIND_ABORT("unsupported riscv register"); +} + +inline const char *Registers_riscv::getRegisterName(int regNum) { + switch (regNum) { + case UNW_REG_IP: + return "ra"; + case UNW_REG_SP: + return "sp"; + case UNW_RISCV_X0: + return "x0"; + case UNW_RISCV_X1: + return "ra"; + case UNW_RISCV_X2: + return "sp"; + case UNW_RISCV_X3: + return "x3"; + case UNW_RISCV_X4: + return "x4"; + case UNW_RISCV_X5: + return "x5"; + case UNW_RISCV_X6: + return "x6"; + case UNW_RISCV_X7: + return "x7"; + case UNW_RISCV_X8: + return "x8"; + case UNW_RISCV_X9: + return "x9"; + case UNW_RISCV_X10: + return "x10"; + case UNW_RISCV_X11: + return "x11"; + case UNW_RISCV_X12: + return "x12"; + case UNW_RISCV_X13: + return "x13"; + case UNW_RISCV_X14: + return "x14"; + case UNW_RISCV_X15: + return "x15"; + case UNW_RISCV_X16: + return "x16"; + case UNW_RISCV_X17: + return "x17"; + case UNW_RISCV_X18: + return "x18"; + case UNW_RISCV_X19: + return "x19"; + case UNW_RISCV_X20: + return "x20"; + case UNW_RISCV_X21: + return "x21"; + case UNW_RISCV_X22: + return "x22"; + case UNW_RISCV_X23: + return "x23"; + case UNW_RISCV_X24: + return "x24"; + case UNW_RISCV_X25: + return "x25"; + case UNW_RISCV_X26: + return "x26"; + case UNW_RISCV_X27: + return "x27"; + case UNW_RISCV_X28: + return "x28"; + case UNW_RISCV_X29: + return "x29"; + case UNW_RISCV_X30: + return "x30"; + case UNW_RISCV_X31: + return "x31"; + case UNW_RISCV_D0: + return "d0"; + case UNW_RISCV_D1: + return "d1"; + case UNW_RISCV_D2: + return "d2"; + case UNW_RISCV_D3: + return "d3"; + case UNW_RISCV_D4: + return "d4"; + case UNW_RISCV_D5: + return "d5"; + case UNW_RISCV_D6: + return "d6"; + case UNW_RISCV_D7: + return "d7"; + case UNW_RISCV_D8: + return "d8"; + case UNW_RISCV_D9: + return "d9"; + case UNW_RISCV_D10: + return "d10"; + case UNW_RISCV_D11: + return "d11"; + case UNW_RISCV_D12: + return "d12"; + case UNW_RISCV_D13: + return "d13"; + case UNW_RISCV_D14: + return "d14"; + case UNW_RISCV_D15: + return "d15"; + case UNW_RISCV_D16: + return "d16"; + case UNW_RISCV_D17: + return "d17"; + case UNW_RISCV_D18: + return "d18"; + case UNW_RISCV_D19: + return "d19"; + case UNW_RISCV_D20: + return "d20"; + case UNW_RISCV_D21: + return "d21"; + case UNW_RISCV_D22: + return "d22"; + case UNW_RISCV_D23: + return "d23"; + case UNW_RISCV_D24: + return "d24"; + case UNW_RISCV_D25: + return "d25"; + case UNW_RISCV_D26: + return "d26"; + case UNW_RISCV_D27: + return "d27"; + case UNW_RISCV_D28: + return "d28"; + case UNW_RISCV_D29: + return "d29"; + case UNW_RISCV_D30: + return "d30"; + case UNW_RISCV_D31: + return "d31"; + default: + return "unknown register"; + } +} + +inline bool Registers_riscv::validFloatRegister(int regNum) const { + if (regNum < UNW_RISCV_D0) + return false; + if (regNum > UNW_RISCV_D31) + return false; + return true; +} + +inline double Registers_riscv::getFloatRegister(int regNum) const { + assert(validFloatRegister(regNum)); + return _vectorHalfRegisters[regNum - UNW_RISCV_D0]; +} + +inline void Registers_riscv::setFloatRegister(int regNum, double value) { + assert(validFloatRegister(regNum)); + _vectorHalfRegisters[regNum - UNW_RISCV_D0] = value; +} + +inline bool Registers_riscv::validVectorRegister(int) const { + return false; +} + +inline v128 Registers_riscv::getVectorRegister(int) const { + _LIBUNWIND_ABORT("no riscv vector register support yet"); +} + +inline void Registers_riscv::setVectorRegister(int, v128) { + _LIBUNWIND_ABORT("no riscv vector register support yet"); +} +#endif // _LIBUNWIND_TARGET_RISCV } // namespace libunwind #endif // __REGISTERS_HPP__ Modified: head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Fri Jul 8 20:15:58 2016 (r302449) +++ head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Fri Jul 8 20:20:46 2016 (r302450) @@ -438,39 +438,21 @@ extern "C" _Unwind_Reason_Code __aeabi_u } static _Unwind_Reason_Code -unwind_phase1(unw_context_t *uc, _Unwind_Exception *exception_object) { +unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { // EHABI #7.3 discusses preserving the VRS in a "temporary VRS" during // phase 1 and then restoring it to the "primary VRS" for phase 2. The // effect is phase 2 doesn't see any of the VRS manipulations from phase 1. // In this implementation, the phases don't share the VRS backing store. // Instead, they are passed the original |uc| and they create a new VRS // from scratch thus achieving the same effect. - unw_cursor_t cursor1; - unw_init_local(&cursor1, uc); + unw_init_local(cursor, uc); // Walk each frame looking for a place to stop. for (bool handlerNotFound = true; handlerNotFound;) { -#if !_LIBUNWIND_ARM_EHABI - // Ask libuwind to get next frame (skip over first which is - // _Unwind_RaiseException). - int stepResult = unw_step(&cursor1); - if (stepResult == 0) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", - static_cast(exception_object)); - return _URC_END_OF_STACK; - } else if (stepResult < 0) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step failed => " - "_URC_FATAL_PHASE1_ERROR\n", - static_cast(exception_object)); - return _URC_FATAL_PHASE1_ERROR; - } -#endif - // See if frame has code to run (has personality routine). unw_proc_info_t frameInfo; - if (unw_get_proc_info(&cursor1, &frameInfo) != UNW_ESUCCESS) { + if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_get_proc_info " "failed => _URC_FATAL_PHASE1_ERROR\n", static_cast(exception_object)); @@ -482,12 +464,12 @@ unwind_phase1(unw_context_t *uc, _Unwind char functionBuf[512]; const char *functionName = functionBuf; unw_word_t offset; - if ((unw_get_proc_name(&cursor1, functionBuf, sizeof(functionBuf), + if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), &offset) != UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip)) functionName = ".anonymous."; unw_word_t pc; - unw_get_reg(&cursor1, UNW_REG_IP, &pc); + unw_get_reg(cursor, UNW_REG_IP, &pc); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): pc=0x%llX, start_ip=0x%llX, func=%s, " "lsda=0x%llX, personality=0x%llX\n", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jul 8 20:30:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF4D1B84D6C; Fri, 8 Jul 2016 20:30:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2AB1377; Fri, 8 Jul 2016 20:30:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68KUKRw050286; Fri, 8 Jul 2016 20:30:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KUKV7050285; Fri, 8 Jul 2016 20:30:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607082030.u68KUKV7050285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 20:30:20 +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: r302451 - stable/10/sys/rpc 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:30:21 -0000 Author: ngie Date: Fri Jul 8 20:30:20 2016 New Revision: 302451 URL: https://svnweb.freebsd.org/changeset/base/302451 Log: MFC r301800: Deobfuscate cleanup path in clnt_bck_create(..) Similar to r300836, cl and ct will always be non-NULL as they're allocated using the mem_alloc routines, which always use `malloc(..., M_WAITOK)`. Deobfuscating the cleanup path fixes a leak where if cl was NULL and ct was not, ct would not be free'd, and also removes a duplicate test for cl not being NULL. CID: 1229999 Modified: stable/10/sys/rpc/clnt_bck.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/clnt_bck.c ============================================================================== --- stable/10/sys/rpc/clnt_bck.c Fri Jul 8 20:20:46 2016 (r302450) +++ stable/10/sys/rpc/clnt_bck.c Fri Jul 8 20:30:20 2016 (r302451) @@ -175,14 +175,9 @@ clnt_bck_create( return (cl); err: - if (cl) { - if (ct) { - mtx_destroy(&ct->ct_lock); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); - } + mtx_destroy(&ct->ct_lock); + mem_free(ct, sizeof (struct ct_data)); + mem_free(cl, sizeof (CLIENT)); return (NULL); } From owner-svn-src-all@freebsd.org Fri Jul 8 20:33:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 560CDB850FD; Fri, 8 Jul 2016 20:33:21 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 270F717D4; Fri, 8 Jul 2016 20:33:21 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68KXKxn053652; Fri, 8 Jul 2016 20:33:20 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KXKR1053651; Fri, 8 Jul 2016 20:33:20 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201607082033.u68KXKR1053651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Fri, 8 Jul 2016 20:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302452 - head/tools/tools/sysbuild 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:33:21 -0000 Author: phk Date: Fri Jul 8 20:33:20 2016 New Revision: 302452 URL: https://svnweb.freebsd.org/changeset/base/302452 Log: Add missing PORTS_OPTS to two make commands Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- head/tools/tools/sysbuild/sysbuild.sh Fri Jul 8 20:30:20 2016 (r302451) +++ head/tools/tools/sysbuild/sysbuild.sh Fri Jul 8 20:33:20 2016 (r302452) @@ -242,7 +242,7 @@ ports_build() ( do b=`echo $p | tr / _` t=`echo $p | sed "s,${pd},,"` - pn=`cd $p && make package-name` + pn=`cd $p && make package-name ${PORTS_OPTS}` if [ "x`basename $p`" == "xpkg" ] ; then log_it "Very Special: $t ($pn)" @@ -289,7 +289,7 @@ ports_build() ( else log_it FAIL build $p fi - make clean + make clean ${PORTS_OPTS} ) > _.$b 2>&1 < /dev/null done ) From owner-svn-src-all@freebsd.org Fri Jul 8 20:39:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99A85B851C6; Fri, 8 Jul 2016 20:39:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69BA21A57; Fri, 8 Jul 2016 20:39:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68KdbbW053949; Fri, 8 Jul 2016 20:39:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68Kdb7R053948; Fri, 8 Jul 2016 20:39:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607082039.u68Kdb7R053948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 20:39:37 +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: r302453 - stable/10/usr.sbin/rpcbind 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:39:38 -0000 Author: ngie Date: Fri Jul 8 20:39:37 2016 New Revision: 302453 URL: https://svnweb.freebsd.org/changeset/base/302453 Log: MFC r301605: Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x: > include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; The proposed change also matches the rest of the rtype upper bound checks in the file, so the original change was likely a typo. CID: 1007567 Modified: stable/10/usr.sbin/rpcbind/rpcb_stat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/rpcb_stat.c ============================================================================== --- stable/10/usr.sbin/rpcbind/rpcb_stat.c Fri Jul 8 20:33:20 2016 (r302452) +++ stable/10/usr.sbin/rpcbind/rpcb_stat.c Fri Jul 8 20:39:37 2016 (r302453) @@ -152,7 +152,7 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t rpcbs_rmtcalllist *rl; struct netconfig *nconf; - if (rtype > RPCBVERS_STAT) + if (rtype >= RPCBVERS_STAT) return; for (rl = inf[rtype].rmtinfo; rl; rl = rl->next) { From owner-svn-src-all@freebsd.org Fri Jul 8 20:40:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B22C0B853D0; Fri, 8 Jul 2016 20:40:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 820DA1CEE; Fri, 8 Jul 2016 20:40:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68Keoea054871; Fri, 8 Jul 2016 20:40:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KeoYH054870; Fri, 8 Jul 2016 20:40:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607082040.u68KeoYH054870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 20:40: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: r302454 - stable/9/usr.sbin/rpcbind 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:40:51 -0000 Author: ngie Date: Fri Jul 8 20:40:50 2016 New Revision: 302454 URL: https://svnweb.freebsd.org/changeset/base/302454 Log: MFstable/10 r302453: MFC r301605: Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x: > include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; The proposed change also matches the rest of the rtype upper bound checks in the file, so the original change was likely a typo. CID: 1007567 Modified: stable/9/usr.sbin/rpcbind/rpcb_stat.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/rpcb_stat.c ============================================================================== --- stable/9/usr.sbin/rpcbind/rpcb_stat.c Fri Jul 8 20:39:37 2016 (r302453) +++ stable/9/usr.sbin/rpcbind/rpcb_stat.c Fri Jul 8 20:40:50 2016 (r302454) @@ -152,7 +152,7 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t rpcbs_rmtcalllist *rl; struct netconfig *nconf; - if (rtype > RPCBVERS_STAT) + if (rtype >= RPCBVERS_STAT) return; for (rl = inf[rtype].rmtinfo; rl; rl = rl->next) { From owner-svn-src-all@freebsd.org Fri Jul 8 20:50:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4C38B8550D; Fri, 8 Jul 2016 20:50:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8470311C9; Fri, 8 Jul 2016 20:50:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68KoirE057897; Fri, 8 Jul 2016 20:50:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KoiR8057896; Fri, 8 Jul 2016 20:50:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607082050.u68KoiR8057896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 20:50:44 +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: r302455 - stable/10/usr.sbin/rpc.lockd 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 20:50:45 -0000 Author: ngie Date: Fri Jul 8 20:50:44 2016 New Revision: 302455 URL: https://svnweb.freebsd.org/changeset/base/302455 Log: MFC r301871: Add missing break in lock_partialfilelock(..) with NFS_RESERR This will help ensure that the right error is trickled up when the function is called if the lock status is NFS_RESERR Tested with: fsx; svn info/svnversion (uses bdb locking); locktests from Bull http://nfsv4.bullopensource.org/tools/tests/locktest.php CID: 1008161, 1304956 Modified: stable/10/usr.sbin/rpc.lockd/lockd_lock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpc.lockd/lockd_lock.c ============================================================================== --- stable/10/usr.sbin/rpc.lockd/lockd_lock.c Fri Jul 8 20:40:50 2016 (r302454) +++ stable/10/usr.sbin/rpc.lockd/lockd_lock.c Fri Jul 8 20:50:44 2016 (r302455) @@ -1426,6 +1426,7 @@ lock_partialfilelock(struct file_lock *f break; case NFS_RESERR: retval = PFL_NFSRESERR; + break; default: debuglog("Unmatched lnlstatus %d\n"); retval = PFL_NFSDENIED_NOLOCK; From owner-svn-src-all@freebsd.org Fri Jul 8 21:17:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC16AB85CDC; Fri, 8 Jul 2016 21:17:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC0E11A2; Fri, 8 Jul 2016 21:17:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LHOQB069109; Fri, 8 Jul 2016 21:17:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LHOmW069108; Fri, 8 Jul 2016 21:17:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607082117.u68LHOmW069108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 8 Jul 2016 21:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302456 - head/gnu/lib/libgcc 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:17:25 -0000 Author: emaste Date: Fri Jul 8 21:17:24 2016 New Revision: 302456 URL: https://svnweb.freebsd.org/changeset/base/302456 Log: libunwind: enable only the native unwinder by default This significantly reduces stack space requirements, and runtimes require only native unwinding. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Fri Jul 8 20:50:44 2016 (r302455) +++ head/gnu/lib/libgcc/Makefile Fri Jul 8 21:17:24 2016 (r302456) @@ -89,7 +89,7 @@ LIB2ADDEH = gcc_personality_v0.c \ UnwindRegistersSave.S \ libunwind.cpp -CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} +CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY .if empty(CXXFLAGS:M-std=*) CXXFLAGS+= -std=c++11 .endif From owner-svn-src-all@freebsd.org Fri Jul 8 21:19:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E4BFB85F01; Fri, 8 Jul 2016 21:19:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B2F168C; Fri, 8 Jul 2016 21:19:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LJmds069280; Fri, 8 Jul 2016 21:19:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LJmc7069279; Fri, 8 Jul 2016 21:19:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607082119.u68LJmc7069279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 8 Jul 2016 21:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r302457 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:19:49 -0000 Author: bdrewery Date: Fri Jul 8 21:19:48 2016 New Revision: 302457 URL: https://svnweb.freebsd.org/changeset/base/302457 Log: MFC r302449: Use TARGET here to fix check/delete-old after r302391. Approved by: re (gjb) Modified: stable/11/ObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Fri Jul 8 21:17:24 2016 (r302456) +++ stable/11/ObsoleteFiles.inc Fri Jul 8 21:19:48 2016 (r302457) @@ -8014,7 +8014,7 @@ OLD_FILES+=usr/share/man/man5/usbd.conf. .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif -.if ${TARGET_ARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && \ +.if ${TARGET_ARCH} != "aarch64" && ${TARGET} != "arm" && \ ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz From owner-svn-src-all@freebsd.org Fri Jul 8 21:20:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFD92B85FD8; Fri, 8 Jul 2016 21:20:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C67717FC; Fri, 8 Jul 2016 21:20:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LK9AW069363; Fri, 8 Jul 2016 21:20:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LK9Tp069362; Fri, 8 Jul 2016 21:20:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607082120.u68LK9Tp069362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 21:20:09 +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: r302458 - stable/9/usr.sbin/rpc.lockd 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:20:10 -0000 Author: ngie Date: Fri Jul 8 21:20:09 2016 New Revision: 302458 URL: https://svnweb.freebsd.org/changeset/base/302458 Log: MFstable/10 r302455: MFC r301871: Add missing break in lock_partialfilelock(..) with NFS_RESERR This will help ensure that the right error is trickled up when the function is called if the lock status is NFS_RESERR Tested with: fsx; svn info/svnversion (uses bdb locking); locktests from Bull http://nfsv4.bullopensource.org/tools/tests/locktest.php CID: 1008161, 1304956 Modified: stable/9/usr.sbin/rpc.lockd/lockd_lock.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/rpc.lockd/ (props changed) Modified: stable/9/usr.sbin/rpc.lockd/lockd_lock.c ============================================================================== --- stable/9/usr.sbin/rpc.lockd/lockd_lock.c Fri Jul 8 21:19:48 2016 (r302457) +++ stable/9/usr.sbin/rpc.lockd/lockd_lock.c Fri Jul 8 21:20:09 2016 (r302458) @@ -1428,6 +1428,7 @@ lock_partialfilelock(struct file_lock *f break; case NFS_RESERR: retval = PFL_NFSRESERR; + break; default: debuglog("Unmatched lnlstatus %d\n"); retval = PFL_NFSDENIED_NOLOCK; From owner-svn-src-all@freebsd.org Fri Jul 8 21:25:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68AFB83186; Fri, 8 Jul 2016 21:25:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28D81C7D; Fri, 8 Jul 2016 21:25:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LPbR6072931; Fri, 8 Jul 2016 21:25:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LPbwh072929; Fri, 8 Jul 2016 21:25:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607082125.u68LPbwh072929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 8 Jul 2016 21:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302459 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:25:38 -0000 Author: mav Date: Fri Jul 8 21:25:37 2016 New Revision: 302459 URL: https://svnweb.freebsd.org/changeset/base/302459 Log: Allow AHCI controller to support up to 32 arbitrary devices. While old syntax is still supported, new syntax looks like this: -s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Fri Jul 8 21:20:09 2016 (r302458) +++ head/usr.sbin/bhyve/bhyve.8 Fri Jul 8 21:25:37 2016 (r302459) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2016 +.Dd July 8, 2016 .Dt BHYVE 8 .Os .Sh NAME @@ -171,6 +171,8 @@ Virtio network interface. Virtio block storage interface. .It Li virtio-rnd Virtio RNG interface. +.It Li ahci +AHCI controller attached to arbitraty devices. .It Li ahci-cd AHCI controller attached to an ATAPI CD/DVD. .It Li ahci-hd @@ -347,15 +349,11 @@ null-modem device. .Bd -literal -offset indent bhyve -c 4 \\ -s 0,amd_hostbridge -s 1,lpc \\ - -s 1:0,ahci-hd,/images/disk.1 \\ - -s 1:1,ahci-hd,/images/disk.2 \\ - -s 1:2,ahci-hd,/images/disk.3 \\ - -s 1:3,ahci-hd,/images/disk.4 \\ - -s 1:4,ahci-hd,/images/disk.5 \\ - -s 1:5,ahci-hd,/images/disk.6 \\ - -s 1:6,ahci-hd,/images/disk.7 \\ - -s 1:7,ahci-hd,/images/disk.8 \\ - -s 2,ahci-cd,/images/install.iso \\ + -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\ +hd:/images/disk.3,hd:/images/disk.4,\\ +hd:/images/disk.5,hd:/images/disk.6,\\ +hd:/images/disk.7,hd:/images/disk.8,\\ +cd:/images/install.iso \\ -s 3,virtio-net,tap0 \\ -l com1,/dev/nmdm0A \\ -A -H -P -m 8G Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Fri Jul 8 21:20:09 2016 (r302458) +++ head/usr.sbin/bhyve/pci_ahci.c Fri Jul 8 21:25:37 2016 (r302459) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013 Zhixiang Yu + * Copyright (c) 2015-2016 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,7 +58,8 @@ __FBSDID("$FreeBSD$"); #include "ahci.h" #include "block_if.h" -#define MAX_PORTS 6 /* Intel ICH8 AHCI supports 6 ports */ +#define DEF_PORTS 6 /* Intel ICH8 AHCI supports 6 ports */ +#define MAX_PORTS 32 /* AHCI supports 32 ports */ #define PxSIG_ATA 0x00000101 /* ATA drive */ #define PxSIG_ATAPI 0xeb140101 /* ATAPI drive */ @@ -2221,20 +2223,16 @@ pci_ahci_read(struct vmctx *ctx, int vcp static int pci_ahci_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts, int atapi) { - char bident[sizeof("XX:X:X")]; + char bident[sizeof("XX:XX:XX")]; struct blockif_ctxt *bctxt; struct pci_ahci_softc *sc; - int ret, slots; + int ret, slots, p; MD5_CTX mdctx; u_char digest[16]; + char *next, *next2; ret = 0; - if (opts == NULL) { - fprintf(stderr, "pci_ahci: backing device required\n"); - return (1); - } - #ifdef AHCI_DEBUG dbg = fopen("/tmp/log", "w+"); #endif @@ -2242,58 +2240,83 @@ pci_ahci_init(struct vmctx *ctx, struct sc = calloc(1, sizeof(struct pci_ahci_softc)); pi->pi_arg = sc; sc->asc_pi = pi; - sc->ports = MAX_PORTS; + pthread_mutex_init(&sc->mtx, NULL); + sc->ports = 0; + sc->pi = 0; + slots = 32; + + for (p = 0; p < MAX_PORTS && opts != NULL; p++, opts = next) { + /* Identify and cut off type of present port. */ + if (strncmp(opts, "hd:", 3) == 0) { + atapi = 0; + opts += 3; + } else if (strncmp(opts, "cd:", 3) == 0) { + atapi = 1; + opts += 3; + } + + /* Find and cut off the next port options. */ + next = strstr(opts, ",hd:"); + next2 = strstr(opts, ",cd:"); + if (next == NULL || (next2 != NULL && next2 < next)) + next = next2; + if (next != NULL) { + next[0] = 0; + next++; + } - /* - * Only use port 0 for a backing device. All other ports will be - * marked as unused - */ - sc->port[0].atapi = atapi; + if (opts[0] == 0) + continue; - /* - * Attempt to open the backing image. Use the PCI - * slot/func for the identifier string. - */ - snprintf(bident, sizeof(bident), "%d:%d", pi->pi_slot, pi->pi_func); - bctxt = blockif_open(opts, bident); - if (bctxt == NULL) { - ret = 1; - goto open_fail; - } - sc->port[0].bctx = bctxt; - sc->port[0].pr_sc = sc; + /* + * Attempt to open the backing image. Use the PCI slot/func + * and the port number for the identifier string. + */ + snprintf(bident, sizeof(bident), "%d:%d:%d", pi->pi_slot, + pi->pi_func, p); + bctxt = blockif_open(opts, bident); + if (bctxt == NULL) { + sc->ports = p; + ret = 1; + goto open_fail; + } + sc->port[p].bctx = bctxt; + sc->port[p].pr_sc = sc; + sc->port[p].atapi = atapi; - /* - * Create an identifier for the backing file. Use parts of the - * md5 sum of the filename - */ - MD5Init(&mdctx); - MD5Update(&mdctx, opts, strlen(opts)); - MD5Final(digest, &mdctx); - sprintf(sc->port[0].ident, "BHYVE-%02X%02X-%02X%02X-%02X%02X", - digest[0], digest[1], digest[2], digest[3], digest[4], digest[5]); + /* + * Create an identifier for the backing file. + * Use parts of the md5 sum of the filename + */ + MD5Init(&mdctx); + MD5Update(&mdctx, opts, strlen(opts)); + MD5Final(digest, &mdctx); + sprintf(sc->port[p].ident, "BHYVE-%02X%02X-%02X%02X-%02X%02X", + digest[0], digest[1], digest[2], digest[3], digest[4], + digest[5]); - /* - * Allocate blockif request structures and add them - * to the free list - */ - pci_ahci_ioreq_init(&sc->port[0]); + /* + * Allocate blockif request structures and add them + * to the free list + */ + pci_ahci_ioreq_init(&sc->port[p]); - pthread_mutex_init(&sc->mtx, NULL); + sc->pi |= (1 << p); + if (sc->port[p].ioqsz < slots) + slots = sc->port[p].ioqsz; + } + sc->ports = p; /* Intel ICH8 AHCI */ - slots = sc->port[0].ioqsz; - if (slots > 32) - slots = 32; --slots; + if (sc->ports < DEF_PORTS) + sc->ports = DEF_PORTS; sc->cap = AHCI_CAP_64BIT | AHCI_CAP_SNCQ | AHCI_CAP_SSNTF | AHCI_CAP_SMPS | AHCI_CAP_SSS | AHCI_CAP_SALP | AHCI_CAP_SAL | AHCI_CAP_SCLO | (0x3 << AHCI_CAP_ISS_SHIFT)| AHCI_CAP_PMD | AHCI_CAP_SSC | AHCI_CAP_PSC | (slots << AHCI_CAP_NCS_SHIFT) | AHCI_CAP_SXS | (sc->ports - 1); - /* Only port 0 implemented */ - sc->pi = 1; sc->vs = 0x10300; sc->cap2 = AHCI_CAP2_APST; ahci_reset(sc); @@ -2311,8 +2334,10 @@ pci_ahci_init(struct vmctx *ctx, struct open_fail: if (ret) { - if (sc->port[0].bctx != NULL) - blockif_close(sc->port[0].bctx); + for (p = 0; p < sc->ports; p++) { + if (sc->port[p].bctx != NULL) + blockif_close(sc->port[p].bctx); + } free(sc); } @@ -2336,6 +2361,14 @@ pci_ahci_atapi_init(struct vmctx *ctx, s /* * Use separate emulation names to distinguish drive and atapi devices */ +struct pci_devemu pci_de_ahci = { + .pe_emu = "ahci", + .pe_init = pci_ahci_hd_init, + .pe_barwrite = pci_ahci_write, + .pe_barread = pci_ahci_read +}; +PCI_EMUL_SET(pci_de_ahci); + struct pci_devemu pci_de_ahci_hd = { .pe_emu = "ahci-hd", .pe_init = pci_ahci_hd_init, From owner-svn-src-all@freebsd.org Fri Jul 8 21:30:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52F24B83254; Fri, 8 Jul 2016 21:30:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E3CD1F05; Fri, 8 Jul 2016 21:30:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LUIPV073314; Fri, 8 Jul 2016 21:30:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LUIVs073312; Fri, 8 Jul 2016 21:30:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607082130.u68LUIVs073312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 8 Jul 2016 21:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302460 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:30:19 -0000 Author: mav Date: Fri Jul 8 21:30:18 2016 New Revision: 302460 URL: https://svnweb.freebsd.org/changeset/base/302460 Log: Add emulation for multiple (up to 16) MSI vectors for AHCI. It was useless before, but may improve performance now if multiple devices are configured and guest supports this feature. Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/pci_ahci.c head/usr.sbin/bhyve/pci_emul.h Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Fri Jul 8 21:25:37 2016 (r302459) +++ head/usr.sbin/bhyve/pci_ahci.c Fri Jul 8 21:30:18 2016 (r302460) @@ -135,6 +135,7 @@ struct ahci_port { uint8_t *cmd_lst; uint8_t *rfis; char ident[20 + 1]; + int port; int atapi; int reset; int waitforclear; @@ -219,47 +220,95 @@ static inline void lba_to_msf(uint8_t *b } /* - * generate HBA intr depending on whether or not ports within - * the controller have an interrupt pending. + * Generate HBA interrupts on global IS register write. */ static void -ahci_generate_intr(struct pci_ahci_softc *sc) +ahci_generate_intr(struct pci_ahci_softc *sc, uint32_t mask) { - struct pci_devinst *pi; - int i; - - pi = sc->asc_pi; + struct pci_devinst *pi = sc->asc_pi; + struct ahci_port *p; + int i, nmsg; + uint32_t mmask; + /* Update global IS from PxIS/PxIE. */ for (i = 0; i < sc->ports; i++) { - struct ahci_port *pr; - pr = &sc->port[i]; - if (pr->is & pr->ie) + p = &sc->port[i]; + if (p->is & p->ie) sc->is |= (1 << i); } + DPRINTF("%s(%08x) %08x\n", __func__, mask, sc->is); - DPRINTF("%s %x\n", __func__, sc->is); + /* If there is nothing enabled -- clear legacy interrupt and exit. */ + if (sc->is == 0 || (sc->ghc & AHCI_GHC_IE) == 0) { + if (sc->lintr) { + pci_lintr_deassert(pi); + sc->lintr = 0; + } + return; + } - if (sc->is && (sc->ghc & AHCI_GHC_IE)) { - if (pci_msi_enabled(pi)) { - /* - * Generate an MSI interrupt on every edge - */ - pci_generate_msi(pi, 0); - } else if (!sc->lintr) { - /* - * Only generate a pin-based interrupt if one wasn't - * in progress - */ + /* If there is anything and no MSI -- assert legacy interrupt. */ + nmsg = pci_msi_maxmsgnum(pi); + if (nmsg == 0) { + if (!sc->lintr) { sc->lintr = 1; pci_lintr_assert(pi); } - } else if (sc->lintr) { - /* - * No interrupts: deassert pin-based signal if it had - * been asserted - */ - pci_lintr_deassert(pi); - sc->lintr = 0; + return; + } + + /* Assert respective MSIs for ports that were touched. */ + for (i = 0; i < nmsg; i++) { + if (sc->ports <= nmsg || i < nmsg - 1) + mmask = 1 << i; + else + mmask = 0xffffffff << i; + if (sc->is & mask && mmask & mask) + pci_generate_msi(pi, i); + } +} + +/* + * Generate HBA interrupt on specific port event. + */ +static void +ahci_port_intr(struct ahci_port *p) +{ + struct pci_ahci_softc *sc = p->pr_sc; + struct pci_devinst *pi = sc->asc_pi; + int nmsg; + + DPRINTF("%s(%d) %08x/%08x %08x\n", __func__, + p->port, p->is, p->ie, sc->is); + + /* If there is nothing enabled -- we are done. */ + if ((p->is & p->ie) == 0) + return; + + /* In case of non-shared MSI always generate interrupt. */ + nmsg = pci_msi_maxmsgnum(pi); + if (sc->ports <= nmsg || p->port < nmsg - 1) { + sc->is |= (1 << p->port); + if ((sc->ghc & AHCI_GHC_IE) == 0) + return; + pci_generate_msi(pi, p->port); + return; + } + + /* If IS for this port is already set -- do nothing. */ + if (sc->is & (1 << p->port)) + return; + + sc->is |= (1 << p->port); + + /* If interrupts are enabled -- generate one. */ + if ((sc->ghc & AHCI_GHC_IE) == 0) + return; + if (nmsg > 0) { + pci_generate_msi(pi, nmsg - 1); + } else if (!sc->lintr) { + sc->lintr = 1; + pci_lintr_assert(pi); } } @@ -297,8 +346,10 @@ ahci_write_fis(struct ahci_port *p, enum } memcpy(p->rfis + offset, fis, len); if (irq) { - p->is |= irq; - ahci_generate_intr(p->pr_sc); + if (~p->is & irq) { + p->is |= irq; + ahci_port_intr(p); + } } } @@ -1725,7 +1776,7 @@ ahci_handle_slot(struct ahci_port *p, in struct pci_ahci_softc *sc; uint8_t *cfis; #ifdef AHCI_DEBUG - int cfl; + int cfl, i; #endif sc = p->pr_sc; @@ -1986,10 +2037,11 @@ pci_ahci_port_write(struct pci_ahci_soft break; case AHCI_P_IS: p->is &= ~value; + ahci_port_intr(p); break; case AHCI_P_IE: p->ie = value & 0xFDC000FF; - ahci_generate_intr(sc); + ahci_port_intr(p); break; case AHCI_P_CMD: { @@ -2079,16 +2131,19 @@ pci_ahci_host_write(struct pci_ahci_soft DPRINTF("pci_ahci_host: read only registers 0x%"PRIx64"\n", offset); break; case AHCI_GHC: - if (value & AHCI_GHC_HR) + if (value & AHCI_GHC_HR) { ahci_reset(sc); - else if (value & AHCI_GHC_IE) { - sc->ghc |= AHCI_GHC_IE; - ahci_generate_intr(sc); + break; } + if (value & AHCI_GHC_IE) + sc->ghc |= AHCI_GHC_IE; + else + sc->ghc &= ~AHCI_GHC_IE; + ahci_generate_intr(sc, 0xffffffff); break; case AHCI_IS: sc->is &= ~value; - ahci_generate_intr(sc); + ahci_generate_intr(sc, value); break; default: break; @@ -2282,6 +2337,7 @@ pci_ahci_init(struct vmctx *ctx, struct } sc->port[p].bctx = bctxt; sc->port[p].pr_sc = sc; + sc->port[p].port = p; sc->port[p].atapi = atapi; /* @@ -2326,7 +2382,9 @@ pci_ahci_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE); pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_STORAGE_SATA); pci_set_cfgdata8(pi, PCIR_PROGIF, PCIP_STORAGE_SATA_AHCI_1_0); - pci_emul_add_msicap(pi, 1); + p = MIN(sc->ports, 16); + p = flsl(p) - ((p & (p - 1)) ? 0 : 1); + pci_emul_add_msicap(pi, 1 << p); pci_emul_alloc_bar(pi, 5, PCIBAR_MEM32, AHCI_OFFSET + sc->ports * AHCI_STEP); Modified: head/usr.sbin/bhyve/pci_emul.h ============================================================================== --- head/usr.sbin/bhyve/pci_emul.h Fri Jul 8 21:25:37 2016 (r302459) +++ head/usr.sbin/bhyve/pci_emul.h Fri Jul 8 21:30:18 2016 (r302460) @@ -230,7 +230,7 @@ int pci_msi_enabled(struct pci_devinst * int pci_msix_enabled(struct pci_devinst *pi); int pci_msix_table_bar(struct pci_devinst *pi); int pci_msix_pba_bar(struct pci_devinst *pi); -int pci_msi_msgnum(struct pci_devinst *pi); +int pci_msi_maxmsgnum(struct pci_devinst *pi); int pci_parse_slot(char *opt); void pci_populate_msicap(struct msicap *cap, int msgs, int nextptr); int pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum); From owner-svn-src-all@freebsd.org Fri Jul 8 21:34:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F5FBB833B1; Fri, 8 Jul 2016 21:34:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A9B81483; Fri, 8 Jul 2016 21:34:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LYec4076717; Fri, 8 Jul 2016 21:34:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LYdVN076708; Fri, 8 Jul 2016 21:34:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082134.u68LYdVN076708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 21:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302461 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:34:41 -0000 Author: adrian Date: Fri Jul 8 21:34:39 2016 New Revision: 302461 URL: https://svnweb.freebsd.org/changeset/base/302461 Log: [ath_hal] retire a "long RX desc" flag, store/use the TX/RX timestamp length. * the code already stored the length of the RX desc, which I never used. So, use that and retire the new flag I introduced a while ago. * Introduce a TX timestamp length field and capability. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/if_ath.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Fri Jul 8 21:34:39 2016 (r302461) @@ -2878,7 +2878,6 @@ ar9300_fill_capability_info(struct ath_h #if ATH_SUPPORT_SPECTRAL p_cap->halSpectralScanSupport = AH_TRUE; #endif - ahpriv->ah_rfsilent = ar9300_eeprom_get(ahp, EEP_RF_SILENT); if (ahpriv->ah_rfsilent & EEP_RFSILENT_ENABLED) { ahp->ah_gpio_select = MS(ahpriv->ah_rfsilent, EEP_RFSILENT_GPIO_SEL); @@ -2998,8 +2997,8 @@ ar9300_fill_capability_info(struct ath_h p_cap->hal_cfend_fix_support = AH_FALSE; p_cap->hal_aggr_extra_delim_war = AH_FALSE; #endif - p_cap->halHasLongRxDescTsf = AH_TRUE; -// p_cap->hal_rx_desc_timestamp_bits = 32; + p_cap->halTxTstampPrecision = 32; + p_cap->halRxTstampPrecision = 32; p_cap->halRxTxAbortSupport = AH_TRUE; p_cap->hal_ani_poll_interval = AR9300_ANI_POLLINTERVAL; p_cap->hal_channel_switch_time_usec = AR9300_CHANNEL_SWITCH_TIME_USEC; Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ah.c Fri Jul 8 21:34:39 2016 (r302461) @@ -749,7 +749,7 @@ ath_hal_getcapability(struct ath_hal *ah case HAL_CAP_HT20_SGI: return pCap->halHTSGI20Support ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */ - *result = pCap->halTstampPrecision; + *result = pCap->halRxTstampPrecision; return HAL_OK; case HAL_CAP_ANT_DIV_COMB: /* AR9285/AR9485 LNA diversity */ return pCap->halAntDivCombSupport ? HAL_OK : HAL_ENOTSUPP; @@ -778,8 +778,6 @@ ath_hal_getcapability(struct ath_hal *ah } case HAL_CAP_RXDESC_SELFLINK: /* hardware supports self-linked final RX descriptors correctly */ return pCap->halHasRxSelfLinkedTail ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_LONG_RXDESC_TSF: /* 32 bit TSF in RX descriptor? */ - return pCap->halHasLongRxDescTsf ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_BB_READ_WAR: /* Baseband read WAR */ return pCap->halHasBBReadWar? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_SERIALISE_WAR: /* PCI register serialisation */ @@ -791,6 +789,9 @@ ath_hal_getcapability(struct ath_hal *ah return pCap->halRxUsingLnaMixing ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_DO_MYBEACON: /* Hardware supports filtering my-beacons */ return pCap->halRxDoMyBeacon ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_TXTSTAMP_PREC: /* tx desc tstamp precision (bits) */ + *result = pCap->halTxTstampPrecision; + return HAL_OK; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ah.h Fri Jul 8 21:34:39 2016 (r302461) @@ -194,12 +194,12 @@ typedef enum { HAL_CAP_BSSIDMATCH = 238, /* hardware has disable bssid match */ HAL_CAP_STREAMS = 239, /* how many 802.11n spatial streams are available */ HAL_CAP_RXDESC_SELFLINK = 242, /* support a self-linked tail RX descriptor */ - HAL_CAP_LONG_RXDESC_TSF = 243, /* hardware supports 32bit TSF in RX descriptor */ HAL_CAP_BB_READ_WAR = 244, /* baseband read WAR */ HAL_CAP_SERIALISE_WAR = 245, /* serialise register access on PCI */ HAL_CAP_ENFORCE_TXOP = 246, /* Enforce TXOP if supported */ HAL_CAP_RX_LNA_MIXING = 247, /* RX hardware uses LNA mixing */ HAL_CAP_DO_MYBEACON = 248, /* Supports HAL_RX_FILTER_MYBEACON */ + HAL_CAP_TXTSTAMP_PREC = 250, /* tx desc tstamp precision (bits) */ } HAL_CAPABILITY_TYPE; /* Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Jul 8 21:34:39 2016 (r302461) @@ -260,7 +260,6 @@ typedef struct { hal4kbSplitTransSupport : 1, halHasRxSelfLinkedTail : 1, halSupportsFastClock5GHz : 1, - halHasLongRxDescTsf : 1, halHasBBReadWar : 1, halSerialiseRegWar : 1, halMciSupport : 1, @@ -290,7 +289,8 @@ typedef struct { uint16_t halKeyCacheSize; uint16_t halLow5GhzChan, halHigh5GhzChan; uint16_t halLow2GhzChan, halHigh2GhzChan; - int halTstampPrecision; + int halTxTstampPrecision; + int halRxTstampPrecision; int halRtsAggrLimit; uint8_t halTxChainMask; uint8_t halRxChainMask; Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Fri Jul 8 21:34:39 2016 (r302461) @@ -390,7 +390,8 @@ ar5210FillCapabilityInfo(struct ath_hal pCap->halRfSilentSupport = AH_TRUE; } - pCap->halTstampPrecision = 15; /* NB: s/w extended from 13 */ + pCap->halTxTstampPrecision = 16; + pCap->halRxTstampPrecision = 15; /* NB: s/w extended from 13 */ pCap->halIntrMask = (HAL_INT_COMMON - HAL_INT_BNR) | HAL_INT_RX | HAL_INT_TX Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Fri Jul 8 21:34:39 2016 (r302461) @@ -520,7 +520,8 @@ ar5211FillCapabilityInfo(struct ath_hal pCap->halRfSilentSupport = AH_TRUE; } - pCap->halTstampPrecision = 13; + pCap->halRxTstampPrecision = 13; + pCap->halTxTstampPrecision = 16; pCap->halIntrMask = HAL_INT_COMMON | HAL_INT_RX | HAL_INT_TX Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Fri Jul 8 21:34:39 2016 (r302461) @@ -899,7 +899,8 @@ ar5212FillCapabilityInfo(struct ath_hal pCap->halBssidMatchSupport = AH_TRUE; } - pCap->halTstampPrecision = 15; + pCap->halRxTstampPrecision = 15; + pCap->halTxTstampPrecision = 16; pCap->halIntrMask = HAL_INT_COMMON | HAL_INT_RX | HAL_INT_TX Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Jul 8 21:34:39 2016 (r302461) @@ -967,7 +967,8 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halChanHalfRate = AH_TRUE; pCap->halChanQuarterRate = AH_TRUE; - pCap->halTstampPrecision = 32; + pCap->halTxTstampPrecision = 32; + pCap->halRxTstampPrecision = 32; pCap->halHwPhyCounterSupport = AH_TRUE; pCap->halIntrMask = HAL_INT_COMMON | HAL_INT_RX @@ -1019,8 +1020,6 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halGTTSupport = AH_TRUE; pCap->halCSTSupport = AH_TRUE; pCap->halEnhancedDfsSupport = AH_FALSE; - /* Hardware supports 32 bit TSF values in the RX descriptor */ - pCap->halHasLongRxDescTsf = AH_TRUE; /* * BB Read WAR: this is only for AR5008/AR9001 NICs * It is also set individually in the AR91xx attach functions. Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Jul 8 21:30:18 2016 (r302460) +++ head/sys/dev/ath/if_ath.c Fri Jul 8 21:34:39 2016 (r302461) @@ -971,7 +971,20 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_hasbmatch = ath_hal_hasbssidmatch(ah); sc->sc_hastsfadd = ath_hal_hastsfadjust(ah); sc->sc_rxslink = ath_hal_self_linked_final_rxdesc(ah); - sc->sc_rxtsf32 = ath_hal_has_long_rxdesc_tsf(ah); + + /* XXX TODO: just make this a "store tx/rx timestamp length" operation */ + if (ath_hal_get_rx_tsf_prec(ah, &i)) { + if (i == 32) { + sc->sc_rxtsf32 = 1; + } + if (bootverbose) + device_printf(sc->sc_dev, "RX timestamp: %d bits\n", i); + } + if (ath_hal_get_tx_tsf_prec(ah, &i)) { + if (bootverbose) + device_printf(sc->sc_dev, "TX timestamp: %d bits\n", i); + } + sc->sc_hasenforcetxop = ath_hal_hasenforcetxop(ah); sc->sc_rx_lnamixer = ath_hal_hasrxlnamixer(ah); sc->sc_hasdivcomb = ath_hal_hasdivantcomb(ah); From owner-svn-src-all@freebsd.org Fri Jul 8 21:35:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CF16B8340C; Fri, 8 Jul 2016 21:35:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F3D1162E; Fri, 8 Jul 2016 21:35:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68LZiOV076806; Fri, 8 Jul 2016 21:35:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68LZiTU076805; Fri, 8 Jul 2016 21:35:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082135.u68LZiTU076805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 21:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302462 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:35:45 -0000 Author: adrian Date: Fri Jul 8 21:35:44 2016 New Revision: 302462 URL: https://svnweb.freebsd.org/changeset/base/302462 Log: [ath] include ath_hal accessor macro changes. I missed this in the previous commit. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Fri Jul 8 21:34:39 2016 (r302461) +++ head/sys/dev/ath/if_athvar.h Fri Jul 8 21:35:44 2016 (r302462) @@ -1370,9 +1370,12 @@ void ath_intr(void *); 0, NULL) == HAL_OK) #define ath_hal_gtxto_supported(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_GTXTO, 0, NULL) == HAL_OK) -#define ath_hal_has_long_rxdesc_tsf(_ah) \ - (ath_hal_getcapability(_ah, HAL_CAP_LONG_RXDESC_TSF, \ - 0, NULL) == HAL_OK) +#define ath_hal_get_rx_tsf_prec(_ah, _pr) \ + (ath_hal_getcapability((_ah), HAL_CAP_RXTSTAMP_PREC, 0, (_pr)) \ + == HAL_OK) +#define ath_hal_get_tx_tsf_prec(_ah, _pr) \ + (ath_hal_getcapability((_ah), HAL_CAP_TXTSTAMP_PREC, 0, (_pr)) \ + == HAL_OK) #define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \ ((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq))) #define ath_hal_rxprocdesc(_ah, _ds, _dspa, _dsnext, _rs) \ From owner-svn-src-all@freebsd.org Fri Jul 8 21:37:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 690C5B8349E; Fri, 8 Jul 2016 21:37:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35E6017C2; Fri, 8 Jul 2016 21:37:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68Lb40R076892; Fri, 8 Jul 2016 21:37:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68Lb4N9076891; Fri, 8 Jul 2016 21:37:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082137.u68Lb4N9076891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 21:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302463 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 21:37:05 -0000 Author: adrian Date: Fri Jul 8 21:37:04 2016 New Revision: 302463 URL: https://svnweb.freebsd.org/changeset/base/302463 Log: [ath_hal] add capability bit for querying/controlling the ToA/ToD positioning code. 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 Jul 8 21:35:44 2016 (r302462) +++ head/sys/dev/ath/ath_hal/ah.h Fri Jul 8 21:37:04 2016 (r302463) @@ -199,6 +199,7 @@ typedef enum { HAL_CAP_ENFORCE_TXOP = 246, /* Enforce TXOP if supported */ HAL_CAP_RX_LNA_MIXING = 247, /* RX hardware uses LNA mixing */ HAL_CAP_DO_MYBEACON = 248, /* Supports HAL_RX_FILTER_MYBEACON */ + HAL_CAP_TOA_LOCATIONING = 249, /* time of flight / arrival locationing */ HAL_CAP_TXTSTAMP_PREC = 250, /* tx desc tstamp precision (bits) */ } HAL_CAPABILITY_TYPE; From owner-svn-src-all@freebsd.org Fri Jul 8 22:20:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91CB7B83C4F; Fri, 8 Jul 2016 22:20:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EA521BB8; Fri, 8 Jul 2016 22:20:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68MKZNr093415; Fri, 8 Jul 2016 22:20:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68MKZY5093414; Fri, 8 Jul 2016 22:20:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082220.u68MKZY5093414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 22:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302464 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 22:20:36 -0000 Author: adrian Date: Fri Jul 8 22:20:35 2016 New Revision: 302464 URL: https://svnweb.freebsd.org/changeset/base/302464 Log: [ath] add a new buf flag, marking a buffer as involved with ToA/ToD positioning. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Fri Jul 8 21:37:04 2016 (r302463) +++ head/sys/dev/ath/if_athvar.h Fri Jul 8 22:20:35 2016 (r302464) @@ -314,8 +314,9 @@ typedef TAILQ_HEAD(ath_bufhead_s, ath_bu #define ATH_BUF_BUSY 0x00000002 /* (tx) desc owned by h/w */ #define ATH_BUF_FIFOEND 0x00000004 #define ATH_BUF_FIFOPTR 0x00000008 +#define ATH_BUF_TOA_PROBE 0x00000010 /* ToD/ToA exchange probe */ -#define ATH_BUF_FLAGS_CLONE (ATH_BUF_MGMT) +#define ATH_BUF_FLAGS_CLONE (ATH_BUF_MGMT | ATH_BUF_TOA_PROBE) /* * DMA state for tx/rx descriptors. From owner-svn-src-all@freebsd.org Fri Jul 8 22:32:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B34BB83F64; Fri, 8 Jul 2016 22:32:05 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E604B14E4; Fri, 8 Jul 2016 22:32:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68MW4ie000806; Fri, 8 Jul 2016 22:32:04 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68MW3LQ000803; Fri, 8 Jul 2016 22:32:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201607082232.u68MW3LQ000803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 8 Jul 2016 22:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302465 - in head/sys/boot: fdt uboot/lib 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 22:32:05 -0000 Author: gonzo Date: Fri Jul 8 22:32:03 2016 New Revision: 302465 URL: https://svnweb.freebsd.org/changeset/base/302465 Log: Remove extra 0x before %p format strings introduced by r296182 Modified: head/sys/boot/fdt/fdt_loader_cmd.c head/sys/boot/uboot/lib/elf_freebsd.c head/sys/boot/uboot/lib/glue.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Fri Jul 8 22:20:35 2016 (r302464) +++ head/sys/boot/fdt/fdt_loader_cmd.c Fri Jul 8 22:32:03 2016 (r302465) @@ -421,7 +421,7 @@ fdt_setup_fdtp() /* If we were given the address of a valid blob in memory, use it. */ if (fdt_to_load != NULL) { if (fdt_load_dtb_addr(fdt_to_load) == 0) { - printf("Using DTB from memory address 0x%p.\n", + printf("Using DTB from memory address %p.\n", fdt_to_load); return (0); } Modified: head/sys/boot/uboot/lib/elf_freebsd.c ============================================================================== --- head/sys/boot/uboot/lib/elf_freebsd.c Fri Jul 8 22:20:35 2016 (r302464) +++ head/sys/boot/uboot/lib/elf_freebsd.c Fri Jul 8 22:32:03 2016 (r302465) @@ -85,7 +85,7 @@ __elfN(uboot_exec)(struct preloaded_file return (error); entry = (void *)e->e_entry; - printf("Kernel entry at 0x%p...\n", entry); + printf("Kernel entry at %p...\n", entry); dev_cleanup(); printf("Kernel args: %s\n", fp->f_args); Modified: head/sys/boot/uboot/lib/glue.c ============================================================================== --- head/sys/boot/uboot/lib/glue.c Fri Jul 8 22:20:35 2016 (r302464) +++ head/sys/boot/uboot/lib/glue.c Fri Jul 8 22:32:03 2016 (r302465) @@ -469,7 +469,7 @@ ub_dump_di(int handle) int i; printf("device info (%d):\n", handle); - printf(" cookie\t= 0x%p\n", di->cookie); + printf(" cookie\t= %p\n", di->cookie); printf(" type\t\t= 0x%08x\n", di->type); if (di->type == DEV_TYP_NET) { From owner-svn-src-all@freebsd.org Fri Jul 8 22:37:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 204D0B84054; Fri, 8 Jul 2016 22:37:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1091171D; Fri, 8 Jul 2016 22:37:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68Mbr2V001056; Fri, 8 Jul 2016 22:37:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68MbrLt001055; Fri, 8 Jul 2016 22:37:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082237.u68MbrLt001055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 22:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302466 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 22:37:54 -0000 Author: adrian Date: Fri Jul 8 22:37:52 2016 New Revision: 302466 URL: https://svnweb.freebsd.org/changeset/base/302466 Log: [ath_hal] Add setting positioning bit and clear sounding-disable bit. * If fast_ts is set then the TX timestamp is the fast timestamp, not normal TSF. * If the TX descriptor has the position bit set then request locationing and clear sounding-disable. This way we (a) get the response with the TX timestamp from the location side of things, and (b) we get a CSI dump of the response ACK, which we will eventually use in the locationing path. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c 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 Fri Jul 8 22:32:03 2016 (r302465) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Fri Jul 8 22:37:52 2016 (r302466) @@ -335,6 +335,9 @@ ar9300_proc_tx_desc(struct ath_hal *ah, ts->ts_ba_low = ads->status5; ts->ts_ba_high = ads->status6; } + if (ads->status8 & AR_tx_fast_ts) { + ts->ts_flags |= HAL_TX_FAST_TS; + } /* * Extract the transmit rate. @@ -624,6 +627,11 @@ ar9300_set_11n_tx_desc( ads->ds_ctl18 = 0; ads->ds_ctl19 = AR_not_sounding; /* set not sounding for normal frame */ + /* ToA/ToD positioning */ + if (flags & HAL_TXDESC_POS) { + ads->ds_ctl12 |= AR_loc_mode; + ads->ds_ctl19 &= ~AR_not_sounding; + } /* * Clear Ness1/2/3 (Number of Extension Spatial Streams) fields. From owner-svn-src-all@freebsd.org Fri Jul 8 22:39:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68A4BB840F5; Fri, 8 Jul 2016 22:39:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD3418E2; Fri, 8 Jul 2016 22:39:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68MdbJY001157; Fri, 8 Jul 2016 22:39:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68MdbJD001156; Fri, 8 Jul 2016 22:39:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082239.u68MdbJD001156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 22:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302467 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 22:39:38 -0000 Author: adrian Date: Fri Jul 8 22:39:37 2016 New Revision: 302467 URL: https://svnweb.freebsd.org/changeset/base/302467 Log: [ath_hal] add locationing / tx-beamforming RX status descriptor decoding. * LOC_INFO is mostly just "did this packet come with a locationing timestamp instead of TSF"; * Decode not-sounding, uploaded-data, data-valid, data type and number of extension spatial streams. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c Fri Jul 8 22:37:52 2016 (r302466) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c Fri Jul 8 22:39:37 2016 (r302467) @@ -94,8 +94,15 @@ ar9300_proc_rx_desc_fast(struct ath_hal rxs->rs_moreaggr = (rxsp->status11 & AR_rx_more_aggr) ? 1 : 0; rxs->rs_antenna = (MS(rxsp->status4, AR_rx_antenna) & 0x7); rxs->rs_flags = (rxsp->status11 & AR_apsd_trig) ? HAL_RX_IS_APSD : 0; - rxs->rs_flags |= (rxsp->status4 & AR_gi) ? HAL_RX_GI : 0; - rxs->rs_flags |= (rxsp->status4 & AR_2040) ? HAL_RX_2040 : 0; + rxs->rs_flags |= (rxsp->status4 & AR_gi) ? HAL_RX_GI : 0; + rxs->rs_flags |= (rxsp->status4 & AR_2040) ? HAL_RX_2040 : 0; + + /* TX beamforming; CSI for locationing */ + rxs->rs_flags |= (rxsp->status2 & AR_hw_upload_data) ? HAL_RX_HW_UPLOAD_DATA : 0; + rxs->rs_flags |= (rxsp->status4 & AR_rx_not_sounding) ? 0 : HAL_RX_HW_SOUNDING; + rxs->rs_ness = MS(rxsp->status4, AR_rx_ness); + rxs->rs_flags |= (rxsp->status4 & AR_hw_upload_data_valid) ? HAL_RX_UPLOAD_VALID : 0; + rxs->rs_hw_upload_data_type = MS(rxsp->status11, AR_hw_upload_data_type); /* Copy EVM information */ rxs->rs_evm0 = rxsp->status6; @@ -133,9 +140,9 @@ ar9300_proc_rx_desc_fast(struct ath_hal if (rxsp->status11 & AR_crc_err) { rxs->rs_status |= HAL_RXERR_CRC; - /* - * ignore CRC flag for phy reports - */ + /* + * ignore CRC flag for phy reports + */ if (rxsp->status11 & AR_phyerr) { u_int phyerr = MS(rxsp->status11, AR_phy_err_code); rxs->rs_status |= HAL_RXERR_PHY; @@ -164,6 +171,23 @@ ar9300_proc_rx_desc_fast(struct ath_hal } else if (rxsp->status11 & AR_michael_err) { rxs->rs_status |= HAL_RXERR_MIC; } + } else { + if (rxsp->status11 & AR_position_bit) { +#if 1 + rxs->rs_flags |= HAL_RX_LOC_INFO; +#else + /* + * If the locationing counter is enabled, Osprey always + * seems to put AR_position_bit in each frame. + * So, only do this if we also have a valid upload + * and it's type "1" (which I'm guessing is CSI.) + */ + if ((rxs->rs_flags & HAL_RX_UPLOAD_VALID) && + (rxs->rs_hw_upload_data_type == 1)) { + rxs->rs_flags |= HAL_RX_LOC_INFO; + } +#endif + } } #if 0 rxs->rs_channel = AH_PRIVATE(ah)->ah_curchan->channel; From owner-svn-src-all@freebsd.org Fri Jul 8 22:44:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7EEFB842FE; Fri, 8 Jul 2016 22:44:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C47861D16; Fri, 8 Jul 2016 22:44:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id B07641DD6; Fri, 8 Jul 2016 22:44:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 66CF222FF7; Fri, 8 Jul 2016 22:44:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id gSpHmm4TwW10; Fri, 8 Jul 2016 22:44:54 +0000 (UTC) Subject: Re: svn commit: r302454 - stable/9/usr.sbin/rpcbind DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 67D8222FEF To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org References: <201607082040.u68KeoYH054870@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <06a075fe-5a9a-92fc-56d3-c6ba543cf12d@FreeBSD.org> Date: Fri, 8 Jul 2016 15:44:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607082040.u68KeoYH054870@repo.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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 22:44:57 -0000 On 7/8/16 1:40 PM, Garrett Cooper wrote: > Author: ngie > Date: Fri Jul 8 20:40:50 2016 > New Revision: 302454 > URL: https://svnweb.freebsd.org/changeset/base/302454 > > Log: > MFstable/10 r302453: I just noticed this. Why merge from stable/10 and not head? The documentation does state 'head'. The only exception I know of is merging to releng/ which originates from stable. https://www.freebsd.org/doc/en/articles/committers-guide/article.html "For instance, you will always merge stable/7/lib/libc/ from head/lib/libc/." > > MFC r301605: -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Fri Jul 8 22:59:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63DEAB84771; Fri, 8 Jul 2016 22:59:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BA9E1593; Fri, 8 Jul 2016 22:59:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68MxFIF008467; Fri, 8 Jul 2016 22:59:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68MxFx7008466; Fri, 8 Jul 2016 22:59:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082259.u68MxFx7008466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 22:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302468 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 22:59:16 -0000 Author: adrian Date: Fri Jul 8 22:59:15 2016 New Revision: 302468 URL: https://svnweb.freebsd.org/changeset/base/302468 Log: [ath_hal] add in locationing timer support and capabilities. * add support to read the timer and capability * add support to enable/disable the location timer. On AR9380 at least, enabling the location timer is required to make the timer tick, otherwise location packets return a timestamp of 0. However, it then makes /all/ RX packets use the RX location timestamp instead of the TSF timestamp. So, unless I find another magical way to do location timestamping, we will have to dynamically switch things on/off and ensure the TX/RX path handles the "different" timestamps correctly. Tested: * AR9380, STA mode Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Fri Jul 8 22:39:37 2016 (r302467) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Fri Jul 8 22:59:15 2016 (r302468) @@ -26,7 +26,9 @@ #include "ar9300/ar9300.h" #include "ar9300/ar9300reg.h" #include "ar9300/ar9300phy.h" +#include "ar9300/ar9300desc.h" +static u_int32_t ar9300_read_loc_timer(struct ath_hal *ah); void ar9300_get_hw_hangs(struct ath_hal *ah, hal_hw_hangs_t *hangs) @@ -947,6 +949,14 @@ ar9300_get_capability(struct ath_hal *ah return (HAL_ENOTSUPP); (*result) = !! (ahp->ah_misc_mode & AR_PCU_TXOP_TBTT_LIMIT_ENA); return (HAL_OK); + case HAL_CAP_TOA_LOCATIONING: + if (capability == 0) + return HAL_OK; + if (capability == 2) { + *result = ar9300_read_loc_timer(ah); + return (HAL_OK); + } + return HAL_ENOTSUPP; default: return ath_hal_getcapability(ah, type, capability, result); } @@ -1060,6 +1070,14 @@ ar9300_set_capability(struct ath_hal *ah } return AH_TRUE; + case HAL_CAP_TOA_LOCATIONING: + if (capability == 0) + return AH_TRUE; + if (capability == 1) { + ar9300_update_loc_ctl_reg(ah, setting); + return AH_TRUE; + } + return AH_FALSE; /* fall thru... */ default: return ath_hal_setcapability(ah, type, capability, setting, status); @@ -3855,6 +3873,13 @@ ar9300SetDfs3StreamFix(struct ath_hal *a return AH_FALSE; } +static u_int32_t +ar9300_read_loc_timer(struct ath_hal *ah) +{ + + return OS_REG_READ(ah, AR_LOC_TIMER_REG); +} + HAL_BOOL ar9300_set_ctl_pwr(struct ath_hal *ah, u_int8_t *ctl_array) { From owner-svn-src-all@freebsd.org Fri Jul 8 23:07:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FABFB84A30; Fri, 8 Jul 2016 23:07:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1064A1A4B; Fri, 8 Jul 2016 23:07:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68N7mQC012210; Fri, 8 Jul 2016 23:07:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68N7mIj012209; Fri, 8 Jul 2016 23:07:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607082307.u68N7mIj012209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Jul 2016 23:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302469 - head/tools/tools/locale 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 23:07:49 -0000 Author: bapt Date: Fri Jul 8 23:07:48 2016 New Revision: 302469 URL: https://svnweb.freebsd.org/changeset/base/302469 Log: Allow to install various components of the locales independantly Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile ============================================================================== --- head/tools/tools/locale/Makefile Fri Jul 8 22:59:15 2016 (r302468) +++ head/tools/tools/locale/Makefile Fri Jul 8 23:07:48 2016 (r302469) @@ -54,8 +54,9 @@ all: @echo "" @find . -name *failed -install: .for t in ${TYPES} +install: install-${t} +install-${t}: . if ${KNOWN:M${t}} rm -rf ${.CURDIR}/${t}.draft rm -rf ${.CURDIR}/../../../share/${t} From owner-svn-src-all@freebsd.org Fri Jul 8 23:09:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52E01B84A9E; Fri, 8 Jul 2016 23:09:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB401BED; Fri, 8 Jul 2016 23:08:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68N8xiQ012297; Fri, 8 Jul 2016 23:08:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68N8xw5012296; Fri, 8 Jul 2016 23:08:59 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201607082308.u68N8xw5012296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 8 Jul 2016 23:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302470 - head/sys/arm/allwinner 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 23:09:00 -0000 Author: manu Date: Fri Jul 8 23:08:59 2016 New Revision: 302470 URL: https://svnweb.freebsd.org/changeset/base/302470 Log: Check that the pin function exists before setting it. This is needed for Allwinner A13 which has gpio pins with only "out" function. Modified: head/sys/arm/allwinner/a10_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Fri Jul 8 23:07:48 2016 (r302469) +++ head/sys/arm/allwinner/a10_gpio.c Fri Jul 8 23:08:59 2016 (r302470) @@ -198,11 +198,15 @@ a10_gpio_get_function(struct a10_gpio_so return (0); } -static void +static int a10_gpio_set_function(struct a10_gpio_softc *sc, uint32_t pin, uint32_t f) { uint32_t bank, data, offset; + /* Check if the function exists in the padconf data */ + if (sc->padconf->pins[pin].functions[f] == NULL) + return (EINVAL); + /* Must be called with lock held. */ A10_GPIO_LOCK_ASSERT(sc); @@ -214,6 +218,8 @@ a10_gpio_set_function(struct a10_gpio_so data &= ~(7 << offset); data |= (f << offset); A10_GPIO_WRITE(sc, A10_GPIO_GP_CFG(bank, pin >> 3), data); + + return (0); } static uint32_t @@ -275,9 +281,10 @@ a10_gpio_set_drv(struct a10_gpio_softc * A10_GPIO_WRITE(sc, A10_GPIO_GP_DRV(bank, pin >> 4), val); } -static void +static int a10_gpio_pin_configure(struct a10_gpio_softc *sc, uint32_t pin, uint32_t flags) { + int err = 0; /* Must be called with lock held. */ A10_GPIO_LOCK_ASSERT(sc); @@ -285,11 +292,14 @@ a10_gpio_pin_configure(struct a10_gpio_s /* Manage input/output. */ if (flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { if (flags & GPIO_PIN_OUTPUT) - a10_gpio_set_function(sc, pin, A10_GPIO_OUTPUT); + err = a10_gpio_set_function(sc, pin, A10_GPIO_OUTPUT); else - a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); + err = a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); } + if (err) + return (err); + /* Manage Pull-up/pull-down. */ if (flags & (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)) { if (flags & GPIO_PIN_PULLUP) @@ -298,6 +308,8 @@ a10_gpio_pin_configure(struct a10_gpio_s a10_gpio_set_pud(sc, pin, A10_GPIO_PULLDOWN); } else a10_gpio_set_pud(sc, pin, A10_GPIO_NONE); + + return (0); } static device_t @@ -372,16 +384,17 @@ static int a10_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) { struct a10_gpio_softc *sc; + int err; sc = device_get_softc(dev); if (pin > sc->padconf->npins) return (EINVAL); A10_GPIO_LOCK(sc); - a10_gpio_pin_configure(sc, pin, flags); + err = a10_gpio_pin_configure(sc, pin, flags); A10_GPIO_UNLOCK(sc); - return (0); + return (err); } static int From owner-svn-src-all@freebsd.org Fri Jul 8 23:10:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F830B84C0F; Fri, 8 Jul 2016 23:10:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 507BC1DBA; Fri, 8 Jul 2016 23:10:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68NAtCq012422; Fri, 8 Jul 2016 23:10:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68NAtle012421; Fri, 8 Jul 2016 23:10:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607082310.u68NAtle012421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Jul 2016 23:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302471 - head/usr.bin/mkcsmapper 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 23:10:56 -0000 Author: bapt Date: Fri Jul 8 23:10:55 2016 New Revision: 302471 URL: https://svnweb.freebsd.org/changeset/base/302471 Log: Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd. Submitted by: wiz@NetBSD.org Obtained from: NetBSD Modified: head/usr.bin/mkcsmapper/mkcsmapper.1 Modified: head/usr.bin/mkcsmapper/mkcsmapper.1 ============================================================================== --- head/usr.bin/mkcsmapper/mkcsmapper.1 Fri Jul 8 23:08:59 2016 (r302470) +++ head/usr.bin/mkcsmapper/mkcsmapper.1 Fri Jul 8 23:10:55 2016 (r302471) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 6, 2009 +.Dd September 6, 2009 .Dt MKCSMAPPER 1 .Os .Sh NAME @@ -43,9 +43,8 @@ .Xr iconv 3 .Sh SYNOPSIS .Nm -.Op Fl mpd -.Fl o -.Ar outfile +.Op Fl dmp +.Fl o Ar outfile .Ar infile .Sh DESCRIPTION The @@ -82,7 +81,8 @@ Generate pivot data from .Sh HISTORY .Nm first appeared in -.Nx 2.0 , and made its appearance in +.Nx 2.0 , +and made its appearance in .Fx 9.0 . .Sh AUTHORS This manual page was written by From owner-svn-src-all@freebsd.org Fri Jul 8 23:38:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6373CB85169; Fri, 8 Jul 2016 23:38:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3259A1C64; Fri, 8 Jul 2016 23:38:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68NcQXC023120; Fri, 8 Jul 2016 23:38:26 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68NcPmM023107; Fri, 8 Jul 2016 23:38:25 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201607082338.u68NcPmM023107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 8 Jul 2016 23:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302472 - in head/sys: arm/allwinner arm/allwinner/a13 arm/allwinner/clk arm/conf 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 23:38:27 -0000 Author: manu Date: Fri Jul 8 23:38:25 2016 New Revision: 302472 URL: https://svnweb.freebsd.org/changeset/base/302472 Log: Add support for Allwinner A13. Reviewed by: jmcneill Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6809 Added: head/sys/arm/allwinner/a13/ head/sys/arm/allwinner/a13/a13_padconf.c (contents, props changed) head/sys/arm/allwinner/a13/files.a13 (contents, props changed) Modified: head/sys/arm/allwinner/a10_codec.c head/sys/arm/allwinner/a10_ehci.c head/sys/arm/allwinner/a10_gpio.c head/sys/arm/allwinner/allwinner_machdep.c head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/clk/aw_gate.c head/sys/arm/allwinner/clk/aw_pll.c head/sys/arm/allwinner/clk/aw_usbclk.c head/sys/arm/allwinner/std.a10 head/sys/arm/conf/A10 head/sys/conf/options.arm Modified: head/sys/arm/allwinner/a10_codec.c ============================================================================== --- head/sys/arm/allwinner/a10_codec.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/a10_codec.c Fri Jul 8 23:38:25 2016 (r302472) @@ -720,13 +720,19 @@ CHANNEL_DECLARE(a10codec_chan); * Device interface */ +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-codec", 1}, + {"allwinner,sun7i-a20-codec", 1}, + {NULL, 0}, +}; + static int a10codec_probe(device_t dev) { if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "allwinner,sun7i-a20-codec")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "Allwinner Audio Codec"); Modified: head/sys/arm/allwinner/a10_ehci.c ============================================================================== --- head/sys/arm/allwinner/a10_ehci.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/a10_ehci.c Fri Jul 8 23:38:25 2016 (r302472) @@ -112,6 +112,7 @@ static const struct aw_ehci_conf a31_ehc static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10-ehci", (uintptr_t)&a10_ehci_conf }, + { "allwinner,sun5i-a13-ehci", (uintptr_t)&a10_ehci_conf }, { "allwinner,sun6i-a31-ehci", (uintptr_t)&a31_ehci_conf }, { "allwinner,sun7i-a20-ehci", (uintptr_t)&a10_ehci_conf }, { "allwinner,sun8i-a83t-ehci", (uintptr_t)&a31_ehci_conf }, Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/a10_gpio.c Fri Jul 8 23:38:25 2016 (r302472) @@ -80,6 +80,11 @@ __FBSDID("$FreeBSD$"); extern const struct allwinner_padconf a10_padconf; #endif +/* Defined in a13_padconf.c */ +#ifdef SOC_ALLWINNER_A13 +extern const struct allwinner_padconf a13_padconf; +#endif + /* Defined in a20_padconf.c */ #ifdef SOC_ALLWINNER_A20 extern const struct allwinner_padconf a20_padconf; @@ -115,6 +120,9 @@ static struct ofw_compat_data compat_dat #ifdef SOC_ALLWINNER_A10 {"allwinner,sun4i-a10-pinctrl", (uintptr_t)&a10_padconf}, #endif +#ifdef SOC_ALLWINNER_A13 + {"allwinner,sun5i-a13-pinctrl", (uintptr_t)&a13_padconf}, +#endif #ifdef SOC_ALLWINNER_A20 {"allwinner,sun7i-a20-pinctrl", (uintptr_t)&a20_padconf}, #endif Added: head/sys/arm/allwinner/a13/a13_padconf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a13/a13_padconf.c Fri Jul 8 23:38:25 2016 (r302472) @@ -0,0 +1,129 @@ +/*- + * Copyright (c) 2016 Emmanuel Vadot + * 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 + +#ifdef SOC_ALLWINNER_A13 + +const static struct allwinner_pins a13_pins[] = { + {"PB0", 1, 0, {"gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, NULL, NULL}}, + {"PB1", 1, 1, {"gpio_in", "gpio_out", "i2c0", NULL, NULL, NULL, NULL, NULL}}, + {"PB2", 1, 2, {"gpio_in", "gpio_out", "pwm", NULL, NULL, "eint", NULL, NULL}}, + {"PB3", 1, 3, {"gpio_in", "gpio_out", "ir0", NULL, NULL, "eint", NULL, NULL}}, + {"PB4", 1, 4, {"gpio_in", "gpio_out", "ir0", NULL, NULL, "eint", NULL, NULL}}, + {"PB10", 1, 10, {"gpio_in", "gpio_out", "spi2", NULL, NULL, "eint", NULL, NULL}}, + {"PB15", 1, 15, {"gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, NULL, NULL}}, + {"PB16", 1, 16, {"gpio_in", "gpio_out", "i2c1", NULL, NULL, NULL, NULL, NULL}}, + {"PB17", 1, 17, {"gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, NULL, NULL}}, + {"PB18", 1, 18, {"gpio_in", "gpio_out", "i2c2", NULL, NULL, NULL, NULL, NULL}}, + + {"PC0", 2, 0, {"gpio_in", "gpio_out", "nand", "spi0", NULL, NULL, NULL, NULL}}, + {"PC1", 2, 1, {"gpio_in", "gpio_out", "nand", "spi0", NULL, NULL, NULL, NULL}}, + {"PC2", 2, 2, {"gpio_in", "gpio_out", "nand", "spi0", NULL, NULL, NULL, NULL}}, + {"PC3", 2, 3, {"gpio_in", "gpio_out", "nand", "spi0", NULL, NULL, NULL, NULL}}, + {"PC4", 2, 4, {"gpio_in", "gpio_out", "nand", NULL, NULL, NULL, NULL, NULL}}, + {"PC5", 2, 5, {"gpio_in", "gpio_out", "nand", NULL, NULL, NULL, NULL, NULL}}, + {"PC6", 2, 6, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC7", 2, 7, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC8", 2, 8, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC9", 2, 9, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC10", 2, 10, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC11", 2, 11, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC12", 2, 12, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC13", 2, 13, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC14", 2, 14, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC15", 2, 15, {"gpio_in", "gpio_out", "nand", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC19", 2, 19, {"gpio_in", "gpio_out", "nand", NULL, "uart3", NULL, NULL, NULL}}, + + {"PD2", 3, 2, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD3", 3, 3, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD4", 3, 4, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD5", 3, 5, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD6", 3, 6, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD7", 3, 7, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD10", 3, 10, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD11", 3, 11, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD12", 3, 12, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD13", 3, 13, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD14", 3, 14, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD15", 3, 15, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD18", 3, 18, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD19", 3, 19, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD20", 3, 20, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD21", 3, 21, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD22", 3, 22, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD23", 3, 23, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD24", 3, 24, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD25", 3, 25, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD26", 3, 26, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + {"PD27", 3, 27, {"gpio_in", "gpio_out", "lcd0", NULL, NULL, NULL, NULL, NULL}}, + + {"PE0", 4, 0, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, "eint", NULL}}, + {"PE1", 4, 1, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, NULL, NULL}}, + {"PE2", 4, 2, {"gpio_in", NULL, NULL, "csi0", "spi2", NULL, NULL, NULL}}, + {"PE3", 4, 3, {"gpio_in", "gpio_out", NULL, "csi0", "spi2", NULL, NULL, NULL}}, + {"PE4", 4, 4, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, + {"PE5", 4, 5, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, + {"PE6", 4, 6, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, + {"PE7", 4, 7, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, + {"PE8", 4, 8, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, + {"PE9", 4, 9, {"gpio_in", "gpio_out", NULL, "csi0", "mmc2", NULL, NULL, NULL}}, + {"PE10", 4, 10, {"gpio_in", "gpio_out", NULL, "csi0", "uart1", NULL, NULL, NULL}}, + {"PE11", 4, 11, {"gpio_in", "gpio_out", NULL, "csi0", "uart1", NULL, NULL, NULL}}, + + {"PF0", 5, 0, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, + {"PF1", 5, 1, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, + {"PF2", 5, 2, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, + {"PF3", 5, 3, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, + {"PF4", 5, 4, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, + {"PF5", 5, 5, {"gpio_in", "gpio_out", "mmc0", NULL, NULL, NULL, NULL, NULL}}, + + {"PG0", 6, 0, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "eint", NULL}}, + {"PG1", 6, 1, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "eint", NULL}}, + {"PG2", 6, 2, {"gpio_in", NULL, NULL, NULL, NULL, NULL, "eint", NULL}}, + {"PG3", 6, 3, {"gpio_in", "gpio_out", "mmc1", NULL, "uart1", NULL, "eint", NULL}}, + {"PG4", 6, 4, {"gpio_in", "gpio_out", "mmc1", NULL, "uart1", NULL, "eint", NULL}}, + {"PG9", 6, 9, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint", NULL}}, + {"PG10", 6, 10, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint", NULL}}, + {"PG11", 6, 11, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint", NULL}}, + {"PG12", 6, 12, {"gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint", NULL}}, +}; + +const struct allwinner_padconf a13_padconf = { + .npins = sizeof(a13_pins) / sizeof(struct allwinner_pins), + .pins = a13_pins, +}; + +#endif /* SOC_ALLWINNER_A13 */ Added: head/sys/arm/allwinner/a13/files.a13 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a13/files.a13 Fri Jul 8 23:38:25 2016 (r302472) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +arm/allwinner/a13/a13_padconf.c standard Modified: head/sys/arm/allwinner/allwinner_machdep.c ============================================================================== --- head/sys/arm/allwinner/allwinner_machdep.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/allwinner_machdep.c Fri Jul 8 23:38:25 2016 (r302472) @@ -68,6 +68,14 @@ a10_attach(platform_t plat) } static int +a13_attach(platform_t plat) +{ + soc_type = ALLWINNERSOC_A13; + soc_family = ALLWINNERSOC_SUN5I; + return (0); +} + +static int a20_attach(platform_t plat) { soc_type = ALLWINNERSOC_A20; @@ -169,6 +177,17 @@ static platform_method_t a10_methods[] = FDT_PLATFORM_DEF(a10, "a10", 0, "allwinner,sun4i-a10", 200); #endif +#if defined(SOC_ALLWINNER_A13) +static platform_method_t a13_methods[] = { + PLATFORMMETHOD(platform_attach, a13_attach), + PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), + + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(a13, "a13", 0, "allwinner,sun5i-a13", 200); +#endif + #if defined(SOC_ALLWINNER_A20) static platform_method_t a20_methods[] = { PLATFORMMETHOD(platform_attach, a20_attach), Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/aw_ccu.c Fri Jul 8 23:38:25 2016 (r302472) @@ -76,6 +76,7 @@ struct aw_ccu_softc { static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10", CLOCK_CCU }, + { "allwinner,sun5i-a13", CLOCK_CCU }, { "allwinner,sun7i-a20", CLOCK_CCU }, { "allwinner,sun6i-a31", CLOCK_CCU }, { "allwinner,sun6i-a31s", CLOCK_CCU }, Modified: head/sys/arm/allwinner/clk/aw_gate.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_gate.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/clk/aw_gate.c Fri Jul 8 23:38:25 2016 (r302472) @@ -60,6 +60,13 @@ static struct ofw_compat_data compat_dat { "allwinner,sun4i-a10-apb1-gates-clk", (uintptr_t)"Allwinner APB1 Clock Gates" }, + { "allwinner,sun5i-a13-ahb-gates-clk", + (uintptr_t)"Allwinner AHB Clock Gates" }, + { "allwinner,sun5i-a13-apb0-gates-clk", + (uintptr_t)"Allwinner APB0 Clock Gates" }, + { "allwinner,sun5i-a13-apb1-gates-clk", + (uintptr_t)"Allwinner APB1 Clock Gates" }, + { "allwinner,sun7i-a20-ahb-gates-clk", (uintptr_t)"Allwinner AHB Clock Gates" }, { "allwinner,sun7i-a20-apb0-gates-clk", Modified: head/sys/arm/allwinner/clk/aw_pll.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_pll.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/clk/aw_pll.c Fri Jul 8 23:38:25 2016 (r302472) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #include "clkdev_if.h" #define AW_PLL_ENABLE (1 << 31) @@ -101,6 +103,13 @@ __FBSDID("$FreeBSD$"); #define A10_PLL2_POST_DIV (0xf << 26) +#define A13_PLL2_POST_DIV (0xf << 26) +#define A13_PLL2_POST_DIV_SHIFT 26 +#define A13_PLL2_FACTOR_N (0x7f << 8) +#define A13_PLL2_FACTOR_N_SHIFT 8 +#define A13_PLL2_PRE_DIV (0x1f << 0) +#define A13_PLL2_PRE_DIV_SHIFT 0 + #define A23_PLL1_FACTOR_N (0x1f << 8) #define A23_PLL1_FACTOR_N_SHIFT 8 #define A23_PLL1_FACTOR_K (0x3 << 4) @@ -159,6 +168,7 @@ enum aw_pll_type { AWPLL_A10_PLL3, AWPLL_A10_PLL5, AWPLL_A10_PLL6, + AWPLL_A13_PLL2, AWPLL_A23_PLL1, AWPLL_A31_PLL1, AWPLL_A31_PLL6, @@ -462,6 +472,81 @@ a10_pll6_set_freq(struct aw_pll_sc *sc, } static int +a13_pll2_recalc(struct aw_pll_sc *sc, uint64_t *freq) +{ + uint32_t val, post_div, n, pre_div; + + DEVICE_LOCK(sc); + PLL_READ(sc, &val); + DEVICE_UNLOCK(sc); + + post_div = ((val & A13_PLL2_POST_DIV) >> A13_PLL2_POST_DIV_SHIFT) + 1; + if (post_div == 0) + post_div = 1; + n = (val & A13_PLL2_FACTOR_N) >> A13_PLL2_FACTOR_N_SHIFT; + if (n == 0) + n = 1; + pre_div = ((val & A13_PLL2_PRE_DIV) >> A13_PLL2_PRE_DIV_SHIFT) + 1; + if (pre_div == 0) + pre_div = 1; + + switch (sc->id) { + case SUN4I_A10_PLL2_1X: + *freq = (*freq * 2 * n) / pre_div / post_div / 2; + break; + case SUN4I_A10_PLL2_2X: + *freq = (*freq * 2 * n) / pre_div / 4; + break; + case SUN4I_A10_PLL2_4X: + *freq = (*freq * 2 * n) / pre_div / 2; + break; + case SUN4I_A10_PLL2_8X: + *freq = (*freq * 2 * n) / pre_div; + break; + default: + return (EINVAL); + } + + return (0); +} + +static int +a13_pll2_set_freq(struct aw_pll_sc *sc, uint64_t fin, uint64_t *fout, + int flags) +{ + uint32_t val, post_div, n, pre_div; + + if (sc->id != SUN4I_A10_PLL2_1X) + return (ENXIO); + + /* + * Audio Codec needs PLL2-1X to be either 24576000 or 22579200. + * + * PLL2-1X output frequency is (48MHz * n) / pre_div / post_div / 2. + * To get as close as possible to the desired rate, we use a + * pre-divider of 21 and a post-divider of 4. With these values, + * a multiplier of 86 or 79 gets us close to the target rates. + */ + if (*fout != 24576000 && *fout != 22579200) + return (EINVAL); + + pre_div = 21; + post_div = 4; + n = (*fout * pre_div * post_div * 2) / (2 * fin); + + DEVICE_LOCK(sc); + PLL_READ(sc, &val); + val &= ~(A13_PLL2_POST_DIV | A13_PLL2_FACTOR_N | A13_PLL2_PRE_DIV); + val |= ((post_div - 1) << A13_PLL2_POST_DIV_SHIFT); + val |= (n << A13_PLL2_FACTOR_N_SHIFT); + val |= ((pre_div - 1) << A13_PLL2_PRE_DIV_SHIFT); + PLL_WRITE(sc, val); + DEVICE_UNLOCK(sc); + + return (0); +} + +static int a23_pll1_recalc(struct aw_pll_sc *sc, uint64_t *freq) { uint32_t val, m, n, k, p; @@ -591,6 +676,7 @@ static struct aw_pll_funcs aw_pll_func[] PLL(AWPLL_A10_PLL3, a10_pll3_recalc, a10_pll3_set_freq, a10_pll3_init), PLL(AWPLL_A10_PLL5, a10_pll5_recalc, NULL, NULL), PLL(AWPLL_A10_PLL6, a10_pll6_recalc, a10_pll6_set_freq, a10_pll6_init), + PLL(AWPLL_A13_PLL2, a13_pll2_recalc, a13_pll2_set_freq, NULL), PLL(AWPLL_A23_PLL1, a23_pll1_recalc, NULL, NULL), PLL(AWPLL_A31_PLL1, a31_pll1_recalc, NULL, NULL), PLL(AWPLL_A31_PLL6, a31_pll6_recalc, NULL, a31_pll6_init), @@ -603,6 +689,7 @@ static struct ofw_compat_data compat_dat { "allwinner,sun4i-a10-pll3-clk", AWPLL_A10_PLL3 }, { "allwinner,sun4i-a10-pll5-clk", AWPLL_A10_PLL5 }, { "allwinner,sun4i-a10-pll6-clk", AWPLL_A10_PLL6 }, + { "allwinner,sun5i-a13-pll2-clk", AWPLL_A13_PLL2 }, { "allwinner,sun6i-a31-pll1-clk", AWPLL_A31_PLL1 }, { "allwinner,sun6i-a31-pll6-clk", AWPLL_A31_PLL6 }, { "allwinner,sun8i-a23-pll1-clk", AWPLL_A23_PLL1 }, Modified: head/sys/arm/allwinner/clk/aw_usbclk.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_usbclk.c Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/clk/aw_usbclk.c Fri Jul 8 23:38:25 2016 (r302472) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); enum aw_usbclk_type { AW_A10_USBCLK = 1, + AW_A13_USBCLK, AW_A31_USBCLK, AW_A83T_USBCLK, AW_H3_USBCLK, @@ -68,6 +69,7 @@ enum aw_usbclk_type { static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10-usb-clk", AW_A10_USBCLK }, + { "allwinner,sun5i-a13-usb-clk", AW_A13_USBCLK }, { "allwinner,sun6i-a31-usb-clk", AW_A31_USBCLK }, { "allwinner,sun8i-a83t-usb-clk", AW_A83T_USBCLK }, { "allwinner,sun8i-h3-usb-clk", AW_H3_USBCLK }, Modified: head/sys/arm/allwinner/std.a10 ============================================================================== --- head/sys/arm/allwinner/std.a10 Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/allwinner/std.a10 Fri Jul 8 23:38:25 2016 (r302472) @@ -10,3 +10,4 @@ options KERNVIRTADDR=0xc0200000 files "../allwinner/files.allwinner" files "../allwinner/files.a10" +files "../allwinner/a13/files.a13" Modified: head/sys/arm/conf/A10 ============================================================================== --- head/sys/arm/conf/A10 Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/arm/conf/A10 Fri Jul 8 23:38:25 2016 (r302472) @@ -26,6 +26,7 @@ include "../allwinner/std.a10" options INTRNG options SOC_ALLWINNER_A10 +options SOC_ALLWINNER_A13 options HZ=100 options SCHED_4BSD # 4BSD scheduler @@ -83,6 +84,8 @@ device iic device twsi device axp209 # AXP209 Power Management Unit +device pcf8563 # RTC + # GPIO device gpio device gpioled @@ -114,6 +117,9 @@ device emac # USB ethernet support, requires miibus device miibus +# Sound support +device sound + # Pinmux device fdt_pinctrl Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Fri Jul 8 23:10:55 2016 (r302471) +++ head/sys/conf/options.arm Fri Jul 8 23:38:25 2016 (r302472) @@ -41,6 +41,7 @@ SOCDEV_VA opt_global.h PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h SOC_ALLWINNER_A10 opt_global.h +SOC_ALLWINNER_A13 opt_global.h SOC_ALLWINNER_A20 opt_global.h SOC_ALLWINNER_A31 opt_global.h SOC_ALLWINNER_A31S opt_global.h From owner-svn-src-all@freebsd.org Fri Jul 8 23:40:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2376B852A3; Fri, 8 Jul 2016 23:40:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56A2A1E04; Fri, 8 Jul 2016 23:40:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68NePpR023409; Fri, 8 Jul 2016 23:40:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68NeP1q023404; Fri, 8 Jul 2016 23:40:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607082340.u68NeP1q023404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Jul 2016 23:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302473 - head/usr.bin/mkcsmapper 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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 23:40:26 -0000 Author: bapt Date: Fri Jul 8 23:40:25 2016 New Revision: 302473 URL: https://svnweb.freebsd.org/changeset/base/302473 Log: Sync usage between program and man page. Increase column width. [1] Simplifay the usage() function Replace errx/strerror with errc Submitted by: wiz@NetBSD.org [1] Obtained from: NetBSD Modified: head/usr.bin/mkcsmapper/mkcsmapper.1 head/usr.bin/mkcsmapper/yacc.y Modified: head/usr.bin/mkcsmapper/mkcsmapper.1 ============================================================================== --- head/usr.bin/mkcsmapper/mkcsmapper.1 Fri Jul 8 23:38:25 2016 (r302472) +++ head/usr.bin/mkcsmapper/mkcsmapper.1 Fri Jul 8 23:40:25 2016 (r302473) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 6, 2009 +.Dd July 9, 2016 .Dt MKCSMAPPER 1 .Os .Sh NAME @@ -43,9 +43,10 @@ .Xr iconv 3 .Sh SYNOPSIS .Nm -.Op Fl dmp -.Fl o Ar outfile -.Ar infile +.Op Fl d +.Op Fl m | Fl p +.Op Fl o Ar outfile +.Op Ar infile .Sh DESCRIPTION The .Nm @@ -59,7 +60,7 @@ A pivot file, which the possible source pairs or the set of mappings to use for a compound encoding. .Pp The following options are available: -.Bl -tag -width 0123 +.Bl -tag -width XoXoutfileXX .It Fl d Turns on debug mode. .It Fl m Modified: head/usr.bin/mkcsmapper/yacc.y ============================================================================== --- head/usr.bin/mkcsmapper/yacc.y Fri Jul 8 23:38:25 2016 (r302472) +++ head/usr.bin/mkcsmapper/yacc.y Fri Jul 8 23:40:25 2016 (r302473) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $ */ +/* $NetBSD: yacc.y,v 1.11 2016/06/28 09:22:16 wiz Exp $ */ %{ /*- @@ -664,18 +664,15 @@ do_mkpv(FILE *in) if (ret && output) unlink(output); /* dump failure */ if (ret) - errx(EXIT_FAILURE, "%s\n", strerror(ret)); + errc(EXIT_FAILURE, ret, ""); } static void usage(void) { - warnx("usage: \n" - "\t%s [-d] [-o outfile] [infile]\n" - "\t%s -m [-d] [-o outfile] [infile]\n" - "\t%s -p [-d] [-o outfile] [infile]\n", - getprogname(), getprogname(), getprogname()); - exit(1); + fprintf(stderr, "Usage: %s [-d] [-m|-p] [-o outfile] [infile]\n", + getprogname()); + exit(EXIT_FAILURE); } int From owner-svn-src-all@freebsd.org Fri Jul 8 23:44:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60737B85515; Fri, 8 Jul 2016 23:44:11 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17747151C; Fri, 8 Jul 2016 23:44:11 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68NiA1o026920; Fri, 8 Jul 2016 23:44:10 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68NiAcj026917; Fri, 8 Jul 2016 23:44:10 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201607082344.u68NiAcj026917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 8 Jul 2016 23:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302474 - in head: cddl/lib/libdtrace tests/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.22 Precedence: list List-Id: "SVN commit messages 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, 08 Jul 2016 23:44:11 -0000 Author: gnn Date: Fri Jul 8 23:44:09 2016 New Revision: 302474 URL: https://svnweb.freebsd.org/changeset/base/302474 Log: On FreeBSD there is a setsockopt option SO_USER_COOKIE which allows setting a 32 bit value on each socket. This can be used by applications and DTrace as a rendezvous point so that an applicaton's data can more easily be captured at run time. Expose the user cookie via DTrace by updating the translator in tcp.d and add a quick test program, a TCP server, that sets the cookie on each connection accepted. Reviewed by: hiren MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D7152 Added: head/tests/sys/netinet/tcp_user_cookie.c (contents, props changed) Modified: head/cddl/lib/libdtrace/tcp.d head/tests/sys/netinet/Makefile Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Fri Jul 8 23:40:25 2016 (r302473) +++ head/cddl/lib/libdtrace/tcp.d Fri Jul 8 23:44:09 2016 (r302474) @@ -126,6 +126,7 @@ typedef struct tcpsinfo { int tcps_retransmit; /* retransmit send event, boolean */ int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ int tcps_debug; /* socket has SO_DEBUG set */ + int tcps_cookie; /* expose the socket's SO_USER_COOKIE */ int32_t tcps_dupacks; /* consecutive dup acks received */ uint32_t tcps_rtttime; /* RTT measurement start time */ uint32_t tcps_rtseq; /* sequence # being timed */ @@ -224,6 +225,8 @@ translator tcpsinfo_t < struct tcpcb *p tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ tcps_debug = p == NULL ? 0 : p->t_inpcb->inp_socket->so_options & 1; + tcps_cookie = p == NULL ? -1 : + p->t_inpcb->inp_socket->so_user_cookie; tcps_dupacks = p == NULL ? -1 : p->t_dupacks; tcps_rtttime = p == NULL ? -1 : p->t_rtttime; tcps_rtseq = p == NULL ? -1 : p->t_rtseq; Modified: head/tests/sys/netinet/Makefile ============================================================================== --- head/tests/sys/netinet/Makefile Fri Jul 8 23:40:25 2016 (r302473) +++ head/tests/sys/netinet/Makefile Fri Jul 8 23:44:09 2016 (r302474) @@ -5,7 +5,7 @@ BINDIR= ${TESTSDIR} ATF_TESTS_SH= fibs_test -PROGS= udp_dontroute +PROGS= udp_dontroute tcp_user_cookie MAN= Added: head/tests/sys/netinet/tcp_user_cookie.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet/tcp_user_cookie.c Fri Jul 8 23:44:09 2016 (r302474) @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2016 Limelight Networks + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * + * NO WARRANTY + * 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 MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * Authors: George Neville-Neil + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define buflen 80 + +/* + * Setup a TCP server listening on a port for connections, all of + * which subseuqently have their user cookie set. + */ +int +main(int argc, char **argv) +{ + struct sockaddr_in srv; + int sock, accepted, port, cookie; + int ret; + char recvbuf[buflen]; + + if (argc != 3) { + fprintf(stderr, "Usage: %s port cookie\n", argv[0]); + exit(2); + } + + port = atoi(argv[1]); + cookie = atoi(argv[2]); + + sock = socket(PF_INET, SOCK_STREAM, 0); + if (sock < 0) + err(EXIT_FAILURE, "socket"); + + srv.sin_len = sizeof(srv); + srv.sin_family = AF_INET; + srv.sin_port = htons(port); + srv.sin_addr.s_addr = INADDR_ANY; + + if (bind(sock, (struct sockaddr *)&srv, srv.sin_len) < 0) + err(EX_OSERR, "failed to bind to port %d", port); + + if (listen(sock, 5) < 0) + err(EX_OSERR, "failed to listen on socket"); + + ret = setsockopt(sock, SOL_SOCKET, SO_USER_COOKIE, &cookie, sizeof(cookie)); + if (ret < 0) + err(EX_OSERR, "setsockopt(SO_USER_COOKIE)"); + + while (1) { + + accepted = accept(sock, NULL, 0); + + if (accepted < 0) + err(EX_OSERR, "accept failed"); + + ret = setsockopt(accepted, SOL_SOCKET, SO_USER_COOKIE, + &cookie, sizeof(cookie)); + if (ret < 0) + err(EX_OSERR, "setsockopt(SO_USER_COOKIE)"); + + ret = read(accepted, &recvbuf, buflen); + + if (ret < 0) + warn("failed read"); + + close(accepted); + } + + return (0); +} From owner-svn-src-all@freebsd.org Sat Jul 9 00:35:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00328B826E8; Sat, 9 Jul 2016 00:35:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B78551CBC; Sat, 9 Jul 2016 00:35:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u690ZKuu045663; Sat, 9 Jul 2016 00:35:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u690ZKNb045661; Sat, 9 Jul 2016 00:35:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607090035.u690ZKNb045661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 9 Jul 2016 00:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302475 - in head/contrib/llvm/projects/libunwind: include 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 00:35:22 -0000 Author: emaste Date: Sat Jul 9 00:35:20 2016 New Revision: 302475 URL: https://svnweb.freebsd.org/changeset/base/302475 Log: libunwind: limit stack usage in unwind cursor This may be reworked upstream but in the interim should address the stack usage issue reported in the PR. PR: 206384 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 8 23:44:09 2016 (r302474) +++ head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Sat Jul 9 00:35:20 2016 (r302475) @@ -22,30 +22,37 @@ # define _LIBUNWIND_TARGET_I386 1 # define _LIBUNWIND_CONTEXT_SIZE 8 # define _LIBUNWIND_CURSOR_SIZE 19 +# define _LIBUNWIND_MAX_REGISTER 9 # elif defined(__x86_64__) # define _LIBUNWIND_TARGET_X86_64 1 # define _LIBUNWIND_CONTEXT_SIZE 21 # define _LIBUNWIND_CURSOR_SIZE 33 +# define _LIBUNWIND_MAX_REGISTER 17 # elif defined(__ppc__) # define _LIBUNWIND_TARGET_PPC 1 # define _LIBUNWIND_CONTEXT_SIZE 117 # define _LIBUNWIND_CURSOR_SIZE 128 +# define _LIBUNWIND_MAX_REGISTER 113 # elif defined(__aarch64__) # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_CONTEXT_SIZE 66 # define _LIBUNWIND_CURSOR_SIZE 78 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__arm__) # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_CONTEXT_SIZE 60 # define _LIBUNWIND_CURSOR_SIZE 67 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__or1k__) # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 16 # define _LIBUNWIND_CURSOR_SIZE 28 +# define _LIBUNWIND_MAX_REGISTER 32 # elif defined(__riscv__) # define _LIBUNWIND_TARGET_RISCV 1 # define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ # define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# define _LIBUNWIND_MAX_REGISTER 96 # else # error "Unsupported architecture." # endif @@ -58,6 +65,7 @@ # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 +# define _LIBUNWIND_MAX_REGISTER 120 #endif // _LIBUNWIND_IS_NATIVE_ONLY #endif // ____LIBUNWIND_CONFIG_H__ Modified: head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Fri Jul 8 23:44:09 2016 (r302474) +++ head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Sat Jul 9 00:35:20 2016 (r302475) @@ -62,7 +62,7 @@ public: }; enum { - kMaxRegisterNumber = 120 + kMaxRegisterNumber = _LIBUNWIND_MAX_REGISTER }; enum RegisterSavedWhere { kRegisterUnused, From owner-svn-src-all@freebsd.org Sat Jul 9 01:27:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 643C6B8368B; Sat, 9 Jul 2016 01:27:09 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (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 1C7601967; Sat, 9 Jul 2016 01:27:09 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by mail-qk0-x22e.google.com with SMTP id s63so16170977qkb.2; Fri, 08 Jul 2016 18:27:09 -0700 (PDT) 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; bh=JKrfAhdcMTZlR5H6GEf3m99AohtWgebSE6GOHpKM37w=; b=pTQRcekTY1x2eOC+d3SZSXJr91to2pLZfYCSS5v5I73zqbK5xDxZ8rnjmf7zfh/vGd qoeL4L90Vmi8RpgM90m5g7aBpEsI1XuD4l3WNoQwmP21VQdyUr9dLz8GUEgKj+XX5Bn7 6kS/zj4YcpIAuTn2W7/843TGMt8Nxpb8UmKeJZoXvNNghrdcyzn7SeR7MStrzVi4C9z7 qIOijkxOCXiDthB8SvwTJYTLY2nsYEMrnQ+t69YlZyv6UtMi5kL6Cbyr4rOSwYX4z3g1 PgosF3jFD/aVyLpFQANzqAChz0ROClDvq3qoUAIViK9ndDe9m5lMb2woCJ8wmlUYgl+1 W46w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=JKrfAhdcMTZlR5H6GEf3m99AohtWgebSE6GOHpKM37w=; b=CfywR58C4nz5jGKeMaY9X8kKWhrmFW18LWCVW43byiE59Ec6ztyvIOqPewg1MNNxxS wi7dvSKSys64PkeS9WBZ0dLX4y/ibq5UKlx0obEi3mDArFb6zED7CNQhv9KBB4Id6Tpy +NMQlQG3HtQ4Zlv9WirYee//NikSpw69RwmyNMXozGOjcwap3RDRmLfpmn9UdS49SU5G Depo2S0XMwC5rV10+Y9VgjVwyq9DIAQ6y8EGoweH6q6M6ew0v4R2XGDxBIopJGU6SQ1w Ah8WfYqtjCSoVFIa4PQRE3ZfpkwiVuOtDESj1W7ANiHZkxKL/czn3bJJW9nIKLw1Azq3 N0hA== X-Gm-Message-State: ALyK8tL1ScBuaIaqZvu1NW2lxiIsRRPNBwHtrqpXeYZ66UbaisIaWHKNd/0fCtiHUXVb/w== X-Received: by 10.55.108.2 with SMTP id h2mr11086823qkc.97.1468027628070; Fri, 08 Jul 2016 18:27:08 -0700 (PDT) Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id 2sm558610qtg.24.2016.07.08.18.27.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jul 2016 18:27:07 -0700 (PDT) Date: Fri, 8 Jul 2016 21:27:00 -0400 From: Alexander Kabaev To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302350 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20160708212700.23c870ef@kan> In-Reply-To: <201607051847.u65IlIYf000901@repo.freebsd.org> References: <201607051847.u65IlIYf000901@repo.freebsd.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/jur74YpWMTnfvmTEPLvJtsk"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 01:27:09 -0000 --Sig_/jur74YpWMTnfvmTEPLvJtsk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 5 Jul 2016 18:47:18 +0000 (UTC) Gleb Smirnoff wrote: > Author: glebius > Date: Tue Jul 5 18:47:17 2016 > New Revision: 302350 > URL: https://svnweb.freebsd.org/changeset/base/302350 >=20 > Log: > The paradigm of a callout is that it has three consequent states: > not scheduled -> scheduled -> running -> not scheduled. The API and > the manual page assume that, some comments in the code assume that, > and looks like some contributors to the code also did. The problem is > that this paradigm isn't true. A callout can be scheduled and running > at the same time, which makes API description ambigouous. In such > case callout_stop() family of functions/macros should return 1 and 0 > at the same time, since it successfully unscheduled future callout > but the current one is running. Before this change we returned 1 in > such a case, with an exception that if running callout was migrating > we returned 0, unless CS_MIGRBLOCK was specified. > =20 > With this change, we now return 0 in case if future callout was > unscheduled, but another one is still in action, indicating to API > users that resources are not yet safe to be freed. > =20 > However, the sleepqueue code relies on getting 1 return code in > that case, and there already was CS_MIGRBLOCK flag, that covered one > of the edge cases. In the new return path we will also use this flag, > to keep sleepqueue safe.=20 > Since the flag CS_MIGRBLOCK doesn't block migration and now isn't > limited to migration edge case, rename it to CS_EXECUTING. > =20 > This change fixes panics on a high loaded TCP server. > =20 > Reviewed by: jch, hselasky, rrs, kib > Approved by: re (gjb) > Differential Revision: https://reviews.freebsd.org/D7042 >=20 Hi, this change also breaks ARP reliably in my nfsroot setup for multiple MIPS board. The cause is following: before this change, the sequence of calls: callout_init(&la->lle_timer, 1); ret =3D callout_stop(&ls->lle_timer); would result in ret =3D=3D -1 after the change, same sequence causes callout_stop to return 1. This does not bode well for lle entries that were allocated, but for which callout_reset was never called, because we have several constructs in the source tree that do something like if (callout_stop(&lle->lle_timer) > 0) LLE_REMREF(lle); This results in panics as described in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210884 --=20 Alexander Kabaev --Sig_/jur74YpWMTnfvmTEPLvJtsk Content-Type: application/pgp-signature Content-Description: Ð¦Ð¸Ñ„Ñ€Ð¾Ð²Ð°Ñ Ð¿Ð¾Ð´Ð¿Ð¸ÑÑŒ OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXgFLlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+5RMQAMkElhWV+PiSKMvWfiUuLjUi XsNW30X8Pnp+/9BPM7uRfyVE2G9I4ZLjMuWk/AVvvPdGCMEgVxoyY9omhF4MsdW0 hh5DtTF53XxnK2hWjO9n/aAxOGm5aEOX5amb1/VGhZYIuyxWbq0FdM+voh2dYBTZ 5UPq5MnJ1JyluTdzX8nlIXLpj2/ho4bdvi4PVCCrVVp3KNyQ5MHPnso7E9557rEP JjTw/r1VhuZQVo+bEZADFem1XBUlw2hl8XSNze9rC73Yv5Mzog3KTvXCDYNnKNvX nHkLFEzi+5wHGwnRl1M30/RSjj9IxKbAJ9Q+k+EqPPCsIuh/r+GPQX5fJkAPuXrt SbXsQpRDAB0FL8uPz/U41TXqAJZZ5NM1PAytyrJieyLY3yey/Qf48enkx8fh3XFD nEcCsBNqaMrIlP7lEkRtCpUy3Vl6rWtpuXbXlBZGs0votvioWsV/BE1jJCgku6mT 1ArH6wy3P7EtTHD6qS/V0h4LQZKzaqp5GiwU3T/K9GFTcez6SmsJuS/o2hsAqou5 hXhZU0iZBf0yeN8dQxiCvZeidROxqWy9W7R6K0Yhc06XOIOMKSs+W8dbQW2XdKfV N91znJ1DnY1aLTfLUbK7HK708Kr8p/nFiYd9nWnhvt8ZsWgFSzNtK7UlcTBSnzd5 NWwPikMro836MdHzZF1V =MWjQ -----END PGP SIGNATURE----- --Sig_/jur74YpWMTnfvmTEPLvJtsk-- From owner-svn-src-all@freebsd.org Sat Jul 9 02:33:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17F58B852E4; Sat, 9 Jul 2016 02:33:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE7C214B4; Sat, 9 Jul 2016 02:33:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u692XkYf089595; Sat, 9 Jul 2016 02:33:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u692XkqD089593; Sat, 9 Jul 2016 02:33:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607090233.u692XkqD089593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 9 Jul 2016 02:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302476 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 02:33:47 -0000 Author: pfg Date: Sat Jul 9 02:33:45 2016 New Revision: 302476 URL: https://svnweb.freebsd.org/changeset/base/302476 Log: ng_mppc(4):: basic readability cleanups. In particular use __unreachable() to appease static analyzers. No functional change. CID: 1356591 MFC after: 3 days Modified: head/sys/net/mppcc.c head/sys/net/mppcd.c Modified: head/sys/net/mppcc.c ============================================================================== --- head/sys/net/mppcc.c Sat Jul 9 00:35:20 2016 (r302475) +++ head/sys/net/mppcc.c Sat Jul 9 02:33:45 2016 (r302476) @@ -232,8 +232,9 @@ int MPPC_Compress(u_char **src, u_char * } else if (off < 8192) { /* 16-bit offset; 320 <= offset < 8192 */ putbits16(*dst, 0xc000|(off-320), 16, &olen, &l); } else { /* NOTREACHED */ + __unreachable(); rtn &= ~MPPC_OK; - return rtn; + return (rtn); } /* Encode length of match. */ Modified: head/sys/net/mppcd.c ============================================================================== --- head/sys/net/mppcd.c Sat Jul 9 00:35:20 2016 (r302475) +++ head/sys/net/mppcd.c Sat Jul 9 02:33:45 2016 (r302476) @@ -170,7 +170,7 @@ int MPPC_Decompress(u_char **src, u_char rtn &= ~MPPC_OK; return (rtn); } - } else { /* NOTREACHED */ + } else { /* This shouldn't happen. */ rtn &= ~MPPC_OK; return (rtn); } From owner-svn-src-all@freebsd.org Sat Jul 9 04:56:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55DAAB84342; Sat, 9 Jul 2016 04:56:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12B621E62; Sat, 9 Jul 2016 04:56:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u694uT7p042943; Sat, 9 Jul 2016 04:56:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u694uTeh042942; Sat, 9 Jul 2016 04:56:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201607090456.u694uTeh042942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 9 Jul 2016 04:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302480 - head/usr.bin/pathchk 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 04:56:30 -0000 Author: eadler Date: Sat Jul 9 04:56:28 2016 New Revision: 302480 URL: https://svnweb.freebsd.org/changeset/base/302480 Log: Add -P to pathchk usage Modified: head/usr.bin/pathchk/pathchk.c Modified: head/usr.bin/pathchk/pathchk.c ============================================================================== --- head/usr.bin/pathchk/pathchk.c Sat Jul 9 03:27:01 2016 (r302479) +++ head/usr.bin/pathchk/pathchk.c Sat Jul 9 04:56:28 2016 (r302480) @@ -89,7 +89,7 @@ static void usage(void) { - fprintf(stderr, "usage: pathchk [-p] pathname ...\n"); + fprintf(stderr, "usage: pathchk [-Pp] pathname ...\n"); exit(1); } From owner-svn-src-all@freebsd.org Sat Jul 9 06:52:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE096B85DE0; Sat, 9 Jul 2016 06:52:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB6E31DCD; Sat, 9 Jul 2016 06:52:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u696qtLI086815; Sat, 9 Jul 2016 06:52:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u696qth2086814; Sat, 9 Jul 2016 06:52:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607090652.u696qth2086814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 9 Jul 2016 06:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302481 - head/usr.bin/mkcsmapper 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 06:52:57 -0000 Author: bapt Date: Sat Jul 9 06:52:55 2016 New Revision: 302481 URL: https://svnweb.freebsd.org/changeset/base/302481 Log: Revert the change from errx/strerror to errc to appease gcc 4.2 Modified: head/usr.bin/mkcsmapper/yacc.y Modified: head/usr.bin/mkcsmapper/yacc.y ============================================================================== --- head/usr.bin/mkcsmapper/yacc.y Sat Jul 9 04:56:28 2016 (r302480) +++ head/usr.bin/mkcsmapper/yacc.y Sat Jul 9 06:52:55 2016 (r302481) @@ -664,7 +664,7 @@ do_mkpv(FILE *in) if (ret && output) unlink(output); /* dump failure */ if (ret) - errc(EXIT_FAILURE, ret, ""); + errx(EXIT_FAILURE, "%s\n", strerror(ret)); } static void From owner-svn-src-all@freebsd.org Sat Jul 9 09:34:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6183B85D72; Sat, 9 Jul 2016 09:34:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6CC4157D; Sat, 9 Jul 2016 09:34:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u699YOLk045736; Sat, 9 Jul 2016 09:34:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u699YOoa045735; Sat, 9 Jul 2016 09:34:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607090934.u699YOoa045735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 09:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302482 - head/sys/dev/ntb/ntb_hw 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 09:34:26 -0000 Author: mav Date: Sat Jul 9 09:34:24 2016 New Revision: 302482 URL: https://svnweb.freebsd.org/changeset/base/302482 Log: Fix NTB_SDOORBELL_LOCKUP workaround. Since SBARxSZ register can be write-once, it can be unusable for disabling the SBAR. For such case also set SBARxBASE to zero to not intersect with config BAR. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 06:52:55 2016 (r302481) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 09:34:24 2016 (r302482) @@ -1673,8 +1673,12 @@ xeon_set_sbar_base_and_limit(struct ntb_ uint32_t base_reg, lmt_reg; bar_get_xlat_params(ntb, idx, &base_reg, NULL, &lmt_reg); - if (idx == regbar) - bar_addr += ntb->b2b_off; + if (idx == regbar) { + if (ntb->b2b_off) + bar_addr += ntb->b2b_off; + else + bar_addr = 0; + } /* * Set limit registers first to avoid an errata where setting the base From owner-svn-src-all@freebsd.org Sat Jul 9 09:47:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A91CAB750AB; Sat, 9 Jul 2016 09:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 607EF1A69; Sat, 9 Jul 2016 09:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u699lBas049713; Sat, 9 Jul 2016 09:47:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u699lBJ6049712; Sat, 9 Jul 2016 09:47:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607090947.u699lBJ6049712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 09:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302483 - head/sys/dev/ntb/ntb_hw 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 09:47:12 -0000 Author: mav Date: Sat Jul 9 09:47:11 2016 New Revision: 302483 URL: https://svnweb.freebsd.org/changeset/base/302483 Log: Remove some dead code found by Clang static analyzer. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 09:34:24 2016 (r302482) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 09:47:11 2016 (r302483) @@ -1352,8 +1352,6 @@ ntb_get_msix_info(struct ntb_softc *ntb) dinfo = device_get_ivars(ntb->device); msix = &dinfo->cfg.msix; - laddr = data = 0; - CTASSERT(XEON_NONLINK_DB_MSIX_BITS == nitems(ntb->msix_data)); for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { @@ -2587,13 +2585,10 @@ ntb_sysctl_init(struct ntb_softc *ntb) static int sysctl_handle_features(SYSCTL_HANDLER_ARGS) { - struct ntb_softc *ntb; + struct ntb_softc *ntb = arg1; struct sbuf sb; int error; - error = 0; - ntb = arg1; - sbuf_new_for_sysctl(&sb, NULL, 256, req); sbuf_printf(&sb, "%b", ntb->features, NTB_FEATURES_STR); @@ -2608,13 +2603,10 @@ sysctl_handle_features(SYSCTL_HANDLER_AR static int sysctl_handle_link_admin(SYSCTL_HANDLER_ARGS) { - struct ntb_softc *ntb; + struct ntb_softc *ntb = arg1; unsigned old, new; int error; - error = 0; - ntb = arg1; - old = ntb_link_enabled(ntb); error = SYSCTL_OUT(req, &old, sizeof(old)); @@ -2638,15 +2630,12 @@ sysctl_handle_link_admin(SYSCTL_HANDLER_ static int sysctl_handle_link_status_human(SYSCTL_HANDLER_ARGS) { - struct ntb_softc *ntb; + struct ntb_softc *ntb = arg1; struct sbuf sb; enum ntb_speed speed; enum ntb_width width; int error; - error = 0; - ntb = arg1; - sbuf_new_for_sysctl(&sb, NULL, 32, req); if (ntb_link_is_up(ntb, &speed, &width)) @@ -2666,13 +2655,10 @@ sysctl_handle_link_status_human(SYSCTL_H static int sysctl_handle_link_status(SYSCTL_HANDLER_ARGS) { - struct ntb_softc *ntb; + struct ntb_softc *ntb = arg1; unsigned res; int error; - error = 0; - ntb = arg1; - res = ntb_link_is_up(ntb, NULL, NULL); error = SYSCTL_OUT(req, &res, sizeof(res)); From owner-svn-src-all@freebsd.org Sat Jul 9 11:20:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60A13B83ED0; Sat, 9 Jul 2016 11:20:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02FBE1F58; Sat, 9 Jul 2016 11:20:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BKhXi082782; Sat, 9 Jul 2016 11:20:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BKhPU082778; Sat, 9 Jul 2016 11:20:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091120.u69BKhPU082778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302484 - in head/sys: conf dev/ntb dev/ntb/if_ntb dev/ntb/ntb_hw modules/ntb modules/ntb/ntb modules/ntb/ntb_hw modules/ntb/ntb_transport 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:20:44 -0000 Author: mav Date: Sat Jul 9 11:20:42 2016 New Revision: 302484 URL: https://svnweb.freebsd.org/changeset/base/302484 Log: NewBus'ify NTB subsystem. This follows NTB subsystem modularization in Linux, tuning it to FreeBSD native NewBus interfaces. This change allows to support different types of hardware with different drivers, support multiple NTB instances in a system, ntb_transport module use for needs other then if_ntb, etc. Sponsored by: iXsystems, Inc. Added: head/sys/dev/ntb/ntb.c (contents, props changed) head/sys/dev/ntb/ntb.h (contents, props changed) head/sys/dev/ntb/ntb_if.m (contents, props changed) head/sys/dev/ntb/ntb_transport.c - copied, changed from r302483, head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_transport.h (contents, props changed) head/sys/modules/ntb/ntb/ head/sys/modules/ntb/ntb/Makefile (contents, props changed) head/sys/modules/ntb/ntb_transport/ head/sys/modules/ntb/ntb_transport/Makefile (contents, props changed) Deleted: head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h head/sys/modules/ntb/Makefile head/sys/modules/ntb/ntb_hw/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sat Jul 9 09:47:11 2016 (r302483) +++ head/sys/conf/files.amd64 Sat Jul 9 11:20:42 2016 (r302484) @@ -282,7 +282,10 @@ dev/hyperv/vmbus/amd64/hyperv_machdep.c dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb -dev/ntb/ntb_hw/ntb_hw.c optional if_ntb | ntb_hw +dev/ntb/ntb_transport.c optional if_ntb +dev/ntb/ntb.c optional if_ntb | ntb_hw +dev/ntb/ntb_if.m optional if_ntb | ntb_hw +dev/ntb/ntb_hw/ntb_hw.c optional ntb_hw dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme dev/nvme/nvme_ctrlr.c optional nvme Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sat Jul 9 09:47:11 2016 (r302483) +++ head/sys/conf/files.i386 Sat Jul 9 11:20:42 2016 (r302484) @@ -276,7 +276,10 @@ dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb -dev/ntb/ntb_hw/ntb_hw.c optional if_ntb | ntb_hw +dev/ntb/ntb_transport.c optional if_ntb +dev/ntb/ntb.c optional if_ntb | ntb_hw +dev/ntb/ntb_if.m optional if_ntb | ntb_hw +dev/ntb/ntb_hw/ntb_hw.c optional ntb_hw dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme dev/nvme/nvme_ctrlr.c optional nvme Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 09:47:11 2016 (r302483) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 11:20:42 2016 (r302484) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2016 Alexander Motin * Copyright (C) 2013 Intel Corporation * Copyright (C) 2015 EMC Corporation * All rights reserved. @@ -25,25 +26,28 @@ * SUCH DAMAGE. */ +/* + * The Non-Transparent Bridge (NTB) is a device that allows you to connect + * two or more systems using a PCI-e links, providing remote memory access. + * + * This module contains a driver for simulated Ethernet device, using + * underlying NTB Transport device. + * + * NOTE: Much of the code in this module is shared with Linux. Any patches may + * be picked up and redistributed in Linux with a dual GPL/BSD license. + */ + #include __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include -#include -#include #include -#include -#include #include #include -#include -#include #include #include @@ -52,249 +56,24 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - #include -#include - -#include -#include -#include "../ntb_hw/ntb_hw.h" - -/* - * The Non-Transparent Bridge (NTB) is a device on some Intel processors that - * allows you to connect two systems using a PCI-e link. - * - * This module contains a protocol for sending and receiving messages, and - * exposes that protocol through a simulated ethernet device called ntb. - * - * NOTE: Much of the code in this module is shared with Linux. Any patches may - * be picked up and redistributed in Linux with a dual GPL/BSD license. - */ - -#define QP_SETSIZE 64 -BITSET_DEFINE(_qpset, QP_SETSIZE); -#define test_bit(pos, addr) BIT_ISSET(QP_SETSIZE, (pos), (addr)) -#define set_bit(pos, addr) BIT_SET(QP_SETSIZE, (pos), (addr)) -#define clear_bit(pos, addr) BIT_CLR(QP_SETSIZE, (pos), (addr)) -#define ffs_bit(addr) BIT_FFS(QP_SETSIZE, (addr)) +#include "../ntb_transport.h" #define KTR_NTB KTR_SPARE3 -#define NTB_TRANSPORT_VERSION 4 -#define NTB_RX_MAX_PKTS 64 -#define NTB_RXQ_SIZE 300 - -enum ntb_link_event { - NTB_LINK_DOWN = 0, - NTB_LINK_UP, -}; - -static SYSCTL_NODE(_hw, OID_AUTO, if_ntb, CTLFLAG_RW, 0, "if_ntb"); - -static unsigned g_if_ntb_debug_level; -SYSCTL_UINT(_hw_if_ntb, OID_AUTO, debug_level, CTLFLAG_RWTUN, - &g_if_ntb_debug_level, 0, "if_ntb log level -- higher is more verbose"); -#define ntb_printf(lvl, ...) do { \ - if ((lvl) <= g_if_ntb_debug_level) { \ - if_printf(nt->ifp, __VA_ARGS__); \ - } \ -} while (0) - -static unsigned transport_mtu = IP_MAXPACKET + ETHER_HDR_LEN + ETHER_CRC_LEN; - -static uint64_t max_mw_size; -SYSCTL_UQUAD(_hw_if_ntb, OID_AUTO, max_mw_size, CTLFLAG_RDTUN, &max_mw_size, 0, - "If enabled (non-zero), limit the size of large memory windows. " - "Both sides of the NTB MUST set the same value here."); - -static unsigned max_num_clients; -SYSCTL_UINT(_hw_if_ntb, OID_AUTO, max_num_clients, CTLFLAG_RDTUN, - &max_num_clients, 0, "Maximum number of NTB transport clients. " - "0 (default) - use all available NTB memory windows; " - "positive integer N - Limit to N memory windows."); - -static unsigned enable_xeon_watchdog; -SYSCTL_UINT(_hw_if_ntb, OID_AUTO, enable_xeon_watchdog, CTLFLAG_RDTUN, - &enable_xeon_watchdog, 0, "If non-zero, write a register every second to " - "keep a watchdog from tearing down the NTB link"); - -STAILQ_HEAD(ntb_queue_list, ntb_queue_entry); - -typedef uint32_t ntb_q_idx_t; - -struct ntb_queue_entry { - /* ntb_queue list reference */ - STAILQ_ENTRY(ntb_queue_entry) entry; - - /* info on data to be transferred */ - void *cb_data; - void *buf; - uint32_t len; - uint32_t flags; - - struct ntb_transport_qp *qp; - struct ntb_payload_header *x_hdr; - ntb_q_idx_t index; -}; - -struct ntb_rx_info { - ntb_q_idx_t entry; -}; - -struct ntb_transport_qp { - struct ntb_transport_ctx *transport; - struct ntb_softc *ntb; - - void *cb_data; - - bool client_ready; - volatile bool link_is_up; - uint8_t qp_num; /* Only 64 QPs are allowed. 0-63 */ - - struct ntb_rx_info *rx_info; - struct ntb_rx_info *remote_rx_info; - - void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data, - void *data, int len); - struct ntb_queue_list tx_free_q; - struct mtx ntb_tx_free_q_lock; - caddr_t tx_mw; - bus_addr_t tx_mw_phys; - ntb_q_idx_t tx_index; - ntb_q_idx_t tx_max_entry; - uint64_t tx_max_frame; - - void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, - void *data, int len); - struct ntb_queue_list rx_post_q; - struct ntb_queue_list rx_pend_q; - /* ntb_rx_q_lock: synchronize access to rx_XXXX_q */ - struct mtx ntb_rx_q_lock; - struct task rx_completion_task; - struct task rxc_db_work; - caddr_t rx_buff; - ntb_q_idx_t rx_index; - ntb_q_idx_t rx_max_entry; - uint64_t rx_max_frame; - - void (*event_handler)(void *data, enum ntb_link_event status); - struct callout link_work; - struct callout queue_full; - struct callout rx_full; - - uint64_t last_rx_no_buf; - - /* Stats */ - uint64_t rx_bytes; - uint64_t rx_pkts; - uint64_t rx_ring_empty; - uint64_t rx_err_no_buf; - uint64_t rx_err_oflow; - uint64_t rx_err_ver; - uint64_t tx_bytes; - uint64_t tx_pkts; - uint64_t tx_ring_full; - uint64_t tx_err_no_buf; -}; - -struct ntb_queue_handlers { - void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, - void *data, int len); - void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data, - void *data, int len); - void (*event_handler)(void *data, enum ntb_link_event status); -}; - -struct ntb_transport_mw { - vm_paddr_t phys_addr; - size_t phys_size; - size_t xlat_align; - size_t xlat_align_size; - bus_addr_t addr_limit; - /* Tx buff is off vbase / phys_addr */ - caddr_t vbase; - size_t xlat_size; - size_t buff_size; - /* Rx buff is off virt_addr / dma_addr */ - caddr_t virt_addr; - bus_addr_t dma_addr; -}; - -struct ntb_transport_ctx { - struct ntb_softc *ntb; +struct ntb_net_ctx { + device_t *dev; struct ifnet *ifp; - struct ntb_transport_mw mw_vec[NTB_MAX_NUM_MW]; - struct ntb_transport_qp *qp_vec; - struct _qpset qp_bitmap; - struct _qpset qp_bitmap_free; - unsigned mw_count; - unsigned qp_count; - volatile bool link_is_up; - struct callout link_work; - struct callout link_watchdog; - struct task link_cleanup; - uint64_t bufsize; + struct ntb_transport_qp *qp; u_char eaddr[ETHER_ADDR_LEN]; struct mtx tx_lock; - struct mtx rx_lock; - - /* The hardcoded single queuepair in ntb_setup_interface() */ - struct ntb_transport_qp *qp; -}; - -static struct ntb_transport_ctx net_softc; - -enum { - IF_NTB_DESC_DONE_FLAG = 1 << 0, - IF_NTB_LINK_DOWN_FLAG = 1 << 1, -}; - -struct ntb_payload_header { - ntb_q_idx_t ver; - uint32_t len; - uint32_t flags; -}; - -enum { - /* - * The order of this enum is part of the if_ntb remote protocol. Do - * not reorder without bumping protocol version (and it's probably best - * to keep the protocol in lock-step with the Linux NTB driver. - */ - IF_NTB_VERSION = 0, - IF_NTB_QP_LINKS, - IF_NTB_NUM_QPS, - IF_NTB_NUM_MWS, - /* - * N.B.: transport_link_work assumes MW1 enums = MW0 + 2. - */ - IF_NTB_MW0_SZ_HIGH, - IF_NTB_MW0_SZ_LOW, - IF_NTB_MW1_SZ_HIGH, - IF_NTB_MW1_SZ_LOW, - IF_NTB_MAX_SPAD, - - /* - * Some NTB-using hardware have a watchdog to work around NTB hangs; if - * a register or doorbell isn't written every few seconds, the link is - * torn down. Write an otherwise unused register every few seconds to - * work around this watchdog. - */ - IF_NTB_WATCHDOG_SPAD = 15 + struct callout queue_full; }; -CTASSERT(IF_NTB_WATCHDOG_SPAD < XEON_SPAD_COUNT && - IF_NTB_WATCHDOG_SPAD < ATOM_SPAD_COUNT); -#define QP_TO_MW(nt, qp) ((qp) % nt->mw_count) -#define NTB_QP_DEF_NUM_ENTRIES 100 -#define NTB_LINK_DOWN_TIMEOUT 10 - -static int ntb_handle_module_events(struct module *m, int what, void *arg); -static int ntb_setup_interface(void); -static int ntb_teardown_interface(void); +static int ntb_net_probe(device_t dev); +static int ntb_net_attach(device_t dev); +static int ntb_net_detach(device_t dev); static void ntb_net_init(void *arg); static int ntb_ioctl(struct ifnet *ifp, u_long command, caddr_t data); static void ntb_start(struct ifnet *ifp); @@ -303,165 +82,72 @@ static void ntb_net_tx_handler(struct nt static void ntb_net_rx_handler(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); static void ntb_net_event_handler(void *data, enum ntb_link_event status); -static int ntb_transport_probe(struct ntb_softc *ntb); -static void ntb_transport_free(struct ntb_transport_ctx *); -static void ntb_transport_init_queue(struct ntb_transport_ctx *nt, - unsigned int qp_num); -static void ntb_transport_free_queue(struct ntb_transport_qp *qp); -static struct ntb_transport_qp *ntb_transport_create_queue(void *data, - struct ntb_softc *pdev, const struct ntb_queue_handlers *handlers); -static void ntb_transport_link_up(struct ntb_transport_qp *qp); -static int ntb_transport_tx_enqueue(struct ntb_transport_qp *qp, void *cb, - void *data, unsigned int len); -static int ntb_process_tx(struct ntb_transport_qp *qp, - struct ntb_queue_entry *entry); -static void ntb_memcpy_tx(struct ntb_transport_qp *qp, - struct ntb_queue_entry *entry, void *offset); static void ntb_qp_full(void *arg); -static void ntb_transport_rxc_db(void *arg, int pending); -static int ntb_process_rxc(struct ntb_transport_qp *qp); -static void ntb_memcpy_rx(struct ntb_transport_qp *qp, - struct ntb_queue_entry *entry, void *offset); -static inline void ntb_rx_copy_callback(struct ntb_transport_qp *qp, - void *data); -static void ntb_complete_rxc(void *arg, int pending); -static void ntb_transport_doorbell_callback(void *data, uint32_t vector); -static void ntb_transport_event_callback(void *data); -static void ntb_transport_link_work(void *arg); -static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, size_t size); -static void ntb_free_mw(struct ntb_transport_ctx *nt, int num_mw); -static int ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, - unsigned int qp_num); -static void ntb_qp_link_work(void *arg); -static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt); -static void ntb_transport_link_cleanup_work(void *, int); -static void ntb_qp_link_down(struct ntb_transport_qp *qp); -static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp); -static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp); -static void ntb_transport_link_down(struct ntb_transport_qp *qp); -static void ntb_send_link_down(struct ntb_transport_qp *qp); -static void ntb_list_add(struct mtx *lock, struct ntb_queue_entry *entry, - struct ntb_queue_list *list); -static struct ntb_queue_entry *ntb_list_rm(struct mtx *lock, - struct ntb_queue_list *list); -static struct ntb_queue_entry *ntb_list_mv(struct mtx *lock, - struct ntb_queue_list *from, struct ntb_queue_list *to); static void create_random_local_eui48(u_char *eaddr); -static unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp); -static void xeon_link_watchdog_hb(void *); - -static const struct ntb_ctx_ops ntb_transport_ops = { - .link_event = ntb_transport_event_callback, - .db_event = ntb_transport_doorbell_callback, -}; - -MALLOC_DEFINE(M_NTB_IF, "if_ntb", "ntb network driver"); - -static inline void -iowrite32(uint32_t val, void *addr) -{ - - bus_space_write_4(X86_BUS_SPACE_MEM, 0/* HACK */, (uintptr_t)addr, - val); -} -/* Module setup and teardown */ static int -ntb_handle_module_events(struct module *m, int what, void *arg) +ntb_net_probe(device_t dev) { - int err = 0; - switch (what) { - case MOD_LOAD: - err = ntb_setup_interface(); - break; - case MOD_UNLOAD: - err = ntb_teardown_interface(); - break; - default: - err = EOPNOTSUPP; - break; - } - return (err); + device_set_desc(dev, "NTB Network Interface"); + return (0); } -static moduledata_t if_ntb_mod = { - "if_ntb", - ntb_handle_module_events, - NULL -}; - -DECLARE_MODULE(if_ntb, if_ntb_mod, SI_SUB_KLD, SI_ORDER_ANY); -MODULE_DEPEND(if_ntb, ntb_hw, 1, 1, 1); - static int -ntb_setup_interface(void) +ntb_net_attach(device_t dev) { + struct ntb_net_ctx *sc = device_get_softc(dev); struct ifnet *ifp; struct ntb_queue_handlers handlers = { ntb_net_rx_handler, ntb_net_tx_handler, ntb_net_event_handler }; - int rc; - net_softc.ntb = devclass_get_softc(devclass_find("ntb_hw"), 0); - if (net_softc.ntb == NULL) { - printf("ntb: Cannot find devclass\n"); - return (ENXIO); - } - - ifp = net_softc.ifp = if_alloc(IFT_ETHER); + ifp = sc->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - ntb_transport_free(&net_softc); printf("ntb: Cannot allocate ifnet structure\n"); return (ENOMEM); } - if_initname(ifp, "ntb", 0); + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - rc = ntb_transport_probe(net_softc.ntb); - if (rc != 0) { - printf("ntb: Cannot init transport: %d\n", rc); - if_free(net_softc.ifp); - return (rc); - } + mtx_init(&sc->tx_lock, "ntb tx", NULL, MTX_DEF); + callout_init(&sc->queue_full, 1); - net_softc.qp = ntb_transport_create_queue(ifp, net_softc.ntb, + sc->qp = ntb_transport_create_queue(ifp, device_get_parent(dev), &handlers); ifp->if_init = ntb_net_init; - ifp->if_softc = &net_softc; + ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ntb_ioctl; ifp->if_start = ntb_start; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - create_random_local_eui48(net_softc.eaddr); - ether_ifattach(ifp, net_softc.eaddr); + create_random_local_eui48(sc->eaddr); + ether_ifattach(ifp, sc->eaddr); ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_JUMBO_MTU; ifp->if_capenable = ifp->if_capabilities; - ifp->if_mtu = ntb_transport_max_size(net_softc.qp) - ETHER_HDR_LEN - + ifp->if_mtu = ntb_transport_max_size(sc->qp) - ETHER_HDR_LEN - ETHER_CRC_LEN; - ntb_transport_link_up(net_softc.qp); - net_softc.bufsize = ntb_transport_max_size(net_softc.qp) + - sizeof(struct ether_header); + ntb_transport_link_up(sc->qp); return (0); } static int -ntb_teardown_interface(void) +ntb_net_detach(device_t dev) { + struct ntb_net_ctx *sc = device_get_softc(dev); - if (net_softc.qp != NULL) { - ntb_transport_link_down(net_softc.qp); - - ntb_transport_free_queue(net_softc.qp); - ntb_transport_free(&net_softc); + if (sc->qp != NULL) { + ntb_transport_link_down(sc->qp); + ntb_transport_free_queue(sc->qp); } - if (net_softc.ifp != NULL) { - ether_ifdetach(net_softc.ifp); - if_free(net_softc.ifp); - net_softc.ifp = NULL; + if (sc->ifp != NULL) { + ether_ifdetach(sc->ifp); + if_free(sc->ifp); + sc->ifp = NULL; } + mtx_destroy(&sc->tx_lock); return (0); } @@ -471,8 +157,8 @@ ntb_teardown_interface(void) static void ntb_net_init(void *arg) { - struct ntb_transport_ctx *ntb_softc = arg; - struct ifnet *ifp = ntb_softc->ifp; + struct ntb_net_ctx *sc = arg; + struct ifnet *ifp = sc->ifp; ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -483,14 +169,14 @@ ntb_net_init(void *arg) static int ntb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { - struct ntb_transport_ctx *nt = ifp->if_softc; + struct ntb_net_ctx *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; int error = 0; switch (command) { case SIOCSIFMTU: { - if (ifr->ifr_mtu > ntb_transport_max_size(nt->qp) - + if (ifr->ifr_mtu > ntb_transport_max_size(sc->qp) - ETHER_HDR_LEN - ETHER_CRC_LEN) { error = EINVAL; break; @@ -512,16 +198,16 @@ static void ntb_start(struct ifnet *ifp) { struct mbuf *m_head; - struct ntb_transport_ctx *nt = ifp->if_softc; + struct ntb_net_ctx *sc = ifp->if_softc; int rc; - mtx_lock(&nt->tx_lock); + mtx_lock(&sc->tx_lock); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; CTR0(KTR_NTB, "TX: ntb_start"); while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); CTR1(KTR_NTB, "TX: start mbuf %p", m_head); - rc = ntb_transport_tx_enqueue(nt->qp, m_head, m_head, + rc = ntb_transport_tx_enqueue(sc->qp, m_head, m_head, m_length(m_head, NULL)); if (rc != 0) { CTR1(KTR_NTB, @@ -530,14 +216,13 @@ ntb_start(struct ifnet *ifp) if (rc == EAGAIN) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - callout_reset(&nt->qp->queue_full, hz / 1000, + callout_reset(&sc->queue_full, hz / 1000, ntb_qp_full, ifp); } break; } - } - mtx_unlock(&nt->tx_lock); + mtx_unlock(&sc->tx_lock); } /* Network Device Callbacks */ @@ -558,6 +243,7 @@ ntb_net_rx_handler(struct ntb_transport_ struct ifnet *ifp = qp_data; CTR0(KTR_NTB, "RX: rx handler"); + m->m_pkthdr.csum_flags = CSUM_IP_CHECKED | CSUM_IP_VALID; (*ifp->if_input)(ifp, m); } @@ -581,444 +267,6 @@ ntb_net_event_handler(void *data, enum n } } -/* Transport Init and teardown */ - -static void -xeon_link_watchdog_hb(void *arg) -{ - struct ntb_transport_ctx *nt; - - nt = arg; - ntb_spad_write(nt->ntb, IF_NTB_WATCHDOG_SPAD, 0); - callout_reset(&nt->link_watchdog, 1 * hz, xeon_link_watchdog_hb, nt); -} - -static int -ntb_transport_probe(struct ntb_softc *ntb) -{ - struct ntb_transport_ctx *nt = &net_softc; - struct ntb_transport_mw *mw; - uint64_t qp_bitmap; - int rc; - unsigned i; - - nt->mw_count = ntb_mw_count(ntb); - for (i = 0; i < nt->mw_count; i++) { - mw = &nt->mw_vec[i]; - - rc = ntb_mw_get_range(ntb, i, &mw->phys_addr, &mw->vbase, - &mw->phys_size, &mw->xlat_align, &mw->xlat_align_size, - &mw->addr_limit); - if (rc != 0) - goto err; - - mw->buff_size = 0; - mw->xlat_size = 0; - mw->virt_addr = NULL; - mw->dma_addr = 0; - - rc = ntb_mw_set_wc(nt->ntb, i, VM_MEMATTR_WRITE_COMBINING); - if (rc) - ntb_printf(0, "Unable to set mw%d caching\n", i); - } - - qp_bitmap = ntb_db_valid_mask(ntb); - nt->qp_count = flsll(qp_bitmap); - KASSERT(nt->qp_count != 0, ("bogus db bitmap")); - nt->qp_count -= 1; - - if (max_num_clients != 0 && max_num_clients < nt->qp_count) - nt->qp_count = max_num_clients; - else if (nt->mw_count < nt->qp_count) - nt->qp_count = nt->mw_count; - KASSERT(nt->qp_count <= QP_SETSIZE, ("invalid qp_count")); - - mtx_init(&nt->tx_lock, "ntb transport tx", NULL, MTX_DEF); - mtx_init(&nt->rx_lock, "ntb transport rx", NULL, MTX_DEF); - - nt->qp_vec = malloc(nt->qp_count * sizeof(*nt->qp_vec), M_NTB_IF, - M_WAITOK | M_ZERO); - - for (i = 0; i < nt->qp_count; i++) { - set_bit(i, &nt->qp_bitmap); - set_bit(i, &nt->qp_bitmap_free); - ntb_transport_init_queue(nt, i); - } - - callout_init(&nt->link_work, 0); - callout_init(&nt->link_watchdog, 0); - TASK_INIT(&nt->link_cleanup, 0, ntb_transport_link_cleanup_work, nt); - - rc = ntb_set_ctx(ntb, nt, &ntb_transport_ops); - if (rc != 0) - goto err; - - nt->link_is_up = false; - ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); - ntb_link_event(ntb); - - callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); - if (enable_xeon_watchdog != 0) - callout_reset(&nt->link_watchdog, 0, xeon_link_watchdog_hb, nt); - return (0); - -err: - free(nt->qp_vec, M_NTB_IF); - nt->qp_vec = NULL; - return (rc); -} - -static void -ntb_transport_free(struct ntb_transport_ctx *nt) -{ - struct ntb_softc *ntb = nt->ntb; - struct _qpset qp_bitmap_alloc; - uint8_t i; - - ntb_transport_link_cleanup(nt); - taskqueue_drain(taskqueue_swi, &nt->link_cleanup); - callout_drain(&nt->link_work); - callout_drain(&nt->link_watchdog); - - BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &qp_bitmap_alloc); - BIT_NAND(QP_SETSIZE, &qp_bitmap_alloc, &nt->qp_bitmap_free); - - /* Verify that all the QPs are freed */ - for (i = 0; i < nt->qp_count; i++) - if (test_bit(i, &qp_bitmap_alloc)) - ntb_transport_free_queue(&nt->qp_vec[i]); - - ntb_link_disable(ntb); - ntb_clear_ctx(ntb); - - for (i = 0; i < nt->mw_count; i++) - ntb_free_mw(nt, i); - - free(nt->qp_vec, M_NTB_IF); -} - -static void -ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num) -{ - struct ntb_transport_mw *mw; - struct ntb_transport_qp *qp; - vm_paddr_t mw_base; - uint64_t mw_size, qp_offset; - size_t tx_size; - unsigned num_qps_mw, mw_num, mw_count; - - mw_count = nt->mw_count; - mw_num = QP_TO_MW(nt, qp_num); - mw = &nt->mw_vec[mw_num]; - - qp = &nt->qp_vec[qp_num]; - qp->qp_num = qp_num; - qp->transport = nt; - qp->ntb = nt->ntb; - qp->client_ready = false; - qp->event_handler = NULL; - ntb_qp_link_down_reset(qp); - - if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) - num_qps_mw = nt->qp_count / mw_count + 1; - else - num_qps_mw = nt->qp_count / mw_count; - - mw_base = mw->phys_addr; - mw_size = mw->phys_size; - - tx_size = mw_size / num_qps_mw; - qp_offset = tx_size * (qp_num / mw_count); - - qp->tx_mw = mw->vbase + qp_offset; - KASSERT(qp->tx_mw != NULL, ("uh oh?")); - - /* XXX Assumes that a vm_paddr_t is equivalent to bus_addr_t */ - qp->tx_mw_phys = mw_base + qp_offset; - KASSERT(qp->tx_mw_phys != 0, ("uh oh?")); - - tx_size -= sizeof(struct ntb_rx_info); - qp->rx_info = (void *)(qp->tx_mw + tx_size); - - /* Due to house-keeping, there must be at least 2 buffs */ - qp->tx_max_frame = qmin(tx_size / 2, - transport_mtu + sizeof(struct ntb_payload_header)); - qp->tx_max_entry = tx_size / qp->tx_max_frame; - - callout_init(&qp->link_work, 0); - callout_init(&qp->queue_full, 1); - callout_init(&qp->rx_full, 1); - - mtx_init(&qp->ntb_rx_q_lock, "ntb rx q", NULL, MTX_SPIN); - mtx_init(&qp->ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN); - TASK_INIT(&qp->rx_completion_task, 0, ntb_complete_rxc, qp); - TASK_INIT(&qp->rxc_db_work, 0, ntb_transport_rxc_db, qp); - - STAILQ_INIT(&qp->rx_post_q); - STAILQ_INIT(&qp->rx_pend_q); - STAILQ_INIT(&qp->tx_free_q); - - callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); -} - -static void -ntb_transport_free_queue(struct ntb_transport_qp *qp) -{ - struct ntb_queue_entry *entry; - - if (qp == NULL) - return; - - callout_drain(&qp->link_work); - - ntb_db_set_mask(qp->ntb, 1ull << qp->qp_num); - taskqueue_drain(taskqueue_swi, &qp->rxc_db_work); - taskqueue_drain(taskqueue_swi, &qp->rx_completion_task); - - qp->cb_data = NULL; - qp->rx_handler = NULL; - qp->tx_handler = NULL; - qp->event_handler = NULL; - - while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_pend_q))) - free(entry, M_NTB_IF); - - while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_post_q))) - free(entry, M_NTB_IF); - - while ((entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q))) - free(entry, M_NTB_IF); - - set_bit(qp->qp_num, &qp->transport->qp_bitmap_free); -} - -/** - * ntb_transport_create_queue - Create a new NTB transport layer queue - * @rx_handler: receive callback function - * @tx_handler: transmit callback function - * @event_handler: event callback function - * - * Create a new NTB transport layer queue and provide the queue with a callback - * routine for both transmit and receive. The receive callback routine will be - * used to pass up data when the transport has received it on the queue. The - * transmit callback routine will be called when the transport has completed the - * transmission of the data on the queue and the data is ready to be freed. - * - * RETURNS: pointer to newly created ntb_queue, NULL on error. - */ -static struct ntb_transport_qp * -ntb_transport_create_queue(void *data, struct ntb_softc *ntb, - const struct ntb_queue_handlers *handlers) -{ - struct ntb_queue_entry *entry; - struct ntb_transport_qp *qp; - struct ntb_transport_ctx *nt; - unsigned int free_queue; - int i; - - nt = ntb_get_ctx(ntb, NULL); - KASSERT(nt != NULL, ("bogus")); - - free_queue = ffs_bit(&nt->qp_bitmap); - if (free_queue == 0) - return (NULL); - - /* decrement free_queue to make it zero based */ - free_queue--; - - qp = &nt->qp_vec[free_queue]; - clear_bit(qp->qp_num, &nt->qp_bitmap_free); - qp->cb_data = data; - qp->rx_handler = handlers->rx_handler; - qp->tx_handler = handlers->tx_handler; - qp->event_handler = handlers->event_handler; - - for (i = 0; i < NTB_QP_DEF_NUM_ENTRIES; i++) { - entry = malloc(sizeof(*entry), M_NTB_IF, M_WAITOK | M_ZERO); - entry->cb_data = nt->ifp; - entry->buf = NULL; - entry->len = transport_mtu; - ntb_list_add(&qp->ntb_rx_q_lock, entry, &qp->rx_pend_q); - } - - for (i = 0; i < NTB_QP_DEF_NUM_ENTRIES; i++) { - entry = malloc(sizeof(*entry), M_NTB_IF, M_WAITOK | M_ZERO); - ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); - } - - ntb_db_clear(ntb, 1ull << qp->qp_num); - ntb_db_clear_mask(ntb, 1ull << qp->qp_num); - return (qp); -} - -/** - * ntb_transport_link_up - Notify NTB transport of client readiness to use queue - * @qp: NTB transport layer queue to be enabled - * - * Notify NTB transport layer of client readiness to use queue - */ -static void -ntb_transport_link_up(struct ntb_transport_qp *qp) -{ - struct ntb_transport_ctx *nt; - - if (qp == NULL) - return; - - qp->client_ready = true; - - nt = qp->transport; - ntb_printf(2, "qp client ready\n"); - - if (qp->transport->link_is_up) - callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); -} - - - -/* Transport Tx */ - -/** - * ntb_transport_tx_enqueue - Enqueue a new NTB queue entry - * @qp: NTB transport layer queue the entry is to be enqueued on - * @cb: per buffer pointer for callback function to use - * @data: pointer to data buffer that will be sent - * @len: length of the data buffer - * - * Enqueue a new transmit buffer onto the transport queue from which a NTB - * payload will be transmitted. This assumes that a lock is being held to - * serialize access to the qp. - * - * RETURNS: An appropriate ERRNO error value on error, or zero for success. - */ -static int -ntb_transport_tx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data, - unsigned int len) -{ - struct ntb_queue_entry *entry; - int rc; - - if (qp == NULL || !qp->link_is_up || len == 0) { - CTR0(KTR_NTB, "TX: link not up"); - return (EINVAL); - } - - entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q); - if (entry == NULL) { - CTR0(KTR_NTB, "TX: could not get entry from tx_free_q"); - qp->tx_err_no_buf++; - return (EBUSY); - } - CTR1(KTR_NTB, "TX: got entry %p from tx_free_q", entry); - - entry->cb_data = cb; - entry->buf = data; - entry->len = len; - entry->flags = 0; - - rc = ntb_process_tx(qp, entry); - if (rc != 0) { - ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); - CTR1(KTR_NTB, - "TX: process_tx failed. Returning entry %p to tx_free_q", - entry); - } - return (rc); -} - -static int -ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry) -{ - void *offset; - - offset = qp->tx_mw + qp->tx_max_frame * qp->tx_index; - CTR3(KTR_NTB, - "TX: process_tx: tx_pkts=%lu, tx_index=%u, remote entry=%u", - qp->tx_pkts, qp->tx_index, qp->remote_rx_info->entry); - if (qp->tx_index == qp->remote_rx_info->entry) { - CTR0(KTR_NTB, "TX: ring full"); - qp->tx_ring_full++; - return (EAGAIN); - } - - if (entry->len > qp->tx_max_frame - sizeof(struct ntb_payload_header)) { - if (qp->tx_handler != NULL) - qp->tx_handler(qp, qp->cb_data, entry->buf, - EIO); - else - m_freem(entry->buf); - - entry->buf = NULL; - ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); - CTR1(KTR_NTB, - "TX: frame too big. returning entry %p to tx_free_q", - entry); - return (0); - } - CTR2(KTR_NTB, "TX: copying entry %p to offset %p", entry, offset); - ntb_memcpy_tx(qp, entry, offset); - - qp->tx_index++; - qp->tx_index %= qp->tx_max_entry; - - qp->tx_pkts++; - - return (0); -} - -static void -ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, - void *offset) -{ - struct ntb_payload_header *hdr; - - /* This piece is from Linux' ntb_async_tx() */ - hdr = (struct ntb_payload_header *)((char *)offset + qp->tx_max_frame - - sizeof(struct ntb_payload_header)); - entry->x_hdr = hdr; - iowrite32(entry->len, &hdr->len); - iowrite32(qp->tx_pkts, &hdr->ver); - - /* This piece is ntb_memcpy_tx() */ - CTR2(KTR_NTB, "TX: copying %d bytes to offset %p", entry->len, offset); - if (entry->buf != NULL) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 9 11:22:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BCE3B83F42; Sat, 9 Jul 2016 11:22:12 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C73B142B; Sat, 9 Jul 2016 11:22:12 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BMBEt086121; Sat, 9 Jul 2016 11:22:11 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BMBnD086120; Sat, 9 Jul 2016 11:22:11 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201607091122.u69BMBnD086120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sat, 9 Jul 2016 11:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302485 - head/share/misc 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:22:12 -0000 Author: tcberner (ports committer) Date: Sat Jul 9 11:22:11 2016 New Revision: 302485 URL: https://svnweb.freebsd.org/changeset/base/302485 Log: Add myself (tcberner) as ports committer, and update mentor/mentee relationships. Approved by: rakuco (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sat Jul 9 11:20:42 2016 (r302484) +++ head/share/misc/committers-ports.dot Sat Jul 9 11:22:11 2016 (r302485) @@ -216,6 +216,7 @@ sunpoet [label="Po-Chuan Hsieh\nsunpoet@ swills [label="Steve Wills\nswills@FreeBSD.org\n2010/09/03"] sylvio [label="Sylvio Cesar Teixeira\nsylvio@FreeBSD.org\n2009/10/29"] tabthorpe [label="Thomas Abthorpe\ntabthorpe@FreeBSD.org\n2007/08/20"] +tcberner [label="Tobias C. Berner\ntcberner@FreeBSD.org\n2016/07/06"] tdb [label="Tim Bishop\ntdb@FreeBSD.org\n2005/11/30"] thierry [label="Thierry Thomas\nthierry@FreeBSD.org\n2004/03/15"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2013/03/27"] @@ -465,6 +466,7 @@ makc -> rakuco mat -> bmah mat -> dvl mat -> gordon +mat -> tcberner mat -> thierry mat -> woodsb02 @@ -538,6 +540,7 @@ pi -> tz rafan -> chinsan rakuco -> alonso +rakuco -> tcberner rene -> bar rene -> cmt From owner-svn-src-all@freebsd.org Sat Jul 9 11:36:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9C6AB8441D; Sat, 9 Jul 2016 11:36:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89EBE1AAC; Sat, 9 Jul 2016 11:36:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69Ba9ur090228; Sat, 9 Jul 2016 11:36:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69Ba9tE090227; Sat, 9 Jul 2016 11:36:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091136.u69Ba9tE090227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302486 - head/sys/dev/ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:36:10 -0000 Author: mav Date: Sat Jul 9 11:36:09 2016 New Revision: 302486 URL: https://svnweb.freebsd.org/changeset/base/302486 Log: Fix operation with multiple qps. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:22:11 2016 (r302485) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:36:09 2016 (r302486) @@ -470,7 +470,7 @@ ntb_transport_init_queue(struct ntb_tran qp->event_handler = NULL; ntb_qp_link_down_reset(qp); - if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) + if (mw_num < nt->qp_count % mw_count) num_qps_mw = nt->qp_count / mw_count + 1; else num_qps_mw = nt->qp_count / mw_count; @@ -567,7 +567,7 @@ ntb_transport_create_queue(void *data, d unsigned int free_queue; int i; - free_queue = ffs_bit(&nt->qp_bitmap); + free_queue = ffs_bit(&nt->qp_bitmap_free); if (free_queue == 0) return (NULL); @@ -612,7 +612,7 @@ ntb_transport_link_up(struct ntb_transpo qp->client_ready = true; - ntb_printf(2, "qp client ready\n"); + ntb_printf(2, "qp %d client ready\n", qp->qp_num); if (nt->link_is_up) callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); @@ -1161,7 +1161,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra if (mw->virt_addr == NULL) return (ENOMEM); - if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) + if (mw_num < nt->qp_count % mw_count) num_qps_mw = nt->qp_count / mw_count + 1; else num_qps_mw = nt->qp_count / mw_count; @@ -1211,7 +1211,7 @@ ntb_qp_link_work(void *arg) /* See if the remote side is up */ if ((val & (1ull << qp->qp_num)) != 0) { - ntb_printf(2, "qp link up\n"); + ntb_printf(2, "qp %d link up\n", qp->qp_num); qp->link_is_up = true; if (qp->event_handler != NULL) From owner-svn-src-all@freebsd.org Sat Jul 9 11:41:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066EBB84576; Sat, 9 Jul 2016 11:41:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D22F91DC2; Sat, 9 Jul 2016 11:41:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BexuE090727; Sat, 9 Jul 2016 11:40:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BexT9090726; Sat, 9 Jul 2016 11:40:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091140.u69BexT9090726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302487 - head/sys/dev/ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:41:01 -0000 Author: mav Date: Sat Jul 9 11:40:59 2016 New Revision: 302487 URL: https://svnweb.freebsd.org/changeset/base/302487 Log: Reduce code divergence from Linux, preparing for DMA support. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:36:09 2016 (r302486) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:40:59 2016 (r302487) @@ -264,8 +264,6 @@ static void ntb_transport_init_queue(str unsigned int qp_num); static int ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry); -static void ntb_memcpy_tx(struct ntb_transport_qp *qp, - struct ntb_queue_entry *entry, void *offset); static void ntb_transport_rxc_db(void *arg, int pending); static int ntb_process_rxc(struct ntb_transport_qp *qp); static void ntb_memcpy_rx(struct ntb_transport_qp *qp, @@ -586,11 +584,13 @@ ntb_transport_create_queue(void *data, d entry->cb_data = data; entry->buf = NULL; entry->len = transport_mtu; + entry->qp = qp; ntb_list_add(&qp->ntb_rx_q_lock, entry, &qp->rx_pend_q); } for (i = 0; i < NTB_QP_DEF_NUM_ENTRIES; i++) { entry = malloc(sizeof(*entry), M_NTB_T, M_WAITOK | M_ZERO); + entry->qp = qp; ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); } @@ -672,60 +672,44 @@ ntb_transport_tx_enqueue(struct ntb_tran return (rc); } -static int -ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry) +static void +ntb_tx_copy_callback(void *data) { - void *offset; + struct ntb_queue_entry *entry = data; + struct ntb_transport_qp *qp = entry->qp; + struct ntb_payload_header *hdr = entry->x_hdr; - offset = qp->tx_mw + qp->tx_max_frame * qp->tx_index; - CTR3(KTR_NTB, - "TX: process_tx: tx_pkts=%lu, tx_index=%u, remote entry=%u", - qp->tx_pkts, qp->tx_index, qp->remote_rx_info->entry); - if (qp->tx_index == qp->remote_rx_info->entry) { - CTR0(KTR_NTB, "TX: ring full"); - qp->tx_ring_full++; - return (EAGAIN); - } + iowrite32(entry->flags | NTBT_DESC_DONE_FLAG, &hdr->flags); + CTR1(KTR_NTB, "TX: hdr %p set DESC_DONE", hdr); - if (entry->len > qp->tx_max_frame - sizeof(struct ntb_payload_header)) { - if (qp->tx_handler != NULL) + NTB_PEER_DB_SET(qp->ntb, 1ull << qp->qp_num); + + /* + * The entry length can only be zero if the packet is intended to be a + * "link down" or similar. Since no payload is being sent in these + * cases, there is nothing to add to the completion queue. + */ + if (entry->len > 0) { + qp->tx_bytes += entry->len; + + if (qp->tx_handler) qp->tx_handler(qp, qp->cb_data, entry->buf, - EIO); + entry->len); else m_freem(entry->buf); - entry->buf = NULL; - ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); - CTR1(KTR_NTB, - "TX: frame too big. returning entry %p to tx_free_q", - entry); - return (0); } - CTR2(KTR_NTB, "TX: copying entry %p to offset %p", entry, offset); - ntb_memcpy_tx(qp, entry, offset); - - qp->tx_index++; - qp->tx_index %= qp->tx_max_entry; - qp->tx_pkts++; - - return (0); + CTR3(KTR_NTB, + "TX: entry %p sent. hdr->ver = %u, hdr->flags = 0x%x, Returning " + "to tx_free_q", entry, hdr->ver, hdr->flags); + ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); } static void -ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, - void *offset) +ntb_memcpy_tx(struct ntb_queue_entry *entry, void *offset) { - struct ntb_payload_header *hdr; - - /* This piece is from Linux' ntb_async_tx() */ - hdr = (struct ntb_payload_header *)((char *)offset + qp->tx_max_frame - - sizeof(struct ntb_payload_header)); - entry->x_hdr = hdr; - iowrite32(entry->len, &hdr->len); - iowrite32(qp->tx_pkts, &hdr->ver); - /* This piece is ntb_memcpy_tx() */ CTR2(KTR_NTB, "TX: copying %d bytes to offset %p", entry->len, offset); if (entry->buf != NULL) { m_copydata((struct mbuf *)entry->buf, 0, entry->len, offset); @@ -737,32 +721,62 @@ ntb_memcpy_tx(struct ntb_transport_qp *q wmb(); } - /* The rest is ntb_tx_copy_callback() */ - iowrite32(entry->flags | NTBT_DESC_DONE_FLAG, &hdr->flags); - CTR1(KTR_NTB, "TX: hdr %p set DESC_DONE", hdr); + ntb_tx_copy_callback(entry); +} - NTB_PEER_DB_SET(qp->ntb, 1ull << qp->qp_num); +static void +ntb_async_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry) +{ + struct ntb_payload_header *hdr; + void *offset; - /* - * The entry length can only be zero if the packet is intended to be a - * "link down" or similar. Since no payload is being sent in these - * cases, there is nothing to add to the completion queue. - */ - if (entry->len > 0) { - qp->tx_bytes += entry->len; + offset = qp->tx_mw + qp->tx_max_frame * qp->tx_index; + hdr = (struct ntb_payload_header *)((char *)offset + qp->tx_max_frame - + sizeof(struct ntb_payload_header)); + entry->x_hdr = hdr; - if (qp->tx_handler) + iowrite32(entry->len, &hdr->len); + iowrite32(qp->tx_pkts, &hdr->ver); + + ntb_memcpy_tx(entry, offset); +} + +static int +ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry) +{ + + CTR3(KTR_NTB, + "TX: process_tx: tx_pkts=%lu, tx_index=%u, remote entry=%u", + qp->tx_pkts, qp->tx_index, qp->remote_rx_info->entry); + if (qp->tx_index == qp->remote_rx_info->entry) { + CTR0(KTR_NTB, "TX: ring full"); + qp->tx_ring_full++; + return (EAGAIN); + } + + if (entry->len > qp->tx_max_frame - sizeof(struct ntb_payload_header)) { + if (qp->tx_handler != NULL) qp->tx_handler(qp, qp->cb_data, entry->buf, - entry->len); + EIO); else m_freem(entry->buf); + entry->buf = NULL; + ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); + CTR1(KTR_NTB, + "TX: frame too big. returning entry %p to tx_free_q", + entry); + return (0); } + CTR2(KTR_NTB, "TX: copying entry %p to index %u", entry, qp->tx_index); + ntb_async_tx(qp, entry); - CTR3(KTR_NTB, - "TX: entry %p sent. hdr->ver = %u, hdr->flags = 0x%x, Returning " - "to tx_free_q", entry, hdr->ver, hdr->flags); - ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); + qp->tx_index++; + qp->tx_index %= qp->tx_max_entry; + + qp->tx_pkts++; + + return (0); } /* Transport Rx */ From owner-svn-src-all@freebsd.org Sat Jul 9 11:43:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C83A1B846D7; Sat, 9 Jul 2016 11:43:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 821441255; Sat, 9 Jul 2016 11:43:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BhpkX094057; Sat, 9 Jul 2016 11:43:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69Bhpbi094056; Sat, 9 Jul 2016 11:43:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091143.u69Bhpbi094056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302488 - head/sys/dev/ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:43:52 -0000 Author: mav Date: Sat Jul 9 11:43:51 2016 New Revision: 302488 URL: https://svnweb.freebsd.org/changeset/base/302488 Log: Remove unneeded RX lock, and make TX lock per-qp. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:40:59 2016 (r302487) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:43:51 2016 (r302488) @@ -181,6 +181,8 @@ struct ntb_transport_qp { uint64_t tx_pkts; uint64_t tx_ring_full; uint64_t tx_err_no_buf; + + struct mtx tx_lock; }; struct ntb_transport_mw { @@ -210,8 +212,6 @@ struct ntb_transport_ctx { struct callout link_work; struct callout link_watchdog; struct task link_cleanup; - struct mtx tx_lock; - struct mtx rx_lock; }; enum { @@ -372,9 +372,6 @@ ntb_transport_attach(device_t dev) nt->qp_count = nt->mw_count; KASSERT(nt->qp_count <= QP_SETSIZE, ("invalid qp_count")); - mtx_init(&nt->tx_lock, "ntb transport tx", NULL, MTX_DEF); - mtx_init(&nt->rx_lock, "ntb transport rx", NULL, MTX_DEF); - nt->qp_vec = malloc(nt->qp_count * sizeof(*nt->qp_vec), M_NTB_T, M_WAITOK | M_ZERO); @@ -499,6 +496,7 @@ ntb_transport_init_queue(struct ntb_tran mtx_init(&qp->ntb_rx_q_lock, "ntb rx q", NULL, MTX_SPIN); mtx_init(&qp->ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN); + mtx_init(&qp->tx_lock, "ntb transport tx", NULL, MTX_DEF); TASK_INIT(&qp->rx_completion_task, 0, ntb_complete_rxc, qp); TASK_INIT(&qp->rxc_db_work, 0, ntb_transport_rxc_db, qp); @@ -660,9 +658,9 @@ ntb_transport_tx_enqueue(struct ntb_tran entry->len = len; entry->flags = 0; - mtx_lock(&qp->transport->tx_lock); + mtx_lock(&qp->tx_lock); rc = ntb_process_tx(qp, entry); - mtx_unlock(&qp->transport->tx_lock); + mtx_unlock(&qp->tx_lock); if (rc != 0) { ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); CTR1(KTR_NTB, @@ -792,7 +790,6 @@ ntb_transport_rxc_db(void *arg, int pend * provide fairness to others */ CTR0(KTR_NTB, "RX: transport_rx"); - mtx_lock(&qp->transport->rx_lock); for (i = 0; i < qp->rx_max_entry; i++) { rc = ntb_process_rxc(qp); if (rc != 0) { @@ -800,7 +797,6 @@ ntb_transport_rxc_db(void *arg, int pend break; } } - mtx_unlock(&qp->transport->rx_lock); if (i == qp->rx_max_entry) taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); @@ -1386,11 +1382,11 @@ ntb_send_link_down(struct ntb_transport_ entry->len = 0; entry->flags = NTBT_LINK_DOWN_FLAG; - mtx_lock(&qp->transport->tx_lock); + mtx_lock(&qp->tx_lock); rc = ntb_process_tx(qp, entry); + mtx_unlock(&qp->tx_lock); if (rc != 0) printf("ntb: Failed to send link down\n"); - mtx_unlock(&qp->transport->tx_lock); ntb_qp_link_down_reset(qp); } From owner-svn-src-all@freebsd.org Sat Jul 9 11:45:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE106B84771; Sat, 9 Jul 2016 11:45:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A728E13D0; Sat, 9 Jul 2016 11:45:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BjI0c094176; Sat, 9 Jul 2016 11:45:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BjI0R094175; Sat, 9 Jul 2016 11:45:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091145.u69BjI0R094175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302489 - head/sys/dev/ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:45:20 -0000 Author: mav Date: Sat Jul 9 11:45:18 2016 New Revision: 302489 URL: https://svnweb.freebsd.org/changeset/base/302489 Log: Remove rx_completion_task taskqueue. It is not needed after RX lock removed in previous commit. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:43:51 2016 (r302488) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:45:18 2016 (r302489) @@ -157,7 +157,6 @@ struct ntb_transport_qp { struct ntb_queue_list rx_pend_q; /* ntb_rx_q_lock: synchronize access to rx_XXXX_q */ struct mtx ntb_rx_q_lock; - struct task rx_completion_task; struct task rxc_db_work; caddr_t rx_buff; ntb_q_idx_t rx_index; @@ -270,7 +269,7 @@ static void ntb_memcpy_rx(struct ntb_tra struct ntb_queue_entry *entry, void *offset); static inline void ntb_rx_copy_callback(struct ntb_transport_qp *qp, void *data); -static void ntb_complete_rxc(void *arg, int pending); +static void ntb_complete_rxc(struct ntb_transport_qp *qp); static void ntb_transport_doorbell_callback(void *data, uint32_t vector); static void ntb_transport_event_callback(void *data); static void ntb_transport_link_work(void *arg); @@ -497,7 +496,6 @@ ntb_transport_init_queue(struct ntb_tran mtx_init(&qp->ntb_rx_q_lock, "ntb rx q", NULL, MTX_SPIN); mtx_init(&qp->ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN); mtx_init(&qp->tx_lock, "ntb transport tx", NULL, MTX_DEF); - TASK_INIT(&qp->rx_completion_task, 0, ntb_complete_rxc, qp); TASK_INIT(&qp->rxc_db_work, 0, ntb_transport_rxc_db, qp); STAILQ_INIT(&qp->rx_post_q); @@ -519,7 +517,6 @@ ntb_transport_free_queue(struct ntb_tran NTB_DB_SET_MASK(qp->ntb, 1ull << qp->qp_num); taskqueue_drain(taskqueue_swi, &qp->rxc_db_work); - taskqueue_drain(taskqueue_swi, &qp->rx_completion_task); qp->cb_data = NULL; qp->rx_handler = NULL; @@ -866,7 +863,7 @@ ntb_process_rxc(struct ntb_transport_qp entry->len = -EIO; entry->flags |= NTBT_DESC_DONE_FLAG; - taskqueue_enqueue(taskqueue_swi, &qp->rx_completion_task); + ntb_complete_rxc(qp); } else { qp->rx_bytes += hdr->len; qp->rx_pkts++; @@ -908,13 +905,12 @@ ntb_rx_copy_callback(struct ntb_transpor entry = data; entry->flags |= NTBT_DESC_DONE_FLAG; - taskqueue_enqueue(taskqueue_swi, &qp->rx_completion_task); + ntb_complete_rxc(qp); } static void -ntb_complete_rxc(void *arg, int pending) +ntb_complete_rxc(struct ntb_transport_qp *qp) { - struct ntb_transport_qp *qp = arg; struct ntb_queue_entry *entry; struct mbuf *m; unsigned len; From owner-svn-src-all@freebsd.org Sat Jul 9 11:46:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D121DB84864; Sat, 9 Jul 2016 11:46:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E9715D0; Sat, 9 Jul 2016 11:46:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BkWhd094257; Sat, 9 Jul 2016 11:46:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BkWg7094256; Sat, 9 Jul 2016 11:46:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091146.u69BkWg7094256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302490 - head/sys/dev/ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:46:33 -0000 Author: mav Date: Sat Jul 9 11:46:32 2016 New Revision: 302490 URL: https://svnweb.freebsd.org/changeset/base/302490 Log: Create separate RX taskqueue for each qp. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:45:18 2016 (r302489) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:46:32 2016 (r302490) @@ -158,6 +158,7 @@ struct ntb_transport_qp { /* ntb_rx_q_lock: synchronize access to rx_XXXX_q */ struct mtx ntb_rx_q_lock; struct task rxc_db_work; + struct taskqueue *rxc_tq; caddr_t rx_buff; ntb_q_idx_t rx_index; ntb_q_idx_t rx_max_entry; @@ -200,6 +201,7 @@ struct ntb_transport_mw { }; struct ntb_transport_ctx { + device_t dev; device_t ntb; struct ntb_transport_mw *mw_vec; struct ntb_transport_qp *qp_vec; @@ -337,6 +339,7 @@ ntb_transport_attach(device_t dev) int rc; unsigned i; + nt->dev = dev; nt->ntb = ntb; nt->mw_count = NTB_MW_COUNT(ntb); nt->mw_vec = malloc(nt->mw_count * sizeof(*nt->mw_vec), M_NTB_T, @@ -497,6 +500,10 @@ ntb_transport_init_queue(struct ntb_tran mtx_init(&qp->ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN); mtx_init(&qp->tx_lock, "ntb transport tx", NULL, MTX_DEF); TASK_INIT(&qp->rxc_db_work, 0, ntb_transport_rxc_db, qp); + qp->rxc_tq = taskqueue_create("ntbt_rx", M_WAITOK, + taskqueue_thread_enqueue, &qp->rxc_tq); + taskqueue_start_threads(&qp->rxc_tq, 1, PI_NET, "%s rx%d", + device_get_nameunit(nt->dev), qp_num); STAILQ_INIT(&qp->rx_post_q); STAILQ_INIT(&qp->rx_pend_q); @@ -516,7 +523,8 @@ ntb_transport_free_queue(struct ntb_tran callout_drain(&qp->link_work); NTB_DB_SET_MASK(qp->ntb, 1ull << qp->qp_num); - taskqueue_drain(taskqueue_swi, &qp->rxc_db_work); + taskqueue_drain_all(qp->rxc_tq); + taskqueue_free(qp->rxc_tq); qp->cb_data = NULL; qp->rx_handler = NULL; @@ -779,35 +787,18 @@ static void ntb_transport_rxc_db(void *arg, int pending __unused) { struct ntb_transport_qp *qp = arg; - ntb_q_idx_t i; int rc; - /* - * Limit the number of packets processed in a single interrupt to - * provide fairness to others - */ CTR0(KTR_NTB, "RX: transport_rx"); - for (i = 0; i < qp->rx_max_entry; i++) { - rc = ntb_process_rxc(qp); - if (rc != 0) { - CTR0(KTR_NTB, "RX: process_rxc failed"); - break; - } - } +again: + while ((rc = ntb_process_rxc(qp)) == 0) + ; + CTR1(KTR_NTB, "RX: process_rxc returned %d", rc); - if (i == qp->rx_max_entry) - taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); - else if ((NTB_DB_READ(qp->ntb) & (1ull << qp->qp_num)) != 0) { - /* If db is set, clear it and read it back to commit clear. */ + if ((NTB_DB_READ(qp->ntb) & (1ull << qp->qp_num)) != 0) { + /* If db is set, clear it and check queue once more. */ NTB_DB_CLEAR(qp->ntb, 1ull << qp->qp_num); - (void)NTB_DB_READ(qp->ntb); - - /* - * An interrupt may have arrived between finishing - * ntb_process_rxc and clearing the doorbell bit: there might - * be some more work to do. - */ - taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); + goto again; } } @@ -969,12 +960,14 @@ ntb_transport_doorbell_callback(void *da BIT_NAND(QP_SETSIZE, &db_bits, &nt->qp_bitmap_free); vec_mask = NTB_DB_VECTOR_MASK(nt->ntb, vector); + if ((vec_mask & (vec_mask - 1)) != 0) + vec_mask &= NTB_DB_READ(nt->ntb); while (vec_mask != 0) { qp_num = ffsll(vec_mask) - 1; if (test_bit(qp_num, &db_bits)) { qp = &nt->qp_vec[qp_num]; - taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); + taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); } vec_mask &= ~(1ull << qp_num); @@ -1223,7 +1216,7 @@ ntb_qp_link_work(void *arg) if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_UP); - taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); + taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); } else if (nt->link_is_up) callout_reset(&qp->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp); From owner-svn-src-all@freebsd.org Sat Jul 9 11:47:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9854B84985; Sat, 9 Jul 2016 11:47:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A47E6185D; Sat, 9 Jul 2016 11:47:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BlqIa094511; Sat, 9 Jul 2016 11:47:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69Blquw094510; Sat, 9 Jul 2016 11:47:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091147.u69Blquw094510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302491 - head/sys/dev/ntb/ntb_hw 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:47:53 -0000 Author: mav Date: Sat Jul 9 11:47:52 2016 New Revision: 302491 URL: https://svnweb.freebsd.org/changeset/base/302491 Log: Switch ctx_lock from mutex to rmlock. It is odd idea to serialize different MSI-X vectors. Use of rmlocks here allows them to execute in parallel, but still protects ctx. If upper layers require any additional serialization -- they can do it by themselves. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 11:46:32 2016 (r302490) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 11:47:52 2016 (r302491) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -220,10 +221,7 @@ struct ntb_softc { void *ntb_ctx; const struct ntb_ctx_ops *ctx_ops; struct ntb_vec *msix_vec; -#define CTX_LOCK(sc) mtx_lock(&(sc)->ctx_lock) -#define CTX_UNLOCK(sc) mtx_unlock(&(sc)->ctx_lock) -#define CTX_ASSERT(sc,f) mtx_assert(&(sc)->ctx_lock, (f)) - struct mtx ctx_lock; + struct rmlock ctx_lock; uint32_t ppd; enum ntb_conn_type conn_type; @@ -657,7 +655,7 @@ ntb_attach(device_t device) callout_init(&ntb->lr_timer, 1); callout_init(&ntb->peer_msix_work, 1); mtx_init(&ntb->db_mask_lock, "ntb hw bits", NULL, MTX_SPIN); - mtx_init(&ntb->ctx_lock, "ntb ctx", NULL, MTX_DEF); + rm_init(&ntb->ctx_lock, "ntb ctx"); if (ntb->type == NTB_ATOM) error = ntb_detect_atom(ntb); @@ -720,7 +718,7 @@ ntb_detach(device_t device) ntb_teardown_interrupts(ntb); mtx_destroy(&ntb->db_mask_lock); - mtx_destroy(&ntb->ctx_lock); + rm_destroy(&ntb->ctx_lock); ntb_unmap_pci_bar(ntb); @@ -2012,17 +2010,15 @@ ntb_set_ctx(device_t dev, void *ctx, con if (ctx == NULL || ops == NULL) return (EINVAL); - if (ntb->ctx_ops != NULL) - return (EINVAL); - CTX_LOCK(ntb); + rm_wlock(&ntb->ctx_lock); if (ntb->ctx_ops != NULL) { - CTX_UNLOCK(ntb); + rm_wunlock(&ntb->ctx_lock); return (EINVAL); } ntb->ntb_ctx = ctx; ntb->ctx_ops = ops; - CTX_UNLOCK(ntb); + rm_wunlock(&ntb->ctx_lock); return (0); } @@ -2047,10 +2043,10 @@ ntb_clear_ctx(device_t dev) { struct ntb_softc *ntb = device_get_softc(dev); - CTX_LOCK(ntb); + rm_wlock(&ntb->ctx_lock); ntb->ntb_ctx = NULL; ntb->ctx_ops = NULL; - CTX_UNLOCK(ntb); + rm_wunlock(&ntb->ctx_lock); } /* @@ -2064,11 +2060,12 @@ static void ntb_link_event(device_t dev) { struct ntb_softc *ntb = device_get_softc(dev); + struct rm_priotracker ctx_tracker; - CTX_LOCK(ntb); + rm_rlock(&ntb->ctx_lock, &ctx_tracker); if (ntb->ctx_ops != NULL && ntb->ctx_ops->link_event != NULL) ntb->ctx_ops->link_event(ntb->ntb_ctx); - CTX_UNLOCK(ntb); + rm_runlock(&ntb->ctx_lock, &ctx_tracker); } /* @@ -2088,11 +2085,12 @@ static void ntb_db_event(device_t dev, uint32_t vec) { struct ntb_softc *ntb = device_get_softc(dev); + struct rm_priotracker ctx_tracker; - CTX_LOCK(ntb); + rm_rlock(&ntb->ctx_lock, &ctx_tracker); if (ntb->ctx_ops != NULL && ntb->ctx_ops->db_event != NULL) ntb->ctx_ops->db_event(ntb->ntb_ctx, vec); - CTX_UNLOCK(ntb); + rm_runlock(&ntb->ctx_lock, &ctx_tracker); } static int From owner-svn-src-all@freebsd.org Sat Jul 9 11:48:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE5F8B84A3D; Sat, 9 Jul 2016 11:48:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71EA61A66; Sat, 9 Jul 2016 11:48:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BmvXK094588; Sat, 9 Jul 2016 11:48:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BmvmP094587; Sat, 9 Jul 2016 11:48:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091148.u69BmvmP094587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:48:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302492 - head/sys/dev/ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:48:58 -0000 Author: mav Date: Sat Jul 9 11:48:57 2016 New Revision: 302492 URL: https://svnweb.freebsd.org/changeset/base/302492 Log: Bring some more order into link and qp state handling. Do not touch scratchpad registers until link is reported up. Mask and do not handle doorbell events until respective qp is up. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:47:52 2016 (r302491) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:48:57 2016 (r302492) @@ -508,8 +508,6 @@ ntb_transport_init_queue(struct ntb_tran STAILQ_INIT(&qp->rx_post_q); STAILQ_INIT(&qp->rx_pend_q); STAILQ_INIT(&qp->tx_free_q); - - callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); } void @@ -598,7 +596,6 @@ ntb_transport_create_queue(void *data, d } NTB_DB_CLEAR(ntb, 1ull << qp->qp_num); - NTB_DB_CLEAR_MASK(ntb, 1ull << qp->qp_num); return (qp); } @@ -967,7 +964,8 @@ ntb_transport_doorbell_callback(void *da if (test_bit(qp_num, &db_bits)) { qp = &nt->qp_vec[qp_num]; - taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); + if (qp->link_is_up) + taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); } vec_mask &= ~(1ull << qp_num); @@ -1216,6 +1214,7 @@ ntb_qp_link_work(void *arg) if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_UP); + NTB_DB_CLEAR_MASK(ntb, 1ull << qp->qp_num); taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); } else if (nt->link_is_up) callout_reset(&qp->link_work, @@ -1272,6 +1271,7 @@ ntb_qp_link_down_reset(struct ntb_transp { qp->link_is_up = false; + NTB_DB_SET_MASK(qp->ntb, 1ull << qp->qp_num); qp->tx_index = qp->rx_index = 0; qp->tx_bytes = qp->rx_bytes = 0; @@ -1287,17 +1287,12 @@ ntb_qp_link_down_reset(struct ntb_transp static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp) { - struct ntb_transport_ctx *nt = qp->transport; callout_drain(&qp->link_work); ntb_qp_link_down_reset(qp); if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_DOWN); - - if (nt->link_is_up) - callout_reset(&qp->link_work, - NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp); } /* Link commanded down */ From owner-svn-src-all@freebsd.org Sat Jul 9 11:57:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93FB8B84C20; Sat, 9 Jul 2016 11:57:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E03C119F; Sat, 9 Jul 2016 11:57:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69BvLtU098275; Sat, 9 Jul 2016 11:57:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BvLTd098273; Sat, 9 Jul 2016 11:57:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091157.u69BvLTd098273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302493 - in head/sys/dev/ntb: . ntb_hw 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:57:22 -0000 Author: mav Date: Sat Jul 9 11:57:21 2016 New Revision: 302493 URL: https://svnweb.freebsd.org/changeset/base/302493 Log: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP. This allows at least first three doorbells to work very close to normal hardware, properly signaling events to upper layers without spurious or lost events. Doorbells above the first three may still report spurious events due to lack of reliable information, but they are rarely used. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 11:48:57 2016 (r302492) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 11:57:21 2016 (r302493) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -253,6 +254,7 @@ struct ntb_softc { uint64_t db_valid_mask; uint64_t db_link_mask; uint64_t db_mask; + uint64_t fake_db_bell; /* NTB_SB01BASE_LOCKUP*/ int last_ts; /* ticks @ last irq */ @@ -357,7 +359,6 @@ static void xeon_set_pbar_xlat(struct nt enum ntb_bar idx); static int xeon_setup_b2b_mw(struct ntb_softc *, const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr); -static int xeon_setup_msix_bar(struct ntb_softc *); static inline bool link_is_up(struct ntb_softc *ntb); static inline bool _xeon_link_is_up(struct ntb_softc *ntb); static inline bool atom_link_is_err(struct ntb_softc *ntb); @@ -1193,12 +1194,10 @@ ntb_db_set_mask(device_t dev, uint64_t b { struct ntb_softc *ntb = device_get_softc(dev); - if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) - return; - DB_MASK_LOCK(ntb); ntb->db_mask |= bits; - db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); + if (!HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) + db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); DB_MASK_UNLOCK(ntb); } @@ -1206,18 +1205,26 @@ static void ntb_db_clear_mask(device_t dev, uint64_t bits) { struct ntb_softc *ntb = device_get_softc(dev); + uint64_t ibits; + int i; KASSERT((bits & ~ntb->db_valid_mask) == 0, ("%s: Invalid bits 0x%jx (valid: 0x%jx)", __func__, (uintmax_t)(bits & ~ntb->db_valid_mask), (uintmax_t)ntb->db_valid_mask)); - if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) - return; - DB_MASK_LOCK(ntb); + ibits = ntb->fake_db_bell & ntb->db_mask & bits; ntb->db_mask &= ~bits; - db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); + if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { + /* Simulate fake interrupts if unmasked DB bits are set. */ + for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { + if ((ibits & ntb_db_vector_mask(dev, i)) != 0) + swi_sched(ntb->int_info[i].tag, 0); + } + } else { + db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); + } DB_MASK_UNLOCK(ntb); } @@ -1226,17 +1233,8 @@ ntb_db_read(device_t dev) { struct ntb_softc *ntb = device_get_softc(dev); - if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { - uint64_t res; - unsigned i; - - res = 0; - for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { - if (ntb->msix_vec[i].masked != 0) - res |= ntb_db_vector_mask(dev, i); - } - return (res); - } + if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) + return (ntb->fake_db_bell); return (db_ioread(ntb, ntb->self_reg->db_bell)); } @@ -1252,21 +1250,9 @@ ntb_db_clear(device_t dev, uint64_t bits (uintmax_t)ntb->db_valid_mask)); if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { - unsigned i; - - for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { - if ((bits & ntb_db_vector_mask(dev, i)) != 0) { - DB_MASK_LOCK(ntb); - if (ntb->msix_vec[i].masked != 0) { - /* XXX These need a public API. */ -#if 0 - pci_unmask_msix(ntb->device, i); -#endif - ntb->msix_vec[i].masked = 0; - } - DB_MASK_UNLOCK(ntb); - } - } + DB_MASK_LOCK(ntb); + ntb->fake_db_bell &= ~bits; + DB_MASK_UNLOCK(ntb); return; } @@ -1278,6 +1264,19 @@ ntb_vec_mask(struct ntb_softc *ntb, uint { uint64_t shift, mask; + if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { + /* + * Remap vectors in custom way to make at least first + * three doorbells to not generate stray events. + * This breaks Linux compatibility (if one existed) + * when more then one DB is used (not by if_ntb). + */ + if (db_vector < XEON_NONLINK_DB_MSIX_BITS - 1) + return (1 << db_vector); + if (db_vector == XEON_NONLINK_DB_MSIX_BITS - 1) + return (0x7ffc); + } + shift = ntb->db_vec_shift; mask = (1ull << shift) - 1; return (mask << (shift * db_vector)); @@ -1299,13 +1298,16 @@ ntb_interrupt(struct ntb_softc *ntb, uin if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP) && (vec_mask & ntb->db_link_mask) == 0) { DB_MASK_LOCK(ntb); - if (ntb->msix_vec[vec].masked == 0) { - /* XXX These need a public API. */ -#if 0 - pci_mask_msix(ntb->device, vec); -#endif - ntb->msix_vec[vec].masked = 1; - } + + /* Do not report same DB events again if not cleared yet. */ + vec_mask &= ~ntb->fake_db_bell; + + /* Update our internal doorbell register. */ + ntb->fake_db_bell |= vec_mask; + + /* Do not report masked DB events. */ + vec_mask &= ~ntb->db_mask; + DB_MASK_UNLOCK(ntb); } @@ -1508,6 +1510,7 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) ntb->xlat_reg = &xeon_sec_xlat; if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { + ntb->fake_db_bell = 0; ntb->msix_mw_idx = (ntb->mw_count + g_ntb_msix_idx) % ntb->mw_count; ntb_printf(2, "Setting up MSIX mw idx %d means %u\n", @@ -1564,10 +1567,6 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); DB_MASK_UNLOCK(ntb); - rc = xeon_setup_msix_bar(ntb); - if (rc != 0) - return (rc); - rc = ntb_init_isr(ntb); return (rc); } @@ -1730,19 +1729,6 @@ xeon_set_pbar_xlat(struct ntb_softc *ntb } static int -xeon_setup_msix_bar(struct ntb_softc *ntb) -{ - enum ntb_bar bar_num; - - if (!HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) - return (0); - - bar_num = ntb_mw_to_bar(ntb, ntb->msix_mw_idx); - ntb->peer_lapic_bar = &ntb->bar_info[bar_num]; - return (0); -} - -static int xeon_setup_b2b_mw(struct ntb_softc *ntb, const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr) { @@ -1822,8 +1808,10 @@ xeon_setup_b2b_mw(struct ntb_softc *ntb, if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { size_t size, xlatoffset; + enum ntb_bar bar_num; - switch (ntb_mw_to_bar(ntb, ntb->msix_mw_idx)) { + bar_num = ntb_mw_to_bar(ntb, ntb->msix_mw_idx); + switch (bar_num) { case NTB_B2B_BAR_1: size = 8; xlatoffset = XEON_SBAR2XLAT_OFFSET; @@ -1856,6 +1844,8 @@ xeon_setup_b2b_mw(struct ntb_softc *ntb, ntb_reg_write(8, xlatoffset, MSI_INTEL_ADDR_BASE); ntb->msix_xlat = ntb_reg_read(8, xlatoffset); } + + ntb->peer_lapic_bar = &ntb->bar_info[bar_num]; } (void)ntb_reg_read(8, XEON_SBAR2XLAT_OFFSET); (void)ntb_reg_read(8, XEON_SBAR4XLAT_OFFSET); Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:48:57 2016 (r302492) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:57:21 2016 (r302493) @@ -1215,7 +1215,6 @@ ntb_qp_link_work(void *arg) qp->event_handler(qp->cb_data, NTB_LINK_UP); NTB_DB_CLEAR_MASK(ntb, 1ull << qp->qp_num); - taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); } else if (nt->link_is_up) callout_reset(&qp->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp); From owner-svn-src-all@freebsd.org Sat Jul 9 11:59:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B11CB84CA6; Sat, 9 Jul 2016 11:59:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E235E131A; Sat, 9 Jul 2016 11:59:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69Bx0Ro098371; Sat, 9 Jul 2016 11:59:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69BwxB8098368; Sat, 9 Jul 2016 11:58:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091158.u69BwxB8098368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 11:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302494 - in head/sys/dev/ntb: . if_ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 11:59:01 -0000 Author: mav Date: Sat Jul 9 11:58:59 2016 New Revision: 302494 URL: https://svnweb.freebsd.org/changeset/base/302494 Log: Synchronize MTU code with Linux. It is mandatory for transport compatibility. Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 11:57:21 2016 (r302493) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 11:58:59 2016 (r302494) @@ -125,8 +125,7 @@ ntb_net_attach(device_t dev) ether_ifattach(ifp, sc->eaddr); ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_JUMBO_MTU; ifp->if_capenable = ifp->if_capabilities; - ifp->if_mtu = ntb_transport_max_size(sc->qp) - ETHER_HDR_LEN - - ETHER_CRC_LEN; + ifp->if_mtu = ntb_transport_max_size(sc->qp) - ETHER_HDR_LEN; ntb_transport_link_up(sc->qp); return (0); @@ -177,7 +176,7 @@ ntb_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFMTU: { if (ifr->ifr_mtu > ntb_transport_max_size(sc->qp) - - ETHER_HDR_LEN - ETHER_CRC_LEN) { + ETHER_HDR_LEN) { error = EINVAL; break; } Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:57:21 2016 (r302493) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:58:59 2016 (r302494) @@ -489,8 +489,7 @@ ntb_transport_init_queue(struct ntb_tran qp->rx_info = (void *)(qp->tx_mw + tx_size); /* Due to house-keeping, there must be at least 2 buffs */ - qp->tx_max_frame = qmin(tx_size / 2, - transport_mtu + sizeof(struct ntb_payload_header)); + qp->tx_max_frame = qmin(transport_mtu, tx_size / 2); qp->tx_max_entry = tx_size / qp->tx_max_frame; callout_init(&qp->link_work, 0); @@ -1170,8 +1169,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra qp->remote_rx_info = (void*)(qp->rx_buff + rx_size); /* Due to house-keeping, there must be at least 2 buffs */ - qp->rx_max_frame = qmin(rx_size / 2, - transport_mtu + sizeof(struct ntb_payload_header)); + qp->rx_max_frame = qmin(transport_mtu, rx_size / 2); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0; From owner-svn-src-all@freebsd.org Sat Jul 9 12:00:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 615C5B8532D; Sat, 9 Jul 2016 12:00:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EEDF15A9; Sat, 9 Jul 2016 12:00:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69C04PP098503; Sat, 9 Jul 2016 12:00:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69C04mT098501; Sat, 9 Jul 2016 12:00:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091200.u69C04mT098501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 12:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302495 - in head/sys/dev/ntb: . if_ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 12:00:05 -0000 Author: mav Date: Sat Jul 9 12:00:04 2016 New Revision: 302495 URL: https://svnweb.freebsd.org/changeset/base/302495 Log: Improve memory allocation errors handling on receive. Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 11:58:59 2016 (r302494) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 12:00:04 2016 (r302495) @@ -241,7 +241,12 @@ ntb_net_rx_handler(struct ntb_transport_ struct mbuf *m = data; struct ifnet *ifp = qp_data; - CTR0(KTR_NTB, "RX: rx handler"); + CTR1(KTR_NTB, "RX: rx handler (%d)", len); + if (len < 0) { + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + return; + } + m->m_pkthdr.csum_flags = CSUM_IP_CHECKED | CSUM_IP_VALID; (*ifp->if_input)(ifp, m); } Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Jul 9 11:58:59 2016 (r302494) +++ head/sys/dev/ntb/ntb_transport.c Sat Jul 9 12:00:04 2016 (r302495) @@ -877,6 +877,8 @@ ntb_memcpy_rx(struct ntb_transport_qp *q CTR2(KTR_NTB, "RX: copying %d bytes from offset %p", len, offset); entry->buf = (void *)m_devget(offset, len, 0, ifp, NULL); + if (entry->buf == NULL) + entry->len = -ENOMEM; /* Ensure that the data is globally visible before clearing the flag */ wmb(); From owner-svn-src-all@freebsd.org Sat Jul 9 12:10:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C563B859BE; Sat, 9 Jul 2016 12:10:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F217C1CA1; Sat, 9 Jul 2016 12:10:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69CA8VE002205; Sat, 9 Jul 2016 12:10:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69CA8Jc002204; Sat, 9 Jul 2016 12:10:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091210.u69CA8Jc002204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 12:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302496 - head/sys/dev/ntb/if_ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 12:10:09 -0000 Author: mav Date: Sat Jul 9 12:10:08 2016 New Revision: 302496 URL: https://svnweb.freebsd.org/changeset/base/302496 Log: Rewrite if_ntb to use modern interface KPIs and features. It includes: link state, if_transmit, buf_ring, multiple queues, bpf, etc. Sponsored by: iXsystems, Inc. Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 12:00:04 2016 (r302495) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 12:10:08 2016 (r302496) @@ -43,15 +43,19 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include +#include +#include #include #include #include +#include #include #include #include @@ -61,28 +65,50 @@ __FBSDID("$FreeBSD$"); #include "../ntb_transport.h" #define KTR_NTB KTR_SPARE3 +#define NTB_MEDIATYPE (IFM_ETHER | IFM_AUTO | IFM_FDX) -struct ntb_net_ctx { - device_t *dev; - struct ifnet *ifp; +static SYSCTL_NODE(_hw, OID_AUTO, if_ntb, CTLFLAG_RW, 0, "if_ntb"); + +static unsigned g_if_ntb_num_queues = 1; +SYSCTL_UINT(_hw_if_ntb, OID_AUTO, num_queues, CTLFLAG_RWTUN, + &g_if_ntb_num_queues, 0, "Number of queues per interface"); + +struct ntb_net_queue { + struct ntb_net_ctx *sc; + if_t ifp; struct ntb_transport_qp *qp; - u_char eaddr[ETHER_ADDR_LEN]; - struct mtx tx_lock; - struct callout queue_full; + struct buf_ring *br; + struct task tx_task; + struct taskqueue *tx_tq; + struct mtx tx_lock; + struct callout queue_full; +}; + +struct ntb_net_ctx { + if_t ifp; + struct ifmedia media; + u_char eaddr[ETHER_ADDR_LEN]; + int num_queues; + struct ntb_net_queue *queues; + int mtu; }; static int ntb_net_probe(device_t dev); static int ntb_net_attach(device_t dev); static int ntb_net_detach(device_t dev); static void ntb_net_init(void *arg); -static int ntb_ioctl(struct ifnet *ifp, u_long command, caddr_t data); -static void ntb_start(struct ifnet *ifp); +static int ntb_ifmedia_upd(struct ifnet *); +static void ntb_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int ntb_ioctl(if_t ifp, u_long command, caddr_t data); +static int ntb_transmit(if_t ifp, struct mbuf *m); static void ntb_net_tx_handler(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); static void ntb_net_rx_handler(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); static void ntb_net_event_handler(void *data, enum ntb_link_event status); +static void ntb_handle_tx(void *arg, int pending); static void ntb_qp_full(void *arg); +static void ntb_qflush(if_t ifp); static void create_random_local_eui48(u_char *eaddr); static int @@ -97,37 +123,64 @@ static int ntb_net_attach(device_t dev) { struct ntb_net_ctx *sc = device_get_softc(dev); - struct ifnet *ifp; + struct ntb_net_queue *q; + if_t ifp; struct ntb_queue_handlers handlers = { ntb_net_rx_handler, ntb_net_tx_handler, ntb_net_event_handler }; + int i; - ifp = sc->ifp = if_alloc(IFT_ETHER); + ifp = sc->ifp = if_gethandle(IFT_ETHER); if (ifp == NULL) { printf("ntb: Cannot allocate ifnet structure\n"); return (ENOMEM); } if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + if_setdev(ifp, dev); - mtx_init(&sc->tx_lock, "ntb tx", NULL, MTX_DEF); - callout_init(&sc->queue_full, 1); + sc->num_queues = g_if_ntb_num_queues; + sc->queues = malloc(sc->num_queues * sizeof(struct ntb_net_queue), + M_DEVBUF, M_WAITOK | M_ZERO); + sc->mtu = INT_MAX; + for (i = 0; i < sc->num_queues; i++) { + q = &sc->queues[i]; + q->sc = sc; + q->ifp = ifp; + q->qp = ntb_transport_create_queue(q, + device_get_parent(dev), &handlers); + if (q->qp == NULL) + break; + sc->mtu = imin(sc->mtu, ntb_transport_max_size(q->qp)); + mtx_init(&q->tx_lock, "ntb tx", NULL, MTX_DEF); + q->br = buf_ring_alloc(4096, M_DEVBUF, M_WAITOK, &q->tx_lock); + TASK_INIT(&q->tx_task, 0, ntb_handle_tx, q); + q->tx_tq = taskqueue_create_fast("ntb_txq", M_NOWAIT, + taskqueue_thread_enqueue, &q->tx_tq); + taskqueue_start_threads(&q->tx_tq, 1, PI_NET, "%s txq%d", + device_get_nameunit(dev), i); + callout_init(&q->queue_full, 1); + } + sc->num_queues = i; - sc->qp = ntb_transport_create_queue(ifp, device_get_parent(dev), - &handlers); - ifp->if_init = ntb_net_init; - ifp->if_softc = sc; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = ntb_ioctl; - ifp->if_start = ntb_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; - IFQ_SET_READY(&ifp->if_snd); + if_setinitfn(ifp, ntb_net_init); + if_setsoftc(ifp, sc); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); + if_setioctlfn(ifp, ntb_ioctl); + if_settransmitfn(ifp, ntb_transmit); + if_setqflushfn(ifp, ntb_qflush); create_random_local_eui48(sc->eaddr); ether_ifattach(ifp, sc->eaddr); - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_JUMBO_MTU; - ifp->if_capenable = ifp->if_capabilities; - ifp->if_mtu = ntb_transport_max_size(sc->qp) - ETHER_HDR_LEN; + if_setcapabilities(ifp, IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | + IFCAP_JUMBO_MTU | IFCAP_LINKSTATE); + if_setcapenable(ifp, if_getcapabilities(ifp)); + if_setmtu(ifp, sc->mtu - ETHER_HDR_LEN); + + ifmedia_init(&sc->media, IFM_IMASK, ntb_ifmedia_upd, + ntb_ifmedia_sts); + ifmedia_add(&sc->media, NTB_MEDIATYPE, 0, NULL); + ifmedia_set(&sc->media, NTB_MEDIATYPE); - ntb_transport_link_up(sc->qp); + for (i = 0; i < sc->num_queues; i++) + ntb_transport_link_up(sc->queues[i].qp); return (0); } @@ -135,19 +188,23 @@ static int ntb_net_detach(device_t dev) { struct ntb_net_ctx *sc = device_get_softc(dev); + struct ntb_net_queue *q; + int i; - if (sc->qp != NULL) { - ntb_transport_link_down(sc->qp); - ntb_transport_free_queue(sc->qp); - } - - if (sc->ifp != NULL) { - ether_ifdetach(sc->ifp); - if_free(sc->ifp); - sc->ifp = NULL; + for (i = 0; i < sc->num_queues; i++) + ntb_transport_link_down(sc->queues[i].qp); + ether_ifdetach(sc->ifp); + if_free(sc->ifp); + ifmedia_removeall(&sc->media); + for (i = 0; i < sc->num_queues; i++) { + q = &sc->queues[i]; + ntb_transport_free_queue(q->qp); + buf_ring_free(q->br, M_DEVBUF); + callout_drain(&q->queue_full); + taskqueue_drain_all(q->tx_tq); + mtx_destroy(&q->tx_lock); } - mtx_destroy(&sc->tx_lock); - + free(sc->queues, M_DEVBUF); return (0); } @@ -157,33 +214,37 @@ static void ntb_net_init(void *arg) { struct ntb_net_ctx *sc = arg; - struct ifnet *ifp = sc->ifp; + if_t ifp = sc->ifp; - ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ifp->if_flags |= IFF_UP; - if_link_state_change(ifp, LINK_STATE_UP); + if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); + if_link_state_change(ifp, ntb_transport_link_query(sc->queues[0].qp) ? + LINK_STATE_UP : LINK_STATE_DOWN); } static int -ntb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +ntb_ioctl(if_t ifp, u_long command, caddr_t data) { - struct ntb_net_ctx *sc = ifp->if_softc; + struct ntb_net_ctx *sc = if_getsoftc(ifp); struct ifreq *ifr = (struct ifreq *)data; int error = 0; switch (command) { case SIOCSIFMTU: { - if (ifr->ifr_mtu > ntb_transport_max_size(sc->qp) - - ETHER_HDR_LEN) { + if (ifr->ifr_mtu > sc->mtu - ETHER_HDR_LEN) { error = EINVAL; break; } - ifp->if_mtu = ifr->ifr_mtu; + if_setmtu(ifp, ifr->ifr_mtu); break; } + + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &sc->media, command); + break; + default: error = ether_ioctl(ifp, command, data); break; @@ -192,36 +253,131 @@ ntb_ioctl(struct ifnet *ifp, u_long comm return (error); } +static int +ntb_ifmedia_upd(struct ifnet *ifp) +{ + struct ntb_net_ctx *sc = if_getsoftc(ifp); + struct ifmedia *ifm = &sc->media; + + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) + return (EINVAL); + + return (0); +} static void -ntb_start(struct ifnet *ifp) +ntb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { - struct mbuf *m_head; - struct ntb_net_ctx *sc = ifp->if_softc; - int rc; - - mtx_lock(&sc->tx_lock); - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - CTR0(KTR_NTB, "TX: ntb_start"); - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); - CTR1(KTR_NTB, "TX: start mbuf %p", m_head); - rc = ntb_transport_tx_enqueue(sc->qp, m_head, m_head, - m_length(m_head, NULL)); + struct ntb_net_ctx *sc = if_getsoftc(ifp); + + ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = NTB_MEDIATYPE; + if (ntb_transport_link_query(sc->queues[0].qp)) + ifmr->ifm_status |= IFM_ACTIVE; +} + +static void +ntb_transmit_locked(struct ntb_net_queue *q) +{ + if_t ifp = q->ifp; + struct mbuf *m; + int rc, len; + short mflags; + + CTR0(KTR_NTB, "TX: ntb_transmit_locked"); + while ((m = drbr_peek(ifp, q->br)) != NULL) { + CTR1(KTR_NTB, "TX: start mbuf %p", m); + if_etherbpfmtap(ifp, m); + len = m->m_pkthdr.len; + mflags = m->m_flags; + rc = ntb_transport_tx_enqueue(q->qp, m, m, len); if (rc != 0) { - CTR1(KTR_NTB, - "TX: could not tx mbuf %p. Returning to snd q", - m_head); + CTR2(KTR_NTB, "TX: could not tx mbuf %p: %d", m, rc); if (rc == EAGAIN) { - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - callout_reset(&sc->queue_full, hz / 1000, - ntb_qp_full, ifp); + drbr_putback(ifp, q->br, m); + callout_reset_sbt(&q->queue_full, + SBT_1MS / 4, SBT_1MS / 4, + ntb_qp_full, q, 0); + } else { + m_freem(m); + drbr_advance(ifp, q->br); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } break; } + drbr_advance(ifp, q->br); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); + if (mflags & M_MCAST) + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + } +} + +static int +ntb_transmit(if_t ifp, struct mbuf *m) +{ + struct ntb_net_ctx *sc = if_getsoftc(ifp); + struct ntb_net_queue *q; + int error, i; + + CTR0(KTR_NTB, "TX: ntb_transmit"); + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + i = m->m_pkthdr.flowid % sc->num_queues; + else + i = curcpu % sc->num_queues; + q = &sc->queues[i]; + + error = drbr_enqueue(ifp, q->br, m); + if (error) + return (error); + + if (mtx_trylock(&q->tx_lock)) { + ntb_transmit_locked(q); + mtx_unlock(&q->tx_lock); + } else + taskqueue_enqueue(q->tx_tq, &q->tx_task); + return (0); +} + +static void +ntb_handle_tx(void *arg, int pending) +{ + struct ntb_net_queue *q = arg; + + mtx_lock(&q->tx_lock); + ntb_transmit_locked(q); + mtx_unlock(&q->tx_lock); +} + +static void +ntb_qp_full(void *arg) +{ + struct ntb_net_queue *q = arg; + + CTR0(KTR_NTB, "TX: qp_full callout"); + if (ntb_transport_tx_free_entry(q->qp) > 0) + taskqueue_enqueue(q->tx_tq, &q->tx_task); + else + callout_schedule_sbt(&q->queue_full, + SBT_1MS / 4, SBT_1MS / 4, 0); +} + +static void +ntb_qflush(if_t ifp) +{ + struct ntb_net_ctx *sc = if_getsoftc(ifp); + struct ntb_net_queue *q; + struct mbuf *m; + int i; + + for (i = 0; i < sc->num_queues; i++) { + q = &sc->queues[i]; + mtx_lock(&q->tx_lock); + while ((m = buf_ring_dequeue_sc(q->br)) != NULL) + m_freem(m); + mtx_unlock(&q->tx_lock); } - mtx_unlock(&sc->tx_lock); + if_qflush(ifp); } /* Network Device Callbacks */ @@ -238,8 +394,10 @@ static void ntb_net_rx_handler(struct ntb_transport_qp *qp, void *qp_data, void *data, int len) { + struct ntb_net_queue *q = qp_data; + struct ntb_net_ctx *sc = q->sc; struct mbuf *m = data; - struct ifnet *ifp = qp_data; + if_t ifp = q->ifp; CTR1(KTR_NTB, "RX: rx handler (%d)", len); if (len < 0) { @@ -247,36 +405,37 @@ ntb_net_rx_handler(struct ntb_transport_ return; } - m->m_pkthdr.csum_flags = CSUM_IP_CHECKED | CSUM_IP_VALID; - (*ifp->if_input)(ifp, m); + m->m_pkthdr.rcvif = ifp; + if (sc->num_queues > 1) { + m->m_pkthdr.flowid = q - sc->queues; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + } + if ((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) == + (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { + m->m_pkthdr.csum_flags = CSUM_IP_CHECKED | CSUM_IP_VALID; + } + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + if_input(ifp, m); } static void ntb_net_event_handler(void *data, enum ntb_link_event status) { - struct ifnet *ifp; - - ifp = data; - (void)ifp; - - /* XXX The Linux driver munges with the carrier status here. */ + struct ntb_net_queue *q = data; + int new_state; switch (status) { case NTB_LINK_DOWN: + new_state = LINK_STATE_DOWN; break; case NTB_LINK_UP: + new_state = LINK_STATE_UP; break; default: - panic("Bogus ntb_link_event %u\n", status); + new_state = LINK_STATE_UNKNOWN; + break; } -} - -static void -ntb_qp_full(void *arg) -{ - - CTR0(KTR_NTB, "TX: qp_full callout"); - ntb_start(arg); + if_link_state_change(q->ifp, new_state); } /* Helper functions */ From owner-svn-src-all@freebsd.org Sat Jul 9 12:17:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDBBFB85BF2; Sat, 9 Jul 2016 12:17:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EE8E11E2; Sat, 9 Jul 2016 12:17:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69CH1d8005688; Sat, 9 Jul 2016 12:17:01 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69CH1Y9005687; Sat, 9 Jul 2016 12:17:01 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201607091217.u69CH1Y9005687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 9 Jul 2016 12:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302497 - head/sys/netpfil/pf 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 12:17:02 -0000 Author: kp Date: Sat Jul 9 12:17:01 2016 New Revision: 302497 URL: https://svnweb.freebsd.org/changeset/base/302497 Log: pf: Map hook returns onto the correct error values pf returns PF_PASS, PF_DROP, ... in the netpfil hooks, but the hook callers expect to get E error codes. Map the returns values. A pass is 0 (everything is OK), anything else means pf ate the packet, so return EACCES, which tells the stack not to emit an ICMP error message. PR: 207598 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sat Jul 9 12:10:08 2016 (r302496) +++ head/sys/netpfil/pf/pf_ioctl.c Sat Jul 9 12:17:01 2016 (r302497) @@ -3563,7 +3563,9 @@ pf_check_in(void *arg, struct mbuf **m, *m = NULL; } - return (chk); + if (chk != PF_PASS) + return (EACCES); + return (0); } static int @@ -3578,7 +3580,9 @@ pf_check_out(void *arg, struct mbuf **m, *m = NULL; } - return (chk); + if (chk != PF_PASS) + return (EACCES); + return (0); } #endif @@ -3601,7 +3605,9 @@ pf_check6_in(void *arg, struct mbuf **m, m_freem(*m); *m = NULL; } - return chk; + if (chk != PF_PASS) + return (EACCES); + return (0); } static int @@ -3617,7 +3623,9 @@ pf_check6_out(void *arg, struct mbuf **m m_freem(*m); *m = NULL; } - return chk; + if (chk != PF_PASS) + return (EACCES); + return (0); } #endif /* INET6 */ From owner-svn-src-all@freebsd.org Sat Jul 9 13:27:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4357DB82695; Sat, 9 Jul 2016 13:27:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141BC1A26; Sat, 9 Jul 2016 13:27:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69DREuM032494; Sat, 9 Jul 2016 13:27:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69DREqm032493; Sat, 9 Jul 2016 13:27:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607091327.u69DREqm032493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 9 Jul 2016 13:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302498 - head/sys/arm/nvidia 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 13:27:15 -0000 Author: andrew Date: Sat Jul 9 13:27:14 2016 New Revision: 302498 URL: https://svnweb.freebsd.org/changeset/base/302498 Log: Remove an unneeded call to fdt_get_unit, the return value is unused. MFC after: 1 month Sponsored by: ABT Systems Ltd Modified: head/sys/arm/nvidia/tegra_pcie.c Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Sat Jul 9 12:17:01 2016 (r302497) +++ head/sys/arm/nvidia/tegra_pcie.c Sat Jul 9 13:27:14 2016 (r302498) @@ -1355,7 +1355,7 @@ tegra_pcib_set_bar(struct tegra_pcib_sof } static int -tegra_pcib_enable(struct tegra_pcib_softc *sc, uint32_t port) +tegra_pcib_enable(struct tegra_pcib_softc *sc) { int rv; int i; @@ -1495,7 +1495,6 @@ tegra_pcib_attach(device_t dev) { struct tegra_pcib_softc *sc; phandle_t node; - uint32_t unit; int rv; int rid; int nranges; @@ -1505,7 +1504,6 @@ tegra_pcib_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - unit = fdt_get_unit(dev); mtx_init(&sc->mtx, "msi_mtx", NULL, MTX_DEF); @@ -1618,7 +1616,7 @@ tegra_pcib_attach(device_t dev) /* * Enable PCIE device. */ - rv = tegra_pcib_enable(sc, unit); + rv = tegra_pcib_enable(sc); if (rv != 0) goto out; for (i = 0; i < TEGRA_PCIB_MAX_PORTS; i++) { From owner-svn-src-all@freebsd.org Sat Jul 9 14:59:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85EDDB83F11; Sat, 9 Jul 2016 14:59:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 541EA15B0; Sat, 9 Jul 2016 14:59:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69ExGdi066425; Sat, 9 Jul 2016 14:59:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69ExGe7066424; Sat, 9 Jul 2016 14:59:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607091459.u69ExGe7066424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 14:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302499 - head/sys/dev/ntb/if_ntb 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 14:59:17 -0000 Author: mav Date: Sat Jul 9 14:59:16 2016 New Revision: 302499 URL: https://svnweb.freebsd.org/changeset/base/302499 Log: Improve checksum "offload" support. For compatibility reasons make driver not report any checksum offload by default, since there is indeed none. But if administrator knows that interface is used only for local traffic, he can enable fake checksum offload manually on both sides to save some CPU cycles, since the data are already protected by CRC32 of PCIe link. Sponsored by: iXsystems, Inc. Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 13:27:14 2016 (r302498) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 9 14:59:16 2016 (r302499) @@ -67,6 +67,13 @@ __FBSDID("$FreeBSD$"); #define KTR_NTB KTR_SPARE3 #define NTB_MEDIATYPE (IFM_ETHER | IFM_AUTO | IFM_FDX) +#define NTB_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_SCTP) +#define NTB_CSUM_FEATURES6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_SCTP_IPV6) +#define NTB_CSUM_SET (CSUM_DATA_VALID | CSUM_DATA_VALID_IPV6 | \ + CSUM_PSEUDO_HDR | \ + CSUM_IP_CHECKED | CSUM_IP_VALID | \ + CSUM_SCTP_VALID) + static SYSCTL_NODE(_hw, OID_AUTO, if_ntb, CTLFLAG_RW, 0, "if_ntb"); static unsigned g_if_ntb_num_queues = 1; @@ -171,7 +178,7 @@ ntb_net_attach(device_t dev) ether_ifattach(ifp, sc->eaddr); if_setcapabilities(ifp, IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_JUMBO_MTU | IFCAP_LINKSTATE); - if_setcapenable(ifp, if_getcapabilities(ifp)); + if_setcapenable(ifp, IFCAP_JUMBO_MTU | IFCAP_LINKSTATE); if_setmtu(ifp, sc->mtu - ETHER_HDR_LEN); ifmedia_init(&sc->media, IFM_IMASK, ntb_ifmedia_upd, @@ -245,6 +252,31 @@ ntb_ioctl(if_t ifp, u_long command, cadd error = ifmedia_ioctl(ifp, ifr, &sc->media, command); break; + case SIOCSIFCAP: + if (ifr->ifr_reqcap & IFCAP_RXCSUM) + if_setcapenablebit(ifp, IFCAP_RXCSUM, 0); + else + if_setcapenablebit(ifp, 0, IFCAP_RXCSUM); + if (ifr->ifr_reqcap & IFCAP_TXCSUM) { + if_setcapenablebit(ifp, IFCAP_TXCSUM, 0); + if_sethwassistbits(ifp, NTB_CSUM_FEATURES, 0); + } else { + if_setcapenablebit(ifp, 0, IFCAP_TXCSUM); + if_sethwassistbits(ifp, 0, NTB_CSUM_FEATURES); + } + if (ifr->ifr_reqcap & IFCAP_RXCSUM_IPV6) + if_setcapenablebit(ifp, IFCAP_RXCSUM_IPV6, 0); + else + if_setcapenablebit(ifp, 0, IFCAP_RXCSUM_IPV6); + if (ifr->ifr_reqcap & IFCAP_TXCSUM_IPV6) { + if_setcapenablebit(ifp, IFCAP_TXCSUM_IPV6, 0); + if_sethwassistbits(ifp, NTB_CSUM_FEATURES6, 0); + } else { + if_setcapenablebit(ifp, 0, IFCAP_TXCSUM_IPV6); + if_sethwassistbits(ifp, 0, NTB_CSUM_FEATURES6); + } + break; + default: error = ether_ioctl(ifp, command, data); break; @@ -398,6 +430,7 @@ ntb_net_rx_handler(struct ntb_transport_ struct ntb_net_ctx *sc = q->sc; struct mbuf *m = data; if_t ifp = q->ifp; + uint16_t proto; CTR1(KTR_NTB, "RX: rx handler (%d)", len); if (len < 0) { @@ -410,9 +443,22 @@ ntb_net_rx_handler(struct ntb_transport_ m->m_pkthdr.flowid = q - sc->queues; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); } - if ((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) == - (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { - m->m_pkthdr.csum_flags = CSUM_IP_CHECKED | CSUM_IP_VALID; + if (if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { + m_copydata(m, 12, 2, (void *)&proto); + switch (ntohs(proto)) { + case ETHERTYPE_IP: + if (if_getcapenable(ifp) & IFCAP_RXCSUM) { + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = NTB_CSUM_SET; + } + break; + case ETHERTYPE_IPV6: + if (if_getcapenable(ifp) & IFCAP_RXCSUM_IPV6) { + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = NTB_CSUM_SET; + } + break; + } } if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); if_input(ifp, m); From owner-svn-src-all@freebsd.org Sat Jul 9 17:11:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EF4CB833E9; Sat, 9 Jul 2016 17:11:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4113D1CB3; Sat, 9 Jul 2016 17:11:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69HBsPC017670; Sat, 9 Jul 2016 17:11:54 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69HBs2K017668; Sat, 9 Jul 2016 17:11:54 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607091711.u69HBs2K017668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 9 Jul 2016 17:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302500 - head/bin/dd 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 17:11:55 -0000 Author: cem Date: Sat Jul 9 17:11:54 2016 New Revision: 302500 URL: https://svnweb.freebsd.org/changeset/base/302500 Log: dd(1): Enable access to SIZE_T_MAX character devices On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking character devices to negative off_t values. This enables dd(1) to interact with kernel KVA in /dev/kmem on amd64, for example. Sponsored by: EMC / Isilon Storage Division Modified: head/bin/dd/args.c head/bin/dd/position.c Modified: head/bin/dd/args.c ============================================================================== --- head/bin/dd/args.c Sat Jul 9 14:59:16 2016 (r302499) +++ head/bin/dd/args.c Sat Jul 9 17:11:54 2016 (r302500) @@ -167,14 +167,6 @@ jcl(char **argv) errx(1, "cbs meaningless if not doing record operations"); } else cfunc = def; - - /* - * Bail out if the calculation of a file offset would overflow. - */ - if (in.offset > OFF_MAX / (ssize_t)in.dbsz || - out.offset > OFF_MAX / (ssize_t)out.dbsz) - errx(1, "seek offsets cannot be larger than %jd", - (intmax_t)OFF_MAX); } static int Modified: head/bin/dd/position.c ============================================================================== --- head/bin/dd/position.c Sat Jul 9 14:59:16 2016 (r302499) +++ head/bin/dd/position.c Sat Jul 9 17:11:54 2016 (r302500) @@ -45,12 +45,41 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "dd.h" #include "extern.h" +static off_t +seek_offset(IO *io) +{ + off_t n; + size_t sz; + + n = io->offset; + sz = io->dbsz; + + _Static_assert(sizeof(io->offset) == sizeof(int64_t), "64-bit off_t"); + + /* + * If the lseek offset will be negative, verify that this is a special + * device file. Some such files (e.g. /dev/kmem) permit "negative" + * offsets. + * + * Bail out if the calculation of a file offset would overflow. + */ + if ((io->flags & ISCHR) == 0 && n > OFF_MAX / (ssize_t)sz) + errx(1, "seek offsets cannot be larger than %jd", + (intmax_t)OFF_MAX); + else if ((io->flags & ISCHR) != 0 && (uint64_t)n > UINT64_MAX / sz) + errx(1, "seek offsets cannot be larger than %ju", + (uintmax_t)UINT64_MAX); + + return ((off_t)( (uint64_t)n * sz )); +} + /* * Position input/output data streams before starting the copy. Device type * dependent. Seekable devices use lseek, and the rest position by reading. @@ -68,7 +97,7 @@ pos_in(void) /* If known to be seekable, try to seek on it. */ if (in.flags & ISSEEK) { errno = 0; - if (lseek(in.fd, in.offset * in.dbsz, SEEK_CUR) == -1 && + if (lseek(in.fd, seek_offset(&in), SEEK_CUR) == -1 && errno != 0) err(1, "%s", in.name); return; @@ -136,7 +165,7 @@ pos_out(void) */ if (out.flags & (ISSEEK | ISPIPE)) { errno = 0; - if (lseek(out.fd, out.offset * out.dbsz, SEEK_CUR) == -1 && + if (lseek(out.fd, seek_offset(&out), SEEK_CUR) == -1 && errno != 0) err(1, "%s", out.name); return; From owner-svn-src-all@freebsd.org Sat Jul 9 18:43:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B13FCB84968; Sat, 9 Jul 2016 18:43:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E1A51322; Sat, 9 Jul 2016 18:43:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69IhFSG050502; Sat, 9 Jul 2016 18:43:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69IhFnw050500; Sat, 9 Jul 2016 18:43:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607091843.u69IhFnw050500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 9 Jul 2016 18:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302502 - in head/sys/arm: lpc samsung/exynos 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 18:43:16 -0000 Author: ian Date: Sat Jul 9 18:43:15 2016 New Revision: 302502 URL: https://svnweb.freebsd.org/changeset/base/302502 Log: Correct syntax errors that only show up when compiled with INVARIANTS. Modified: head/sys/arm/lpc/if_lpe.c head/sys/arm/samsung/exynos/chrome_kb.c Modified: head/sys/arm/lpc/if_lpe.c ============================================================================== --- head/sys/arm/lpc/if_lpe.c Sat Jul 9 17:48:45 2016 (r302501) +++ head/sys/arm/lpc/if_lpe.c Sat Jul 9 18:43:15 2016 (r302502) @@ -172,7 +172,7 @@ static void lpe_ifmedia_sts(struct ifnet #define lpe_lock(_sc) mtx_lock(&(_sc)->lpe_mtx) #define lpe_unlock(_sc) mtx_unlock(&(_sc)->lpe_mtx) -#define lpe_lock_assert(sc) mtx_assert(&(_sc)->lpe_mtx, MA_OWNED) +#define lpe_lock_assert(_sc) mtx_assert(&(_sc)->lpe_mtx, MA_OWNED) #define lpe_read_4(_sc, _reg) \ bus_space_read_4((_sc)->lpe_bst, (_sc)->lpe_bsh, (_reg)) Modified: head/sys/arm/samsung/exynos/chrome_kb.c ============================================================================== --- head/sys/arm/samsung/exynos/chrome_kb.c Sat Jul 9 17:48:45 2016 (r302501) +++ head/sys/arm/samsung/exynos/chrome_kb.c Sat Jul 9 18:43:15 2016 (r302502) @@ -310,7 +310,7 @@ static uint16_t keymap_read(struct ckb_softc *sc, int col, int row) { - KASSERT(sc->keymap != NULL, "keymap_read: no keymap"); + KASSERT(sc->keymap != NULL, ("keymap_read: no keymap")); if (col >= 0 && col < sc->cols && row >= 0 && row < sc->rows) { return sc->keymap[row * sc->cols + col]; @@ -323,7 +323,7 @@ static int keymap_write(struct ckb_softc *sc, int col, int row, uint16_t key) { - KASSERT(sc->keymap != NULL, "keymap_write: no keymap"); + KASSERT(sc->keymap != NULL, ("keymap_write: no keymap")); if (col >= 0 && col < sc->cols && row >= 0 && row < sc->rows) { sc->keymap[row * sc->cols + col] = key; From owner-svn-src-all@freebsd.org Sat Jul 9 20:01:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8352B761D0; Sat, 9 Jul 2016 20:01:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8CFA19F5; Sat, 9 Jul 2016 20:01:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69K17PJ079477; Sat, 9 Jul 2016 20:01:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69K17t1079476; Sat, 9 Jul 2016 20:01:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607092001.u69K17t1079476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 9 Jul 2016 20:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302503 - head/usr.sbin/ctld 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 20:01:08 -0000 Author: trasz Date: Sat Jul 9 20:01:07 2016 New Revision: 302503 URL: https://svnweb.freebsd.org/changeset/base/302503 Log: Fix ctld(8) to not exit when reloading configuration with invalid initiator-portal clause. MFC after: 3 days Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Sat Jul 9 18:43:15 2016 (r302502) +++ head/usr.sbin/ctld/ctld.c Sat Jul 9 20:01:07 2016 (r302503) @@ -402,7 +402,7 @@ auth_portal_new(struct auth_group *ag, c error: free(ap); - log_errx(1, "Incorrect initiator portal '%s'", portal); + log_warnx("incorrect initiator portal \"%s\"", portal); return (NULL); } From owner-svn-src-all@freebsd.org Sat Jul 9 20:42:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58728B768AA; Sat, 9 Jul 2016 20:42:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21E70159A; Sat, 9 Jul 2016 20:42:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69Kfxml095187; Sat, 9 Jul 2016 20:41:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69Kfxk2095184; Sat, 9 Jul 2016 20:41:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607092041.u69Kfxk2095184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 20:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302504 - head/usr.sbin/bhyve 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 20:42:00 -0000 Author: mav Date: Sat Jul 9 20:41:59 2016 New Revision: 302504 URL: https://svnweb.freebsd.org/changeset/base/302504 Log: Add emulation for Intel e1000 (e82545) network adapter. The code was successfully tested with FreeBSD, Linux, Solaris and Windows guests. This interface is predictably slower (about 2x) then virtio-net, but it is very helpful for guests not supporting virtio-net by default. Thanks to Jeremiah Lott and Peter Grehan for doing original heavy lifting. Added: head/usr.sbin/bhyve/pci_e82545.c (contents, props changed) Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Sat Jul 9 20:01:07 2016 (r302503) +++ head/usr.sbin/bhyve/Makefile Sat Jul 9 20:41:59 2016 (r302504) @@ -28,6 +28,7 @@ SRCS= \ mevent.c \ mptbl.c \ pci_ahci.c \ + pci_e82545.c \ pci_emul.c \ pci_fbuf.c \ pci_hostbridge.c \ @@ -61,6 +62,8 @@ SRCS+= vmm_instruction_emul.c LIBADD= vmmapi md pthread z +CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 +CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller WARNS?= 2 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Sat Jul 9 20:01:07 2016 (r302503) +++ head/usr.sbin/bhyve/bhyve.8 Sat Jul 9 20:41:59 2016 (r302504) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2016 +.Dd July 9, 2016 .Dt BHYVE 8 .Os .Sh NAME @@ -177,6 +177,8 @@ AHCI controller attached to arbitraty de AHCI controller attached to an ATAPI CD/DVD. .It Li ahci-hd AHCI controller attached to a SATA hard-drive. +.It Li e1000 +Intel e82545 network interface. .It Li uart PCI 16550 serial device. .It Li lpc Added: head/usr.sbin/bhyve/pci_e82545.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/pci_e82545.c Sat Jul 9 20:41:59 2016 (r302504) @@ -0,0 +1,2372 @@ +/* + * Copyright (c) 2016 Alexander Motin + * Copyright (c) 2015 Peter Grehan + * Copyright (c) 2013 Jeremiah Lott, Avere Systems + * 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 + * in this position and unchanged. + * 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 +#include +#include + +#include "e1000_regs.h" +#include "e1000_defines.h" +#include "mii.h" + +#include "bhyverun.h" +#include "pci_emul.h" +#include "mevent.h" + +/* Hardware/register definitions XXX: move some to common code. */ +#define E82545_VENDOR_ID_INTEL 0x8086 +#define E82545_DEV_ID_82545EM_COPPER 0x100F +#define E82545_SUBDEV_ID 0x1008 + +#define E82545_REVISION_4 4 + +#define E82545_MDIC_DATA_MASK 0x0000FFFF +#define E82545_MDIC_OP_MASK 0x0c000000 +#define E82545_MDIC_IE 0x20000000 + +#define E82545_EECD_FWE_DIS 0x00000010 /* Flash writes disabled */ +#define E82545_EECD_FWE_EN 0x00000020 /* Flash writes enabled */ +#define E82545_EECD_FWE_MASK 0x00000030 /* Flash writes mask */ + +#define E82545_BAR_REGISTER 0 +#define E82545_BAR_REGISTER_LEN (128*1024) +#define E82545_BAR_FLASH 1 +#define E82545_BAR_FLASH_LEN (64*1024) +#define E82545_BAR_IO 2 +#define E82545_BAR_IO_LEN 8 + +#define E82545_IOADDR 0x00000000 +#define E82545_IODATA 0x00000004 +#define E82545_IO_REGISTER_MAX 0x0001FFFF +#define E82545_IO_FLASH_BASE 0x00080000 +#define E82545_IO_FLASH_MAX 0x000FFFFF + +#define E82545_ARRAY_ENTRY(reg, offset) (reg + (offset<<2)) +#define E82545_RAR_MAX 15 +#define E82545_MTA_MAX 127 +#define E82545_VFTA_MAX 127 + +/* Slightly modified from the driver versions, hardcoded for 3 opcode bits, + * followed by 6 address bits. + * TODO: make opcode bits and addr bits configurable? + * NVM Commands - Microwire */ +#define E82545_NVM_OPCODE_BITS 3 +#define E82545_NVM_ADDR_BITS 6 +#define E82545_NVM_DATA_BITS 16 +#define E82545_NVM_OPADDR_BITS (E82545_NVM_OPCODE_BITS + E82545_NVM_ADDR_BITS) +#define E82545_NVM_ADDR_MASK ((1 << E82545_NVM_ADDR_BITS)-1) +#define E82545_NVM_OPCODE_MASK \ + (((1 << E82545_NVM_OPCODE_BITS) - 1) << E82545_NVM_ADDR_BITS) +#define E82545_NVM_OPCODE_READ (0x6 << E82545_NVM_ADDR_BITS) /* read */ +#define E82545_NVM_OPCODE_WRITE (0x5 << E82545_NVM_ADDR_BITS) /* write */ +#define E82545_NVM_OPCODE_ERASE (0x7 << E82545_NVM_ADDR_BITS) /* erase */ +#define E82545_NVM_OPCODE_EWEN (0x4 << E82545_NVM_ADDR_BITS) /* wr-enable */ + +#define E82545_NVM_EEPROM_SIZE 64 /* 64 * 16-bit values == 128K */ + +#define E1000_ICR_SRPD 0x00010000 + +/* + * XXX does this actually have a limit on the 82545 ? + * There is a limit on the max number of bytes, but perhaps not + * on descriptors ?? + */ +#define I82545_MAX_TXSEGS 20 + +/* Legacy receive descriptor */ +struct e1000_rx_desc { + uint64_t buffer_addr; /* Address of the descriptor's data buffer */ + uint16_t length; /* Length of data DMAed into data buffer */ + uint16_t csum; /* Packet checksum */ + uint8_t status; /* Descriptor status */ + uint8_t errors; /* Descriptor Errors */ + uint16_t special; +}; + +/* Transmit descriptor types */ +#define E1000_TXD_MASK (E1000_TXD_CMD_DEXT | 0x00F00000) +#define E1000_TXD_TYP_L (0) +#define E1000_TXD_TYP_C (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_C) +#define E1000_TXD_TYP_D (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D) + +/* Legacy transmit descriptor */ +struct e1000_tx_desc { + uint64_t buffer_addr; /* Address of the descriptor's data buffer */ + union { + uint32_t data; + struct { + uint16_t length; /* Data buffer length */ + uint8_t cso; /* Checksum offset */ + uint8_t cmd; /* Descriptor control */ + } flags; + } lower; + union { + uint32_t data; + struct { + uint8_t status; /* Descriptor status */ + uint8_t css; /* Checksum start */ + uint16_t special; + } fields; + } upper; +}; + +/* Context descriptor */ +struct e1000_context_desc { + union { + uint32_t ip_config; + struct { + uint8_t ipcss; /* IP checksum start */ + uint8_t ipcso; /* IP checksum offset */ + uint16_t ipcse; /* IP checksum end */ + } ip_fields; + } lower_setup; + union { + uint32_t tcp_config; + struct { + uint8_t tucss; /* TCP checksum start */ + uint8_t tucso; /* TCP checksum offset */ + uint16_t tucse; /* TCP checksum end */ + } tcp_fields; + } upper_setup; + uint32_t cmd_and_length; + union { + uint32_t data; + struct { + uint8_t status; /* Descriptor status */ + uint8_t hdr_len; /* Header length */ + uint16_t mss; /* Maximum segment size */ + } fields; + } tcp_seg_setup; +}; + +/* Data descriptor */ +struct e1000_data_desc { + uint64_t buffer_addr; /* Address of the descriptor's buffer address */ + union { + uint32_t data; + struct { + uint16_t length; /* Data buffer length */ + uint8_t typ_len_ext; + uint8_t cmd; + } flags; + } lower; + union { + uint32_t data; + struct { + uint8_t status; /* Descriptor status */ + uint8_t popts; /* Packet Options */ + uint16_t special; + } fields; + } upper; +}; + +union e1000_tx_udesc { + struct e1000_tx_desc td; + struct e1000_context_desc cd; + struct e1000_data_desc dd; +}; + +/* Tx checksum info for a packet. */ +struct ck_info { + int ck_valid; /* ck_info is valid */ + uint8_t ck_start; /* start byte of cksum calcuation */ + uint8_t ck_off; /* offset of cksum insertion */ + uint16_t ck_len; /* length of cksum calc: 0 is to packet-end */ +}; + +/* + * Debug printf + */ +static int e82545_debug = 0; +#define DPRINTF(msg,params...) if (e82545_debug) fprintf(stderr, "e82545: " msg, params) +#define WPRINTF(msg,params...) fprintf(stderr, "e82545: " msg, params) + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + +/* s/w representation of the RAL/RAH regs */ +struct eth_uni { + int eu_valid; + int eu_addrsel; + struct ether_addr eu_eth; +}; + + +struct e82545_softc { + struct pci_devinst *esc_pi; + struct vmctx *esc_ctx; + struct mevent *esc_mevp; + struct mevent *esc_mevpitr; + pthread_mutex_t esc_mtx; + struct ether_addr esc_mac; + int esc_tapfd; + + /* General */ + uint32_t esc_CTRL; /* x0000 device ctl */ + uint32_t esc_FCAL; /* x0028 flow ctl addr lo */ + uint32_t esc_FCAH; /* x002C flow ctl addr hi */ + uint32_t esc_FCT; /* x0030 flow ctl type */ + uint32_t esc_VET; /* x0038 VLAN eth type */ + uint32_t esc_FCTTV; /* x0170 flow ctl tx timer */ + uint32_t esc_LEDCTL; /* x0E00 LED control */ + uint32_t esc_PBA; /* x1000 pkt buffer allocation */ + + /* Interrupt control */ + int esc_irq_asserted; + uint32_t esc_ICR; /* x00C0 cause read/clear */ + uint32_t esc_ITR; /* x00C4 intr throttling */ + uint32_t esc_ICS; /* x00C8 cause set */ + uint32_t esc_IMS; /* x00D0 mask set/read */ + uint32_t esc_IMC; /* x00D8 mask clear */ + + /* Transmit */ + union e1000_tx_udesc *esc_txdesc; + struct e1000_context_desc esc_txctx; + pthread_t esc_tx_tid; + pthread_cond_t esc_tx_cond; + int esc_tx_enabled; + int esc_tx_active; + uint32_t esc_TXCW; /* x0178 transmit config */ + uint32_t esc_TCTL; /* x0400 transmit ctl */ + uint32_t esc_TIPG; /* x0410 inter-packet gap */ + uint16_t esc_AIT; /* x0458 Adaptive Interframe Throttle */ + uint64_t esc_tdba; /* verified 64-bit desc table addr */ + uint32_t esc_TDBAL; /* x3800 desc table addr, low bits */ + uint32_t esc_TDBAH; /* x3804 desc table addr, hi 32-bits */ + uint32_t esc_TDLEN; /* x3808 # descriptors in bytes */ + uint16_t esc_TDH; /* x3810 desc table head idx */ + uint16_t esc_TDHr; /* internal read version of TDH */ + uint16_t esc_TDT; /* x3818 desc table tail idx */ + uint32_t esc_TIDV; /* x3820 intr delay */ + uint32_t esc_TXDCTL; /* x3828 desc control */ + uint32_t esc_TADV; /* x382C intr absolute delay */ + + /* L2 frame acceptance */ + struct eth_uni esc_uni[16]; /* 16 x unicast MAC addresses */ + uint32_t esc_fmcast[128]; /* Multicast filter bit-match */ + uint32_t esc_fvlan[128]; /* VLAN 4096-bit filter */ + + /* Receive */ + struct e1000_rx_desc *esc_rxdesc; + pthread_cond_t esc_rx_cond; + int esc_rx_enabled; + int esc_rx_active; + int esc_rx_loopback; + uint32_t esc_RCTL; /* x0100 receive ctl */ + uint32_t esc_FCRTL; /* x2160 flow cntl thresh, low */ + uint32_t esc_FCRTH; /* x2168 flow cntl thresh, hi */ + uint64_t esc_rdba; /* verified 64-bit desc table addr */ + uint32_t esc_RDBAL; /* x2800 desc table addr, low bits */ + uint32_t esc_RDBAH; /* x2804 desc table addr, hi 32-bits*/ + uint32_t esc_RDLEN; /* x2808 #descriptors */ + uint16_t esc_RDH; /* x2810 desc table head idx */ + uint16_t esc_RDT; /* x2818 desc table tail idx */ + uint32_t esc_RDTR; /* x2820 intr delay */ + uint32_t esc_RXDCTL; /* x2828 desc control */ + uint32_t esc_RADV; /* x282C intr absolute delay */ + uint32_t esc_RSRPD; /* x2C00 recv small packet detect */ + uint32_t esc_RXCSUM; /* x5000 receive cksum ctl */ + + /* IO Port register access */ + uint32_t io_addr; + + /* Shadow copy of MDIC */ + uint32_t mdi_control; + /* Shadow copy of EECD */ + uint32_t eeprom_control; + /* Latest NVM in/out */ + uint16_t nvm_data; + uint16_t nvm_opaddr; + /* stats */ + uint32_t missed_pkt_count; /* dropped for no room in rx queue */ + uint32_t pkt_rx_by_size[6]; + uint32_t pkt_tx_by_size[6]; + uint32_t good_pkt_rx_count; + uint32_t bcast_pkt_rx_count; + uint32_t mcast_pkt_rx_count; + uint32_t good_pkt_tx_count; + uint32_t bcast_pkt_tx_count; + uint32_t mcast_pkt_tx_count; + uint32_t oversize_rx_count; + uint32_t tso_tx_count; + uint64_t good_octets_rx; + uint64_t good_octets_tx; + uint64_t missed_octets; /* counts missed and oversized */ + + uint8_t nvm_bits:6; /* number of bits remaining in/out */ + uint8_t nvm_mode:2; +#define E82545_NVM_MODE_OPADDR 0x0 +#define E82545_NVM_MODE_DATAIN 0x1 +#define E82545_NVM_MODE_DATAOUT 0x2 + /* EEPROM data */ + uint16_t eeprom_data[E82545_NVM_EEPROM_SIZE]; +}; + +static void e82545_reset(struct e82545_softc *sc, int dev); +static void e82545_rx_enable(struct e82545_softc *sc); +static void e82545_rx_disable(struct e82545_softc *sc); +static void e82545_tap_callback(int fd, enum ev_type type, void *param); +static void e82545_tx_start(struct e82545_softc *sc); +static void e82545_tx_enable(struct e82545_softc *sc); +static void e82545_tx_disable(struct e82545_softc *sc); + +static inline int +e82545_size_stat_index(uint32_t size) +{ + if (size <= 64) { + return 0; + } else if (size >= 1024) { + return 5; + } else { + /* should be 1-4 */ + return (ffs(size) - 6); + } +} + +static void +e82545_init_eeprom(struct e82545_softc *sc) +{ + uint16_t checksum, i; + + /* mac addr */ + sc->eeprom_data[NVM_MAC_ADDR] = ((uint16_t)sc->esc_mac.octet[0]) | + (((uint16_t)sc->esc_mac.octet[1]) << 8); + sc->eeprom_data[NVM_MAC_ADDR+1] = ((uint16_t)sc->esc_mac.octet[2]) | + (((uint16_t)sc->esc_mac.octet[3]) << 8); + sc->eeprom_data[NVM_MAC_ADDR+2] = ((uint16_t)sc->esc_mac.octet[4]) | + (((uint16_t)sc->esc_mac.octet[5]) << 8); + + /* pci ids */ + sc->eeprom_data[NVM_SUB_DEV_ID] = E82545_SUBDEV_ID; + sc->eeprom_data[NVM_SUB_VEN_ID] = E82545_VENDOR_ID_INTEL; + sc->eeprom_data[NVM_DEV_ID] = E82545_DEV_ID_82545EM_COPPER; + sc->eeprom_data[NVM_VEN_ID] = E82545_VENDOR_ID_INTEL; + + /* fill in the checksum */ + checksum = 0; + for (i = 0; i < NVM_CHECKSUM_REG; i++) { + checksum += sc->eeprom_data[i]; + } + checksum = NVM_SUM - checksum; + sc->eeprom_data[NVM_CHECKSUM_REG] = checksum; + DPRINTF("eeprom checksum: 0x%x\r\n", checksum); +} + +static void +e82545_write_mdi(struct e82545_softc *sc, uint8_t reg_addr, + uint8_t phy_addr, uint32_t data) +{ + DPRINTF("Write mdi reg:0x%x phy:0x%x data: 0x%x\r\n", reg_addr, phy_addr, data); +} + +static uint32_t +e82545_read_mdi(struct e82545_softc *sc, uint8_t reg_addr, + uint8_t phy_addr) +{ + //DPRINTF("Read mdi reg:0x%x phy:0x%x\r\n", reg_addr, phy_addr); + switch (reg_addr) { + case PHY_STATUS: + return (MII_SR_LINK_STATUS | MII_SR_AUTONEG_CAPS | + MII_SR_AUTONEG_COMPLETE); + case PHY_AUTONEG_ADV: + return NWAY_AR_SELECTOR_FIELD; + case PHY_LP_ABILITY: + return 0; + case PHY_1000T_STATUS: + return (SR_1000T_LP_FD_CAPS | SR_1000T_REMOTE_RX_STATUS | + SR_1000T_LOCAL_RX_STATUS); + case PHY_ID1: + return (M88E1011_I_PHY_ID >> 16) & 0xFFFF; + case PHY_ID2: + return (M88E1011_I_PHY_ID | E82545_REVISION_4) & 0xFFFF; + default: + DPRINTF("Unknown mdi read reg:0x%x phy:0x%x\r\n", reg_addr, phy_addr); + return 0; + } + /* not reached */ +} + +static void +e82545_eecd_strobe(struct e82545_softc *sc) +{ + /* Microwire state machine */ + /* + DPRINTF("eeprom state machine srtobe " + "0x%x 0x%x 0x%x 0x%x\r\n", + sc->nvm_mode, sc->nvm_bits, + sc->nvm_opaddr, sc->nvm_data);*/ + + if (sc->nvm_bits == 0) { + DPRINTF("eeprom state machine not expecting data! " + "0x%x 0x%x 0x%x 0x%x\r\n", + sc->nvm_mode, sc->nvm_bits, + sc->nvm_opaddr, sc->nvm_data); + return; + } + sc->nvm_bits--; + if (sc->nvm_mode == E82545_NVM_MODE_DATAOUT) { + /* shifting out */ + if (sc->nvm_data & 0x8000) { + sc->eeprom_control |= E1000_EECD_DO; + } else { + sc->eeprom_control &= ~E1000_EECD_DO; + } + sc->nvm_data <<= 1; + if (sc->nvm_bits == 0) { + /* read done, back to opcode mode. */ + sc->nvm_opaddr = 0; + sc->nvm_mode = E82545_NVM_MODE_OPADDR; + sc->nvm_bits = E82545_NVM_OPADDR_BITS; + } + } else if (sc->nvm_mode == E82545_NVM_MODE_DATAIN) { + /* shifting in */ + sc->nvm_data <<= 1; + if (sc->eeprom_control & E1000_EECD_DI) { + sc->nvm_data |= 1; + } + if (sc->nvm_bits == 0) { + /* eeprom write */ + uint16_t op = sc->nvm_opaddr & E82545_NVM_OPCODE_MASK; + uint16_t addr = sc->nvm_opaddr & E82545_NVM_ADDR_MASK; + if (op != E82545_NVM_OPCODE_WRITE) { + DPRINTF("Illegal eeprom write op 0x%x\r\n", + sc->nvm_opaddr); + } else if (addr >= E82545_NVM_EEPROM_SIZE) { + DPRINTF("Illegal eeprom write addr 0x%x\r\n", + sc->nvm_opaddr); + } else { + DPRINTF("eeprom write eeprom[0x%x] = 0x%x\r\n", + addr, sc->nvm_data); + sc->eeprom_data[addr] = sc->nvm_data; + } + /* back to opcode mode */ + sc->nvm_opaddr = 0; + sc->nvm_mode = E82545_NVM_MODE_OPADDR; + sc->nvm_bits = E82545_NVM_OPADDR_BITS; + } + } else if (sc->nvm_mode == E82545_NVM_MODE_OPADDR) { + sc->nvm_opaddr <<= 1; + if (sc->eeprom_control & E1000_EECD_DI) { + sc->nvm_opaddr |= 1; + } + if (sc->nvm_bits == 0) { + uint16_t op = sc->nvm_opaddr & E82545_NVM_OPCODE_MASK; + switch (op) { + case E82545_NVM_OPCODE_EWEN: + DPRINTF("eeprom write enable: 0x%x\r\n", + sc->nvm_opaddr); + /* back to opcode mode */ + sc->nvm_opaddr = 0; + sc->nvm_mode = E82545_NVM_MODE_OPADDR; + sc->nvm_bits = E82545_NVM_OPADDR_BITS; + break; + case E82545_NVM_OPCODE_READ: + { + uint16_t addr = sc->nvm_opaddr & + E82545_NVM_ADDR_MASK; + sc->nvm_mode = E82545_NVM_MODE_DATAOUT; + sc->nvm_bits = E82545_NVM_DATA_BITS; + if (addr < E82545_NVM_EEPROM_SIZE) { + sc->nvm_data = sc->eeprom_data[addr]; + DPRINTF("eeprom read: eeprom[0x%x] = 0x%x\r\n", + addr, sc->nvm_data); + } else { + DPRINTF("eeprom illegal read: 0x%x\r\n", + sc->nvm_opaddr); + sc->nvm_data = 0; + } + break; + } + case E82545_NVM_OPCODE_WRITE: + sc->nvm_mode = E82545_NVM_MODE_DATAIN; + sc->nvm_bits = E82545_NVM_DATA_BITS; + sc->nvm_data = 0; + break; + default: + DPRINTF("eeprom unknown op: 0x%x\r\r", + sc->nvm_opaddr); + /* back to opcode mode */ + sc->nvm_opaddr = 0; + sc->nvm_mode = E82545_NVM_MODE_OPADDR; + sc->nvm_bits = E82545_NVM_OPADDR_BITS; + } + } + } else { + DPRINTF("eeprom state machine wrong state! " + "0x%x 0x%x 0x%x 0x%x\r\n", + sc->nvm_mode, sc->nvm_bits, + sc->nvm_opaddr, sc->nvm_data); + } +} + +static void +e82545_itr_callback(int fd, enum ev_type type, void *param) +{ + uint32_t new; + struct e82545_softc *sc = param; + + pthread_mutex_lock(&sc->esc_mtx); + new = sc->esc_ICR & sc->esc_IMS; + if (new && !sc->esc_irq_asserted) { + DPRINTF("itr callback: lintr assert %x\r\n", new); + sc->esc_irq_asserted = 1; + pci_lintr_assert(sc->esc_pi); + } else { + mevent_delete(sc->esc_mevpitr); + sc->esc_mevpitr = NULL; + } + pthread_mutex_unlock(&sc->esc_mtx); +} + +static void +e82545_icr_assert(struct e82545_softc *sc, uint32_t bits) +{ + uint32_t new; + + DPRINTF("icr assert: 0x%x\r\n", bits); + + /* + * An interrupt is only generated if bits are set that + * aren't already in the ICR, these bits are unmasked, + * and there isn't an interrupt already pending. + */ + new = bits & ~sc->esc_ICR & sc->esc_IMS; + sc->esc_ICR |= bits; + + if (new == 0) { + DPRINTF("icr assert: masked %x, ims %x\r\n", new, sc->esc_IMS); + } else if (sc->esc_mevpitr != NULL) { + DPRINTF("icr assert: throttled %x, ims %x\r\n", new, sc->esc_IMS); + } else if (!sc->esc_irq_asserted) { + DPRINTF("icr assert: lintr assert %x\r\n", new); + sc->esc_irq_asserted = 1; + pci_lintr_assert(sc->esc_pi); + if (sc->esc_ITR != 0) { + sc->esc_mevpitr = mevent_add( + (sc->esc_ITR + 3905) / 3906, /* 256ns -> 1ms */ + EVF_TIMER, e82545_itr_callback, sc); + } + } +} + +static void +e82545_ims_change(struct e82545_softc *sc, uint32_t bits) +{ + uint32_t new; + + /* + * Changing the mask may allow previously asserted + * but masked interrupt requests to generate an interrupt. + */ + new = bits & sc->esc_ICR & ~sc->esc_IMS; + sc->esc_IMS |= bits; + + if (new == 0) { + DPRINTF("ims change: masked %x, ims %x\r\n", new, sc->esc_IMS); + } else if (sc->esc_mevpitr != NULL) { + DPRINTF("ims change: throttled %x, ims %x\r\n", new, sc->esc_IMS); + } else if (!sc->esc_irq_asserted) { + DPRINTF("ims change: lintr assert %x\n\r", new); + sc->esc_irq_asserted = 1; + pci_lintr_assert(sc->esc_pi); + if (sc->esc_ITR != 0) { + sc->esc_mevpitr = mevent_add( + (sc->esc_ITR + 3905) / 3906, /* 256ns -> 1ms */ + EVF_TIMER, e82545_itr_callback, sc); + } + } +} + +static void +e82545_icr_deassert(struct e82545_softc *sc, uint32_t bits) +{ + + DPRINTF("icr deassert: 0x%x\r\n", bits); + sc->esc_ICR &= ~bits; + + /* + * If there are no longer any interrupt sources and there + * was an asserted interrupt, clear it + */ + if (sc->esc_irq_asserted && !(sc->esc_ICR & sc->esc_IMS)) { + DPRINTF("icr deassert: lintr deassert %x\r\n", bits); + pci_lintr_deassert(sc->esc_pi); + sc->esc_irq_asserted = 0; + } +} + +static void +e82545_intr_write(struct e82545_softc *sc, uint32_t offset, uint32_t value) +{ + + DPRINTF("intr_write: off %x, val %x\n\r", offset, value); + + switch (offset) { + case E1000_ICR: + e82545_icr_deassert(sc, value); + break; + case E1000_ITR: + sc->esc_ITR = value; + break; + case E1000_ICS: + sc->esc_ICS = value; /* not used: store for debug */ + e82545_icr_assert(sc, value); + break; + case E1000_IMS: + e82545_ims_change(sc, value); + break; + case E1000_IMC: + sc->esc_IMC = value; /* for debug */ + sc->esc_IMS &= ~value; + // XXX clear interrupts if all ICR bits now masked + // and interrupt was pending ? + break; + default: + break; + } +} + +static uint32_t +e82545_intr_read(struct e82545_softc *sc, uint32_t offset) +{ + uint32_t retval; + + retval = 0; + + DPRINTF("intr_read: off %x\n\r", offset); + + switch (offset) { + case E1000_ICR: + retval = sc->esc_ICR; + sc->esc_ICR = 0; + e82545_icr_deassert(sc, ~0); + break; + case E1000_ITR: + retval = sc->esc_ITR; + break; + case E1000_ICS: + /* write-only register */ + break; + case E1000_IMS: + retval = sc->esc_IMS; + break; + case E1000_IMC: + /* write-only register */ + break; + default: + break; + } + + return (retval); +} + +static void +e82545_devctl(struct e82545_softc *sc, uint32_t val) +{ + + sc->esc_CTRL = val & ~E1000_CTRL_RST; + + if (val & E1000_CTRL_RST) { + DPRINTF("e1k: s/w reset, ctl %x\n", val); + e82545_reset(sc, 1); + } + /* XXX check for phy reset ? */ +} + +static void +e82545_rx_update_rdba(struct e82545_softc *sc) +{ + + /* XXX verify desc base/len within phys mem range */ + sc->esc_rdba = (uint64_t)sc->esc_RDBAH << 32 | + sc->esc_RDBAL; + + /* Cache host mapping of guest descriptor array */ + sc->esc_rxdesc = paddr_guest2host(sc->esc_ctx, + sc->esc_rdba, sc->esc_RDLEN); +} + +static void +e82545_rx_ctl(struct e82545_softc *sc, uint32_t val) +{ + int on; + + on = ((val & E1000_RCTL_EN) == E1000_RCTL_EN); + + /* Save RCTL after stripping reserved bits 31:27,24,21,14,11:10,0 */ + sc->esc_RCTL = val & ~0xF9204c01; + + DPRINTF("rx_ctl - %s RCTL %x, val %x\n", + on ? "on" : "off", sc->esc_RCTL, val); + + /* state change requested */ + if (on != sc->esc_rx_enabled) { + if (on) { + /* Catch disallowed/unimplemented settings */ + //assert(!(val & E1000_RCTL_LBM_TCVR)); + + if (sc->esc_RCTL & E1000_RCTL_LBM_TCVR) { + sc->esc_rx_loopback = 1; + } else { + sc->esc_rx_loopback = 0; + } + + e82545_rx_update_rdba(sc); + e82545_rx_enable(sc); + } else { + e82545_rx_disable(sc); + sc->esc_rx_loopback = 0; + sc->esc_rdba = 0; + sc->esc_rxdesc = NULL; + } + } +} + +static void +e82545_tx_update_tdba(struct e82545_softc *sc) +{ + + /* XXX verify desc base/len within phys mem range */ + sc->esc_tdba = (uint64_t)sc->esc_TDBAH << 32 | sc->esc_TDBAL; + + /* Cache host mapping of guest descriptor array */ + sc->esc_txdesc = paddr_guest2host(sc->esc_ctx, sc->esc_tdba, + sc->esc_TDLEN); +} + +static void +e82545_tx_ctl(struct e82545_softc *sc, uint32_t val) +{ + int on; + + on = ((val & E1000_TCTL_EN) == E1000_TCTL_EN); + + /* ignore TCTL_EN settings that don't change state */ + if (on == sc->esc_tx_enabled) + return; + + if (on) { + e82545_tx_update_tdba(sc); + e82545_tx_enable(sc); + } else { + e82545_tx_disable(sc); + sc->esc_tdba = 0; + sc->esc_txdesc = NULL; + } + + /* Save TCTL value after stripping reserved bits 31:25,23,2,0 */ + sc->esc_TCTL = val & ~0xFE800005; +} + +int +e82545_bufsz(uint32_t rctl) +{ + + switch (rctl & (E1000_RCTL_BSEX | E1000_RCTL_SZ_256)) { + case (E1000_RCTL_SZ_2048): return (2048); + case (E1000_RCTL_SZ_1024): return (1024); + case (E1000_RCTL_SZ_512): return (512); + case (E1000_RCTL_SZ_256): return (256); + case (E1000_RCTL_BSEX|E1000_RCTL_SZ_16384): return (16384); + case (E1000_RCTL_BSEX|E1000_RCTL_SZ_8192): return (8192); + case (E1000_RCTL_BSEX|E1000_RCTL_SZ_4096): return (4096); + } + return (256); /* Forbidden value. */ +} + +static uint8_t dummybuf[2048]; + +/* XXX one packet at a time until this is debugged */ +static void +e82545_tap_callback(int fd, enum ev_type type, void *param) +{ + struct e82545_softc *sc = param; + struct e1000_rx_desc *rxd; + struct iovec vec[64]; + int left, len, lim, maxpktsz, maxpktdesc, bufsz, i, n, size; + uint32_t cause = 0; + uint16_t *tp, tag, head; + + pthread_mutex_lock(&sc->esc_mtx); + DPRINTF("rx_run: head %x, tail %x\r\n", sc->esc_RDH, sc->esc_RDT); + + if (!sc->esc_rx_enabled || sc->esc_rx_loopback) { + DPRINTF("rx disabled (!%d || %d) -- packet(s) dropped\r\n", + sc->esc_rx_enabled, sc->esc_rx_loopback); + while (read(sc->esc_tapfd, dummybuf, sizeof(dummybuf)) > 0) { + } + goto done1; + } + bufsz = e82545_bufsz(sc->esc_RCTL); + maxpktsz = (sc->esc_RCTL & E1000_RCTL_LPE) ? 16384 : 1522; + maxpktdesc = (maxpktsz + bufsz - 1) / bufsz; + size = sc->esc_RDLEN / 16; + head = sc->esc_RDH; + left = (size + sc->esc_RDT - head) % size; + if (left < maxpktdesc) { + DPRINTF("rx overflow (%d < %d) -- packet(s) dropped\r\n", + left, maxpktdesc); + while (read(sc->esc_tapfd, dummybuf, sizeof(dummybuf)) > 0) { + } + goto done1; + } + + sc->esc_rx_active = 1; + pthread_mutex_unlock(&sc->esc_mtx); + + for (lim = size / 4; lim > 0 && left >= maxpktdesc; lim -= n) { + + /* Grab rx descriptor pointed to by the head pointer */ + for (i = 0; i < maxpktdesc; i++) { + rxd = &sc->esc_rxdesc[(head + i) % size]; + vec[i].iov_base = paddr_guest2host(sc->esc_ctx, + rxd->buffer_addr, bufsz); + vec[i].iov_len = bufsz; + } + len = readv(sc->esc_tapfd, vec, maxpktdesc); + if (len <= 0) { + DPRINTF("tap: readv() returned %d\n", len); + goto done; + } + + /* + * Adjust the packet length based on whether the CRC needs + * to be stripped or if the packet is less than the minimum + * eth packet size. + */ + if (len < ETHER_MIN_LEN - ETHER_CRC_LEN) + len = ETHER_MIN_LEN - ETHER_CRC_LEN; + if (!(sc->esc_RCTL & E1000_RCTL_SECRC)) + len += ETHER_CRC_LEN; + n = (len + bufsz - 1) / bufsz; + + DPRINTF("packet read %d bytes, %d segs, head %d\r\n", + len, n, head); + + /* Apply VLAN filter. */ + tp = (uint16_t *)vec[0].iov_base + 6; + if ((sc->esc_RCTL & E1000_RCTL_VFE) && + (ntohs(tp[0]) == sc->esc_VET)) { + tag = ntohs(tp[1]) & 0x0fff; + if ((sc->esc_fvlan[tag >> 5] & + (1 << (tag & 0x1f))) != 0) { + DPRINTF("known VLAN %d\r\n", tag); + } else { + DPRINTF("unknown VLAN %d\r\n", tag); + n = 0; + continue; + } + } + + /* Update all consumed descriptors. */ + for (i = 0; i < n - 1; i++) { + rxd = &sc->esc_rxdesc[(head + i) % size]; + rxd->length = bufsz; + rxd->csum = 0; + rxd->errors = 0; + rxd->special = 0; + rxd->status = E1000_RXD_STAT_DD; + } + rxd = &sc->esc_rxdesc[(head + i) % size]; + rxd->length = len % bufsz; + rxd->csum = 0; + rxd->errors = 0; + rxd->special = 0; + /* XXX signal no checksum for now */ + rxd->status = E1000_RXD_STAT_PIF | E1000_RXD_STAT_IXSM | + E1000_RXD_STAT_EOP | E1000_RXD_STAT_DD; + + /* Schedule receive interrupts. */ + if (len <= sc->esc_RSRPD) { + cause |= E1000_ICR_SRPD | E1000_ICR_RXT0; + } else { + /* XXX: RDRT and RADV timers should be here. */ + cause |= E1000_ICR_RXT0; + } + + head = (head + n) % size; + left -= n; + } + +done: + pthread_mutex_lock(&sc->esc_mtx); + sc->esc_rx_active = 0; + if (sc->esc_rx_enabled == 0) + pthread_cond_signal(&sc->esc_rx_cond); + + sc->esc_RDH = head; + /* Respect E1000_RCTL_RDMTS */ + left = (size + sc->esc_RDT - head) % size; + if (left < (size >> (((sc->esc_RCTL >> 8) & 3) + 1))) + cause |= E1000_ICR_RXDMT0; + /* Assert all accumulated interrupts. */ + if (cause != 0) + e82545_icr_assert(sc, cause); +done1: + DPRINTF("rx_run done: head %x, tail %x\r\n", sc->esc_RDH, sc->esc_RDT); + pthread_mutex_unlock(&sc->esc_mtx); +} + +static uint16_t +e82545_carry(uint32_t sum) +{ + + sum = (sum & 0xFFFF) + (sum >> 16); + if (sum > 0xFFFF) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 9 20:43:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 025BCB76A07; Sat, 9 Jul 2016 20:43:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93DF2183D; Sat, 9 Jul 2016 20:43:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69Kh09j095298; Sat, 9 Jul 2016 20:43:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69Kgv6b095261; Sat, 9 Jul 2016 20:42:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607092042.u69Kgv6b095261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 9 Jul 2016 20:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302505 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 20:43:02 -0000 Author: ian Date: Sat Jul 9 20:42:57 2016 New Revision: 302505 URL: https://svnweb.freebsd.org/changeset/base/302505 Log: Consolidate debugging options from all arm kernel configs to std.arm[v6]. Modified: head/sys/arm/conf/A10 head/sys/arm/conf/ALLWINNER head/sys/arm/conf/ALPINE head/sys/arm/conf/AML8726 head/sys/arm/conf/ARMADA38X head/sys/arm/conf/ARMADAXP head/sys/arm/conf/ATMEL head/sys/arm/conf/AVILA head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/conf/KB920X head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/RPI2 head/sys/arm/conf/SAM9260EK head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SHEEVAPLUG head/sys/arm/conf/SN9G45 head/sys/arm/conf/SOCKIT.common head/sys/arm/conf/TEGRA124 head/sys/arm/conf/TS7800 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VIRT head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD head/sys/arm/conf/std.arm head/sys/arm/conf/std.armv6 Modified: head/sys/arm/conf/A10 ============================================================================== --- head/sys/arm/conf/A10 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/A10 Sat Jul 9 20:42:57 2016 (r302505) @@ -33,21 +33,6 @@ options SCHED_4BSD # 4BSD scheduler options PLATFORM options MULTIDELAY -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -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: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -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 DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -97,9 +82,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device uhci device ohci device ehci Modified: head/sys/arm/conf/ALLWINNER ============================================================================== --- head/sys/arm/conf/ALLWINNER Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/ALLWINNER Sat Jul 9 20:42:57 2016 (r302505) @@ -39,21 +39,6 @@ options PLATFORM options PLATFORM_SMP options MULTIDELAY -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -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: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -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 DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -109,9 +94,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device uhci device ohci device ehci Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/ALPINE Sat Jul 9 20:42:57 2016 (r302505) @@ -29,12 +29,6 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores -# Debugging -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB -options DDB #Enable the kernel debugger - # Interrupt controller device gic options INTRNG Modified: head/sys/arm/conf/AML8726 ============================================================================== --- head/sys/arm/conf/AML8726 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/AML8726 Sat Jul 9 20:42:57 2016 (r302505) @@ -28,22 +28,6 @@ options SCHED_ULE # ULE scheduler options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options LINUX_BOOT_ABI -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -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 DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -94,9 +78,6 @@ device bpf # Berkeley packet filter device usb # General USB code (mandatory for USB) device dwcotg # DWC OTG controller options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device ukbd # USB keyboard #device ums # USB mouse Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/ARMADA38X Sat Jul 9 20:42:57 2016 (r302505) @@ -11,7 +11,6 @@ ident ARMADA38X options SOC_MV_ARMADA38X -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options MD_ROOT @@ -24,22 +23,6 @@ options SCHED_ULE # ULE scheduler options SMP -# Debugging -#options DEBUG -#options VERBOSE_SYSINIT -options ALT_BREAK_TO_DEBUGGER -options DDB -#options GDB -#options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options KDB_TRACE -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB -#options BOOTVERBOSE - # Pseudo devices device random device pty Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/ARMADAXP Sat Jul 9 20:42:57 2016 (r302505) @@ -31,28 +31,6 @@ options HZ=1000 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options GDB -#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 WITNESS_KDB -#options DIAGNOSTIC -#options KTR -#options KTR_VERBOSE=0 -#options KTR_ENTRIES=16384 -#options KTR_MASK=(KTR_SPARE2) -#options KTR_COMPILE=KTR_ALL - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -73,7 +51,6 @@ device loop device md # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/ATMEL Sat Jul 9 20:42:57 2016 (r302505) @@ -31,8 +31,6 @@ device at91_board_sam9x25ek device at91_board_sn9g45 device at91_board_tsc4370 -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -72,20 +70,6 @@ options PRINTF_BUFR_SIZE=128 # Prevent #options MAC # TrustedBSD MAC Framework #options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging support. Always need this: -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -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 - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -152,10 +136,8 @@ device ses # Enclosure Services (SES # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/AVILA Sat Jul 9 20:42:57 2016 (r302505) @@ -29,23 +29,11 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT hints "AVILA.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale #options HZ=1000 options HZ=100 options DEVICE_POLLING -# Debugging for use in -current -options KDB -#options GDB -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options GEOM_PART_BSD # BSD partition scheme @@ -146,7 +134,6 @@ device ath_ar9160 device ath_ar9280 device usb -#options USB_DEBUG device ohci device ehci device umass Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/BEAGLEBONE Sat Jul 9 20:42:57 2016 (r302505) @@ -34,21 +34,6 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options PLATFORM -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -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: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -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 DIAGNOSTIC - # NFS server support #options NFSD @@ -114,9 +99,6 @@ device pmu # USB support device usb options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE device musb device umass device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/BWCT ============================================================================== --- head/sys/arm/conf/BWCT Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/BWCT Sat Jul 9 20:42:57 2016 (r302505) @@ -30,8 +30,6 @@ include "../at91/std.bwct" hints "BWCT.hints" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -59,16 +57,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - options BOOTP options BOOTP_NFSROOT @@ -120,11 +108,8 @@ device md # Memory "disks" # Serial (COM) ports device uart # Multi-uart driver -options BREAK_TO_DEBUGGER -options ALT_BREAK_TO_DEBUGGER # USB support -#options USB_DEBUG #device ohci #device usb #device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/CAMBRIA Sat Jul 9 20:42:57 2016 (r302505) @@ -28,24 +28,12 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT #To statically compile in device wiring instead of /boot/device.hints hints "CAMBRIA.hints" # Default places to look for devices. -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale makeoptions MODULES_OVERRIDE="" #options HZ=1000 options HZ=100 options DEVICE_POLLING -# Debugging for use in -current -options KDB -#options GDB -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - options SCHED_4BSD # 4BSD scheduler #options PREEMPTION options INET # InterNETworking @@ -141,7 +129,6 @@ device ath_hal # NB: 2 USB 2.0 ports standard device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order -#options USB_DEBUG device ehci device umass device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/CNS11XXNAS Sat Jul 9 20:42:57 2016 (r302505) @@ -30,21 +30,9 @@ include "../cavium/cns11xx/std.econa" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 options DEVICE_POLLING -# Debugging for use in -current -options KDB -#options GDB -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - options SCHED_ULE # ULE scheduler #options SCHED_4BSD # 4BSD scheduler @@ -102,7 +90,6 @@ device random # Entropy device device usb -#options USB_DEBUG device ohci device ehci device umass Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/CRB Sat Jul 9 20:42:57 2016 (r302505) @@ -27,10 +27,8 @@ options COUNTS_PER_SEC=400000000 include "../xscale/i8134x/std.crb" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale options HZ=100 -options BREAK_TO_DEBUGGER #options DEVICE_POLLING options SCHED_4BSD # 4BSD scheduler @@ -90,16 +88,6 @@ device "7seg" #options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. -# Debugging for use in -current -options KDB -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/DB-78XXX Sat Jul 9 20:42:57 2016 (r302505) @@ -10,7 +10,6 @@ include "../mv/discovery/std.db78xxx" options SOC_MV_DISCOVERY -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler @@ -40,18 +39,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -#options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - device pci # Pseudo devices @@ -71,7 +58,6 @@ device e1000phy device bpf # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/DB-88F5XXX Sat Jul 9 20:42:57 2016 (r302505) @@ -10,7 +10,6 @@ include "../mv/orion/std.db88f5xxx" options SOC_MV_ORION -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler @@ -39,18 +38,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -#options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - device pci # Pseudo devices @@ -78,7 +65,6 @@ device twsi device ds133x # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/DB-88F6XXX Sat Jul 9 20:42:57 2016 (r302505) @@ -32,19 +32,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging for use in -current -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#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 WITNESS_KDB -#options DIAGNOSTIC - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -76,7 +63,6 @@ device crypto device cryptodev # USB -options USB_DEBUG # enable debug msgs device usb device ehci device umass Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/DOCKSTAR Sat Jul 9 20:42:57 2016 (r302505) @@ -48,18 +48,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -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 WITNESS_KDB -#options DIAGNOSTIC - # Enable these options for nfs root configured via BOOTP. #options BOOTP #options BOOTP_NFSROOT @@ -101,7 +89,6 @@ device e1000phy # USB options USB_HOST_ALIGN=32 # Align DMA to cacheline -#options USB_DEBUG # Compile in USB debug support device usb # Basic usb support device ehci # USB host controller device umass # Mass storage Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/DREAMPLUG-1001 Sat Jul 9 20:42:57 2016 (r302505) @@ -51,18 +51,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -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 WITNESS_KDB -#options DIAGNOSTIC - # Enable these options for nfs root configured via BOOTP. #options BOOTP #options BOOTP_NFSROOT @@ -105,7 +93,6 @@ device e1000phy # USB options USB_HOST_ALIGN=32 # Align DMA to cacheline -#options USB_DEBUG # Compile in USB debug support device usb # Basic usb support device ehci # USB host controller device umass # Mass storage Modified: head/sys/arm/conf/EA3250 ============================================================================== --- head/sys/arm/conf/EA3250 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/EA3250 Sat Jul 9 20:42:57 2016 (r302505) @@ -11,7 +11,6 @@ hints "EA3250.hints" makeoptions MODULES_OVERRIDE="" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler @@ -41,18 +40,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging -options ALT_BREAK_TO_DEBUGGER -options DDB -#options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - # Pseudo devices device loop device md @@ -69,7 +56,6 @@ device bpf device lpe # USB -options USB_DEBUG device usb device ohci device umass Modified: head/sys/arm/conf/EB9200 ============================================================================== --- head/sys/arm/conf/EB9200 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/EB9200 Sat Jul 9 20:42:57 2016 (r302505) @@ -23,8 +23,6 @@ include "../at91/std.eb9200" hints "EB9200.hints" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -53,15 +51,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#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 - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -115,7 +104,6 @@ device pass # Passthrough device (dir device uart # Multi-uart driver # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/EFIKA_MX Sat Jul 9 20:42:57 2016 (r302505) @@ -33,22 +33,6 @@ options SCHED_4BSD # 4BSD scheduler options PLATFORM options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -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: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#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 - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -83,7 +67,6 @@ device ether # Ethernet support # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions @@ -104,7 +87,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -#options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/ETHERNUT5 ============================================================================== --- head/sys/arm/conf/ETHERNUT5 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/ETHERNUT5 Sat Jul 9 20:42:57 2016 (r302505) @@ -27,8 +27,6 @@ include "../at91/std.ethernut5" # To statically compile in device wiring instead of /boot/device.hints hints "ETHERNUT5.hints" -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -68,20 +66,6 @@ options PRINTF_BUFR_SIZE=128 # Prevent #options MAC # TrustedBSD MAC Framework #options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging support. Always need this: -#options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -#options DDB # Enable the kernel debugger -#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 - # NFS root from boopt/dhcp options BOOTP options BOOTP_NFSROOT @@ -148,10 +132,8 @@ device ether # Ethernet support # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER # USB support -#options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) #device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/EXYNOS5.common Sat Jul 9 20:42:57 2016 (r302505) @@ -56,21 +56,6 @@ options FREEBSD_BOOT_LOADER # Process m options VFP # Enable floating point hardware support options SMP # Enable multiple cores -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -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: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -103,9 +88,6 @@ device gpio # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE #device musb device ehci #device ohci Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/GUMSTIX Sat Jul 9 20:42:57 2016 (r302505) @@ -33,7 +33,6 @@ options KERNVIRTADDR=0xc0200000 # Used include "../xscale/pxa/std.pxa" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 #options DEVICE_POLLING @@ -78,15 +77,5 @@ device smcphy device uart device uart_ns8250 -# Debugging for use in -current -options KDB -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - device md device random # Entropy device Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/HL200 Sat Jul 9 20:42:57 2016 (r302505) @@ -28,8 +28,6 @@ include "../at91/std.hl200" hints "KB920X.hints" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -57,15 +55,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#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 BOOTP options BOOTP_NFSROOT options BOOTP_COMPAT @@ -123,7 +112,6 @@ device pass # Passthrough device (dir device uart # Multi-uart driver # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/HL201 Sat Jul 9 20:42:57 2016 (r302505) @@ -26,8 +26,6 @@ include "../at91/std.hl201" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -56,15 +54,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -114,7 +103,6 @@ device pass # Passthrough device (dir # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER # USB support device ohci # OHCI USB interface Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/IMX53 Sat Jul 9 20:42:57 2016 (r302505) @@ -30,20 +30,6 @@ options SCHED_4BSD # 4BSD scheduler options PLATFORM options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#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 - # kernel/memory size reduction #options MUTEX_NOINLINE #options NO_FFS_SNAPSHOT @@ -72,7 +58,6 @@ device miibus # Standard mii bus # Serial (COM) ports device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions @@ -93,7 +78,6 @@ device pass # Passthrough device (dir # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/IMX6 Sat Jul 9 20:42:57 2016 (r302505) @@ -33,23 +33,6 @@ options INCLUDE_CONFIG_FILE # Include t options PLATFORM options SMP # Enable multiple cores -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -#options GDB # Support remote GDB. -# Other debugging options... -options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#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 DIAGNOSTIC - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -97,7 +80,6 @@ device cd # CD device pass # Passthrough device (direct ATA/SCSI access) # USB support -#options USB_DEBUG # enable debug msgs device ehci # OHCI USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/KB920X Sat Jul 9 20:42:57 2016 (r302505) @@ -29,8 +29,6 @@ include "../at91/std.kb920x" hints "KB920X.hints" makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols @@ -58,15 +56,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Debugging for use in -current -options KDB # Enable kernel debugger support -options DDB # Enable the kernel debugger -#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 - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -130,7 +119,6 @@ device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm # USB support -options USB_DEBUG # enable debug msgs device ohci # OHCI USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Sat Jul 9 20:41:59 2016 (r302504) +++ head/sys/arm/conf/NSLU Sat Jul 9 20:42:57 2016 (r302505) @@ -36,22 +36,10 @@ options XSCALE_CACHE_READ_WRITE_ALLOCAT hints "NSLU.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 9 21:15:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D31CBB76FBC; Sat, 9 Jul 2016 21:15:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B099014E7; Sat, 9 Jul 2016 21:15:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69LF1pY006468; Sat, 9 Jul 2016 21:15:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69LExic006436; Sat, 9 Jul 2016 21:14:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607092114.u69LExic006436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 9 Jul 2016 21:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302506 - 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 21:15:02 -0000 Author: ian Date: Sat Jul 9 21:14:59 2016 New Revision: 302506 URL: https://svnweb.freebsd.org/changeset/base/302506 Log: Remove HZ= from all armv6 configs, put HZ=1000 in std.armv6. All armv6 processors are plenty fast enough for HZ=1000. No changes are made for older arm systems, because some chips are a bit wimpy for 1000 while others do fine, so it has to be set on a per-config basis. Modified: head/sys/arm/conf/A10 head/sys/arm/conf/ALLWINNER head/sys/arm/conf/ALPINE head/sys/arm/conf/AML8726 head/sys/arm/conf/ARMADA38X head/sys/arm/conf/ARMADAXP head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/IMX53-QSB head/sys/arm/conf/IMX6 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/RPI2 head/sys/arm/conf/SOCKIT.common head/sys/arm/conf/TEGRA124 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VIRT head/sys/arm/conf/VYBRID head/sys/arm/conf/std.armv6 Modified: head/sys/arm/conf/A10 ============================================================================== --- head/sys/arm/conf/A10 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/A10 Sat Jul 9 21:14:59 2016 (r302506) @@ -28,7 +28,6 @@ options INTRNG options SOC_ALLWINNER_A10 options SOC_ALLWINNER_A13 -options HZ=100 options SCHED_4BSD # 4BSD scheduler options PLATFORM options MULTIDELAY Modified: head/sys/arm/conf/ALLWINNER ============================================================================== --- head/sys/arm/conf/ALLWINNER Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/ALLWINNER Sat Jul 9 21:14:59 2016 (r302506) @@ -32,7 +32,6 @@ options SOC_ALLWINNER_A31S options SOC_ALLWINNER_A83T options SOC_ALLWINNER_H3 -options HZ=100 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/ALPINE Sat Jul 9 21:14:59 2016 (r302506) @@ -25,7 +25,6 @@ include "../annapurna/alpine/std.alpine makeoptions MODULES_OVERRIDE="" makeoptions WERROR="-Werror" -options HZ=100 options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores Modified: head/sys/arm/conf/AML8726 ============================================================================== --- head/sys/arm/conf/AML8726 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/AML8726 Sat Jul 9 21:14:59 2016 (r302506) @@ -23,7 +23,6 @@ ident AML8726 include "std.armv6" include "../amlogic/aml8726/std.aml8726" -options HZ=100 options SCHED_ULE # ULE scheduler options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options LINUX_BOOT_ABI Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/ARMADA38X Sat Jul 9 21:14:59 2016 (r302506) @@ -19,8 +19,6 @@ options MD_ROOT options ROOTDEVNAME=\"/dev/da0s1a\" options SCHED_ULE # ULE scheduler -#options SCHED_4BSD # 4BSD scheduler - options SMP # Pseudo devices Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/ARMADAXP Sat Jul 9 21:14:59 2016 (r302506) @@ -27,7 +27,6 @@ options SOC_MV_ARMADAXP makeoptions WERROR="-Werror" -options HZ=1000 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/BEAGLEBONE Sat Jul 9 21:14:59 2016 (r302506) @@ -30,7 +30,6 @@ makeoptions MODULES_EXTRA="dtb/am335x am options INTRNG -options HZ=100 options SCHED_4BSD # 4BSD scheduler options PLATFORM Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/EXYNOS5.common Sat Jul 9 21:14:59 2016 (r302506) @@ -21,7 +21,6 @@ makeoptions WERROR="-Werror" include "std.armv6" -options HZ=100 options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Modified: head/sys/arm/conf/IMX53-QSB ============================================================================== --- head/sys/arm/conf/IMX53-QSB Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/IMX53-QSB Sat Jul 9 21:14:59 2016 (r302506) @@ -22,8 +22,6 @@ include "IMX53" ident IMX53-QSB -options HZ=250 # 4ms scheduling quantum - # required for netbooting #options BOOTP #options BOOTP_COMPAT Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/IMX6 Sat Jul 9 21:14:59 2016 (r302506) @@ -26,7 +26,6 @@ options INTRNG options SOC_IMX6 -options HZ=500 # Scheduling quantum is 2 milliseconds. options SCHED_ULE # ULE scheduler #options NFSD # Network Filesystem Server options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/PANDABOARD Sat Jul 9 21:14:59 2016 (r302506) @@ -30,7 +30,6 @@ hints "PANDABOARD.hints" include "std.armv6" include "../ti/omap4/pandaboard/std.pandaboard" -options HZ=100 options SCHED_ULE # ULE scheduler options PLATFORM options SMP # Enable multiple cores Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/RK3188 Sat Jul 9 21:14:59 2016 (r302506) @@ -23,7 +23,6 @@ ident RK3188 include "std.armv6" include "../rockchip/std.rk30xx" -options HZ=100 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/RPI-B Sat Jul 9 21:14:59 2016 (r302506) @@ -26,7 +26,6 @@ include "../broadcom/bcm2835/std.bcm283 options INTRNG -options HZ=100 options SCHED_4BSD # 4BSD scheduler options PLATFORM Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/RPI2 Sat Jul 9 21:14:59 2016 (r302506) @@ -26,7 +26,6 @@ include "../broadcom/bcm2835/std.bcm283 options INTRNG -options HZ=100 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM Modified: head/sys/arm/conf/SOCKIT.common ============================================================================== --- head/sys/arm/conf/SOCKIT.common Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/SOCKIT.common Sat Jul 9 21:14:59 2016 (r302506) @@ -25,7 +25,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions WERROR="-Werror" -options HZ=100 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores Modified: head/sys/arm/conf/TEGRA124 ============================================================================== --- head/sys/arm/conf/TEGRA124 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/TEGRA124 Sat Jul 9 21:14:59 2016 (r302506) @@ -23,7 +23,6 @@ include "../nvidia/tegra124/std.tegra12 ident TEGRA124 -options HZ=100 # Scheduling quantum is 10 milliseconds. options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC options PLATFORM_SMP Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/VERSATILEPB Sat Jul 9 21:14:59 2016 (r302506) @@ -29,7 +29,6 @@ makeoptions MODULES_OVERRIDE="" options KERNVIRTADDR=0xc0100000 makeoptions KERNVIRTADDR=0xc0100000 -options HZ=100 options SCHED_4BSD # 4BSD scheduler options LINUX_BOOT_ABI # Process metadata passed from Linux boot loaders Modified: head/sys/arm/conf/VIRT ============================================================================== --- head/sys/arm/conf/VIRT Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/VIRT Sat Jul 9 21:14:59 2016 (r302506) @@ -23,8 +23,7 @@ ident VIRT include "std.armv6" include "../qemu/std.virt" -options HZ=100 -options SCHED_ULE # 4BSD scheduler +options SCHED_ULE # ULE scheduler options PLATFORM options PLATFORM_SMP options SMP # Enable multiple cores Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/VYBRID Sat Jul 9 21:14:59 2016 (r302506) @@ -24,7 +24,6 @@ include "../freescale/vybrid/std.vybrid makeoptions WERROR="-Werror" -options HZ=100 options SCHED_4BSD # 4BSD scheduler #options NANDFS # NAND Filesystem #options SMP # Enable multiple cores Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Sat Jul 9 20:42:57 2016 (r302505) +++ head/sys/arm/conf/std.armv6 Sat Jul 9 21:14:59 2016 (r302506) @@ -2,8 +2,8 @@ # # $FreeBSD$ +options HZ=1000 options ARM_L2_PIPT # Only L2 PIPT is supported - options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols From owner-svn-src-all@freebsd.org Sat Jul 9 22:41:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A3C9B83DEA; Sat, 9 Jul 2016 22:41:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 636FA1608; Sat, 9 Jul 2016 22:41:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69MfLcv038850; Sat, 9 Jul 2016 22:41:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69MfLSE038849; Sat, 9 Jul 2016 22:41:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607092241.u69MfLSE038849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 9 Jul 2016 22:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302507 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 22:41:22 -0000 Author: markj Date: Sat Jul 9 22:41:21 2016 New Revision: 302507 URL: https://svnweb.freebsd.org/changeset/base/302507 Log: Avoid truncating the return value of DTrace predicates. Predicates are DIF objects whose return value is compared with zero to determine whether the corresponding probe body is to be executed. The return value itself is the contents of a 64-bit DIF register, but it was being truncated to an int before the comparison. This meant that a predicate such as /0x100000000/ would evaluate to false. Reported by: rwatson MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jul 9 21:14:59 2016 (r302506) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jul 9 22:41:21 2016 (r302507) @@ -7348,7 +7348,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a if (pred != NULL) { dtrace_difo_t *dp = pred->dtp_difo; - int rval; + uint64_t rval; rval = dtrace_dif_emulate(dp, &mstate, vstate, state); From owner-svn-src-all@freebsd.org Sat Jul 9 23:22:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADA32B846D8; Sat, 9 Jul 2016 23:22:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73A9516A6; Sat, 9 Jul 2016 23:22:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u69NMiY4054409; Sat, 9 Jul 2016 23:22:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u69NMiu3054408; Sat, 9 Jul 2016 23:22:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607092322.u69NMiu3054408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 23:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302508 - head/sys/dev/ntb/ntb_hw 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.22 Precedence: list List-Id: "SVN commit messages 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, 09 Jul 2016 23:22:45 -0000 Author: mav Date: Sat Jul 9 23:22:44 2016 New Revision: 302508 URL: https://svnweb.freebsd.org/changeset/base/302508 Log: Disable SB01BASE_LOCKUP workaround when split BARs disabled. For some reason hack with sending MSI-X interrupts by writing to remote LAPIC memory works only for 32-bit BARs, that are available only if split BARs mode is enabled in BIOS. If it is not, complain loudly and fall back to less efficient workaround. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 22:41:21 2016 (r302507) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 23:22:44 2016 (r302508) @@ -450,7 +450,7 @@ ntb_vm_memattr_to_str(vm_memattr_t pat) } } -static int g_ntb_msix_idx = 0; +static int g_ntb_msix_idx = 1; SYSCTL_INT(_hw_ntb, OID_AUTO, msix_mw_idx, CTLFLAG_RDTUN, &g_ntb_msix_idx, 0, "Use this memory window to access the peer MSIX message complex on " "certain Xeon-based NTB systems, as a workaround for a hardware errata. " @@ -1440,6 +1440,16 @@ ntb_detect_xeon(struct ntb_softc *ntb) if ((ppd & XEON_PPD_SPLIT_BAR) != 0) ntb->features |= NTB_SPLIT_BAR; + if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP) && + !HAS_FEATURE(ntb, NTB_SPLIT_BAR)) { + device_printf(ntb->device, + "Can not apply SB01BASE_LOCKUP workaround " + "with split BARs disabled!\n"); + device_printf(ntb->device, + "Expect system hangs under heavy NTB traffic!\n"); + ntb->features &= ~NTB_SB01BASE_LOCKUP; + } + /* * SDOORBELL errata workaround gets in the way of SB01BASE_LOCKUP * errata workaround; only do one at a time.

+ ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;;; + ;;; + ;"";""; + ;"";""; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;"";""; + ;"";""; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + "";;""; + "";;""; + "";;""; + "";;""; + ;;; + ;;; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + ;;; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + ;;; + ;;; + ;;; + ;"";""; + ;"";""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + ;;; + ;;; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + "";;""; + ;;; + ;;; + ;;; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;"";""; + ;;; + ;;; + ;"";""; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jul 3 18:27:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84C82B90303; Sun, 3 Jul 2016 18:27:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5778C2281; Sun, 3 Jul 2016 18:27:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63IR02B079859; Sun, 3 Jul 2016 18:27:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63IR0T6079858; Sun, 3 Jul 2016 18:27:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607031827.u63IR0T6079858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 3 Jul 2016 18:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302330 - head/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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 18:27:01 -0000 Author: ngie Date: Sun Jul 3 18:27:00 2016 New Revision: 302330 URL: https://svnweb.freebsd.org/changeset/base/302330 Log: Remove ftp(1) related files when MK_FTP == no Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D6969 MFC after: 1 week Reviewed by: ngie Submitted by: rakuco Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jul 3 18:21:11 2016 (r302329) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jul 3 18:27:00 2016 (r302330) @@ -1345,6 +1345,20 @@ OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz .endif +.if ${MK_FTP} == no +OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=usr/bin/ftp +OLD_FILES+=usr/bin/gate-ftp +OLD_FILES+=usr/bin/pftp +OLD_FILES+=usr/libexec/ftpd +OLD_FILES+=usr/share/man/man1/ftp.1.gz +OLD_FILES+=usr/share/man/man1/gate-ftp.1.gz +OLD_FILES+=usr/share/man/man1/pftp.1.gz +OLD_FILES+=usr/share/man/man5/ftpchroot.5.gz +OLD_FILES+=usr/share/man/man8/ftpd.8.gz +.endif + .if ${MK_GNUCXX} == no OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/include/c++/4.2/algorithm From owner-svn-src-all@freebsd.org Sun Jul 3 19:06:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF6EFB90C52; Sun, 3 Jul 2016 19:06:16 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv157.fwdcdn.com (frv157.fwdcdn.com [212.42.77.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA252843; Sun, 3 Jul 2016 19:06:16 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=JpdL8/NR6TVeHEzZnsLKT62ietp2c0HILrULgycYjhY=; b=JLgY3VDAm0RZd2EqmWu0AEgE85jzJovMZ39iKznKA0uKJAR1ybUB7a6N1cqMtjFr8KYE3v1K48fOUyn5bouXq9LulCycQXPfQQvkhDWMYAozzrDSY3mO9kCzlhzKynq12EMj9oMTw7Z+IiRHa0U9CokFEv2upYAdHEYXFXYGzlw=; Received: from [37.229.193.176] (helo=nonamehost.local) by frv157.fwdcdn.com with esmtpsa ID 1bJmiW-000DEj-1w ; Sun, 03 Jul 2016 22:06:08 +0300 Date: Sun, 3 Jul 2016 22:06:07 +0300 From: Ivan Klymenko To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302329 - in head: . etc/mtree share share/colldef share/ctypedef share/locale-links share/monetdef share/msgdef share/numericdef share/timedef tools/build/mk tools/tools/locale/tools Message-ID: <20160703220607.1ffd20ca@nonamehost.local> In-Reply-To: <201607031821.u63ILBL1076497@repo.freebsd.org> References: <201607031821.u63ILBL1076497@repo.freebsd.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=37.229.193.176; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 19:06:17 -0000 On Sun, 3 Jul 2016 18:21:11 +0000 (UTC) Baptiste Daroussin wrote: > Author: bapt > Date: Sun Jul 3 18:21:11 2016 > New Revision: 302329 > URL: https://svnweb.freebsd.org/changeset/base/302329 > > Log: > Posixify the locales name for variants > > For all locales with variants: > - if no ambiguity on the locale (only one variant) just use the > regular name > - if ambiguity, pick one as default and append @ to the > others respecting POSIX > > As a result: > - All the 3 components locales added recently are renamed to the > usual 2 components version for all but sr_RS.UTF-8 > - Set sr_RS.UTF-8 to the cyrillic variant > - Add sr_RS.UTF-8@latin > - Remove the symlinks aliases they were created to represent the 2 > components version as aliasas and are now useless > - Update the OptionalObsoleteFiles.inc and ObsoleteFiles.inc to > reflect those changes > > Discussed with: ache@ > Approved by: re@ (gjb) > .. --- ipf_make --- (cd /usr/src/rescue/rescue/../../sbin/ipf/ipf && make -DRESCUE CRUNCH_CFLAGS=-DRESCUE MK_AUTO_OBJ=no DIRPRFX=rescue/rescue/ipf/ depend && make -DRESCUE CRUNCH_CFLAGS=-DRESCUE MK_AUTO_OBJ=no DIRPRFX=rescue/rescue/ipf/ ipf.o ipfcomp.o ipf_y.o ipf_l.o bpf_filter.o addicmp.o addipopt.o alist_free.o alist_new.o allocmbt.o assigndefined.o bcopywrap.o binprint.o buildopts.o checkrev.o connecttcp.o count4bits.o count6bits.o debug.o dupmbt.o facpri.o familyname.o fill6bits.o findword.o flags.o freembt.o ftov.o genmask.o gethost.o getifname.o geticmptype.o getnattype.o getport.o getportproto.o getproto.o getsumd.o hostname.o icmpcode.o icmptypename.o icmptypes.o initparse.o interror.o ionames.o ipf_dotuning.o ipf_perror.o ipft_hx.o ipft_pc.o ipft_tx.o ipoptsec.o kmem.o kmemcpywrap.o kvatoname.o load_dstlist.o load_dstlistnode.o load_file.o load_hash.o load_hashnode.o load_http.o load_pool.o load_poolnode.o load_url.o mb_hexdump.o msgdsize.o mutex_emul.o nametokva.o nat_setgroupmap.o ntomask.o optname.o optprint.o optprintv6.o optvalue.o parsefields.o parseipfexpr.o parsewhoisline.o poolio.o portname.o prependmbt.o print_toif.o printactiveaddr.o printactivenat.o printaddr.o printaps.o printbuf.o printdstl_live.o printdstlist.o printdstlistdata.o printdstlistnode.o printdstlistpolicy.o printfieldhdr.o printfr.o printfraginfo.o printhash.o printhash_live.o printhashdata.o printhashnode.o printhost.o printhostmap.o printhostmask.o printifname.o printip.o printipfexpr.o printiphdr.o printlog.o printlookup.o printmask.o printnat.o printnataddr.o printnatfield.o printnatside.o printpacket.o printpacket6.o printpool.o printpool_live.o printpooldata.o printpoolfield.o printpoolnode.o printportcmp.o printproto.o printsbuf.o printstate.o printstatefields.o printtcpflags.o printtqtable.o printtunable.o printunit.o remove_hash.o remove_hashnode.o remove_pool.o remove_poolnode.o resetlexer.o rwlock_emul.o save_execute.o save_file.o save_nothing.o save_syslog.o save_v1trap.o save_v2trap.o vtof.o tcp_flags.o tcpflags.o tcpoptnames.o v6ionames.o v6optvalue.o var.o verbose.o) --- all_subdir_share --- ===> share (all) --- all_subdir_share/colldef --- ===> share/colldef (all) make[4]: make[4]: don't know how to make zh_CN.GB2312.LC_COLLATE. Stop make[4]: stopped in /usr/src/share/colldef *** [all_subdir_share/colldef] Error code 2 make[3]: stopped in /usr/src/share 1 error make[3]: stopped in /usr/src/share *** [all_subdir_share] Error code 2 make[2]: stopped in /usr/src --- all_subdir_secure --- A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/src/secure/usr.bin/openssl *** [all_subdir_secure/usr.bin/openssl] Error code 2 make[4]: stopped in /usr/src/secure/usr.bin 1 error make[4]: stopped in /usr/src/secure/usr.bin *** [all_subdir_secure/usr.bin] Error code 2 make[3]: stopped in /usr/src/secure 1 error make[3]: stopped in /usr/src/secure *** [all_subdir_secure] Error code 2 make[2]: stopped in /usr/src --- all_subdir_gnu --- A failure has been detected in another branch of the parallel make make[8]: stopped in /usr/src/gnu/usr.bin/groff/src/roff/troff *** [all_subdir_gnu/usr.bin/groff/src/roff/troff] Error code 2 make[7]: stopped in /usr/src/gnu/usr.bin/groff/src/roff 1 error make[7]: stopped in /usr/src/gnu/usr.bin/groff/src/roff *** [all_subdir_gnu/usr.bin/groff/src/roff] Error code 2 make[6]: stopped in /usr/src/gnu/usr.bin/groff/src 1 error make[6]: stopped in /usr/src/gnu/usr.bin/groff/src *** [all_subdir_gnu/usr.bin/groff/src] Error code 2 make[5]: stopped in /usr/src/gnu/usr.bin/groff 1 error make[5]: stopped in /usr/src/gnu/usr.bin/groff *** [all_subdir_gnu/usr.bin/groff] Error code 2 make[4]: stopped in /usr/src/gnu/usr.bin 1 error make[4]: stopped in /usr/src/gnu/usr.bin *** [all_subdir_gnu/usr.bin] Error code 2 make[3]: stopped in /usr/src/gnu 1 error make[3]: stopped in /usr/src/gnu *** [all_subdir_gnu] Error code 2 make[2]: stopped in /usr/src --- all_subdir_sbin --- A failure has been detected in another branch of the parallel make make[4]: stopped in /usr/src/sbin/gbde *** [all_subdir_sbin/gbde] Error code 2 make[3]: stopped in /usr/src/sbin 1 error make[3]: stopped in /usr/src/sbin *** [all_subdir_sbin] Error code 2 make[2]: stopped in /usr/src --- all_subdir_rescue --- A failure has been detected in another branch of the parallel make make[6]: stopped in /usr/src/sbin/ipf/ipf *** [ipf_make] Error code 2 make[5]: stopped in /media/da0s1/obj/usr/src/rescue/rescue 1 error make[5]: stopped in /media/da0s1/obj/usr/src/rescue/rescue *** [objs] Error code 2 make[4]: stopped in /usr/src/rescue/rescue 1 error make[4]: stopped in /usr/src/rescue/rescue *** [all] Error code 2 make[3]: stopped in /usr/src/rescue 1 error make[3]: stopped in /usr/src/rescue *** [all_subdir_rescue] Error code 2 make[2]: stopped in /usr/src 5 errors make[2]: stopped in /usr/src *** [everything] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildworld] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src From owner-svn-src-all@freebsd.org Sun Jul 3 19:31:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E13B902E0; Sun, 3 Jul 2016 19:31:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8527D2648; Sun, 3 Jul 2016 19:31:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63JVLSW005265; Sun, 3 Jul 2016 19:31:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63JVLqf005263; Sun, 3 Jul 2016 19:31:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607031931.u63JVLqf005263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 3 Jul 2016 19:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302331 - head/share/colldef 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.22 Precedence: list List-Id: "SVN commit messages 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, 03 Jul 2016 19:31:23 -0000 Author: bapt Date: Sun Jul 3 19:31:21 2016 New Revision: 302331 URL: https://svnweb.freebsd.org/changeset/base/302331 Log: Add the forgotten "svn mv" from r302329 Reported by: Ivan Klymenko Approved by: re (implicit) Added: head/share/colldef/zh_CN.GB2312.src - copied unchanged from r302330, head/share/colldef/zh_Hans_CN.GB2312.src head/share/colldef/zh_CN.eucCN.src - copied unchanged from r302330, head/share/colldef/zh_Hans_CN.eucCN.src Deleted: head/share/colldef/zh_Hans_CN.GB2312.src head/share/colldef/zh_Hans_CN.eucCN.src Copied: head/share/colldef/zh_CN.GB2312.src (from r302330, head/share/colldef/zh_Hans_CN.GB2312.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/colldef/zh_CN.GB2312.src Sun Jul 3 19:31:21 2016 (r302331, copy of r302330, head/share/colldef/zh_Hans_CN.GB2312.src) @@ -0,0 +1,19817 @@ +# Warning: Do not edit. This is automatically extracted +# from CLDR project data, obtained from http://cldr.unicode.org/ +# ----------------------------------------------------------------------------- +comment_char * +escape_char / +LC_COLLATE +************* + +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "