From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 00:08:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 168F55C8; Sun, 23 Nov 2014 00:08:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE10C75D; Sun, 23 Nov 2014 00:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN0843S088538; Sun, 23 Nov 2014 00:08:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN084xD088537; Sun, 23 Nov 2014 00:08:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411230008.sAN084xD088537@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 00:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274901 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 00:08:05 -0000 Author: bapt Date: Sun Nov 23 00:08:04 2014 New Revision: 274901 URL: https://svnweb.freebsd.org/changeset/base/274901 Log: Change man(1) to use mandoc to render manpages man(1) now first test the manpage to run with mandoc to make sure it can be rendered. In case groff cannot be found (because base has been built WITHOUT_GROFF) it recommands to install groff from the packages Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Sat Nov 22 23:50:18 2014 (r274900) +++ head/usr.bin/man/man.sh Sun Nov 23 00:08:04 2014 (r274901) @@ -276,11 +276,8 @@ man_check_for_so() { return 0 } -# Usage: man_display_page -# Display either the manpage or catpage depending on the use_cat variable man_display_page() { - local EQN NROFF PIC TBL TROFF REFER VGRIND - local IFS l nroff_dev pipeline preproc_arg tool + local IFS pipeline preconv_enc testline # We are called with IFS set to colon. This causes really weird # things to happen for the variables that have spaces in them. @@ -312,6 +309,49 @@ man_display_page() { return fi + case "${manpage}" in + *.${man_charset}/*) + case "$man_charset" in + ISO8859-1) preconv_enc="latin-1" ;; + ISO8859-15) preconv_enc="latin-1" ;; + UTF-8) preconv_enc="utf-8" ;; + esac + ;; + esac + + if [ -n "$preconv_enc" ]; then + pipeline="preconv -e $preconv_enc |" + fi + testline="$pipeline mandoc -Tlint -Werror 2>/dev/null" + pipeline="$pipeline mandoc -Tlocale | $MANPAGER" + + if ! eval "$cattool $manpage | $testline" ;then + if which -s groff2; then + man_display_page_groff + else + echo "This manpage needs groff(1) to be rendered" >&2 + echo "First install groff(1): " >&2 + echo "pkg install groff " >&2 + ret=1 + fi + return + fi + + if [ $debug -gt 0 ]; then + decho "Command: $cattool $manpage | $pipeline" + ret=0 + else + eval "$cattool $manpage | $pipeline" + ret=$? + fi +} + +# Usage: man_display_page +# Display either the manpage or catpage depending on the use_cat variable +man_display_page_groff() { + local EQN NROFF PIC TBL TROFF REFER VGRIND + local IFS l nroff_dev pipeline preproc_arg tool + # So, we really do need to parse the manpage. First, figure out the # device flag (-T) we have to pass to eqn(1) and groff(1). Then, # setup the pipeline of commands based on the user's request. From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 00:08:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16CC57E9; Sun, 23 Nov 2014 00:08:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03A88763; Sun, 23 Nov 2014 00:08:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN08hL1088705; Sun, 23 Nov 2014 00:08:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN08hSH088704; Sun, 23 Nov 2014 00:08:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411230008.sAN08hSH088704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 00:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274903 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 00:08:44 -0000 Author: bapt Date: Sun Nov 23 00:08:43 2014 New Revision: 274903 URL: https://svnweb.freebsd.org/changeset/base/274903 Log: Fix typo Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Sun Nov 23 00:08:22 2014 (r274902) +++ head/usr.bin/man/man.sh Sun Nov 23 00:08:43 2014 (r274903) @@ -326,7 +326,7 @@ man_display_page() { pipeline="$pipeline mandoc -Tlocale | $MANPAGER" if ! eval "$cattool $manpage | $testline" ;then - if which -s groff2; then + if which -s groff; then man_display_page_groff else echo "This manpage needs groff(1) to be rendered" >&2 From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 00:12:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE3299A4; Sun, 23 Nov 2014 00:12:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB25C805; Sun, 23 Nov 2014 00:12:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN0CS3H092786; Sun, 23 Nov 2014 00:12:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN0CSn9092785; Sun, 23 Nov 2014 00:12:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201411230012.sAN0CSn9092785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Nov 2014 00:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274904 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 00:12:28 -0000 Author: mjg Date: Sun Nov 23 00:12:27 2014 New Revision: 274904 URL: https://svnweb.freebsd.org/changeset/base/274904 Log: filedesc: plug a test for impossible condition in fgetvp_rights Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Nov 23 00:08:43 2014 (r274903) +++ head/sys/kern/kern_descrip.c Sun Nov 23 00:12:27 2014 (r274904) @@ -2571,9 +2571,7 @@ fgetvp_rights(struct thread *td, int fd, int error; #endif - if (td == NULL || (fdp = td->td_proc->p_fd) == NULL) - return (EBADF); - + fdp = td->td_proc->p_fd; fp = fget_locked(fdp, fd); if (fp == NULL || fp->f_ops == &badfileops) return (EBADF); From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 00:30:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDE3DF00; Sun, 23 Nov 2014 00:30:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA93091B; Sun, 23 Nov 2014 00:30:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN0UXNj098659; Sun, 23 Nov 2014 00:30:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN0UX5o098658; Sun, 23 Nov 2014 00:30:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411230030.sAN0UX5o098658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 00:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274905 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 00:30:33 -0000 Author: bapt Date: Sun Nov 23 00:30:32 2014 New Revision: 274905 URL: https://svnweb.freebsd.org/changeset/base/274905 Log: Fix comments Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Sun Nov 23 00:12:27 2014 (r274904) +++ head/usr.bin/man/man.sh Sun Nov 23 00:30:32 2014 (r274905) @@ -276,6 +276,8 @@ man_check_for_so() { return 0 } +# Usage: man_display_page +# Display either the manpage or catpage depending on the use_cat variable man_display_page() { local IFS pipeline preconv_enc testline @@ -346,8 +348,8 @@ man_display_page() { fi } -# Usage: man_display_page -# Display either the manpage or catpage depending on the use_cat variable +# Usage: man_display_page_groff +# Display the manpage using groff man_display_page_groff() { local EQN NROFF PIC TBL TROFF REFER VGRIND local IFS l nroff_dev pipeline preproc_arg tool From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 01:01:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DCC25A1; Sun, 23 Nov 2014 01:01:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69F91BAA; Sun, 23 Nov 2014 01:01:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN11FB9013888; Sun, 23 Nov 2014 01:01:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN11Eqa013879; Sun, 23 Nov 2014 01:01:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411230101.sAN11Eqa013879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 23 Nov 2014 01:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274906 - in head/sys/ufs: ffs ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 01:01:15 -0000 Author: glebius Date: Sun Nov 23 01:01:14 2014 New Revision: 274906 URL: https://svnweb.freebsd.org/changeset/base/274906 Log: Include required files directly instead of pollution via ufs/ufsmount.h. Sponsored by: Nginx, Inc. Modified: head/sys/ufs/ffs/ffs_suspend.c head/sys/ufs/ufs/ufs_acl.c head/sys/ufs/ufs/ufs_gjournal.c Modified: head/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- head/sys/ufs/ffs/ffs_suspend.c Sun Nov 23 00:30:32 2014 (r274905) +++ head/sys/ufs/ffs/ffs_suspend.c Sun Nov 23 01:01:14 2014 (r274906) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/ufs/ufs/ufs_acl.c ============================================================================== --- head/sys/ufs/ufs/ufs_acl.c Sun Nov 23 00:30:32 2014 (r274905) +++ head/sys/ufs/ufs/ufs_acl.c Sun Nov 23 01:01:14 2014 (r274906) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/ufs/ufs/ufs_gjournal.c ============================================================================== --- head/sys/ufs/ufs/ufs_gjournal.c Sun Nov 23 00:30:32 2014 (r274905) +++ head/sys/ufs/ufs/ufs_gjournal.c Sun Nov 23 01:01:14 2014 (r274906) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 01:02:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B79E6E4; Sun, 23 Nov 2014 01:02:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 885A5C3B; Sun, 23 Nov 2014 01:02:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN12KbS016346; Sun, 23 Nov 2014 01:02:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN12KDL016345; Sun, 23 Nov 2014 01:02:20 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411230102.sAN12KDL016345@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 23 Nov 2014 01:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274907 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 01:02:20 -0000 Author: glebius Date: Sun Nov 23 01:02:19 2014 New Revision: 274907 URL: https://svnweb.freebsd.org/changeset/base/274907 Log: buf.h is not needed here, and pollutes when ufsmount.h is included from userland code. Sponsored by: Nginx, Inc. Modified: head/sys/ufs/ufs/ufsmount.h Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Sun Nov 23 01:01:14 2014 (r274906) +++ head/sys/ufs/ufs/ufsmount.h Sun Nov 23 01:02:19 2014 (r274907) @@ -33,8 +33,6 @@ #ifndef _UFS_UFS_UFSMOUNT_H_ #define _UFS_UFS_UFSMOUNT_H_ -#include /* XXX For struct workhead. */ - /* * Arguments to mount UFS-based filesystems */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 03:58:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8277275; Sun, 23 Nov 2014 03:58:19 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6624DDF7; Sun, 23 Nov 2014 03:58:19 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id q1so6081719lam.2 for ; Sat, 22 Nov 2014 19:58:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=vQOZ8eJCrVmhzW9ICPRFQ27eeT30M81rk0lUL8YDy2c=; b=QBE3mx7lT+XcA/ep0n4LW2AmZrkSLnNXExSx0fVnXWdiqkpGSLg2ntDUYXZgpNxQ3g hxAcoUv9z294S5XyyP36PKoSGvI9ohKFSPWSc64NJC3NjdRE0Be/70WDZ+vu8tKlL/IT YYt0QVLhOjnfJziE4SyvhdFSied/e4b9p8Ww2JEjjTgN6XtmVKiCTCfhABx0PoaPbuOx eC6C5lHdqdLY1ba502woTFeb46oikjI+kjiax9ydPUWhfwCCOQZH+5SpRUzeE1Vo94Ww KY1u5MIGZ7hoxprV558PHw+58tIC4jSWir0nIHe7qWuL3pgdzDGEwWZLM180ehhiiRNj /8og== X-Received: by 10.152.8.82 with SMTP id p18mr13624388laa.25.1416715097460; Sat, 22 Nov 2014 19:58:17 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id xe10sm2377481lbb.37.2014.11.22.19.58.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Nov 2014 19:58:16 -0800 (PST) Sender: Alexander Motin Message-ID: <54715B56.8010905@FreeBSD.org> Date: Sun, 23 Nov 2014 05:58:14 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274853 - in head: sys/dev/iscsi usr.sbin/ctld usr.sbin/iscsid References: <201411221509.sAMF9JIh016800@svn.freebsd.org> <20141122180318.GA3921@ox> In-Reply-To: <20141122180318.GA3921@ox> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 03:58:20 -0000 On 22.11.2014 20:03, Navdeep Parhar wrote: > On Sat, Nov 22, 2014 at 03:09:19PM +0000, Alexander Motin wrote: >> Author: mav >> Date: Sat Nov 22 15:09:18 2014 >> New Revision: 274853 >> URL: https://svnweb.freebsd.org/changeset/base/274853 >> >> Log: >> For both iSCSI initiator and target increase socket buffer sizes before >> establishing connection. >> >> This is a workaround for Chelsio TOE driver, that does not update socket >> buffer size in hardware after connection established, and unless that is >> done beforehand, kernel code will stuck, attempting to send/receive full >> PDU at once. > > cxgbe's TOE driver does update the rcv window in the hardware in > response to changes in the socket buffer size (see t4_rcvd in > cxgbe/tom/t4_cpl_io.c). > > The bug is that the driver tries to avoid sending too many small updates > to the chip, and instead tries to build up a balance of credits before > an update. This doesn't interact well with some applications that set > the sockbuf size to a high fixed value and then wait for the entire > buffer to fill up before draining it. The driver ends up waiting for > the application to drain the socket's receive buffer so that pru_rcvd > (t4_rcvd) can then send a big batch of credits to the chip, the > application is waiting for the receive to reach its high water mark > before draining the buffer, but the TOE on the chip has shut down the > receive window because it's out of credits. If you see the peer sending > zero window probes and the TOE refusing to budge, then the problem > you've observed is definitely the problem I just described. Yes, it looks like this. You may find the packet dump with the problem here: https://people.freebsd.org/~mav/rcvbuf.dump > I'll fix this in the TOE driver. I can send you an early patch in case > you'd like to try out the fix before it gets committed. Thank you. I'll be happy to try it. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 07:17:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC2DA3EE for ; Sun, 23 Nov 2014 07:17:21 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 833ECFC2 for ; Sun, 23 Nov 2014 07:17:21 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0600D20645 for ; Sun, 23 Nov 2014 02:17:18 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Sun, 23 Nov 2014 02:17:19 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= x-sasl-enc:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=8p9lfDqJyaSloyLnlgMAdG3IXq8=; b=BfvkcIlhXdjvMuW/ij IKC/KgBXeVMib/bHr65RmZi0e3pI5iZFBC8jKV6Fta3ngG6BYF8INBaVgLVODFkk Nzr6sre76rtWitMwlX1/TD74XbcrK22vdD9AzGDq5VWUplN+NqzJrIHY69hfbek8 rLKnbkGrlGRT7pG8d0vZRmSZU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=8p9lfDqJyaSloyLnlgMAdG 3IXq8=; b=euyBXrk4oBoG2vrh6z4vJhLPo7yc1Awt/F/zcV8D2gbX74k10OjtpD pNmkwGW3sCNZYGdiqo5Zb/BWu8y1fIFief4Puhm5j65nZ3ob1uNVkVFxf+wrS2re SrjnqBO+1Shiqv5EWqYDfIWX3fM9UWDFwlEdC4Z3t9WJXmHadvuHc= X-Sasl-enc: j+HOIdZwo6NyQ1niX5VNCCa6HOHMhEy2vDG+5ozG1RiT 1416727038 Received: from [192.168.1.66] (unknown [86.140.135.117]) by mail.messagingengine.com (Postfix) with ESMTPA id 13DFDC00006; Sun, 23 Nov 2014 02:17:17 -0500 (EST) Message-ID: <547189FD.7070408@fastmail.net> Date: Sun, 23 Nov 2014 07:17:17 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Craig Rodrigues , Marcel Moolenaar Subject: Re: svn commit: r274672 - in head/contrib/libxo: . libxo xolint References: <201411181803.sAII3fCg079794@svn.freebsd.org> <18F6425B-A767-426D-8EEF-57B7CFF3D54B@mu.org> <6491A081-35EB-4837-B025-2E4F92BD6623@xcllnt.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 07:17:21 -0000 On 20/11/2014 21:10, Craig Rodrigues wrote: > > Converting these (and other) utilities to use libxo will make it a lot > easier to write analysis tools like eagleeye. It'll also make it easier for anyone doing systems-level study. Right now I have a bunch of shell scripts which hoover up command output, use sed/awk/grep for basic post-processing into CSV/TSV, and throw the lot into a tarball. From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 08:25:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 088E6463; Sun, 23 Nov 2014 08:25:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF30985E; Sun, 23 Nov 2014 08:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAN8PjaM021394; Sun, 23 Nov 2014 08:25:45 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAN8PjYs021389; Sun, 23 Nov 2014 08:25:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201411230825.sAN8PjYs021389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Nov 2014 08:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274911 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 08:25:46 -0000 Author: mjg Date: Sun Nov 23 08:25:44 2014 New Revision: 274911 URL: https://svnweb.freebsd.org/changeset/base/274911 Log: ifdef RACCT ui_racct_foreach and struct uidinfo's ui_racct Change racct_ create and destroy to macros evaluating to nothing without RACCT so that their callers passing ui_racct don't have to be ifdefed. Modified: head/sys/kern/kern_resource.c head/sys/sys/racct.h head/sys/sys/resourcevar.h Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Sun Nov 23 08:17:46 2014 (r274910) +++ head/sys/kern/kern_resource.c Sun Nov 23 08:25:44 2014 (r274911) @@ -1334,6 +1334,7 @@ uifree(struct uidinfo *uip) free(uip, M_UIDINFO); } +#ifdef RACCT void ui_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3) @@ -1349,6 +1350,7 @@ ui_racct_foreach(void (*callback)(struct } rw_runlock(&uihashtbl_lock); } +#endif /* * Change the count associated with number of processes Modified: head/sys/sys/racct.h ============================================================================== --- head/sys/sys/racct.h Sun Nov 23 08:17:46 2014 (r274910) +++ head/sys/sys/racct.h Sun Nov 23 08:25:44 2014 (r274911) @@ -220,15 +220,8 @@ racct_get_available(struct proc *p, int return (UINT64_MAX); } -static inline void -racct_create(struct racct **racctp) -{ -} - -static inline void -racct_destroy(struct racct **racctp) -{ -} +#define racct_create(x) +#define racct_destroy(x) static inline int racct_proc_fork(struct proc *parent, struct proc *child) Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Sun Nov 23 08:17:46 2014 (r274910) +++ head/sys/sys/resourcevar.h Sun Nov 23 08:25:44 2014 (r274911) @@ -102,7 +102,9 @@ struct uidinfo { long ui_kqcnt; /* (b) number of kqueues */ uid_t ui_uid; /* (a) uid */ u_int ui_ref; /* (b) reference count */ +#ifdef RACCT struct racct *ui_racct; /* (a) resource accounting */ +#endif }; #define UIDINFO_VMSIZE_LOCK(ui) mtx_lock(&((ui)->ui_vmsize_mtx)) @@ -148,8 +150,10 @@ struct uidinfo void uifree(struct uidinfo *uip); void uihashinit(void); void uihold(struct uidinfo *uip); +#ifdef RACCT void ui_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3); +#endif #endif /* _KERNEL */ #endif /* !_SYS_RESOURCEVAR_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 10:26:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1B30CE6; Sun, 23 Nov 2014 10:26:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDF5A256; Sun, 23 Nov 2014 10:26:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANAQSeP079297; Sun, 23 Nov 2014 10:26:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANAQSKH079296; Sun, 23 Nov 2014 10:26:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411231026.sANAQSKH079296@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 23 Nov 2014 10:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274913 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 10:26:29 -0000 Author: glebius Date: Sun Nov 23 10:26:28 2014 New Revision: 274913 URL: https://svnweb.freebsd.org/changeset/base/274913 Log: Do not include buf.h. Modified: head/lib/libprocstat/udf.c Modified: head/lib/libprocstat/udf.c ============================================================================== --- head/lib/libprocstat/udf.c Sun Nov 23 08:37:08 2014 (r274912) +++ head/lib/libprocstat/udf.c Sun Nov 23 10:26:28 2014 (r274913) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #define _KERNEL #include #undef _KERNEL From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 12:01:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8DE1D7D; Sun, 23 Nov 2014 12:01:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93BFCCCA; Sun, 23 Nov 2014 12:01:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANC1tOc025784; Sun, 23 Nov 2014 12:01:55 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANC1rW1025589; Sun, 23 Nov 2014 12:01:53 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411231201.sANC1rW1025589@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 23 Nov 2014 12:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 12:01:55 -0000 Author: glebius Date: Sun Nov 23 12:01:52 2014 New Revision: 274914 URL: https://svnweb.freebsd.org/changeset/base/274914 Log: Merge from projects/sendfile: o Provide a new VOP_GETPAGES_ASYNC(), which works like VOP_GETPAGES(), but doesn't sleep. It returns immediately, and will execute the I/O done handler function that must be supplied as argument. o Provide VOP_GETPAGES_ASYNC() for the FFS, which uses vnode_pager. o Extend pagertab to support pgo_getpages_async method, and implement this method for vnode_pager. Reviewed by: kib Tested by: pho Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/kern/vfs_default.c head/sys/kern/vnode_if.src head/sys/sys/buf.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_vnops.c head/sys/vm/swap_pager.c head/sys/vm/vm_pager.h head/sys/vm/vnode_pager.c head/sys/vm/vnode_pager.h Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/kern/vfs_default.c Sun Nov 23 12:01:52 2014 (r274914) @@ -83,6 +83,7 @@ static int vop_stdset_text(struct vop_se static int vop_stdunset_text(struct vop_unset_text_args *ap); static int vop_stdget_writecount(struct vop_get_writecount_args *ap); static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); +static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); /* * This vnode table stores what we want to do if the filesystem doesn't @@ -111,6 +112,7 @@ struct vop_vector default_vnodeops = { .vop_close = VOP_NULL, .vop_fsync = VOP_NULL, .vop_getpages = vop_stdgetpages, + .vop_getpages_async = vop_stdgetpages_async, .vop_getwritemount = vop_stdgetwritemount, .vop_inactive = VOP_NULL, .vop_ioctl = VOP_ENOTTY, @@ -725,7 +727,17 @@ vop_stdgetpages(ap) { return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, - ap->a_count, ap->a_reqpage); + ap->a_count, ap->a_reqpage, NULL, NULL); +} + +static int +vop_stdgetpages_async(struct vop_getpages_async_args *ap) +{ + int error; + + error = VOP_GETPAGES(ap->a_vp, ap->a_m, ap->a_count, ap->a_reqpage); + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_reqpage, error); + return (error); } int Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/kern/vnode_if.src Sun Nov 23 12:01:52 2014 (r274914) @@ -476,6 +476,19 @@ vop_getpages { }; +%% getpages_async vp L L L + +vop_getpages_async { + IN struct vnode *vp; + IN vm_page_t *m; + IN int count; + IN int reqpage; + IN vm_ooffset_t offset; + IN vop_getpages_iodone_t *iodone; + IN void *arg; +}; + + %% putpages vp L L L vop_putpages { Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/sys/buf.h Sun Nov 23 12:01:52 2014 (r274914) @@ -107,7 +107,6 @@ struct buf { off_t b_offset; /* Offset into file. */ TAILQ_ENTRY(buf) b_bobufs; /* (V) Buffer's associated vnode. */ uint32_t b_vflags; /* (V) BV_* flags */ - TAILQ_ENTRY(buf) b_freelist; /* (Q) Free list position inactive. */ unsigned short b_qindex; /* (Q) buffer queue index */ uint32_t b_flags; /* B_* flags. */ b_xflags_t b_xflags; /* extra flags */ @@ -124,9 +123,15 @@ struct buf { struct ucred *b_rcred; /* Read credentials reference. */ struct ucred *b_wcred; /* Write credentials reference. */ void *b_saveaddr; /* Original b_addr for physio. */ - union pager_info { - int pg_reqpage; - } b_pager; + union { + TAILQ_ENTRY(buf) bu_freelist; /* (Q) */ + struct { + void (*pg_iodone)(void *, vm_page_t *, int, int); + int pg_reqpage; + } bu_pager; + } b_union; +#define b_freelist b_union.bu_freelist +#define b_pager b_union.bu_pager union cluster_info { TAILQ_HEAD(cluster_list_head, buf) cluster_head; TAILQ_ENTRY(buf) cluster_entry; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/sys/vnode.h Sun Nov 23 12:01:52 2014 (r274914) @@ -574,6 +574,7 @@ vn_canvmio(struct vnode *vp) /* * Finally, include the default set of vnode operations. */ +typedef void vop_getpages_iodone_t(void *, vm_page_t *, int, int); #include "vnode_if.h" /* vn_open_flags */ Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/ufs/ffs/ffs_vnops.c Sun Nov 23 12:01:52 2014 (r274914) @@ -124,6 +124,7 @@ struct vop_vector ffs_vnodeops1 = { .vop_default = &ufs_vnodeops, .vop_fsync = ffs_fsync, .vop_getpages = vnode_pager_local_getpages, + .vop_getpages_async = vnode_pager_local_getpages_async, .vop_lock1 = ffs_lock, .vop_read = ffs_read, .vop_reallocblks = ffs_reallocblks, @@ -143,6 +144,7 @@ struct vop_vector ffs_vnodeops2 = { .vop_default = &ufs_vnodeops, .vop_fsync = ffs_fsync, .vop_getpages = vnode_pager_local_getpages, + .vop_getpages_async = vnode_pager_local_getpages_async, .vop_lock1 = ffs_lock, .vop_read = ffs_read, .vop_reallocblks = ffs_reallocblks, Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/vm/swap_pager.c Sun Nov 23 12:01:52 2014 (r274914) @@ -361,6 +361,8 @@ static vm_object_t vm_prot_t prot, vm_ooffset_t offset, struct ucred *); static void swap_pager_dealloc(vm_object_t object); static int swap_pager_getpages(vm_object_t, vm_page_t *, int, int); +static int swap_pager_getpages_async(vm_object_t, vm_page_t *, int, int, + pgo_getpages_iodone_t, void *); static void swap_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *); static boolean_t swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, int *after); @@ -373,6 +375,7 @@ struct pagerops swappagerops = { .pgo_alloc = swap_pager_alloc, /* allocate an OBJT_SWAP object */ .pgo_dealloc = swap_pager_dealloc, /* deallocate an OBJT_SWAP object */ .pgo_getpages = swap_pager_getpages, /* pagein */ + .pgo_getpages_async = swap_pager_getpages_async, /* pagein (async) */ .pgo_putpages = swap_pager_putpages, /* pageout */ .pgo_haspage = swap_pager_haspage, /* get backing store status for page */ .pgo_pageunswapped = swap_pager_unswapped, /* remove swap related to page */ @@ -1257,6 +1260,39 @@ swap_pager_getpages(vm_object_t object, } /* + * swap_pager_getpages_async(): + * + * Right now this is emulation of asynchronous operation on top of + * swap_pager_getpages(). + */ +static int +swap_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, + int reqpage, pgo_getpages_iodone_t iodone, void *arg) +{ + int r, error; + + r = swap_pager_getpages(object, m, count, reqpage); + VM_OBJECT_WUNLOCK(object); + switch (r) { + case VM_PAGER_OK: + error = 0; + break; + case VM_PAGER_ERROR: + error = EIO; + break; + case VM_PAGER_FAIL: + error = EINVAL; + break; + default: + panic("unhandled swap_pager_getpages() error %d\n", r); + } + (iodone)(arg, m, count, error); + VM_OBJECT_WLOCK(object); + + return (r); +} + +/* * swap_pager_putpages: * * Assign swap (if necessary) and initiate I/O on the specified pages. Modified: head/sys/vm/vm_pager.h ============================================================================== --- head/sys/vm/vm_pager.h Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/vm/vm_pager.h Sun Nov 23 12:01:52 2014 (r274914) @@ -51,6 +51,9 @@ typedef vm_object_t pgo_alloc_t(void *, struct ucred *); typedef void pgo_dealloc_t(vm_object_t); typedef int pgo_getpages_t(vm_object_t, vm_page_t *, int, int); +typedef void pgo_getpages_iodone_t(void *, vm_page_t *, int, int); +typedef int pgo_getpages_async_t(vm_object_t, vm_page_t *, int, int, + pgo_getpages_iodone_t, void *); typedef void pgo_putpages_t(vm_object_t, vm_page_t *, int, int, int *); typedef boolean_t pgo_haspage_t(vm_object_t, vm_pindex_t, int *, int *); typedef void pgo_pageunswapped_t(vm_page_t); @@ -60,6 +63,7 @@ struct pagerops { pgo_alloc_t *pgo_alloc; /* Allocate pager. */ pgo_dealloc_t *pgo_dealloc; /* Disassociate. */ pgo_getpages_t *pgo_getpages; /* Get (read) page. */ + pgo_getpages_async_t *pgo_getpages_async; /* Get page asyncly. */ pgo_putpages_t *pgo_putpages; /* Put (write) page. */ pgo_haspage_t *pgo_haspage; /* Query page. */ pgo_pageunswapped_t *pgo_pageunswapped; @@ -103,6 +107,8 @@ vm_object_t vm_pager_allocate(objtype_t, void vm_pager_bufferinit(void); void vm_pager_deallocate(vm_object_t); static __inline int vm_pager_get_pages(vm_object_t, vm_page_t *, int, int); +static inline int vm_pager_get_pages_async(vm_object_t, vm_page_t *, int, + int, pgo_getpages_iodone_t, void *); static __inline boolean_t vm_pager_has_page(vm_object_t, vm_pindex_t, int *, int *); void vm_pager_init(void); vm_object_t vm_pager_object_lookup(struct pagerlst *, void *); @@ -133,6 +139,16 @@ vm_pager_get_pages( return (r); } +static inline int +vm_pager_get_pages_async(vm_object_t object, vm_page_t *m, int count, + int reqpage, pgo_getpages_iodone_t iodone, void *arg) +{ + + VM_OBJECT_ASSERT_WLOCKED(object); + return ((*pagertab[object->type]->pgo_getpages_async)(object, m, + count, reqpage, iodone, arg)); +} + static __inline void vm_pager_put_pages( vm_object_t object, Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/vm/vnode_pager.c Sun Nov 23 12:01:52 2014 (r274914) @@ -82,16 +82,23 @@ static int vnode_pager_addr(struct vnode static int vnode_pager_input_smlfs(vm_object_t object, vm_page_t m); static int vnode_pager_input_old(vm_object_t object, vm_page_t m); static void vnode_pager_dealloc(vm_object_t); +static int vnode_pager_local_getpages0(struct vnode *, vm_page_t *, int, int, + vop_getpages_iodone_t, void *); static int vnode_pager_getpages(vm_object_t, vm_page_t *, int, int); +static int vnode_pager_getpages_async(vm_object_t, vm_page_t *, int, int, + vop_getpages_iodone_t, void *); static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, int, int *); static boolean_t vnode_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); static vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t, struct ucred *cred); +static int vnode_pager_generic_getpages_done(struct buf *); +static void vnode_pager_generic_getpages_done_async(struct buf *); struct pagerops vnodepagerops = { .pgo_alloc = vnode_pager_alloc, .pgo_dealloc = vnode_pager_dealloc, .pgo_getpages = vnode_pager_getpages, + .pgo_getpages_async = vnode_pager_getpages_async, .pgo_putpages = vnode_pager_putpages, .pgo_haspage = vnode_pager_haspage, }; @@ -664,16 +671,51 @@ vnode_pager_getpages(vm_object_t object, return rtval; } +static int +vnode_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, + int reqpage, vop_getpages_iodone_t iodone, void *arg) +{ + struct vnode *vp; + int rtval; + + vp = object->handle; + VM_OBJECT_WUNLOCK(object); + rtval = VOP_GETPAGES_ASYNC(vp, m, count * PAGE_SIZE, reqpage, 0, + iodone, arg); + KASSERT(rtval != EOPNOTSUPP, + ("vnode_pager: FS getpages_async not implemented\n")); + VM_OBJECT_WLOCK(object); + return (rtval); +} + /* - * The implementation of VOP_GETPAGES() for local filesystems, where - * partially valid pages can only occur at the end of file. + * The implementation of VOP_GETPAGES() and VOP_GETPAGES_ASYNC() for + * local filesystems, where partially valid pages can only occur at + * the end of file. */ int vnode_pager_local_getpages(struct vop_getpages_args *ap) { + + return (vnode_pager_local_getpages0(ap->a_vp, ap->a_m, ap->a_count, + ap->a_reqpage, NULL, NULL)); +} + +int +vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap) +{ + + return (vnode_pager_local_getpages0(ap->a_vp, ap->a_m, ap->a_count, + ap->a_reqpage, ap->a_iodone, ap->a_arg)); +} + +static int +vnode_pager_local_getpages0(struct vnode *vp, vm_page_t *m, int bytecount, + int reqpage, vop_getpages_iodone_t iodone, void *arg) +{ vm_page_t mreq; - mreq = ap->a_m[ap->a_reqpage]; + mreq = m[reqpage]; /* * Since the caller has busied the requested page, that page's valid @@ -688,13 +730,15 @@ vnode_pager_local_getpages(struct vop_ge * pages, since no i/o is done to read its content. */ if (mreq->valid != 0) { - vm_pager_free_nonreq(mreq->object, ap->a_m, ap->a_reqpage, - round_page(ap->a_count) / PAGE_SIZE); + vm_pager_free_nonreq(mreq->object, m, reqpage, + round_page(bytecount) / PAGE_SIZE); + if (iodone != NULL) + iodone(arg, m, reqpage, 0); return (VM_PAGER_OK); } - return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, - ap->a_count, ap->a_reqpage)); + return (vnode_pager_generic_getpages(vp, m, bytecount, reqpage, + iodone, arg)); } /* @@ -703,11 +747,10 @@ vnode_pager_local_getpages(struct vop_ge */ int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount, - int reqpage) + int reqpage, vop_getpages_iodone_t iodone, void *arg) { vm_object_t object; - vm_offset_t kva; - off_t foff, tfoff, nextoff; + off_t foff; int i, j, size, bsize, first; daddr_t firstaddr, reqblock; struct bufobj *bo; @@ -899,7 +942,7 @@ vnode_pager_generic_getpages(struct vnod } bp = getpbuf(&vnode_pbuf_freecnt); - kva = (vm_offset_t)bp->b_data; + bp->b_kvaalloc = bp->b_data; /* * and map the pages to be read into the kva, if the filesystem @@ -911,15 +954,11 @@ vnode_pager_generic_getpages(struct vnod bp->b_kvabase = unmapped_buf; bp->b_offset = 0; bp->b_flags |= B_UNMAPPED; - bp->b_npages = count; - for (i = 0; i < count; i++) - bp->b_pages[i] = m[i]; } else - pmap_qenter(kva, m, count); + pmap_qenter((vm_offset_t)bp->b_kvaalloc, m, count); /* build a minimal buffer header */ bp->b_iocmd = BIO_READ; - bp->b_iodone = bdone; KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred")); KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred")); bp->b_rcred = crhold(curthread->td_ucred); @@ -930,6 +969,10 @@ vnode_pager_generic_getpages(struct vnod bp->b_bcount = size; bp->b_bufsize = size; bp->b_runningbufspace = bp->b_bufsize; + for (i = 0; i < count; i++) + bp->b_pages[i] = m[i]; + bp->b_npages = count; + bp->b_pager.pg_reqpage = reqpage; atomic_add_long(&runningbufspace, bp->b_runningbufspace); PCPU_INC(cnt.v_vnodein); @@ -937,43 +980,79 @@ vnode_pager_generic_getpages(struct vnod /* do the input */ bp->b_iooffset = dbtob(bp->b_blkno); - bstrategy(bp); - bwait(bp, PVM, "vnread"); + if (iodone != NULL) { /* async */ + bp->b_pager.pg_iodone = iodone; + bp->b_caller1 = arg; + bp->b_iodone = vnode_pager_generic_getpages_done_async; + bp->b_flags |= B_ASYNC; + BUF_KERNPROC(bp); + bstrategy(bp); + /* Good bye! */ + } else { + bp->b_iodone = bdone; + bstrategy(bp); + bwait(bp, PVM, "vnread"); + error = vnode_pager_generic_getpages_done(bp); + for (int i = 0; i < bp->b_npages; i++) + bp->b_pages[i] = NULL; + bp->b_vp = NULL; + pbrelbo(bp); + relpbuf(bp, &vnode_pbuf_freecnt); + } + + return (error != 0 ? VM_PAGER_ERROR : VM_PAGER_OK); +} + +static void +vnode_pager_generic_getpages_done_async(struct buf *bp) +{ + int error; + + error = vnode_pager_generic_getpages_done(bp); + bp->b_pager.pg_iodone(bp->b_caller1, bp->b_pages, + bp->b_pager.pg_reqpage, error); + for (int i = 0; i < bp->b_npages; i++) + bp->b_pages[i] = NULL; + bp->b_vp = NULL; + pbrelbo(bp); + relpbuf(bp, &vnode_pbuf_freecnt); +} + +static int +vnode_pager_generic_getpages_done(struct buf *bp) +{ + vm_object_t object; + off_t tfoff, nextoff; + int i, error; - if ((bp->b_ioflags & BIO_ERROR) != 0) - error = EIO; + error = (bp->b_ioflags & BIO_ERROR) != 0 ? EIO : 0; + object = bp->b_vp->v_object; - if (error == 0 && size != count * PAGE_SIZE) { + if (error == 0 && bp->b_bcount != bp->b_npages * PAGE_SIZE) { if ((bp->b_flags & B_UNMAPPED) != 0) { bp->b_flags &= ~B_UNMAPPED; - pmap_qenter(kva, m, count); + pmap_qenter((vm_offset_t)bp->b_kvaalloc, bp->b_pages, + bp->b_npages); } - bzero((caddr_t)kva + size, PAGE_SIZE * count - size); + bzero(bp->b_kvaalloc + bp->b_bcount, + PAGE_SIZE * bp->b_npages - bp->b_bcount); } if ((bp->b_flags & B_UNMAPPED) == 0) - pmap_qremove(kva, count); - if ((vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) { - bp->b_data = (caddr_t)kva; - bp->b_kvabase = (caddr_t)kva; + pmap_qremove((vm_offset_t)bp->b_kvaalloc, bp->b_npages); + if ((bp->b_vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) { + bp->b_data = bp->b_kvaalloc; + bp->b_kvabase = bp->b_kvaalloc; bp->b_flags &= ~B_UNMAPPED; - for (i = 0; i < count; i++) - bp->b_pages[i] = NULL; } - /* - * free the buffer header back to the swap buffer pool - */ - bp->b_vp = NULL; - pbrelbo(bp); - relpbuf(bp, &vnode_pbuf_freecnt); - VM_OBJECT_WLOCK(object); - for (i = 0, tfoff = foff; i < count; i++, tfoff = nextoff) { + for (i = 0, tfoff = IDX_TO_OFF(bp->b_pages[0]->pindex); + i < bp->b_npages; i++, tfoff = nextoff) { vm_page_t mt; nextoff = tfoff + PAGE_SIZE; - mt = m[i]; + mt = bp->b_pages[i]; if (nextoff <= object->un_pager.vnp.vnp_size) { /* @@ -999,14 +1078,14 @@ vnode_pager_generic_getpages(struct vnod ("%s: page %p is dirty", __func__, mt)); } - if (i != reqpage) + if (i != bp->b_pager.pg_reqpage) vm_page_readahead_finish(mt); } VM_OBJECT_WUNLOCK(object); - if (error) { - printf("vnode_pager_getpages: I/O read error\n"); - } - return (error ? VM_PAGER_ERROR : VM_PAGER_OK); + if (error != 0) + printf("%s: I/O read error %d\n", __func__, error); + + return (error); } /* Modified: head/sys/vm/vnode_pager.h ============================================================================== --- head/sys/vm/vnode_pager.h Sun Nov 23 10:26:28 2014 (r274913) +++ head/sys/vm/vnode_pager.h Sun Nov 23 12:01:52 2014 (r274914) @@ -41,11 +41,12 @@ #ifdef _KERNEL int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, - int count, int reqpage); + int count, int reqpage, vop_getpages_iodone_t iodone, void *arg); int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, int count, boolean_t sync, int *rtvals); int vnode_pager_local_getpages(struct vop_getpages_args *ap); +int vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap); void vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, vm_offset_t end); From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 16:22:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AF822C3; Sun, 23 Nov 2014 16:22:43 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 09C7A895; Sun, 23 Nov 2014 16:22:42 +0000 (UTC) Received: from [192.168.0.106] (cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52]) (authenticated bits=0) by theravensnest.org (8.14.9/8.14.9) with ESMTP id sANGMSc9074685 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 23 Nov 2014 16:22:34 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52] claimed to be [192.168.0.106] Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274489 - in head/sys/amd64: amd64 include From: David Chisnall In-Reply-To: <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> Date: Sun, 23 Nov 2014 16:22:23 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <426D8696-801A-4C48-A2FE-74575B4B79E7@FreeBSD.org> References: <201411132211.sADMBjP3009246@svn.freebsd.org> <35E5EAD8-99C1-43C0-8D01-B3B5B86ECA25@me.com> <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> To: Scott Long X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Scott Long , Rui Paulo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 16:22:43 -0000 On 21 Nov 2014, at 23:26, Scott Long wrote: > That=92s a good question to look further into. I didn=92t see any = measurable differences with this change. I think that the cost of the = function call itself masks the cost of a few extra instructions, but I = didn=92t test with switching it on/off for the entire kernel [ Note: The following is not specific to the kernel ] The overhead for preserving / omitting the frame pointer is decidedly = nonlinear. On a modern superscalar processor, it will usually be = effectively zero, right up until the point that it pushes something out = of the instruction cache on a hot path, at which point it jumps to = 20-50%, depending on the workload. The performance difference was more pronounced on i386, where having an = extra GPR for the register allocator to use could make a 10-20% = performance difference on some fairly common code (the two big = performance wins for x86-64 over IA32 were the increase in number of = GPRs and an FPU ISA that wasn't batshit insane). For ISAs with more = GPRs, that's less of an issue, although after inlining being able to use = %rbp as a GPR can sometimes make a noticeable difference in performance. = In particular, as %rpb is callee-save, it's very useful to be able to = use it in non-leaf functions. David From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 16:27:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF4BC4FD; Sun, 23 Nov 2014 16:27:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBCDB8BC; Sun, 23 Nov 2014 16:27:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANGRV3U051031; Sun, 23 Nov 2014 16:27:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANGRV9P051030; Sun, 23 Nov 2014 16:27:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411231627.sANGRV9P051030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 23 Nov 2014 16:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274918 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 16:27:31 -0000 Author: hselasky Date: Sun Nov 23 16:27:31 2014 New Revision: 274918 URL: https://svnweb.freebsd.org/changeset/base/274918 Log: Don't use the synchronization endpoint unless referenced by the isochronous endpoint descriptor used for the data transfers, hence the synchronization feature might not be supposed to be supported [yet]. This makes seamless playback synced with the USB HOST clock work with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. MFC after: 1 week Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sun Nov 23 15:38:06 2014 (r274917) +++ head/sys/dev/sound/usb/uaudio.c Sun Nov 23 16:27:31 2014 (r274918) @@ -189,6 +189,7 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; + uint8_t enable_sync; }; struct uaudio_chan { @@ -1798,6 +1799,14 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; + if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { + DPRINTF("Sync endpoint will be used, if present\n"); + chan_alt->enable_sync = 1; + } else { + DPRINTF("Sync endpoint will not be used\n"); + chan_alt->enable_sync = 0; + } + usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2074,8 +2083,10 @@ tr_transferred: chn_intr(ch->pcm_ch); /* start SYNC transfer, if any */ - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { + if ((ch->last_sync_time++ & 7) == 0) + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + } case USB_ST_SETUP: mfl = usbd_xfer_max_framelen(xfer); From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 18:02:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4764B65C; Sun, 23 Nov 2014 18:02:17 +0000 (UTC) Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by mx1.freebsd.org (Postfix) with ESMTP id 60D6417B; Sun, 23 Nov 2014 18:02:16 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuIIAPUfclRbsIAD/2dsb2JhbABcgw5VWYMGtzyBUo9qhmoCgQQXAQEBAQF9hAMBAQQjVhALFAQCAgUhAgIPKgwSBhOILAMWAQi3R5UwAQEBAQEBAQMBAQEBAQEcgS2NIYIKMweCeYFVBYUvBpIYhSWCDpAdhn6DfkcwAYJKAQEB Received: from 3.128-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.128.3]) by relay.skynet.be with ESMTP; 23 Nov 2014 19:02:09 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id sANI27Jv043264; Sun, 23 Nov 2014 19:02:07 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Sun, 23 Nov 2014 19:02:06 +0100 From: Tijl Coosemans To: Scott Long Subject: Re: svn commit: r274489 - in head/sys/amd64: amd64 include Message-ID: <20141123190206.37942760@kalimero.tijl.coosemans.org> In-Reply-To: <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> References: <201411132211.sADMBjP3009246@svn.freebsd.org> <35E5EAD8-99C1-43C0-8D01-B3B5B86ECA25@me.com> <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Scott Long , Rui Paulo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 18:02:17 -0000 On Fri, 21 Nov 2014 16:26:47 -0700 Scott Long wrote: > On Nov 20, 2014, at 11:33 PM, Rui Paulo wrote: >> On Nov 13, 2014, at 14:11, Scott Long wrote: >>>=20 >>> Author: scottl >>> Date: Thu Nov 13 22:11:44 2014 >>> New Revision: 274489 >>> URL: https://svnweb.freebsd.org/changeset/base/274489 >>>=20 >>> Log: >>> Extend earlier addition of stack frames to most of support.S. This mak= es >>> stack traces in KDB, HWPMC, and DTrace much more reliable and useful. >>=20 >> No performance differences? The kernel enables/disables the compiler >> option to omit the frame pointer based on the kernel config file. If >> DDB, DTrace, or HWPMC is enabled, the frame pointer is always saved in >> C functions. >>=20 >> Some of these functions are in the hot path, so if you didn't see any >> performance problem, I wonder if we should disable -fomit-frame-pointer >> always. >=20 > That=E2=80=99s a good question to look further into. I didn=E2=80=99t se= e any measurable > differences with this change. I think that the cost of the function call > itself masks the cost of a few extra instructions, but I didn=E2=80=99t t= est with > switching it on/off for the entire kernel. That said, I purposely > implemented this as macros so it could be easily changed in the future. > If someone finds that this measurably impacts a certain workload, I > wouldn=E2=80=99t object to making it conditional, though it does complica= te any > hand-written ASM code that tries to access the stack via %esp offsets. > We don=E2=80=99t have anything like that now, but Kip was concerned enoug= h about > it in the future that I left it enabled unconditionally. An alternative is to annotate the functions with .cfi directives. Stack unwinding doesn't need frame pointers then. http://www.logix.cz/michal/devel/gas-cfi/ https://sourceware.org/binutils/docs-2.24/as/CFI-directives.html From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 18:31:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9484EC4B; Sun, 23 Nov 2014 18:31:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66D7A63B; Sun, 23 Nov 2014 18:31:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANIVuXR011565; Sun, 23 Nov 2014 18:31:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANIVuMX011564; Sun, 23 Nov 2014 18:31:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411231831.sANIVuMX011564@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 23 Nov 2014 18:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274922 - head/sys/dev/ath/ath_hal/ar5212 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 18:31:56 -0000 Author: dim Date: Sun Nov 23 18:31:55 2014 New Revision: 274922 URL: https://svnweb.freebsd.org/changeset/base/274922 Log: Fix the following -Werror warning from clang 3.5.0, while building the ath kernel module: sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) { ^ sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs' #define abs(_a) __builtin_abs(_a) ^ sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs' #define abs(_a) __builtin_abs(_a) ^ 1 error generated. This warning occurs because both lp[0] and target are unsigned, so the subtraction expression is also unsigned, and calling abs() is a no-op. However, the intention was to look at the absolute difference between the two unsigned quantities. Introduce a small static function to clarify what we're doing, and call that instead. Reviewed by: adrian MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1212 Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sun Nov 23 17:47:12 2014 (r274921) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sun Nov 23 18:31:55 2014 (r274922) @@ -2605,6 +2605,12 @@ ar5212GetTargetPowers(struct ath_hal *ah powInfo[ixlo].twicePwr54, powInfo[ixhi].twicePwr54); } +static uint32_t +udiff(uint32_t u, uint32_t v) +{ + return (u >= v ? u - v : v - u); +} + /* * Search a list for a specified value v that is within * EEP_DELTA of the search values. Return the closest @@ -2639,7 +2645,7 @@ ar5212GetLowerUpperValues(uint16_t v, ui * If value is close to the current value of the list * then target is not between values, it is one of the values */ - if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) { + if (udiff(lp[0] * EEP_SCALE, target) < EEP_DELTA) { *vlo = *vhi = lp[0]; return; } From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 18:32:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 553D9DB9; Sun, 23 Nov 2014 18:32:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41F96646; Sun, 23 Nov 2014 18:32:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANIWMVa011684; Sun, 23 Nov 2014 18:32:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANIWMai011683; Sun, 23 Nov 2014 18:32:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411231832.sANIWMai011683@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 23 Nov 2014 18:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274923 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 18:32:22 -0000 Author: glebius Date: Sun Nov 23 18:32:21 2014 New Revision: 274923 URL: https://svnweb.freebsd.org/changeset/base/274923 Log: \n at end of panicstr is redundant. Submitted by: alc Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun Nov 23 18:31:55 2014 (r274922) +++ head/sys/vm/swap_pager.c Sun Nov 23 18:32:21 2014 (r274923) @@ -1284,7 +1284,7 @@ swap_pager_getpages_async(vm_object_t ob error = EINVAL; break; default: - panic("unhandled swap_pager_getpages() error %d\n", r); + panic("unhandled swap_pager_getpages() error %d", r); } (iodone)(arg, m, count, error); VM_OBJECT_WLOCK(object); From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 19:13:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C9F66BE; Sun, 23 Nov 2014 19:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19880A3C; Sun, 23 Nov 2014 19:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANJDHbS030172; Sun, 23 Nov 2014 19:13:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANJDHK1030171; Sun, 23 Nov 2014 19:13:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411231913.sANJDHK1030171@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 23 Nov 2014 19:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274924 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 19:13:18 -0000 Author: ian Date: Sun Nov 23 19:13:17 2014 New Revision: 274924 URL: https://svnweb.freebsd.org/changeset/base/274924 Log: Consider the negation operator (!) to be a word even if it is not followed by whitespace. This allows "optional !foo" which is what most programmers are naturally going to tend to do as opposed to "optional ! foo". Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Sun Nov 23 18:32:21 2014 (r274923) +++ head/usr.sbin/config/main.c Sun Nov 23 19:13:17 2014 (r274924) @@ -314,6 +314,11 @@ begin: } cp = line; *cp++ = ch; + /* Negation operator is a word by itself. */ + if (ch == '!') { + *cp = 0; + return (line); + } while ((ch = getc(fp)) != EOF) { if (isspace(ch)) break; From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:00:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E1B4D03; Sun, 23 Nov 2014 21:00:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F0015E9; Sun, 23 Nov 2014 21:00:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANL04Mp078868; Sun, 23 Nov 2014 21:00:04 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANL00cG078781; Sun, 23 Nov 2014 21:00:00 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201411232100.sANL00cG078781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 23 Nov 2014 21:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:00:04 -0000 Author: joel (doc committer) Date: Sun Nov 23 21:00:00 2014 New Revision: 274925 URL: https://svnweb.freebsd.org/changeset/base/274925 Log: Misc mdoc fixes: - Remove superfluous paragraph macros. - Remove/fix empty or incorrect macros. - Sort sections into conventional order. - Terminate quoted strings properly. - Remove EOL whitespace. Modified: head/lib/libc/sys/poll.2 head/lib/libdpv/dpv.3 head/sbin/ipfw/ipfw.8 head/share/man/man4/gre.4 head/share/man/man4/man4.arm/cgem.4 head/share/man/man4/me.4 head/share/man/man4/netmap.4 head/share/man/man9/get_cyclecount.9 head/share/man/man9/malloc.9 head/share/man/man9/sleepqueue.9 head/sys/boot/common/zfsloader.8 head/sys/boot/i386/gptzfsboot/gptzfsboot.8 head/usr.bin/dpv/dpv.1 Modified: head/lib/libc/sys/poll.2 ============================================================================== --- head/lib/libc/sys/poll.2 Sun Nov 23 19:13:17 2014 (r274924) +++ head/lib/libc/sys/poll.2 Sun Nov 23 21:00:00 2014 (r274925) @@ -180,7 +180,6 @@ specifies a signal mask which is set whi When .Fn ppoll returns, the original signal mask is restored. -.Pp .Bd -literal struct timespec { time_t tv_sec; /* seconds */ Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Sun Nov 23 19:13:17 2014 (r274924) +++ head/lib/libdpv/dpv.3 Sun Nov 23 21:00:00 2014 (r274925) @@ -502,7 +502,7 @@ This does not effect .Xr Xdialog 1 , which renders the color escape sequences as plain text. See -.Do Li +.Do embedded "\\Z" sequences .Dc in Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Sun Nov 23 19:13:17 2014 (r274924) +++ head/sbin/ipfw/ipfw.8 Sun Nov 23 21:00:00 2014 (r274925) @@ -1642,7 +1642,6 @@ be specified as: .Pp Note that the ampersand character has a special meaning in many shells and should generally be escaped. -.Pp .El Note that the order of MAC addresses (destination first, source second) is @@ -1991,7 +1990,7 @@ It may be possible to check what entry w .Ar table-key using .Cm lookup -.Ae table-key +.Ar table-key command. This functionality is optional and may be unsupported in some algorithms. .Pp Modified: head/share/man/man4/gre.4 ============================================================================== --- head/share/man/man4/gre.4 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man4/gre.4 Sun Nov 23 21:00:00 2014 (r274925) @@ -91,7 +91,6 @@ Enables checksum calculation for outgoin Enables use of sequence number field in the GRE header for outgoing packets. .El .Sh EXAMPLES -.Pp .Bd -literal 192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.* \\ / @@ -151,7 +150,6 @@ A description of GRE encapsulation can b .An Andrey V. Elsukov Aq Mt ae@FreeBSD.org .An Heiko W.Rupp Aq Mt hwr@pilhuhn.de .Sh BUGS -.Pp The current implementation uses the key only for outgoing packets. Incoming packets with a different key or without a key will be treated as if they would belong to this interface. Modified: head/share/man/man4/man4.arm/cgem.4 ============================================================================== --- head/share/man/man4/man4.arm/cgem.4 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man4/man4.arm/cgem.4 Sun Nov 23 21:00:00 2014 (r274925) @@ -248,6 +248,23 @@ checksum offloading is enabled. Counter of frames discarded due to an incorrect UDP checksum when checksum offloading is enabled. .El +.Sh SEE ALSO +.Xr miibus 4 , +.Xr ifconfig 8 +.Rs +.%T "Zynq-7000 SoC Technical Reference Manual (Xilinx doc UG585)" +.%U http://www.xilinx.com/support/documentation/user_guides/\:ug585-Zynq-7000-TRM.pdf +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +The +.Nm +driver and this manual page was written by +.An Thomas Skibo Aq Mt thomasskibo@yahoo.com . .Sh BUGS The GEM can perform TCP/UDP/IP checksum offloading. However, when transmit checksum offloading is enabled, the GEM generates and @@ -277,21 +294,3 @@ If the bug does not exist in other versi work-around can be disabled by setting the dev.cgem.%d.rxhangwar .Xr sysctl 8 variable to 0. -.Pp -.Sh SEE ALSO -.Xr miibus 4 , -.Xr ifconfig 8 -.Rs -.%T "Zynq-7000 SoC Technical Reference Manual (Xilinx doc UG585)" -.%U http://www.xilinx.com/support/documentation/user_guides/\:ug585-Zynq-7000-TRM.pdf -.Re -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 10.0 . -.Sh AUTHORS -The -.Nm -driver and this manual page was written by -.An Thomas Skibo Aq Mt thomasskibo@yahoo.com . Modified: head/share/man/man4/me.4 ============================================================================== --- head/share/man/man4/me.4 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man4/me.4 Sun Nov 23 21:00:00 2014 (r274925) @@ -67,7 +67,6 @@ IP header is modified and the modificati so modified header and the original payload. The protocol number 55 is used for outer header. .Sh NOTES -.Pp For correct operation, the .Nm device needs a route to the decapsulating host that does not run over the tunnel, Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man4/netmap.4 Sun Nov 23 21:00:00 2014 (r274925) @@ -614,7 +614,7 @@ In the example below, "netmap:foo" is an (default) all hardware ring pairs .It NR_REG_SW "netmap:foo^" the ``host rings'', connecting to the host stack. -.It NR_REG_NIC_SW "netmap:foo+ +.It NR_REG_NIC_SW "netmap:foo+" all hardware rings and the host rings .It NR_REG_ONE_NIC "netmap:foo-i" only the i-th hardware ring pair, where the number is in Modified: head/share/man/man9/get_cyclecount.9 ============================================================================== --- head/share/man/man9/get_cyclecount.9 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man9/get_cyclecount.9 Sun Nov 23 21:00:00 2014 (r274925) @@ -77,7 +77,6 @@ and processors use the .Li TSC register. -.Pp .Sh SEE ALSO .Xr binuptime 9 .Sh HISTORY Modified: head/share/man/man9/malloc.9 ============================================================================== --- head/share/man/man9/malloc.9 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man9/malloc.9 Sun Nov 23 21:00:00 2014 (r274925) @@ -208,12 +208,6 @@ one must include .In sys/types.h ) and .In sys/kernel.h . -.Sh IMPLEMENTATION NOTES -The memory allocator allocates memory in chunks that have size a power -of two for requests up to the size of a page of memory. -For larger requests, one or more pages is allocated. -While it should not be relied upon, this information may be useful for -optimizing the efficiency of memory use. .Sh CONTEXT .Fn malloc , .Fn realloc @@ -244,6 +238,12 @@ when holding a .Xr vnode 9 interlock, will cause a LOR (Lock Order Reversal) due to the intertwining of VM Objects and Vnodes. +.Sh IMPLEMENTATION NOTES +The memory allocator allocates memory in chunks that have size a power +of two for requests up to the size of a page of memory. +For larger requests, one or more pages is allocated. +While it should not be relied upon, this information may be useful for +optimizing the efficiency of memory use. .Sh RETURN VALUES The .Fn malloc , Modified: head/share/man/man9/sleepqueue.9 ============================================================================== --- head/share/man/man9/sleepqueue.9 Sun Nov 23 19:13:17 2014 (r274924) +++ head/share/man/man9/sleepqueue.9 Sun Nov 23 21:00:00 2014 (r274925) @@ -246,7 +246,6 @@ allows to pass additional .Fn callout_reset_sbt flags. .Pp -.Pp Once the thread is ready to suspend, one of the wait functions is called to put the current thread to sleep until it is awakened and to context switch to another thread. Modified: head/sys/boot/common/zfsloader.8 ============================================================================== --- head/sys/boot/common/zfsloader.8 Sun Nov 23 19:13:17 2014 (r274924) +++ head/sys/boot/common/zfsloader.8 Sun Nov 23 21:00:00 2014 (r274925) @@ -62,7 +62,6 @@ refers to a ZFS filesystem, then will instruct kernel to use that filesystem as the root filesystem. .Sh ZFS COMMAND EXTENSIONS .Bl -tag -width Ds -compact -.Pp .It Ic lsdev Op Fl v Lists ZFS pools in addition to disks and partitions. Adding @@ -87,11 +86,9 @@ itself. .El .Sh EXAMPLES Set the default device used for loading a kernel from a ZFS filesystem: -.Pp .Bd -literal -offset indent set currdev=zfs:tank/ROOT/knowngood: .Ed -.Pp .Sh SEE ALSO .Xr gptzfsboot 8 , .Xr loader 8 , Modified: head/sys/boot/i386/gptzfsboot/gptzfsboot.8 ============================================================================== --- head/sys/boot/i386/gptzfsboot/gptzfsboot.8 Sun Nov 23 19:13:17 2014 (r274924) +++ head/sys/boot/i386/gptzfsboot/gptzfsboot.8 Sun Nov 23 21:00:00 2014 (r274925) @@ -176,6 +176,9 @@ gpart bootcode -p /boot/gptzfsboot -i 1 .Sh HISTORY .Nm appeared in FreeBSD 7.3. +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . .Sh BUGS .Nm looks for ZFS meta-data only in MBR partitions @@ -188,6 +191,3 @@ found at the fixed offsets relative to a .Nm will recognize the partition as a part of a ZFS pool, but this is not guaranteed to happen. -.Sh AUTHORS -This manual page was written by -.An Andriy Gapon Aq avg@FreeBSD.org . Modified: head/usr.bin/dpv/dpv.1 ============================================================================== --- head/usr.bin/dpv/dpv.1 Sun Nov 23 19:13:17 2014 (r274924) +++ head/usr.bin/dpv/dpv.1 Sun Nov 23 21:00:00 2014 (r274925) @@ -104,7 +104,7 @@ Do not use the default interface of .Xr dialog 3 , but instead spawn an instance of .Xr dialog 1 . -The path to +The path to .Xr dialog 1 is taken from the .Ev DIALOG @@ -308,7 +308,6 @@ is required. .It Pa $HOME/.dialogrc .El .Sh EXAMPLES -.Pp Simple example to show how fast .Xr yes 1 produces lines @@ -358,7 +357,18 @@ Zeroing a disk: .Bd -literal -offset indent dpv -o /dev/md42 < /dev/zero .Ed -.Pp +.Sh SEE ALSO +.Xr dialog 1 , +.Xr dialog 3 , +.Xr sh 1 , +.Xr Xdialog 1 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS .Xr Xdialog 1 , when given both @@ -410,21 +420,9 @@ This does not effect .Xr Xdialog 1 , which renders the color escape sequences as plain text. See -.Do Li +.Do embedded "\\Z" sequences .Dc in .Xr dialog 1 for additional information. -.Sh SEE ALSO -.Xr dialog 1 , -.Xr dialog 3 , -.Xr sh 1 , -.Xr Xdialog 1 -.Sh HISTORY -A -.Nm -utility first appeared in -.Fx 11.0 . -.Sh AUTHORS -.An Devin Teske Aq dteske@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:04:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E12721FB; Sun, 23 Nov 2014 21:04:17 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BA6D784; Sun, 23 Nov 2014 21:04:17 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id x12so10690065wgg.8 for ; Sun, 23 Nov 2014 13:04:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=zOaq897AkY6lusXxZEq1jWt9e64itLq//NG4Q6Gp5oA=; b=JK/3fBnAJTXYESbN+0WAhlWpjKGQHoabQdKvAFdrfgyA38NqVrJvVQZ/OfTtwG8xtO ZByVYibV3uZ1lHXej5YCIvD/LhqkILpSamRCF+1cmsoZJw29pTUJpAL2UemWYjQQFfYH O+/VUxQycuUkaGWMWGokS3GAO02dqc7ICzNg+iR9qsLz2jcQKovqRqo4AnMPVhP9cWLI +yAFmJdCtDb+/eBetvcehbZtXQk/kl7SipaN53ud/cpP82nVAk3NyyZ0x3NYNKu4SDAV IK8WjujnIHL1lDtU3JzyLcuok+yisuSTkYSXmBZzqXnSuwSvruc2dJuCCrr/sGh1Xyyh VLNA== X-Received: by 10.194.3.2 with SMTP id 2mr27772378wjy.89.1416776655757; Sun, 23 Nov 2014 13:04:15 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id r2sm7090291wju.4.2014.11.23.13.04.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Nov 2014 13:04:14 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 23 Nov 2014 22:04:12 +0100 From: Baptiste Daroussin To: Joel Dahl Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Message-ID: <20141123210412.GG68776@ivaldir.etoilebsd.net> References: <201411232100.sANL00cG078781@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3xoW37o/FfUZJwQG" Content-Disposition: inline In-Reply-To: <201411232100.sANL00cG078781@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:04:18 -0000 --3xoW37o/FfUZJwQG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 23, 2014 at 09:00:00PM +0000, Joel Dahl wrote: > Author: joel (doc committer) > Date: Sun Nov 23 21:00:00 2014 > New Revision: 274925 > URL: https://svnweb.freebsd.org/changeset/base/274925 >=20 > Log: > Misc mdoc fixes: > =20 > - Remove superfluous paragraph macros. > - Remove/fix empty or incorrect macros. > - Sort sections into conventional order. > - Terminate quoted strings properly. > - Remove EOL whitespace. >=20 > Modified: > head/lib/libc/sys/poll.2 > head/lib/libdpv/dpv.3 > head/sbin/ipfw/ipfw.8 > head/share/man/man4/gre.4 > head/share/man/man4/man4.arm/cgem.4 > head/share/man/man4/me.4 > head/share/man/man4/netmap.4 > head/share/man/man9/get_cyclecount.9 > head/share/man/man9/malloc.9 > head/share/man/man9/sleepqueue.9 > head/sys/boot/common/zfsloader.8 > head/sys/boot/i386/gptzfsboot/gptzfsboot.8 > head/usr.bin/dpv/dpv.1 >=20 [...] > +.Sh AUTHORS > +This manual page was written by > +.An Andriy Gapon Aq avg@FreeBSD.org . ^ There should be a Mt here to properly render in ht= ml I just picked one in the middle of this commit. In general every mail on any manpage Mt should be used. Best regards, Bapt --3xoW37o/FfUZJwQG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRyS8wACgkQ8kTtMUmk6Eye/QCbB8un4aBE+sxWXRnWe31vPGln 3awAmgMXkPopWPdXIly2StUwLsFeE+XY =DxRh -----END PGP SIGNATURE----- --3xoW37o/FfUZJwQG-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:14:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0207F59E; Sun, 23 Nov 2014 21:14:52 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8954A87D; Sun, 23 Nov 2014 21:14:51 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id n3so3962325wiv.7 for ; Sun, 23 Nov 2014 13:14:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Zr3ULbCN9dVeSY/ZSuPes9587FHlGjUcbX5+jll/HA8=; b=YItxdLzeaXP99Yc2pM0YSj+ccFFlxTchVhts2oNmwtmJjJ7AH+kFsSUHpYvBKNz7Ba gmT+I1G7yeIGgCCYIbXy38OFL7Mvkqk/axINymvVT4/iWuEnBjV8xdj+ALxFs1Gg6w2Z GR3phDaf1uAx6eeSKqhZ5AsSWuMJhymYYtdYLiwweHsNkl+ywQ8P7BWuD4iaQ7QKxShy SIujtXfF50G6On7d6CxtIcltxFg5XLNmpxUGWJ0n0CkxEFTDvZjp4ljOKgnNRAFYjdpu vgf7/QhiVbzDbaz2JL0lbVRLd/3/D4OpVL9hQshJ8Nz2uN9qqytNNYxlaiCZmejdlgrw swbw== MIME-Version: 1.0 X-Received: by 10.195.11.38 with SMTP id ef6mr1046801wjd.68.1416777289842; Sun, 23 Nov 2014 13:14:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Sun, 23 Nov 2014 13:14:49 -0800 (PST) In-Reply-To: <201411201706.sAKH6fVP032621@svn.freebsd.org> References: <201411201706.sAKH6fVP032621@svn.freebsd.org> Date: Sun, 23 Nov 2014 13:14:49 -0800 X-Google-Sender-Auth: UbF-4GPme_PEde0WVAEljrZ3Lpk Message-ID: Subject: Re: svn commit: r274752 - in head/sys/mips: include mips From: Adrian Chadd To: Ruslan Bukin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:14:52 -0000 Hi! You have some function declarations wrong. vm_offset_t != vm_paddr_t. eg: +void mipsNN_sdcache_wbinv_range_32( vm_paddr_t, vm_size_t); but +void +mipsNN_sdcache_wbinv_range_ 32(vm_offset_t va, vm_size_t size) .. did you test this with a make universe pass? Thanks, -adrian On 20 November 2014 at 09:06, Ruslan Bukin wrote: > Author: br > Date: Thu Nov 20 17:06:41 2014 > New Revision: 274752 > URL: https://svnweb.freebsd.org/changeset/base/274752 > > Log: > Add L2-cache writeback/flush operations. Supported 32,128-byte line-size, > else ignored. Cavium Networks also ignored as it has non-standard config > registers. > > Obtained from: NetBSD > Sponsored by: DARPA, AFRL > > Modified: > head/sys/mips/include/cache_mipsNN.h > head/sys/mips/include/cpuinfo.h > head/sys/mips/include/cpuregs.h > head/sys/mips/mips/cache.c > head/sys/mips/mips/cache_mipsNN.c > head/sys/mips/mips/cpu.c > > Modified: head/sys/mips/include/cache_mipsNN.h > ============================================================================== > --- head/sys/mips/include/cache_mipsNN.h Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/include/cache_mipsNN.h Thu Nov 20 17:06:41 2014 (r274752) > @@ -67,5 +67,15 @@ void mipsNN_pdcache_wbinv_range_index_12 > void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); > void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); > #endif > +void mipsNN_sdcache_wbinv_all_32(void); > +void mipsNN_sdcache_wbinv_range_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wbinv_range_index_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_inv_range_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wb_range_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wbinv_all_128(void); > +void mipsNN_sdcache_wbinv_range_128(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wbinv_range_index_128(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_inv_range_128(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wb_range_128(vm_paddr_t, vm_size_t); > > #endif /* _MACHINE_CACHE_MIPSNN_H_ */ > > Modified: head/sys/mips/include/cpuinfo.h > ============================================================================== > --- head/sys/mips/include/cpuinfo.h Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/include/cpuinfo.h Thu Nov 20 17:06:41 2014 (r274752) > @@ -67,6 +67,12 @@ struct mips_cpuinfo { > u_int8_t dc_nways; > u_int16_t dc_nsets; > } l1; > + struct { > + u_int32_t dc_size; > + u_int8_t dc_linesize; > + u_int8_t dc_nways; > + u_int16_t dc_nsets; > + } l2; > }; > > extern struct mips_cpuinfo cpuinfo; > > Modified: head/sys/mips/include/cpuregs.h > ============================================================================== > --- head/sys/mips/include/cpuregs.h Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/include/cpuregs.h Thu Nov 20 17:06:41 2014 (r274752) > @@ -550,6 +550,13 @@ > #define MIPS_CONFIG1_EP 0x00000002 /* EJTAG implemented */ > #define MIPS_CONFIG1_FP 0x00000001 /* FPU implemented */ > > +#define MIPS_CONFIG2_SA_SHIFT 0 /* Secondary cache associativity */ > +#define MIPS_CONFIG2_SA_MASK 0xf > +#define MIPS_CONFIG2_SL_SHIFT 4 /* Secondary cache line size */ > +#define MIPS_CONFIG2_SL_MASK 0xf > +#define MIPS_CONFIG2_SS_SHIFT 8 /* Secondary cache sets per way */ > +#define MIPS_CONFIG2_SS_MASK 0xf > + > #define MIPS_CONFIG4_MMUSIZEEXT 0x000000FF /* bits 7.. 0 MMU Size Extension */ > #define MIPS_CONFIG4_MMUEXTDEF 0x0000C000 /* bits 15.14 MMU Extension Definition */ > #define MIPS_CONFIG4_MMUEXTDEF_MMUSIZEEXT 0x00004000 /* This values denotes CONFIG4 bits */ > > Modified: head/sys/mips/mips/cache.c > ============================================================================== > --- head/sys/mips/mips/cache.c Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/mips/cache.c Thu Nov 20 17:06:41 2014 (r274752) > @@ -260,19 +260,42 @@ mips_config_cache(struct mips_cpuinfo * > panic("no pdcache_wb_range"); > } > > - /* XXXMIPS: No secondary cache handlers yet */ > -#ifdef notyet > - if (mips_sdcache_size) { > - if (!mips_cache_ops.mco_sdcache_wbinv_all) > - panic("no sdcache_wbinv_all"); > - if (!mips_cache_ops.mco_sdcache_wbinv_range) > - panic("no sdcache_wbinv_range"); > - if (!mips_cache_ops.mco_sdcache_wbinv_range_index) > - panic("no sdcache_wbinv_range_index"); > - if (!mips_cache_ops.mco_sdcache_inv_range) > - panic("no sdcache_inv_range"); > - if (!mips_cache_ops.mco_sdcache_wb_range) > - panic("no sdcache_wb_range"); > + /* L2 data cache */ > + if (!cpuinfo->l2.dc_size) { > + /* No L2 found, ignore */ > + return; > } > + > + switch (cpuinfo->l2.dc_linesize) { > + case 32: > + mips_cache_ops.mco_sdcache_wbinv_all = > + mipsNN_sdcache_wbinv_all_32; > + mips_cache_ops.mco_sdcache_wbinv_range = > + mipsNN_sdcache_wbinv_range_32; > + mips_cache_ops.mco_sdcache_wbinv_range_index = > + mipsNN_sdcache_wbinv_range_index_32; > + mips_cache_ops.mco_sdcache_inv_range = > + mipsNN_sdcache_inv_range_32; > + mips_cache_ops.mco_sdcache_wb_range = > + mipsNN_sdcache_wb_range_32; > + break; > + case 128: > + mips_cache_ops.mco_sdcache_wbinv_all = > + mipsNN_sdcache_wbinv_all_128; > + mips_cache_ops.mco_sdcache_wbinv_range = > + mipsNN_sdcache_wbinv_range_128; > + mips_cache_ops.mco_sdcache_wbinv_range_index = > + mipsNN_sdcache_wbinv_range_index_128; > + mips_cache_ops.mco_sdcache_inv_range = > + mipsNN_sdcache_inv_range_128; > + mips_cache_ops.mco_sdcache_wb_range = > + mipsNN_sdcache_wb_range_128; > + break; > + default: > +#ifdef CACHE_DEBUG > + printf(" no sdcache ops for %d byte lines", > + cpuinfo->l2.dc_linesize); > #endif > + break; > + } > } > > Modified: head/sys/mips/mips/cache_mipsNN.c > ============================================================================== > --- head/sys/mips/mips/cache_mipsNN.c Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/mips/cache_mipsNN.c Thu Nov 20 17:06:41 2014 (r274752) > @@ -52,6 +52,9 @@ __FBSDID("$FreeBSD$"); > #define round_line32(x) (((x) + 31) & ~31) > #define trunc_line32(x) ((x) & ~31) > > +#define round_line128(x) (((x) + 127) & ~127) > +#define trunc_line128(x) ((x) & ~127) > + > #if defined(CPU_NLM) > static __inline void > xlp_sync(void) > @@ -100,6 +103,10 @@ static int pdcache_size; > static int pdcache_stride; > static int pdcache_loopcount; > static int pdcache_way_mask; > +static int sdcache_size; > +static int sdcache_stride; > +static int sdcache_loopcount; > +static int sdcache_way_mask; > > void > mipsNN_cache_init(struct mips_cpuinfo * cpuinfo) > @@ -142,6 +149,11 @@ mipsNN_cache_init(struct mips_cpuinfo * > pdcache_size = cpuinfo->l1.dc_size; > pdcache_way_mask = cpuinfo->l1.dc_nways - 1; > > + sdcache_stride = cpuinfo->l2.dc_nsets * cpuinfo->l2.dc_linesize; > + sdcache_loopcount = cpuinfo->l2.dc_nways; > + sdcache_size = cpuinfo->l2.dc_size; > + sdcache_way_mask = cpuinfo->l2.dc_nways - 1; > + > #define CACHE_DEBUG > #ifdef CACHE_DEBUG > printf("Cache info:\n"); > @@ -636,3 +648,195 @@ mipsNN_pdcache_wb_range_128(vm_offset_t > } > > #endif > + > +void > +mipsNN_sdcache_wbinv_all_32(void) > +{ > + vm_offset_t va = MIPS_PHYS_TO_KSEG0(0); > + vm_offset_t eva = va + sdcache_size; > + > + while (va < eva) { > + cache_r4k_op_32lines_32(va, > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > + va += (32 * 32); > + } > +} > + > +void > +mipsNN_sdcache_wbinv_range_32(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva = round_line32(va + size); > + > + va = trunc_line32(va); > + > + while ((eva - va) >= (32 * 32)) { > + cache_r4k_op_32lines_32(va, > + CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > + va += (32 * 32); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > + va += 32; > + } > +} > + > +void > +mipsNN_sdcache_wbinv_range_index_32(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva; > + > + /* > + * Since we're doing Index ops, we expect to not be able > + * to access the address we've been given. So, get the > + * bits that determine the cache index, and make a KSEG0 > + * address out of them. > + */ > + va = MIPS_PHYS_TO_KSEG0(va & (sdcache_size - 1)); > + > + eva = round_line32(va + size); > + va = trunc_line32(va); > + > + while ((eva - va) >= (32 * 32)) { > + cache_r4k_op_32lines_32(va, > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > + va += (32 * 32); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > + va += 32; > + } > +} > + > +void > +mipsNN_sdcache_inv_range_32(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva = round_line32(va + size); > + > + va = trunc_line32(va); > + > + while ((eva - va) >= (32 * 32)) { > + cache_r4k_op_32lines_32(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > + va += (32 * 32); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > + va += 32; > + } > +} > + > +void > +mipsNN_sdcache_wb_range_32(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva = round_line32(va + size); > + > + va = trunc_line32(va); > + > + while ((eva - va) >= (32 * 32)) { > + cache_r4k_op_32lines_32(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > + va += (32 * 32); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > + va += 32; > + } > +} > + > +void > +mipsNN_sdcache_wbinv_all_128(void) > +{ > + vm_offset_t va = MIPS_PHYS_TO_KSEG0(0); > + vm_offset_t eva = va + sdcache_size; > + > + while (va < eva) { > + cache_r4k_op_32lines_128(va, > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > + va += (32 * 128); > + } > +} > + > +void > +mipsNN_sdcache_wbinv_range_128(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva = round_line128(va + size); > + > + va = trunc_line128(va); > + > + while ((eva - va) >= (32 * 128)) { > + cache_r4k_op_32lines_128(va, > + CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > + va += (32 * 128); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > + va += 128; > + } > +} > + > +void > +mipsNN_sdcache_wbinv_range_index_128(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva; > + > + /* > + * Since we're doing Index ops, we expect to not be able > + * to access the address we've been given. So, get the > + * bits that determine the cache index, and make a KSEG0 > + * address out of them. > + */ > + va = MIPS_PHYS_TO_KSEG0(va & (sdcache_size - 1)); > + > + eva = round_line128(va + size); > + va = trunc_line128(va); > + > + while ((eva - va) >= (32 * 128)) { > + cache_r4k_op_32lines_128(va, > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > + va += (32 * 128); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > + va += 128; > + } > +} > + > +void > +mipsNN_sdcache_inv_range_128(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva = round_line128(va + size); > + > + va = trunc_line128(va); > + > + while ((eva - va) >= (32 * 128)) { > + cache_r4k_op_32lines_128(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > + va += (32 * 128); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > + va += 128; > + } > +} > + > +void > +mipsNN_sdcache_wb_range_128(vm_offset_t va, vm_size_t size) > +{ > + vm_offset_t eva = round_line128(va + size); > + > + va = trunc_line128(va); > + > + while ((eva - va) >= (32 * 128)) { > + cache_r4k_op_32lines_128(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > + va += (32 * 128); > + } > + > + while (va < eva) { > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > + va += 128; > + } > +} > > Modified: head/sys/mips/mips/cpu.c > ============================================================================== > --- head/sys/mips/mips/cpu.c Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/mips/cpu.c Thu Nov 20 17:06:41 2014 (r274752) > @@ -73,6 +73,7 @@ mips_get_identity(struct mips_cpuinfo *c > u_int32_t prid; > u_int32_t cfg0; > u_int32_t cfg1; > + u_int32_t cfg2; > #if defined(CPU_CNMIPS) > u_int32_t cfg4; > #endif > @@ -186,6 +187,31 @@ mips_get_identity(struct mips_cpuinfo *c > * cpuinfo->l1.ic_nsets * cpuinfo->l1.ic_nways; > cpuinfo->l1.dc_size = cpuinfo->l1.dc_linesize > * cpuinfo->l1.dc_nsets * cpuinfo->l1.dc_nways; > + > +#ifndef CPU_CNMIPS > + /* L2 cache */ > + if (!(cfg1 & MIPS_CONFIG_CM)) { > + /* We don't have valid cfg2 register */ > + return; > + } > + > + cfg2 = mips_rd_config2(); > + > + tmp = (cfg2 >> MIPS_CONFIG2_SL_SHIFT) & MIPS_CONFIG2_SL_MASK; > + if (0 < tmp && tmp <= 7) > + cpuinfo->l2.dc_linesize = 2 << tmp; > + > + tmp = (cfg2 >> MIPS_CONFIG2_SS_SHIFT) & MIPS_CONFIG2_SS_MASK; > + if (0 <= tmp && tmp <= 7) > + cpuinfo->l2.dc_nsets = 64 << tmp; > + > + tmp = (cfg2 >> MIPS_CONFIG2_SA_SHIFT) & MIPS_CONFIG2_SA_MASK; > + if (0 <= tmp && tmp <= 7) > + cpuinfo->l2.dc_nways = tmp + 1; > + > + cpuinfo->l2.dc_size = cpuinfo->l2.dc_linesize > + * cpuinfo->l2.dc_nsets * cpuinfo->l2.dc_nways; > +#endif > } > > void > @@ -355,6 +381,7 @@ static driver_t cpu_driver = { > static int > cpu_probe(device_t dev) > { > + > return (0); > } > > From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:17:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6C49700; Sun, 23 Nov 2014 21:17:26 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E6D894; Sun, 23 Nov 2014 21:17:26 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XseX7-0007Bm-6a; Sun, 23 Nov 2014 21:17:25 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sANLHN73009049; Sun, 23 Nov 2014 14:17:23 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18RQDe5S18+nAIfT4gTbqym X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r274752 - in head/sys/mips: include mips From: Ian Lepore To: Ruslan Bukin In-Reply-To: <201411201706.sAKH6fVP032621@svn.freebsd.org> References: <201411201706.sAKH6fVP032621@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 23 Nov 2014 14:17:22 -0700 Message-ID: <1416777442.1147.346.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:17:26 -0000 On Thu, 2014-11-20 at 17:06 +0000, Ruslan Bukin wrote: > Author: br > Date: Thu Nov 20 17:06:41 2014 > New Revision: 274752 > URL: https://svnweb.freebsd.org/changeset/base/274752 > > Log: > Add L2-cache writeback/flush operations. Supported 32,128-byte line-size, > else ignored. Cavium Networks also ignored as it has non-standard config > registers. > > Obtained from: NetBSD > Sponsored by: DARPA, AFRL > > Modified: > head/sys/mips/include/cache_mipsNN.h > head/sys/mips/include/cpuinfo.h > head/sys/mips/include/cpuregs.h > head/sys/mips/mips/cache.c > head/sys/mips/mips/cache_mipsNN.c > head/sys/mips/mips/cpu.c > > Modified: head/sys/mips/include/cache_mipsNN.h > ============================================================================== > --- head/sys/mips/include/cache_mipsNN.h Thu Nov 20 17:03:40 2014 (r274751) > +++ head/sys/mips/include/cache_mipsNN.h Thu Nov 20 17:06:41 2014 (r274752) > @@ -67,5 +67,15 @@ void mipsNN_pdcache_wbinv_range_index_12 > void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); > void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); > #endif > +void mipsNN_sdcache_wbinv_all_32(void); > +void mipsNN_sdcache_wbinv_range_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wbinv_range_index_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_inv_range_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wb_range_32(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wbinv_all_128(void); > +void mipsNN_sdcache_wbinv_range_128(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wbinv_range_index_128(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_inv_range_128(vm_paddr_t, vm_size_t); > +void mipsNN_sdcache_wb_range_128(vm_paddr_t, vm_size_t); > I'm getting build failures on this because of vm_paddr_t in these declarations versus vm_offset_t in the defintions and some pointers. -- Ian From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:28:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0E979C3; Sun, 23 Nov 2014 21:28:38 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id B06A3981; Sun, 23 Nov 2014 21:28:38 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 19134AC56; Sun, 23 Nov 2014 21:28:38 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id EBE4610EA; Sun, 23 Nov 2014 22:28:37 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> Date: Sun, 23 Nov 2014 22:28:37 +0100 In-Reply-To: <20141123210412.GG68776@ivaldir.etoilebsd.net> (Baptiste Daroussin's message of "Sun, 23 Nov 2014 22:04:12 +0100") Message-ID: <86oarxa9oa.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:28:39 -0000 Baptiste Daroussin writes: > [...] In general every mail on any manpage Mt should be used. That's trivial to script, so how about we just make a pass over all non-contrib man pages? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:35:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AC15DB2; Sun, 23 Nov 2014 21:35:33 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A86F8A48; Sun, 23 Nov 2014 21:35:32 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y19so10774547wgg.0 for ; Sun, 23 Nov 2014 13:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gV8JU7xau/gyns9hAtxBTuNyLXwGlvv4YIUo7r568wA=; b=jT3YXm9Tmsdr0RCPX0DL1fdnr4KRUB7GKyU4r+uY+QxocimkWNJVufxSZp/bAVHHnN Rq7yxfiFZVcjMT7/N99o1g2A/KdVNJ/9EDTInOxdvzn5aT7OCUFVr5bEnbqdWCvOj53e P08z/sk0dkTkAtYfuR6x5dwWb3Yyq0Jm1XVXN8zO6u9Yn2ru38TrnSi+HOag8LEO0hzy 9kHSd4stxSyQn98tj66VEeGKdLfbnoY/Y/IIYAvgtaunt5ovqQXp7x/gBvaQaLqsNXUt SVyRG9lnLlzJRFDDyAEDVkei6kxiQ2nebAp+KXqhZGFM3IqKcBkyFBqaY6I5K9bUcczE 1DrA== X-Received: by 10.194.248.162 with SMTP id yn2mr27910507wjc.16.1416778531209; Sun, 23 Nov 2014 13:35:31 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id hs1sm9269155wib.1.2014.11.23.13.35.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Nov 2014 13:35:30 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 23 Nov 2014 22:35:27 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Message-ID: <20141123213527.GH68776@ivaldir.etoilebsd.net> References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <86oarxa9oa.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vjQsMS/9MbKYGLq" Content-Disposition: inline In-Reply-To: <86oarxa9oa.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:35:33 -0000 --5vjQsMS/9MbKYGLq Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 23, 2014 at 10:28:37PM +0100, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > [...] In general every mail on any manpage Mt should be used. >=20 > That's trivial to script, so how about we just make a pass over all > non-contrib man pages? >=20 That was already done, but some new have been added or missed since it seem= s :) Best regards, Bapt --5vjQsMS/9MbKYGLq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRyUx8ACgkQ8kTtMUmk6Ez2uQCdHtug+ef4KH3jqvp6bXQcyX79 104AoIpG8rcTs7vCtuMB3+11roJ+9Jts =LVGl -----END PGP SIGNATURE----- --5vjQsMS/9MbKYGLq-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:37:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B34E8EFE; Sun, 23 Nov 2014 21:37:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FFD3A5A; Sun, 23 Nov 2014 21:37:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANLbYkN097560; Sun, 23 Nov 2014 21:37:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANLbY0F097559; Sun, 23 Nov 2014 21:37:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411232137.sANLbY0F097559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 23 Nov 2014 21:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274926 - head/sys/dev/mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:37:34 -0000 Author: ian Date: Sun Nov 23 21:37:33 2014 New Revision: 274926 URL: https://svnweb.freebsd.org/changeset/base/274926 Log: Squelch a (bogus) used before init warning when building with gcc. Modified: head/sys/dev/mpt/mpt.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Sun Nov 23 21:00:00 2014 (r274925) +++ head/sys/dev/mpt/mpt.c Sun Nov 23 21:37:33 2014 (r274926) @@ -1334,6 +1334,7 @@ mpt_wait_req(struct mpt_softc *mpt, requ /* Set timeout as well so final timeout check works. */ timeout = time_ms; } else { + sbt = 0; /* Squelch bogus gcc warning. */ timeout = time_ms * 2; } req->state |= REQ_STATE_NEED_WAKEUP; From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:47:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCEB6453; Sun, 23 Nov 2014 21:47:26 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8717AB8B; Sun, 23 Nov 2014 21:47:26 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::b130:3e2f:8715:b8f9] (unknown [IPv6:2001:7b8:3a7:0:b130:3e2f:8715:b8f9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0E8BBB80A; Sun, 23 Nov 2014 22:47:24 +0100 (CET) Subject: Re: svn commit: r274926 - head/sys/dev/mpt Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F5741A8B-DC5B-4CE0-9631-0841B1898B1D"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b1 From: Dimitry Andric In-Reply-To: <201411232137.sANLbY0F097559@svn.freebsd.org> Date: Sun, 23 Nov 2014 22:47:12 +0100 Message-Id: <33FD799A-274A-4797-8A0F-365B37868997@FreeBSD.org> References: <201411232137.sANLbY0F097559@svn.freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:47:26 -0000 --Apple-Mail=_F5741A8B-DC5B-4CE0-9631-0841B1898B1D Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 23 Nov 2014, at 22:37, Ian Lepore wrote: > > Author: ian > Date: Sun Nov 23 21:37:33 2014 > New Revision: 274926 > URL: https://svnweb.freebsd.org/changeset/base/274926 > > Log: > Squelch a (bogus) used before init warning when building with gcc. There have been quite a number of commits now for silencing gcc's mostly incorrect used-before-init warnings. Of course, this is due to base gcc being very old. So maybe it's time to start using -Wno-uninitialized for gcc 4.2 and earlier? -Dimitry --Apple-Mail=_F5741A8B-DC5B-4CE0-9631-0841B1898B1D 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----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlRyVesACgkQsF6jCi4glqM6TACfZfAbFPdaTDIolcj/PS1jJgjA 6pgAoKL9d7ELBsBWFdu0L416DrZY6bYl =Q9YP -----END PGP SIGNATURE----- --Apple-Mail=_F5741A8B-DC5B-4CE0-9631-0841B1898B1D-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:54:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56012762; Sun, 23 Nov 2014 21:54:41 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28CBCC5C; Sun, 23 Nov 2014 21:54:40 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Xsf74-000OJJ-5l; Sun, 23 Nov 2014 21:54:34 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sANLsXNg009115; Sun, 23 Nov 2014 14:54:33 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18ptIS0q34q0PqT636h9w+d X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r274926 - head/sys/dev/mpt From: Ian Lepore To: Dimitry Andric In-Reply-To: <33FD799A-274A-4797-8A0F-365B37868997@FreeBSD.org> References: <201411232137.sANLbY0F097559@svn.freebsd.org> <33FD799A-274A-4797-8A0F-365B37868997@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 23 Nov 2014 14:54:32 -0700 Message-ID: <1416779672.1147.349.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:54:41 -0000 On Sun, 2014-11-23 at 22:47 +0100, Dimitry Andric wrote: > On 23 Nov 2014, at 22:37, Ian Lepore wrote: > > > > Author: ian > > Date: Sun Nov 23 21:37:33 2014 > > New Revision: 274926 > > URL: https://svnweb.freebsd.org/changeset/base/274926 > > > > Log: > > Squelch a (bogus) used before init warning when building with gcc. > > There have been quite a number of commits now for silencing gcc's mostly > incorrect used-before-init warnings. Of course, this is due to base gcc > being very old. So maybe it's time to start using -Wno-uninitialized > for gcc 4.2 and earlier? > > -Dimitry > It does seem like just sprinking trash over the source code. Does clang warn properly (or at least better than gcc does), or if we squelch this will we have no warnings at all? Hmmm, coverity should tell us if we introduce new use-before-inits, right? -- Ian From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 22:01:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E2F1A34; Sun, 23 Nov 2014 22:01:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49D8FD2C; Sun, 23 Nov 2014 22:01:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANM1iMW010710; Sun, 23 Nov 2014 22:01:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANM1ihB010709; Sun, 23 Nov 2014 22:01:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232201.sANM1ihB010709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 22:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274927 - head/contrib/llvm/tools/lldb/docs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 22:01:44 -0000 Author: bapt Date: Sun Nov 23 22:01:43 2014 New Revision: 274927 URL: https://svnweb.freebsd.org/changeset/base/274927 Log: Fix an error (case on a .Nm) preventing mandoc from rendering the manpage Fix mandoc warnings: extrat space at end of lines Modified: head/contrib/llvm/tools/lldb/docs/lldb.1 Modified: head/contrib/llvm/tools/lldb/docs/lldb.1 ============================================================================== --- head/contrib/llvm/tools/lldb/docs/lldb.1 Sun Nov 23 21:37:33 2014 (r274926) +++ head/contrib/llvm/tools/lldb/docs/lldb.1 Sun Nov 23 22:01:43 2014 (r274927) @@ -1,4 +1,4 @@ -.Dd 7 June, 2012 \" DATE +.Dd June 7, 2012 \" DATE .Dt LLDB 1 \" Program name and manual section number .Os Darwin \" Operating System .Sh NAME \" Section Header - required - don't modify @@ -15,30 +15,30 @@ .Ar [[--] ...] .Sh DESCRIPTION \" Section Header - required - don't modify .Nm -is the command line interface for the LLDB debugger library. +is the command line interface for the LLDB debugger library. .Nm can debug C, C++, Objective-C, and Objective-C++ programs. .Pp The following options are available: .Bl -tag -width indent -.It Fl h, -help -Prints out the usage information for the +.It Fl h, -help +Prints out the usage information for the .Nm debugger. The \fB\-\-help\fR text may be more up-to-date and authoritative than the command line options described in this man page. -.It Fl v, -version -Prints out the version number of the -.Nm +.It Fl v, -version +Prints out the version number of the +.Nm debugger. .It Fl a, -arch Ar arch -Specifies which architecture +Specifies which architecture .Nm will use when launching the specified program (assuming the provided executable is built for multiple architectures.) .It Fl f, -file Ar filename Specifies the executable file that -.nm +.Nm will be launching / attaching to. .It Fl n, -attach-name Ar process-name Specifies the name of a currently-running process to attach to. @@ -60,10 +60,10 @@ Currently only the Python extensions hav .It Fl d, -debug Tells the debugger to print out extra information for debugging itself. .It Fl s, -source Ar filename -Tells +Tells .Nm to read in and execute the file "\fBfilename\fR", which -should contain +should contain .Nm commands. .It Fl e, -editor @@ -81,7 +81,7 @@ Remember to end the options with "--" if In .Nm there is a \fBhelp\fR command which can be used to find descriptions and examples of -all +all .Nm commands. To get help on "\fBbreakpoint set\fR" you would type "\fBhelp breakpoint set\fR". .Pp @@ -94,18 +94,18 @@ will read settings/aliases/commands from .Pp First, it will read a \fB~/.lldbinit-\fIdebugger\fR command file. If you are using the .Nm -command line interface, this is \fB~/.lldbinit-lldb\fR. If you are using +command line interface, this is \fB~/.lldbinit-lldb\fR. If you are using .Nm inside a GUI debugger like .Nm Xcode this will be \fB~/.lldbinit-Xcode\fR. This is a useful place to put settings that you -want to apply only when a given +want to apply only when a given .Nm command interpreter is used. .Pp Second, \fB~/.lldbinit\fR is read. .Pp -Third, an \fR.lldbinit\fR file in the current working directory (where +Third, an \fR.lldbinit\fR file in the current working directory (where .Nm is started) will be read. .Sh SEE ALSO From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 22:09:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F569DFE; Sun, 23 Nov 2014 22:09:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BB93D82; Sun, 23 Nov 2014 22:09:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANM96HA012459; Sun, 23 Nov 2014 22:09:06 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANM96N8012458; Sun, 23 Nov 2014 22:09:06 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411232209.sANM96N8012458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 23 Nov 2014 22:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274928 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 22:09:06 -0000 Author: br Date: Sun Nov 23 22:09:05 2014 New Revision: 274928 URL: https://svnweb.freebsd.org/changeset/base/274928 Log: Correct the functions declaration. Modified: head/sys/mips/include/cache_mipsNN.h Modified: head/sys/mips/include/cache_mipsNN.h ============================================================================== --- head/sys/mips/include/cache_mipsNN.h Sun Nov 23 22:01:43 2014 (r274927) +++ head/sys/mips/include/cache_mipsNN.h Sun Nov 23 22:09:05 2014 (r274928) @@ -68,14 +68,14 @@ void mipsNN_pdcache_inv_range_128(vm_off void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); #endif void mipsNN_sdcache_wbinv_all_32(void); -void mipsNN_sdcache_wbinv_range_32(vm_paddr_t, vm_size_t); -void mipsNN_sdcache_wbinv_range_index_32(vm_paddr_t, vm_size_t); -void mipsNN_sdcache_inv_range_32(vm_paddr_t, vm_size_t); -void mipsNN_sdcache_wb_range_32(vm_paddr_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_inv_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wb_range_32(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_all_128(void); -void mipsNN_sdcache_wbinv_range_128(vm_paddr_t, vm_size_t); -void mipsNN_sdcache_wbinv_range_index_128(vm_paddr_t, vm_size_t); -void mipsNN_sdcache_inv_range_128(vm_paddr_t, vm_size_t); -void mipsNN_sdcache_wb_range_128(vm_paddr_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_inv_range_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wb_range_128(vm_offset_t, vm_size_t); #endif /* _MACHINE_CACHE_MIPSNN_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 22:16:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B935E2; Sun, 23 Nov 2014 22:16:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3595EE42; Sun, 23 Nov 2014 22:16:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANMGicp016979; Sun, 23 Nov 2014 22:16:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANMGibP016978; Sun, 23 Nov 2014 22:16:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232216.sANMGibP016978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 22:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274929 - head/usr.bin/clang/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 22:16:44 -0000 Author: bapt Date: Sun Nov 23 22:16:43 2014 New Revision: 274929 URL: https://svnweb.freebsd.org/changeset/base/274929 Log: Regenerate the manpage in mdoc(7) format using pod2mdoc Now mandoc can render the manpage properly Modified: head/usr.bin/clang/clang/clang.1 Modified: head/usr.bin/clang/clang/clang.1 ============================================================================== --- head/usr.bin/clang/clang/clang.1 Sun Nov 23 22:09:05 2014 (r274928) +++ head/usr.bin/clang/clang/clang.1 Sun Nov 23 22:16:43 2014 (r274929) @@ -1,542 +1,389 @@ .\" $FreeBSD$ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "CLANG 1" -.TH CLANG 1 "2014-01-01" "clang 3.4" "Clang Tools Documentation" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -clang \- the Clang C, C++, and Objective\-C compiler -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -\&\fBclang\fR [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] \fB\-std=\fR\fIstandard\fR \fB\-g\fR - [\fB\-O0\fR|\fB\-O1\fR|\fB\-O2\fR|\fB\-O3\fR|\fB\-Ofast\fR|\fB\-Os\fR|\fB\-Oz\fR|\fB\-O\fR|\fB\-O4\fR] - \fB\-W\fR\fIwarnings...\fR \fB\-pedantic\fR - \fB\-I\fR\fIdir...\fR \fB\-L\fR\fIdir...\fR - \fB\-D\fR\fImacro[=defn]\fR - \fB\-f\fR\fIfeature-option...\fR - \fB\-m\fR\fImachine-option...\fR - \fB\-o\fR \fIoutput-file\fR - \fB\-stdlib=\fR\fIlibrary\fR - \fIinput-filenames\fR -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -\&\fBclang\fR is a C, \*(C+, and Objective-C compiler which encompasses preprocessing, +.Dd November 18, 2013 +.Dt CLANG 1 +.Os +.Sh NAME +.Nm clang +.Nd the Clang C, C++, and Objective-C compiler +.Sh SYNOPSIS +.Nm clang +.Oo +.Fl c Ns | Ns Fl S Ns | Ns Fl E Ns +.Oc +.Ar std= Ns Em standard +.Fl g +.br +.Oo +.Fl O0 Ns | Ns Fl O1 Ns | Ns Fl O2 Ns | Ns Fl O3 Ns | Ns Fl Ofast Ns | Ns Fl Os Ns | Ns Fl Oz Ns | Ns Fl O Ns | Ns Fl O4 Ns +.Oc +.br +.Fl W Ns Em warnings... +.Fl pedantic +.br +.Fl I Ns Em dir... +.Fl L Ns Em dir... +.br +.Fl D Ns Em macro[=defn] +.br +.Fl f Ns Em feature-option... +.br +.Fl m Ns Em machine-option... +.br +.Fl o +.Em output-file +.br +.Ar stdlib= Ns Em library +.br +.Em input-filenames +.Sh DESCRIPTION +.Sy clang +is a C, C++, and Objective-C compiler which encompasses preprocessing, parsing, optimization, code generation, assembly, and linking. Depending on which high-level mode setting is passed, Clang will stop before doing a full link. While Clang is highly integrated, it is important to understand the stages of compilation, to understand how to invoke it. These stages are: -.IP "\fBDriver\fR" 4 -.IX Item "Driver" -The \fBclang\fR executable is actually a small driver which controls the overall +.Bl -tag -width Ds +.It Sy Driver +The +.Sy clang +executable is actually a small driver which controls the overall execution of other tools such as the compiler, assembler and linker. Typically you do not need to interact with the driver, but you transparently use it to run the other tools. -.IP "\fBPreprocessing\fR" 4 -.IX Item "Preprocessing" +.It Sy Preprocessing This stage handles tokenization of the input source file, macro expansion, #include expansion and handling of other preprocessor directives. The output of -this stage is typically called a \*(L".i\*(R" (for C), \*(L".ii\*(R" (for \*(C+), \*(L".mi\*(R" (for -Objective-C) , or \*(L".mii\*(R" (for Objective\-\*(C+) file. -.IP "\fBParsing and Semantic Analysis\fR" 4 -.IX Item "Parsing and Semantic Analysis" +this stage is typically called a ".i" (for C), ".ii" (for C++), ".mi" (for +Objective-C) , or ".mii" (for Objective-C++) file. +.It Sy Parsing and Semantic Analysis This stage parses the input file, translating preprocessor tokens into a parse tree. Once in the form of a parser tree, it applies semantic analysis to compute types for expressions as well and determine whether the code is well formed. This stage is responsible for generating most of the compiler warnings as well as -parse errors. The output of this stage is an \*(L"Abstract Syntax Tree\*(R" (\s-1AST\s0). -.IP "\fBCode Generation and Optimization\fR" 4 -.IX Item "Code Generation and Optimization" -This stage translates an \s-1AST\s0 into low-level intermediate code (known as \*(L"\s-1LLVM -IR\*(R"\s0) and ultimately to machine code. This phase is responsible for optimizing +parse errors. The output of this stage is an "Abstract Syntax Tree" (AST). +.It Sy Code Generation and Optimization +This stage translates an AST into low-level intermediate code (known as "LLVM +IR") and ultimately to machine code. This phase is responsible for optimizing the generated code and handling target-specific code generation. The output of -this stage is typically called a \*(L".s\*(R" file or \*(L"assembly\*(R" file. -.Sp +this stage is typically called a ".s" file or "assembly" file. +.Pp Clang also supports the use of an integrated assembler, in which the code generator produces object files directly. This avoids the overhead of generating -the \*(L".s\*(R" file and of calling the target assembler. -.IP "\fBAssembler\fR" 4 -.IX Item "Assembler" +the ".s" file and of calling the target assembler. +.It Sy Assembler This stage runs the target assembler to translate the output of the compiler -into a target object file. The output of this stage is typically called a \*(L".o\*(R" -file or \*(L"object\*(R" file. -.IP "\fBLinker\fR" 4 -.IX Item "Linker" +into a target object file. The output of this stage is typically called a ".o" +file or "object" file. +.It Sy Linker This stage runs the target linker to merge multiple object files into an executable or dynamic library. The output of this stage is typically called an -\&\*(L"a.out\*(R", \*(L".dylib\*(R" or \*(L".so\*(R" file. -.PP +"a.out", ".dylib" or ".so" file. +.El +.Pp The Clang compiler supports a large number of options to control each of these stages. In addition to compilation of code, Clang also supports other tools: -.PP -\&\fBClang Static Analyzer\fR -.PP +.Pp +.Sy Clang Static Analyzer +.Pp The Clang Static Analyzer is a tool that scans source code to try to find bugs through code analysis. This tool uses many parts of Clang and is built into the -same driver. Please see for more details +same driver. Please see +.Lk http://clang-analyzer.llvm.org +for more details on how to use the static analyzer. -.SH "OPTIONS" -.IX Header "OPTIONS" -.SS "Stage Selection Options" -.IX Subsection "Stage Selection Options" -.IP "\fB\-E\fR" 4 -.IX Item "-E" +.Sh OPTIONS +.Ss Stage Selection Options +.Bl -tag -width Ds +.It Sy -E Run the preprocessor stage. -.IP "\fB\-fsyntax\-only\fR" 4 -.IX Item "-fsyntax-only" +.It Sy -fsyntax-only Run the preprocessor, parser and type checking stages. -.IP "\fB\-S\fR" 4 -.IX Item "-S" -Run the previous stages as well as \s-1LLVM\s0 generation and optimization stages and +.It Sy -S +Run the previous stages as well as LLVM generation and optimization stages and target-specific code generation, producing an assembly file. -.IP "\fB\-c\fR" 4 -.IX Item "-c" -Run all of the above, plus the assembler, generating a target \*(L".o\*(R" object file. -.IP "\fBno stage selection option\fR" 4 -.IX Item "no stage selection option" +.It Sy -c +Run all of the above, plus the assembler, generating a target ".o" object file. +.It Sy no stage selection option If no stage selection option is specified, all stages above are run, and the linker is run to combine the results into an executable or shared library. -.SS "Language Selection and Mode Options" -.IX Subsection "Language Selection and Mode Options" -.IP "\fB\-x\fR \fIlanguage\fR" 4 -.IX Item "-x language" -Treat subsequent input files as having type \fIlanguage\fR. -.IP "\fB\-std\fR=\fIlanguage\fR" 4 -.IX Item "-std=language" +.El +.Ss Language Selection and Mode Options +.Bl -tag -width Ds +.It Sy -x Em language +Treat subsequent input files as having type +.Em language . +.It Sy -std Ns = Ns Em language Specify the language standard to compile for. -.IP "\fB\-stdlib\fR=\fIlibrary\fR" 4 -.IX Item "-stdlib=library" -Specify the \*(C+ standard library to use; supported options are libstdc++ and +.It Sy -stdlib Ns = Ns Em library +Specify the C++ standard library to use; supported options are libstdc++ and libc++. -.IP "\fB\-ansi\fR" 4 -.IX Item "-ansi" -Same as \fB\-std=c89\fR. -.IP "\fB\-ObjC++\fR" 4 -.IX Item "-ObjC++" -Treat source input files as Objective\-\*(C+ inputs. -.IP "\fB\-ObjC\fR" 4 -.IX Item "-ObjC" +.It Sy -ansi +Same as +.Sy -std=c89 . +.It Sy -ObjC++ +Treat source input files as Objective-C++ inputs. +.It Sy -ObjC Treat source input files as Objective-C inputs. -.IP "\fB\-trigraphs\fR" 4 -.IX Item "-trigraphs" +.It Sy -trigraphs Enable trigraphs. -.IP "\fB\-ffreestanding\fR" 4 -.IX Item "-ffreestanding" +.It Sy -ffreestanding Indicate that the file should be compiled for a freestanding, not a hosted, environment. -.IP "\fB\-fno\-builtin\fR" 4 -.IX Item "-fno-builtin" +.It Sy -fno-builtin Disable special handling and optimizations of builtin functions like strlen and malloc. -.IP "\fB\-fmath\-errno\fR" 4 -.IX Item "-fmath-errno" +.It Sy -fmath-errno Indicate that math functions should be treated as updating errno. -.IP "\fB\-fpascal\-strings\fR" 4 -.IX Item "-fpascal-strings" -Enable support for Pascal-style strings with \*(L"\epfoo\*(R". -.IP "\fB\-fms\-extensions\fR" 4 -.IX Item "-fms-extensions" +.It Sy -fpascal-strings +Enable support for Pascal-style strings with "\epfoo". +.It Sy -fms-extensions Enable support for Microsoft extensions. -.IP "\fB\-fmsc\-version=\fR" 4 -.IX Item "-fmsc-version=" +.It Sy -fmsc-version= Set _MSC_VER. Defaults to 1300 on Windows. Not set otherwise. -.IP "\fB\-fborland\-extensions\fR" 4 -.IX Item "-fborland-extensions" +.It Sy -fborland-extensions Enable support for Borland extensions. -.IP "\fB\-fwritable\-strings\fR" 4 -.IX Item "-fwritable-strings" +.It Sy -fwritable-strings Make all string literals default to writable. This disables uniquing of strings and other optimizations. -.IP "\fB\-flax\-vector\-conversions\fR" 4 -.IX Item "-flax-vector-conversions" +.It Sy -flax-vector-conversions Allow loose type checking rules for implicit vector conversions. -.IP "\fB\-fblocks\fR" 4 -.IX Item "-fblocks" -Enable the \*(L"Blocks\*(R" language feature. -.IP "\fB\-fobjc\-gc\-only\fR" 4 -.IX Item "-fobjc-gc-only" +.It Sy -fblocks +Enable the "Blocks" language feature. +.It Sy -fobjc-gc-only Indicate that Objective-C code should be compiled in GC-only mode, which only works when Objective-C Garbage Collection is enabled. -.IP "\fB\-fobjc\-gc\fR" 4 -.IX Item "-fobjc-gc" +.It Sy -fobjc-gc Indicate that Objective-C code should be compiled in hybrid-GC mode, which works -with both \s-1GC\s0 and non-GC mode. -.IP "\fB\-fobjc\-abi\-version\fR=\fIversion\fR" 4 -.IX Item "-fobjc-abi-version=version" -Select the Objective-C \s-1ABI\s0 version to use. Available versions are 1 (legacy -\&\*(L"fragile\*(R" \s-1ABI\s0), 2 (non-fragile \s-1ABI 1\s0), and 3 (non-fragile \s-1ABI 2\s0). -.IP "\fB\-fobjc\-nonfragile\-abi\-version\fR=\fIversion\fR" 4 -.IX Item "-fobjc-nonfragile-abi-version=version" -Select the Objective-C non-fragile \s-1ABI\s0 version to use by default. This will only -be used as the Objective-C \s-1ABI\s0 when the non-fragile \s-1ABI\s0 is enabled (either via -\&\-fobjc\-nonfragile\-abi, or because it is the platform default). -.IP "\fB\-fobjc\-nonfragile\-abi\fR" 4 -.IX Item "-fobjc-nonfragile-abi" -Enable use of the Objective-C non-fragile \s-1ABI.\s0 On platforms for which this is -the default \s-1ABI,\s0 it can be disabled with \fB\-fno\-objc\-nonfragile\-abi\fR. -.SS "Target Selection Options" -.IX Subsection "Target Selection Options" +with both GC and non-GC mode. +.It Sy -fobjc-abi-version Ns = Ns Em version +Select the Objective-C ABI version to use. Available versions are 1 (legacy +"fragile" ABI), 2 (non-fragile ABI 1), and 3 (non-fragile ABI 2). +.It Sy -fobjc-nonfragile-abi-version Ns = Ns Em version +Select the Objective-C non-fragile ABI version to use by default. This will only +be used as the Objective-C ABI when the non-fragile ABI is enabled (either via +-fobjc-nonfragile-abi, or because it is the platform default). +.It Sy -fobjc-nonfragile-abi +Enable use of the Objective-C non-fragile ABI. On platforms for which this is +the default ABI, it can be disabled with +.Sy -fno-objc-nonfragile-abi . +.El +.Ss Target Selection Options Clang fully supports cross compilation as an inherent part of its design. Depending on how your version of Clang is configured, it may have support for a number of cross compilers, or may only support a native target. -.IP "\fB\-arch\fR \fIarchitecture\fR" 4 -.IX Item "-arch architecture" +.Bl -tag -width Ds +.It Sy -arch Em architecture Specify the architecture to build for. -.IP "\fB\-mmacosx\-version\-min\fR=\fIversion\fR" 4 -.IX Item "-mmacosx-version-min=version" -When building for Mac \s-1OS/X,\s0 specify the minimum version supported by your +.It Sy -mmacosx-version-min Ns = Ns Em version +When building for Mac OS/X, specify the minimum version supported by your application. -.IP "\fB\-miphoneos\-version\-min\fR" 4 -.IX Item "-miphoneos-version-min" -When building for iPhone \s-1OS,\s0 specify the minimum version supported by your +.It Sy -miphoneos-version-min +When building for iPhone OS, specify the minimum version supported by your application. -.IP "\fB\-march\fR=\fIcpu\fR" 4 -.IX Item "-march=cpu" +.It Sy -march Ns = Ns Em cpu Specify that Clang should generate code for a specific processor family member -and later. For example, if you specify \-march=i486, the compiler is allowed to +and later. For example, if you specify -march=i486, the compiler is allowed to generate instructions that are valid on i486 and later processors, but which may not exist on earlier ones. -.SS "Code Generation Options" -.IX Subsection "Code Generation Options" -.IP "\fB\-O0\fR \fB\-O1\fR \fB\-O2\fR \fB\-O3\fR \fB\-Ofast\fR \fB\-Os\fR \fB\-Oz\fR \fB\-O\fR \fB\-O4\fR" 4 -.IX Item "-O0 -O1 -O2 -O3 -Ofast -Os -Oz -O -O4" +.El +.Ss Code Generation Options +.Bl -tag -width Ds +.It Sy -O0 Sy -O1 Sy -O2 Sy -O3 Sy -Ofast Sy -\&Os Sy -\&Oz Sy -O Sy -O4 Specify which optimization level to use: -.RS 4 -.IP "\fB\-O0\fR" 4 -.IX Item "-O0" -Means \*(L"no optimization\*(R": this level compiles the fastest and +.Bl -tag -width Ds +.It Sy -O0 +Means "no optimization": this level compiles the fastest and generates the most debuggable code. -.IP "\fB\-O1\fR" 4 -.IX Item "-O1" -Somewhere between \fB\-O0\fR and \fB\-O2\fR. -.IP "\fB\-O2\fR" 4 -.IX Item "-O2" +.It Sy -O1 +Somewhere between +.Sy -O0 +and +.Sy -O2 . +.It Sy -O2 Moderate level of optimization which enables most optimizations. -.IP "\fB\-O3\fR" 4 -.IX Item "-O3" -Like \fB\-O2\fR, except that it enables optimizations that take longer to perform +.It Sy -O3 +Like +.Sy -O2 , +except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster). -.IP "\fB\-Ofast\fR" 4 -.IX Item "-Ofast" -Enables all the optimizations from \fB\-O3\fR along with other aggressive +.It Sy -Ofast +Enables all the optimizations from +.Sy -O3 +along with other aggressive optimizations that may violate strict compliance with language standards. -.IP "\fB\-Os\fR" 4 -.IX Item "-Os" -Like \fB\-O2\fR with extra optimizations to reduce code size. -.IP "\fB\-Oz\fR" 4 -.IX Item "-Oz" -Like \fB\-Os\fR (and thus \fB\-O2\fR), but reduces code size further. -.IP "\fB\-O\fR" 4 -.IX Item "-O" -Equivalent to \fB\-O2\fR. -.IP "\fB\-O4\fR and higher" 4 -.IX Item "-O4 and higher" -Currently equivalent to \fB\-O3\fR -.RE -.RS 4 -.RE -.IP "\fB\-g\fR" 4 -.IX Item "-g" +.It Sy -\&Os +Like +.Sy -O2 +with extra optimizations to reduce code size. +.It Sy -\&Oz +Like +.Sy -\&Os +(and thus +.Sy -O2 Ns ), but reduces code size further. +.It Sy -O +Equivalent to +.Sy -O2 . +.It Sy -O4 No and higher +Currently equivalent to +.Sy -O3 +.El +.It Sy -g Generate debug information. Note that Clang debug information works best at -\&\fB\-O0\fR. At higher optimization levels, only line number information is +.Sy -O0 . +At higher optimization levels, only line number information is currently available. -.IP "\fB\-fexceptions\fR" 4 -.IX Item "-fexceptions" +.It Sy -fexceptions Enable generation of unwind information, this allows exceptions to be thrown -through Clang compiled stack frames. This is on by default in x86\-64. -.IP "\fB\-ftrapv\fR" 4 -.IX Item "-ftrapv" +through Clang compiled stack frames. This is on by default in x86-64. +.It Sy -ftrapv Generate code to catch integer overflow errors. Signed integer overflow is undefined in C, with this flag, extra code is generated to detect this and abort when it happens. -.IP "\fB\-fvisibility\fR" 4 -.IX Item "-fvisibility" +.It Sy -fvisibility This flag sets the default visibility level. -.IP "\fB\-fcommon\fR" 4 -.IX Item "-fcommon" +.It Sy -fcommon This flag specifies that variables without initializers get common linkage. It -can be disabled with \fB\-fno\-common\fR. -.IP "\fB\-ftls\-model\fR" 4 -.IX Item "-ftls-model" -Set the default thread-local storage (\s-1TLS\s0) model to use for thread-local -variables. Valid values are: \*(L"global-dynamic\*(R", \*(L"local-dynamic\*(R", \*(L"initial-exec\*(R" -and \*(L"local-exec\*(R". The default is \*(L"global-dynamic\*(R". The default model can be +can be disabled with +.Sy -fno-common . +.It Sy -ftls-model +Set the default thread-local storage (TLS) model to use for thread-local +variables. Valid values are: "global-dynamic", "local-dynamic", "initial-exec" +and "local-exec". The default is "global-dynamic". The default model can be overridden with the tls_model attribute. The compiler will try to choose a more efficient model if possible. -.IP "\fB\-flto\fR \fB\-emit\-llvm\fR" 4 -.IX Item "-flto -emit-llvm" -Generate output files in \s-1LLVM\s0 formats, suitable for link time optimization. When -used with \fB\-S\fR this generates \s-1LLVM\s0 intermediate language assembly files, -otherwise this generates \s-1LLVM\s0 bitcode format object files (which may be passed +.It Sy -flto Sy -emit-llvm +Generate output files in LLVM formats, suitable for link time optimization. When +used with +.Sy -S +this generates LLVM intermediate language assembly files, +otherwise this generates LLVM bitcode format object files (which may be passed to the linker depending on the stage selection options). -.SS "Driver Options" -.IX Subsection "Driver Options" -.IP "\fB\-###\fR" 4 -.IX Item "-###" +.El +.Ss Driver Options +.Bl -tag -width Ds +.It Sy -### Print the commands to run for this compilation. -.IP "\fB\-\-help\fR" 4 -.IX Item "--help" +.It Sy --help Display available options. -.IP "\fB\-Qunused\-arguments\fR" 4 -.IX Item "-Qunused-arguments" +.It Sy -Qunused-arguments Don't emit warning for unused driver arguments. -.IP "\fB\-Wa,\fR\fIargs\fR" 4 -.IX Item "-Wa,args" -Pass the comma separated arguments in \fIargs\fR to the assembler. -.IP "\fB\-Wl,\fR\fIargs\fR" 4 -.IX Item "-Wl,args" -Pass the comma separated arguments in \fIargs\fR to the linker. -.IP "\fB\-Wp,\fR\fIargs\fR" 4 -.IX Item "-Wp,args" -Pass the comma separated arguments in \fIargs\fR to the preprocessor. -.IP "\fB\-Xanalyzer\fR \fIarg\fR" 4 -.IX Item "-Xanalyzer arg" -Pass \fIarg\fR to the static analyzer. -.IP "\fB\-Xassembler\fR \fIarg\fR" 4 -.IX Item "-Xassembler arg" -Pass \fIarg\fR to the assembler. -.IP "\fB\-Xlinker\fR \fIarg\fR" 4 -.IX Item "-Xlinker arg" -Pass \fIarg\fR to the linker. -.IP "\fB\-Xpreprocessor\fR \fIarg\fR" 4 -.IX Item "-Xpreprocessor arg" -Pass \fIarg\fR to the preprocessor. -.IP "\fB\-o\fR \fIfile\fR" 4 -.IX Item "-o file" -Write output to \fIfile\fR. -.IP "\fB\-print\-file\-name\fR=\fIfile\fR" 4 -.IX Item "-print-file-name=file" -Print the full library path of \fIfile\fR. -.IP "\fB\-print\-libgcc\-file\-name\fR" 4 -.IX Item "-print-libgcc-file-name" -Print the library path for \*(L"libgcc.a\*(R". -.IP "\fB\-print\-prog\-name\fR=\fIname\fR" 4 -.IX Item "-print-prog-name=name" -Print the full program path of \fIname\fR. -.IP "\fB\-print\-search\-dirs\fR" 4 -.IX Item "-print-search-dirs" +.It Sy -Wa, Ns Em args +Pass the comma separated arguments in +.Em args +to the assembler. +.It Sy -Wl, Ns Em args +Pass the comma separated arguments in +.Em args +to the linker. +.It Sy -Wp, Ns Em args +Pass the comma separated arguments in +.Em args +to the preprocessor. +.It Sy -Xanalyzer Em arg +Pass +.Em arg +to the static analyzer. +.It Sy -Xassembler Em arg +Pass +.Em arg +to the assembler. +.It Sy -Xlinker Em arg +Pass +.Em arg +to the linker. +.It Sy -Xpreprocessor Em arg +Pass +.Em arg +to the preprocessor. +.It Sy -o Em file +Write output to +.Em file . +.It Sy -print-file-name Ns = Ns Em file +Print the full library path of +.Em file . +.It Sy -print-libgcc-file-name +Print the library path for "libgcc.a". +.It Sy -print-prog-name Ns = Ns Em name +Print the full program path of +.Em name . +.It Sy -print-search-dirs Print the paths used for finding libraries and programs. -.IP "\fB\-save\-temps\fR" 4 -.IX Item "-save-temps" +.It Sy -save-temps Save intermediate compilation results. -.IP "\fB\-integrated\-as\fR \fB\-no\-integrated\-as\fR" 4 -.IX Item "-integrated-as -no-integrated-as" +.It Sy -integrated-as Sy -no-integrated-as Used to enable and disable, respectively, the use of the integrated assembler. Whether the integrated assembler is on by default is target dependent. -.IP "\fB\-time\fR" 4 -.IX Item "-time" +.It Sy -time Time individual commands. -.IP "\fB\-ftime\-report\fR" 4 -.IX Item "-ftime-report" +.It Sy -ftime-report Print timing summary of each stage of compilation. -.IP "\fB\-v\fR" 4 -.IX Item "-v" +.It Sy -v Show commands to run and use verbose output. -.SS "Diagnostics Options" -.IX Subsection "Diagnostics Options" -.IP "\fB\-fshow\-column\fR \fB\-fshow\-source\-location\fR \fB\-fcaret\-diagnostics\fR \fB\-fdiagnostics\-fixit\-info\fR \fB\-fdiagnostics\-parseable\-fixits\fR \fB\-fdiagnostics\-print\-source\-range\-info\fR \fB\-fprint\-source\-range\-info\fR \fB\-fdiagnostics\-show\-option\fR \fB\-fmessage\-length\fR" 4 -.IX Item "-fshow-column -fshow-source-location -fcaret-diagnostics -fdiagnostics-fixit-info -fdiagnostics-parseable-fixits -fdiagnostics-print-source-range-info -fprint-source-range-info -fdiagnostics-show-option -fmessage-length" +.El +.Ss Diagnostics Options +.Bl -tag -width Ds +.It Sy -fshow-column Sy -fshow-source-location Sy -fcaret-diagnostics Sy -fdiagnostics-fixit-info Sy -fdiagnostics-parseable-fixits Sy -fdiagnostics-print-source-range-info Sy -fprint-source-range-info Sy -fdiagnostics-show-option Sy -fmessage-length These options control how Clang prints out information about diagnostics (errors and warnings). Please see the Clang User's Manual for more information. -.SS "Preprocessor Options" -.IX Subsection "Preprocessor Options" -.IP "\fB\-D\fR\fImacroname=value\fR" 4 -.IX Item "-Dmacroname=value" +.El +.Ss Preprocessor Options +.Bl -tag -width Ds +.It Sy -D Ns Em macroname=value Adds an implicit #define into the predefines buffer which is read before the source file is preprocessed. -.IP "\fB\-U\fR\fImacroname\fR" 4 -.IX Item "-Umacroname" +.It Sy -U Ns Em macroname Adds an implicit #undef into the predefines buffer which is read before the source file is preprocessed. -.IP "\fB\-include\fR \fIfilename\fR" 4 -.IX Item "-include filename" +.It Sy -include Em filename Adds an implicit #include into the predefines buffer which is read before the source file is preprocessed. -.IP "\fB\-I\fR\fIdirectory\fR" 4 -.IX Item "-Idirectory" +.It Sy -I Ns Em directory Add the specified directory to the search path for include files. -.IP "\fB\-F\fR\fIdirectory\fR" 4 -.IX Item "-Fdirectory" +.It Sy -F Ns Em directory Add the specified directory to the search path for framework include files. -.IP "\fB\-nostdinc\fR" 4 -.IX Item "-nostdinc" +.It Sy -nostdinc Do not search the standard system directories or compiler builtin directories for include files. -.IP "\fB\-nostdlibinc\fR" 4 -.IX Item "-nostdlibinc" +.It Sy -nostdlibinc Do not search the standard system directories for include files, but do search compiler builtin include directories. -.IP "\fB\-nobuiltininc\fR" 4 -.IX Item "-nobuiltininc" +.It Sy -nobuiltininc Do not search clang's builtin directory for include files. -.SH "ENVIRONMENT" -.IX Header "ENVIRONMENT" -.IP "\fB\s-1TMPDIR\s0\fR, \fB\s-1TEMP\s0\fR, \fB\s-1TMP\s0\fR" 4 -.IX Item "TMPDIR, TEMP, TMP" +.El +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Sy TMPDIR Ns , Sy TEMP Ns , Sy TMP These environment variables are checked, in order, for the location to write temporary files used during the compilation process. -.IP "\fB\s-1CPATH\s0\fR" 4 -.IX Item "CPATH" +.It Sy CPATH If this environment variable is present, it is treated as a delimited list of paths to be added to the default system include path list. The -delimiter is the platform dependent delimiter, as used in the \fI\s-1PATH\s0\fR +delimiter is the platform dependent delimitor, as used in the +.Em PATH environment variable. -.Sp +.Pp Empty components in the environment variable are ignored. -.IP "\fBC_INCLUDE_PATH\fR, \fB\s-1OBJC_INCLUDE_PATH\s0\fR, \fB\s-1CPLUS_INCLUDE_PATH\s0\fR, \fB\s-1OBJCPLUS_INCLUDE_PATH\s0\fR" 4 -.IX Item "C_INCLUDE_PATH, OBJC_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJCPLUS_INCLUDE_PATH" -These environment variables specify additional paths, as for \s-1CPATH,\s0 +.It Sy C_INCLUDE_PATH Ns , Sy OBJC_INCLUDE_PATH Ns , Sy CPLUS_INCLUDE_PATH Ns , Sy OBJCPLUS_INCLUDE_PATH +These environment variables specify additional paths, as for CPATH, which are only used when processing the appropriate language. -.IP "\fB\s-1MACOSX_DEPLOYMENT_TARGET\s0\fR" 4 -.IX Item "MACOSX_DEPLOYMENT_TARGET" -If \-mmacosx\-version\-min is unspecified, the default deployment target +.It Sy MACOSX_DEPLOYMENT_TARGET +If -mmacosx-version-min is unspecified, the default deployment target is read from this environment variable. This option only affects darwin targets. -.SH "BUGS" -.IX Header "BUGS" -To report bugs, please visit . Most bug reports should -include preprocessed source files (use the \fB\-E\fR option) and the full output of +.El +.Sh BUGS +To report bugs, please visit +.Lk http://llvm.org/bugs/ . +Most bug reports should +include preprocessed source files (use the +.Sy -E +option) and the full output of the compiler, along with information to reproduce. -.SH "SEE ALSO" -.IX Header "SEE ALSO" -.Vb 1 -\& as(1), ld(1) -.Ve -.SH "AUTHOR" -.IX Header "AUTHOR" -Maintained by the Clang / \s-1LLVM\s0 Team (). +.Sh SEE ALSO +.Bd -literal + as(1), ld(1) +.Ed +.Sh AUTHOR +Maintained by the Clang / LLVM Team +.Pf ( Lk http://clang.llvm.org Ns ). From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 22:28:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63154322; Sun, 23 Nov 2014 22:28:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34D8EF28; Sun, 23 Nov 2014 22:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANMSm9h021857; Sun, 23 Nov 2014 22:28:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANMSlKd021852; Sun, 23 Nov 2014 22:28:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232228.sANMSlKd021852@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 22:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274930 - in head: gnu/usr.bin/groff/tmac tools/build/mk usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 22:28:48 -0000 Author: bapt Date: Sun Nov 23 22:28:46 2014 New Revision: 274930 URL: https://svnweb.freebsd.org/changeset/base/274930 Log: Install mdoc(7) and man(7) from mdoc instead of the one from groff Modified: head/gnu/usr.bin/groff/tmac/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/mandoc/Makefile Modified: head/gnu/usr.bin/groff/tmac/Makefile ============================================================================== --- head/gnu/usr.bin/groff/tmac/Makefile Sun Nov 23 22:16:43 2014 (r274929) +++ head/gnu/usr.bin/groff/tmac/Makefile Sun Nov 23 22:28:46 2014 (r274930) @@ -11,9 +11,8 @@ MDOCDIR?= ${TMACDIR}/mdoc MAN= groff_ms.7 groff_man.7 groff_me.7 groff_mdoc.7 MAN+= groff_trace.7 groff_www.7 MLINKS= groff_ms.7 ms.7 -MLINKS+= groff_man.7 man.7 MLINKS+= groff_me.7 me.7 -MLINKS+= groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7 +MLINKS+= groff_mdoc.7 mdoc.samples.7 CLEANFILES= ${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 23 22:16:43 2014 (r274929) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 23 22:28:46 2014 (r274930) @@ -1737,8 +1737,6 @@ OLD_FILES+=usr/share/man/man7/groff_mmse OLD_FILES+=usr/share/man/man7/groff_ms.7.gz OLD_FILES+=usr/share/man/man7/groff_trace.7.gz OLD_FILES+=usr/share/man/man7/groff_www.7.gz -OLD_FILES+=usr/share/man/man7/man.7.gz -OLD_FILES+=usr/share/man/man7/mdoc.7.gz OLD_FILES+=usr/share/man/man7/mdoc.samples.7.gz OLD_FILES+=usr/share/man/man7/me.7.gz OLD_FILES+=usr/share/man/man7/mm.7.gz Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Sun Nov 23 22:16:43 2014 (r274929) +++ head/usr.bin/mandoc/Makefile Sun Nov 23 22:28:46 2014 (r274930) @@ -8,7 +8,7 @@ PROG= mandoc FILES= example.style.css style.css FILESDIR= ${SHAREDIR}/mdocml LINKS= mdocml -MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 # man.7 mdoc.7 roff.7 +MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 # roff.7 MLINKS= mandoc.1 mdocml.1 HTML_SRCS= eqn_html.c \ From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 22:40:50 2014 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40CB298C; Sun, 23 Nov 2014 22:40:50 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B0D6069; Sun, 23 Nov 2014 22:40:48 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA17452; Mon, 24 Nov 2014 00:42:32 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Xsfpf-000BSK-As; Mon, 24 Nov 2014 00:40:39 +0200 Message-ID: <5472622E.7020808@FreeBSD.org> Date: Mon, 24 Nov 2014 00:39:42 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Baptiste Daroussin , =?windows-1252?Q?Dag-Erling_?= =?windows-1252?Q?Sm=F8rgrav?= Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <86oarxa9oa.fsf@nine.des.no> <20141123213527.GH68776@ivaldir.etoilebsd.net> In-Reply-To: <20141123213527.GH68776@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 22:40:50 -0000 On 23/11/2014 23:35, Baptiste Daroussin wrote: > On Sun, Nov 23, 2014 at 10:28:37PM +0100, Dag-Erling Smørgrav wrote: >> Baptiste Daroussin writes: >>> [...] In general every mail on any manpage Mt should be used. >> >> That's trivial to script, so how about we just make a pass over all >> non-contrib man pages? >> > That was already done, but some new have been added or missed since it seems :) Maybe some docs / examples on doing man pages need to be updated? E.g. my copy of mdoc(7) manual has this: .Mt To be written. Thank you very much. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 22:44:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A229EAE7; Sun, 23 Nov 2014 22:44:33 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29F12117; Sun, 23 Nov 2014 22:44:33 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id r20so7307281wiv.2 for ; Sun, 23 Nov 2014 14:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=cBlaBhQ7DgeTcNGyuMETww9eBlqVNGqi2+/Xk8eD7p8=; b=kE28/vtZKJseKRDB4+xzb75bc1NGSBFJqJkKU6U0jBM2J5v3ktCG4mZVfDerAuL/Cv m62LuXbc7Np2s3YhAiKaHwMVCxb73Xhd8AFhkbzN5Atcs8+Ru1j1MK6MYJt4wiJIkn0h TjqybvHhsuh1qFvInNA/+cdJbxgXZTRKwFzDSdb3oZ58q8zgrGb2yaG+4wdqqCuDLhot DJjJKnfMCLWdO245M0DC18Y8oPY1ymEIdbG7dRU/lIveRwD6hL3KuQ33x2ccDBUWC6FM esHdiMk3w1wXyBIMYLLzgT5hk4fdlQoWcFdc8/TGw53Cg38Z53omEqOfzZ2bg17J0YxO 0aAA== X-Received: by 10.180.107.193 with SMTP id he1mr15835219wib.27.1416782671649; Sun, 23 Nov 2014 14:44:31 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id r10sm9446352wiy.19.2014.11.23.14.44.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Nov 2014 14:44:30 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 23 Nov 2014 23:44:28 +0100 From: Baptiste Daroussin To: Andriy Gapon Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Message-ID: <20141123224428.GJ68776@ivaldir.etoilebsd.net> References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <86oarxa9oa.fsf@nine.des.no> <20141123213527.GH68776@ivaldir.etoilebsd.net> <5472622E.7020808@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+9faIjRurCDpBc7U" Content-Disposition: inline In-Reply-To: <5472622E.7020808@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@FreeBSD.org, Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 22:44:33 -0000 --+9faIjRurCDpBc7U Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 24, 2014 at 12:39:42AM +0200, Andriy Gapon wrote: > On 23/11/2014 23:35, Baptiste Daroussin wrote: > > On Sun, Nov 23, 2014 at 10:28:37PM +0100, Dag-Erling Sm=F8rgrav wrote: > >> Baptiste Daroussin writes: > >>> [...] In general every mail on any manpage Mt should be used. > >> > >> That's trivial to script, so how about we just make a pass over all > >> non-contrib man pages? > >> > > That was already done, but some new have been added or missed since it = seems :) >=20 > Maybe some docs / examples on doing man pages need to be updated? > E.g. my copy of mdoc(7) manual has this: > .Mt To be written. I have changed the mdoc(7) man page to the one from mandoc(1) which document that properly: Mt Format a ``mailto:'' hyperlink. Its syntax is as follows: .Mt address Examples: .Mt discuss@manpages.bsd.lv .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv Best regards, Bapt --+9faIjRurCDpBc7U Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRyY0wACgkQ8kTtMUmk6ExtTwCeLiEfWQ+1HYpFtjMJqE/5SoM/ lD0AnR4J1/mj6l5SQVAk68VYKXKvYGnq =XHbE -----END PGP SIGNATURE----- --+9faIjRurCDpBc7U-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 23:07:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 849CEFF4; Sun, 23 Nov 2014 23:07:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D7531E; Sun, 23 Nov 2014 23:07:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANN7MZd041303; Sun, 23 Nov 2014 23:07:22 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANN7Mu4041301; Sun, 23 Nov 2014 23:07:22 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201411232307.sANN7Mu4041301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 23 Nov 2014 23:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274931 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 23:07:22 -0000 Author: grehan Date: Sun Nov 23 23:07:21 2014 New Revision: 274931 URL: https://svnweb.freebsd.org/changeset/base/274931 Log: Change the lower bound for guest vmspace allocation to 0 instead of using the VM_MIN_ADDRESS constant. HardenedBSD redefines VM_MIN_ADDRESS to be 64K, which results in bhyve VM startup failing. Guest memory is always assumed to start at 0 so use the absolute value instead. Reported by: Shawn Webb, lattera at gmail com Reviewed by: neel, grehan Obtained from: Oliver Pinter via HardenedBSD https://github.com/HardenedBSD/hardenedBSD/commit/23bd719ce1e3a8cc42fc8317b1c7c6d9e74dcba0 MFC after: 1 week Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sun Nov 23 22:28:46 2014 (r274930) +++ head/sys/amd64/vmm/vmm.c Sun Nov 23 23:07:21 2014 (r274931) @@ -389,7 +389,7 @@ vm_create(const char *name, struct vm ** if (name == NULL || strlen(name) >= VM_MAX_NAMELEN) return (EINVAL); - vmspace = VMSPACE_ALLOC(VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS); + vmspace = VMSPACE_ALLOC(0, VM_MAXUSER_ADDRESS); if (vmspace == NULL) return (ENOMEM); From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 23:17:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A59FE2C1; Sun, 23 Nov 2014 23:17:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 924E6405; Sun, 23 Nov 2014 23:17:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANNHJ9g046193; Sun, 23 Nov 2014 23:17:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANNHJ2o046191; Sun, 23 Nov 2014 23:17:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232317.sANNHJ2o046191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 23:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274932 - head/usr.bin/lex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 23:17:19 -0000 Author: bapt Date: Sun Nov 23 23:17:18 2014 New Revision: 274932 URL: https://svnweb.freebsd.org/changeset/base/274932 Log: Workaround help2man defficiency that prevents mandoc from rendering Modified: head/usr.bin/lex/lex.1 Modified: head/usr.bin/lex/lex.1 ============================================================================== --- head/usr.bin/lex/lex.1 Sun Nov 23 23:07:21 2014 (r274931) +++ head/usr.bin/lex/lex.1 Sun Nov 23 23:17:18 2014 (r274932) @@ -2001,7 +2001,7 @@ can be used to control whether the curre context for the next token match is done as though at the beginning of a line. A non-zero macro argument makes rules anchored with -'^' active, while a zero argument makes '^' rules inactive. + '^' active, while a zero argument makes '^' rules inactive. .PP The macro .B YY_AT_BOL() @@ -2356,8 +2356,7 @@ automatically anyway. .TP .B \-F, \-\-fast specifies that the -.ul -fast +.I fast scanner table representation should be used (and stdio bypassed). This representation is about as fast as the full table representation From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 23:35:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0212C646; Sun, 23 Nov 2014 23:35:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2B067C9; Sun, 23 Nov 2014 23:35:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANNZGSN055155; Sun, 23 Nov 2014 23:35:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANNZGJl055154; Sun, 23 Nov 2014 23:35:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232335.sANNZGJl055154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 23:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274933 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 23:35:17 -0000 Author: bapt Date: Sun Nov 23 23:35:16 2014 New Revision: 274933 URL: https://svnweb.freebsd.org/changeset/base/274933 Log: Ta is only allowed with Bl -column not in Bl -item Modified: head/lib/libc/sys/mount.2 Modified: head/lib/libc/sys/mount.2 ============================================================================== --- head/lib/libc/sys/mount.2 Sun Nov 23 23:17:18 2014 (r274932) +++ head/lib/libc/sys/mount.2 Sun Nov 23 23:35:16 2014 (r274933) @@ -86,7 +86,7 @@ containing .Fa niov elements. The following options are required by all file systems: -.Bl -item -offset indent -compact +.Bl -column fstype -offset indent .It .Li fstype Ta file system type name (e.g., Dq Li procfs ) .It From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 23:55:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E413592F; Sun, 23 Nov 2014 23:55:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE98F94D; Sun, 23 Nov 2014 23:55:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANNt49c064258; Sun, 23 Nov 2014 23:55:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANNt4I4064257; Sun, 23 Nov 2014 23:55:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232355.sANNt4I4064257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 23:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274934 - head/gnu/usr.bin/binutils/strip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 23:55:05 -0000 Author: bapt Date: Sun Nov 23 23:55:04 2014 New Revision: 274934 URL: https://svnweb.freebsd.org/changeset/base/274934 Log: Fix rendering with mandoc Modified: head/gnu/usr.bin/binutils/strip/strip.1 Modified: head/gnu/usr.bin/binutils/strip/strip.1 ============================================================================== --- head/gnu/usr.bin/binutils/strip/strip.1 Sun Nov 23 23:35:16 2014 (r274933) +++ head/gnu/usr.bin/binutils/strip/strip.1 Sun Nov 23 23:55:04 2014 (r274934) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 23:56:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB2D8A69; Sun, 23 Nov 2014 23:56:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7AAB951; Sun, 23 Nov 2014 23:56:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANNu2WU064407; Sun, 23 Nov 2014 23:56:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANNu2Ho064406; Sun, 23 Nov 2014 23:56:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411232356.sANNu2Ho064406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 23 Nov 2014 23:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274935 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 23:56:02 -0000 Author: bapt Date: Sun Nov 23 23:56:01 2014 New Revision: 274935 URL: https://svnweb.freebsd.org/changeset/base/274935 Log: Fix rendering with mandoc Modified: head/gnu/usr.bin/binutils/ld/ld.1 Modified: head/gnu/usr.bin/binutils/ld/ld.1 ============================================================================== --- head/gnu/usr.bin/binutils/ld/ld.1 Sun Nov 23 23:55:04 2014 (r274934) +++ head/gnu/usr.bin/binutils/ld/ld.1 Sun Nov 23 23:56:01 2014 (r274935) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 23:58:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66457BD4; Sun, 23 Nov 2014 23:58:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52CE1961; Sun, 23 Nov 2014 23:58:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sANNwm7c064746; Sun, 23 Nov 2014 23:58:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sANNwmuW064745; Sun, 23 Nov 2014 23:58:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411232358.sANNwmuW064745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 23 Nov 2014 23:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274936 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 23:58:48 -0000 Author: ian Date: Sun Nov 23 23:58:47 2014 New Revision: 274936 URL: https://svnweb.freebsd.org/changeset/base/274936 Log: Fix the negation (!) operator so that it binds only to the word that immediately follows it, which means 'not' has to be reset every time an option word or device name is processed. Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Sun Nov 23 23:56:01 2014 (r274935) +++ head/usr.sbin/config/mkmakefile.c Sun Nov 23 23:58:47 2014 (r274936) @@ -386,13 +386,9 @@ next: if (nreqs == 0) errout("%s: syntax error describing %s\n", fname, this); - if (not) - compile += !match; - else - compile += match; + compile += match; match = 1; nreqs = 0; - not = 0; continue; } if (eq(wd, "no-obj")) { @@ -474,19 +470,23 @@ next: this, wd); STAILQ_FOREACH(dp, &dtab, d_next) if (eq(dp->d_name, wd)) { - dp->d_done |= DEVDONE; + if (not) + match = 0; + else + dp->d_done |= DEVDONE; goto nextparam; } SLIST_FOREACH(op, &opt, op_next) - if (op->op_value == 0 && opteq(op->op_name, wd)) + if (op->op_value == 0 && opteq(op->op_name, wd)) { + if (not) + match = 0; goto nextparam; - match = 0; + } + match &= not; nextparam:; + not = 0; } - if (not) - compile += !match; - else - compile += match; + compile += match; if (compile && tp == NULL) { if (std == 0 && nreqs == 0) errout("%s: what is %s optional on?\n", From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 00:02:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73329D4C; Mon, 24 Nov 2014 00:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4752EA0A; Mon, 24 Nov 2014 00:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO02G5U069219; Mon, 24 Nov 2014 00:02:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO02FO1069214; Mon, 24 Nov 2014 00:02:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411240002.sAO02FO1069214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 24 Nov 2014 00:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274937 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 00:02:16 -0000 Author: ian Date: Mon Nov 24 00:02:15 2014 New Revision: 274937 URL: https://svnweb.freebsd.org/changeset/base/274937 Log: Add ARMV6 as an arm option. This will cause obscure magic in config(8) to automatically set the armv6 option when MACHINE_ARCH is armv6. That allows replacing ever-growing lists of cpu names as options to compile a given file with the using either "optional armv6" or "optional !armv6". Modified: head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun Nov 23 23:58:47 2014 (r274936) +++ head/sys/conf/files.arm Mon Nov 24 00:02:15 2014 (r274937) @@ -5,8 +5,8 @@ arm/arm/bcopyinout.S standard arm/arm/blockio.S standard arm/arm/bootconfig.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/busdma_machdep.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0 -arm/arm/busdma_machdep-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b | cpu_krait +arm/arm/busdma_machdep.c optional !armv6 +arm/arm/busdma_machdep-v6.c optional armv6 arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard @@ -39,8 +39,8 @@ arm/arm/pl190.c optional pl190 arm/arm/pl310.c optional pl310 arm/arm/platform.c optional platform arm/arm/platform_if.m optional platform -arm/arm/pmap.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0 -arm/arm/pmap-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b | cpu_krait +arm/arm/pmap.c optional !armv6 +arm/arm/pmap-v6.c optional armv6 arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sun Nov 23 23:58:47 2014 (r274936) +++ head/sys/conf/options.arm Mon Nov 24 00:02:15 2014 (r274937) @@ -1,5 +1,6 @@ #$FreeBSD$ ARM9_CACHE_WRITE_THROUGH opt_global.h +ARMV6 opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h ARM_KERN_DIRECTMAP opt_vm.h ARM_L2_PIPT opt_global.h From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 00:34:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C50E251; Mon, 24 Nov 2014 00:34:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 391BFC8B; Mon, 24 Nov 2014 00:34:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO0YoHo084167; Mon, 24 Nov 2014 00:34:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO0YoFR084166; Mon, 24 Nov 2014 00:34:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411240034.sAO0YoFR084166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 00:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274938 - head/gnu/usr.bin/binutils/as X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 00:34:50 -0000 Author: bapt Date: Mon Nov 24 00:34:49 2014 New Revision: 274938 URL: https://svnweb.freebsd.org/changeset/base/274938 Log: Fix rendering with mandoc Modified: head/gnu/usr.bin/binutils/as/as.1 Modified: head/gnu/usr.bin/binutils/as/as.1 ============================================================================== --- head/gnu/usr.bin/binutils/as/as.1 Mon Nov 24 00:02:15 2014 (r274937) +++ head/gnu/usr.bin/binutils/as/as.1 Mon Nov 24 00:34:49 2014 (r274938) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 00:59:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61DCC8AE; Mon, 24 Nov 2014 00:59:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EDECE51; Mon, 24 Nov 2014 00:59:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO0xqRm094317; Mon, 24 Nov 2014 00:59:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO0xqiQ094316; Mon, 24 Nov 2014 00:59:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411240059.sAO0xqiQ094316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Nov 2014 00:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274940 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 00:59:52 -0000 Author: mav Date: Mon Nov 24 00:59:51 2014 New Revision: 274940 URL: https://svnweb.freebsd.org/changeset/base/274940 Log: Read cs_outstanding_ctl_pdus before incrementing it for NEXUS RESET task. This removes extra log noise on idle connection termination. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Nov 24 00:47:04 2014 (r274939) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Nov 24 00:59:51 2014 (r274940) @@ -1076,6 +1076,7 @@ cfiscsi_session_terminate_tasks(struct c io->io_hdr.nexus.targ_lun = 0; io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; + wait = cs->cs_outstanding_ctl_pdus; refcount_acquire(&cs->cs_outstanding_ctl_pdus); error = ctl_queue(io); if (error != CTL_RETVAL_COMPLETE) { @@ -1103,7 +1104,6 @@ cfiscsi_session_terminate_tasks(struct c /* * Wait for CTL to terminate all the tasks. */ - wait = cs->cs_outstanding_ctl_pdus; if (wait > 0) CFISCSI_SESSION_WARN(cs, "waiting for CTL to terminate %d tasks", wait); From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 01:13:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BEBCBEB; Mon, 24 Nov 2014 01:13:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08D19FDC; Mon, 24 Nov 2014 01:13:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO1DwQQ003219; Mon, 24 Nov 2014 01:13:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO1Dw8v003218; Mon, 24 Nov 2014 01:13:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411240113.sAO1Dw8v003218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 24 Nov 2014 01:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274941 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 01:13:59 -0000 Author: ian Date: Mon Nov 24 01:13:58 2014 New Revision: 274941 URL: https://svnweb.freebsd.org/changeset/base/274941 Log: The arm PJ4B cpu is armv7 architecture, not v6. If this feels like deja vu... the last time this was fixed in this file only ARM_MMU_V6 was fixed, this time it's ARM_ARCH_V6 (and this time I searched for other occurrances of pj4b in here). Modified: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Mon Nov 24 00:59:51 2014 (r274940) +++ head/sys/arm/include/cpuconf.h Mon Nov 24 01:13:58 2014 (r274941) @@ -85,14 +85,14 @@ #endif #if !defined(ARM_ARCH_6) -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) #define ARM_ARCH_6 1 #else #define ARM_ARCH_6 0 #endif #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 05:34:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08A34673; Mon, 24 Nov 2014 05:34:58 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id A909FB82; Mon, 24 Nov 2014 05:34:56 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 8C62078071C; Mon, 24 Nov 2014 16:34:46 +1100 (AEDT) Date: Mon, 24 Nov 2014 16:34:45 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall Subject: Re: svn commit: r274489 - in head/sys/amd64: amd64 include In-Reply-To: <426D8696-801A-4C48-A2FE-74575B4B79E7@FreeBSD.org> Message-ID: <20141124151802.L1037@besplex.bde.org> References: <201411132211.sADMBjP3009246@svn.freebsd.org> <35E5EAD8-99C1-43C0-8D01-B3B5B86ECA25@me.com> <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> <426D8696-801A-4C48-A2FE-74575B4B79E7@FreeBSD.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=c3-DdYJoA5YA:10 a=CjxXgO3LAAAA:8 a=WS7UwmEUktPVZ0oHHX4A:9 a=Q_jXAg0y1YKh4OJq:21 a=r9cDJ10-M3f03dNX:21 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, Scott Long , Rui Paulo , svn-src-all@freebsd.org, Scott Long , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 05:34:58 -0000 On Sun, 23 Nov 2014, David Chisnall wrote: > On 21 Nov 2014, at 23:26, Scott Long wrote: > >> That=92s a good question to look further into. I didn=92t see any measu= rable differences with this change. I think that the cost of the function = call itself masks the cost of a few extra instructions, but I didn=92t test= with switching it on/off for the entire kernel >=20 > [ Note: The following is not specific to the kernel ] > > The overhead for preserving / omitting the frame pointer is decidedly non= linear. On a modern superscalar processor, it will usually be effectively = zero, right up until the point that it pushes something out of the instruct= ion cache on a hot path, at which point it jumps to 20-50%, depending on th= e workload. It seems to work much the same as padding with nops for that. I get the following times for: X int x; X=20 X asm("=09=09=09\n\ X .p2align 6=09=09\n\ X test:=09=09=09\n\ X =09# pushl %ebp=09\n\ X =09# movl %esp,%ebp=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09nop=09=09\n\ X =09# popl %ebp=09\n\ X =09ret=09=09\n\ X "); X=20 X main() X { X =09int i; X=20 X =09for (i =3D 0; i < 201000000; i++) X =09=09test(); X } on an old A64 at 2.01GHz in 32-bit mode: - above code (13 bytes of instruction prefetch needed in ): 7 cycle= s - change 2 nops to pushl %ebp; popl% ebp (same ifetch size): 7 cycle= s - change 4 nops to pushl/movl/popl (same ifetch size): 7 cycle= s - change 4 nops to 2 * pushl/popl (same ifetch size): 8 cycle= s - add 1-2 nops (14-15 bytes...): 8 cycle= s - add 3 nops (16 bytes...): 10 cycle= s So the cost is indeed 20-50% (actually 3/7 =3D 43%) in some cases, but only in weird cases. You just have to pack about 3 useful instructions (3 ~=3D numver of independent pipelines) together with the frame pointer instructio= ns in the first 13 bytes of every function, or maybe move the frame pointer instructions later (only traps including NMIs would notice if they are not done as soon as possible, provided they are done before function calls). OTOH, not using a frame pointer costs 1 byte per stack accesses. This might bust the icache anywhere in the function, but probably doesn't. Busting is more likely at the beginning of the function where it does a bunch of loads of args or a bunch of initializations. At least gcc like to generate code like: =09movl=09$0,N(%esp)=09# 7 bytes =09movl=09$0,N+4(%esp) =09... for initializations, even when the initializations are not at the start of the function in the source code. 7 bytes is a large x86 instruction, and just 3 of them may bust the ifetch. > The performance difference was more pronounced on i386, where having an e= xtra GPR for the register allocator to use could make a 10-20% performance = difference on some fairly common code (the two big performance wins for x86= -64 over IA32 were the increase in number of GPRs and an FPU ISA that wasn'= t batshit insane). No, these only make small differences on modern superscalar processors. More than explicit 8 GPR or FPU registers are very rarely needed. The FPU ISA is not bad (it is just a enhanced stack ISA), any the ISA makes little difference anyway. Any inefficiencies in the ISA are hidden in pipelines provided the ifetcher can keep up and register renaming doesn't break down. Managing the FPU stack is painful in asm but easy for compiler= s. > For ISAs with more GPRs, that's less of an issue, although after inlining= being able to use %rbp as a GPR can sometimes make a noticeable difference= in performance. In particular, as %rpb is callee-save, it's very useful t= o be able to use it in non-leaf functions. The limited number of registers works a bit like the limited ifetch at the= =20 beginning of a function. Very occasionally, having 1 extra register or bei= ng 1 byte shorter makes a signficant difference difference. ifetch seems to be easier to optimize than a limited number of registers, s= o my results above probably only apply to the CPU tested. Even an A64 can execute 2 instances of a function concurrently even when the function is called sequentially. It is a special case of branch prediction to fetch from the branch target in advance. The amount of prefetch may be limited but it it is always possible to cache the results of prefetching better. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 07:23:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A2C5741; Mon, 24 Nov 2014 07:23:19 +0000 (UTC) Received: from mtaout.vnode.se (mtaout.vnode.se [192.121.62.130]) by mx1.freebsd.org (Postfix) with ESMTP id 09B3284A; Mon, 24 Nov 2014 07:23:19 +0000 (UTC) Received: from ymer.vnode.se (h71n10-th-c-d4.ias.bredband.telia.com [81.234.63.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mtaout.vnode.se (Postfix) with ESMTPSA id 09496B0591; Mon, 24 Nov 2014 08:17:31 +0100 (CET) Date: Mon, 24 Nov 2014 08:23:17 +0100 From: Joel Dahl To: Baptiste Daroussin Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Message-ID: <20141124072316.GA27782@ymer.vnode.se> Mail-Followup-To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141123210412.GG68776@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 07:23:19 -0000 On Sun, Nov 23, 2014 at 10:04:12PM +0100, Baptiste Daroussin wrote: > On Sun, Nov 23, 2014 at 09:00:00PM +0000, Joel Dahl wrote: > > Author: joel (doc committer) > > Date: Sun Nov 23 21:00:00 2014 > > New Revision: 274925 > > URL: https://svnweb.freebsd.org/changeset/base/274925 > > > > Log: > > Misc mdoc fixes: > > > > - Remove superfluous paragraph macros. > > - Remove/fix empty or incorrect macros. > > - Sort sections into conventional order. > > - Terminate quoted strings properly. > > - Remove EOL whitespace. > > > > Modified: > > head/lib/libc/sys/poll.2 > > head/lib/libdpv/dpv.3 > > head/sbin/ipfw/ipfw.8 > > head/share/man/man4/gre.4 > > head/share/man/man4/man4.arm/cgem.4 > > head/share/man/man4/me.4 > > head/share/man/man4/netmap.4 > > head/share/man/man9/get_cyclecount.9 > > head/share/man/man9/malloc.9 > > head/share/man/man9/sleepqueue.9 > > head/sys/boot/common/zfsloader.8 > > head/sys/boot/i386/gptzfsboot/gptzfsboot.8 > > head/usr.bin/dpv/dpv.1 > > > > [...] > > > +.Sh AUTHORS > > +This manual page was written by > > +.An Andriy Gapon Aq avg@FreeBSD.org . > ^ There should be a Mt here to properly render in html > > I just picked one in the middle of this commit. In general every mail on any > manpage Mt should be used. Sure. Feel free to go over our manpages and fix them. It's a minor issue. And while we're on the subject, there's a bit of background to this commit. Back in 2012 I started fixing mandoc lint errors/warnings in our manpage collection (excluding stuff from contrib/ and gnu/ etc.). I think I got them down from around ~4000 issues to almost zero. Quite a few manpages didn't even work with mandoc at the time, due to how many syntactical mdoc errors they had. The situation is still good, but I re-ran my scripts yesterday and found a slew of new warnings. I fixed a few obvious ones, but if someone with more time on his hands wants to help, please go ahead. A good starting point would probably the netmap.4 or ctl.conf.5 manpages, they seem to generate quite a few warnings. I'd also be grateful if everyone ran mandoc -Tlint on their manpages before committing. :-) -- Joel From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 07:57:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF6FADC9; Mon, 24 Nov 2014 07:57:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EAA2B16; Mon, 24 Nov 2014 07:57:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO7vLR2091686; Mon, 24 Nov 2014 07:57:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO7vL2p091685; Mon, 24 Nov 2014 07:57:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411240757.sAO7vL2p091685@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 24 Nov 2014 07:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274948 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 07:57:21 -0000 Author: glebius Date: Mon Nov 24 07:57:20 2014 New Revision: 274948 URL: https://svnweb.freebsd.org/changeset/base/274948 Log: We already have "int i" in this scope. Submitted by: alc Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Mon Nov 24 07:57:18 2014 (r274947) +++ head/sys/vm/vnode_pager.c Mon Nov 24 07:57:20 2014 (r274948) @@ -994,7 +994,7 @@ vnode_pager_generic_getpages(struct vnod bstrategy(bp); bwait(bp, PVM, "vnread"); error = vnode_pager_generic_getpages_done(bp); - for (int i = 0; i < bp->b_npages; i++) + for (i = 0; i < bp->b_npages; i++) bp->b_pages[i] = NULL; bp->b_vp = NULL; pbrelbo(bp); From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 08:13:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41BA6CDA; Mon, 24 Nov 2014 08:13:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21E28DFE; Mon, 24 Nov 2014 08:13:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO8DNAT001127; Mon, 24 Nov 2014 08:13:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO8DMfP001120; Mon, 24 Nov 2014 08:13:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411240813.sAO8DMfP001120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 08:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274953 - in head/gnu/usr.bin/binutils: addr2line nm objcopy objdump readelf size strings X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 08:13:24 -0000 Author: bapt Date: Mon Nov 24 08:13:21 2014 New Revision: 274953 URL: https://svnweb.freebsd.org/changeset/base/274953 Log: Fix rendering of manpages with mandoc(1) Modified: head/gnu/usr.bin/binutils/addr2line/addr2line.1 head/gnu/usr.bin/binutils/nm/nm.1 head/gnu/usr.bin/binutils/objcopy/objcopy.1 head/gnu/usr.bin/binutils/objdump/objdump.1 head/gnu/usr.bin/binutils/readelf/readelf.1 head/gnu/usr.bin/binutils/size/size.1 head/gnu/usr.bin/binutils/strings/strings.1 Modified: head/gnu/usr.bin/binutils/addr2line/addr2line.1 ============================================================================== --- head/gnu/usr.bin/binutils/addr2line/addr2line.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/addr2line/addr2line.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ Modified: head/gnu/usr.bin/binutils/nm/nm.1 ============================================================================== --- head/gnu/usr.bin/binutils/nm/nm.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/nm/nm.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ Modified: head/gnu/usr.bin/binutils/objcopy/objcopy.1 ============================================================================== --- head/gnu/usr.bin/binutils/objcopy/objcopy.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/objcopy/objcopy.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ Modified: head/gnu/usr.bin/binutils/objdump/objdump.1 ============================================================================== --- head/gnu/usr.bin/binutils/objdump/objdump.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/objdump/objdump.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ Modified: head/gnu/usr.bin/binutils/readelf/readelf.1 ============================================================================== --- head/gnu/usr.bin/binutils/readelf/readelf.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/readelf/readelf.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ Modified: head/gnu/usr.bin/binutils/size/size.1 ============================================================================== --- head/gnu/usr.bin/binutils/size/size.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/size/size.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ Modified: head/gnu/usr.bin/binutils/strings/strings.1 ============================================================================== --- head/gnu/usr.bin/binutils/strings/strings.1 Mon Nov 24 08:09:50 2014 (r274952) +++ head/gnu/usr.bin/binutils/strings/strings.1 Mon Nov 24 08:13:21 2014 (r274953) @@ -33,7 +33,7 @@ . ds R" "" . ds C` "" . ds C' "" -'br\} +\} .el\{\ . ds -- \|\(em\| . ds PI \(*p @@ -107,7 +107,6 @@ .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 08:13:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 486FDE20; Mon, 24 Nov 2014 08:13:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 347C6E02; Mon, 24 Nov 2014 08:13:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO8DjaE001282; Mon, 24 Nov 2014 08:13:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO8DjgL001281; Mon, 24 Nov 2014 08:13:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201411240813.sAO8DjgL001281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Nov 2014 08:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274954 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 08:13:45 -0000 Author: trasz Date: Mon Nov 24 08:13:44 2014 New Revision: 274954 URL: https://svnweb.freebsd.org/changeset/base/274954 Log: Remove the pidfile clause from the ctl.conf example. Why do everyone just copy/paste this line into their configs, it's beyond me. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Mon Nov 24 08:13:21 2014 (r274953) +++ head/usr.sbin/ctld/ctl.conf.5 Mon Nov 24 08:13:44 2014 (r274954) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2014 +.Dd November 24, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -356,8 +356,6 @@ configuration file. .El .Sh EXAMPLES .Bd -literal -pidfile /var/run/ctld.pid - auth-group ag0 { chap-mutual "user" "secret" "mutualuser" "mutualsecret" chap-mutual "user2" "secret2" "mutualuser" "mutualsecret" From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 09:20:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EC1DFC; Mon, 24 Nov 2014 09:20:01 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10AC967B; Mon, 24 Nov 2014 09:20:01 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Xspna-0006B3-9n; Mon, 24 Nov 2014 10:19:52 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "Baptiste Daroussin" , "Joel Dahl" Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <20141124072316.GA27782@ymer.vnode.se> Date: Mon, 24 Nov 2014 10:19:08 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <20141124072316.GA27782@ymer.vnode.se> User-Agent: Opera Mail/12.17 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.2 X-Scan-Signature: 4868b52b90b9144be14ceb212c82ef23 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 09:20:01 -0000 On Mon, 24 Nov 2014 08:23:17 +0100, Joel Dahl wrote: > On Sun, Nov 23, 2014 at 10:04:12PM +0100, Baptiste Daroussin wrote: >> On Sun, Nov 23, 2014 at 09:00:00PM +0000, Joel Dahl wrote: >> > Author: joel (doc committer) >> > Date: Sun Nov 23 21:00:00 2014 >> > New Revision: 274925 >> > URL: https://svnweb.freebsd.org/changeset/base/274925 >> > >> > Log: >> > Misc mdoc fixes: >> > >> > - Remove superfluous paragraph macros. >> > - Remove/fix empty or incorrect macros. >> > - Sort sections into conventional order. >> > - Terminate quoted strings properly. >> > - Remove EOL whitespace. >> > >> > Modified: >> > head/lib/libc/sys/poll.2 >> > head/lib/libdpv/dpv.3 >> > head/sbin/ipfw/ipfw.8 >> > head/share/man/man4/gre.4 >> > head/share/man/man4/man4.arm/cgem.4 >> > head/share/man/man4/me.4 >> > head/share/man/man4/netmap.4 >> > head/share/man/man9/get_cyclecount.9 >> > head/share/man/man9/malloc.9 >> > head/share/man/man9/sleepqueue.9 >> > head/sys/boot/common/zfsloader.8 >> > head/sys/boot/i386/gptzfsboot/gptzfsboot.8 >> > head/usr.bin/dpv/dpv.1 >> > >> >> [...] >> >> > +.Sh AUTHORS >> > +This manual page was written by >> > +.An Andriy Gapon Aq avg@FreeBSD.org . >> ^ There should be a Mt here to properly render >> in html >> >> I just picked one in the middle of this commit. In general every mail >> on any >> manpage Mt should be used. > > Sure. Feel free to go over our manpages and fix them. It's a minor issue. > > And while we're on the subject, there's a bit of background to this > commit. > Back in 2012 I started fixing mandoc lint errors/warnings in our manpage > collection (excluding stuff from contrib/ and gnu/ etc.). I think I got > them > down from around ~4000 issues to almost zero. Quite a few manpages didn't > even work with mandoc at the time, due to how many syntactical mdoc > errors > they had. The situation is still good, but I re-ran my scripts yesterday > and > found a slew of new warnings. I fixed a few obvious ones, but if someone > with > more time on his hands wants to help, please go ahead. A good starting > point > would probably the netmap.4 or ctl.conf.5 manpages, they seem to generate > quite a few warnings. > > I'd also be grateful if everyone ran mandoc -Tlint on their manpages > before > committing. :-) > A commit hook does magic for these kind of things. ;-) From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 09:31:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F2ED329; Mon, 24 Nov 2014 09:31:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E682885A; Mon, 24 Nov 2014 09:31:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO9Vcwb039949; Mon, 24 Nov 2014 09:31:38 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO9VcRS039948; Mon, 24 Nov 2014 09:31:38 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201411240931.sAO9VcRS039948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 24 Nov 2014 09:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274960 - head/usr.bin/elfdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 09:31:39 -0000 Author: brueffer Date: Mon Nov 24 09:31:38 2014 New Revision: 274960 URL: https://svnweb.freebsd.org/changeset/base/274960 Log: Limit descriptors and enter capability mode. Differential: D1009 Reviewed by: jonathan, pjd MFC after: 2 weeks Relnotes: yes Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Mon Nov 24 09:16:19 2014 (r274959) +++ head/usr.bin/elfdump/elfdump.c Mon Nov 24 09:31:38 2014 (r274960) @@ -29,12 +29,15 @@ __FBSDID("$FreeBSD$"); #include + +#include #include #include #include #include #include #include +#include #include #include #include @@ -467,6 +470,7 @@ elf_get_shstrndx(Elf32_Ehdr *e, void *sh int main(int ac, char **av) { + cap_rights_t rights; u_int64_t phoff; u_int64_t shoff; u_int64_t phentsize; @@ -527,6 +531,9 @@ main(int ac, char **av) case 'w': if ((out = fopen(optarg, "w")) == NULL) err(1, "%s", optarg); + cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE); + if (cap_rights_limit(fileno(out), &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for %s", optarg); break; case '?': default: @@ -539,6 +546,17 @@ main(int ac, char **av) if ((fd = open(*av, O_RDONLY)) < 0 || fstat(fd, &sb) < 0) err(1, "%s", *av); + cap_rights_init(&rights, CAP_MMAP_R); + if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for %s", *av); + close(STDIN_FILENO); + cap_rights_init(&rights, CAP_WRITE); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdout"); + if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stderr"); + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); e = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); if (e == MAP_FAILED) err(1, NULL); From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 09:38:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93BB4684; Mon, 24 Nov 2014 09:38:19 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B7A18A4; Mon, 24 Nov 2014 09:38:19 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id n3so5072192wiv.7 for ; Mon, 24 Nov 2014 01:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=XPSgtUr/zbFARwg5xvRps5TEa8lOsyM2B9HTzF9BUWk=; b=Ag51yLJgnVmSF3PvLPdOmBTvtes77oC7ciPPVJ+noKiWevL8V5Asv1rnDrwRctEJWy gvrgW4AHHZh8oGSTvWY2ddnHXrUO7r2ovUlwh1J3DGMR2EDHQzIQY5Ke863dp1ZL0RAU WDx47tp8K6Ic6m4ay8S+DocPodYgPp/x034AdBrZCTIKyJSQCuyrSu8QZck4/ZToRBdo UPi4K+LdGnjmbwDcYgnQy+lS6+zPhvDD1McadXL2sVblxSikpvWE5x01l4NI2hVIKy1C Pq8iVsrVmaBAffvSgbS0ZNdhcf9z3ypcX4VdN1sc8EqnpLqug46iJfyqZwyWz/D+LjZl cfZA== X-Received: by 10.180.84.132 with SMTP id z4mr19652449wiy.55.1416821897477; Mon, 24 Nov 2014 01:38:17 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id gi5sm20200610wjd.26.2014.11.24.01.38.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 01:38:16 -0800 (PST) Sender: Baptiste Daroussin Date: Mon, 24 Nov 2014 10:38:14 +0100 From: Baptiste Daroussin To: Ronald Klop Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Message-ID: <20141124093813.GL68776@ivaldir.etoilebsd.net> References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <20141124072316.GA27782@ymer.vnode.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="64LDleNqNegJ4g97" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 09:38:19 -0000 --64LDleNqNegJ4g97 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 24, 2014 at 10:19:08AM +0100, Ronald Klop wrote: > On Mon, 24 Nov 2014 08:23:17 +0100, Joel Dahl wrote: >=20 > > On Sun, Nov 23, 2014 at 10:04:12PM +0100, Baptiste Daroussin wrote: > >> On Sun, Nov 23, 2014 at 09:00:00PM +0000, Joel Dahl wrote: > >> > Author: joel (doc committer) > >> > Date: Sun Nov 23 21:00:00 2014 > >> > New Revision: 274925 > >> > URL: https://svnweb.freebsd.org/changeset/base/274925 > >> > > >> > Log: > >> > Misc mdoc fixes: > >> > > >> > - Remove superfluous paragraph macros. > >> > - Remove/fix empty or incorrect macros. > >> > - Sort sections into conventional order. > >> > - Terminate quoted strings properly. > >> > - Remove EOL whitespace. > >> > > >> > Modified: > >> > head/lib/libc/sys/poll.2 > >> > head/lib/libdpv/dpv.3 > >> > head/sbin/ipfw/ipfw.8 > >> > head/share/man/man4/gre.4 > >> > head/share/man/man4/man4.arm/cgem.4 > >> > head/share/man/man4/me.4 > >> > head/share/man/man4/netmap.4 > >> > head/share/man/man9/get_cyclecount.9 > >> > head/share/man/man9/malloc.9 > >> > head/share/man/man9/sleepqueue.9 > >> > head/sys/boot/common/zfsloader.8 > >> > head/sys/boot/i386/gptzfsboot/gptzfsboot.8 > >> > head/usr.bin/dpv/dpv.1 > >> > > >> > >> [...] > >> > >> > +.Sh AUTHORS > >> > +This manual page was written by > >> > +.An Andriy Gapon Aq avg@FreeBSD.org . > >> ^ There should be a Mt here to properly render = =20 > >> in html > >> > >> I just picked one in the middle of this commit. In general every mail = =20 > >> on any > >> manpage Mt should be used. > > > > Sure. Feel free to go over our manpages and fix them. It's a minor issu= e. > > > > And while we're on the subject, there's a bit of background to this =20 > > commit. > > Back in 2012 I started fixing mandoc lint errors/warnings in our manpage > > collection (excluding stuff from contrib/ and gnu/ etc.). I think I got= =20 > > them > > down from around ~4000 issues to almost zero. Quite a few manpages didn= 't > > even work with mandoc at the time, due to how many syntactical mdoc =20 > > errors > > they had. The situation is still good, but I re-ran my scripts yesterda= y =20 > > and > > found a slew of new warnings. I fixed a few obvious ones, but if someon= e =20 > > with > > more time on his hands wants to help, please go ahead. A good starting = =20 > > point > > would probably the netmap.4 or ctl.conf.5 manpages, they seem to genera= te > > quite a few warnings. > > > > I'd also be grateful if everyone ran mandoc -Tlint on their manpages = =20 > > before > > committing. :-) > > >=20 > A commit hook does magic for these kind of things. ;-) Except that such commit hook will prevent updating openssl and/or kerberos = :) Regards, Bapt --64LDleNqNegJ4g97 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRy/IUACgkQ8kTtMUmk6Ewi2gCfR3sSQv7Jw/h9eD6e6GH9EYN7 bQ4AnjR8e69hLeRZ1P2jF2+o9w0iglbU =OirY -----END PGP SIGNATURE----- --64LDleNqNegJ4g97-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 10:12:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BDCFB6A; Mon, 24 Nov 2014 10:12:00 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFEF2C6F; Mon, 24 Nov 2014 10:11:59 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id h11so5131439wiw.15 for ; Mon, 24 Nov 2014 02:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Sbdt9GynW+4Je/oGWqUu075ufk9f9x9hDUahwSS6/r4=; b=N6XHt3O9contRHCw3ZXrtljLdBJod13TnESFwhYVOZqFK9IBlgQPygO42uwJixze8W UVU76JPMODNAjuhkVnb5c+KTEkHBSeGmz6xxHqE2pGPgOVHjWC9mjsRS1NnF/NZbjgZq +yUHjD+YnkNYo1IZT8Lf15mqLU40ySIdIw7NQub8RNDwZwV6Udya3F/MRz1TiWpWN6RJ 2J/6CRHdbY0VDDQFmtC8JzKn3tMeluHwEWaQqz5kJStTaLHzE9vpxxd5ahn4ggEcPTsg FLw/mxvhOJP5QxU5G7DZYd5P5nUtwnahTU61zLuqn6JM7fySGkyBsBJBX9bZtohJjYGe of8g== X-Received: by 10.194.78.82 with SMTP id z18mr31502516wjw.120.1416823917521; Mon, 24 Nov 2014 02:11:57 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id p1sm20323951wjy.22.2014.11.24.02.11.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 02:11:56 -0800 (PST) Sender: Baptiste Daroussin Date: Mon, 24 Nov 2014 11:11:53 +0100 From: Baptiste Daroussin To: Christian Brueffer Subject: Re: svn commit: r274960 - head/usr.bin/elfdump Message-ID: <20141124101153.GM68776@ivaldir.etoilebsd.net> References: <201411240931.sAO9VcRS039948@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JlJsEFsx9RQyiX4C" Content-Disposition: inline In-Reply-To: <201411240931.sAO9VcRS039948@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 10:12:00 -0000 --JlJsEFsx9RQyiX4C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 25, 2014 at 09:31:38AM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Mon Nov 24 09:31:38 2014 > New Revision: 274960 > URL: https://svnweb.freebsd.org/changeset/base/274960 >=20 > Log: > Limit descriptors and enter capability mode. > =20 > Differential: D1009 > Reviewed by: jonathan, pjd > MFC after: 2 weeks > Relnotes: yes >=20 > Modified: > head/usr.bin/elfdump/elfdump.c >=20 > Modified: head/usr.bin/elfdump/elfdump.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/elfdump/elfdump.c Mon Nov 24 09:16:19 2014 (r274959) > +++ head/usr.bin/elfdump/elfdump.c Mon Nov 24 09:31:38 2014 (r274960) > @@ -29,12 +29,15 @@ > __FBSDID("$FreeBSD$"); > =20 > #include > + > +#include Beware that MFC will not work oot of box as sys/capsicum.h is not in stable= /10 the only way to do portable capsicum right now between freebsd branches is = to use sys/capability.h Best regards, Bapt --JlJsEFsx9RQyiX4C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRzBGkACgkQ8kTtMUmk6EwU5ACdFw9Wk34X1kzi4+LfE3W6Ir4u nOcAn1g/x9ocm2EHJM04VH4YOx2vPTwc =lvrV -----END PGP SIGNATURE----- --JlJsEFsx9RQyiX4C-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 11:12:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBF35B5B; Mon, 24 Nov 2014 11:12:11 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D2C32D2; Mon, 24 Nov 2014 11:12:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XsrWJ-000BEU-7H; Mon, 24 Nov 2014 11:09:27 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 24 Nov 2014 11:09:27 +0000 (GMT) Date: Mon, 24 Nov 2014 11:09:27 +0000 From: Ruslan Bukin To: Adrian Chadd Subject: Re: svn commit: r274752 - in head/sys/mips: include mips Message-ID: <20141124110927.GA43154@bsdpad.com> References: <201411201706.sAKH6fVP032621@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 11:12:12 -0000 Hi, thanks for pointing out. I fixed it. I definetly had to pass universe. Ruslan On Sun, Nov 23, 2014 at 01:14:49PM -0800, Adrian Chadd wrote: > Hi! > > You have some function declarations wrong. vm_offset_t != vm_paddr_t. > > eg: > > +void mipsNN_sdcache_wbinv_range_32( > vm_paddr_t, vm_size_t); > > but > > +void > +mipsNN_sdcache_wbinv_range_ > 32(vm_offset_t va, vm_size_t size) > > .. did you test this with a make universe pass? > > Thanks, > > > > > -adrian > > On 20 November 2014 at 09:06, Ruslan Bukin wrote: > > Author: br > > Date: Thu Nov 20 17:06:41 2014 > > New Revision: 274752 > > URL: https://svnweb.freebsd.org/changeset/base/274752 > > > > Log: > > Add L2-cache writeback/flush operations. Supported 32,128-byte line-size, > > else ignored. Cavium Networks also ignored as it has non-standard config > > registers. > > > > Obtained from: NetBSD > > Sponsored by: DARPA, AFRL > > > > Modified: > > head/sys/mips/include/cache_mipsNN.h > > head/sys/mips/include/cpuinfo.h > > head/sys/mips/include/cpuregs.h > > head/sys/mips/mips/cache.c > > head/sys/mips/mips/cache_mipsNN.c > > head/sys/mips/mips/cpu.c > > > > Modified: head/sys/mips/include/cache_mipsNN.h > > ============================================================================== > > --- head/sys/mips/include/cache_mipsNN.h Thu Nov 20 17:03:40 2014 (r274751) > > +++ head/sys/mips/include/cache_mipsNN.h Thu Nov 20 17:06:41 2014 (r274752) > > @@ -67,5 +67,15 @@ void mipsNN_pdcache_wbinv_range_index_12 > > void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); > > void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); > > #endif > > +void mipsNN_sdcache_wbinv_all_32(void); > > +void mipsNN_sdcache_wbinv_range_32(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_wbinv_range_index_32(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_inv_range_32(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_wb_range_32(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_wbinv_all_128(void); > > +void mipsNN_sdcache_wbinv_range_128(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_wbinv_range_index_128(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_inv_range_128(vm_paddr_t, vm_size_t); > > +void mipsNN_sdcache_wb_range_128(vm_paddr_t, vm_size_t); > > > > #endif /* _MACHINE_CACHE_MIPSNN_H_ */ > > > > Modified: head/sys/mips/include/cpuinfo.h > > ============================================================================== > > --- head/sys/mips/include/cpuinfo.h Thu Nov 20 17:03:40 2014 (r274751) > > +++ head/sys/mips/include/cpuinfo.h Thu Nov 20 17:06:41 2014 (r274752) > > @@ -67,6 +67,12 @@ struct mips_cpuinfo { > > u_int8_t dc_nways; > > u_int16_t dc_nsets; > > } l1; > > + struct { > > + u_int32_t dc_size; > > + u_int8_t dc_linesize; > > + u_int8_t dc_nways; > > + u_int16_t dc_nsets; > > + } l2; > > }; > > > > extern struct mips_cpuinfo cpuinfo; > > > > Modified: head/sys/mips/include/cpuregs.h > > ============================================================================== > > --- head/sys/mips/include/cpuregs.h Thu Nov 20 17:03:40 2014 (r274751) > > +++ head/sys/mips/include/cpuregs.h Thu Nov 20 17:06:41 2014 (r274752) > > @@ -550,6 +550,13 @@ > > #define MIPS_CONFIG1_EP 0x00000002 /* EJTAG implemented */ > > #define MIPS_CONFIG1_FP 0x00000001 /* FPU implemented */ > > > > +#define MIPS_CONFIG2_SA_SHIFT 0 /* Secondary cache associativity */ > > +#define MIPS_CONFIG2_SA_MASK 0xf > > +#define MIPS_CONFIG2_SL_SHIFT 4 /* Secondary cache line size */ > > +#define MIPS_CONFIG2_SL_MASK 0xf > > +#define MIPS_CONFIG2_SS_SHIFT 8 /* Secondary cache sets per way */ > > +#define MIPS_CONFIG2_SS_MASK 0xf > > + > > #define MIPS_CONFIG4_MMUSIZEEXT 0x000000FF /* bits 7.. 0 MMU Size Extension */ > > #define MIPS_CONFIG4_MMUEXTDEF 0x0000C000 /* bits 15.14 MMU Extension Definition */ > > #define MIPS_CONFIG4_MMUEXTDEF_MMUSIZEEXT 0x00004000 /* This values denotes CONFIG4 bits */ > > > > Modified: head/sys/mips/mips/cache.c > > ============================================================================== > > --- head/sys/mips/mips/cache.c Thu Nov 20 17:03:40 2014 (r274751) > > +++ head/sys/mips/mips/cache.c Thu Nov 20 17:06:41 2014 (r274752) > > @@ -260,19 +260,42 @@ mips_config_cache(struct mips_cpuinfo * > > panic("no pdcache_wb_range"); > > } > > > > - /* XXXMIPS: No secondary cache handlers yet */ > > -#ifdef notyet > > - if (mips_sdcache_size) { > > - if (!mips_cache_ops.mco_sdcache_wbinv_all) > > - panic("no sdcache_wbinv_all"); > > - if (!mips_cache_ops.mco_sdcache_wbinv_range) > > - panic("no sdcache_wbinv_range"); > > - if (!mips_cache_ops.mco_sdcache_wbinv_range_index) > > - panic("no sdcache_wbinv_range_index"); > > - if (!mips_cache_ops.mco_sdcache_inv_range) > > - panic("no sdcache_inv_range"); > > - if (!mips_cache_ops.mco_sdcache_wb_range) > > - panic("no sdcache_wb_range"); > > + /* L2 data cache */ > > + if (!cpuinfo->l2.dc_size) { > > + /* No L2 found, ignore */ > > + return; > > } > > + > > + switch (cpuinfo->l2.dc_linesize) { > > + case 32: > > + mips_cache_ops.mco_sdcache_wbinv_all = > > + mipsNN_sdcache_wbinv_all_32; > > + mips_cache_ops.mco_sdcache_wbinv_range = > > + mipsNN_sdcache_wbinv_range_32; > > + mips_cache_ops.mco_sdcache_wbinv_range_index = > > + mipsNN_sdcache_wbinv_range_index_32; > > + mips_cache_ops.mco_sdcache_inv_range = > > + mipsNN_sdcache_inv_range_32; > > + mips_cache_ops.mco_sdcache_wb_range = > > + mipsNN_sdcache_wb_range_32; > > + break; > > + case 128: > > + mips_cache_ops.mco_sdcache_wbinv_all = > > + mipsNN_sdcache_wbinv_all_128; > > + mips_cache_ops.mco_sdcache_wbinv_range = > > + mipsNN_sdcache_wbinv_range_128; > > + mips_cache_ops.mco_sdcache_wbinv_range_index = > > + mipsNN_sdcache_wbinv_range_index_128; > > + mips_cache_ops.mco_sdcache_inv_range = > > + mipsNN_sdcache_inv_range_128; > > + mips_cache_ops.mco_sdcache_wb_range = > > + mipsNN_sdcache_wb_range_128; > > + break; > > + default: > > +#ifdef CACHE_DEBUG > > + printf(" no sdcache ops for %d byte lines", > > + cpuinfo->l2.dc_linesize); > > #endif > > + break; > > + } > > } > > > > Modified: head/sys/mips/mips/cache_mipsNN.c > > ============================================================================== > > --- head/sys/mips/mips/cache_mipsNN.c Thu Nov 20 17:03:40 2014 (r274751) > > +++ head/sys/mips/mips/cache_mipsNN.c Thu Nov 20 17:06:41 2014 (r274752) > > @@ -52,6 +52,9 @@ __FBSDID("$FreeBSD$"); > > #define round_line32(x) (((x) + 31) & ~31) > > #define trunc_line32(x) ((x) & ~31) > > > > +#define round_line128(x) (((x) + 127) & ~127) > > +#define trunc_line128(x) ((x) & ~127) > > + > > #if defined(CPU_NLM) > > static __inline void > > xlp_sync(void) > > @@ -100,6 +103,10 @@ static int pdcache_size; > > static int pdcache_stride; > > static int pdcache_loopcount; > > static int pdcache_way_mask; > > +static int sdcache_size; > > +static int sdcache_stride; > > +static int sdcache_loopcount; > > +static int sdcache_way_mask; > > > > void > > mipsNN_cache_init(struct mips_cpuinfo * cpuinfo) > > @@ -142,6 +149,11 @@ mipsNN_cache_init(struct mips_cpuinfo * > > pdcache_size = cpuinfo->l1.dc_size; > > pdcache_way_mask = cpuinfo->l1.dc_nways - 1; > > > > + sdcache_stride = cpuinfo->l2.dc_nsets * cpuinfo->l2.dc_linesize; > > + sdcache_loopcount = cpuinfo->l2.dc_nways; > > + sdcache_size = cpuinfo->l2.dc_size; > > + sdcache_way_mask = cpuinfo->l2.dc_nways - 1; > > + > > #define CACHE_DEBUG > > #ifdef CACHE_DEBUG > > printf("Cache info:\n"); > > @@ -636,3 +648,195 @@ mipsNN_pdcache_wb_range_128(vm_offset_t > > } > > > > #endif > > + > > +void > > +mipsNN_sdcache_wbinv_all_32(void) > > +{ > > + vm_offset_t va = MIPS_PHYS_TO_KSEG0(0); > > + vm_offset_t eva = va + sdcache_size; > > + > > + while (va < eva) { > > + cache_r4k_op_32lines_32(va, > > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > > + va += (32 * 32); > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wbinv_range_32(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva = round_line32(va + size); > > + > > + va = trunc_line32(va); > > + > > + while ((eva - va) >= (32 * 32)) { > > + cache_r4k_op_32lines_32(va, > > + CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > > + va += (32 * 32); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > > + va += 32; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wbinv_range_index_32(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva; > > + > > + /* > > + * Since we're doing Index ops, we expect to not be able > > + * to access the address we've been given. So, get the > > + * bits that determine the cache index, and make a KSEG0 > > + * address out of them. > > + */ > > + va = MIPS_PHYS_TO_KSEG0(va & (sdcache_size - 1)); > > + > > + eva = round_line32(va + size); > > + va = trunc_line32(va); > > + > > + while ((eva - va) >= (32 * 32)) { > > + cache_r4k_op_32lines_32(va, > > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > > + va += (32 * 32); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > > + va += 32; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_inv_range_32(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva = round_line32(va + size); > > + > > + va = trunc_line32(va); > > + > > + while ((eva - va) >= (32 * 32)) { > > + cache_r4k_op_32lines_32(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > > + va += (32 * 32); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > > + va += 32; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wb_range_32(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva = round_line32(va + size); > > + > > + va = trunc_line32(va); > > + > > + while ((eva - va) >= (32 * 32)) { > > + cache_r4k_op_32lines_32(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > > + va += (32 * 32); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > > + va += 32; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wbinv_all_128(void) > > +{ > > + vm_offset_t va = MIPS_PHYS_TO_KSEG0(0); > > + vm_offset_t eva = va + sdcache_size; > > + > > + while (va < eva) { > > + cache_r4k_op_32lines_128(va, > > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > > + va += (32 * 128); > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wbinv_range_128(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva = round_line128(va + size); > > + > > + va = trunc_line128(va); > > + > > + while ((eva - va) >= (32 * 128)) { > > + cache_r4k_op_32lines_128(va, > > + CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > > + va += (32 * 128); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); > > + va += 128; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wbinv_range_index_128(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva; > > + > > + /* > > + * Since we're doing Index ops, we expect to not be able > > + * to access the address we've been given. So, get the > > + * bits that determine the cache index, and make a KSEG0 > > + * address out of them. > > + */ > > + va = MIPS_PHYS_TO_KSEG0(va & (sdcache_size - 1)); > > + > > + eva = round_line128(va + size); > > + va = trunc_line128(va); > > + > > + while ((eva - va) >= (32 * 128)) { > > + cache_r4k_op_32lines_128(va, > > + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > > + va += (32 * 128); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); > > + va += 128; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_inv_range_128(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva = round_line128(va + size); > > + > > + va = trunc_line128(va); > > + > > + while ((eva - va) >= (32 * 128)) { > > + cache_r4k_op_32lines_128(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > > + va += (32 * 128); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); > > + va += 128; > > + } > > +} > > + > > +void > > +mipsNN_sdcache_wb_range_128(vm_offset_t va, vm_size_t size) > > +{ > > + vm_offset_t eva = round_line128(va + size); > > + > > + va = trunc_line128(va); > > + > > + while ((eva - va) >= (32 * 128)) { > > + cache_r4k_op_32lines_128(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > > + va += (32 * 128); > > + } > > + > > + while (va < eva) { > > + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); > > + va += 128; > > + } > > +} > > > > Modified: head/sys/mips/mips/cpu.c > > ============================================================================== > > --- head/sys/mips/mips/cpu.c Thu Nov 20 17:03:40 2014 (r274751) > > +++ head/sys/mips/mips/cpu.c Thu Nov 20 17:06:41 2014 (r274752) > > @@ -73,6 +73,7 @@ mips_get_identity(struct mips_cpuinfo *c > > u_int32_t prid; > > u_int32_t cfg0; > > u_int32_t cfg1; > > + u_int32_t cfg2; > > #if defined(CPU_CNMIPS) > > u_int32_t cfg4; > > #endif > > @@ -186,6 +187,31 @@ mips_get_identity(struct mips_cpuinfo *c > > * cpuinfo->l1.ic_nsets * cpuinfo->l1.ic_nways; > > cpuinfo->l1.dc_size = cpuinfo->l1.dc_linesize > > * cpuinfo->l1.dc_nsets * cpuinfo->l1.dc_nways; > > + > > +#ifndef CPU_CNMIPS > > + /* L2 cache */ > > + if (!(cfg1 & MIPS_CONFIG_CM)) { > > + /* We don't have valid cfg2 register */ > > + return; > > + } > > + > > + cfg2 = mips_rd_config2(); > > + > > + tmp = (cfg2 >> MIPS_CONFIG2_SL_SHIFT) & MIPS_CONFIG2_SL_MASK; > > + if (0 < tmp && tmp <= 7) > > + cpuinfo->l2.dc_linesize = 2 << tmp; > > + > > + tmp = (cfg2 >> MIPS_CONFIG2_SS_SHIFT) & MIPS_CONFIG2_SS_MASK; > > + if (0 <= tmp && tmp <= 7) > > + cpuinfo->l2.dc_nsets = 64 << tmp; > > + > > + tmp = (cfg2 >> MIPS_CONFIG2_SA_SHIFT) & MIPS_CONFIG2_SA_MASK; > > + if (0 <= tmp && tmp <= 7) > > + cpuinfo->l2.dc_nways = tmp + 1; > > + > > + cpuinfo->l2.dc_size = cpuinfo->l2.dc_linesize > > + * cpuinfo->l2.dc_nsets * cpuinfo->l2.dc_nways; > > +#endif > > } > > > > void > > @@ -355,6 +381,7 @@ static driver_t cpu_driver = { > > static int > > cpu_probe(device_t dev) > > { > > + > > return (0); > > } > > > > From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 11:37:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D923A1DA; Mon, 24 Nov 2014 11:37:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5B5F74F; Mon, 24 Nov 2014 11:37:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOBbUIJ097191; Mon, 24 Nov 2014 11:37:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOBbSeF097180; Mon, 24 Nov 2014 11:37:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411241137.sAOBbSeF097180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Nov 2014 11:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274962 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 11:37:31 -0000 Author: mav Date: Mon Nov 24 11:37:27 2014 New Revision: 274962 URL: https://svnweb.freebsd.org/changeset/base/274962 Log: Replace home-grown CTL IO allocator with UMA. Old allocator created significant lock congestion protecting its lists of preallocated I/Os, while UMA provides much better SMP scalability. The downside of UMA is lack of reliable preallocation, that could guarantee successful allocation in non-sleepable environments. But careful code review shown, that only CAM target frontend really has that requirement. Fix that making that frontend preallocate and statically bind CTL I/O for every ATIO/INOT it preallocates any way. That allows to avoid allocations in hot I/O path. Other frontends either may sleep in allocation context or can properly handle allocation errors. On 40-core server with 6 ZVOL-backed LUNs and 7 iSCSI client connections this change increases peak performance from ~700K to >1M IOPS! Yay! :) MFC after: 1 month Sponsored by: iXsystems, Inc. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_internal.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/ctl_tpc.c head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl.c Mon Nov 24 11:37:27 2014 (r274962) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -644,7 +645,7 @@ ctl_isc_event_handler(ctl_ha_channel cha #if 0 printf("Serialize\n"); #endif - io = ctl_alloc_io((void *)ctl_softc->othersc_pool); + io = ctl_alloc_io_nowait(ctl_softc->othersc_pool); if (io == NULL) { printf("ctl_isc_event_handler: can't allocate " "ctl_io!\n"); @@ -889,8 +890,8 @@ ctl_isc_event_handler(ctl_ha_channel cha /* Handle resets sent from the other side */ case CTL_MSG_MANAGE_TASKS: { struct ctl_taskio *taskio; - taskio = (struct ctl_taskio *)ctl_alloc_io( - (void *)ctl_softc->othersc_pool); + taskio = (struct ctl_taskio *)ctl_alloc_io_nowait( + ctl_softc->othersc_pool); if (taskio == NULL) { printf("ctl_isc_event_handler: can't allocate " "ctl_io!\n"); @@ -918,8 +919,8 @@ ctl_isc_event_handler(ctl_ha_channel cha } /* Persistent Reserve action which needs attention */ case CTL_MSG_PERS_ACTION: - presio = (struct ctl_prio *)ctl_alloc_io( - (void *)ctl_softc->othersc_pool); + presio = (struct ctl_prio *)ctl_alloc_io_nowait( + ctl_softc->othersc_pool); if (presio == NULL) { printf("ctl_isc_event_handler: can't allocate " "ctl_io!\n"); @@ -1003,7 +1004,7 @@ static int ctl_init(void) { struct ctl_softc *softc; - struct ctl_io_pool *internal_pool, *emergency_pool, *other_pool; + void *other_pool; struct ctl_port *port; int i, error, retval; //int isc_retval; @@ -1049,7 +1050,8 @@ ctl_init(void) "Report no lun possible for invalid LUNs"); mtx_init(&softc->ctl_lock, "CTL mutex", NULL, MTX_DEF); - mtx_init(&softc->pool_lock, "CTL pool mutex", NULL, MTX_DEF); + softc->io_zone = uma_zcreate("CTL IO", sizeof(union ctl_io), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); softc->open_count = 0; /* @@ -1086,36 +1088,15 @@ ctl_init(void) STAILQ_INIT(&softc->fe_list); STAILQ_INIT(&softc->port_list); STAILQ_INIT(&softc->be_list); - STAILQ_INIT(&softc->io_pools); ctl_tpc_init(softc); - if (ctl_pool_create(softc, CTL_POOL_INTERNAL, CTL_POOL_ENTRIES_INTERNAL, - &internal_pool)!= 0){ - printf("ctl: can't allocate %d entry internal pool, " - "exiting\n", CTL_POOL_ENTRIES_INTERNAL); - return (ENOMEM); - } - - if (ctl_pool_create(softc, CTL_POOL_EMERGENCY, - CTL_POOL_ENTRIES_EMERGENCY, &emergency_pool) != 0) { - printf("ctl: can't allocate %d entry emergency pool, " - "exiting\n", CTL_POOL_ENTRIES_EMERGENCY); - ctl_pool_free(internal_pool); - return (ENOMEM); - } - - if (ctl_pool_create(softc, CTL_POOL_4OTHERSC, CTL_POOL_ENTRIES_OTHER_SC, + if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, &other_pool) != 0) { printf("ctl: can't allocate %d entry other SC pool, " "exiting\n", CTL_POOL_ENTRIES_OTHER_SC); - ctl_pool_free(internal_pool); - ctl_pool_free(emergency_pool); return (ENOMEM); } - - softc->internal_pool = internal_pool; - softc->emergency_pool = emergency_pool; softc->othersc_pool = other_pool; if (worker_threads <= 0) @@ -1137,8 +1118,6 @@ ctl_init(void) &softc->ctl_proc, &thr->thread, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); - ctl_pool_free(internal_pool); - ctl_pool_free(emergency_pool); ctl_pool_free(other_pool); return (error); } @@ -1147,8 +1126,6 @@ ctl_init(void) &softc->ctl_proc, NULL, 0, 0, "ctl", "lun"); if (error != 0) { printf("error creating CTL lun thread!\n"); - ctl_pool_free(internal_pool); - ctl_pool_free(emergency_pool); ctl_pool_free(other_pool); return (error); } @@ -1156,8 +1133,6 @@ ctl_init(void) &softc->ctl_proc, NULL, 0, 0, "ctl", "thresh"); if (error != 0) { printf("error creating CTL threshold thread!\n"); - ctl_pool_free(internal_pool); - ctl_pool_free(emergency_pool); ctl_pool_free(other_pool); return (error); } @@ -1210,7 +1185,6 @@ ctl_shutdown(void) { struct ctl_softc *softc; struct ctl_lun *lun, *next_lun; - struct ctl_io_pool *pool; softc = (struct ctl_softc *)control_softc; @@ -1231,24 +1205,13 @@ ctl_shutdown(void) ctl_frontend_deregister(&ioctl_frontend); - /* - * This will rip the rug out from under any FETDs or anyone else - * that has a pool allocated. Since we increment our module - * refcount any time someone outside the main CTL module allocates - * a pool, we shouldn't have any problems here. The user won't be - * able to unload the CTL module until client modules have - * successfully unloaded. - */ - while ((pool = STAILQ_FIRST(&softc->io_pools)) != NULL) - ctl_pool_free(pool); - #if 0 ctl_shutdown_thread(softc->work_thread); mtx_destroy(&softc->queue_lock); #endif ctl_tpc_shutdown(softc); - mtx_destroy(&softc->pool_lock); + uma_zdestroy(softc->io_zone); mtx_destroy(&softc->ctl_lock); destroy_dev(softc->dev); @@ -2371,21 +2334,15 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } io = ctl_alloc_io(softc->ioctl_info.port.ctl_pool_ref); - if (io == NULL) { - printf("ctl_ioctl: can't allocate ctl_io!\n"); - retval = ENOSPC; - break; - } /* * Need to save the pool reference so it doesn't get * spammed by the user's ctl_io. */ pool_tmp = io->io_hdr.pool; - memcpy(io, (void *)addr, sizeof(*io)); - io->io_hdr.pool = pool_tmp; + /* * No status yet, so make sure the status is set properly. */ @@ -3729,285 +3686,95 @@ ctl_kfree_io(union ctl_io *io) #endif /* unused */ /* - * ctl_softc, pool_type, total_ctl_io are passed in. + * ctl_softc, pool_name, total_ctl_io are passed in. * npool is passed out. */ int -ctl_pool_create(struct ctl_softc *ctl_softc, ctl_pool_type pool_type, - uint32_t total_ctl_io, struct ctl_io_pool **npool) +ctl_pool_create(struct ctl_softc *ctl_softc, const char *pool_name, + uint32_t total_ctl_io, void **npool) { - uint32_t i; - union ctl_io *cur_io, *next_io; +#ifdef IO_POOLS struct ctl_io_pool *pool; - int retval; - - retval = 0; pool = (struct ctl_io_pool *)malloc(sizeof(*pool), M_CTL, M_NOWAIT | M_ZERO); - if (pool == NULL) { - retval = ENOMEM; - goto bailout; - } + if (pool == NULL) + return (ENOMEM); - pool->type = pool_type; + snprintf(pool->name, sizeof(pool->name), "CTL IO %s", pool_name); pool->ctl_softc = ctl_softc; - - mtx_lock(&ctl_softc->pool_lock); - pool->id = ctl_softc->cur_pool_id++; - mtx_unlock(&ctl_softc->pool_lock); - - pool->flags = CTL_POOL_FLAG_NONE; - pool->refcount = 1; /* Reference for validity. */ - STAILQ_INIT(&pool->free_queue); - - /* - * XXX KDM other options here: - * - allocate a page at a time - * - allocate one big chunk of memory. - * Page allocation might work well, but would take a little more - * tracking. - */ - for (i = 0; i < total_ctl_io; i++) { - cur_io = (union ctl_io *)malloc(sizeof(*cur_io), M_CTLIO, - M_NOWAIT); - if (cur_io == NULL) { - retval = ENOMEM; - break; - } - cur_io->io_hdr.pool = pool; - STAILQ_INSERT_TAIL(&pool->free_queue, &cur_io->io_hdr, links); - pool->total_ctl_io++; - pool->free_ctl_io++; - } - - if (retval != 0) { - for (cur_io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue); - cur_io != NULL; cur_io = next_io) { - next_io = (union ctl_io *)STAILQ_NEXT(&cur_io->io_hdr, - links); - STAILQ_REMOVE(&pool->free_queue, &cur_io->io_hdr, - ctl_io_hdr, links); - free(cur_io, M_CTLIO); - } - - free(pool, M_CTL); - goto bailout; - } - mtx_lock(&ctl_softc->pool_lock); - ctl_softc->num_pools++; - STAILQ_INSERT_TAIL(&ctl_softc->io_pools, pool, links); - /* - * Increment our usage count if this is an external consumer, so we - * can't get unloaded until the external consumer (most likely a - * FETD) unloads and frees his pool. - * - * XXX KDM will this increment the caller's module use count, or - * mine? - */ -#if 0 - if ((pool_type != CTL_POOL_EMERGENCY) - && (pool_type != CTL_POOL_INTERNAL) - && (pool_type != CTL_POOL_4OTHERSC)) - MOD_INC_USE_COUNT; -#endif - - mtx_unlock(&ctl_softc->pool_lock); + pool->zone = uma_zsecond_create(pool->name, NULL, + NULL, NULL, NULL, ctl_softc->io_zone); + /* uma_prealloc(pool->zone, total_ctl_io); */ *npool = pool; - -bailout: - - return (retval); -} - -static int -ctl_pool_acquire(struct ctl_io_pool *pool) -{ - - mtx_assert(&pool->ctl_softc->pool_lock, MA_OWNED); - - if (pool->flags & CTL_POOL_FLAG_INVALID) - return (EINVAL); - - pool->refcount++; - - return (0); -} - -static void -ctl_pool_release(struct ctl_io_pool *pool) -{ - struct ctl_softc *ctl_softc = pool->ctl_softc; - union ctl_io *io; - - mtx_assert(&ctl_softc->pool_lock, MA_OWNED); - - if (--pool->refcount != 0) - return; - - while ((io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue)) != NULL) { - STAILQ_REMOVE(&pool->free_queue, &io->io_hdr, ctl_io_hdr, - links); - free(io, M_CTLIO); - } - - STAILQ_REMOVE(&ctl_softc->io_pools, pool, ctl_io_pool, links); - ctl_softc->num_pools--; - - /* - * XXX KDM will this decrement the caller's usage count or mine? - */ -#if 0 - if ((pool->type != CTL_POOL_EMERGENCY) - && (pool->type != CTL_POOL_INTERNAL) - && (pool->type != CTL_POOL_4OTHERSC)) - MOD_DEC_USE_COUNT; +#else + *npool = ctl_softc->io_zone; #endif - - free(pool, M_CTL); + return (0); } void ctl_pool_free(struct ctl_io_pool *pool) { - struct ctl_softc *ctl_softc; if (pool == NULL) return; - ctl_softc = pool->ctl_softc; - mtx_lock(&ctl_softc->pool_lock); - pool->flags |= CTL_POOL_FLAG_INVALID; - ctl_pool_release(pool); - mtx_unlock(&ctl_softc->pool_lock); +#ifdef IO_POOLS + uma_zdestroy(pool->zone); + free(pool, M_CTL); +#endif } -/* - * This routine does not block (except for spinlocks of course). - * It tries to allocate a ctl_io union from the caller's pool as quickly as - * possible. - */ union ctl_io * ctl_alloc_io(void *pool_ref) { union ctl_io *io; - struct ctl_softc *ctl_softc; - struct ctl_io_pool *pool, *npool; - struct ctl_io_pool *emergency_pool; +#ifdef IO_POOLS + struct ctl_io_pool *pool = (struct ctl_io_pool *)pool_ref; - pool = (struct ctl_io_pool *)pool_ref; - - if (pool == NULL) { - printf("%s: pool is NULL\n", __func__); - return (NULL); - } - - emergency_pool = NULL; - - ctl_softc = pool->ctl_softc; - - mtx_lock(&ctl_softc->pool_lock); - /* - * First, try to get the io structure from the user's pool. - */ - if (ctl_pool_acquire(pool) == 0) { - io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue); - if (io != NULL) { - STAILQ_REMOVE_HEAD(&pool->free_queue, links); - pool->total_allocated++; - pool->free_ctl_io--; - mtx_unlock(&ctl_softc->pool_lock); - return (io); - } else - ctl_pool_release(pool); - } - /* - * If he doesn't have any io structures left, search for an - * emergency pool and grab one from there. - */ - STAILQ_FOREACH(npool, &ctl_softc->io_pools, links) { - if (npool->type != CTL_POOL_EMERGENCY) - continue; - - if (ctl_pool_acquire(npool) != 0) - continue; - - emergency_pool = npool; - - io = (union ctl_io *)STAILQ_FIRST(&npool->free_queue); - if (io != NULL) { - STAILQ_REMOVE_HEAD(&npool->free_queue, links); - npool->total_allocated++; - npool->free_ctl_io--; - mtx_unlock(&ctl_softc->pool_lock); - return (io); - } else - ctl_pool_release(npool); - } - - /* Drop the spinlock before we malloc */ - mtx_unlock(&ctl_softc->pool_lock); + io = uma_zalloc(pool->zone, M_WAITOK); +#else + io = uma_zalloc((uma_zone_t)pool_ref, M_WAITOK); +#endif + if (io != NULL) + io->io_hdr.pool = pool_ref; + return (io); +} - /* - * The emergency pool (if it exists) didn't have one, so try an - * atomic (i.e. nonblocking) malloc and see if we get lucky. - */ - io = (union ctl_io *)malloc(sizeof(*io), M_CTLIO, M_NOWAIT); - if (io != NULL) { - /* - * If the emergency pool exists but is empty, add this - * ctl_io to its list when it gets freed. - */ - if (emergency_pool != NULL) { - mtx_lock(&ctl_softc->pool_lock); - if (ctl_pool_acquire(emergency_pool) == 0) { - io->io_hdr.pool = emergency_pool; - emergency_pool->total_ctl_io++; - /* - * Need to bump this, otherwise - * total_allocated and total_freed won't - * match when we no longer have anything - * outstanding. - */ - emergency_pool->total_allocated++; - } - mtx_unlock(&ctl_softc->pool_lock); - } else - io->io_hdr.pool = NULL; - } +union ctl_io * +ctl_alloc_io_nowait(void *pool_ref) +{ + union ctl_io *io; +#ifdef IO_POOLS + struct ctl_io_pool *pool = (struct ctl_io_pool *)pool_ref; + io = uma_zalloc(pool->zone, M_NOWAIT); +#else + io = uma_zalloc((uma_zone_t)pool_ref, M_NOWAIT); +#endif + if (io != NULL) + io->io_hdr.pool = pool_ref; return (io); } void ctl_free_io(union ctl_io *io) { +#ifdef IO_POOLS + struct ctl_io_pool *pool; +#endif + if (io == NULL) return; - /* - * If this ctl_io has a pool, return it to that pool. - */ - if (io->io_hdr.pool != NULL) { - struct ctl_io_pool *pool; - - pool = (struct ctl_io_pool *)io->io_hdr.pool; - mtx_lock(&pool->ctl_softc->pool_lock); - io->io_hdr.io_type = 0xff; - STAILQ_INSERT_TAIL(&pool->free_queue, &io->io_hdr, links); - pool->total_freed++; - pool->free_ctl_io++; - ctl_pool_release(pool); - mtx_unlock(&pool->ctl_softc->pool_lock); - } else { - /* - * Otherwise, just free it. We probably malloced it and - * the emergency pool wasn't available. - */ - free(io, M_CTLIO); - } - +#ifdef IO_POOLS + pool = (struct ctl_io_pool *)io->io_hdr.pool; + uma_zfree(pool->zone, io); +#else + uma_zfree((uma_zone_t)io->io_hdr.pool, io); +#endif } void @@ -4022,9 +3789,7 @@ ctl_zero_io(union ctl_io *io) * May need to preserve linked list pointers at some point too. */ pool_ref = io->io_hdr.pool; - memset(io, 0, sizeof(*io)); - io->io_hdr.pool = pool_ref; } @@ -5657,16 +5422,10 @@ ctl_start_stop(struct ctl_scsiio *ctsio) union ctl_io *new_io; new_io = ctl_alloc_io(ctsio->io_hdr.pool); - if (new_io == NULL) { - ctl_set_busy(ctsio); - ctl_done((union ctl_io *)ctsio); - } else { - ctl_copy_io((union ctl_io *)ctsio, - new_io); - retval = lun->backend->config_write(new_io); - ctl_set_success(ctsio); - ctl_done((union ctl_io *)ctsio); - } + ctl_copy_io((union ctl_io *)ctsio, new_io); + retval = lun->backend->config_write(new_io); + ctl_set_success(ctsio); + ctl_done((union ctl_io *)ctsio); } else { retval = lun->backend->config_write( (union ctl_io *)ctsio); Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_frontend.c Mon Nov 24 11:37:27 2014 (r274962) @@ -138,7 +138,7 @@ ctl_frontend_find(char *frontend_name) int ctl_port_register(struct ctl_port *port) { - struct ctl_io_pool *pool; + void *pool; int port_num; int retval; @@ -176,7 +176,7 @@ ctl_port_register(struct ctl_port *port) * pending sense queue on the next command, whether or not it is * a REQUEST SENSE. */ - retval = ctl_pool_create(control_softc, CTL_POOL_FETD, + retval = ctl_pool_create(control_softc, port->port_name, port->num_requested_ctl_io + 20, &pool); if (retval != 0) { free(port->wwpn_iid, M_CTL); Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Nov 24 11:37:27 2014 (r274962) @@ -545,7 +545,7 @@ cfcs_action(struct cam_sim *sim, union c return; } - io = ctl_alloc_io(softc->port.ctl_pool_ref); + io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref); if (io == NULL) { printf("%s: can't allocate ctl_io\n", __func__); ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN; @@ -642,7 +642,7 @@ cfcs_action(struct cam_sim *sim, union c return; } - io = ctl_alloc_io(softc->port.ctl_pool_ref); + io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref); if (io == NULL) { ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN; xpt_freeze_devq(ccb->ccb_h.path, 1); @@ -737,7 +737,7 @@ cfcs_action(struct cam_sim *sim, union c return; } - io = ctl_alloc_io(softc->port.ctl_pool_ref); + io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref); if (io == NULL) { ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN; xpt_freeze_devq(ccb->ccb_h.path, 1); Modified: head/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_internal.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_frontend_internal.c Mon Nov 24 11:37:27 2014 (r274962) @@ -761,11 +761,6 @@ cfi_done(union ctl_io *io) struct cfi_lun_io *new_lun_io; new_io = ctl_alloc_io(softc->port.ctl_pool_ref); - if (new_io == NULL) { - printf("%s: unable to allocate ctl_io for " - "error recovery\n", __func__); - goto done; - } ctl_zero_io(new_io); new_io->io_hdr.io_type = CTL_IO_TASK; @@ -967,12 +962,6 @@ cfi_lun_probe(struct cfi_lun *lun, int h union ctl_io *io; io = ctl_alloc_io(lun->softc->port.ctl_pool_ref); - if (io == NULL) { - printf("%s: unable to alloc ctl_io for target %ju " - "lun %d probe\n", __func__, - (uintmax_t)lun->target_id.id, lun->lun_id); - return; - } ctl_scsi_inquiry(io, /*data_ptr*/(uint8_t *)&lun->inq_data, /*data_len*/ sizeof(lun->inq_data), @@ -1014,12 +1003,6 @@ cfi_lun_probe(struct cfi_lun *lun, int h union ctl_io *io; io = ctl_alloc_io(lun->softc->port.ctl_pool_ref); - if (io == NULL) { - printf("%s: unable to alloc ctl_io for target %ju " - "lun %d probe\n", __func__, - (uintmax_t)lun->target_id.id, lun->lun_id); - return; - } dataptr = malloc(sizeof(struct scsi_read_capacity_data_long), M_CTL_CFI, M_NOWAIT); @@ -1394,7 +1377,7 @@ cfi_action(struct cfi_metatask *metatask if (SID_TYPE(&lun->inq_data) != T_DIRECT) continue; da_luns++; - io = ctl_alloc_io(softc->port.ctl_pool_ref); + io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref); if (io != NULL) { ios_allocated++; STAILQ_INSERT_TAIL(&tmp_io_list, &io->io_hdr, @@ -1548,7 +1531,7 @@ cfi_action(struct cfi_metatask *metatask } - io = ctl_alloc_io(softc->port.ctl_pool_ref); + io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref); if (io == NULL) { metatask->status = CFI_MT_ERROR; metatask->taskinfo.bbrread.status = CFI_BBR_NO_MEM; Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Nov 24 11:37:27 2014 (r274962) @@ -542,13 +542,6 @@ cfiscsi_pdu_handle_scsi_command(struct i return; } io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); - if (io == NULL) { - CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io; " - "dropping connection"); - icl_pdu_free(request); - cfiscsi_session_terminate(cs); - return; - } ctl_zero_io(io); io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = request; io->io_hdr.io_type = CTL_IO_SCSI; @@ -606,13 +599,6 @@ cfiscsi_pdu_handle_task_request(struct i cs = PDU_SESSION(request); bhstmr = (struct iscsi_bhs_task_management_request *)request->ip_bhs; io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); - if (io == NULL) { - CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io;" - "dropping connection"); - icl_pdu_free(request); - cfiscsi_session_terminate(cs); - return; - } ctl_zero_io(io); io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = request; io->io_hdr.io_type = CTL_IO_TASK; @@ -1063,10 +1049,6 @@ cfiscsi_session_terminate_tasks(struct c if (cs->cs_target == NULL) return; /* No target yet, so nothing to do. */ io = ctl_alloc_io(cs->cs_target->ct_port.ctl_pool_ref); - if (io == NULL) { - CFISCSI_SESSION_WARN(cs, "can't allocate ctl_io"); - return; - } ctl_zero_io(io); io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = cs; io->io_hdr.io_type = CTL_IO_TASK; Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_io.h Mon Nov 24 11:37:27 2014 (r274962) @@ -511,6 +511,7 @@ union ctl_io { #ifdef _KERNEL union ctl_io *ctl_alloc_io(void *pool_ref); +union ctl_io *ctl_alloc_io_nowait(void *pool_ref); void ctl_free_io(union ctl_io *io); void ctl_zero_io(union ctl_io *io); void ctl_copy_io(union ctl_io *src, union ctl_io *dest); Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_private.h Mon Nov 24 11:37:27 2014 (r274962) @@ -71,34 +71,13 @@ struct ctl_fe_ioctl_params { ctl_fe_ioctl_state state; }; -#define CTL_POOL_ENTRIES_INTERNAL 200 -#define CTL_POOL_ENTRIES_EMERGENCY 300 #define CTL_POOL_ENTRIES_OTHER_SC 200 -typedef enum { - CTL_POOL_INTERNAL, - CTL_POOL_FETD, - CTL_POOL_EMERGENCY, - CTL_POOL_4OTHERSC -} ctl_pool_type; - -typedef enum { - CTL_POOL_FLAG_NONE = 0x00, - CTL_POOL_FLAG_INVALID = 0x01 -} ctl_pool_flags; - struct ctl_io_pool { - ctl_pool_type type; - ctl_pool_flags flags; + char name[64]; uint32_t id; struct ctl_softc *ctl_softc; - uint32_t refcount; - uint64_t total_allocated; - uint64_t total_freed; - int32_t total_ctl_io; - int32_t free_ctl_io; - STAILQ_HEAD(, ctl_io_hdr) free_queue; - STAILQ_ENTRY(ctl_io_pool) links; + struct uma_zone *zone; }; typedef enum { @@ -475,9 +454,7 @@ struct ctl_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct ctl_ioctl_info ioctl_info; - struct ctl_io_pool *internal_pool; - struct ctl_io_pool *emergency_pool; - struct ctl_io_pool *othersc_pool; + void *othersc_pool; struct proc *ctl_proc; int targ_online; uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32]; @@ -492,10 +469,8 @@ struct ctl_softc { struct ctl_port *ctl_ports[CTL_MAX_PORTS]; uint32_t num_backends; STAILQ_HEAD(, ctl_backend_driver) be_list; - struct mtx pool_lock; - uint32_t num_pools; + struct uma_zone *io_zone; uint32_t cur_pool_id; - STAILQ_HEAD(, ctl_io_pool) io_pools; struct ctl_thread threads[CTL_MAX_THREADS]; TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; struct callout tpc_timeout; @@ -508,8 +483,8 @@ extern const struct ctl_cmd_entry ctl_cm uint32_t ctl_get_initindex(struct ctl_nexus *nexus); uint32_t ctl_get_resindex(struct ctl_nexus *nexus); uint32_t ctl_port_idx(int port_num); -int ctl_pool_create(struct ctl_softc *ctl_softc, ctl_pool_type pool_type, - uint32_t total_ctl_io, struct ctl_io_pool **npool); +int ctl_pool_create(struct ctl_softc *ctl_softc, const char *pool_name, + uint32_t total_ctl_io, void **npool); void ctl_pool_free(struct ctl_io_pool *pool); int ctl_scsi_release(struct ctl_scsiio *ctsio); int ctl_scsi_reserve(struct ctl_scsiio *ctsio); Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/ctl_tpc.c Mon Nov 24 11:37:27 2014 (r274962) @@ -812,7 +812,6 @@ tpc_process_b2b(struct tpc_list *list) uint32_t srcblock, dstblock; if (list->stage == 1) { -complete: while ((tior = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tior, links); ctl_free_io(tior->io); @@ -886,10 +885,6 @@ complete: tior->list = list; TAILQ_INSERT_TAIL(&list->allio, tior, links); tior->io = tpcl_alloc_io(); - if (tior->io == NULL) { - list->error = 1; - goto complete; - } ctl_scsi_read_write(tior->io, /*data_ptr*/ &list->buf[donebytes], /*data_len*/ roundbytes, @@ -909,10 +904,6 @@ complete: tiow->list = list; TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); - if (tiow->io == NULL) { - list->error = 1; - goto complete; - } ctl_scsi_read_write(tiow->io, /*data_ptr*/ &list->buf[donebytes], /*data_len*/ roundbytes, @@ -951,7 +942,6 @@ tpc_process_verify(struct tpc_list *list uint64_t sl; if (list->stage == 1) { -complete: while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); ctl_free_io(tio->io); @@ -990,10 +980,6 @@ complete: tio->list = list; TAILQ_INSERT_TAIL(&list->allio, tio, links); tio->io = tpcl_alloc_io(); - if (tio->io == NULL) { - list->error = 1; - goto complete; - } ctl_scsi_tur(tio->io, /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); tio->io->io_hdr.retries = 3; tio->lun = sl; @@ -1013,7 +999,6 @@ tpc_process_register_key(struct tpc_list int datalen; if (list->stage == 1) { -complete: while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); ctl_free_io(tio->io); @@ -1050,10 +1035,6 @@ complete: tio->list = list; TAILQ_INSERT_TAIL(&list->allio, tio, links); tio->io = tpcl_alloc_io(); - if (tio->io == NULL) { - list->error = 1; - goto complete; - } datalen = sizeof(struct scsi_per_res_out_parms); list->buf = malloc(datalen, M_CTL, M_WAITOK); ctl_scsi_persistent_res_out(tio->io, @@ -1112,7 +1093,6 @@ tpc_process_wut(struct tpc_list *list) uint32_t srcblock, dstblock; if (list->stage > 0) { -complete: /* Cleanup after previous rounds. */ while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); @@ -1184,10 +1164,6 @@ complete: tior->list = list; TAILQ_INSERT_TAIL(&list->allio, tior, links); tior->io = tpcl_alloc_io(); - if (tior->io == NULL) { - list->error = 1; - goto complete; - } ctl_scsi_read_write(tior->io, /*data_ptr*/ &list->buf[donebytes], /*data_len*/ roundbytes, @@ -1207,10 +1183,6 @@ complete: tiow->list = list; TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); - if (tiow->io == NULL) { - list->error = 1; - goto complete; - } ctl_scsi_read_write(tiow->io, /*data_ptr*/ &list->buf[donebytes], /*data_len*/ roundbytes, @@ -1289,10 +1261,6 @@ complete: tiow->list = list; TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); - if (tiow->io == NULL) { - list->error = 1; - goto complete; - } ctl_scsi_write_same(tiow->io, /*data_ptr*/ list->buf, /*data_len*/ dstblock, Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Mon Nov 24 11:16:52 2014 (r274961) +++ head/sys/cam/ctl/scsi_ctl.c Mon Nov 24 11:37:27 2014 (r274962) @@ -72,10 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include -typedef enum { - CTLFE_CCB_DEFAULT = 0x00 -} ctlfe_ccb_types; - struct ctlfe_softc { struct ctl_port port; path_id_t path_id; @@ -189,9 +185,7 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, dma_ &ctlfe_dma_enabled, 0, "DMA enabled"); MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CAM CTL FE interface"); -#define ccb_type ppriv_field0 -/* This is only used in the ATIO */ -#define io_ptr ppriv_ptr1 +#define io_ptr ppriv_ptr0 /* This is only used in the CTIO */ #define ccb_atio ppriv_ptr1 @@ -546,6 +540,7 @@ ctlferegister(struct cam_periph *periph, for (i = 0; i < CTLFE_ATIO_PER_LUN; i++) { union ccb *new_ccb; + union ctl_io *new_io; new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE, M_ZERO|M_NOWAIT); @@ -553,6 +548,14 @@ ctlferegister(struct cam_periph *periph, status = CAM_RESRC_UNAVAIL; break; } + new_io = ctl_alloc_io_nowait(bus_softc->port.ctl_pool_ref); + if (new_io == NULL) { + free(new_ccb, M_CTLFE); + status = CAM_RESRC_UNAVAIL; + break; + } + new_ccb->ccb_h.io_ptr = new_io; + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); new_ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; new_ccb->ccb_h.cbfcnp = ctlfedone; @@ -561,6 +564,7 @@ ctlferegister(struct cam_periph *periph, softc->atios_sent++; status = new_ccb->ccb_h.status; if ((status & CAM_STATUS_MASK) != CAM_REQ_INPROG) { + ctl_free_io(new_io); free(new_ccb, M_CTLFE); break; } @@ -581,6 +585,7 @@ ctlferegister(struct cam_periph *periph, for (i = 0; i < CTLFE_IN_PER_LUN; i++) { union ccb *new_ccb; + union ctl_io *new_io; new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE, M_ZERO|M_NOWAIT); @@ -588,6 +593,13 @@ ctlferegister(struct cam_periph *periph, status = CAM_RESRC_UNAVAIL; break; } + new_io = ctl_alloc_io_nowait(bus_softc->port.ctl_pool_ref); + if (new_io == NULL) { + free(new_ccb, M_CTLFE); + status = CAM_RESRC_UNAVAIL; + break; + } + new_ccb->ccb_h.io_ptr = new_io; xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); new_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; @@ -766,8 +778,6 @@ ctlfestart(struct cam_periph *periph, un softc->ccbs_alloced++; - start_ccb->ccb_h.ccb_type = CTLFE_CCB_DEFAULT; - ccb_h = TAILQ_FIRST(&softc->work_queue); if (ccb_h == NULL) { softc->ccbs_freed++; @@ -812,7 +822,6 @@ ctlfestart(struct cam_periph *periph, un xpt_print(periph->path, "%s: aborted " "command 0x%04x discarded\n", __func__, io->scsiio.tag_num); - ctl_free_io(io); /* * For a wildcard attachment, commands can * come in with a specific target/lun. Reset @@ -1038,6 +1047,7 @@ ctlfe_free_ccb(struct cam_periph *periph break; } + ctl_free_io(ccb->ccb_h.io_ptr); free(ccb, M_CTLFE); KASSERT(softc->atios_returned <= softc->atios_sent, ("%s: " @@ -1139,8 +1149,8 @@ ctlfedone(struct cam_periph *periph, uni KASSERT((done_ccb->ccb_h.flags & CAM_UNLOCKED) != 0, ("CCB in ctlfedone() without CAM_UNLOCKED flag")); #ifdef CTLFE_DEBUG - printf("%s: entered, func_code = %#x, type = %#lx\n", __func__, - done_ccb->ccb_h.func_code, done_ccb->ccb_h.ccb_type); + printf("%s: entered, func_code = %#x\n", __func__, + done_ccb->ccb_h.func_code); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 11:39:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 037DC33A; Mon, 24 Nov 2014 11:39:19 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E41764; Mon, 24 Nov 2014 11:39:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XsrSb-000BDt-9L; Mon, 24 Nov 2014 11:05:37 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 24 Nov 2014 11:05:37 +0000 (GMT) Date: Mon, 24 Nov 2014 11:05:37 +0000 From: Ruslan Bukin To: Gleb Smirnoff Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141124110537.GA41282@bsdpad.com> References: <201411231201.sANC1rW1025589@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201411231201.sANC1rW1025589@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 11:39:19 -0000 Hi, Gleb, I get some problems with it: I'm working on block device emulation using virtio(4) in heterogeneous environment (FreeBSD/ARM frontend provide block to FreeBSD/MIPS64 soft core). On a MIPS side I now permanently receive panic below Any idea ? [...] crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0 Device configuration finished. Timecounters tick every 5.000 msec crypto: tcp_init: net.inet.tcp.tcbhashsize auto tuned to 4096 random: unblocking device. GEOM: new disk vtbd0 MAP: No valid partition found at vtbd0 Trying to mount root from ufs:vtbd0 []... WARNING: / was not properly dismounted warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init mtlctl: open mtl_reg0: No such file or directory Entropy harvesting:sysctl: unknown oid 'kern.ranndom.sys.harvest.interrupt': No such file or directory interruptssysctl: unknown oid 'kern.random.sys.harvest.ethernet': No such file or directory ethernetpanic: Bad link elm 0x980000000f9a0090 next->prev != elm KDB: enter: panic [ thread pid 31 tid 100028 ] Stopped at kdb_enter+0x8c: lui at,0x0 db> On Sun, Nov 23, 2014 at 12:01:53PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Sun Nov 23 12:01:52 2014 > New Revision: 274914 > URL: https://svnweb.freebsd.org/changeset/base/274914 > > Log: > Merge from projects/sendfile: > > o Provide a new VOP_GETPAGES_ASYNC(), which works like VOP_GETPAGES(), but > doesn't sleep. It returns immediately, and will execute the I/O done handler > function that must be supplied as argument. > o Provide VOP_GETPAGES_ASYNC() for the FFS, which uses vnode_pager. > o Extend pagertab to support pgo_getpages_async method, and implement this > method for vnode_pager. > > Reviewed by: kib > Tested by: pho > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > > Modified: > head/sys/kern/vfs_default.c > head/sys/kern/vnode_if.src > head/sys/sys/buf.h > head/sys/sys/vnode.h > head/sys/ufs/ffs/ffs_vnops.c > head/sys/vm/swap_pager.c > head/sys/vm/vm_pager.h > head/sys/vm/vnode_pager.c > head/sys/vm/vnode_pager.h > > Modified: head/sys/kern/vfs_default.c > ============================================================================== > --- head/sys/kern/vfs_default.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/kern/vfs_default.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -83,6 +83,7 @@ static int vop_stdset_text(struct vop_se > static int vop_stdunset_text(struct vop_unset_text_args *ap); > static int vop_stdget_writecount(struct vop_get_writecount_args *ap); > static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); > +static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); > > /* > * This vnode table stores what we want to do if the filesystem doesn't > @@ -111,6 +112,7 @@ struct vop_vector default_vnodeops = { > .vop_close = VOP_NULL, > .vop_fsync = VOP_NULL, > .vop_getpages = vop_stdgetpages, > + .vop_getpages_async = vop_stdgetpages_async, > .vop_getwritemount = vop_stdgetwritemount, > .vop_inactive = VOP_NULL, > .vop_ioctl = VOP_ENOTTY, > @@ -725,7 +727,17 @@ vop_stdgetpages(ap) > { > > return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, > - ap->a_count, ap->a_reqpage); > + ap->a_count, ap->a_reqpage, NULL, NULL); > +} > + > +static int > +vop_stdgetpages_async(struct vop_getpages_async_args *ap) > +{ > + int error; > + > + error = VOP_GETPAGES(ap->a_vp, ap->a_m, ap->a_count, ap->a_reqpage); > + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_reqpage, error); > + return (error); > } > > int > > Modified: head/sys/kern/vnode_if.src > ============================================================================== > --- head/sys/kern/vnode_if.src Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/kern/vnode_if.src Sun Nov 23 12:01:52 2014 (r274914) > @@ -476,6 +476,19 @@ vop_getpages { > }; > > > +%% getpages_async vp L L L > + > +vop_getpages_async { > + IN struct vnode *vp; > + IN vm_page_t *m; > + IN int count; > + IN int reqpage; > + IN vm_ooffset_t offset; > + IN vop_getpages_iodone_t *iodone; > + IN void *arg; > +}; > + > + > %% putpages vp L L L > > vop_putpages { > > Modified: head/sys/sys/buf.h > ============================================================================== > --- head/sys/sys/buf.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/sys/buf.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -107,7 +107,6 @@ struct buf { > off_t b_offset; /* Offset into file. */ > TAILQ_ENTRY(buf) b_bobufs; /* (V) Buffer's associated vnode. */ > uint32_t b_vflags; /* (V) BV_* flags */ > - TAILQ_ENTRY(buf) b_freelist; /* (Q) Free list position inactive. */ > unsigned short b_qindex; /* (Q) buffer queue index */ > uint32_t b_flags; /* B_* flags. */ > b_xflags_t b_xflags; /* extra flags */ > @@ -124,9 +123,15 @@ struct buf { > struct ucred *b_rcred; /* Read credentials reference. */ > struct ucred *b_wcred; /* Write credentials reference. */ > void *b_saveaddr; /* Original b_addr for physio. */ > - union pager_info { > - int pg_reqpage; > - } b_pager; > + union { > + TAILQ_ENTRY(buf) bu_freelist; /* (Q) */ > + struct { > + void (*pg_iodone)(void *, vm_page_t *, int, int); > + int pg_reqpage; > + } bu_pager; > + } b_union; > +#define b_freelist b_union.bu_freelist > +#define b_pager b_union.bu_pager > union cluster_info { > TAILQ_HEAD(cluster_list_head, buf) cluster_head; > TAILQ_ENTRY(buf) cluster_entry; > > Modified: head/sys/sys/vnode.h > ============================================================================== > --- head/sys/sys/vnode.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/sys/vnode.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -574,6 +574,7 @@ vn_canvmio(struct vnode *vp) > /* > * Finally, include the default set of vnode operations. > */ > +typedef void vop_getpages_iodone_t(void *, vm_page_t *, int, int); > #include "vnode_if.h" > > /* vn_open_flags */ > > Modified: head/sys/ufs/ffs/ffs_vnops.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_vnops.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/ufs/ffs/ffs_vnops.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -124,6 +124,7 @@ struct vop_vector ffs_vnodeops1 = { > .vop_default = &ufs_vnodeops, > .vop_fsync = ffs_fsync, > .vop_getpages = vnode_pager_local_getpages, > + .vop_getpages_async = vnode_pager_local_getpages_async, > .vop_lock1 = ffs_lock, > .vop_read = ffs_read, > .vop_reallocblks = ffs_reallocblks, > @@ -143,6 +144,7 @@ struct vop_vector ffs_vnodeops2 = { > .vop_default = &ufs_vnodeops, > .vop_fsync = ffs_fsync, > .vop_getpages = vnode_pager_local_getpages, > + .vop_getpages_async = vnode_pager_local_getpages_async, > .vop_lock1 = ffs_lock, > .vop_read = ffs_read, > .vop_reallocblks = ffs_reallocblks, > > Modified: head/sys/vm/swap_pager.c > ============================================================================== > --- head/sys/vm/swap_pager.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/swap_pager.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -361,6 +361,8 @@ static vm_object_t > vm_prot_t prot, vm_ooffset_t offset, struct ucred *); > static void swap_pager_dealloc(vm_object_t object); > static int swap_pager_getpages(vm_object_t, vm_page_t *, int, int); > +static int swap_pager_getpages_async(vm_object_t, vm_page_t *, int, int, > + pgo_getpages_iodone_t, void *); > static void swap_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *); > static boolean_t > swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, int *after); > @@ -373,6 +375,7 @@ struct pagerops swappagerops = { > .pgo_alloc = swap_pager_alloc, /* allocate an OBJT_SWAP object */ > .pgo_dealloc = swap_pager_dealloc, /* deallocate an OBJT_SWAP object */ > .pgo_getpages = swap_pager_getpages, /* pagein */ > + .pgo_getpages_async = swap_pager_getpages_async, /* pagein (async) */ > .pgo_putpages = swap_pager_putpages, /* pageout */ > .pgo_haspage = swap_pager_haspage, /* get backing store status for page */ > .pgo_pageunswapped = swap_pager_unswapped, /* remove swap related to page */ > @@ -1257,6 +1260,39 @@ swap_pager_getpages(vm_object_t object, > } > > /* > + * swap_pager_getpages_async(): > + * > + * Right now this is emulation of asynchronous operation on top of > + * swap_pager_getpages(). > + */ > +static int > +swap_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, > + int reqpage, pgo_getpages_iodone_t iodone, void *arg) > +{ > + int r, error; > + > + r = swap_pager_getpages(object, m, count, reqpage); > + VM_OBJECT_WUNLOCK(object); > + switch (r) { > + case VM_PAGER_OK: > + error = 0; > + break; > + case VM_PAGER_ERROR: > + error = EIO; > + break; > + case VM_PAGER_FAIL: > + error = EINVAL; > + break; > + default: > + panic("unhandled swap_pager_getpages() error %d\n", r); > + } > + (iodone)(arg, m, count, error); > + VM_OBJECT_WLOCK(object); > + > + return (r); > +} > + > +/* > * swap_pager_putpages: > * > * Assign swap (if necessary) and initiate I/O on the specified pages. > > Modified: head/sys/vm/vm_pager.h > ============================================================================== > --- head/sys/vm/vm_pager.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/vm_pager.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -51,6 +51,9 @@ typedef vm_object_t pgo_alloc_t(void *, > struct ucred *); > typedef void pgo_dealloc_t(vm_object_t); > typedef int pgo_getpages_t(vm_object_t, vm_page_t *, int, int); > +typedef void pgo_getpages_iodone_t(void *, vm_page_t *, int, int); > +typedef int pgo_getpages_async_t(vm_object_t, vm_page_t *, int, int, > + pgo_getpages_iodone_t, void *); > typedef void pgo_putpages_t(vm_object_t, vm_page_t *, int, int, int *); > typedef boolean_t pgo_haspage_t(vm_object_t, vm_pindex_t, int *, int *); > typedef void pgo_pageunswapped_t(vm_page_t); > @@ -60,6 +63,7 @@ struct pagerops { > pgo_alloc_t *pgo_alloc; /* Allocate pager. */ > pgo_dealloc_t *pgo_dealloc; /* Disassociate. */ > pgo_getpages_t *pgo_getpages; /* Get (read) page. */ > + pgo_getpages_async_t *pgo_getpages_async; /* Get page asyncly. */ > pgo_putpages_t *pgo_putpages; /* Put (write) page. */ > pgo_haspage_t *pgo_haspage; /* Query page. */ > pgo_pageunswapped_t *pgo_pageunswapped; > @@ -103,6 +107,8 @@ vm_object_t vm_pager_allocate(objtype_t, > void vm_pager_bufferinit(void); > void vm_pager_deallocate(vm_object_t); > static __inline int vm_pager_get_pages(vm_object_t, vm_page_t *, int, int); > +static inline int vm_pager_get_pages_async(vm_object_t, vm_page_t *, int, > + int, pgo_getpages_iodone_t, void *); > static __inline boolean_t vm_pager_has_page(vm_object_t, vm_pindex_t, int *, int *); > void vm_pager_init(void); > vm_object_t vm_pager_object_lookup(struct pagerlst *, void *); > @@ -133,6 +139,16 @@ vm_pager_get_pages( > return (r); > } > > +static inline int > +vm_pager_get_pages_async(vm_object_t object, vm_page_t *m, int count, > + int reqpage, pgo_getpages_iodone_t iodone, void *arg) > +{ > + > + VM_OBJECT_ASSERT_WLOCKED(object); > + return ((*pagertab[object->type]->pgo_getpages_async)(object, m, > + count, reqpage, iodone, arg)); > +} > + > static __inline void > vm_pager_put_pages( > vm_object_t object, > > Modified: head/sys/vm/vnode_pager.c > ============================================================================== > --- head/sys/vm/vnode_pager.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/vnode_pager.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -82,16 +82,23 @@ static int vnode_pager_addr(struct vnode > static int vnode_pager_input_smlfs(vm_object_t object, vm_page_t m); > static int vnode_pager_input_old(vm_object_t object, vm_page_t m); > static void vnode_pager_dealloc(vm_object_t); > +static int vnode_pager_local_getpages0(struct vnode *, vm_page_t *, int, int, > + vop_getpages_iodone_t, void *); > static int vnode_pager_getpages(vm_object_t, vm_page_t *, int, int); > +static int vnode_pager_getpages_async(vm_object_t, vm_page_t *, int, int, > + vop_getpages_iodone_t, void *); > static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, int, int *); > static boolean_t vnode_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); > static vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t, > vm_ooffset_t, struct ucred *cred); > +static int vnode_pager_generic_getpages_done(struct buf *); > +static void vnode_pager_generic_getpages_done_async(struct buf *); > > struct pagerops vnodepagerops = { > .pgo_alloc = vnode_pager_alloc, > .pgo_dealloc = vnode_pager_dealloc, > .pgo_getpages = vnode_pager_getpages, > + .pgo_getpages_async = vnode_pager_getpages_async, > .pgo_putpages = vnode_pager_putpages, > .pgo_haspage = vnode_pager_haspage, > }; > @@ -664,16 +671,51 @@ vnode_pager_getpages(vm_object_t object, > return rtval; > } > > +static int > +vnode_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, > + int reqpage, vop_getpages_iodone_t iodone, void *arg) > +{ > + struct vnode *vp; > + int rtval; > + > + vp = object->handle; > + VM_OBJECT_WUNLOCK(object); > + rtval = VOP_GETPAGES_ASYNC(vp, m, count * PAGE_SIZE, reqpage, 0, > + iodone, arg); > + KASSERT(rtval != EOPNOTSUPP, > + ("vnode_pager: FS getpages_async not implemented\n")); > + VM_OBJECT_WLOCK(object); > + return (rtval); > +} > + > /* > - * The implementation of VOP_GETPAGES() for local filesystems, where > - * partially valid pages can only occur at the end of file. > + * The implementation of VOP_GETPAGES() and VOP_GETPAGES_ASYNC() for > + * local filesystems, where partially valid pages can only occur at > + * the end of file. > */ > int > vnode_pager_local_getpages(struct vop_getpages_args *ap) > { > + > + return (vnode_pager_local_getpages0(ap->a_vp, ap->a_m, ap->a_count, > + ap->a_reqpage, NULL, NULL)); > +} > + > +int > +vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap) > +{ > + > + return (vnode_pager_local_getpages0(ap->a_vp, ap->a_m, ap->a_count, > + ap->a_reqpage, ap->a_iodone, ap->a_arg)); > +} > + > +static int > +vnode_pager_local_getpages0(struct vnode *vp, vm_page_t *m, int bytecount, > + int reqpage, vop_getpages_iodone_t iodone, void *arg) > +{ > vm_page_t mreq; > > - mreq = ap->a_m[ap->a_reqpage]; > + mreq = m[reqpage]; > > /* > * Since the caller has busied the requested page, that page's valid > @@ -688,13 +730,15 @@ vnode_pager_local_getpages(struct vop_ge > * pages, since no i/o is done to read its content. > */ > if (mreq->valid != 0) { > - vm_pager_free_nonreq(mreq->object, ap->a_m, ap->a_reqpage, > - round_page(ap->a_count) / PAGE_SIZE); > + vm_pager_free_nonreq(mreq->object, m, reqpage, > + round_page(bytecount) / PAGE_SIZE); > + if (iodone != NULL) > + iodone(arg, m, reqpage, 0); > return (VM_PAGER_OK); > } > > - return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, > - ap->a_count, ap->a_reqpage)); > + return (vnode_pager_generic_getpages(vp, m, bytecount, reqpage, > + iodone, arg)); > } > > /* > @@ -703,11 +747,10 @@ vnode_pager_local_getpages(struct vop_ge > */ > int > vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount, > - int reqpage) > + int reqpage, vop_getpages_iodone_t iodone, void *arg) > { > vm_object_t object; > - vm_offset_t kva; > - off_t foff, tfoff, nextoff; > + off_t foff; > int i, j, size, bsize, first; > daddr_t firstaddr, reqblock; > struct bufobj *bo; > @@ -899,7 +942,7 @@ vnode_pager_generic_getpages(struct vnod > } > > bp = getpbuf(&vnode_pbuf_freecnt); > - kva = (vm_offset_t)bp->b_data; > + bp->b_kvaalloc = bp->b_data; > > /* > * and map the pages to be read into the kva, if the filesystem > @@ -911,15 +954,11 @@ vnode_pager_generic_getpages(struct vnod > bp->b_kvabase = unmapped_buf; > bp->b_offset = 0; > bp->b_flags |= B_UNMAPPED; > - bp->b_npages = count; > - for (i = 0; i < count; i++) > - bp->b_pages[i] = m[i]; > } else > - pmap_qenter(kva, m, count); > + pmap_qenter((vm_offset_t)bp->b_kvaalloc, m, count); > > /* build a minimal buffer header */ > bp->b_iocmd = BIO_READ; > - bp->b_iodone = bdone; > KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred")); > KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred")); > bp->b_rcred = crhold(curthread->td_ucred); > @@ -930,6 +969,10 @@ vnode_pager_generic_getpages(struct vnod > bp->b_bcount = size; > bp->b_bufsize = size; > bp->b_runningbufspace = bp->b_bufsize; > + for (i = 0; i < count; i++) > + bp->b_pages[i] = m[i]; > + bp->b_npages = count; > + bp->b_pager.pg_reqpage = reqpage; > atomic_add_long(&runningbufspace, bp->b_runningbufspace); > > PCPU_INC(cnt.v_vnodein); > @@ -937,43 +980,79 @@ vnode_pager_generic_getpages(struct vnod > > /* do the input */ > bp->b_iooffset = dbtob(bp->b_blkno); > - bstrategy(bp); > > - bwait(bp, PVM, "vnread"); > + if (iodone != NULL) { /* async */ > + bp->b_pager.pg_iodone = iodone; > + bp->b_caller1 = arg; > + bp->b_iodone = vnode_pager_generic_getpages_done_async; > + bp->b_flags |= B_ASYNC; > + BUF_KERNPROC(bp); > + bstrategy(bp); > + /* Good bye! */ > + } else { > + bp->b_iodone = bdone; > + bstrategy(bp); > + bwait(bp, PVM, "vnread"); > + error = vnode_pager_generic_getpages_done(bp); > + for (int i = 0; i < bp->b_npages; i++) > + bp->b_pages[i] = NULL; > + bp->b_vp = NULL; > + pbrelbo(bp); > + relpbuf(bp, &vnode_pbuf_freecnt); > + } > + > + return (error != 0 ? VM_PAGER_ERROR : VM_PAGER_OK); > +} > + > +static void > +vnode_pager_generic_getpages_done_async(struct buf *bp) > +{ > + int error; > + > + error = vnode_pager_generic_getpages_done(bp); > + bp->b_pager.pg_iodone(bp->b_caller1, bp->b_pages, > + bp->b_pager.pg_reqpage, error); > + for (int i = 0; i < bp->b_npages; i++) > + bp->b_pages[i] = NULL; > + bp->b_vp = NULL; > + pbrelbo(bp); > + relpbuf(bp, &vnode_pbuf_freecnt); > +} > + > +static int > +vnode_pager_generic_getpages_done(struct buf *bp) > +{ > + vm_object_t object; > + off_t tfoff, nextoff; > + int i, error; > > - if ((bp->b_ioflags & BIO_ERROR) != 0) > - error = EIO; > + error = (bp->b_ioflags & BIO_ERROR) != 0 ? EIO : 0; > + object = bp->b_vp->v_object; > > - if (error == 0 && size != count * PAGE_SIZE) { > + if (error == 0 && bp->b_bcount != bp->b_npages * PAGE_SIZE) { > if ((bp->b_flags & B_UNMAPPED) != 0) { > bp->b_flags &= ~B_UNMAPPED; > - pmap_qenter(kva, m, count); > + pmap_qenter((vm_offset_t)bp->b_kvaalloc, bp->b_pages, > + bp->b_npages); > } > - bzero((caddr_t)kva + size, PAGE_SIZE * count - size); > + bzero(bp->b_kvaalloc + bp->b_bcount, > + PAGE_SIZE * bp->b_npages - bp->b_bcount); > } > if ((bp->b_flags & B_UNMAPPED) == 0) > - pmap_qremove(kva, count); > - if ((vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) { > - bp->b_data = (caddr_t)kva; > - bp->b_kvabase = (caddr_t)kva; > + pmap_qremove((vm_offset_t)bp->b_kvaalloc, bp->b_npages); > + if ((bp->b_vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) { > + bp->b_data = bp->b_kvaalloc; > + bp->b_kvabase = bp->b_kvaalloc; > bp->b_flags &= ~B_UNMAPPED; > - for (i = 0; i < count; i++) > - bp->b_pages[i] = NULL; > } > > - /* > - * free the buffer header back to the swap buffer pool > - */ > - bp->b_vp = NULL; > - pbrelbo(bp); > - relpbuf(bp, &vnode_pbuf_freecnt); > - > VM_OBJECT_WLOCK(object); > - for (i = 0, tfoff = foff; i < count; i++, tfoff = nextoff) { > + for (i = 0, tfoff = IDX_TO_OFF(bp->b_pages[0]->pindex); > + i < bp->b_npages; i++, tfoff = nextoff) { > vm_page_t mt; > > nextoff = tfoff + PAGE_SIZE; > - mt = m[i]; > + mt = bp->b_pages[i]; > > if (nextoff <= object->un_pager.vnp.vnp_size) { > /* > @@ -999,14 +1078,14 @@ vnode_pager_generic_getpages(struct vnod > ("%s: page %p is dirty", __func__, mt)); > } > > - if (i != reqpage) > + if (i != bp->b_pager.pg_reqpage) > vm_page_readahead_finish(mt); > } > VM_OBJECT_WUNLOCK(object); > - if (error) { > - printf("vnode_pager_getpages: I/O read error\n"); > - } > - return (error ? VM_PAGER_ERROR : VM_PAGER_OK); > + if (error != 0) > + printf("%s: I/O read error %d\n", __func__, error); > + > + return (error); > } > > /* > > Modified: head/sys/vm/vnode_pager.h > ============================================================================== > --- head/sys/vm/vnode_pager.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/vnode_pager.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -41,11 +41,12 @@ > #ifdef _KERNEL > > int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, > - int count, int reqpage); > + int count, int reqpage, vop_getpages_iodone_t iodone, void *arg); > int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, > int count, boolean_t sync, > int *rtvals); > int vnode_pager_local_getpages(struct vop_getpages_args *ap); > +int vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap); > > void vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, > vm_offset_t end); > From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 12:53:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 964E32EF; Mon, 24 Nov 2014 12:53:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83AC5F92; Mon, 24 Nov 2014 12:53:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOCrvkZ034137; Mon, 24 Nov 2014 12:53:57 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOCrvK6034136; Mon, 24 Nov 2014 12:53:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201411241253.sAOCrvK6034136@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 24 Nov 2014 12:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274964 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 12:53:57 -0000 Author: ae Date: Mon Nov 24 12:53:56 2014 New Revision: 274964 URL: https://svnweb.freebsd.org/changeset/base/274964 Log: Add ip_gre.h to ObsoleteFiles.inc. Sponsored by: Yandex LLC Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Nov 24 12:39:50 2014 (r274963) +++ head/ObsoleteFiles.inc Mon Nov 24 12:53:56 2014 (r274964) @@ -44,6 +44,8 @@ OLD_FILES+=usr/share/man/man4/faith.4.gz OLD_FILES+=usr/share/man/man4/if_faith.4.gz OLD_FILES+=usr/sbin/faithd OLD_FILES+=usr/share/man/man8/faithd.8.gz +# 20141107: overhaul if_gre(4) +OLD_FILES+=usr/include/netinet/ip_gre.h # 20141102: postrandom obsoleted by new /dev/random code OLD_FILES+=etc/rc.d/postrandom # 20141031: initrandom obsoleted by new /dev/random code From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 13:02:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C5924A4; Mon, 24 Nov 2014 13:02:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69848BC; Mon, 24 Nov 2014 13:02:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOD2eaJ038734; Mon, 24 Nov 2014 13:02:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOD2eRp038732; Mon, 24 Nov 2014 13:02:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201411241302.sAOD2eRp038732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Nov 2014 13:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274965 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 13:02:40 -0000 Author: trasz Date: Mon Nov 24 13:02:39 2014 New Revision: 274965 URL: https://svnweb.freebsd.org/changeset/base/274965 Log: Make it possible to specify flags for autofs daemons in rc.conf. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/defaults/rc.conf head/etc/rc.d/automount Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Nov 24 12:53:56 2014 (r274964) +++ head/etc/defaults/rc.conf Mon Nov 24 13:02:39 2014 (r274965) @@ -317,7 +317,10 @@ amd_enable="NO" # Run amd service with amd_program="/usr/sbin/amd" # path to amd, if you want a different one. amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" amd_map_program="NO" # Can be set to "ypcat -k amd.master" -autofs_enable="NO" # Run automountd(8) +autofs_enable="NO" # Run autofs daemons. +automount_flags="" # Flags to automount(8) (if autofs enabled). +automountd_flags="" # Flags to automountd(8) (if autofs enabled). +autounmountd_flags="" # Flags to autounmountd(8) (if autofs enabled). nfs_client_enable="NO" # This host is an NFS client (or NO). nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). Modified: head/etc/rc.d/automount ============================================================================== --- head/etc/rc.d/automount Mon Nov 24 12:53:56 2014 (r274964) +++ head/etc/rc.d/automount Mon Nov 24 13:02:39 2014 (r274965) @@ -18,7 +18,7 @@ required_modules="autofs" automount_start() { - /usr/sbin/automount + /usr/sbin/automount ${automount_flags} } automount_stop() From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 14:00:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 906B7224; Mon, 24 Nov 2014 14:00:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7DF93E; Mon, 24 Nov 2014 14:00:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOE0S3x063101; Mon, 24 Nov 2014 14:00:28 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOE0Srq063100; Mon, 24 Nov 2014 14:00:28 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201411241400.sAOE0Srq063100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 24 Nov 2014 14:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274966 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 14:00:28 -0000 Author: philip Date: Mon Nov 24 14:00:27 2014 New Revision: 274966 URL: https://svnweb.freebsd.org/changeset/base/274966 Log: Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap should delete configured addresses and routes when the interface is closed. Default is enabled (preserve current behaviour). MFC after: 1 week Modified: head/sys/net/if_tap.c Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Mon Nov 24 13:02:39 2014 (r274965) +++ head/sys/net/if_tap.c Mon Nov 24 14:00:27 2014 (r274966) @@ -156,6 +156,7 @@ static int tapdebug = 0; /* deb static int tapuopen = 0; /* allow user open() */ static int tapuponopen = 0; /* IFF_UP on open() */ static int tapdclone = 1; /* enable devfs cloning */ +static int tapclosedeladdrs = 1; /* del addrs on close */ static SLIST_HEAD(, tap_softc) taphead; /* first device */ static struct clonedevs *tapclones; @@ -172,6 +173,9 @@ SYSCTL_INT(_net_link_tap, OID_AUTO, up_o "Bring interface up when /dev/tap is opened"); SYSCTL_INT(_net_link_tap, OID_AUTO, devfs_cloning, CTLFLAG_RWTUN, &tapdclone, 0, "Enably legacy devfs interface creation"); +SYSCTL_INT(_net_link_tap, OID_AUTO, deladdrs_on_close, CTLFLAG_RW, + &tapclosedeladdrs, 0, "Delete addresses and routes when /dev/tap is " + "closed"); SYSCTL_INT(_net_link_tap, OID_AUTO, debug, CTLFLAG_RW, &tapdebug, 0, ""); DEV_MODULE(if_tap, tapmodevent, NULL); @@ -536,7 +540,8 @@ tapclose(struct cdev *dev, int foo, int * interface, if we are in VMnet mode. just close the device. */ - if (((tp->tap_flags & TAP_VMNET) == 0) && (ifp->if_flags & IFF_UP)) { + if (tapclosedeladdrs == 1 && ((tp->tap_flags & TAP_VMNET) == 0) && + (ifp->if_flags & IFF_UP)) { mtx_unlock(&tp->tap_mtx); if_down(ifp); mtx_lock(&tp->tap_mtx); From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 15:34:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D242232; Mon, 24 Nov 2014 15:34:14 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A453A0; Mon, 24 Nov 2014 15:34:13 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XsveJ-0001sB-OR; Mon, 24 Nov 2014 16:34:10 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "Baptiste Daroussin" Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <20141124072316.GA27782@ymer.vnode.se> <20141124093813.GL68776@ivaldir.etoilebsd.net> Date: Mon, 24 Nov 2014 16:33:58 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <20141124093813.GL68776@ivaldir.etoilebsd.net> User-Agent: Opera Mail/12.17 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.1 X-Scan-Signature: b5e1a7a6a0a97f953de832680fded840 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 15:34:14 -0000 On Mon, 24 Nov 2014 10:38:14 +0100, Baptiste Daroussin wrote: > On Mon, Nov 24, 2014 at 10:19:08AM +0100, Ronald Klop wrote: >> On Mon, 24 Nov 2014 08:23:17 +0100, Joel Dahl wrote: >> >> > On Sun, Nov 23, 2014 at 10:04:12PM +0100, Baptiste Daroussin wrote: >> >> On Sun, Nov 23, 2014 at 09:00:00PM +0000, Joel Dahl wrote: >> >> > Author: joel (doc committer) >> >> > Date: Sun Nov 23 21:00:00 2014 >> >> > New Revision: 274925 >> >> > URL: https://svnweb.freebsd.org/changeset/base/274925 >> >> > >> >> > Log: >> >> > Misc mdoc fixes: >> >> > >> >> > - Remove superfluous paragraph macros. >> >> > - Remove/fix empty or incorrect macros. >> >> > - Sort sections into conventional order. >> >> > - Terminate quoted strings properly. >> >> > - Remove EOL whitespace. >> >> > >> >> > Modified: >> >> > head/lib/libc/sys/poll.2 >> >> > head/lib/libdpv/dpv.3 >> >> > head/sbin/ipfw/ipfw.8 >> >> > head/share/man/man4/gre.4 >> >> > head/share/man/man4/man4.arm/cgem.4 >> >> > head/share/man/man4/me.4 >> >> > head/share/man/man4/netmap.4 >> >> > head/share/man/man9/get_cyclecount.9 >> >> > head/share/man/man9/malloc.9 >> >> > head/share/man/man9/sleepqueue.9 >> >> > head/sys/boot/common/zfsloader.8 >> >> > head/sys/boot/i386/gptzfsboot/gptzfsboot.8 >> >> > head/usr.bin/dpv/dpv.1 >> >> > >> >> >> >> [...] >> >> >> >> > +.Sh AUTHORS >> >> > +This manual page was written by >> >> > +.An Andriy Gapon Aq avg@FreeBSD.org . >> >> ^ There should be a Mt here to properly render >> >> in html >> >> >> >> I just picked one in the middle of this commit. In general every mail >> >> on any >> >> manpage Mt should be used. >> > >> > Sure. Feel free to go over our manpages and fix them. It's a minor >> issue. >> > >> > And while we're on the subject, there's a bit of background to this >> > commit. >> > Back in 2012 I started fixing mandoc lint errors/warnings in our >> manpage >> > collection (excluding stuff from contrib/ and gnu/ etc.). I think I >> got >> > them >> > down from around ~4000 issues to almost zero. Quite a few manpages >> didn't >> > even work with mandoc at the time, due to how many syntactical mdoc >> > errors >> > they had. The situation is still good, but I re-ran my scripts >> yesterday >> > and >> > found a slew of new warnings. I fixed a few obvious ones, but if >> someone >> > with >> > more time on his hands wants to help, please go ahead. A good starting >> > point >> > would probably the netmap.4 or ctl.conf.5 manpages, they seem to >> generate >> > quite a few warnings. >> > >> > I'd also be grateful if everyone ran mandoc -Tlint on their manpages >> > before >> > committing. :-) >> > >> >> A commit hook does magic for these kind of things. ;-) > > Except that such commit hook will prevent updating openssl and/or > kerberos :) > > Regards, > Bapt Yes, at work people can commit does things by adding a line in the commit message. Like 'Allowed by: vendor code commit'. Otherwise major style errors just prevent the commit. It helps raising the awareness of what they are doing. Ronald. From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 16:12:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68775DEB; Mon, 24 Nov 2014 16:12:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C5C7A2B; Mon, 24 Nov 2014 16:12:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOGCCdZ028078; Mon, 24 Nov 2014 16:12:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOGCC4L028077; Mon, 24 Nov 2014 16:12:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411241612.sAOGCC4L028077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 24 Nov 2014 16:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274967 - head/sys/dev/ffec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 16:12:12 -0000 Author: ian Date: Mon Nov 24 16:12:11 2014 New Revision: 274967 URL: https://svnweb.freebsd.org/changeset/base/274967 Log: Add busdma sync ops before reading and after modifying the descriptor rings. This was previously working by accident because BUSDMA_COHERENT_MEMORY has always been set to strongly-ordered on arm. Now we're moving towards normal-uncacheable (what might be called write-combining on other platforms) and using the proper sync ops will be more important. Of course, that opens the question of just what is the "proper" sync op for shared concurrent dma access as opposed to accesses where the handoff of control of the memory has well-defined sequence points that match the available busdma sync operations. Modified: head/sys/dev/ffec/if_ffec.c Modified: head/sys/dev/ffec/if_ffec.c ============================================================================== --- head/sys/dev/ffec/if_ffec.c Mon Nov 24 14:00:27 2014 (r274966) +++ head/sys/dev/ffec/if_ffec.c Mon Nov 24 16:12:11 2014 (r274967) @@ -652,7 +652,9 @@ ffec_txstart_locked(struct ffec_softc *s } if (enqueued != 0) { + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREWRITE); WR4(sc, FEC_TDAR_REG, FEC_TDAR_TDAR); + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTWRITE); sc->tx_watchdog_count = WATCHDOG_TIMEOUT_SECS; } } @@ -677,6 +679,9 @@ ffec_txfinish_locked(struct ffec_softc * FFEC_ASSERT_LOCKED(sc); + /* XXX Can't set PRE|POST right now, but we need both. */ + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTREAD); ifp = sc->ifp; retired_buffer = false; while (sc->tx_idx_tail != sc->tx_idx_head) { @@ -841,6 +846,9 @@ ffec_rxfinish_locked(struct ffec_softc * FFEC_ASSERT_LOCKED(sc); + /* XXX Can't set PRE|POST right now, but we need both. */ + bus_dmamap_sync(sc->rxdesc_tag, sc->rxdesc_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->rxdesc_tag, sc->rxdesc_map, BUS_DMASYNC_POSTREAD); produced_empty_buffer = false; for (;;) { desc = &sc->rxdesc_ring[sc->rx_idx]; @@ -888,7 +896,9 @@ ffec_rxfinish_locked(struct ffec_softc * } if (produced_empty_buffer) { + bus_dmamap_sync(sc->rxdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREWRITE); WR4(sc, FEC_RDAR_REG, FEC_RDAR_RDAR); + bus_dmamap_sync(sc->rxdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTWRITE); } } From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 16:38:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF78A948; Mon, 24 Nov 2014 16:38:34 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2EACC7; Mon, 24 Nov 2014 16:38:34 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id CAD5CABC3; Mon, 24 Nov 2014 16:38:32 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id A6E9811C8; Mon, 24 Nov 2014 17:38:22 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Ronald Klop" Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <20141124072316.GA27782@ymer.vnode.se> Date: Mon, 24 Nov 2014 17:38:22 +0100 In-Reply-To: (Ronald Klop's message of "Mon, 24 Nov 2014 10:19:08 +0100") Message-ID: <864mtoblkx.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 16:38:35 -0000 "Ronald Klop" writes: > Joel Dahl writes: > > I'd also be grateful if everyone ran mandoc -Tlint on their manpages > > before committing. :-) > A commit hook does magic for these kind of things. ;-) A simpler alternative would be to write a unit test that checks all installed man pages (and ignores those that don't have a $FreeBSD$ tag, or whose $FreeBSD$ tag indicates that they reside in contrib or crypto) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 16:57:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BE53E89; Mon, 24 Nov 2014 16:57:15 +0000 (UTC) Received: from ravenloft.kiev.ua (ravenloft.kiev.ua [94.244.131.95]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B2FED9; Mon, 24 Nov 2014 16:57:14 +0000 (UTC) Date: Mon, 24 Nov 2014 18:57:12 +0200 From: Alex Kozlov To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Message-ID: <20141124165712.GA79314@ravenloft.kiev.ua> References: <201411232100.sANL00cG078781@svn.freebsd.org> <20141123210412.GG68776@ivaldir.etoilebsd.net> <20141124072316.GA27782@ymer.vnode.se> <864mtoblkx.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <864mtoblkx.fsf@nine.des.no> Cc: svn-src-head@freebsd.org, Baptiste Daroussin , svn-src-all@freebsd.org, Ronald Klop , Joel Dahl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 16:57:15 -0000 On Mon, Nov 24, 2014 at 05:38:22PM +0100, Dag-Erling Smørgrav wrote: > "Ronald Klop" writes: > > Joel Dahl writes: > > > I'd also be grateful if everyone ran mandoc -Tlint on their manpages > > > before committing. :-) > > A commit hook does magic for these kind of things. ;-) > A simpler alternative would be to write a unit test that checks all > installed man pages (and ignores those that don't have a $FreeBSD$ tag, > or whose $FreeBSD$ tag indicates that they reside in contrib or crypto) I think writing commit hook is not that complex[*] and more efficient. *: As an example: http://people.freebsd.org/~ak/mdoclint.sh.txt -- Alex From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 17:37:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60616C90; Mon, 24 Nov 2014 17:37:42 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C63C55F0; Mon, 24 Nov 2014 17:37:41 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sAOHbXhR041435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Nov 2014 19:37:33 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sAOHbXhR041435 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sAOHbXLt041434; Mon, 24 Nov 2014 19:37:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 24 Nov 2014 19:37:33 +0200 From: Konstantin Belousov To: Ruslan Bukin Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141124173733.GI17068@kib.kiev.ua> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141124110537.GA41282@bsdpad.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 17:37:42 -0000 On Mon, Nov 24, 2014 at 11:05:37AM +0000, Ruslan Bukin wrote: > Hi, Gleb, > > I get some problems with it: I'm working on block device emulation > using virtio(4) in heterogeneous environment (FreeBSD/ARM frontend > provide block to FreeBSD/MIPS64 soft core). On a MIPS side I now > permanently receive panic below > > Any idea ? > > [...] > crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0 > Device configuration finished. > Timecounters tick every 5.000 msec > crypto: > tcp_init: net.inet.tcp.tcbhashsize auto tuned to 4096 > random: unblocking device. > GEOM: new disk vtbd0 > MAP: No valid partition found at vtbd0 > Trying to mount root from ufs:vtbd0 []... > WARNING: / was not properly dismounted > warning: no time-of-day clock registered, system time will not be set accurately > start_init: trying /sbin/init > mtlctl: open mtl_reg0: No such file or directory > Entropy harvesting:sysctl: unknown oid 'kern.ranndom.sys.harvest.interrupt': No such file or directory > interruptssysctl: unknown oid 'kern.random.sys.harvest.ethernet': No such file or directory > ethernetpanic: Bad link elm 0x980000000f9a0090 next->prev != elm > KDB: enter: panic > [ thread pid 31 tid 100028 ] > Stopped at kdb_enter+0x8c: lui at,0x0 > db> I this on stock kernel or on kernel with your modifications ? What is the backtrace ? What is the file/line where the panic occured ? Can mips dump vmcore ? From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 18:06:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7E106BA; Mon, 24 Nov 2014 18:06:47 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C620296B; Mon, 24 Nov 2014 18:06:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XsxzQ-000CSc-O6; Mon, 24 Nov 2014 18:03:56 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 24 Nov 2014 18:03:56 +0000 (GMT) Date: Mon, 24 Nov 2014 18:03:56 +0000 From: Ruslan Bukin To: Konstantin Belousov Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141124180356.GA47782@bsdpad.com> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141124173733.GI17068@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 18:06:47 -0000 On Mon, Nov 24, 2014 at 07:37:33PM +0200, Konstantin Belousov wrote: > On Mon, Nov 24, 2014 at 11:05:37AM +0000, Ruslan Bukin wrote: > > Hi, Gleb, > > > > I get some problems with it: I'm working on block device emulation > > using virtio(4) in heterogeneous environment (FreeBSD/ARM frontend > > provide block to FreeBSD/MIPS64 soft core). On a MIPS side I now > > permanently receive panic below > > > > Any idea ? > > > > [...] > > crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0 > > crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0 > > crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0 > > Device configuration finished. > > Timecounters tick every 5.000 msec > > crypto: > > tcp_init: net.inet.tcp.tcbhashsize auto tuned to 4096 > > random: unblocking device. > > GEOM: new disk vtbd0 > > MAP: No valid partition found at vtbd0 > > Trying to mount root from ufs:vtbd0 []... > > WARNING: / was not properly dismounted > > warning: no time-of-day clock registered, system time will not be set accurately > > start_init: trying /sbin/init > > mtlctl: open mtl_reg0: No such file or directory > > Entropy harvesting:sysctl: unknown oid 'kern.ranndom.sys.harvest.interrupt': No such file or directory > > interruptssysctl: unknown oid 'kern.random.sys.harvest.ethernet': No such file or directory > > ethernetpanic: Bad link elm 0x980000000f9a0090 next->prev != elm > > KDB: enter: panic > > [ thread pid 31 tid 100028 ] > > Stopped at kdb_enter+0x8c: lui at,0x0 > > db> > > I this on stock kernel or on kernel with your modifications ? Stock one. I also checked with no virtio but MDROOT - same problems. > What is the backtrace ? [...] warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init panic: vm_page_insert_after: msucc doesn't succeed pindex KDB: enter: panic [ thread pid 14 tid 100026 ] Stopped at kdb_enter+0x8c: lui at,0x0 db> bt Tracing pid 14 tid 100026 td 0x98000000008854d0 db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056b10f0 sz 16 ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056b1100 sz 48 ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056b1130 sz 192 db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056b11f0 sz 16 ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff8027c678 sp c0000000056b1200 sz 816 kdb_trap+188 (?,?,?,?) ra ffffffff804ab424 sp c0000000056b1530 sz 64 trap+1114 (?,?,?,?) ra ffffffff804969bc sp c0000000056b1570 sz 288 MipsKernGenException+154 (0,4,804f5340,12f) ra ffffffff8027c214 sp c0000000056b1690 sz 368 kdb_enter+8c (?,?,?,?) ra ffffffff8022e808 sp c0000000056b1800 sz 16 ffffffff8022e658+1b0 (?,?,?,?) ra ffffffff8022e938 sp c0000000056b1810 sz 32 kassert_panic+c8 (?,4,851600,3d7) ra ffffffff80476900 sp c0000000056b1830 sz 96 ffffffff804767e0+120 (?,?,?,?) ra ffffffff8047a2a8 sp c0000000056b1890 sz 64 vm_page_alloc+7f8 (?,?,?,?) ra ffffffff8045e8a4 sp c0000000056b18d0 sz 80 ffffffff8045dd80+b24 (?,?,?,?) ra 0 sp c0000000056b1920 sz 272 pid 14 db> [...] warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init panic: Bad list head 0x9800000000851c30 first->prev != head KDB: enter: panic [ thread pid 14 tid 100026 ] Stopped at kdb_enter+0x8c: lui at,0x0 db> bt Tracing pid 14 tid 100026 td 0x98000000008854d0 db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056b10d0 sz 16 ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056b10e0 sz 48 ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056b1110 sz 192 db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056b11d0 sz 16 ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff8027c678 sp c0000000056b11e0 sz 816 kdb_trap+188 (?,?,?,?) ra ffffffff804ab424 sp c0000000056b1510 sz 64 trap+1114 (?,?,?,?) ra ffffffff804969bc sp c0000000056b1550 sz 288 MipsKernGenException+154 (0,4,804f5340,12f) ra ffffffff8027c214 sp c0000000056b1670 sz 368 kdb_enter+8c (?,?,?,?) ra ffffffff8022e808 sp c0000000056b17e0 sz 16 ffffffff8022e658+1b0 (?,?,?,?) ra ffffffff8022e870 sp c0000000056b17f0 sz 32 panic+30 (?,851c30,8051e990,8051e990) ra ffffffff80470ee8 sp c0000000056b1810 sz 96 vm_object_shadow+178 (?,?,?,?) ra ffffffff804694c8 sp c0000000056b1870 sz 48 vm_map_lookup+2f0 (56b1a68,ffffe000,?,?) ra ffffffff8045de28 sp c0000000056b18a0 sz 128 ffffffff8045dd80+a8 (?,?,?,?) ra 0 sp c0000000056b1920 sz 272 pid 14 db> > What is the file/line where the panic occured ? > Can mips dump vmcore ? not sure yet Ruslan From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 18:34:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79DF05D4; Mon, 24 Nov 2014 18:34:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66726D96; Mon, 24 Nov 2014 18:34:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOIYCO4010684; Mon, 24 Nov 2014 18:34:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOIYCCW010683; Mon, 24 Nov 2014 18:34:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411241834.sAOIYCCW010683@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 24 Nov 2014 18:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274970 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 18:34:12 -0000 Author: jhb Date: Mon Nov 24 18:34:11 2014 New Revision: 274970 URL: https://svnweb.freebsd.org/changeset/base/274970 Log: Properly initialize the capability rights for vnodes exported to procstat that aren't for file descriptors (cwd, jdir, tracevp, etc.). Submitted by: Mikhail Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Mon Nov 24 18:11:16 2014 (r274969) +++ head/sys/kern/kern_descrip.c Mon Nov 24 18:34:11 2014 (r274970) @@ -3096,6 +3096,7 @@ export_vnode_to_kinfo(struct vnode *vp, if (error == 0) kif->kf_status |= KF_ATTR_VALID; kif->kf_flags = xlate_fflags(fflags); + cap_rights_init(&kif->kf_cap_rights); kif->kf_fd = fd; kif->kf_ref_count = -1; kif->kf_offset = -1; From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 18:40:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 785BB829; Mon, 24 Nov 2014 18:40:05 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5276FDE9; Mon, 24 Nov 2014 18:40:05 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 95F27B924; Mon, 24 Nov 2014 13:40:03 -0500 (EST) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r274878 - head/sys/kern Date: Mon, 24 Nov 2014 11:53:16 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201411221815.sAMIF2il011412@svn.freebsd.org> In-Reply-To: <201411221815.sAMIF2il011412@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201411241153.16250.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 24 Nov 2014 13:40:03 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 18:40:05 -0000 On Saturday, November 22, 2014 1:15:02 pm Konstantin Belousov wrote: > Author: kib > Date: Sat Nov 22 18:15:02 2014 > New Revision: 274878 > URL: https://svnweb.freebsd.org/changeset/base/274878 > > Log: > The size value should be asserted when it is known. > > Reported and tested by: pho > Sponsored by: The FreeBSD Foundation Sorry, I did not have INVARIANTS in the kernel config I used to test the XSAVE core stuff. :( -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 19:29:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6D19B7F; Mon, 24 Nov 2014 19:29:04 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 57D205F0; Mon, 24 Nov 2014 19:29:04 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAOJT2EO081866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 24 Nov 2014 22:29:02 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAOJT2KK081865; Mon, 24 Nov 2014 22:29:02 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 24 Nov 2014 22:29:02 +0300 From: Gleb Smirnoff To: Ruslan Bukin Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141124192902.GQ47144@FreeBSD.org> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141124180356.GA47782@bsdpad.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 19:29:05 -0000 On Mon, Nov 24, 2014 at 06:03:56PM +0000, Ruslan Bukin wrote: R> > I this on stock kernel or on kernel with your modifications ? R> R> Stock one. I also checked with no virtio but MDROOT - same problems. I could expect a panic with a damaged 'struct buf', but not vm_page. Can you please do a clean build pre-r274914, and then again a clean build of r274914, and then confirm that the former is stable, but the latter panics? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 19:40:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAAB1230; Mon, 24 Nov 2014 19:40:25 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E1B57BF; Mon, 24 Nov 2014 19:40:24 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAOJeMmF081929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 24 Nov 2014 22:40:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAOJeMsQ081928; Mon, 24 Nov 2014 22:40:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 24 Nov 2014 22:40:22 +0300 From: Gleb Smirnoff To: Philip Paeps Subject: Re: svn commit: r274966 - head/sys/net Message-ID: <20141124194022.GR47144@FreeBSD.org> References: <201411241400.sAOE0Srq063100@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411241400.sAOE0Srq063100@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 19:40:26 -0000 On Mon, Nov 24, 2014 at 02:00:28PM +0000, Philip Paeps wrote: P> Author: philip P> Date: Mon Nov 24 14:00:27 2014 P> New Revision: 274966 P> URL: https://svnweb.freebsd.org/changeset/base/274966 P> P> Log: P> Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap P> should delete configured addresses and routes when the interface is P> closed. Default is enabled (preserve current behaviour). P> P> MFC after: 1 week Any time I see yet another sysctl knob added I ask myself: what if I want this feature on tap0 but doesn't want it on tap1? What if want it on host, but doesn't want it on vmnet-enabled jail? Where from could I learn about this sysctl if I am not subscribed to svn-src-*@? Of course adding a sysctl knob is faster and easier for a FreeBSD hacker. But is it a better for a FreeBSD user? Are we making OS for just ourselves? Look, we've got tapifioctl(). If you are too lazy to introduce new ioctl command and code it support in ifconfig, in this case you can just use any of IFF_LINK0, IFF_LINK1, IFF_LINK2 flag to toggle this feature via SIOCSIFFLAGS. And then document it in tap(4). Finally, if later some developer comes and does it in a proper way, then he would have a burden of supporting your sysctl for backwards compatibility, because you very quickly MFCed it. P.S. I am sorry if my email sounds like old man's grumbling. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 19:55:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D53A4B9A; Mon, 24 Nov 2014 19:55:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A802E9B0; Mon, 24 Nov 2014 19:55:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOJtkEY052455; Mon, 24 Nov 2014 19:55:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOJtkWI052453; Mon, 24 Nov 2014 19:55:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411241955.sAOJtkWI052453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 24 Nov 2014 19:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274976 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 19:55:46 -0000 Author: jhb Date: Mon Nov 24 19:55:45 2014 New Revision: 274976 URL: https://svnweb.freebsd.org/changeset/base/274976 Log: Add a bus_get_domain() wrapper around BUS_GET_DOMAIN(). Use this to add a new per-device '%domain' sysctl node that returns the NUMA domain a device is associated with if it is associated with one. Note that this API is still a WIP and might change before 11.0 actually ships. Differential Revision: https://reviews.freebsd.org/D930 Reviewed by: kib, adrian Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Mon Nov 24 19:50:01 2014 (r274975) +++ head/sys/kern/subr_bus.c Mon Nov 24 19:55:45 2014 (r274976) @@ -285,6 +285,7 @@ static void device_sysctl_init(device_t dev) { devclass_t dc = dev->devclass; + int domain; if (dev->sysctl_tree != NULL) return; @@ -314,6 +315,10 @@ device_sysctl_init(device_t dev) OID_AUTO, "%parent", CTLTYPE_STRING | CTLFLAG_RD, dev, DEVICE_SYSCTL_PARENT, device_sysctl_handler, "A", "parent device"); + if (bus_get_domain(dev, &domain) == 0) + SYSCTL_ADD_INT(&dev->sysctl_ctx, + SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%domain", + CTLFLAG_RD, NULL, domain, "NUMA domain"); } static void @@ -4542,6 +4547,18 @@ bus_get_dma_tag(device_t dev) return (BUS_GET_DMA_TAG(parent, dev)); } +/** + * @brief Wrapper function for BUS_GET_DOMAIN(). + * + * This function simply calls the BUS_GET_DOMAIN() method of the + * parent of @p dev. + */ +int +bus_get_domain(device_t dev, int *domain) +{ + return (BUS_GET_DOMAIN(device_get_parent(dev), dev, domain)); +} + /* Resume all devices and then notify userland that we're up again. */ static int root_resume(device_t dev) Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Mon Nov 24 19:50:01 2014 (r274975) +++ head/sys/sys/bus.h Mon Nov 24 19:55:45 2014 (r274976) @@ -392,6 +392,7 @@ int bus_activate_resource(device_t dev, int bus_deactivate_resource(device_t dev, int type, int rid, struct resource *r); bus_dma_tag_t bus_get_dma_tag(device_t dev); +int bus_get_domain(device_t dev, int *domain); int bus_release_resource(device_t dev, int type, int rid, struct resource *r); int bus_free_resource(device_t dev, int type, struct resource *r); From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 20:07:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC397E4; Mon, 24 Nov 2014 20:07:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8E97AE1; Mon, 24 Nov 2014 20:07:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOK79YM057604; Mon, 24 Nov 2014 20:07:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOK79RS057603; Mon, 24 Nov 2014 20:07:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411242007.sAOK79RS057603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Nov 2014 20:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274978 - head/lib/libc/tests/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 20:07:10 -0000 Author: dim Date: Mon Nov 24 20:07:09 2014 New Revision: 274978 URL: https://svnweb.freebsd.org/changeset/base/274978 Log: For now, disable using -fsanitize=bounds for the libc ssp tests, when using clang 3.5.0, until the runtime support (via compiler-rt) is added. Otherwise, this would lead to link errors about missing support libraries. Modified: head/lib/libc/tests/ssp/Makefile Modified: head/lib/libc/tests/ssp/Makefile ============================================================================== --- head/lib/libc/tests/ssp/Makefile Mon Nov 24 20:01:05 2014 (r274977) +++ head/lib/libc/tests/ssp/Makefile Mon Nov 24 20:07:09 2014 (r274978) @@ -9,7 +9,10 @@ WARNS?= 2 CFLAGS.h_raw+= -fstack-protector-all -Wstack-protector .if ${COMPILER_TYPE} == "clang" +# Disable -fsanitize=bounds until runtime support is done for clang 3.5.0. +.if ${COMPILER_VERSION} < 30500 CFLAGS.h_raw+= -fsanitize=bounds +.endif .elif ${COMPILER_TYPE} == "gcc" CFLAGS.h_raw+= --param ssp-buffer-size=1 DPADD+= ${LIBSSP} From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 20:18:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5779D567; Mon, 24 Nov 2014 20:18:30 +0000 (UTC) Received: from rincewind.trouble.is (rincewind.trouble.is [88.198.44.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12D2BBF4; Mon, 24 Nov 2014 20:18:29 +0000 (UTC) Received: by rincewind.trouble.is (Postfix, from userid 1001) id 7FC0C749; Mon, 24 Nov 2014 21:18:21 +0100 (CET) Date: Mon, 24 Nov 2014 21:18:21 +0100 From: Philip Paeps To: Gleb Smirnoff Subject: Re: svn commit: r274966 - head/sys/net Message-ID: <20141124201821.GY95784@rincewind.trouble.is> Mail-Followup-To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201411241400.sAOE0Srq063100@svn.freebsd.org> <20141124194022.GR47144@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141124194022.GR47144@FreeBSD.org> X-PGP-Fingerprint: 73C5 0671 B4B6 7E19 1BAD F87A BB5E 2C46 2A0F A8B0 X-Date: Today is Pungenday, the 36th day of The Aftermath in the YOLD 3180 X-Phase-of-Moon: The Moon is Waxing Crescent (7% of Full) X-Philip-Conspiracy: There is no conspiracy X-Checked-By-NSA: Probably User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 20:18:30 -0000 On 2014-11-24 22:40:22 (+0300), Gleb Smirnoff wrote: > On Mon, Nov 24, 2014 at 02:00:28PM +0000, Philip Paeps wrote: > P> Author: philip > P> Date: Mon Nov 24 14:00:27 2014 > P> New Revision: 274966 > P> URL: https://svnweb.freebsd.org/changeset/base/274966 > P> > P> Log: > P> Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap > P> should delete configured addresses and routes when the interface is > P> closed. Default is enabled (preserve current behaviour). > P> > P> MFC after: 1 week > > Any time I see yet another sysctl knob added I ask myself: what if I want > this feature on tap0 but doesn't want it on tap1? What if want it on host, > but doesn't want it on vmnet-enabled jail? Where from could I learn about > this sysctl if I am not subscribed to svn-src-*@? I admit that this one was a hack written in anger a while back. When I hacked this, I was struggling with a bunch of bhyve instances with fiddly point to point routes and every time I restarted a bhyve, I'd have to fix my routing table again. That got frustrating quickly. Not an excuse. Just an explanation. > Of course adding a sysctl knob is faster and easier for a FreeBSD hacker. > But is it a better for a FreeBSD user? Are we making OS for just ourselves? > > Look, we've got tapifioctl(). If you are too lazy to introduce new > ioctl command and code it support in ifconfig, in this case you can just > use any of IFF_LINK0, IFF_LINK1, IFF_LINK2 flag to toggle this feature > via SIOCSIFFLAGS. And then document it in tap(4). Note that I semi-purposely didn't document this in tap(4). I should have pointed that out in the commit message, sorry. When I wrote this, this summer, I meant to ask about the magical and very legacy-looking VMware vmnet hacks in the driver. Are those still relevant? Is there still a VMWare port that relies on this? What about the comment that legacy devfs cloning interferes with ssh(1) (added seven years ago), is that still true? > Finally, if later some developer comes and does it in a proper way, then > he would have a burden of supporting your sysctl for backwards compatibility, > because you very quickly MFCed it. > > P.S. I am sorry if my email sounds like old man's grumbling. No problem. I'm happy to fix this 'better'. Old men often grumble sense (I keep telling myself as I get older...). Philip -- Philip Paeps Senior Reality Engineer Ministry of Information From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:19:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4B7AEBC; Mon, 24 Nov 2014 21:19:05 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7912730D; Mon, 24 Nov 2014 21:19:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Xt0zc-000D21-K6; Mon, 24 Nov 2014 21:16:20 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 24 Nov 2014 21:16:20 +0000 (GMT) Date: Mon, 24 Nov 2014 21:16:20 +0000 From: Ruslan Bukin To: Gleb Smirnoff Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141124211620.GA49975@bsdpad.com> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141124192902.GQ47144@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:19:05 -0000 On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote: > On Mon, Nov 24, 2014 at 06:03:56PM +0000, Ruslan Bukin wrote: > R> > I this on stock kernel or on kernel with your modifications ? > R> > R> Stock one. I also checked with no virtio but MDROOT - same problems. > > I could expect a panic with a damaged 'struct buf', but not vm_page. > > Can you please do a clean build pre-r274914, and then again a clean > build of r274914, and then confirm that the former is stable, but the > latter panics? Yes, I just proceeded re-check both builds with removing obj dir each time and I still see the problem starting with r274914. Also restoring files like that on latest head makes things happy (no panics): svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h Ruslan From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:19:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8391C7D; Mon, 24 Nov 2014 21:19:44 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C42D319; Mon, 24 Nov 2014 21:19:44 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:53838 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1XsjNF-000Op1-Gk; Sun, 23 Nov 2014 18:27:33 -0800 From: To: "'Joel Dahl'" , , , References: <201411232100.sANL00cG078781@svn.freebsd.org> In-Reply-To: <201411232100.sANL00cG078781@svn.freebsd.org> Subject: RE: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw share/man/man4 share/man/man4/man4.arm share/man/man9 sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv Date: Mon, 24 Nov 2014 13:19:26 -0800 Message-ID: <102701d0082c$54739ab0$fd5ad010$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQKCozFBiwuF0zo9QqPne/vjSvX40JsLEdOA Content-Language: en-us Sender: devin@shxd.cx Cc: 'Devin Teske' X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:19:44 -0000 > -----Original Message----- > From: owner-src-committers@freebsd.org [mailto:owner-src- > committers@freebsd.org] On Behalf Of Joel Dahl > Sent: Sunday, November 23, 2014 1:00 PM > To: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: svn commit: r274925 - in head: lib/libc/sys lib/libdpv sbin/ipfw > share/man/man4 share/man/man4/man4.arm share/man/man9 > sys/boot/common sys/boot/i386/gptzfsboot usr.bin/dpv > > Author: joel (doc committer) > Date: Sun Nov 23 21:00:00 2014 > New Revision: 274925 > URL: https://svnweb.freebsd.org/changeset/base/274925 > > Log: > Misc mdoc fixes: > > - Remove superfluous paragraph macros. > - Remove/fix empty or incorrect macros. > - Sort sections into conventional order. > - Terminate quoted strings properly. > - Remove EOL whitespace. > > Modified: [snip] > head/lib/libdpv/dpv.3 [snip] > head/usr.bin/dpv/dpv.1 [snip] > Modified: head/lib/libdpv/dpv.3 > ========================================================== > ==================== > --- head/lib/libdpv/dpv.3 Sun Nov 23 19:13:17 2014 (r274924) > +++ head/lib/libdpv/dpv.3 Sun Nov 23 21:00:00 2014 (r274925) > @@ -502,7 +502,7 @@ This does not effect > .Xr Xdialog 1 , > which renders the color escape sequences as plain text. > See > -.Do Li > +.Do > embedded "\\Z" sequences > .Dc > in > [snip] > Modified: head/usr.bin/dpv/dpv.1 > ========================================================== > ==================== > --- head/usr.bin/dpv/dpv.1 Sun Nov 23 19:13:17 2014 (r274924) > +++ head/usr.bin/dpv/dpv.1 Sun Nov 23 21:00:00 2014 (r274925) > @@ -104,7 +104,7 @@ Do not use the default interface of > .Xr dialog 3 , > but instead spawn an instance of > .Xr dialog 1 . > -The path to > +The path to > .Xr dialog 1 > is taken from the > .Ev DIALOG > @@ -308,7 +308,6 @@ is required. > .It Pa $HOME/.dialogrc > .El > .Sh EXAMPLES > -.Pp > Simple example to show how fast > .Xr yes 1 > produces lines > @@ -358,7 +357,18 @@ Zeroing a disk: > .Bd -literal -offset indent > dpv -o /dev/md42 < /dev/zero > .Ed > -.Pp > +.Sh SEE ALSO > +.Xr dialog 1 , > +.Xr dialog 3 , > +.Xr sh 1 , > +.Xr Xdialog 1 > +.Sh HISTORY > +A > +.Nm > +utility first appeared in > +.Fx 11.0 . > +.Sh AUTHORS > +.An Devin Teske Aq dteske@FreeBSD.org > .Sh BUGS > .Xr Xdialog 1 , > when given both > @@ -410,21 +420,9 @@ This does not effect > .Xr Xdialog 1 , > which renders the color escape sequences as plain text. > See > -.Do Li > +.Do > embedded "\\Z" sequences > .Dc > in > .Xr dialog 1 > for additional information. > -.Sh SEE ALSO > -.Xr dialog 1 , > -.Xr dialog 3 , > -.Xr sh 1 , > -.Xr Xdialog 1 > -.Sh HISTORY > -A > -.Nm > -utility first appeared in > -.Fx 11.0 . > -.Sh AUTHORS > -.An Devin Teske Aq dteske@FreeBSD.org Should these changes be MFC'd to stable/10, stable/9? -- Devin From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:31:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E1324EF; Mon, 24 Nov 2014 21:31:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A63C6AF; Mon, 24 Nov 2014 21:31:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOLV90W001673; Mon, 24 Nov 2014 21:31:09 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOLV9lQ001672; Mon, 24 Nov 2014 21:31:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242131.sAOLV9lQ001672@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 21:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274984 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:31:09 -0000 Author: bapt Date: Mon Nov 24 21:31:08 2014 New Revision: 274984 URL: https://svnweb.freebsd.org/changeset/base/274984 Log: Implement LIBADD LIBADD will automatically set DPADD and LDADD when needed including their dependencies, LIBADD automatically handles private and internal libs so that the end user Makefile does not have to care about it. This allows to reduce overlinking on the base system leaving the framework get the dependencies properly. It also allows to built components binaries statically. To use it: Replace: DPADD= ${LIBARCHIVE} ${LIBSSL} LDADD= -larchive -lssl by: LIBADD= archive ssl Differential Revision: https://reviews.freebsd.org/D1209 Reviewed by: brooks imp Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 20:57:20 2014 (r274983) +++ head/share/mk/src.libnames.mk Mon Nov 24 21:31:08 2014 (r274984) @@ -7,7 +7,182 @@ .error src.libnames.mk cannot be included directly. .endif -ROOTOBJDIR= ${.OBJDIR:S/${.CURDIR}//}${.MAKE.MAKEFILES:M*/src.libnames.mk:H:H:H} +.include + +ROOTSRCDIR= ${.MAKE.MAKEFILES:M*/src.libnames.mk:H:H:H} +ROOTOBJDIR= ${.OBJDIR:S/${.CURDIR}//}${ROOTSRCDIR} +_PRIVATELIBS= \ + atf_c \ + atf_cxx \ + bsdstat \ + ldns \ + sqlite3 \ + ssh \ + ucl \ + unbound +_INTERNALIBS= \ + libmandoc \ + ohash \ + readline \ + sm + +_LIBRARIES= \ + archive \ + atf_c \ + atf_cxx \ + bsdxml \ + bsnmp \ + bz2 \ + cam \ + capsicum \ + casper \ + cft \ + crypt \ + crypto \ + cuse \ + cxxrt \ + devstat \ + dialog \ + dpv \ + dwarf \ + edit \ + elf \ + event \ + execinfo \ + fetch \ + figpar \ + geom \ + gssapi \ + ipsec \ + jail \ + kiconv \ + kvm \ + l \ + ldns \ + lzma \ + m \ + magic \ + mandoc \ + md \ + memstat \ + mp \ + nandfs \ + ncursesw \ + nv \ + opie \ + pam \ + pcap \ + pjdlog \ + proc \ + procstat \ + pthread \ + radius \ + readline \ + rpcsec_gss \ + rt \ + sbuf \ + sm \ + smb \ + ssh \ + ssl \ + stdthreads \ + supcplusplus \ + tacplus \ + termcapw \ + ucl \ + ufs \ + ulog \ + usb \ + util \ + wrap \ + y \ + z + +_DP_archive= z bz2 lzma bsdxml +.if ${MK_OPENSSL} != "no" +_DP_archive+= crypto +.else +_DP_archive+= md +.endif +_DP_ssl= crypto +_DP_ssh= crypto crypt +_DP_edit= edit +.if ${MK_OPENSSL} != "no" +_DP_bsnmp= crypto +.endif +_DP_grom= bsdxml sbuf +_DP_cam= sbuf +_DP_casper= capsicum nv pjdlog +_DP_capsicum= nv +_DP_pjdlog= util +_DP_opie= md +_DP_usb= pthread +_DP_unbound= pthread +_DP_rt= pthread +.if ${MK_OPENSSL} == "no" +_DP_radius= md +.else +_DP_radius= crypto +.endif +_DP_procstat= kvm util elf +.if ${MK_CXX} == "yes" +.if ${MK_LIBCPLUSPLUS} != "no" +_DP_proc= cxxrt +.else +_DP_proc= supcplusplus +.endif +.endif +.if ${MK_CDDL} != "no" +_DP_proc+= cft +.endif +_DP_mp= crypto +_DP_memstat= kvm +_DP_magic= z +_DP_ldns= crypto +.if ${MK_OPENSSL} != "no" +_DP_fetch= ssl crypto +.else +_DP_fetch= md +.endif +_DP_execinfo= elf +_DP_dwarf= elf +_DP_dpv= dialog figpar util +_DP_dialog= ncursesw m +_DP_cuse= pthread +_DP_atf_cxx= atf_c +_DP_devstat= kvm + +# Define spacial cases +LDADD_supcplusplus= -lsupc++ + +.for _l in ${_LIBRARIES} +.if ${_PRIVATELIBS:M${_l}} +LDADD+= -L${LIB${_l:tu}DIR} +.endif +.if ${_INTERNALIBS:M${_l}} +LDADD+= -L${LIB${_l:tu}DIR} +.endif +DPADD_${_l}?= ${LIB${_l:tu}} +LDADD_${_l}?= -l${_l} +.if defined(${_l}_depend) && defined(NO_SHARED) +.for _d in ${_DP_${_l}} +DPADD_${_l}+= ${DPADD_${_d}} +LDADD_${_l}+= ${LDADD_${_d}} +.endfor +.endif +.endfor + +# ucl needs and exposes libm +DPADD_ucl+= ${DPADD_m} +LDADD_ucl+= ${LDADD_m} + +.for _l in ${LIBADD} +.if ${_PRIVATELIBS:M${_l}} +USEPRIVATELIB+= ${_l} +.endif +DPADD+= ${DPADD_${_l}} +LDADD+= ${LDADD_${_l}} +.endfor LIBATF_CDIR= ${ROOTOBJDIR}/lib/atf/libatf-c LDATF_C?= ${LIBATF_CDIR}/libatf-c.so @@ -22,7 +197,7 @@ LDBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat. LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent -LDEVENT?= ${LIBEVENTDIR}/libevent.so +LDEVENT?= ${LIBEVENTDIR}/libevent.a LIBEVENT?= ${LIBEVENTDIR}/libevent.a LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc @@ -64,3 +239,7 @@ LIBSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3 LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc LDMANDOC?= ${LIBMANDOCDIR}/libmandoc.a LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a + +LIBSMDIR= ${ROOTOBJDIR}/lib/libsm +LDSM?= ${LIBSMDIR}/libsm.a +LIBSM?= ${LIBSMDIR}/libsm.a From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:39:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B160847; Mon, 24 Nov 2014 21:39:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1796D791; Mon, 24 Nov 2014 21:39:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOLdSoR005037; Mon, 24 Nov 2014 21:39:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOLdSow005036; Mon, 24 Nov 2014 21:39:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242139.sAOLdSow005036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 21:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274985 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:39:29 -0000 Author: bapt Date: Mon Nov 24 21:39:28 2014 New Revision: 274985 URL: https://svnweb.freebsd.org/changeset/base/274985 Log: Correctly specify -L for internal and private libs Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 21:31:08 2014 (r274984) +++ head/share/mk/src.libnames.mk Mon Nov 24 21:39:28 2014 (r274985) @@ -157,13 +157,13 @@ LDADD_supcplusplus= -lsupc++ .for _l in ${_LIBRARIES} .if ${_PRIVATELIBS:M${_l}} -LDADD+= -L${LIB${_l:tu}DIR} +LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} .endif .if ${_INTERNALIBS:M${_l}} -LDADD+= -L${LIB${_l:tu}DIR} +LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} .endif DPADD_${_l}?= ${LIB${_l:tu}} -LDADD_${_l}?= -l${_l} +LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} .if defined(${_l}_depend) && defined(NO_SHARED) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:49:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70971BF9; Mon, 24 Nov 2014 21:49:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2F788C; Mon, 24 Nov 2014 21:49:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOLn2ST009719; Mon, 24 Nov 2014 21:49:02 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOLn2ME009718; Mon, 24 Nov 2014 21:49:02 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201411242149.sAOLn2ME009718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 24 Nov 2014 21:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274986 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:49:02 -0000 Author: brd (doc committer) Date: Mon Nov 24 21:49:01 2014 New Revision: 274986 URL: https://svnweb.freebsd.org/changeset/base/274986 Log: Convert to LIBADD. Reviewed by: bapt Modified: head/usr.sbin/pw/Makefile Modified: head/usr.sbin/pw/Makefile ============================================================================== --- head/usr.sbin/pw/Makefile Mon Nov 24 21:39:28 2014 (r274985) +++ head/usr.sbin/pw/Makefile Mon Nov 24 21:49:01 2014 (r274986) @@ -8,8 +8,7 @@ SRCS= pw.c pw_conf.c pw_user.c pw_group. WARNS?= 2 -DPADD= ${LIBCRYPT} ${LIBUTIL} -LDADD= -lcrypt -lutil +LIBADD= crypt util .include From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:49:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B40AD70; Mon, 24 Nov 2014 21:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6550389B; Mon, 24 Nov 2014 21:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOLngVr009843; Mon, 24 Nov 2014 21:49:42 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOLneig009832; Mon, 24 Nov 2014 21:49:40 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201411242149.sAOLneig009832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 24 Nov 2014 21:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274987 - in head: contrib/mdocml lib lib/libgpio share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:49:42 -0000 Author: rpaulo Date: Mon Nov 24 21:49:40 2014 New Revision: 274987 URL: https://svnweb.freebsd.org/changeset/base/274987 Log: Import libgpio. This is a thin wrapper around the kernel interface which should make it easier to write GPIO applications. gpioctl(8) will be converted to use this library in a separate commit. Differential Revision: https://reviews.freebsd.org/D1183 Reviewed by: adrian, loos Discussed on: arm@, embedded@ Relnotes: yes Added: head/lib/libgpio/ head/lib/libgpio/Makefile (contents, props changed) head/lib/libgpio/gpio.3 (contents, props changed) head/lib/libgpio/gpio.c (contents, props changed) head/lib/libgpio/libgpio.h (contents, props changed) Modified: head/contrib/mdocml/lib.in head/lib/Makefile head/share/mk/bsd.libnames.mk Modified: head/contrib/mdocml/lib.in ============================================================================== --- head/contrib/mdocml/lib.in Mon Nov 24 21:49:01 2014 (r274986) +++ head/contrib/mdocml/lib.in Mon Nov 24 21:49:40 2014 (r274987) @@ -56,6 +56,7 @@ LINE("libftpio", "FTP Connection Managem LINE("libform", "Curses Form Library (libform, \\-lform)") LINE("libgeom", "Userland API Library for Kernel GEOM subsystem (libgeom, \\-lgeom)") LINE("libgpib", "General-Purpose Instrument Bus (GPIB) library (libgpib, \\-lgpib)") +LINE("libgpio", "General-Purpose Input Output (GPIO) library (libgpio, \\-lgpio)") LINE("libhammer", "HAMMER Filesystem Userland Library (libhammer, \\-lhammer)") LINE("libi386", "i386 Architecture Library (libi386, \\-li386)") LINE("libintl", "Internationalized Message Handling Library (libintl, \\-lintl)") Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Nov 24 21:49:01 2014 (r274986) +++ head/lib/Makefile Mon Nov 24 21:49:40 2014 (r274987) @@ -52,6 +52,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libfigpar \ libgeom \ ${_libgpib} \ + libgpio \ ${_libgssapi} \ ${_librpcsec_gss} \ ${_libiconv_modules} \ Added: head/lib/libgpio/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgpio/Makefile Mon Nov 24 21:49:40 2014 (r274987) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +LIB= gpio +SHLIB_MAJOR= 0 + +SRCS= gpio.c +INCS= libgpio.h +MAN+= gpio.3 + +CFLAGS+= -I${.CURDIR} + +MLINKS= gpio.3 gpio_open.3 \ + gpio.3 gpio_open_device.3 \ + gpio.3 gpio_close.3 \ + gpio.3 gpio_pin_list.3 \ + gpio.3 gpio_pin_config.3 \ + gpio.3 gpio_pin_set_flags.3 \ + gpio.3 gpio_pin_get.3 \ + gpio.3 gpio_pin_set.3 \ + gpio.3 gpio_pin_low.3 \ + gpio.3 gpio_pin_high.3 \ + gpio.3 gpio_pin_input.3 \ + gpio.3 gpio_pin_output.3 \ + gpio.3 gpio_pin_opendrain.3 \ + gpio.3 gpio_pin_pushpull.3 \ + gpio.3 gpio_pin_tristate.3 \ + gpio.3 gpio_pin_pullup.3 \ + gpio.3 gpio_pin_pulldown.3 \ + gpio.3 gpio_pin_invin.3 \ + gpio.3 gpio_pin_invout.3 \ + gpio.3 gpio_pin_pulsate.3 + +WARNS?= 6 + +.include Added: head/lib/libgpio/gpio.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgpio/gpio.3 Mon Nov 24 21:49:40 2014 (r274987) @@ -0,0 +1,192 @@ +.\" +.\" Copyright (c) 2014 Rui Paulo +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 17, 2014 +.Dt GPIO 3 +.Os +.Sh NAME +.Nm gpio_open , +.Nm gpio_close +.Nd "library to handle GPIO pins" +.Sh LIBRARY +.Lb libgpio +.Sh SYNOPSIS +.In libgpio.h +.Ft "gpio_handle_t" +.Fn gpio_open "unsigned int unit" +.Ft "gpio_handle_t" +.Fn gpio_open_device "const char *device" +.Ft void +.Fn gpio_close "gpio_handle_t handle" +.Ft int +.Fn gpio_pin_list "gpio_handle_t handle, gpio_config_t **pcfgs" +.Ft int +.Fn gpio_pin_config "gpio_handle_t handle, gpio_config *cfg" +.Ft int +.Fn gpio_pin_set_flags "gpio_handle_t handle, gpio_config_t *cfg" +.Ft gpio_value_t +.Fn gpio_pin_get "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_set "gpio_handle_t handle, gpio_pin_t pin, gpio_value_t value" +.Ft int +.Fn gpio_pin_toggle "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_low "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_high "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_input "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_output "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_opendrain "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_pushpull "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_tristate "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_pullup "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_pulldown "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_invin "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_invout "gpio_handle_t handle, gpio_pin_t pin" +.Ft int +.Fn gpio_pin_pulsate "gpio_handle_t handle, gpio_pin_t pin" +.Sh DESCRIPTION +The +.Nm libgpio +library provides an interface to configure GPIO pins. +The library operates with a +.Ft gpio_handle_t +opaque type which can be created with +.Fn gpio_open +or +.Fn gpio_open_device . +When no more GPIO operations are needed, this handle can be destroyed +with +.Fn gpio_close . +.Pp +To get a list of all available pins, one can call +.Fn gpio_pin_list . +This function takes a pointer to a +.Ft gpio_config_t +which is dynamically allocated. +This pointer should be freed with +.Xr free 3 +when it's no longer necessary. +.Pp +The function +.Fn gpio_pin_config +retrieves the current configuration of a pin. +The pin number should be passed in via the +.Ft g_pin +variable which is part of the +.Ft gpio_config_t +structure. +.Pp +The function +.Fn gpio_pin_set_flags +configures a pin with the flags passed in by the +.Ft gpio_config_t +structure. +The pin number should also be passed in through the +.Ft g_pin +variable. +All other structure members will be ignored by this function. +The list of flags can be found in +.Pa /usr/include/sys/gpio.h . +.Pp +The get or set the state of a GPIO pin, the functions +.Fn gpio_pin_get +and +.Fn gpio_pin_set +are available, respectively. +To toggle the state, use +.Fn gpio_pin_toggle . +.Pp +The functions +.Fn gpio_pin_low +and +.Fn gpio_pin_high +are wrappers around +.Fn gpio_pin_set . +.Pp +The functions +.Fn gpio_pin_input , +.Fn gpio_pin_output , +.Fn gpio_pin_opendrain , +.Fn gpio_pin_pushpull , +.Fn gpio_pin_tristate , +.Fn gpio_pin_pullup , +.Fn gpio_pin_pulldown , +.Fn gpio_pin_invin , +.Fn gpio_pin_invout +and +.Fn gpio_pin_pulsate +are wrappers around +.Fn gpio_pin_set_flags . +.Sh EXAMPLES +The following example shows how to configure pin 16 as output and then +drive it high: +.Bd -literal +#include +#include + +gpio_handle_t handle; + +handle = gpio_open(0); +if (handle == GPIO_HANDLE_INVALID) + err(1, "gpio_open failed"); +gpio_pin_output(handle, 16); +gpio_pin_high(handle, 16); +gpio_close(handle); +.Ed +.Pp +The following example shows how to get a configuration of a pin: +.Bd -literal +gpio_config_t cfg; + +cfg.g_pin = 32; +gpio_pin_config(handle, &cfg); +.Ed +.Pp +The structure will contain the name of the pin and its flags. +.Sh SEE ALSO +.Xr gpiobus 4 , +.Xr gpioctl 8 +.Sh HISTORY +The +.Nm libgpio +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +The +.Nm libgpio +library was implemented by +.An Rui Paulo Aq Mt rpaulo@FreeBSD.org . Added: head/lib/libgpio/gpio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgpio/gpio.c Mon Nov 24 21:49:40 2014 (r274987) @@ -0,0 +1,262 @@ +/*- + * Copyright (c) 2013-2014 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +gpio_handle_t +gpio_open(unsigned int unit) +{ + char device[16]; + + snprintf(device, sizeof(device), "/dev/gpioc%u", unit); + + return (gpio_open_device(device)); +} + +gpio_handle_t +gpio_open_device(const char *device) +{ + int fd, maxpins; + int serr; + + fd = open(device, O_RDONLY); + if (fd < 0) + return (GPIO_INVALID_HANDLE); + /* + * Check whether a simple ioctl works. + */ + if (ioctl(fd, GPIOMAXPIN, &maxpins) < 0) { + serr = errno; + close(fd); + errno = serr; + return (GPIO_INVALID_HANDLE); + } + + return (fd); +} + +void +gpio_close(gpio_handle_t handle) +{ + close(handle); +} + +int +gpio_pin_list(gpio_handle_t handle, gpio_config_t **pcfgs) +{ + int maxpins, i; + gpio_config_t *cfgs; + + *pcfgs = NULL; + if (ioctl(handle, GPIOMAXPIN, &maxpins) < 0) + return (-1); + /* Reasonable values. */ + if (maxpins < 0 || maxpins > 4096) { + errno = EINVAL; + return (-1); + } + cfgs = calloc(maxpins, sizeof(*cfgs)); + if (cfgs == NULL) + return (-1); + for (i = 0; i <= maxpins; i++) { + cfgs[i].g_pin = i; + gpio_pin_config(handle, &cfgs[i]); + } + *pcfgs = cfgs; + + return (maxpins); +} + +int +gpio_pin_config(gpio_handle_t handle, gpio_config_t *cfg) +{ + struct gpio_pin gppin; + + if (cfg == NULL) + return (-1); + gppin.gp_pin = cfg->g_pin; + if (ioctl(handle, GPIOGETCONFIG, &gppin) < 0) + return (-1); + strlcpy(cfg->g_name, gppin.gp_name, GPIOMAXNAME); + cfg->g_caps = gppin.gp_caps; + cfg->g_flags = gppin.gp_flags; + + return (0); +} + +int +gpio_pin_set_flags(gpio_handle_t handle, gpio_config_t *cfg) +{ + struct gpio_pin gppin; + + if (cfg == NULL) + return (-1); + gppin.gp_pin = cfg->g_pin; + gppin.gp_flags = cfg->g_flags; + if (ioctl(handle, GPIOSETCONFIG, &gppin) < 0) + return (-1); + + return (0); +} + +gpio_value_t +gpio_pin_get(gpio_handle_t handle, gpio_pin_t pin) +{ + struct gpio_req gpreq; + + bzero(&gpreq, sizeof(gpreq)); + gpreq.gp_pin = pin; + if (ioctl(handle, GPIOGET, &gpreq) < 0) + return (GPIO_VALUE_INVALID); + + return (gpreq.gp_value); +} + +int +gpio_pin_set(gpio_handle_t handle, gpio_pin_t pin, gpio_value_t value) +{ + struct gpio_req gpreq; + + if (value == GPIO_VALUE_INVALID) + return (-1); + bzero(&gpreq, sizeof(gpreq)); + gpreq.gp_pin = pin; + gpreq.gp_value = value; + if (ioctl(handle, GPIOSET, &gpreq) < 0) + return (-1); + + return (0); +} + +int +gpio_pin_toggle(gpio_handle_t handle, gpio_pin_t pin) +{ + gpio_value_t value; + + value = gpio_pin_get(handle, pin); + if (value == GPIO_VALUE_INVALID) + return (-1); + value = !value; + + return (gpio_pin_set(handle, pin, value)); +} + +int +gpio_pin_low(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set(handle, pin, GPIO_VALUE_LOW)); +} + +int +gpio_pin_high(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set(handle, pin, GPIO_VALUE_HIGH)); +} + +static int +gpio_pin_set_flag(gpio_handle_t handle, gpio_pin_t pin, uint32_t flag) +{ + gpio_config_t cfg; + + bzero(&cfg, sizeof(cfg)); + cfg.g_pin = pin; + if (gpio_pin_config(handle, &cfg) < 0) + return (-1); + cfg.g_flags = flag; + + return (gpio_pin_set_flags(handle, &cfg)); +} + +int +gpio_pin_input(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_INPUT)); +} + +int +gpio_pin_output(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_OUTPUT)); +} + +int +gpio_pin_opendrain(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_OPENDRAIN)); +} + +int +gpio_pin_pushpull(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_PUSHPULL)); +} + +int +gpio_pin_tristate(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_TRISTATE)); +} + +int +gpio_pin_pullup(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_PULLUP)); +} + +int +gpio_pin_pulldown(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_PULLDOWN)); +} + +int +gpio_pin_invin(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_INVIN)); +} + +int +gpio_pin_invout(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_INVOUT)); +} + +int +gpio_pin_pulsate(gpio_handle_t handle, gpio_pin_t pin) +{ + return (gpio_pin_set_flag(handle, pin, GPIO_PIN_PULSATE)); +} Added: head/lib/libgpio/libgpio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgpio/libgpio.h Mon Nov 24 21:49:40 2014 (r274987) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2013-2014 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LIBGPIO_H_ +#define _LIBGPIO_H_ + +#include + +__BEGIN_DECLS + +#define GPIO_INVALID_HANDLE -1 +typedef int gpio_handle_t; +typedef uint32_t gpio_pin_t; + +/* + * Structure describing a GPIO pin configuration. + */ +typedef struct { + gpio_pin_t g_pin; + char g_name[GPIOMAXNAME]; + uint32_t g_caps; + uint32_t g_flags; +} gpio_config_t; + +typedef enum { + GPIO_VALUE_INVALID = -1, + GPIO_VALUE_LOW = GPIO_PIN_LOW, + GPIO_VALUE_HIGH = GPIO_PIN_HIGH +} gpio_value_t; + +/* + * Open /dev/gpiocN or a specific device. + */ +gpio_handle_t gpio_open(unsigned int); +gpio_handle_t gpio_open_device(const char *); +void gpio_close(gpio_handle_t); +/* + * Get a list of all the GPIO pins. + */ +int gpio_pin_list(gpio_handle_t, gpio_config_t **); +/* + * GPIO pin configuration. + * + * Retrieve the configuration of a specific GPIO pin. The pin number is + * passed through the gpio_config_t structure. + */ +int gpio_pin_config(gpio_handle_t, gpio_config_t *); +/* + * Sets the GPIO flags on a specific GPIO pin. The pin number and the flags + * to be set are passed through the gpio_config_t structure. + */ +int gpio_pin_set_flags(gpio_handle_t, gpio_config_t *); +/* + * GPIO pin values. + */ +int gpio_pin_get(gpio_handle_t, gpio_pin_t); +int gpio_pin_set(gpio_handle_t, gpio_pin_t, int); +int gpio_pin_toggle(gpio_handle_t, gpio_pin_t); +/* + * Helper functions to set pin states. + */ +int gpio_pin_low(gpio_handle_t, gpio_pin_t); +int gpio_pin_high(gpio_handle_t, gpio_pin_t); +/* + * Helper functions to configure pins. + */ +int gpio_pin_input(gpio_handle_t, gpio_pin_t); +int gpio_pin_output(gpio_handle_t, gpio_pin_t); +int gpio_pin_opendrain(gpio_handle_t, gpio_pin_t); +int gpio_pin_pushpull(gpio_handle_t, gpio_pin_t); +int gpio_pin_tristate(gpio_handle_t, gpio_pin_t); +int gpio_pin_pullup(gpio_handle_t, gpio_pin_t); +int gpio_pin_pulldown(gpio_handle_t, gpio_pin_t); +int gpio_pin_invin(gpio_handle_t, gpio_pin_t); +int gpio_pin_invout(gpio_handle_t, gpio_pin_t); +int gpio_pin_pulsate(gpio_handle_t, gpio_pin_t); + +__END_DECLS + +#endif /* _LIBGPIO_H_ */ Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Mon Nov 24 21:49:01 2014 (r274986) +++ head/share/mk/bsd.libnames.mk Mon Nov 24 21:49:40 2014 (r274987) @@ -54,6 +54,7 @@ LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpa LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a +LIBGPIO?= ${DESTDIR}${LIBDIR}/libgpio.a LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a LIBGSSAPI?= ${DESTDIR}${LIBDIR}/libgssapi.a From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 21:51:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 218F2EE6; Mon, 24 Nov 2014 21:51:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E7FB8BF; Mon, 24 Nov 2014 21:51:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOLphx8013108; Mon, 24 Nov 2014 21:51:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOLph0U013107; Mon, 24 Nov 2014 21:51:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201411242151.sAOLph0U013107@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 24 Nov 2014 21:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274988 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 21:51:44 -0000 Author: ae Date: Mon Nov 24 21:51:43 2014 New Revision: 274988 URL: https://svnweb.freebsd.org/changeset/base/274988 Log: Skip L2 addresses lookups for p2p interfaces. Discussed with: melifaro Sponsored by: Yandex LLC Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Nov 24 21:49:40 2014 (r274987) +++ head/sys/netinet6/nd6.c Mon Nov 24 21:51:43 2014 (r274988) @@ -2206,9 +2206,6 @@ nd6_need_cache(struct ifnet *ifp) case IFT_IEEE80211: #endif case IFT_INFINIBAND: - case IFT_GIF: /* XXX need more cases? */ - case IFT_PPP: - case IFT_TUNNEL: case IFT_BRIDGE: case IFT_PROPVIRTUAL: return (1); @@ -2235,6 +2232,8 @@ nd6_add_ifa_lle(struct in6_ifaddr *ia) struct llentry *ln; ifp = ia->ia_ifa.ifa_ifp; + if (nd6_need_cache(ifp) == 0) + return (0); IF_AFDATA_LOCK(ifp); ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:12:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A42A5A2; Mon, 24 Nov 2014 22:12:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46933B56; Mon, 24 Nov 2014 22:12:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOMCSVr023347; Mon, 24 Nov 2014 22:12:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOMCRRK023344; Mon, 24 Nov 2014 22:12:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242212.sAOMCRRK023344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 22:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274989 - in head: share/mk usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:12:28 -0000 Author: bapt Date: Mon Nov 24 22:12:27 2014 New Revision: 274989 URL: https://svnweb.freebsd.org/changeset/base/274989 Log: Convert mandoc to LIBADD While here remove the ugly LDMANDOC Modified: head/share/mk/src.libnames.mk head/usr.bin/mandoc/Makefile Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 21:51:43 2014 (r274988) +++ head/share/mk/src.libnames.mk Mon Nov 24 22:12:27 2014 (r274989) @@ -21,7 +21,7 @@ _PRIVATELIBS= \ ucl \ unbound _INTERNALIBS= \ - libmandoc \ + mandoc \ ohash \ readline \ sm @@ -237,7 +237,6 @@ LDSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3. LIBSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3.a LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc -LDMANDOC?= ${LIBMANDOCDIR}/libmandoc.a LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a LIBSMDIR= ${ROOTOBJDIR}/lib/libsm Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Mon Nov 24 21:51:43 2014 (r274988) +++ head/usr.bin/mandoc/Makefile Mon Nov 24 22:12:27 2014 (r274989) @@ -1,7 +1,6 @@ # $FreeBSD$ MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml -LIBMANDOC= ${.OBJDIR}/../../lib/libmandoc/libmandoc.a .PATH: ${MDOCMLDIR} PROG= mandoc @@ -33,7 +32,6 @@ SRCS= ${HTML_SRCS} \ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H -DPADD= ${LIBMANDOC} -LDADD= ${LIBMANDOC} +LIBADD= mandoc .include From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:15:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E865710; Mon, 24 Nov 2014 22:15:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AAEDB75; Mon, 24 Nov 2014 22:15:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOMFVJ2023824; Mon, 24 Nov 2014 22:15:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOMFUqQ023822; Mon, 24 Nov 2014 22:15:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242215.sAOMFUqQ023822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 22:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274990 - in head: share/mk usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:15:31 -0000 Author: bapt Date: Mon Nov 24 22:15:30 2014 New Revision: 274990 URL: https://svnweb.freebsd.org/changeset/base/274990 Log: Convert makefs to LIBADD Add definition of libnetbsd in src.libnames.mk Modified: head/share/mk/src.libnames.mk head/usr.sbin/makefs/Makefile Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 22:12:27 2014 (r274989) +++ head/share/mk/src.libnames.mk Mon Nov 24 22:15:30 2014 (r274990) @@ -22,6 +22,7 @@ _PRIVATELIBS= \ unbound _INTERNALIBS= \ mandoc \ + netbsd \ ohash \ readline \ sm @@ -68,6 +69,7 @@ _LIBRARIES= \ mp \ nandfs \ ncursesw \ + netbsd \ nv \ opie \ pam \ @@ -242,3 +244,6 @@ LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a LIBSMDIR= ${ROOTOBJDIR}/lib/libsm LDSM?= ${LIBSMDIR}/libsm.a LIBSM?= ${LIBSMDIR}/libsm.a + +LIBNETBSDDIR= ${ROOTOBJDIR}/lib/libnetbsd +LIBNETBSD= ${ROOTOBJDIR}/libnetbsd.a Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Mon Nov 24 22:12:27 2014 (r274989) +++ head/usr.sbin/makefs/Makefile Mon Nov 24 22:15:30 2014 (r274990) @@ -30,12 +30,6 @@ SRCS+= pack_dev.c SRCS+= ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd -LIBNETBSDDIR= ${.OBJDIR}/../../lib/libnetbsd -LIBNETBSD= ${LIBNETBSDDIR}/libnetbsd.a -DPADD+= ${LIBNETBSD} -LDADD+= ${LIBNETBSD} - -DPADD+= ${LIBSBUF} ${LIBUTIL} -LDADD+= -lsbuf -lutil +LIBADD= netbsd util sbuf .include From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:17:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB22C886; Mon, 24 Nov 2014 22:17:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97A35B8E; Mon, 24 Nov 2014 22:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOMHah5024111; Mon, 24 Nov 2014 22:17:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOMHaB0024110; Mon, 24 Nov 2014 22:17:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242217.sAOMHaB0024110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 22:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274991 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:17:36 -0000 Author: bapt Date: Mon Nov 24 22:17:35 2014 New Revision: 274991 URL: https://svnweb.freebsd.org/changeset/base/274991 Log: Each time something links to sqlite3 it should link to pthread Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 22:15:30 2014 (r274990) +++ head/share/mk/src.libnames.mk Mon Nov 24 22:17:35 2014 (r274991) @@ -15,6 +15,7 @@ _PRIVATELIBS= \ atf_c \ atf_cxx \ bsdstat \ + heimipcc \ ldns \ sqlite3 \ ssh \ @@ -29,6 +30,7 @@ _INTERNALIBS= \ _LIBRARIES= \ archive \ + asn1 \ atf_c \ atf_cxx \ bsdxml \ @@ -38,6 +40,7 @@ _LIBRARIES= \ capsicum \ casper \ cft \ + com_err \ crypt \ crypto \ cuse \ @@ -54,10 +57,14 @@ _LIBRARIES= \ figpar \ geom \ gssapi \ + heimbase \ + heimipcc \ + hx509 \ ipsec \ jail \ kiconv \ kvm \ + krb5 \ l \ ldns \ lzma \ @@ -80,6 +87,7 @@ _LIBRARIES= \ pthread \ radius \ readline \ + roken \ rpcsec_gss \ rt \ sbuf \ @@ -96,6 +104,7 @@ _LIBRARIES= \ ulog \ usb \ util \ + wind \ wrap \ y \ z @@ -178,6 +187,9 @@ LDADD_${_l}+= ${LDADD_${_d}} DPADD_ucl+= ${DPADD_m} LDADD_ucl+= ${LDADD_m} +DPADD_sqlite3+= ${DPADD_pthread} +DPADD_sqlite3+= ${LDADD_pthread} + .for _l in ${LIBADD} .if ${_PRIVATELIBS:M${_l}} USEPRIVATELIB+= ${_l} @@ -186,6 +198,10 @@ DPADD+= ${DPADD_${_l}} LDADD+= ${LDADD_${_l}} .endfor +.if defined(USEPRIVATELIB) +LDFLAGS+= -rpath ${LIBPRIVATEDIR} +.endif + LIBATF_CDIR= ${ROOTOBJDIR}/lib/atf/libatf-c LDATF_C?= ${LIBATF_CDIR}/libatf-c.so LIBATF_C?= ${LIBATF_CDIR}/libatf-c.a From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:19:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DB18AC1; Mon, 24 Nov 2014 22:19:17 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1694BA9; Mon, 24 Nov 2014 22:19:16 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id r20so7428310wiv.14 for ; Mon, 24 Nov 2014 14:19:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=1TEyA0cBWY2wR/ezzFAepa9HYjC3QlLc2k6KQ0qHi94=; b=OzQBGJE9J+feMGm+uahyw0uptS0EZcJHrYjKBkU1Mo9T4Ki2Qgl+fkFPO6TjMrwEdT F6GsyAeqHZZh77ZSaHU/oDWEqlrvpAbkW7+4Evv6iy3JmktH/odB3CA0NqgIYL8ynZQX YY9rMujBNdyqMLDmCYzGOm74chQT3BmwU3R1yUBczthD3nT+nO4yh/ygHW7UO3yHRZrE YRBG5MNyM325W5hk60NYdiws48LhRYRLAFKgxzFcKv4Qd3Ht2bps0O6YVTvEd+GtTX4s Anup2EJeYZw2x3RmW5vELQyD/O7OXp/TqG4EMKDzr8+WQXDlC2wCLRWfDW26Ep3l8Rxr 6Zlg== X-Received: by 10.180.77.170 with SMTP id t10mr26157237wiw.57.1416867555374; Mon, 24 Nov 2014 14:19:15 -0800 (PST) Received: from brick.home (adha29.neoplus.adsl.tpnet.pl. [79.184.156.29]) by mx.google.com with ESMTPSA id j1sm11104729wjw.25.2014.11.24.14.19.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 14:19:14 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 24 Nov 2014 23:19:12 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Alexander Motin Subject: Re: svn commit: r274962 - head/sys/cam/ctl Message-ID: <20141124221912.GA8108@brick.home> Mail-Followup-To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201411241137.sAOBbSeF097180@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411241137.sAOBbSeF097180@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:19:17 -0000 On 1124T1137, Alexander Motin wrote: > Author: mav > Date: Mon Nov 24 11:37:27 2014 > New Revision: 274962 > URL: https://svnweb.freebsd.org/changeset/base/274962 > > Log: > Replace home-grown CTL IO allocator with UMA. > > Old allocator created significant lock congestion protecting its lists > of preallocated I/Os, while UMA provides much better SMP scalability. > The downside of UMA is lack of reliable preallocation, that could guarantee > successful allocation in non-sleepable environments. But careful code > review shown, that only CAM target frontend really has that requirement. > Fix that making that frontend preallocate and statically bind CTL I/O for > every ATIO/INOT it preallocates any way. That allows to avoid allocations > in hot I/O path. Other frontends either may sleep in allocation context > or can properly handle allocation errors. > > On 40-core server with 6 ZVOL-backed LUNs and 7 iSCSI client connections > this change increases peak performance from ~700K to >1M IOPS! Yay! :) Hell yeah! From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:19:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC87AC29; Mon, 24 Nov 2014 22:19:42 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48345BB5; Mon, 24 Nov 2014 22:19:42 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id x12so13530774wgg.36 for ; Mon, 24 Nov 2014 14:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=oHZevJbM68tKH25a3873TAMEtX8TlVj2LawN/hAeqBY=; b=io5kS9w12vgd06aV5a7sWgyC5yPp5KCYrF1Bs73BuNoh8PorM+Gnnb8tzbM5D22tCf MXyGIt+VsP6DbodEhZs7n7i0yBazwpUzjviRzWdy3DX4+1AGTEWbn2ubdt0q124q3yCa Vd/z+7JbcR3OFc+qBicSHQ0wZlam9OF6+1tMSz91QOcEUpjoDRxu9kPixUs5lV39Z2tf eBHs1CDsv+5+4n+0ZYcRYVydmuCB8zCH+M1CwMKKfstoZ1yYXdEbyOKUrtQFYZg0w39T IFbWLW1NifDvPJELs3zeryxcjM7qyxuXrZfs+rxrl2UE0+u8PiG3nEcoFPSGcVnbGkR/ Zmsw== X-Received: by 10.180.39.106 with SMTP id o10mr26122024wik.54.1416867580620; Mon, 24 Nov 2014 14:19:40 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id iz19sm13855516wic.8.2014.11.24.14.19.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 14:19:39 -0800 (PST) Sender: Baptiste Daroussin Date: Mon, 24 Nov 2014 23:19:36 +0100 From: Baptiste Daroussin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274991 - head/share/mk Message-ID: <20141124221936.GD11567@ivaldir.etoilebsd.net> References: <201411242217.sAOMHaB0024110@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bGR76rFJjkSxVeRa" Content-Disposition: inline In-Reply-To: <201411242217.sAOMHaB0024110@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:19:42 -0000 --bGR76rFJjkSxVeRa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 24, 2014 at 10:17:36PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Mon Nov 24 22:17:35 2014 > New Revision: 274991 > URL: https://svnweb.freebsd.org/changeset/base/274991 >=20 > Log: > Each time something links to sqlite3 it should link to pthread >=20 Hey closed the editor too fast. Define more libraries Add rpath for everything linking to a privatelib regards, Bapt --bGR76rFJjkSxVeRa Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRzrvgACgkQ8kTtMUmk6EzBAgCgnCIHNv6diN2iXhJOVzOPGmCw wuQAn0q0CcChaWht13kcqPHt8KVlFKOA =VmaV -----END PGP SIGNATURE----- --bGR76rFJjkSxVeRa-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:29:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73356F63; Mon, 24 Nov 2014 22:29:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F2B7C9B; Mon, 24 Nov 2014 22:29:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOMTHK7029101; Mon, 24 Nov 2014 22:29:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOMTHNR029100; Mon, 24 Nov 2014 22:29:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242229.sAOMTHNR029100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 22:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274992 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:29:17 -0000 Author: bapt Date: Mon Nov 24 22:29:16 2014 New Revision: 274992 URL: https://svnweb.freebsd.org/changeset/base/274992 Log: Avoid code duplication by directly adding _INSTALLLIBS and _PRIVATELIBS into _LIBRARIES Reported by: emaste Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 22:17:35 2014 (r274991) +++ head/share/mk/src.libnames.mk Mon Nov 24 22:29:16 2014 (r274992) @@ -21,6 +21,7 @@ _PRIVATELIBS= \ ssh \ ucl \ unbound + _INTERNALIBS= \ mandoc \ netbsd \ @@ -29,10 +30,10 @@ _INTERNALIBS= \ sm _LIBRARIES= \ + ${_PRIVATELIBS} \ + ${_INTERNALIBS} \ archive \ asn1 \ - atf_c \ - atf_cxx \ bsdxml \ bsnmp \ bz2 \ @@ -58,7 +59,6 @@ _LIBRARIES= \ geom \ gssapi \ heimbase \ - heimipcc \ hx509 \ ipsec \ jail \ @@ -66,7 +66,6 @@ _LIBRARIES= \ kvm \ krb5 \ l \ - ldns \ lzma \ m \ magic \ @@ -76,7 +75,6 @@ _LIBRARIES= \ mp \ nandfs \ ncursesw \ - netbsd \ nv \ opie \ pam \ @@ -93,13 +91,11 @@ _LIBRARIES= \ sbuf \ sm \ smb \ - ssh \ ssl \ stdthreads \ supcplusplus \ tacplus \ termcapw \ - ucl \ ufs \ ulog \ usb \ From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:32:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2809A255; Mon, 24 Nov 2014 22:32:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14A53D53; Mon, 24 Nov 2014 22:32:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOMWIHR032968; Mon, 24 Nov 2014 22:32:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOMWIvW032967; Mon, 24 Nov 2014 22:32:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242232.sAOMWIvW032967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 22:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274993 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:32:19 -0000 Author: bapt Date: Mon Nov 24 22:32:18 2014 New Revision: 274993 URL: https://svnweb.freebsd.org/changeset/base/274993 Log: Fix dependencies in case of building statically Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 22:29:16 2014 (r274992) +++ head/share/mk/src.libnames.mk Mon Nov 24 22:32:18 2014 (r274993) @@ -171,7 +171,7 @@ LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} .endif DPADD_${_l}?= ${LIB${_l:tu}} LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} -.if defined(${_l}_depend) && defined(NO_SHARED) +.if defined(_DP_${_l}) && defined(NO_SHARED) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} LDADD_${_l}+= ${LDADD_${_d}} From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 22:35:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BD8C53D; Mon, 24 Nov 2014 22:35:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B04D83; Mon, 24 Nov 2014 22:35:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAOMZX8E034610; Mon, 24 Nov 2014 22:35:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAOMZXqc034609; Mon, 24 Nov 2014 22:35:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242235.sAOMZXqc034609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 22:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274994 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 22:35:33 -0000 Author: bapt Date: Mon Nov 24 22:35:32 2014 New Revision: 274994 URL: https://svnweb.freebsd.org/changeset/base/274994 Log: Fix typo Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 22:32:18 2014 (r274993) +++ head/share/mk/src.libnames.mk Mon Nov 24 22:35:32 2014 (r274994) @@ -184,7 +184,7 @@ DPADD_ucl+= ${DPADD_m} LDADD_ucl+= ${LDADD_m} DPADD_sqlite3+= ${DPADD_pthread} -DPADD_sqlite3+= ${LDADD_pthread} +LDADD_sqlite3+= ${LDADD_pthread} .for _l in ${LIBADD} .if ${_PRIVATELIBS:M${_l}} From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 23:29:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 812EBFB8; Mon, 24 Nov 2014 23:29:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D9D72DF; Mon, 24 Nov 2014 23:29:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAONTvVR058479; Mon, 24 Nov 2014 23:29:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAONTvxi058478; Mon, 24 Nov 2014 23:29:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242329.sAONTvxi058478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 23:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274995 - head/usr.bin/demandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 23:29:57 -0000 Author: bapt Date: Mon Nov 24 23:29:56 2014 New Revision: 274995 URL: https://svnweb.freebsd.org/changeset/base/274995 Log: Forgot to convert demandoc along with mandoc Modified: head/usr.bin/demandoc/Makefile Modified: head/usr.bin/demandoc/Makefile ============================================================================== --- head/usr.bin/demandoc/Makefile Mon Nov 24 22:35:32 2014 (r274994) +++ head/usr.bin/demandoc/Makefile Mon Nov 24 23:29:56 2014 (r274995) @@ -4,9 +4,8 @@ PROG= demandoc -LDADD= ${LDMANDOC} -DPADD= ${LIBMANDOC} - WARNS?= 5 +LIBADD= mandoc + .include From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 23:45:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DCF03A8; Mon, 24 Nov 2014 23:45:12 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA2BC68A; Mon, 24 Nov 2014 23:45:11 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id l15so7567073wiw.16 for ; Mon, 24 Nov 2014 15:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=E/amrev48BoM0ocjEyefyQKkqAW+AHjMaVRqe0rBrzc=; b=tKvgBf7TUwXp6XvzdD2jIvBa5C4JtMBk0gTp83Occ/MT85KeFUo3VjzWDE5bq730y3 erqUna11ji+Bx9gANPtMYUx0fEVVMuckHQ6LvN7ARgb+qGM7wHqjlswN/7RazqYsXxTo bqmEp+PIqQ1o2YgnBVUbe8pZUnXd0qRUYspLoZmJ+t8Cvm/EkQEj4xdJO928Jh+NSoQb I4w7UUvlY0CW4ftApS89iTLE/cZtKBxeScXT0ntyg9HernkkJJqBmq0ha6iizK3xhBCJ 8bAfsYIG1lK81OxL+qzsjcf64Js4SxhGvtAFiexe3zgkuYbQAwND5o2L8W0flgb/TUjA wpHA== MIME-Version: 1.0 X-Received: by 10.180.99.105 with SMTP id ep9mr26145855wib.26.1416872710216; Mon, 24 Nov 2014 15:45:10 -0800 (PST) Received: by 10.216.106.136 with HTTP; Mon, 24 Nov 2014 15:45:10 -0800 (PST) Received: by 10.216.106.136 with HTTP; Mon, 24 Nov 2014 15:45:10 -0800 (PST) In-Reply-To: <201411231201.sANC1rW1025589@svn.freebsd.org> References: <201411231201.sANC1rW1025589@svn.freebsd.org> Date: Mon, 24 Nov 2014 15:45:10 -0800 Message-ID: Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 23:45:12 -0000 Why'd you make it all a union in strict buf? Adrian On Nov 23, 2014 5:01 AM, "Gleb Smirnoff" wrote: > Author: glebius > Date: Sun Nov 23 12:01:52 2014 > New Revision: 274914 > URL: https://svnweb.freebsd.org/changeset/base/274914 > > Log: > Merge from projects/sendfile: > > o Provide a new VOP_GETPAGES_ASYNC(), which works like VOP_GETPAGES(), > but > doesn't sleep. It returns immediately, and will execute the I/O done > handler > function that must be supplied as argument. > o Provide VOP_GETPAGES_ASYNC() for the FFS, which uses vnode_pager. > o Extend pagertab to support pgo_getpages_async method, and implement > this > method for vnode_pager. > > Reviewed by: kib > Tested by: pho > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > > Modified: > head/sys/kern/vfs_default.c > head/sys/kern/vnode_if.src > head/sys/sys/buf.h > head/sys/sys/vnode.h > head/sys/ufs/ffs/ffs_vnops.c > head/sys/vm/swap_pager.c > head/sys/vm/vm_pager.h > head/sys/vm/vnode_pager.c > head/sys/vm/vnode_pager.h > > Modified: head/sys/kern/vfs_default.c > > ============================================================================== > --- head/sys/kern/vfs_default.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/kern/vfs_default.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -83,6 +83,7 @@ static int vop_stdset_text(struct vop_se > static int vop_stdunset_text(struct vop_unset_text_args *ap); > static int vop_stdget_writecount(struct vop_get_writecount_args *ap); > static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); > +static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); > > /* > * This vnode table stores what we want to do if the filesystem doesn't > @@ -111,6 +112,7 @@ struct vop_vector default_vnodeops = { > .vop_close = VOP_NULL, > .vop_fsync = VOP_NULL, > .vop_getpages = vop_stdgetpages, > + .vop_getpages_async = vop_stdgetpages_async, > .vop_getwritemount = vop_stdgetwritemount, > .vop_inactive = VOP_NULL, > .vop_ioctl = VOP_ENOTTY, > @@ -725,7 +727,17 @@ vop_stdgetpages(ap) > { > > return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, > - ap->a_count, ap->a_reqpage); > + ap->a_count, ap->a_reqpage, NULL, NULL); > +} > + > +static int > +vop_stdgetpages_async(struct vop_getpages_async_args *ap) > +{ > + int error; > + > + error = VOP_GETPAGES(ap->a_vp, ap->a_m, ap->a_count, > ap->a_reqpage); > + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_reqpage, error); > + return (error); > } > > int > > Modified: head/sys/kern/vnode_if.src > > ============================================================================== > --- head/sys/kern/vnode_if.src Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/kern/vnode_if.src Sun Nov 23 12:01:52 2014 (r274914) > @@ -476,6 +476,19 @@ vop_getpages { > }; > > > +%% getpages_async vp L L L > + > +vop_getpages_async { > + IN struct vnode *vp; > + IN vm_page_t *m; > + IN int count; > + IN int reqpage; > + IN vm_ooffset_t offset; > + IN vop_getpages_iodone_t *iodone; > + IN void *arg; > +}; > + > + > %% putpages vp L L L > > vop_putpages { > > Modified: head/sys/sys/buf.h > > ============================================================================== > --- head/sys/sys/buf.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/sys/buf.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -107,7 +107,6 @@ struct buf { > off_t b_offset; /* Offset into file. */ > TAILQ_ENTRY(buf) b_bobufs; /* (V) Buffer's associated vnode. > */ > uint32_t b_vflags; /* (V) BV_* flags */ > - TAILQ_ENTRY(buf) b_freelist; /* (Q) Free list position > inactive. */ > unsigned short b_qindex; /* (Q) buffer queue index */ > uint32_t b_flags; /* B_* flags. */ > b_xflags_t b_xflags; /* extra flags */ > @@ -124,9 +123,15 @@ struct buf { > struct ucred *b_rcred; /* Read credentials reference. */ > struct ucred *b_wcred; /* Write credentials reference. */ > void *b_saveaddr; /* Original b_addr for physio. */ > - union pager_info { > - int pg_reqpage; > - } b_pager; > + union { > + TAILQ_ENTRY(buf) bu_freelist; /* (Q) */ > + struct { > + void (*pg_iodone)(void *, vm_page_t *, int, > int); > + int pg_reqpage; > + } bu_pager; > + } b_union; > +#define b_freelist b_union.bu_freelist > +#define b_pager b_union.bu_pager > union cluster_info { > TAILQ_HEAD(cluster_list_head, buf) cluster_head; > TAILQ_ENTRY(buf) cluster_entry; > > Modified: head/sys/sys/vnode.h > > ============================================================================== > --- head/sys/sys/vnode.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/sys/vnode.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -574,6 +574,7 @@ vn_canvmio(struct vnode *vp) > /* > * Finally, include the default set of vnode operations. > */ > +typedef void vop_getpages_iodone_t(void *, vm_page_t *, int, int); > #include "vnode_if.h" > > /* vn_open_flags */ > > Modified: head/sys/ufs/ffs/ffs_vnops.c > > ============================================================================== > --- head/sys/ufs/ffs/ffs_vnops.c Sun Nov 23 10:26:28 2014 > (r274913) > +++ head/sys/ufs/ffs/ffs_vnops.c Sun Nov 23 12:01:52 2014 > (r274914) > @@ -124,6 +124,7 @@ struct vop_vector ffs_vnodeops1 = { > .vop_default = &ufs_vnodeops, > .vop_fsync = ffs_fsync, > .vop_getpages = vnode_pager_local_getpages, > + .vop_getpages_async = vnode_pager_local_getpages_async, > .vop_lock1 = ffs_lock, > .vop_read = ffs_read, > .vop_reallocblks = ffs_reallocblks, > @@ -143,6 +144,7 @@ struct vop_vector ffs_vnodeops2 = { > .vop_default = &ufs_vnodeops, > .vop_fsync = ffs_fsync, > .vop_getpages = vnode_pager_local_getpages, > + .vop_getpages_async = vnode_pager_local_getpages_async, > .vop_lock1 = ffs_lock, > .vop_read = ffs_read, > .vop_reallocblks = ffs_reallocblks, > > Modified: head/sys/vm/swap_pager.c > > ============================================================================== > --- head/sys/vm/swap_pager.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/swap_pager.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -361,6 +361,8 @@ static vm_object_t > vm_prot_t prot, vm_ooffset_t offset, struct ucred *); > static void swap_pager_dealloc(vm_object_t object); > static int swap_pager_getpages(vm_object_t, vm_page_t *, int, int); > +static int swap_pager_getpages_async(vm_object_t, vm_page_t *, int, > int, > + pgo_getpages_iodone_t, void *); > static void swap_pager_putpages(vm_object_t, vm_page_t *, int, > boolean_t, int *); > static boolean_t > swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, > int *before, int *after); > @@ -373,6 +375,7 @@ struct pagerops swappagerops = { > .pgo_alloc = swap_pager_alloc, /* allocate an OBJT_SWAP > object */ > .pgo_dealloc = swap_pager_dealloc, /* deallocate an OBJT_SWAP > object */ > .pgo_getpages = swap_pager_getpages, /* pagein > */ > + .pgo_getpages_async = swap_pager_getpages_async, /* pagein > (async) */ > .pgo_putpages = swap_pager_putpages, /* pageout > */ > .pgo_haspage = swap_pager_haspage, /* get backing store > status for page */ > .pgo_pageunswapped = swap_pager_unswapped, /* remove swap > related to page */ > @@ -1257,6 +1260,39 @@ swap_pager_getpages(vm_object_t object, > } > > /* > + * swap_pager_getpages_async(): > + * > + * Right now this is emulation of asynchronous operation on top of > + * swap_pager_getpages(). > + */ > +static int > +swap_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, > + int reqpage, pgo_getpages_iodone_t iodone, void *arg) > +{ > + int r, error; > + > + r = swap_pager_getpages(object, m, count, reqpage); > + VM_OBJECT_WUNLOCK(object); > + switch (r) { > + case VM_PAGER_OK: > + error = 0; > + break; > + case VM_PAGER_ERROR: > + error = EIO; > + break; > + case VM_PAGER_FAIL: > + error = EINVAL; > + break; > + default: > + panic("unhandled swap_pager_getpages() error %d\n", r); > + } > + (iodone)(arg, m, count, error); > + VM_OBJECT_WLOCK(object); > + > + return (r); > +} > + > +/* > * swap_pager_putpages: > * > * Assign swap (if necessary) and initiate I/O on the specified pages. > > Modified: head/sys/vm/vm_pager.h > > ============================================================================== > --- head/sys/vm/vm_pager.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/vm_pager.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -51,6 +51,9 @@ typedef vm_object_t pgo_alloc_t(void *, > struct ucred *); > typedef void pgo_dealloc_t(vm_object_t); > typedef int pgo_getpages_t(vm_object_t, vm_page_t *, int, int); > +typedef void pgo_getpages_iodone_t(void *, vm_page_t *, int, int); > +typedef int pgo_getpages_async_t(vm_object_t, vm_page_t *, int, int, > + pgo_getpages_iodone_t, void *); > typedef void pgo_putpages_t(vm_object_t, vm_page_t *, int, int, int *); > typedef boolean_t pgo_haspage_t(vm_object_t, vm_pindex_t, int *, int *); > typedef void pgo_pageunswapped_t(vm_page_t); > @@ -60,6 +63,7 @@ struct pagerops { > pgo_alloc_t *pgo_alloc; /* Allocate pager. > */ > pgo_dealloc_t *pgo_dealloc; /* Disassociate. */ > pgo_getpages_t *pgo_getpages; /* Get (read) > page. */ > + pgo_getpages_async_t *pgo_getpages_async; /* Get page > asyncly. */ > pgo_putpages_t *pgo_putpages; /* Put (write) > page. */ > pgo_haspage_t *pgo_haspage; /* Query page. */ > pgo_pageunswapped_t *pgo_pageunswapped; > @@ -103,6 +107,8 @@ vm_object_t vm_pager_allocate(objtype_t, > void vm_pager_bufferinit(void); > void vm_pager_deallocate(vm_object_t); > static __inline int vm_pager_get_pages(vm_object_t, vm_page_t *, int, > int); > +static inline int vm_pager_get_pages_async(vm_object_t, vm_page_t *, int, > + int, pgo_getpages_iodone_t, void *); > static __inline boolean_t vm_pager_has_page(vm_object_t, vm_pindex_t, int > *, int *); > void vm_pager_init(void); > vm_object_t vm_pager_object_lookup(struct pagerlst *, void *); > @@ -133,6 +139,16 @@ vm_pager_get_pages( > return (r); > } > > +static inline int > +vm_pager_get_pages_async(vm_object_t object, vm_page_t *m, int count, > + int reqpage, pgo_getpages_iodone_t iodone, void *arg) > +{ > + > + VM_OBJECT_ASSERT_WLOCKED(object); > + return ((*pagertab[object->type]->pgo_getpages_async)(object, m, > + count, reqpage, iodone, arg)); > +} > + > static __inline void > vm_pager_put_pages( > vm_object_t object, > > Modified: head/sys/vm/vnode_pager.c > > ============================================================================== > --- head/sys/vm/vnode_pager.c Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/vnode_pager.c Sun Nov 23 12:01:52 2014 (r274914) > @@ -82,16 +82,23 @@ static int vnode_pager_addr(struct vnode > static int vnode_pager_input_smlfs(vm_object_t object, vm_page_t m); > static int vnode_pager_input_old(vm_object_t object, vm_page_t m); > static void vnode_pager_dealloc(vm_object_t); > +static int vnode_pager_local_getpages0(struct vnode *, vm_page_t *, int, > int, > + vop_getpages_iodone_t, void *); > static int vnode_pager_getpages(vm_object_t, vm_page_t *, int, int); > +static int vnode_pager_getpages_async(vm_object_t, vm_page_t *, int, int, > + vop_getpages_iodone_t, void *); > static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, int, int > *); > static boolean_t vnode_pager_haspage(vm_object_t, vm_pindex_t, int *, int > *); > static vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t, > vm_ooffset_t, struct ucred *cred); > +static int vnode_pager_generic_getpages_done(struct buf *); > +static void vnode_pager_generic_getpages_done_async(struct buf *); > > struct pagerops vnodepagerops = { > .pgo_alloc = vnode_pager_alloc, > .pgo_dealloc = vnode_pager_dealloc, > .pgo_getpages = vnode_pager_getpages, > + .pgo_getpages_async = vnode_pager_getpages_async, > .pgo_putpages = vnode_pager_putpages, > .pgo_haspage = vnode_pager_haspage, > }; > @@ -664,16 +671,51 @@ vnode_pager_getpages(vm_object_t object, > return rtval; > } > > +static int > +vnode_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, > + int reqpage, vop_getpages_iodone_t iodone, void *arg) > +{ > + struct vnode *vp; > + int rtval; > + > + vp = object->handle; > + VM_OBJECT_WUNLOCK(object); > + rtval = VOP_GETPAGES_ASYNC(vp, m, count * PAGE_SIZE, reqpage, 0, > + iodone, arg); > + KASSERT(rtval != EOPNOTSUPP, > + ("vnode_pager: FS getpages_async not implemented\n")); > + VM_OBJECT_WLOCK(object); > + return (rtval); > +} > + > /* > - * The implementation of VOP_GETPAGES() for local filesystems, where > - * partially valid pages can only occur at the end of file. > + * The implementation of VOP_GETPAGES() and VOP_GETPAGES_ASYNC() for > + * local filesystems, where partially valid pages can only occur at > + * the end of file. > */ > int > vnode_pager_local_getpages(struct vop_getpages_args *ap) > { > + > + return (vnode_pager_local_getpages0(ap->a_vp, ap->a_m, ap->a_count, > + ap->a_reqpage, NULL, NULL)); > +} > + > +int > +vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap) > +{ > + > + return (vnode_pager_local_getpages0(ap->a_vp, ap->a_m, ap->a_count, > + ap->a_reqpage, ap->a_iodone, ap->a_arg)); > +} > + > +static int > +vnode_pager_local_getpages0(struct vnode *vp, vm_page_t *m, int bytecount, > + int reqpage, vop_getpages_iodone_t iodone, void *arg) > +{ > vm_page_t mreq; > > - mreq = ap->a_m[ap->a_reqpage]; > + mreq = m[reqpage]; > > /* > * Since the caller has busied the requested page, that page's > valid > @@ -688,13 +730,15 @@ vnode_pager_local_getpages(struct vop_ge > * pages, since no i/o is done to read its content. > */ > if (mreq->valid != 0) { > - vm_pager_free_nonreq(mreq->object, ap->a_m, ap->a_reqpage, > - round_page(ap->a_count) / PAGE_SIZE); > + vm_pager_free_nonreq(mreq->object, m, reqpage, > + round_page(bytecount) / PAGE_SIZE); > + if (iodone != NULL) > + iodone(arg, m, reqpage, 0); > return (VM_PAGER_OK); > } > > - return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, > - ap->a_count, ap->a_reqpage)); > + return (vnode_pager_generic_getpages(vp, m, bytecount, reqpage, > + iodone, arg)); > } > > /* > @@ -703,11 +747,10 @@ vnode_pager_local_getpages(struct vop_ge > */ > int > vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int > bytecount, > - int reqpage) > + int reqpage, vop_getpages_iodone_t iodone, void *arg) > { > vm_object_t object; > - vm_offset_t kva; > - off_t foff, tfoff, nextoff; > + off_t foff; > int i, j, size, bsize, first; > daddr_t firstaddr, reqblock; > struct bufobj *bo; > @@ -899,7 +942,7 @@ vnode_pager_generic_getpages(struct vnod > } > > bp = getpbuf(&vnode_pbuf_freecnt); > - kva = (vm_offset_t)bp->b_data; > + bp->b_kvaalloc = bp->b_data; > > /* > * and map the pages to be read into the kva, if the filesystem > @@ -911,15 +954,11 @@ vnode_pager_generic_getpages(struct vnod > bp->b_kvabase = unmapped_buf; > bp->b_offset = 0; > bp->b_flags |= B_UNMAPPED; > - bp->b_npages = count; > - for (i = 0; i < count; i++) > - bp->b_pages[i] = m[i]; > } else > - pmap_qenter(kva, m, count); > + pmap_qenter((vm_offset_t)bp->b_kvaalloc, m, count); > > /* build a minimal buffer header */ > bp->b_iocmd = BIO_READ; > - bp->b_iodone = bdone; > KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred")); > KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred")); > bp->b_rcred = crhold(curthread->td_ucred); > @@ -930,6 +969,10 @@ vnode_pager_generic_getpages(struct vnod > bp->b_bcount = size; > bp->b_bufsize = size; > bp->b_runningbufspace = bp->b_bufsize; > + for (i = 0; i < count; i++) > + bp->b_pages[i] = m[i]; > + bp->b_npages = count; > + bp->b_pager.pg_reqpage = reqpage; > atomic_add_long(&runningbufspace, bp->b_runningbufspace); > > PCPU_INC(cnt.v_vnodein); > @@ -937,43 +980,79 @@ vnode_pager_generic_getpages(struct vnod > > /* do the input */ > bp->b_iooffset = dbtob(bp->b_blkno); > - bstrategy(bp); > > - bwait(bp, PVM, "vnread"); > + if (iodone != NULL) { /* async */ > + bp->b_pager.pg_iodone = iodone; > + bp->b_caller1 = arg; > + bp->b_iodone = vnode_pager_generic_getpages_done_async; > + bp->b_flags |= B_ASYNC; > + BUF_KERNPROC(bp); > + bstrategy(bp); > + /* Good bye! */ > + } else { > + bp->b_iodone = bdone; > + bstrategy(bp); > + bwait(bp, PVM, "vnread"); > + error = vnode_pager_generic_getpages_done(bp); > + for (int i = 0; i < bp->b_npages; i++) > + bp->b_pages[i] = NULL; > + bp->b_vp = NULL; > + pbrelbo(bp); > + relpbuf(bp, &vnode_pbuf_freecnt); > + } > + > + return (error != 0 ? VM_PAGER_ERROR : VM_PAGER_OK); > +} > + > +static void > +vnode_pager_generic_getpages_done_async(struct buf *bp) > +{ > + int error; > + > + error = vnode_pager_generic_getpages_done(bp); > + bp->b_pager.pg_iodone(bp->b_caller1, bp->b_pages, > + bp->b_pager.pg_reqpage, error); > + for (int i = 0; i < bp->b_npages; i++) > + bp->b_pages[i] = NULL; > + bp->b_vp = NULL; > + pbrelbo(bp); > + relpbuf(bp, &vnode_pbuf_freecnt); > +} > + > +static int > +vnode_pager_generic_getpages_done(struct buf *bp) > +{ > + vm_object_t object; > + off_t tfoff, nextoff; > + int i, error; > > - if ((bp->b_ioflags & BIO_ERROR) != 0) > - error = EIO; > + error = (bp->b_ioflags & BIO_ERROR) != 0 ? EIO : 0; > + object = bp->b_vp->v_object; > > - if (error == 0 && size != count * PAGE_SIZE) { > + if (error == 0 && bp->b_bcount != bp->b_npages * PAGE_SIZE) { > if ((bp->b_flags & B_UNMAPPED) != 0) { > bp->b_flags &= ~B_UNMAPPED; > - pmap_qenter(kva, m, count); > + pmap_qenter((vm_offset_t)bp->b_kvaalloc, > bp->b_pages, > + bp->b_npages); > } > - bzero((caddr_t)kva + size, PAGE_SIZE * count - size); > + bzero(bp->b_kvaalloc + bp->b_bcount, > + PAGE_SIZE * bp->b_npages - bp->b_bcount); > } > if ((bp->b_flags & B_UNMAPPED) == 0) > - pmap_qremove(kva, count); > - if ((vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) { > - bp->b_data = (caddr_t)kva; > - bp->b_kvabase = (caddr_t)kva; > + pmap_qremove((vm_offset_t)bp->b_kvaalloc, bp->b_npages); > + if ((bp->b_vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) { > + bp->b_data = bp->b_kvaalloc; > + bp->b_kvabase = bp->b_kvaalloc; > bp->b_flags &= ~B_UNMAPPED; > - for (i = 0; i < count; i++) > - bp->b_pages[i] = NULL; > } > > - /* > - * free the buffer header back to the swap buffer pool > - */ > - bp->b_vp = NULL; > - pbrelbo(bp); > - relpbuf(bp, &vnode_pbuf_freecnt); > - > VM_OBJECT_WLOCK(object); > - for (i = 0, tfoff = foff; i < count; i++, tfoff = nextoff) { > + for (i = 0, tfoff = IDX_TO_OFF(bp->b_pages[0]->pindex); > + i < bp->b_npages; i++, tfoff = nextoff) { > vm_page_t mt; > > nextoff = tfoff + PAGE_SIZE; > - mt = m[i]; > + mt = bp->b_pages[i]; > > if (nextoff <= object->un_pager.vnp.vnp_size) { > /* > @@ -999,14 +1078,14 @@ vnode_pager_generic_getpages(struct vnod > ("%s: page %p is dirty", __func__, mt)); > } > > - if (i != reqpage) > + if (i != bp->b_pager.pg_reqpage) > vm_page_readahead_finish(mt); > } > VM_OBJECT_WUNLOCK(object); > - if (error) { > - printf("vnode_pager_getpages: I/O read error\n"); > - } > - return (error ? VM_PAGER_ERROR : VM_PAGER_OK); > + if (error != 0) > + printf("%s: I/O read error %d\n", __func__, error); > + > + return (error); > } > > /* > > Modified: head/sys/vm/vnode_pager.h > > ============================================================================== > --- head/sys/vm/vnode_pager.h Sun Nov 23 10:26:28 2014 (r274913) > +++ head/sys/vm/vnode_pager.h Sun Nov 23 12:01:52 2014 (r274914) > @@ -41,11 +41,12 @@ > #ifdef _KERNEL > > int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, > - int count, int reqpage); > + int count, int reqpage, vop_getpages_iodone_t iodone, void *arg); > int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, > int count, boolean_t sync, > int *rtvals); > int vnode_pager_local_getpages(struct vop_getpages_args *ap); > +int vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap); > > void vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, > vm_offset_t end); > > From owner-svn-src-head@FreeBSD.ORG Mon Nov 24 23:58:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24320A74; Mon, 24 Nov 2014 23:58:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10E117FC; Mon, 24 Nov 2014 23:58:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAONw4Jo073029; Mon, 24 Nov 2014 23:58:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAONw4Tb073028; Mon, 24 Nov 2014 23:58:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411242358.sAONw4Tb073028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 24 Nov 2014 23:58:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274996 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 23:58:05 -0000 Author: bapt Date: Mon Nov 24 23:58:04 2014 New Revision: 274996 URL: https://svnweb.freebsd.org/changeset/base/274996 Log: s/cft/ctf Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 23:29:56 2014 (r274995) +++ head/share/mk/src.libnames.mk Mon Nov 24 23:58:04 2014 (r274996) @@ -40,7 +40,7 @@ _LIBRARIES= \ cam \ capsicum \ casper \ - cft \ + ctf \ com_err \ crypt \ crypto \ @@ -140,7 +140,7 @@ _DP_proc= supcplusplus .endif .endif .if ${MK_CDDL} != "no" -_DP_proc+= cft +_DP_proc+= ctf .endif _DP_mp= crypto _DP_memstat= kvm From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 00:01:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84E88C40; Tue, 25 Nov 2014 00:01:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 719838C6; Tue, 25 Nov 2014 00:01:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP01sEZ077361; Tue, 25 Nov 2014 00:01:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP01s3k077360; Tue, 25 Nov 2014 00:01:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250001.sAP01s3k077360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 00:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274997 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 00:01:54 -0000 Author: bapt Date: Tue Nov 25 00:01:53 2014 New Revision: 274997 URL: https://svnweb.freebsd.org/changeset/base/274997 Log: Define special case for atf which libraries names are different from their declaration Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 24 23:58:04 2014 (r274996) +++ head/share/mk/src.libnames.mk Tue Nov 25 00:01:53 2014 (r274997) @@ -161,6 +161,8 @@ _DP_devstat= kvm # Define spacial cases LDADD_supcplusplus= -lsupc++ +LDADD_atf_c= -L${LIBATF_CDIR} -latf-c +LDADD_atf_cxx= -L${LIBATF_CXXDIR} -latf-c++ .for _l in ${_LIBRARIES} .if ${_PRIVATELIBS:M${_l}} From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 00:07:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E9BCE17; Tue, 25 Nov 2014 00:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B0DC8FE; Tue, 25 Nov 2014 00:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP07uRu078770; Tue, 25 Nov 2014 00:07:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP07uZR078769; Tue, 25 Nov 2014 00:07:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411250007.sAP07uZR078769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 25 Nov 2014 00:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274998 - head/usr.sbin/nmtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 00:07:57 -0000 Author: delphij Date: Tue Nov 25 00:07:56 2014 New Revision: 274998 URL: https://svnweb.freebsd.org/changeset/base/274998 Log: Fix build. Modified: head/usr.sbin/nmtree/Makefile Modified: head/usr.sbin/nmtree/Makefile ============================================================================== --- head/usr.sbin/nmtree/Makefile Tue Nov 25 00:01:53 2014 (r274997) +++ head/usr.sbin/nmtree/Makefile Tue Nov 25 00:07:56 2014 (r274998) @@ -15,11 +15,7 @@ CFLAGS+= -I${.CURDIR}/../../contrib/mkno .PATH: ${.CURDIR}/../../contrib/mknod SRCS+= pack_dev.c -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd -LIBNETBSDDIR= ${.OBJDIR}/../../lib/libnetbsd -LIBNETBSD= ${LIBNETBSDDIR}/libnetbsd.a -DPADD+= ${LIBNETBSD} -LDADD+= ${LIBNETBSD} +LIBADD= netbsd LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree MLINKS= mtree.8 nmtree.8 From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 00:12:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9AF6FA8; Tue, 25 Nov 2014 00:12:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6A4A9D1; Tue, 25 Nov 2014 00:12:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP0CPkP082795; Tue, 25 Nov 2014 00:12:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP0CPjC082794; Tue, 25 Nov 2014 00:12:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250012.sAP0CPjC082794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 00:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274999 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 00:12:26 -0000 Author: bapt Date: Tue Nov 25 00:12:25 2014 New Revision: 274999 URL: https://svnweb.freebsd.org/changeset/base/274999 Log: Do not overwrite any LIBNETBSD or LIBNETBSDDIR if they are already defined Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 00:07:56 2014 (r274998) +++ head/share/mk/src.libnames.mk Tue Nov 25 00:12:25 2014 (r274999) @@ -259,5 +259,5 @@ LIBSMDIR= ${ROOTOBJDIR}/lib/libsm LDSM?= ${LIBSMDIR}/libsm.a LIBSM?= ${LIBSMDIR}/libsm.a -LIBNETBSDDIR= ${ROOTOBJDIR}/lib/libnetbsd -LIBNETBSD= ${ROOTOBJDIR}/libnetbsd.a +LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd +LIBNETBSD?= ${ROOTOBJDIR}/libnetbsd.a From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 00:28:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0883537B; Tue, 25 Nov 2014 00:28:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E96D6B2A; Tue, 25 Nov 2014 00:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP0SRbr088331; Tue, 25 Nov 2014 00:28:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP0SRVF088330; Tue, 25 Nov 2014 00:28:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250028.sAP0SRVF088330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 00:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275000 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 00:28:28 -0000 Author: bapt Date: Tue Nov 25 00:28:27 2014 New Revision: 275000 URL: https://svnweb.freebsd.org/changeset/base/275000 Log: libatf-c++ exposes libatf-c abi hence we need to explicit link to atf-c if atf-c++ is requested Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 00:12:25 2014 (r274999) +++ head/share/mk/src.libnames.mk Tue Nov 25 00:28:27 2014 (r275000) @@ -188,6 +188,9 @@ LDADD_ucl+= ${LDADD_m} DPADD_sqlite3+= ${DPADD_pthread} LDADD_sqlite3+= ${LDADD_pthread} +DPADD_atf_cxx+= ${DPADD_atf_c} +LDADD_atf_cxx+= ${LDADD_atf_c} + .for _l in ${LIBADD} .if ${_PRIVATELIBS:M${_l}} USEPRIVATELIB+= ${_l} From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 00:51:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CF6B876; Tue, 25 Nov 2014 00:51:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09877DD7; Tue, 25 Nov 2014 00:51:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP0pn6N098851; Tue, 25 Nov 2014 00:51:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP0pnrg098850; Tue, 25 Nov 2014 00:51:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250051.sAP0pnrg098850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 00:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275001 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 00:51:50 -0000 Author: bapt Date: Tue Nov 25 00:51:49 2014 New Revision: 275001 URL: https://svnweb.freebsd.org/changeset/base/275001 Log: libevent is an internallib Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 00:28:27 2014 (r275000) +++ head/share/mk/src.libnames.mk Tue Nov 25 00:51:49 2014 (r275001) @@ -23,6 +23,7 @@ _PRIVATELIBS= \ unbound _INTERNALIBS= \ + event \ mandoc \ netbsd \ ohash \ @@ -52,7 +53,6 @@ _LIBRARIES= \ dwarf \ edit \ elf \ - event \ execinfo \ fetch \ figpar \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 01:12:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AC42CBB; Tue, 25 Nov 2014 01:12:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 077AFFBA; Tue, 25 Nov 2014 01:12:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP1CvmO011396; Tue, 25 Nov 2014 01:12:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP1Cve5011395; Tue, 25 Nov 2014 01:12:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250112.sAP1Cve5011395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 01:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275002 - head/usr.sbin/nmtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 01:12:58 -0000 Author: bapt Date: Tue Nov 25 01:12:57 2014 New Revision: 275002 URL: https://svnweb.freebsd.org/changeset/base/275002 Log: Fix the fix Modified: head/usr.sbin/nmtree/Makefile Modified: head/usr.sbin/nmtree/Makefile ============================================================================== --- head/usr.sbin/nmtree/Makefile Tue Nov 25 00:51:49 2014 (r275001) +++ head/usr.sbin/nmtree/Makefile Tue Nov 25 01:12:57 2014 (r275002) @@ -15,6 +15,7 @@ CFLAGS+= -I${.CURDIR}/../../contrib/mkno .PATH: ${.CURDIR}/../../contrib/mknod SRCS+= pack_dev.c +CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD= netbsd LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 02:58:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE63BC4C; Tue, 25 Nov 2014 02:58:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB0A3C0E; Tue, 25 Nov 2014 02:58:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP2wdcT058455; Tue, 25 Nov 2014 02:58:39 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP2wdtf058454; Tue, 25 Nov 2014 02:58:39 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201411250258.sAP2wdtf058454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 25 Nov 2014 02:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275003 - head/sys/contrib/dev/ral X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 02:58:39 -0000 Author: kevlo Date: Tue Nov 25 02:58:38 2014 New Revision: 275003 URL: https://svnweb.freebsd.org/changeset/base/275003 Log: Add missing headers needed by write(). Modified: head/sys/contrib/dev/ral/Makefile Modified: head/sys/contrib/dev/ral/Makefile ============================================================================== --- head/sys/contrib/dev/ral/Makefile Tue Nov 25 01:12:57 2014 (r275002) +++ head/sys/contrib/dev/ral/Makefile Tue Nov 25 02:58:38 2014 (r275003) @@ -3,7 +3,8 @@ FILES= rt2561s.fw.uu rt2561.fw.uu rt2661.fw.uu rt2860.fw.uu rt2561s.fw.uu: microcode.h LICENSE - (echo '#include '; \ + (echo '#include '; \ + echo '#include '; \ cat microcode.h; \ echo 'int main(void) { \ write(1, rt2561s, sizeof(rt2561s)); return 0; \ @@ -11,7 +12,8 @@ rt2561s.fw.uu: microcode.h LICENSE (sed 's/^/# /' LICENSE; ./build | uuencode rt2561s.fw) > ${.TARGET} rt2561.fw.uu: microcode.h LICENSE - (echo '#include '; \ + (echo '#include '; \ + echo '#include '; \ cat microcode.h; \ echo 'int main(void) { \ write(1, rt2561, sizeof(rt2561)); return 0; \ @@ -19,7 +21,8 @@ rt2561.fw.uu: microcode.h LICENSE (sed 's/^/# /' LICENSE; ./build | uuencode rt2561.fw) > ${.TARGET} rt2661.fw.uu: microcode.h LICENSE - (echo '#include '; \ + (echo '#include '; \ + echo '#include '; \ cat microcode.h; \ echo 'int main(void) { \ write(1, rt2661, sizeof(rt2661)); return 0; \ @@ -27,7 +30,8 @@ rt2661.fw.uu: microcode.h LICENSE (sed 's/^/# /' LICENSE; ./build | uuencode rt2661.fw) > ${.TARGET} rt2860.fw.uu: microcode.h LICENSE - (echo '#include '; \ + (echo '#include '; \ + echo '#include '; \ cat microcode.h; \ echo 'int main(void) { \ write(1, rt2860, sizeof(rt2860)); return 0; \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 03:50:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C43965E0; Tue, 25 Nov 2014 03:50:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA316310; Tue, 25 Nov 2014 03:50:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP3obAO087913; Tue, 25 Nov 2014 03:50:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP3oWG2087885; Tue, 25 Nov 2014 03:50:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411250350.sAP3oWG2087885@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 25 Nov 2014 03:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275004 - in head: lib/libc/gen lib/libc/include lib/libc/sys lib/libkiconv lib/libmd lib/libthr/thread lib/msun/src libexec/rtld-elf sys/amd64/include sys/arm/include sys/i386/include ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 03:50:37 -0000 Author: emaste Date: Tue Nov 25 03:50:31 2014 New Revision: 275004 URL: https://svnweb.freebsd.org/changeset/base/275004 Log: Revert r274772: it is not valid on MIPS Reported by: sbruno Modified: head/lib/libc/gen/errlst.c head/lib/libc/gen/isnan.c head/lib/libc/gen/tls.c head/lib/libc/include/errlst.h head/lib/libc/sys/stack_protector.c head/lib/libc/sys/stack_protector_compat.c head/lib/libkiconv/quirks.c head/lib/libkiconv/xlat16_iconv.c head/lib/libkiconv/xlat16_sysctl.c head/lib/libmd/rmd160c.c head/lib/libmd/sha1c.c head/lib/libthr/thread/thr_exit.c head/lib/libthr/thread/thr_private.h head/lib/msun/src/s_isnan.c head/libexec/rtld-elf/rtld.c head/sys/amd64/include/asm.h head/sys/arm/include/asm.h head/sys/i386/include/asm.h head/sys/powerpc/include/asm.h head/sys/powerpc/include/profile.h head/sys/sparc64/include/asm.h Modified: head/lib/libc/gen/errlst.c ============================================================================== --- head/lib/libc/gen/errlst.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libc/gen/errlst.c Tue Nov 25 03:50:31 2014 (r275004) @@ -158,7 +158,7 @@ const char *const sys_errlist[] = { }; const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); -#ifdef __PIC__ +#ifdef PIC __strong_reference(sys_errlist, __hidden_sys_errlist); __strong_reference(sys_nerr, __hidden_sys_nerr); #endif Modified: head/lib/libc/gen/isnan.c ============================================================================== --- head/lib/libc/gen/isnan.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libc/gen/isnan.c Tue Nov 25 03:50:31 2014 (r275004) @@ -40,7 +40,7 @@ * time, when calling both functions. */ -#ifdef __PIC__ +#ifdef PIC __weak_reference(__isnan, isnan); __weak_reference(__isnanf, isnanf); @@ -61,4 +61,4 @@ __isnanf(float f) u.f = f; return (u.bits.exp == 255 && u.bits.man != 0); } -#endif /* __PIC__ */ +#endif /* PIC */ Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libc/gen/tls.c Tue Nov 25 03:50:31 2014 (r275004) @@ -78,7 +78,7 @@ void __libc_free_tls(void *tls, size_t t #define TLS_VARIANT_II #endif -#ifndef __PIC__ +#ifndef PIC #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) @@ -107,7 +107,7 @@ __libc_tls_get_addr(void *ti __unused) return (0); } -#ifndef __PIC__ +#ifndef PIC #ifdef TLS_VARIANT_I @@ -264,14 +264,14 @@ __libc_free_tls(void *tcb __unused, size { } -#endif /* __PIC__ */ +#endif /* PIC */ extern char **environ; void _init_tls() { -#ifndef __PIC__ +#ifndef PIC Elf_Addr *sp; Elf_Auxinfo *aux, *auxp; Elf_Phdr *phdr; Modified: head/lib/libc/include/errlst.h ============================================================================== --- head/lib/libc/include/errlst.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libc/include/errlst.h Tue Nov 25 03:50:31 2014 (r275004) @@ -31,7 +31,7 @@ #include -#ifdef __PIC__ +#ifdef PIC /* If the main executable imports these, do not use its copy from libc.so. */ extern const char *const __hidden_sys_errlist[] __hidden; extern const int __hidden_sys_nerr __hidden; Modified: head/lib/libc/sys/stack_protector.c ============================================================================== --- head/lib/libc/sys/stack_protector.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libc/sys/stack_protector.c Tue Nov 25 03:50:31 2014 (r275004) @@ -115,6 +115,6 @@ __chk_fail(void) __fail("buffer overflow detected; terminated"); } -#ifndef __PIC__ +#ifndef PIC __weak_reference(__stack_chk_fail, __stack_chk_fail_local); #endif Modified: head/lib/libc/sys/stack_protector_compat.c ============================================================================== --- head/lib/libc/sys/stack_protector_compat.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libc/sys/stack_protector_compat.c Tue Nov 25 03:50:31 2014 (r275004) @@ -8,7 +8,7 @@ __FBSDID("$FreeBSD$"); void __stack_chk_fail(void); -#ifdef __PIC__ +#ifdef PIC void __stack_chk_fail_local_hidden(void) { Modified: head/lib/libkiconv/quirks.c ============================================================================== --- head/lib/libkiconv/quirks.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libkiconv/quirks.c Tue Nov 25 03:50:31 2014 (r275004) @@ -31,7 +31,7 @@ * when statically linked. */ -#ifdef __PIC__ +#ifdef PIC /* * Why do we need quirks? @@ -193,4 +193,4 @@ kiconv_quirkcs(const char* base __unused return (base); } -#endif /* __PIC__ */ +#endif /* PIC */ Modified: head/lib/libkiconv/xlat16_iconv.c ============================================================================== --- head/lib/libkiconv/xlat16_iconv.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libkiconv/xlat16_iconv.c Tue Nov 25 03:50:31 2014 (r275004) @@ -31,7 +31,7 @@ * when statically linked. */ -#ifdef __PIC__ +#ifdef PIC #include #include @@ -462,4 +462,4 @@ kiconv_add_xlat16_cspairs(const char *to return (-1); } -#endif /* __PIC__ */ +#endif /* PIC */ Modified: head/lib/libkiconv/xlat16_sysctl.c ============================================================================== --- head/lib/libkiconv/xlat16_sysctl.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libkiconv/xlat16_sysctl.c Tue Nov 25 03:50:31 2014 (r275004) @@ -37,7 +37,7 @@ * when statically linked. */ -#ifdef __PIC__ +#ifdef PIC #include #include @@ -82,4 +82,4 @@ kiconv_add_xlat16_table(const char *to _ return (EINVAL); } -#endif /* __PIC__ */ +#endif /* PIC */ Modified: head/lib/libmd/rmd160c.c ============================================================================== --- head/lib/libmd/rmd160c.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libmd/rmd160c.c Tue Nov 25 03:50:31 2014 (r275004) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); * The assembly-language code is not position-independent, so don't * try to use it in a shared library. */ -#ifdef __PIC__ +#ifdef PIC #undef RMD160_ASM #endif Modified: head/lib/libmd/sha1c.c ============================================================================== --- head/lib/libmd/sha1c.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libmd/sha1c.c Tue Nov 25 03:50:31 2014 (r275004) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); * The assembly-language code is not position-independent, so don't * try to use it in a shared library. */ -#ifdef __PIC__ +#ifdef PIC #undef SHA1_ASM #endif Modified: head/lib/libthr/thread/thr_exit.c ============================================================================== --- head/lib/libthr/thread/thr_exit.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libthr/thread/thr_exit.c Tue Nov 25 03:50:31 2014 (r275004) @@ -54,7 +54,7 @@ __weak_reference(_pthread_exit, pthread_ static int message_printed; static void thread_unwind(void) __dead2; -#ifdef __PIC__ +#ifdef PIC static void thread_uw_init(void); static _Unwind_Reason_Code thread_unwind_stop(int version, _Unwind_Action actions, @@ -114,7 +114,7 @@ _Unwind_GetCFA(struct _Unwind_Context *c #else #pragma weak _Unwind_GetCFA #pragma weak _Unwind_ForcedUnwind -#endif /* __PIC__ */ +#endif /* PIC */ static void thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e) @@ -222,11 +222,11 @@ _pthread_exit_mask(void *status, sigset_ curthread->ret = status; #ifdef _PTHREAD_FORCED_UNWIND -#ifdef __PIC__ +#ifdef PIC thread_uw_init(); -#endif /* __PIC__ */ +#endif /* PIC */ -#ifdef __PIC__ +#ifdef PIC if (uwl_forcedunwind != NULL) { #else if (_Unwind_ForcedUnwind != NULL) { Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/libthr/thread/thr_private.h Tue Nov 25 03:50:31 2014 (r275004) @@ -100,7 +100,7 @@ TAILQ_HEAD(mutex_queue, pthread_mutex); #define THR_ASSERT(cond, msg) #endif -#ifdef __PIC__ +#ifdef PIC # define STATIC_LIB_REQUIRE(name) #else # define STATIC_LIB_REQUIRE(name) __asm (".globl " #name) Modified: head/lib/msun/src/s_isnan.c ============================================================================== --- head/lib/msun/src/s_isnan.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/lib/msun/src/s_isnan.c Tue Nov 25 03:50:31 2014 (r275004) @@ -31,7 +31,7 @@ #include "fpmath.h" /* Provided by libc.so */ -#ifndef __PIC__ +#ifndef PIC #undef isnan int isnan(double d) @@ -41,7 +41,7 @@ isnan(double d) u.d = d; return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); } -#endif /* !__PIC__ */ +#endif /* !PIC */ int __isnanf(float f) Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue Nov 25 02:58:38 2014 (r275003) +++ head/libexec/rtld-elf/rtld.c Tue Nov 25 03:50:31 2014 (r275004) @@ -1817,7 +1817,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo * objtmp.path = NULL; objtmp.rtld = true; objtmp.mapbase = mapbase; -#ifdef __PIC__ +#ifdef PIC objtmp.relocbase = mapbase; #endif if (RTLD_IS_DYNAMIC()) { Modified: head/sys/amd64/include/asm.h ============================================================================== --- head/sys/amd64/include/asm.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/sys/amd64/include/asm.h Tue Nov 25 03:50:31 2014 (r275004) @@ -38,7 +38,7 @@ #include -#ifdef __PIC__ +#ifdef PIC #define PIC_PLT(x) x@PLT #define PIC_GOT(x) x@GOTPCREL(%rip) #else Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/sys/arm/include/asm.h Tue Nov 25 03:50:31 2014 (r275004) @@ -104,7 +104,7 @@ #define ASMSTR .asciz -#if defined(__PIC__) +#if defined(PIC) #define PLT_SYM(x) PIC_SYM(x, PLT) #define GOT_SYM(x) PIC_SYM(x, GOT) #define GOT_GET(x,got,sym) \ @@ -131,7 +131,7 @@ #define GOT_INIT(got,gotsym,pclabel) #define GOT_INITSYM(gotsym,pclabel) #define PIC_SYM(x,y) x -#endif /* __PIC__ */ +#endif /* PIC */ #undef __FBSDID #if !defined(lint) && !defined(STRIP_FBSDID) Modified: head/sys/i386/include/asm.h ============================================================================== --- head/sys/i386/include/asm.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/sys/i386/include/asm.h Tue Nov 25 03:50:31 2014 (r275004) @@ -38,7 +38,7 @@ #include -#ifdef __PIC__ +#ifdef PIC #define PIC_PROLOGUE \ pushl %ebx; \ call 1f; \ Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/sys/powerpc/include/asm.h Tue Nov 25 03:50:31 2014 (r275004) @@ -37,7 +37,7 @@ #include -#if defined(__PIC__) && !defined(__powerpc64__) +#if defined(PIC) && !defined(__powerpc64__) #define PIC_PROLOGUE XXX #define PIC_EPILOGUE XXX #define PIC_PLT(x) x@plt Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/sys/powerpc/include/profile.h Tue Nov 25 03:50:31 2014 (r275004) @@ -119,7 +119,7 @@ __asm( " .text \n" \ " blr \n"); #else -#ifdef __PIC__ +#ifdef PIC #define _PLT "@plt" #else #define _PLT Modified: head/sys/sparc64/include/asm.h ============================================================================== --- head/sys/sparc64/include/asm.h Tue Nov 25 02:58:38 2014 (r275003) +++ head/sys/sparc64/include/asm.h Tue Nov 25 03:50:31 2014 (r275004) @@ -41,7 +41,7 @@ #include -#ifdef __PIC__ +#ifdef PIC #define PIC_PROLOGUE(r1, r2) \ sethi %hi(_GLOBAL_OFFSET_TABLE_-4), r1 ; \ rd %pc, r2 ; \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 05:25:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D08AAF29; Tue, 25 Nov 2014 05:25:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDD37D31; Tue, 25 Nov 2014 05:25:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP5PCuF032237; Tue, 25 Nov 2014 05:25:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP5PCFN032236; Tue, 25 Nov 2014 05:25:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411250525.sAP5PCFN032236@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 25 Nov 2014 05:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275006 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 05:25:12 -0000 Author: ngie Date: Tue Nov 25 05:25:12 2014 New Revision: 275006 URL: https://svnweb.freebsd.org/changeset/base/275006 Log: Remove cokane@ from MAINTAINERS for 3dfx(4)/tdfx(4) because their email addresses on file bounce (see r252463 for more details) Reviewed by: accounts (dhw) Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Tue Nov 25 05:14:39 2014 (r275005) +++ head/MAINTAINERS Tue Nov 25 05:25:12 2014 (r275006) @@ -48,7 +48,6 @@ cd(4) ken Pre-commit review requested. pass(4) ken Pre-commit review requested. ch(4) ken Pre-commit review requested. em(4) jfv Pre-commit review requested. -tdfx(4) cokane Just keep me informed of changes, try not to break it. sendmail gshapiro Pre-commit review requested. etc/mail gshapiro Pre-commit review requested. Keep in sync with -STABLE. @@ -118,7 +117,6 @@ lib/libc/stdtime edwin Heads-up apprec is maintained by a third party source. sbin/routed bms Pre-commit review; notify vendor at rhyolite.com isci(4) jimharris Pre-commit review requested. -3dfx cokane Pre-commit review preferred. cmx daniel@roe.ch Pre-commit review preferred. filemon obrien Pre-commit review preferred. sysdoc trhodes Pre-commit review preferred. From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 06:11:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 128237CE; Tue, 25 Nov 2014 06:11:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9BA313C; Tue, 25 Nov 2014 06:11:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP6B6Kl052750; Tue, 25 Nov 2014 06:11:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP6B6cj052746; Tue, 25 Nov 2014 06:11:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411250611.sAP6B6cj052746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 25 Nov 2014 06:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275009 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 06:11:07 -0000 Author: mav Date: Tue Nov 25 06:11:05 2014 New Revision: 275009 URL: https://svnweb.freebsd.org/changeset/base/275009 Log: Use ctl_set_success() instead of direct inlining. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_ramdisk.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Nov 25 05:57:12 2014 (r275008) +++ head/sys/cam/ctl/ctl.c Tue Nov 25 06:11:05 2014 (r275009) @@ -5211,8 +5211,7 @@ ctl_scsi_release(struct ctl_scsiio *ctsi mtx_unlock(&lun->lun_lock); - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; + ctl_set_success(ctsio); if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { free(ctsio->kern_data_ptr, M_CTL); @@ -5299,8 +5298,7 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi lun->flags |= CTL_LUN_RESERVED; lun->res_idx = residx; - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; + ctl_set_success(ctsio); bailout: mtx_unlock(&lun->lun_lock); @@ -5610,8 +5608,7 @@ ctl_format(struct ctl_scsiio *ctsio) lun->flags &= ~CTL_LUN_INOPERABLE; mtx_unlock(&lun->lun_lock); - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; + ctl_set_success(ctsio); bailout: if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { @@ -9600,9 +9597,7 @@ ctl_tur(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_tur\n")); - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; - + ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Nov 25 05:57:12 2014 (r275008) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Nov 25 06:11:05 2014 (r275009) @@ -250,7 +250,7 @@ ctl_backend_ramdisk_move_done(union ctl_ &be_lun->io_task); return (0); } - io->io_hdr.status = CTL_SUCCESS; + ctl_set_success(&io->scsiio); } else if ((io->io_hdr.port_status != 0) && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 06:15:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EF9F956; Tue, 25 Nov 2014 06:15:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC431EF; Tue, 25 Nov 2014 06:15:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP6F1sm055593; Tue, 25 Nov 2014 06:15:01 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP6F1Ie055592; Tue, 25 Nov 2014 06:15:01 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201411250615.sAP6F1Ie055592@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 25 Nov 2014 06:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275010 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 06:15:01 -0000 Author: jhibbits Date: Tue Nov 25 06:15:00 2014 New Revision: 275010 URL: https://svnweb.freebsd.org/changeset/base/275010 Log: Add Apple Intrepid USB controller ID. MFC after: 2 weeks Modified: head/sys/dev/usb/controller/ohci_pci.c Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Tue Nov 25 06:11:05 2014 (r275009) +++ head/sys/dev/usb/controller/ohci_pci.c Tue Nov 25 06:15:00 2014 (r275010) @@ -175,6 +175,8 @@ ohci_pci_match(device_t self) case 0x0019106b: return ("Apple KeyLargo USB controller"); + case 0x003f106b: + return ("Apple KeyLargo/Intrepid USB controller"); default: break; From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 06:43:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A35E9D18; Tue, 25 Nov 2014 06:43:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 905256B7; Tue, 25 Nov 2014 06:43:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP6hITi069271; Tue, 25 Nov 2014 06:43:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP6hIl6069270; Tue, 25 Nov 2014 06:43:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411250643.sAP6hIl6069270@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 25 Nov 2014 06:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275011 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 06:43:18 -0000 Author: markj Date: Tue Nov 25 06:43:17 2014 New Revision: 275011 URL: https://svnweb.freebsd.org/changeset/base/275011 Log: The module load address always needs to be included when setting the dm_*_va fields of dt_module_t. Previously, this was only done on architectures where kernel modules have type ET_REL; this change fixes that. As a result, symbol name resolution in the stack() action now works properly for kernel modules on i386. Reported by: Shrikanth Kamath Tested by: Shrikanth Kamath Discussed with: avg MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Tue Nov 25 06:15:00 2014 (r275010) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Tue Nov 25 06:43:17 2014 (r275011) @@ -1211,13 +1211,13 @@ dt_module_update(dtrace_hdl_t *dtp, stru #if defined(__FreeBSD__) if (sh.sh_size == 0) continue; - if (is_elf_obj && (sh.sh_type == SHT_PROGBITS || - sh.sh_type == SHT_NOBITS)) { + if (sh.sh_type == SHT_PROGBITS || sh.sh_type == SHT_NOBITS) { alignmask = sh.sh_addralign - 1; mapbase += alignmask; mapbase &= ~alignmask; sh.sh_addr = mapbase; - dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr; + if (is_elf_obj) + dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr; mapbase += sh.sh_size; } #endif From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 07:01:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D91BFCA; Tue, 25 Nov 2014 07:01:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09BA48F5; Tue, 25 Nov 2014 07:01:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP71cqk078399; Tue, 25 Nov 2014 07:01:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP71cbR078398; Tue, 25 Nov 2014 07:01:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411250701.sAP71cbR078398@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 25 Nov 2014 07:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275012 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 07:01:39 -0000 Author: markj Date: Tue Nov 25 07:01:38 2014 New Revision: 275012 URL: https://svnweb.freebsd.org/changeset/base/275012 Log: Adjust some checks missed in r274637, now that pi_rname can be NULL. Additionally fix a misparenthesization in the same check, noticed while fixing the first bug. This bug only appears to cause problems if the same USDT probe appears twice within a static function. X-MFC-With: r274637 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Tue Nov 25 06:43:17 2014 (r275011) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Tue Nov 25 07:01:38 2014 (r275012) @@ -545,8 +545,9 @@ dt_probe_define(dt_provider_t *pvp, dt_p for (pip = prp->pr_inst; pip != NULL; pip = pip->pi_next) { if (strcmp(pip->pi_fname, fname) == 0 && - ((rname == NULL && pip->pi_rname[0] == '\0') || - (rname != NULL && strcmp(pip->pi_rname, rname)) == 0)) + ((rname == NULL && pip->pi_rname == NULL) || + (rname != NULL && pip->pi_rname != NULL && + strcmp(pip->pi_rname, rname) == 0))) break; } From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 07:13:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0EF046A; Tue, 25 Nov 2014 07:13:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D404A19; Tue, 25 Nov 2014 07:13:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP7DWZQ083253; Tue, 25 Nov 2014 07:13:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP7DWrG083252; Tue, 25 Nov 2014 07:13:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250713.sAP7DWrG083252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 07:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275014 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 07:13:32 -0000 Author: bapt Date: Tue Nov 25 07:13:31 2014 New Revision: 275014 URL: https://svnweb.freebsd.org/changeset/base/275014 Log: Add definitions of kerberos libraries Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 07:12:32 2014 (r275013) +++ head/share/mk/src.libnames.mk Tue Nov 25 07:13:31 2014 (r275014) @@ -16,6 +16,7 @@ _PRIVATELIBS= \ atf_cxx \ bsdstat \ heimipcc \ + heimipcs \ ldns \ sqlite3 \ ssh \ @@ -33,6 +34,7 @@ _INTERNALIBS= \ _LIBRARIES= \ ${_PRIVATELIBS} \ ${_INTERNALIBS} \ + alias \ archive \ asn1 \ bsdxml \ @@ -58,11 +60,19 @@ _LIBRARIES= \ figpar \ geom \ gssapi \ + hdb \ heimbase \ + heimntlm \ + heimsqlite \ hx509 \ ipsec \ jail \ + kadm5clnt \ + kadm5srv \ + kafs5 \ + kdc \ kiconv \ + krb5 \ kvm \ krb5 \ l \ @@ -100,6 +110,7 @@ _LIBRARIES= \ ulog \ usb \ util \ + vers \ wind \ wrap \ y \ @@ -191,6 +202,12 @@ LDADD_sqlite3+= ${LDADD_pthread} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +# The following depends on libraries which are using pthread +DPADD_hdb+= ${DPADD_pthread} +LDADD_hdb+= ${LDADD_pthread} +DPADD_kadm5srv+= ${DPADD_pthread} +LDADD_kadm5srv+= ${LDADD_pthread} + .for _l in ${LIBADD} .if ${_PRIVATELIBS:M${_l}} USEPRIVATELIB+= ${_l} From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 07:31:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 523529F3; Tue, 25 Nov 2014 07:31:03 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C5AD8BE4; Tue, 25 Nov 2014 07:31:01 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAP7UqOB089712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Nov 2014 10:30:52 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAP7UqKb089711; Tue, 25 Nov 2014 10:30:52 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 25 Nov 2014 10:30:52 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141125073052.GS47144@FreeBSD.org> References: <201411231201.sANC1rW1025589@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 07:31:03 -0000 On Mon, Nov 24, 2014 at 03:45:10PM -0800, Adrian Chadd wrote: A> Why'd you make it all a union in strict buf? To avoid growing it and emphasize that fields are mutuall exclusive. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 07:31:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08D21B37; Tue, 25 Nov 2014 07:31:48 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F0ABBF2; Tue, 25 Nov 2014 07:31:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAP7VjCk089729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Nov 2014 10:31:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAP7Vjt5089728; Tue, 25 Nov 2014 10:31:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 25 Nov 2014 10:31:45 +0300 From: Gleb Smirnoff To: Ruslan Bukin Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141125073145.GT47144@FreeBSD.org> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141124211620.GA49975@bsdpad.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 07:31:48 -0000 On Mon, Nov 24, 2014 at 09:16:20PM +0000, Ruslan Bukin wrote: R> On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote: R> > On Mon, Nov 24, 2014 at 06:03:56PM +0000, Ruslan Bukin wrote: R> > R> > I this on stock kernel or on kernel with your modifications ? R> > R> R> > R> Stock one. I also checked with no virtio but MDROOT - same problems. R> > R> > I could expect a panic with a damaged 'struct buf', but not vm_page. R> > R> > Can you please do a clean build pre-r274914, and then again a clean R> > build of r274914, and then confirm that the former is stable, but the R> > latter panics? R> R> Yes, I just proceeded re-check both builds with removing obj dir each time and I still see the problem starting with r274914. R> R> Also restoring files like that on latest head makes things happy (no panics): R> svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h Can you please try to un-union the struct buf and see if it helps? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 07:47:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A31CD80; Tue, 25 Nov 2014 07:47:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AFAD07; Tue, 25 Nov 2014 07:47:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP7ljq1097872; Tue, 25 Nov 2014 07:47:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP7ljUZ097871; Tue, 25 Nov 2014 07:47:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250747.sAP7ljUZ097871@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 07:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275017 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 07:47:45 -0000 Author: bapt Date: Tue Nov 25 07:47:44 2014 New Revision: 275017 URL: https://svnweb.freebsd.org/changeset/base/275017 Log: Fix make depends with libnetbsd Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 07:30:26 2014 (r275016) +++ head/share/mk/src.libnames.mk Tue Nov 25 07:47:44 2014 (r275017) @@ -280,4 +280,4 @@ LDSM?= ${LIBSMDIR}/libsm.a LIBSM?= ${LIBSMDIR}/libsm.a LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd -LIBNETBSD?= ${ROOTOBJDIR}/libnetbsd.a +LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 09:36:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A2D941; Tue, 25 Nov 2014 09:36:55 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 66477BEF; Tue, 25 Nov 2014 09:36:55 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 4C4EDAC2E; Tue, 25 Nov 2014 09:36:54 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 70392127F; Tue, 25 Nov 2014 10:36:51 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ermal LuXXi Subject: Re: svn commit: r274709 - head/sys/netpfil/pf References: <201411191331.sAJDV9bH092190@svn.freebsd.org> Date: Tue, 25 Nov 2014 10:36:51 +0100 In-Reply-To: <201411191331.sAJDV9bH092190@svn.freebsd.org> (Ermal LuXXi's message of "Wed, 19 Nov 2014 13:31:09 +0000 (UTC)") Message-ID: <86tx1nvcy4.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 09:36:55 -0000 Ermal LuXXi writes: > Log: > pf(4) needs to have a correct checksum during its processing. > Calculate checksums for the IPv6 path when needed before > delving into pf(4) code as required. >=20=20=20 > PR: 172648, 179392 > Reviewed by: glebius@ > Approved by: gnn@ > Obtained from: pfSense > MFC after: 1 week > Sponsored by: Netgate This is wrong, and causes a panic with some network adapters (vtnet, for one). It is closely related to 192013 and should not have been committed without consulting me first. Please revert, or just #if 0 out the entire block since the old code is even more wrong than your version. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 09:47:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6808DB3F; Tue, 25 Nov 2014 09:47:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 544AACE3; Tue, 25 Nov 2014 09:47:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP9lGNi053891; Tue, 25 Nov 2014 09:47:16 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP9lGRG053890; Tue, 25 Nov 2014 09:47:16 GMT (envelope-from des@FreeBSD.org) Message-Id: <201411250947.sAP9lGRG053890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 25 Nov 2014 09:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275020 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 09:47:16 -0000 Author: des Date: Tue Nov 25 09:47:15 2014 New Revision: 275020 URL: https://svnweb.freebsd.org/changeset/base/275020 Log: The fallback flag in nsdispatch prevents the fallback implementation of getgroupmembership() from invoking the correct backend in the compat case. Replace it with a nesting depth counter so it only blocks one level (the first is the group -> group_compat translation, the second is the actual backend). This is one of two bugs that break getgrouplist() in the compat case, the second being that the backend's own getgroupmembership() method is ignored. Unfortunately, that is not easily fixable without a redesign of our nss implementation (which is also needed to implement the +@group syntax in /etc/passwd). PR: 190055 MFC after: 1 week Modified: head/lib/libc/net/nsdispatch.c Modified: head/lib/libc/net/nsdispatch.c ============================================================================== --- head/lib/libc/net/nsdispatch.c Tue Nov 25 08:39:46 2014 (r275019) +++ head/lib/libc/net/nsdispatch.c Tue Nov 25 09:47:15 2014 (r275020) @@ -132,14 +132,17 @@ static void *nss_cache_cycle_preventio #endif /* - * When this is set to 1, nsdispatch won't use nsswitch.conf - * but will consult the 'defaults' source list only. - * NOTE: nested fallbacks (when nsdispatch calls fallback functions, - * which in turn calls nsdispatch, which should call fallback - * function) are not supported + * We keep track of nsdispatch() nesting depth in dispatch_depth. When a + * fallback method is invoked from nsdispatch(), we temporarily set + * fallback_depth to the current dispatch depth plus one. Subsequent + * calls at that exact depth will run in fallback mode (restricted to the + * same source as the call that was handled by the fallback method), while + * calls below that depth will be handled normally, allowing fallback + * methods to perform arbitrary lookups. */ struct fb_state { - int fb_dispatch; + int dispatch_depth; + int fallback_depth; }; static void fb_endstate(void *); NSS_TLS_HANDLING(fb); @@ -613,6 +616,7 @@ _nsdispatch(void *retval, const ns_dtab void *mdata; int isthreaded, serrno, i, result, srclistsize; struct fb_state *st; + int saved_depth; #ifdef NS_CACHING nss_cache_data cache_data; @@ -644,7 +648,8 @@ _nsdispatch(void *retval, const ns_dtab result = NS_UNAVAIL; goto fin; } - if (st->fb_dispatch == 0) { + ++st->dispatch_depth; + if (st->dispatch_depth > st->fallback_depth) { dbt = vector_search(&database, _nsmap, _nsmapsize, sizeof(*_nsmap), string_compare); fb_method = nss_method_lookup(NSSRC_FALLBACK, database, @@ -713,12 +718,13 @@ _nsdispatch(void *retval, const ns_dtab break; } else { if (fb_method != NULL) { - st->fb_dispatch = 1; + saved_depth = st->fallback_depth; + st->fallback_depth = st->dispatch_depth + 1; va_start(ap, defaults); result = fb_method(retval, (void *)srclist[i].name, ap); va_end(ap); - st->fb_dispatch = 0; + st->fallback_depth = saved_depth; } else nss_log(LOG_DEBUG, "%s, %s, %s, not found, " "and no fallback provided", @@ -750,6 +756,7 @@ _nsdispatch(void *retval, const ns_dtab if (isthreaded) (void)_pthread_rwlock_unlock(&nss_lock); + --st->dispatch_depth; fin: errno = serrno; return (result); From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 09:54:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72F38D48; Tue, 25 Nov 2014 09:54:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F899DC6; Tue, 25 Nov 2014 09:54:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP9s6NG058136; Tue, 25 Nov 2014 09:54:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP9s6Yx058135; Tue, 25 Nov 2014 09:54:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250954.sAP9s6Yx058135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 09:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275021 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 09:54:06 -0000 Author: bapt Date: Tue Nov 25 09:54:05 2014 New Revision: 275021 URL: https://svnweb.freebsd.org/changeset/base/275021 Log: libvers and libsl are internal libraries Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 09:47:15 2014 (r275020) +++ head/share/mk/src.libnames.mk Tue Nov 25 09:54:05 2014 (r275021) @@ -29,7 +29,9 @@ _INTERNALIBS= \ netbsd \ ohash \ readline \ - sm + sl \ + sm \ + vers _LIBRARIES= \ ${_PRIVATELIBS} \ @@ -110,7 +112,6 @@ _LIBRARIES= \ ulog \ usb \ util \ - vers \ wind \ wrap \ y \ @@ -281,3 +282,9 @@ LIBSM?= ${LIBSMDIR}/libsm.a LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a + +LIBVERSDIR?= ${ROOTOBJDIR}/kerberos5/lib/libvers +LIBVERS?= ${LIBVERSDIR}/libvers.a + +LIBSLDIR= ${ROOTOBJDIR}/kerberos5/lib/libsl +LIBSL?= ${LIBSLDIR}/libsl.a From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 09:57:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37E70FAF; Tue, 25 Nov 2014 09:57:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21D78DF5; Tue, 25 Nov 2014 09:57:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP9vuTP058844; Tue, 25 Nov 2014 09:57:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP9vhlG058729; Tue, 25 Nov 2014 09:57:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411250957.sAP9vhlG058729@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 09:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275022 - in head/kerberos5: . lib/libasn1 lib/libgssapi_krb5 lib/libgssapi_ntlm lib/libgssapi_spnego lib/libhdb lib/libheimbase lib/libheimipcc lib/libheimipcs lib/libheimntlm lib/libh... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 09:57:56 -0000 Author: bapt Date: Tue Nov 25 09:57:42 2014 New Revision: 275022 URL: https://svnweb.freebsd.org/changeset/base/275022 Log: Convert kerberos to LIBADD and reduce overlinking of the kerberos binaries and libraries Modified: head/kerberos5/Makefile.inc head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libgssapi_krb5/Makefile head/kerberos5/lib/libgssapi_ntlm/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libheimbase/Makefile head/kerberos5/lib/libheimipcc/Makefile head/kerberos5/lib/libheimipcs/Makefile head/kerberos5/lib/libheimntlm/Makefile head/kerberos5/lib/libheimsqlite/Makefile head/kerberos5/lib/libhx509/Makefile head/kerberos5/lib/libkadm5clnt/Makefile head/kerberos5/lib/libkadm5srv/Makefile head/kerberos5/lib/libkafs5/Makefile head/kerberos5/lib/libkdc/Makefile head/kerberos5/lib/libkrb5/Makefile head/kerberos5/lib/libroken/Makefile head/kerberos5/lib/libwind/Makefile head/kerberos5/libexec/digest-service/Makefile head/kerberos5/libexec/hprop/Makefile head/kerberos5/libexec/hpropd/Makefile head/kerberos5/libexec/ipropd-master/Makefile head/kerberos5/libexec/ipropd-slave/Makefile head/kerberos5/libexec/kadmind/Makefile head/kerberos5/libexec/kcm/Makefile head/kerberos5/libexec/kdc/Makefile head/kerberos5/libexec/kdigest/Makefile head/kerberos5/libexec/kfd/Makefile head/kerberos5/libexec/kimpersonate/Makefile head/kerberos5/libexec/kpasswdd/Makefile head/kerberos5/tools/asn1_compile/Makefile head/kerberos5/tools/slc/Makefile head/kerberos5/usr.bin/hxtool/Makefile head/kerberos5/usr.bin/kadmin/Makefile head/kerberos5/usr.bin/kcc/Makefile head/kerberos5/usr.bin/kdestroy/Makefile head/kerberos5/usr.bin/kf/Makefile head/kerberos5/usr.bin/kgetcred/Makefile head/kerberos5/usr.bin/kinit/Makefile head/kerberos5/usr.bin/kpasswd/Makefile head/kerberos5/usr.bin/ksu/Makefile head/kerberos5/usr.bin/string2key/Makefile head/kerberos5/usr.bin/verify_krb5_conf/Makefile head/kerberos5/usr.sbin/iprop-log/Makefile head/kerberos5/usr.sbin/kstash/Makefile head/kerberos5/usr.sbin/ktutil/Makefile Modified: head/kerberos5/Makefile.inc ============================================================================== --- head/kerberos5/Makefile.inc Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/Makefile.inc Tue Nov 25 09:57:42 2014 (r275022) @@ -16,9 +16,6 @@ LDAPCFLAGS= -I${OPENLDAPBASE}/include -D LDAPLDFLAGS= -L${OPENLDAPBASE}/lib -Wl,-rpath,${OPENLDAPBASE}/lib .endif -LIBVERS= ${.OBJDIR}/../../lib/libvers/libvers.a -LIBSL= ${.OBJDIR}/../../lib/libsl/libsl.a - .if defined(SRCS) ETSRCS= \ Modified: head/kerberos5/lib/libasn1/Makefile ============================================================================== --- head/kerberos5/lib/libasn1/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libasn1/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,8 +3,7 @@ LIB= asn1 LDFLAGS= -Wl,--no-undefined INCS= asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h -LDADD= -lcom_err -lroken -DPADD= ${LIBCOM_ERR} ${LIBROKEN} +LIBADD= com_err roken VERSION_MAP= ${.CURDIR}/version.map SRCS= asn1_err.c \ Modified: head/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_krb5/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libgssapi_krb5/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,9 +2,7 @@ LIB= gssapi_krb5 LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined -LDADD= -lgssapi -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt -DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \ - ${LIBCOM_ERR} ${LIBCRYPT} +LIBADD= gssapi krb5 crypto roken asn1 com_err SHLIB_MAJOR= 10 INCS= ${KRB5DIR}/lib/gssapi/gssapi/gssapi_krb5.h Modified: head/kerberos5/lib/libgssapi_ntlm/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_ntlm/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libgssapi_ntlm/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= gssapi_ntlm LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined -LDADD= -lcrypto -lgssapi -lkrb5 -lhx509 -lheimntlm -lroken -DPADD= ${LIBCRYPTO} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBROKEN} +LIBADD= crypto gssapi krb5 heimntlm roken SHLIB_MAJOR= 10 SRCS= accept_sec_context.c \ Modified: head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libgssapi_spnego/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= gssapi_spnego LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined -LDADD= -lgssapi -lheimbase -lasn1 -lroken -DPADD= ${LIBGSSAPI} ${LIBHEIMBASE} ${LIBASN1} ${LIBROKEN} +LIBADD= gssapi heimbase asn1 roken SHLIB_MAJOR= 10 SRCS= accept_sec_context.c \ Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libhdb/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,8 +3,8 @@ LIB= hdb LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/hdb/version-script.map -LDADD= -lasn1 -lcom_err -lkrb5 -lroken -lheimsqlite -DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} ${LIBHEIMSQLITE} ${LDAPDPADD} +LIBADD= asn1 com_err krb5 roken heimsqlite +DPADD= ${LDAPDPADD} MAN= HDB.3 hdb_entry_ex.3 Modified: head/kerberos5/lib/libheimbase/Makefile ============================================================================== --- head/kerberos5/lib/libheimbase/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libheimbase/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,7 +2,7 @@ LIB= heimbase LDFLAGS= -Wl,--no-undefined -LDADD= -lpthread +LIBADD= pthread VERSION_MAP= ${KRB5DIR}/base/version-script.map INCS= heimbase.h Modified: head/kerberos5/lib/libheimipcc/Makefile ============================================================================== --- head/kerberos5/lib/libheimipcc/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libheimipcc/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= heimipcc PRIVATELIB= -LDADD= -lheimbase -lroken -lpthread -DPADD= ${LIBHEIMBASE} ${LIBROKEN} ${LIBPTHREAD} +LIBADD= heimbase roken pthread SRCS= \ client.c \ Modified: head/kerberos5/lib/libheimipcs/Makefile ============================================================================== --- head/kerberos5/lib/libheimipcs/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libheimipcs/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,9 +2,7 @@ LIB= heimipcs PRIVATELIB= -LDADD= -lheimbase -lroken -LDFLAGS= -pthread -DPADD= ${LIBHEIMBASE} ${LIBROKEN} +LIBADD= heimbase roken pthread SRCS= \ server.c \ Modified: head/kerberos5/lib/libheimntlm/Makefile ============================================================================== --- head/kerberos5/lib/libheimntlm/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libheimntlm/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= heimntlm LDFLAGS= -Wl,--no-undefined -LDADD= -lcrypto -lcom_err -lkrb5 -lroken -DPADD= ${LIBCRYPTO} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} +LIBADD= crypto com_err krb5 roken SRCS= ntlm.c ntlm_err.c INCS= heimntlm.h heimntlm-protos.h ntlm_err.h CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken Modified: head/kerberos5/lib/libheimsqlite/Makefile ============================================================================== --- head/kerberos5/lib/libheimsqlite/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libheimsqlite/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= heimsqlite SRCS= sqlite3.c -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread CFLAGS+=-I${KRB5DIR}/lib/sqlite .include Modified: head/kerberos5/lib/libhx509/Makefile ============================================================================== --- head/kerberos5/lib/libhx509/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libhx509/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,8 +3,7 @@ LIB= hx509 LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/hx509/version-script.map -LDADD= -lasn1 -lcom_err -lcrypto -lroken -lwind -DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPTO} ${LIBROKEN} ${LIBWIND} +LIBADD= asn1 com_err crypto roken wind MAN= hx509.3 \ hx509_ca.3 \ Modified: head/kerberos5/lib/libkadm5clnt/Makefile ============================================================================== --- head/kerberos5/lib/libkadm5clnt/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libkadm5clnt/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= kadm5clnt LDFLAGS= -Wl,--no-undefined -LDADD= -lcom_err -lkrb5 -lroken -DPADD= ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} +LIBADD= com_err krb5 roken INCS= admin.h \ kadm5-private.h \ Modified: head/kerberos5/lib/libkadm5srv/Makefile ============================================================================== --- head/kerberos5/lib/libkadm5srv/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libkadm5srv/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,7 @@ LIB= kadm5srv LDFLAGS= -Wl,--no-undefined -LDADD= -lcom_err -lhdb -lkrb5 -lroken -DPADD= ${LIBCOM_ERR} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} +LIBADD= com_err hdb krb5 roken VERSION_MAP= ${KRB5DIR}/lib/kadm5/version-script.map MAN= kadm5_pwcheck.3 Modified: head/kerberos5/lib/libkafs5/Makefile ============================================================================== --- head/kerberos5/lib/libkafs5/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libkafs5/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -1,9 +1,8 @@ # $FreeBSD$ LIB= kafs5 -LDADD= -lasn1 -lroken -lkrb5 LDFLAGS= -Wl,--no-undefined -DPADD= ${LIBASN1} ${LIBKRB5} ${LIBROKEN} +LIBADD= asn1 krb5 roken INCS= kafs.h MAN= kafs5.3 VERSION_MAP= ${.CURDIR}/version.map Modified: head/kerberos5/lib/libkdc/Makefile ============================================================================== --- head/kerberos5/lib/libkdc/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libkdc/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,9 +3,7 @@ LIB= kdc LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/kdc/version-script.map -LDADD= -lroken -lhdb -lhx509 -lkrb5 -lheimntlm -lasn1 -lcrypt -lcrypto -DPADD= ${LIBROKEN} ${LIBHDB} ${LIBHX509} ${LIBKRB5} ${LIBHEIMNTLM} \ - ${LIBASN1} ${LIBCRYPT} ${LIBCRYPTO} +LIBADD= roken hdb hx509 krb5 heimntlm asn1 crypto INCS= kdc.h \ kdc-protos.h Modified: head/kerberos5/lib/libkrb5/Makefile ============================================================================== --- head/kerberos5/lib/libkrb5/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libkrb5/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,9 +3,7 @@ LIB= krb5 LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/krb5/version-script.map -LDADD= -lasn1 -lcom_err -lcrypt -lcrypto -lhx509 -lroken -lwind -lheimbase ${LDHEIMIPCC} -DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} ${LIBHX509} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC} -USEPRIVATELIB= heimipcc +LIBADD= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc INCS= heim_err.h \ heim_threads.h \ @@ -628,3 +626,4 @@ CFLAGS+= -I${KRB5DIR}/lib/krb5 \ .include .PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include ${KRB5DIR}/doc/doxyout/krb5/man/man3/ +USEPRIVATELIB= heimipcc Modified: head/kerberos5/lib/libroken/Makefile ============================================================================== --- head/kerberos5/lib/libroken/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libroken/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -1,8 +1,7 @@ # $FreeBSD$ LIB= roken -LDADD= -lcrypt -DPADD= ${LIBCRYPT} +LIBADD= crypt VERSION_MAP= ${KRB5DIR}/lib/roken/version-script.map INCS= roken.h \ roken-common.h \ Modified: head/kerberos5/lib/libwind/Makefile ============================================================================== --- head/kerberos5/lib/libwind/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/lib/libwind/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,8 +3,7 @@ LIB= wind LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/wind/version-script.map -LDADD= -lcom_err -lroken -DPADD= ${LIBCOM_ERR} ${LIBROKEN} +LIBADD= com_err roken INCS= wind.h \ wind_err.h Modified: head/kerberos5/libexec/digest-service/Makefile ============================================================================== --- head/kerberos5/libexec/digest-service/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/digest-service/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -8,11 +8,7 @@ CFLAGS+= -I${KRB5DIR}/kdc \ -I${KRB5DIR}/lib/ipc \ -I${KRB5DIR}/lib/wind \ -I${KRB5DIR}/lib/roken -DPADD= ${LIBHDB} ${LIBKDC} ${LIBHEIMIPCS} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \ - ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} -LDADD= -lhdb -lkdc ${LDHEIMIPCS} -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ - ${LIBVERS} -lheimntlm -USEPRIVATELIB= heimipcs +LIBADD= hdb kdc heimipcs krb5 roken asn1 crypto vers heimntlm .include Modified: head/kerberos5/libexec/hprop/Makefile ============================================================================== --- head/kerberos5/libexec/hprop/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/hprop/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -10,10 +10,9 @@ CFLAGS+=-I${KRB5DIR}/lib/hx509 CFLAGS+=-I${KRB5DIR}/lib/ntlm CFLAGS+=-I${KRB5DIR}/kdc CFLAGS+=-I${.OBJDIR}/../../lib/libkrb5 -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPDPADD} -LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} +LIBADD= hdb krb5 roken vers +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/libexec/hpropd/Makefile ============================================================================== --- head/kerberos5/libexec/hpropd/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/hpropd/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -4,10 +4,9 @@ PROG= hpropd MAN= hpropd.8 CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/kdc ${LDAPCFLAGS} -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPDPADD} -LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} +LIBADD= hdb krb5 roken vers +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/libexec/ipropd-master/Makefile ============================================================================== --- head/kerberos5/libexec/ipropd-master/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/ipropd-master/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -5,10 +5,9 @@ MAN= iprop.8 SRCS= ipropd_common.c ipropd_master.c kadm5_err.h CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I. ${LDAPCFLAGS} -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPDPADD} -LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} +LIBADD= kadm5srv hdb krb5 roken vers +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} foo:: Modified: head/kerberos5/libexec/ipropd-slave/Makefile ============================================================================== --- head/kerberos5/libexec/ipropd-slave/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/ipropd-slave/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -5,10 +5,9 @@ MAN= SRCS= ipropd_common.c ipropd_slave.c kadm5_err.h CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I. ${LDAPCFLAGS} -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPDPADD} -LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} +LIBADD= kadm5srv hdb krb5 roken vers +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/libexec/kadmind/Makefile ============================================================================== --- head/kerberos5/libexec/kadmind/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kadmind/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -9,10 +9,9 @@ SRCS= rpc.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ ${LDAPCFLAGS} -DPADD= ${LIBKADM5SRV} ${LIBGSSAPI} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} \ - ${LIBASN1} ${LIBVERS} ${LIBCRYPTO} ${LIBCRYPT} ${LDAPDPADD} -LDADD= -lkadm5srv -lgssapi -lhdb -lkrb5 -lroken \ - -lasn1 ${LIBVERS} -lcrypto -lcrypt ${LDAPLDADD} +LIBADD= kadm5srv gssapi hdb krb5 roken vers +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/libexec/kcm/Makefile ============================================================================== --- head/kerberos5/libexec/kcm/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kcm/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -19,11 +19,9 @@ SRCS= acl.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kcm -I${KRB5DIR}/lib/ipc ${LDAPCFLAGS} -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBHEIMNTLM} \ - ${LIBHEIMIPCS} ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} ${LDAPDPADD} -LDADD= -lhdb -lkrb5 -lroken -lasn1 -lheimntlm ${LDHEIMIPCS} \ - -lcrypto -lcrypt ${LIBVERS} ${LDAPLDADD} -USEPRIVATELIB= heimipcs +LIBADD= krb5 roken heimntlm heimipcs crypto +DPADD= ${LDAPDPADD} +LDADD= ${LIBVERS} ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/libexec/kdc/Makefile ============================================================================== --- head/kerberos5/libexec/kdc/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kdc/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -10,9 +10,7 @@ SRCS= config.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kdc ${LDAPCFLAGS} -DPADD= ${LIBKDC} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \ - ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} -LDADD= -lkdc -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} +LIBADD= kdc hdb krb5 roken crypt vers .include Modified: head/kerberos5/libexec/kdigest/Makefile ============================================================================== --- head/kerberos5/libexec/kdigest/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kdigest/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -5,10 +5,7 @@ MAN= kdigest.8 CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/sl -I. -DPADD= ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBSL} ${LIBVERS} ${LIBEDIT} -LDADD= -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt ${LIBSL} \ - ${LIBVERS} -ledit +LIBADD= krb5 heimntlm roken crypto edit sl vers SRCS= kdigest.c \ kdigest-commands.c \ kdigest-commands.h Modified: head/kerberos5/libexec/kfd/Makefile ============================================================================== --- head/kerberos5/libexec/kfd/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kfd/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -4,10 +4,7 @@ PROG= kfd MAN= kfd.8 CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken -DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBVERS} -LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ - ${LIBVERS} +LIBADD= krb5 roken vers .include Modified: head/kerberos5/libexec/kimpersonate/Makefile ============================================================================== --- head/kerberos5/libexec/kimpersonate/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kimpersonate/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -6,10 +6,7 @@ CFLAGS+= -I${KRB5DIR}/lib/hx509 \ -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/sl -I. -DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBVERS} -LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt \ - ${LIBVERS} +LIBADD= krb5 roken asn1 vers .include Modified: head/kerberos5/libexec/kpasswdd/Makefile ============================================================================== --- head/kerberos5/libexec/kpasswdd/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/libexec/kpasswdd/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,10 +3,9 @@ PROG= kpasswdd MAN= kpasswdd.8 CFLAGS+=-I${KRB5DIR}/lib/roken -I../../lib/libhdb ${LDAPCFLAGS} -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LDAPDPADD} -LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} +LIBADD= kadm5srv hdb krb5 roken vers asn1 +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/tools/asn1_compile/Makefile ============================================================================== --- head/kerberos5/tools/asn1_compile/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/tools/asn1_compile/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,8 +3,9 @@ PROG= asn1_compile MAN= LIBROKEN_A= ${.OBJDIR}/../../lib/libroken/libroken.a -LDADD= ${LIBROKEN_A} ${LIBVERS} -DPADD= ${LIBROKEN_A} ${LIBVERS} +LIBADD= vers +LDADD= ${LIBROKEN_A} +DPADD= ${LIBROKEN_A} SRCS= \ asn1parse.y \ Modified: head/kerberos5/tools/slc/Makefile ============================================================================== --- head/kerberos5/tools/slc/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/tools/slc/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,8 +2,9 @@ PROG= slc LIBROKEN_A= ${.OBJDIR}/../../lib/libroken/libroken.a -LDADD= ${LIBROKEN_A} ${LIBVERS} -DPADD= ${LIBROKEN_A} ${LIBVERS} +LIBADD= vers +LDADD= ${LIBROKEN_A} +DPADD= ${LIBROKEN_A} MAN= SRCS= roken.h \ Modified: head/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- head/kerberos5/usr.bin/hxtool/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/hxtool/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -6,8 +6,7 @@ CFLAGS+= -I${KRB5DIR}/lib/hx509 \ -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/sl -I. -DPADD= ${LIBHX509} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBSL} ${LIBVERS} ${LIBEDIT} -LDADD= -lhx509 -lroken -lasn1 -lcrypto -lcrypt ${LIBSL} ${LIBVERS} -ledit +LIBADD= hx509 roken asn1 crypto sl vers edit SRCS= hxtool.c hxtool-commands.c hxtool-commands.h hxtool-commands.h: hxtool-commands.in Modified: head/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- head/kerberos5/usr.bin/kadmin/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kadmin/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -26,14 +26,9 @@ SRCS= add_enctype.c \ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/sl -I. ${LDAPCFLAGS} -DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \ - ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \ - ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBEDIT} ${LIBNCURSESW} ${LDAPDPADD} -LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \ - ${LIBSL} -lroken ${LIBVERS} -lasn1 \ - -lcrypto -lcrypt -lcom_err \ - -ledit -lncursesw ${LDAPLDADD} +LIBADD= kadm5clnt kadm5srv hdb krb5 roken vers sl asn1 crypto edit +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/usr.bin/kcc/Makefile ============================================================================== --- head/kerberos5/usr.bin/kcc/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kcc/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -8,10 +8,7 @@ CFLAGS+= -I${KRB5DIR}/lib/hx509 \ -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/sl -I. -DPADD= ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBKAFS5} ${LIBSL} ${LIBVERS} ${LIBEDIT} -LDADD= -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt -lkafs5 ${LIBSL} \ - ${LIBVERS} -ledit +LIBADD= krb5 roken asn1 kafs5 edit sl vers SRCS= kcc.c \ kcc-commands.c \ kcc-commands.h \ Modified: head/kerberos5/usr.bin/kdestroy/Makefile ============================================================================== --- head/kerberos5/usr.bin/kdestroy/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kdestroy/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,10 +2,7 @@ PROG= kdestroy CFLAGS+=-I${KRB5DIR}/lib/roken -DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} -LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt +LIBADD= kafs5 krb5 roken vers MAN= kdestroy.1 .include Modified: head/kerberos5/usr.bin/kf/Makefile ============================================================================== --- head/kerberos5/usr.bin/kf/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kf/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -4,10 +4,7 @@ PROG= kf MAN= kf.1 CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken -DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBVERS} -LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ - ${LIBVERS} +LIBADD= krb5 roken vers .include Modified: head/kerberos5/usr.bin/kgetcred/Makefile ============================================================================== --- head/kerberos5/usr.bin/kgetcred/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kgetcred/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,8 +3,7 @@ PROG= kgetcred CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken -DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} -LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} +LIBADD= krb5 roken asn1 vers .include Modified: head/kerberos5/usr.bin/kinit/Makefile ============================================================================== --- head/kerberos5/usr.bin/kinit/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kinit/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,10 +2,7 @@ PROG= kinit CFLAGS+=-I${KRB5DIR}/lib/roken -DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} -LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err +LIBADD= kafs5 krb5 heimntlm roken crypto vers .include Modified: head/kerberos5/usr.bin/kpasswd/Makefile ============================================================================== --- head/kerberos5/usr.bin/kpasswd/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/kpasswd/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -2,10 +2,7 @@ PROG= kpasswd CFLAGS+=-I${KRB5DIR}/lib/roken -DPADD= ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} -LDADD= -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err +LIBADD= hdb krb5 roken vers crypto .include Modified: head/kerberos5/usr.bin/ksu/Makefile ============================================================================== --- head/kerberos5/usr.bin/ksu/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/ksu/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -8,10 +8,7 @@ PRECIOUSPROG= MAN= SRCS= su.c CFLAGS+=-I${KRB5DIR}/lib/roken -DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} -LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err +LIBADD= kafs5 krb5 roken vers crypto crypt .include Modified: head/kerberos5/usr.bin/string2key/Makefile ============================================================================== --- head/kerberos5/usr.bin/string2key/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/string2key/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -7,9 +7,7 @@ CFLAGS+= -I${KRB5DIR}/kdc \ -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/windc -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBVERS} -LDADD= -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} +LIBADD= krb5 roken crypto vers .include Modified: head/kerberos5/usr.bin/verify_krb5_conf/Makefile ============================================================================== --- head/kerberos5/usr.bin/verify_krb5_conf/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.bin/verify_krb5_conf/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -3,10 +3,7 @@ PROG= verify_krb5_conf MAN= verify_krb5_conf.8 CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken -DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} -LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -lcom_err +LIBADD= krb5 roken vers .include Modified: head/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- head/kerberos5/usr.sbin/iprop-log/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.sbin/iprop-log/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -8,10 +8,7 @@ CFLAGS+= -I${KRB5DIR}/lib/kadm5 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/sl \ -I. -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBCRYPT} ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBEDIT} -LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -lcrypto -lcrypt ${LIBSL} -lroken \ - ${LIBVERS} -ledit +LIBADD= kadm5srv hdb krb5 roken edit sl vers iprop-commands.h: iprop-commands.in ${SLC} ${.ALLSRC:M*.in} Modified: head/kerberos5/usr.sbin/kstash/Makefile ============================================================================== --- head/kerberos5/usr.sbin/kstash/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.sbin/kstash/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -4,10 +4,9 @@ PROG= kstash MAN= kstash.8 CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kdc ${LDAPCFLAGS} -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LDAPDPADD} -LDADD= -lhdb -lkrb5 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt ${LDAPLDADD} +LIBADD= hdb krb5 crypto vers +DPADD= ${LDAPDPADD} +LDADD= ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- head/kerberos5/usr.sbin/ktutil/Makefile Tue Nov 25 09:54:05 2014 (r275021) +++ head/kerberos5/usr.sbin/ktutil/Makefile Tue Nov 25 09:57:42 2014 (r275022) @@ -17,10 +17,7 @@ SRCS= add.c \ rename.c CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I. -DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBSL} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBEDIT} -LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcrypt -ledit +LIBADD= kadm5clnt krb5 roken crypto edit sl vers .include From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 10:04:56 2014 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C872120A; Tue, 25 Nov 2014 10:04:56 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 91B6CEC8; Tue, 25 Nov 2014 10:04:55 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA20607; Tue, 25 Nov 2014 12:06:46 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XtCzN-000DbV-7t; Tue, 25 Nov 2014 12:04:53 +0200 Message-ID: <5474540D.2000607@FreeBSD.org> Date: Tue, 25 Nov 2014 12:03:57 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: d@delphij.net, Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r273060 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201410132039.s9DKdpmh055573@svn.freebsd.org> <546F57B1.2020602@FreeBSD.org> <546F9FC3.10402@delphij.net> In-Reply-To: <546F9FC3.10402@delphij.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 10:04:56 -0000 On 21/11/2014 22:25, Xin Li wrote: > On 11/21/14 07:18, Andriy Gapon wrote: >> On 13/10/2014 23:39, Xin LI wrote: >>> Author: delphij Date: Mon Oct 13 20:39:51 2014 New Revision: >>> 273060 URL: https://svnweb.freebsd.org/changeset/base/273060 >>> >>> Log: Use write_psize instead of write_asize when doing >>> vdev_space_update. Without this change the accounting of L2ARC >>> usage would be wrong and give 16EB free space because the number >>> became negative and overflows. >>> >>> Obtained from: FreeNAS (issue #6239) > >> First, a link to the issue would be more convenient for reviewers. >> Here it is https://bugs.freenas.org/issues/6239 > >> Then, I would like to see a technical explanation for this change. >> I could not find any explanation here or in the FreeNAS issue or in >> the FreeNAS commit. > >> As far as I can see, all calls to vdev_space_update() in the ARC >> code are passed l2hdr->b_asize or a sum of b_asize fields of >> multiple buffers. Thus, I am really surprised with this change and >> would like to see reasoning behind it. > > Hmm I think you are right that my change doesn't make sense but I > can't remember the details either and suggests there is some other > issues that was covered up by this. Maybe you have some other changes in FreeNAS and the change in question is supposed to work along with them? Meanwhile, perhaps the discussed commit needs to be reverted? > It looks like that I was confused because the L2ARC clock hand > advances by buf_p_sz (unrelated but it should really be called > buf_a_size) and the way we calculate allocated L2ARC free. Agree about 'a' vs 'p'. And, BTW, we have some related changes in ClusterHQ that I will upstream. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 10:18:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE0C64EA; Tue, 25 Nov 2014 10:18:58 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0F551; Tue, 25 Nov 2014 10:18:58 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 22697AC8B; Tue, 25 Nov 2014 10:18:57 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 9E8601285; Tue, 25 Nov 2014 11:18:51 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ermal LuXXi Subject: Re: svn commit: r274709 - head/sys/netpfil/pf References: <201411191331.sAJDV9bH092190@svn.freebsd.org> <86tx1nvcy4.fsf@nine.des.no> Date: Tue, 25 Nov 2014 11:18:51 +0100 In-Reply-To: <86tx1nvcy4.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Tue, 25 Nov 2014 10:36:51 +0100") Message-ID: <86ppcbvb04.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 10:18:58 -0000 Dag-Erling Sm=C3=B8rgrav writes: > This is wrong, and causes a panic with some network adapters (vtnet, for > one). It is closely related to 192013 and should not have been > committed without consulting me first. Please revert, or just #if 0 out > the entire block since the old code is even more wrong than your > version. Note: I am aware that the patch in 192013 is incorrect as well, which is why I never committed it, although I should have noted that in the PR. The current IPv4 code is also slightly wrong, but not as much as the IPv6 code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:07:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8136D5F; Tue, 25 Nov 2014 11:07:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94AA97E7; Tue, 25 Nov 2014 11:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPB747s091486; Tue, 25 Nov 2014 11:07:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPB74Vb091485; Tue, 25 Nov 2014 11:07:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251107.sAPB74Vb091485@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275023 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:07:04 -0000 Author: bapt Date: Tue Nov 25 11:07:03 2014 New Revision: 275023 URL: https://svnweb.freebsd.org/changeset/base/275023 Log: Define compiler_rt and ssp_nonshared libraries Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 09:57:42 2014 (r275022) +++ head/share/mk/src.libnames.mk Tue Nov 25 11:07:03 2014 (r275023) @@ -45,10 +45,11 @@ _LIBRARIES= \ cam \ capsicum \ casper \ - ctf \ com_err \ + compiler_rt \ crypt \ crypto \ + ctf \ cuse \ cxxrt \ devstat \ @@ -106,6 +107,7 @@ _LIBRARIES= \ ssl \ stdthreads \ supcplusplus \ + ssp_nonshared \ tacplus \ termcapw \ ufs \ @@ -115,6 +117,7 @@ _LIBRARIES= \ wind \ wrap \ y \ + ypclnt \ z _DP_archive= z bz2 lzma bsdxml From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:07:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2005FEA0; Tue, 25 Nov 2014 11:07:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09D577F0; Tue, 25 Nov 2014 11:07:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPB7hkY091668; Tue, 25 Nov 2014 11:07:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPB7RUq091572; Tue, 25 Nov 2014 11:07:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251107.sAPB7RUq091572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275024 - in head/lib: atf/libatf-c++ libarchive libarchive/test libbsnmp/libbsnmp libc libc++ libcam libcapsicum libcasper libcrypt/tests libcuse libdevstat libdpv libdwarf libedit lib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:07:43 -0000 Author: bapt Date: Tue Nov 25 11:07:26 2014 New Revision: 275024 URL: https://svnweb.freebsd.org/changeset/base/275024 Log: Convert libraries to use LIBADD While here reduce a bit overlinking Modified: head/lib/atf/libatf-c++/Makefile head/lib/libarchive/Makefile head/lib/libarchive/test/Makefile head/lib/libbsnmp/libbsnmp/Makefile head/lib/libc++/Makefile head/lib/libc/Makefile head/lib/libcam/Makefile head/lib/libcapsicum/Makefile head/lib/libcasper/Makefile head/lib/libcrypt/tests/Makefile head/lib/libcuse/Makefile head/lib/libdevstat/Makefile head/lib/libdpv/Makefile head/lib/libdwarf/Makefile head/lib/libedit/Makefile head/lib/libexecinfo/Makefile head/lib/libfetch/Makefile head/lib/libgeom/Makefile head/lib/libldns/Makefile head/lib/libmagic/Makefile head/lib/libmemstat/Makefile head/lib/libmp/Makefile head/lib/libmp/tests/Makefile head/lib/libnv/tests/Makefile head/lib/libopie/Makefile head/lib/libpam/modules/Makefile.inc head/lib/libpam/modules/pam_krb5/Makefile head/lib/libpam/modules/pam_ksu/Makefile head/lib/libpam/modules/pam_nologin/Makefile head/lib/libpam/modules/pam_opie/Makefile head/lib/libpam/modules/pam_opieaccess/Makefile head/lib/libpam/modules/pam_passwdqc/Makefile head/lib/libpam/modules/pam_radius/Makefile head/lib/libpam/modules/pam_ssh/Makefile head/lib/libpam/modules/pam_tacplus/Makefile head/lib/libpam/modules/pam_unix/Makefile head/lib/libpjdlog/Makefile head/lib/libproc/Makefile head/lib/libprocstat/Makefile head/lib/libradius/Makefile head/lib/librpcsec_gss/Makefile head/lib/librt/Makefile head/lib/librt/tests/Makefile head/lib/libsmb/Makefile head/lib/libsqlite3/Makefile head/lib/libstdthreads/Makefile head/lib/libtacplus/Makefile head/lib/libulog/Makefile head/lib/libunbound/Makefile head/lib/libusb/Makefile head/lib/libutil/tests/Makefile head/lib/msun/tests/Makefile head/lib/ncurses/form/Makefile head/lib/ncurses/menu/Makefile head/lib/ncurses/panel/Makefile Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/atf/libatf-c++/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -33,8 +33,7 @@ PRIVATELIB= true SHLIB_MAJOR= 2 # libatf-c++ depends on the C version of the ATF library to build. -DPADD= ${LIBATF_C} -LDADD= -latf-c +LIBADD+= atf_c LDFLAGS+= -L${.OBJDIR}/../libatf-c Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libarchive/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -4,19 +4,9 @@ LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive LIB= archive -DPADD= ${LIBZ} -LDADD= -lz -DPADD+= ${LIBBZ2} -LDADD+= -lbz2 -CFLAGS+= -DHAVE_BZLIB_H=1 - -DPADD+= ${LIBLZMA} -LDADD+= -llzma -CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 - -DPADD+= ${LIBBSDXML} -LDADD+= -lbsdxml +LIBADD= z bz2 lzma bsdxml +CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. @@ -27,11 +17,9 @@ CFLAGS+= -I${.OBJDIR} .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_OPENSSL -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD+= crypto .else -DPADD+= ${LIBMD} -LDADD+= -lmd +LIBADD+= md .endif .if ${MK_ICONV} != "no" Modified: head/lib/libarchive/test/Makefile ============================================================================== --- head/lib/libarchive/test/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libarchive/test/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -6,9 +6,8 @@ MAN= PROG=libarchive_test INTERNALPROG=yes # Don't install this; it's just for testing -DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML} LDADD= -L ${.OBJDIR}/.. -larchive -LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml +LIBADD= z bz2 lzma md crypto bsdxml CFLAGS+= -g CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR} CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libbsnmp/libbsnmp/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -15,8 +15,7 @@ CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES .if ${MK_OPENSSL} != "no" CFLAGS+= -DHAVE_LIBCRYPTO -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD= crypto .endif SRCS= asn1.c snmp.c snmpagent.c snmpclient.c snmpcrypto.c support.c Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libc++/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -62,8 +62,7 @@ CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -n CXXFLAGS+= -std=c++11 .endif -DPADD= ${LIBCXXRT} -LDADD= -lcxxrt +LIBADD+= cxxrt LDFLAGS+= --verbose INCSGROUPS= STD EXP EXT Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libc/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -44,13 +44,11 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # # Link with static libcompiler_rt.a. # -DPADD+= ${LIBCOMPILER_RT} LDFLAGS+= -nodefaultlibs -LDADD+= -lcompiler_rt +LIBADD+= compiler_rt .if ${MK_SSP} != "no" -DPADD+= ${LIBSSP_NONSHARED} -LDADD+= -lssp_nonshared +LIBADD+= ssp_nonshared .endif # Extras that live in either libc.a or libc_nonshared.a Modified: head/lib/libcam/Makefile ============================================================================== --- head/lib/libcam/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libcam/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -6,8 +6,7 @@ SRCS= camlib.c scsi_cmdparse.c scsi_all ata_all.c smp_all.c INCS= camlib.h -DPADD= ${LIBSBUF} -LDADD= -lsbuf +LIBADD= sbuf MAN= cam.3 cam_cdbparse.3 Modified: head/lib/libcapsicum/Makefile ============================================================================== --- head/lib/libcapsicum/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libcapsicum/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -21,8 +21,7 @@ INCS+= libcapsicum_random.h INCS+= libcapsicum_service.h INCS+= libcapsicum_sysctl.h -DPADD= ${LIBNV} -LDADD= -lnv +LIBADD= nv CFLAGS+=-I${.CURDIR} CFLAGS+=-I${.CURDIR}/../libnv Modified: head/lib/libcasper/Makefile ============================================================================== --- head/lib/libcasper/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libcasper/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -8,8 +8,7 @@ SHLIBDIR?= /lib SRCS= libcasper.c INCS= libcasper.h -DPADD= ${LIBCAPSICUM} ${LIBNV} ${LIBPJDLOG} -LDADD= -lcapsicum -lnv -lpjdlog +LIBADD= capsicum nv pjdlog CFLAGS+=-I${.CURDIR} CFLAGS+=-I${.CURDIR}/../libpjdlog Modified: head/lib/libcrypt/tests/Makefile ============================================================================== --- head/lib/libcrypt/tests/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libcrypt/tests/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -7,7 +7,6 @@ TESTSDIR= ${TESTSBASE}/lib/libcrypt ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} -DPADD+= ${LIBCRYPT} -LDADD+= -lcrypt +LIBADD= crypt .include Modified: head/lib/libcuse/Makefile ============================================================================== --- head/lib/libcuse/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libcuse/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -30,14 +30,12 @@ SHLIB_MINOR= 0 SRCS= cuse_lib.c INCS= cuse.h MAN= cuse.3 -PTHREAD_LIBS?= -lpthread CFLAGS+= -D_GNU_SOURCE .if defined(HAVE_DEBUG) CFLAGS+= -g CFLAGS+= -DHAVE_DEBUG .endif -DPADD+= ${LIBPTHREAD} -LDADD+= ${PTHREAD_LIBS} +LIBADD= pthread MLINKS= MLINKS+= cuse.3 cuse_alloc_unit_number.3 Modified: head/lib/libdevstat/Makefile ============================================================================== --- head/lib/libdevstat/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libdevstat/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -7,8 +7,7 @@ SHLIB_MAJOR= 7 SRCS= devstat.c INCS= devstat.h -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm MAN= devstat.3 Modified: head/lib/libdpv/Makefile ============================================================================== --- head/lib/libdpv/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libdpv/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -6,8 +6,7 @@ INCS= dpv.h MAN= dpv.3 MLINKS= dpv.3 dpv_free.3 -DPADD= ${LIBDIALOG} ${LIBFIGPAR} ${LIBNCURSESW} ${LIBUTIL} -LDADD= -ldialog -lfigpar -lncursesw -lutil +LIBADD= dialog figpar util ncursesw SRCS= dialog_util.c dialogrc.c dprompt.c dpv.c status.c util.c Modified: head/lib/libdwarf/Makefile ============================================================================== --- head/lib/libdwarf/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libdwarf/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -96,8 +96,7 @@ sys/elf32.h sys/elf64.h sys/elf_common.h mkdir -p ${.OBJDIR}/sys ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET} -LDADD+= -lelf -DPADD+= ${LIBELF} +LIBADD+= elf SHLIB_MAJOR= 4 Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libedit/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -10,8 +10,7 @@ OSRCS= chared.c common.c el.c emacs.c fc hist.c key.c map.c \ parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c -DPADD= ${LIBNCURSESW} -LDADD= -lncursesw +LIBADD= ncursesw MAN= editline.3 editrc.5 Modified: head/lib/libexecinfo/Makefile ============================================================================== --- head/lib/libexecinfo/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libexecinfo/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -10,8 +10,7 @@ SHLIB_MAJOR= 1 INCS= execinfo.h SRCS= backtrace.c symtab.c unwind.c -DPADD= ${LIBELF} -LDADD= -lelf +LIBADD= elf MAN= backtrace.3 Modified: head/lib/libfetch/Makefile ============================================================================== --- head/lib/libfetch/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libfetch/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -16,11 +16,9 @@ CFLAGS+= -DINET6 .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_SSL -DPADD= ${LIBSSL} ${LIBCRYPTO} -LDADD= -lssl -lcrypto +LIBADD+= ssl crypto .else -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD+= md .endif CFLAGS+= -DFTP_COMBINE_CWDS Modified: head/lib/libgeom/Makefile ============================================================================== --- head/lib/libgeom/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libgeom/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -13,8 +13,7 @@ CFLAGS += -I${.CURDIR} WARNS?= 3 -DPADD= ${LIBBSDXML} ${LIBSBUF} -LDADD= -lbsdxml -lsbuf +LIBADD+= bsdxml sbuf MAN= libgeom.3 Modified: head/lib/libldns/Makefile ============================================================================== --- head/lib/libldns/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libldns/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -18,8 +18,7 @@ SRCS= buffer.c dane.c dname.c dnssec.c d SRCS+= b64_ntop.c b64_pton.c -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD= crypto WARNS ?= 3 Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libmagic/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -7,8 +7,7 @@ CONTRDIR= ${.CURDIR}/../../contrib/file LIB= magic SHLIB_MAJOR= 4 -DPADD= ${LIBZ} -LDADD= -lz +LIBADD= z MAN= libmagic.3 magic.5 SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ Modified: head/lib/libmemstat/Makefile ============================================================================== --- head/lib/libmemstat/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libmemstat/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -3,8 +3,7 @@ WARNS?= 3 LIB= memstat SHLIB_MAJOR= 3 -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD+= kvm SRCS+= memstat.c SRCS+= memstat_all.c SRCS+= memstat_malloc.c Modified: head/lib/libmp/Makefile ============================================================================== --- head/lib/libmp/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libmp/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -4,8 +4,7 @@ LIB= mp SHLIB_MAJOR= 7 -DPADD= ${LIBCRYPTO} -LDADD= -lcrypto +LIBADD= crypto MAN= libmp.3 INCS= mp.h SRCS= mpasbn.c Modified: head/lib/libmp/tests/Makefile ============================================================================== --- head/lib/libmp/tests/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libmp/tests/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -4,7 +4,6 @@ TESTSDIR= ${TESTSBASE}/lib/libmp TAP_TESTS_C+= legacy_test -DPADD+= ${LIBCRYPTO} ${LIBMP} -LDADD+= -lcrypto -lmp +LIBADD+= mp .include Modified: head/lib/libnv/tests/Makefile ============================================================================== --- head/lib/libnv/tests/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libnv/tests/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -9,8 +9,7 @@ TAP_TESTS_C+= nvlist_get_test TAP_TESTS_C+= nvlist_move_test TAP_TESTS_C+= nvlist_send_recv_test -DPADD+= ${LIBNV} -LDADD+= -lnv +LIBADD+= nv WARNS?= 6 Modified: head/lib/libopie/Makefile ============================================================================== --- head/lib/libopie/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libopie/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -27,8 +27,7 @@ CFLAGS+= -DINSECURE_OVERRIDE -DPATH_ACCE WARNS?= 0 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md MAN= ${OPIE_DIST}/opie.4 ${OPIE_DIST}/opiekeys.5 ${OPIE_DIST}/opieaccess.5 Modified: head/lib/libpam/modules/Makefile.inc ============================================================================== --- head/lib/libpam/modules/Makefile.inc Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/Makefile.inc Tue Nov 25 11:07:26 2014 (r275024) @@ -14,8 +14,7 @@ CFLAGS+= -I${PAMDIR}/include -I${.CURDIR NO_PIC= .else SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR} -DPADD+= ${LIBPAM} -LDADD+= -lpam +LIBADD+= pam .endif .include "../Makefile.inc" Modified: head/lib/libpam/modules/pam_krb5/Makefile ============================================================================== --- head/lib/libpam/modules/pam_krb5/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_krb5/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -32,7 +32,6 @@ CFLAGS+=-D_FREEFALL_CONFIG WARNS?= 3 .endif -DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} -LDADD= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto +LIBADD+= krb5 .include Modified: head/lib/libpam/modules/pam_ksu/Makefile ============================================================================== --- head/lib/libpam/modules/pam_ksu/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_ksu/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -28,7 +28,6 @@ LIB= pam_ksu SRCS= pam_ksu.c MAN= pam_ksu.8 -DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} -LDADD= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto +LIBADD+= krb5 .include Modified: head/lib/libpam/modules/pam_nologin/Makefile ============================================================================== --- head/lib/libpam/modules/pam_nologin/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_nologin/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -28,7 +28,6 @@ LIB= pam_nologin SRCS= pam_nologin.c MAN= pam_nologin.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD+= util .include Modified: head/lib/libpam/modules/pam_opie/Makefile ============================================================================== --- head/lib/libpam/modules/pam_opie/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_opie/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -29,7 +29,6 @@ LIB= pam_opie SRCS= pam_opie.c MAN= pam_opie.8 -DPADD= ${LIBOPIE} -LDADD= -lopie +LIBADD+= opie .include Modified: head/lib/libpam/modules/pam_opieaccess/Makefile ============================================================================== --- head/lib/libpam/modules/pam_opieaccess/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_opieaccess/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -4,7 +4,6 @@ LIB= pam_opieaccess SRCS= ${LIB}.c MAN= pam_opieaccess.8 -DPADD= ${LIBOPIE} -LDADD= -lopie +LIBADD+= opie .include Modified: head/lib/libpam/modules/pam_passwdqc/Makefile ============================================================================== --- head/lib/libpam/modules/pam_passwdqc/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_passwdqc/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -10,8 +10,7 @@ MAN= pam_passwdqc.8 WARNS?= 2 CFLAGS+= -I${SRCDIR} -DPADD= ${LIBCRYPT} -LDADD= -lcrypt +LIBADD+= crypt .include Modified: head/lib/libpam/modules/pam_radius/Makefile ============================================================================== --- head/lib/libpam/modules/pam_radius/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_radius/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -29,7 +29,6 @@ SRCS= pam_radius.c MAN= pam_radius.8 WARNS?= 3 -DPADD= ${LIBRADIUS} -LDADD= -lradius +LIBADD+= radius .include Modified: head/lib/libpam/modules/pam_ssh/Makefile ============================================================================== --- head/lib/libpam/modules/pam_ssh/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_ssh/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -13,9 +13,7 @@ SRCS+= roaming_dummy.c WARNS?= 3 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h -DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT} -LDADD= ${LDSSH} -lcrypto -lcrypt -USEPRIVATELIB= ssh +LIBADD= ssh .include Modified: head/lib/libpam/modules/pam_tacplus/Makefile ============================================================================== --- head/lib/libpam/modules/pam_tacplus/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_tacplus/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -28,7 +28,6 @@ LIB= pam_tacplus SRCS= pam_tacplus.c MAN= pam_tacplus.8 -DPADD= ${LIBTACPLUS} -LDADD= -ltacplus +LIBADD+= tacplus .include Modified: head/lib/libpam/modules/pam_unix/Makefile ============================================================================== --- head/lib/libpam/modules/pam_unix/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpam/modules/pam_unix/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -41,13 +41,11 @@ LIB= pam_unix SRCS= pam_unix.c MAN= pam_unix.8 -DPADD+= ${LIBUTIL} ${LIBCRYPT} -LDADD+= -lutil -lcrypt +LIBADD+= util crypt .if ${MK_NIS} != "no" CFLAGS+= -DYP -DPADD+= ${LIBYPCLNT} -LDADD+= -lypclnt +LIBADD+= ypclnt .endif .include Modified: head/lib/libpjdlog/Makefile ============================================================================== --- head/lib/libpjdlog/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libpjdlog/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -13,8 +13,7 @@ SHLIB_MAJOR= 0 CFLAGS+=-I${.CURDIR} -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util WARNS?= 6 Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libproc/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -18,16 +18,13 @@ CFLAGS+= -I${.CURDIR} .if ${MK_CXX} == "no" CFLAGS+= -DNO_CXA_DEMANGLE .elif ${MK_LIBCPLUSPLUS} != "no" -LDADD+= -lcxxrt -DPADD+= ${LIBCXXRT} +LIBADD+= cxxrt .else -LDADD+= -lsupc++ -DPADD+= ${LIBSTDCPLUSPLUS} +LIBADD+= supcplusplus .endif .if ${MK_CDDL} != "no" -LDADD+= -lctf -DPADD+= ${LIBCTF} +LIBADD+= ctf IGNORE_PRAGMA= YES CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \ -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \ Modified: head/lib/libprocstat/Makefile ============================================================================== --- head/lib/libprocstat/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libprocstat/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -19,8 +19,7 @@ INCS= libprocstat.h CFLAGS+= -I. -I${.CURDIR} -D_KVM_VNODE SHLIB_MAJOR= 1 -DPADD= ${LIBELF} ${LIBKVM} ${LIBUTIL} -LDADD= -lelf -lkvm -lutil +LIBADD= elf kvm util MAN= libprocstat.3 Modified: head/lib/libradius/Makefile ============================================================================== --- head/lib/libradius/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libradius/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -70,13 +70,11 @@ MLINKS+=libradius.3 rad_acct_open.3 \ WARNS?= 3 -.if ${MK_OPENSSL} == "no" -DPADD= ${LIBMD} -LDADD= -lmd -.else -DPADD= ${LIBCRYPTO} -LDADD= -lcrypto +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto CFLAGS+= -DWITH_SSL +.else +LIBADD+= md .endif .include Modified: head/lib/librpcsec_gss/Makefile ============================================================================== --- head/lib/librpcsec_gss/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/librpcsec_gss/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -5,8 +5,7 @@ SHLIB_MAJOR= 1 SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rpcsec_gss_conf.c rpcsec_gss_misc.c \ svc_rpcsec_gss.c -DPADD+= ${LIBGSSAPI} -LDADD+= -lgssapi +LIBADD= gssapi VERSION_DEF= ${.CURDIR}/../libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/librt/Makefile ============================================================================== --- head/lib/librt/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/librt/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -9,8 +9,7 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I$ CFLAGS+=-fexceptions .endif CFLAGS+=-Winline -Wall -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread WARNS?= 2 Modified: head/lib/librt/tests/Makefile ============================================================================== --- head/lib/librt/tests/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/librt/tests/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -6,8 +6,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/ TESTSDIR= ${TESTSBASE}/lib/librt -DPADD+= ${LIBRT} -LDADD+= -lrt +LIBADD= rt NETBSD_ATF_TESTS_C= sched_test NETBSD_ATF_TESTS_C+= sem_test Modified: head/lib/libsmb/Makefile ============================================================================== --- head/lib/libsmb/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libsmb/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -7,8 +7,7 @@ CONTRIBDIR= ${.CURDIR}/../../contrib/smb LIB= smb SHLIB_MAJOR= 4 -DPADD= ${LIBKICONV} -LDADD= -lkiconv +LIBADD= kiconv SRCS= rcfile.c ctx.c cfopt.c subr.c nls.c rap.c mbuf.c rq.c file.c \ print.c \ Modified: head/lib/libsqlite3/Makefile ============================================================================== --- head/lib/libsqlite3/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libsqlite3/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -3,6 +3,7 @@ PRIVATELIB= yes LIB= sqlite3 SHLIB_MAJOR?= 0 +LIBADD+= pthreads SRCS= sqlite3.c Modified: head/lib/libstdthreads/Makefile ============================================================================== --- head/lib/libstdthreads/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libstdthreads/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -32,8 +32,7 @@ MLINKS= thrd_create.3 call_once.3 \ thrd_create.3 tss_get.3 \ thrd_create.3 tss_set.3 -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread VERSION_DEF= ${.CURDIR}/../libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/libtacplus/Makefile ============================================================================== --- head/lib/libtacplus/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libtacplus/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -28,8 +28,7 @@ LIB= tacplus SRCS= taclib.c INCS= taclib.h CFLAGS+= -Wall -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md SHLIB_MAJOR= 5 MAN= libtacplus.3 tacplus.conf.5 Modified: head/lib/libulog/Makefile ============================================================================== --- head/lib/libulog/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libulog/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -19,8 +19,7 @@ MLINKS+=ulog_login.3 ulog_login_pseudo.3 utempter_remove_added_record.3 removeFromUtmp.3 \ utempter_remove_record.3 removeLineFromUtmp.3 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md VERSION_DEF= ${.CURDIR}/../libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/libunbound/Makefile ============================================================================== --- head/lib/libunbound/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libunbound/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -28,8 +28,7 @@ SRCS= alloc.c autotrust.c config_file.c WARNS?= 3 -DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD} -LDADD+= -lssl -lcrypto -lpthread +LIBADD= ssl crypto pthread # Misnamed file in upstream source configlexer.l: configlexer.lex Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libusb/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -19,8 +19,7 @@ PTHREAD_LIBS?= -lpthread WARNS?= 2 -DPADD= ${LIBPTHREAD} -LDADD= ${PTHREAD_LIBS} +LIBADD= pthread MLINKS+= libusb.3 usb.3 Modified: head/lib/libutil/tests/Makefile ============================================================================== --- head/lib/libutil/tests/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/libutil/tests/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -9,7 +9,6 @@ TAP_TESTS_C+= pidfile_test TAP_TESTS_C+= trimdomain_test TAP_TESTS_C+= trimdomain-nodomain_test -DPADD+= ${LIBUTIL} -LDADD+= -lutil +LIBADD+= util .include Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/msun/tests/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -41,8 +41,7 @@ NETBSD_ATF_TESTS_C+= tanh_test CSTD= c99 -LDADD+= -lm -DPADD+= ${LIBM} +LIBADD+= m #COPTS+= -Wfloat-equal # Copied from lib/msun/Makefile Modified: head/lib/ncurses/form/Makefile ============================================================================== --- head/lib/ncurses/form/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/ncurses/form/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -54,8 +54,7 @@ CLEANFILES= ncurses_def.h CFLAGS+= -I${SRCDIR} CFLAGS+= -I${NCURSES_DIR}/menu -DPADD= ${LIBNCURSES${LIB_SUFFIX:tu}} -LDADD= -lncurses${LIB_SUFFIX} +LIBADD+= ncurses${LIB_SUFFIX} .if defined(ENABLE_WIDEC) INCS= form.h Modified: head/lib/ncurses/menu/Makefile ============================================================================== --- head/lib/ncurses/menu/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/ncurses/menu/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -40,8 +40,7 @@ CLEANFILES= ncurses_def.h CFLAGS+= -I${SRCDIR} -DPADD= ${LIBNCURSES${LIB_SUFFIX:tu}} -LDADD= -lncurses${LIB_SUFFIX} +LIBADD+= ncurses${LIB_SUFFIX} .if defined(ENABLE_WIDEC) INCS= menu.h eti.h Modified: head/lib/ncurses/panel/Makefile ============================================================================== --- head/lib/ncurses/panel/Makefile Tue Nov 25 11:07:03 2014 (r275023) +++ head/lib/ncurses/panel/Makefile Tue Nov 25 11:07:26 2014 (r275024) @@ -29,8 +29,7 @@ CLEANFILES= ncurses_def.h CFLAGS+= -I${SRCDIR} -DPADD= ${LIBNCURSES${LIB_SUFFIX:tu}} -LDADD= -lncurses${LIB_SUFFIX} +LIBADD+= ncurses${LIB_SUFFIX} .if defined(ENABLE_WIDEC) INCS= panel.h From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:08:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A70B8F; Tue, 25 Nov 2014 11:08:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 070A4807; Tue, 25 Nov 2014 11:08:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPB8wBl091906; Tue, 25 Nov 2014 11:08:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPB8wQj091903; Tue, 25 Nov 2014 11:08:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251108.sAPB8wQj091903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275025 - head/lib/libsqlite3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:08:59 -0000 Author: bapt Date: Tue Nov 25 11:08:58 2014 New Revision: 275025 URL: https://svnweb.freebsd.org/changeset/base/275025 Log: Fix typo Modified: head/lib/libsqlite3/Makefile Modified: head/lib/libsqlite3/Makefile ============================================================================== --- head/lib/libsqlite3/Makefile Tue Nov 25 11:07:26 2014 (r275024) +++ head/lib/libsqlite3/Makefile Tue Nov 25 11:08:58 2014 (r275025) @@ -3,7 +3,7 @@ PRIVATELIB= yes LIB= sqlite3 SHLIB_MAJOR?= 0 -LIBADD+= pthreads +LIBADD+= pthread SRCS= sqlite3.c From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:13:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8131E3C5; Tue, 25 Nov 2014 11:13:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DD778EE; Tue, 25 Nov 2014 11:13:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPBDMIJ095904; Tue, 25 Nov 2014 11:13:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPBDMHp095903; Tue, 25 Nov 2014 11:13:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251113.sAPBDMHp095903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275026 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:13:22 -0000 Author: bapt Date: Tue Nov 25 11:13:21 2014 New Revision: 275026 URL: https://svnweb.freebsd.org/changeset/base/275026 Log: Add a definition for libxo Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 11:08:58 2014 (r275025) +++ head/share/mk/src.libnames.mk Tue Nov 25 11:13:21 2014 (r275026) @@ -116,6 +116,7 @@ _LIBRARIES= \ util \ wind \ wrap \ + xo \ y \ ypclnt \ z From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:14:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD2A551F; Tue, 25 Nov 2014 11:14:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA307903; Tue, 25 Nov 2014 11:14:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPBEgcb096122; Tue, 25 Nov 2014 11:14:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPBEgi5096121; Tue, 25 Nov 2014 11:14:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251114.sAPBEgi5096121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275027 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:14:42 -0000 Author: bapt Date: Tue Nov 25 11:14:42 2014 New Revision: 275027 URL: https://svnweb.freebsd.org/changeset/base/275027 Log: Fix recursive problem with libedit dependency, if you depends on ncursesw and not on itself Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 11:13:21 2014 (r275026) +++ head/share/mk/src.libnames.mk Tue Nov 25 11:14:42 2014 (r275027) @@ -129,7 +129,7 @@ _DP_archive+= md .endif _DP_ssl= crypto _DP_ssh= crypto crypt -_DP_edit= edit +_DP_edit= ncursesw .if ${MK_OPENSSL} != "no" _DP_bsnmp= crypto .endif From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:15:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF552670; Tue, 25 Nov 2014 11:15:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B73E910; Tue, 25 Nov 2014 11:15:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPBFgrs096340; Tue, 25 Nov 2014 11:15:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPBFeAe096329; Tue, 25 Nov 2014 11:15:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251115.sAPBFeAe096329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275028 - in head/bin: csh df ed ls pkill ps rmail sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:15:42 -0000 Author: bapt Date: Tue Nov 25 11:15:40 2014 New Revision: 275028 URL: https://svnweb.freebsd.org/changeset/base/275028 Log: Convert bin/ to LIBADD, reduce overlinking allow to build all components as static Modified: head/bin/csh/Makefile head/bin/df/Makefile head/bin/ed/Makefile head/bin/ls/Makefile head/bin/pkill/Makefile head/bin/ps/Makefile head/bin/rmail/Makefile head/bin/sh/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/csh/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -40,8 +40,7 @@ MLINKS= csh.1 tcsh.1 # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -DPADD= ${LIBTERMCAPW} ${LIBCRYPT} -LDADD= -ltermcapw -lcrypt +LIBADD= termcapw crypt LINKS= ${BINDIR}/csh ${BINDIR}/tcsh Modified: head/bin/df/Makefile ============================================================================== --- head/bin/df/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/df/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -9,7 +9,6 @@ SRCS= df.c vfslist.c CFLAGS+= -I${MOUNT} -DPADD= ${LIBUTIL} ${LIBXO} -LDADD= -lutil -lxo +LIBADD= xo util .include Modified: head/bin/ed/Makefile ============================================================================== --- head/bin/ed/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/ed/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -9,8 +9,7 @@ MLINKS= ed.1 red.1 .if ${MK_OPENSSL} != "no" && ${MK_ED_CRYPTO} != "no" CFLAGS+=-DDES -DPADD= ${LIBCRYPTO} -LDADD= -lcrypto +LIBADD= crypto .endif .include Modified: head/bin/ls/Makefile ============================================================================== --- head/bin/ls/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/ls/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -5,14 +5,12 @@ PROG= ls SRCS= cmp.c ls.c print.c util.c -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .if !defined(RELEASE_CRUNCH) && \ ${MK_LS_COLORS} != no CFLAGS+= -DCOLORLS -DPADD+= ${LIBTERMCAPW} -LDADD+= -ltermcapw +LIBADD+= termcapw .endif .include Modified: head/bin/pkill/Makefile ============================================================================== --- head/bin/pkill/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/pkill/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -5,8 +5,7 @@ PROG= pkill -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm LINKS= ${BINDIR}/pkill ${BINDIR}/pgrep MLINKS= pkill.1 pgrep.1 Modified: head/bin/ps/Makefile ============================================================================== --- head/bin/ps/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/ps/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -11,7 +11,6 @@ SRCS= fmt.c keyword.c nlist.c print.c ps # on large systems. # CFLAGS+=-DLAZY_PS -DPADD= ${LIBM} ${LIBKVM} ${LIBJAIL} -LDADD= -lm -lkvm -ljail +LIBADD= m kvm jail .include Modified: head/bin/rmail/Makefile ============================================================================== --- head/bin/rmail/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/rmail/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -14,11 +14,7 @@ MAN= rmail.8 WARNS?= 2 CFLAGS+=-I${SENDMAIL_DIR}/include -I. -LIBSMDIR= ${.OBJDIR}/../../lib/libsm -LIBSM= ${LIBSMDIR}/libsm.a - -DPADD= ${LIBSM} -LDADD= ${LIBSM} +LIBADD= sm SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Tue Nov 25 11:14:42 2014 (r275027) +++ head/bin/sh/Makefile Tue Nov 25 11:15:40 2014 (r275028) @@ -18,8 +18,7 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -DPADD= ${LIBEDIT} ${LIBTERMCAPW} -LDADD= -ledit -ltermcapw +LIBADD= edit CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:22:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9671896; Tue, 25 Nov 2014 11:22:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5C0D9F9; Tue, 25 Nov 2014 11:22:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPBMTk2000699; Tue, 25 Nov 2014 11:22:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPBMTuE000698; Tue, 25 Nov 2014 11:22:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251122.sAPBMTuE000698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275029 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:22:29 -0000 Author: bapt Date: Tue Nov 25 11:22:28 2014 New Revision: 275029 URL: https://svnweb.freebsd.org/changeset/base/275029 Log: Define libipf internal library Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 11:15:40 2014 (r275028) +++ head/share/mk/src.libnames.mk Tue Nov 25 11:22:28 2014 (r275029) @@ -25,6 +25,7 @@ _PRIVATELIBS= \ _INTERNALIBS= \ event \ + ipf \ mandoc \ netbsd \ ohash \ @@ -207,6 +208,9 @@ LDADD_sqlite3+= ${LDADD_pthread} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +DPADD_ipf+= ${DPADD_kvm} +LDADD_ipf+= ${LDADD_kvm} + # The following depends on libraries which are using pthread DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} @@ -292,3 +296,6 @@ LIBVERS?= ${LIBVERSDIR}/libvers.a LIBSLDIR= ${ROOTOBJDIR}/kerberos5/lib/libsl LIBSL?= ${LIBSLDIR}/libsl.a + +LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf +LIBIPF?= ${LIBIPFDIR}/libipf.a From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:23:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39E869DE; Tue, 25 Nov 2014 11:23:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23D7EA02; Tue, 25 Nov 2014 11:23:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPBNVmG000996; Tue, 25 Nov 2014 11:23:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPBNDxm000824; Tue, 25 Nov 2014 11:23:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251123.sAPBNDxm000824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 11:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275030 - in head/sbin: atm/atmconfig badsect bsdlabel camcontrol casperd ccdconfig ddb devd dhclient dmesg dumpfs fdisk fdisk_pc98 ffsinfo fsck_ffs fsdb gbde geom geom/class/eli geom/c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:23:31 -0000 Author: bapt Date: Tue Nov 25 11:23:12 2014 New Revision: 275030 URL: https://svnweb.freebsd.org/changeset/base/275030 Log: Convert sbin/ to LIBADD Reduce overlinking Modified: head/sbin/atm/atmconfig/Makefile head/sbin/badsect/Makefile head/sbin/bsdlabel/Makefile head/sbin/camcontrol/Makefile head/sbin/casperd/Makefile head/sbin/ccdconfig/Makefile head/sbin/ddb/Makefile head/sbin/devd/Makefile head/sbin/dhclient/Makefile head/sbin/dmesg/Makefile head/sbin/dumpfs/Makefile head/sbin/fdisk/Makefile head/sbin/fdisk_pc98/Makefile head/sbin/ffsinfo/Makefile head/sbin/fsck_ffs/Makefile head/sbin/fsck_ffs/dir.c head/sbin/fsdb/Makefile head/sbin/gbde/Makefile head/sbin/geom/Makefile head/sbin/geom/class/eli/Makefile head/sbin/geom/class/journal/Makefile head/sbin/geom/class/mirror/Makefile head/sbin/geom/class/part/Makefile head/sbin/geom/class/raid/Makefile head/sbin/geom/class/raid3/Makefile head/sbin/geom/core/Makefile head/sbin/ggate/ggatec/Makefile head/sbin/ggate/ggated/Makefile head/sbin/ggate/ggatel/Makefile head/sbin/growfs/Makefile head/sbin/gvinum/Makefile head/sbin/hastctl/Makefile head/sbin/hastd/Makefile head/sbin/ifconfig/Makefile head/sbin/init/Makefile head/sbin/ipf/Makefile.inc head/sbin/ipf/ipf/Makefile head/sbin/ipf/ipfstat/Makefile head/sbin/ipf/ipsend/Makefile head/sbin/ipfw/Makefile head/sbin/iscontrol/Makefile head/sbin/md5/Makefile head/sbin/mdconfig/Makefile head/sbin/mount/Makefile head/sbin/mount_cd9660/Makefile head/sbin/mount_msdosfs/Makefile head/sbin/mount_udf/Makefile head/sbin/nandfs/Makefile head/sbin/natd/Makefile head/sbin/newfs/Makefile head/sbin/newfs_nandfs/Makefile head/sbin/pfctl/Makefile head/sbin/pflogd/Makefile head/sbin/ping/Makefile head/sbin/ping6/Makefile head/sbin/quotacheck/Makefile head/sbin/rcorder/Makefile head/sbin/routed/Makefile head/sbin/routed/rtquery/Makefile head/sbin/savecore/Makefile head/sbin/setkey/Makefile head/sbin/sunlabel/Makefile head/sbin/swapon/Makefile head/sbin/tunefs/Makefile Modified: head/sbin/atm/atmconfig/Makefile ============================================================================== --- head/sbin/atm/atmconfig/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/atm/atmconfig/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -17,11 +17,9 @@ CFLAGS+= -I${.OBJDIR} .if !defined(RESCUE) && ${MK_BSNMP} != "no" CFLAGS+= -DWITH_BSNMP SRCS+= oid.h atmconfig_device.c -DPADD+= ${LIBBSNMP} -LDADD+= -lbsnmp +LIBADD+= bsnmp . if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no" -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD+= crypto . endif .endif Modified: head/sbin/badsect/Makefile ============================================================================== --- head/sbin/badsect/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/badsect/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -2,8 +2,7 @@ # $FreeBSD$ PROG= badsect -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs MAN= badsect.8 WARNS?= 2 Modified: head/sbin/bsdlabel/Makefile ============================================================================== --- head/sbin/bsdlabel/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/bsdlabel/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -12,7 +12,6 @@ LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disk MLINKS= bsdlabel.8 disklabel.8 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD= -lgeom -lbsdxml -lsbuf +LIBADD= geom .include Modified: head/sbin/camcontrol/Makefile ============================================================================== --- head/sbin/camcontrol/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/camcontrol/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -11,8 +11,7 @@ CFLAGS+= -DMINIMALISTIC .if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif -DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} -LDADD= -lcam -lsbuf -lutil +LIBADD= cam sbuf util MAN= camcontrol.8 .include Modified: head/sbin/casperd/Makefile ============================================================================== --- head/sbin/casperd/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/casperd/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,8 +4,7 @@ PROG= casperd SRCS= casperd.c zygote.c -DPADD= ${LIBCASPER} ${LIBCAPSICUM} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL} -LDADD= -lcasper -lcapsicum -lnv -lpjdlog -lutil +LIBADD= casper nv pjdlog util MAN= casperd.8 Modified: head/sbin/ccdconfig/Makefile ============================================================================== --- head/sbin/ccdconfig/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ccdconfig/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -3,7 +3,6 @@ PROG= ccdconfig MAN= ccdconfig.8 -DPADD= ${LIBGEOM} -LDADD= -lgeom +LIBADD= geom .include Modified: head/sbin/ddb/Makefile ============================================================================== --- head/sbin/ddb/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ddb/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,7 +5,6 @@ SRCS= ddb.c ddb_capture.c ddb_script.c MAN= ddb.8 WARNS?= 3 -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm .include Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/devd/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -10,8 +10,7 @@ WARNS?= 3 NO_SHARED?=YES -DPADD= ${LIBL} ${LIBUTIL} -LDADD= -ll -lutil +LIBADD= l util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} Modified: head/sbin/dhclient/Makefile ============================================================================== --- head/sbin/dhclient/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/dhclient/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -41,8 +41,7 @@ PROG= dhclient SCRIPTS=dhclient-script MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-options.5 \ dhclient-script.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util WARNS?= 2 Modified: head/sbin/dmesg/Makefile ============================================================================== --- head/sbin/dmesg/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/dmesg/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,7 +4,6 @@ PROG= dmesg MAN= dmesg.8 -LDADD= -lkvm -DPADD= ${LIBKVM} +LIBADD= kvm .include Modified: head/sbin/dumpfs/Makefile ============================================================================== --- head/sbin/dumpfs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/dumpfs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -3,8 +3,7 @@ PROG= dumpfs WARNS?= 2 -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs MAN= dumpfs.8 .include Modified: head/sbin/fdisk/Makefile ============================================================================== --- head/sbin/fdisk/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/fdisk/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -7,8 +7,7 @@ MAN= fdisk.8 .PATH: ${.CURDIR}/../../sys/geom -DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD+= -lgeom -lbsdxml -lsbuf +LIBADD= geom .include Modified: head/sbin/fdisk_pc98/Makefile ============================================================================== --- head/sbin/fdisk_pc98/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/fdisk_pc98/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -7,7 +7,6 @@ MAN= fdisk.8 .PATH: ${.CURDIR}/../../sys/geom -DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD+= -lgeom -lbsdxml -lsbuf +LIBADD= geom .include Modified: head/sbin/ffsinfo/Makefile ============================================================================== --- head/sbin/ffsinfo/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ffsinfo/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -13,7 +13,6 @@ MAN= ffsinfo.8 WARNS?= 1 CFLAGS+=-DFS_DEBUG -I${GROWFS} -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs .include Modified: head/sbin/fsck_ffs/Makefile ============================================================================== --- head/sbin/fsck_ffs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/fsck_ffs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -9,8 +9,7 @@ MLINKS= fsck_ffs.8 fsck_ufs.8 fsck_ffs.8 SRCS= dir.c ea.c fsutil.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \ pass4.c pass5.c setup.c suj.c utilities.c gjournal.c getmntopts.c \ globs.c -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs WARNS?= 2 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mount Modified: head/sbin/fsck_ffs/dir.c ============================================================================== --- head/sbin/fsck_ffs/dir.c Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/fsck_ffs/dir.c Tue Nov 25 11:23:12 2014 (r275030) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sbin/fsdb/Makefile ============================================================================== --- head/sbin/fsdb/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/fsdb/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -9,8 +9,7 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 -LDADD= -ledit -ltermcapw -DPADD= ${LIBEDIT} ${LIBTERMCAPW} +LIBADD= edit .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs .include Modified: head/sbin/gbde/Makefile ============================================================================== --- head/sbin/gbde/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/gbde/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -20,8 +20,7 @@ CFLAGS+= -I${.CURDIR}/../../sys CLEANFILES+= template.c MAN= gbde.8 -DPADD= ${LIBMD} ${LIBUTIL} ${LIBGEOM} -LDADD= -lmd -lutil -lgeom +LIBADD= md util geom template.c: template.txt file2c 'const char template[] = {' ',0};' \ Modified: head/sbin/geom/Makefile ============================================================================== --- head/sbin/geom/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -14,8 +14,7 @@ MAN= WARNS?= 2 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES -DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lgeom -lsbuf -lbsdxml -lutil +LIBADD= geom util .include Modified: head/sbin/geom/class/eli/Makefile ============================================================================== --- head/sbin/geom/class/eli/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/class/eli/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -8,8 +8,7 @@ SRCS+= g_eli_key.c SRCS+= pkcs5v2.c SRCS+= sha2.c -DPADD= ${LIBMD} ${LIBCRYPTO} -LDADD= -lmd -lcrypto +LIBADD= md crypto WARNS?= 3 Modified: head/sbin/geom/class/journal/Makefile ============================================================================== --- head/sbin/geom/class/journal/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/class/journal/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,8 +5,7 @@ GEOM_CLASS= journal SRCS+= geom_journal_ufs.c -DPADD= ${LIBMD} ${LIBUFS} -LDADD= -lmd -lufs +LIBADD= ufs md CFLAGS+=-I${.CURDIR}/../../../../sys Modified: head/sbin/geom/class/mirror/Makefile ============================================================================== --- head/sbin/geom/class/mirror/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/class/mirror/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,7 +4,6 @@ GEOM_CLASS= mirror -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/sbin/geom/class/part/Makefile ============================================================================== --- head/sbin/geom/class/part/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/class/part/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,7 +4,6 @@ GEOM_CLASS= part -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/sbin/geom/class/raid/Makefile ============================================================================== --- head/sbin/geom/class/raid/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/class/raid/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,7 +4,6 @@ GEOM_CLASS= raid -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/sbin/geom/class/raid3/Makefile ============================================================================== --- head/sbin/geom/class/raid3/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/class/raid3/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,7 +4,6 @@ GEOM_CLASS= raid3 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/sbin/geom/core/Makefile ============================================================================== --- head/sbin/geom/core/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/geom/core/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -11,7 +11,6 @@ NO_SHARED=NO CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\" CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lgeom -lsbuf -lbsdxml -lutil +LIBADD= geom util .include Modified: head/sbin/ggate/ggatec/Makefile ============================================================================== --- head/sbin/ggate/ggatec/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ggate/ggatec/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -10,7 +10,6 @@ CFLAGS+= -DMAX_SEND_SIZE=32768 CFLAGS+= -DLIBGEOM CFLAGS+= -I${.CURDIR}/../shared -DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} ${LIBPTHREAD} -LDADD= -lgeom -lsbuf -lbsdxml -lutil -lpthread +LIBADD= geom util pthread .include Modified: head/sbin/ggate/ggated/Makefile ============================================================================== --- head/sbin/ggate/ggated/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ggate/ggated/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -6,8 +6,7 @@ PROG= ggated MAN= ggated.8 SRCS= ggated.c ggate.c -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread CFLAGS+= -I${.CURDIR}/../shared Modified: head/sbin/ggate/ggatel/Makefile ============================================================================== --- head/sbin/ggate/ggatel/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ggate/ggatel/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -9,7 +9,6 @@ SRCS= ggatel.c ggate.c CFLAGS+= -DLIBGEOM CFLAGS+= -I${.CURDIR}/../shared -DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lgeom -lsbuf -lbsdxml -lutil +LIBADD= geom util .include Modified: head/sbin/growfs/Makefile ============================================================================== --- head/sbin/growfs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/growfs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -19,11 +19,10 @@ CFLAGS+=-I${.CURDIR}/../mount SRCS+= debug.c .endif -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .if ${MK_TESTS} != "no" SUBDIR+= tests .endif -.include +.include Modified: head/sbin/gvinum/Makefile ============================================================================== --- head/sbin/gvinum/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/gvinum/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -7,8 +7,7 @@ MAN= gvinum.8 WARNS?= 2 CFLAGS+= -I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit -DPADD= ${LIBEDIT} ${LIBTERMCAPW} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM} -LDADD= -ledit -ltermcapw -ldevstat -lkvm -lgeom +LIBADD= edit geom .PATH: ${.CURDIR}/../../sys/geom/vinum Modified: head/sbin/hastctl/Makefile ============================================================================== --- head/sbin/hastctl/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/hastctl/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -32,11 +32,9 @@ CFLAGS+=-DINET6 CFLAGS+=-DYY_NO_UNPUT CFLAGS+=-DYY_NO_INPUT -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .if ${MK_OPENSSL} != "no" -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD+= crypto CFLAGS+=-DHAVE_CRYPTO .endif Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/hastd/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -30,11 +30,9 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil +LIBADD= geom pthread util .if ${MK_OPENSSL} != "no" -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD+= crypto CFLAGS+=-DHAVE_CRYPTO .endif Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ifconfig/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -35,12 +35,10 @@ SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround SRCS+= sfp.c # SFP/SFP+ information -DPADD+= ${LIBM} -LDADD+= -lm +LIBADD+= m SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support -DPADD+= ${LIBBSDXML} ${LIBSBUF} -LDADD+= -lbsdxml -lsbuf +LIBADD+= bsdxml sbuf SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... @@ -59,8 +57,7 @@ CFLAGS+= -DINET .endif .if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE) CFLAGS+= -DJAIL -DPADD+= ${LIBJAIL} -LDADD+= -ljail +LIBADD+= jail .endif MAN= ifconfig.8 Modified: head/sbin/init/Makefile ============================================================================== --- head/sbin/init/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/init/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -6,8 +6,7 @@ MAN= init.8 PRECIOUSPROG= INSTALLFLAGS=-b -B.bak CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT -DPADD= ${LIBUTIL} ${LIBCRYPT} -LDADD= -lutil -lcrypt +LIBADD= util crypt NO_SHARED?= YES Modified: head/sbin/ipf/Makefile.inc ============================================================================== --- head/sbin/ipf/Makefile.inc Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ipf/Makefile.inc Tue Nov 25 11:23:12 2014 (r275030) @@ -18,9 +18,7 @@ CFLAGS+= -DUSE_INET6 CFLAGS+= -DNOINET6 .endif -LIBIPF= ${.OBJDIR}/../libipf/libipf.a -DPADD+= ${LIBIPF} ${LIBKVM} -LDADD+= ${LIBIPF} -lkvm +LIBADD+= ipf CLEANFILES+= y.tab.c y.tab.h Modified: head/sbin/ipf/ipf/Makefile ============================================================================== --- head/sbin/ipf/ipf/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ipf/ipf/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -35,8 +35,7 @@ ipf_l.h: lexer.h LIBIPF_SRCS!= cd ${.CURDIR}/../libipf && ${MAKE} -V SRCS SRCS+= ${LIBIPF_SRCS} .else -DPADD+= ${LIBPCAP} -LDADD+= -lpcap +LIBADD+= pcap .endif .include Modified: head/sbin/ipf/ipfstat/Makefile ============================================================================== --- head/sbin/ipf/ipfstat/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ipf/ipfstat/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,7 +5,6 @@ NOGCCERROR= # defined PROG= ipfstat SRCS= ipfstat.c MAN= ipfstat.8 -DPADD+= ${LIBCURSES} -LDADD+= -lcurses +LIBADD+= ncursesw .include Modified: head/sbin/ipf/ipsend/Makefile ============================================================================== --- head/sbin/ipf/ipsend/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ipf/ipsend/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -8,8 +8,7 @@ PROG= ipsend SRCS= ipsend.c ip.c ipsopt.c iplang_y.c iplang_l.l sbpf.c \ sock.c 44arp.c MAN= ipsend.1 ipsend.5 -DPADD+= ${LIBL} -LDADD+= -ll +LIBADD+= l CFLAGS+= -I${NETBSDSRCDIR}/dist/ipf/ipsend CFLAGS+= -I${NETBSDSRCDIR}/dist/ipf/iplang Modified: head/sbin/ipfw/Makefile ============================================================================== --- head/sbin/ipfw/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ipfw/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -11,8 +11,7 @@ SRCS+= altq.c CFLAGS+=-DPF .endif -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util MAN= ipfw.8 .include Modified: head/sbin/iscontrol/Makefile ============================================================================== --- head/sbin/iscontrol/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/iscontrol/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -2,8 +2,7 @@ SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c PROG= iscontrol -DPADD= ${LIBCAM} ${LIBMD} -LDADD= -lcam -lmd +LIBADD= cam md S= ${.CURDIR}/../../sys WARNS?= 3 Modified: head/sbin/md5/Makefile ============================================================================== --- head/sbin/md5/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/md5/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -16,7 +16,6 @@ MLINKS= md5.1 rmd160.1 \ NO_WMISSING_VARIABLE_DECLARATIONS= WFORMAT?= 1 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/sbin/mdconfig/Makefile ============================================================================== --- head/sbin/mdconfig/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/mdconfig/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,8 +5,7 @@ PROG= mdconfig MAN= mdconfig.8 -DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD= -lutil -lgeom -lbsdxml -lsbuf +LIBADD= util geom .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: head/sbin/mount/Makefile ============================================================================== --- head/sbin/mount/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/mount/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -6,7 +6,6 @@ SRCS= mount.c mount_fs.c getmntopts.c vf MAN= mount.8 mount.conf.8 # We do NOT install the getmntopts.3 man page. -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/sbin/mount_cd9660/Makefile ============================================================================== --- head/sbin/mount_cd9660/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/mount_cd9660/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,8 +4,7 @@ PROG= mount_cd9660 SRCS= mount_cd9660.c getmntopts.c MAN= mount_cd9660.8 -DPADD= ${LIBKICONV} -LDADD= -lkiconv +LIBADD= kiconv MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${MOUNT} Modified: head/sbin/mount_msdosfs/Makefile ============================================================================== --- head/sbin/mount_msdosfs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/mount_msdosfs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,8 +5,7 @@ PROG= mount_msdosfs SRCS= mount_msdosfs.c getmntopts.c MAN= mount_msdosfs.8 -DPADD= ${LIBKICONV} -LDADD= -lkiconv +LIBADD= kiconv MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${MOUNT} Modified: head/sbin/mount_udf/Makefile ============================================================================== --- head/sbin/mount_udf/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/mount_udf/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -3,8 +3,7 @@ PROG= mount_udf SRCS= mount_udf.c getmntopts.c MAN= mount_udf.8 -DPADD= ${LIBKICONV} -LDADD= -lkiconv +LIBADD= kiconv MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys Modified: head/sbin/nandfs/Makefile ============================================================================== --- head/sbin/nandfs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/nandfs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,7 +4,6 @@ PROG= nandfs SRCS= nandfs.c lssnap.c mksnap.c rmsnap.c MAN= nandfs.8 -DPADD= ${LIBNANDFS} -LDADD= -lnandfs +LIBADD= nandfs .include Modified: head/sbin/natd/Makefile ============================================================================== --- head/sbin/natd/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/natd/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -3,8 +3,7 @@ PROG = natd SRCS = natd.c icmp.c WARNS?= 3 -LDADD = -lalias -DPADD = ${LIBALIAS} +LIBADD = alias MAN = natd.8 .include Modified: head/sbin/newfs/Makefile ============================================================================== --- head/sbin/newfs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/newfs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,8 +4,7 @@ .PATH: ${.CURDIR}/../../sys/geom PROG= newfs -DPADD= ${LIBUFS} ${LIBUTIL} -LDADD= -lufs -lutil +LIBADD= ufs util SRCS= newfs.c mkfs.c geom_bsd_enc.c WARNS?= 3 Modified: head/sbin/newfs_nandfs/Makefile ============================================================================== --- head/sbin/newfs_nandfs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/newfs_nandfs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -3,7 +3,6 @@ PROG= newfs_nandfs MAN= newfs_nandfs.8 -LDADD+= -lgeom -DPADD+= ${LIBGEOM} +LIBADD= geom .include Modified: head/sbin/pfctl/Makefile ============================================================================== --- head/sbin/pfctl/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/pfctl/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -28,7 +28,6 @@ CFLAGS+= -DWITH_INET YFLAGS= -LDADD+= -lm -lmd -DPADD+= ${LIBM} ${LIBMD} +LIBADD= m md .include Modified: head/sbin/pflogd/Makefile ============================================================================== --- head/sbin/pflogd/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/pflogd/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -8,8 +8,7 @@ MAN= pflogd.8 CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h -LDADD= -lpcap -DPADD= ${LIBPCAP} +LIBADD= pcap WARNS?= 2 Modified: head/sbin/ping/Makefile ============================================================================== --- head/sbin/ping/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ping/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -8,19 +8,16 @@ MAN= ping.8 BINOWN= root BINMODE=4555 WARNS?= 3 -DPADD= ${LIBM} -LDADD= -lm +LIBADD= m .if ${MK_CASPER} != "no" && !defined(RESCUE) -DPADD+= ${LIBCAPSICUM} ${LIBNV} -LDADD+= -lcapsicum -lnv +LIBADD+= capsicum CFLAGS+=-DHAVE_LIBCAPSICUM .endif .if !defined(RELEASE_CRUNCH) CFLAGS+=-DIPSEC -DPADD+= ${LIBIPSEC} -LDADD+= -lipsec +LIBADD+= ipsec .endif .include Modified: head/sbin/ping6/Makefile ============================================================================== --- head/sbin/ping6/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/ping6/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -10,7 +10,6 @@ WARNS?= 3 BINOWN= root BINMODE=4555 -LDADD= -lipsec -lm -lmd -DPADD= ${LIBIPSEC} ${LIBM} ${LIBMD} +LIBADD= ipsec m md .include Modified: head/sbin/quotacheck/Makefile ============================================================================== --- head/sbin/quotacheck/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/quotacheck/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,8 +5,7 @@ PROG= quotacheck SRCS= quotacheck.c preen.c fsutil.c utilities.c WARNS?= 2 MAN= quotacheck.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .PATH: ${.CURDIR}/../fsck ${.CURDIR}/../fsck_ffs Modified: head/sbin/rcorder/Makefile ============================================================================== --- head/sbin/rcorder/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/rcorder/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,8 +5,7 @@ PROG= rcorder SRCS= ealloc.c hash.c rcorder.c MAN= rcorder.8 -LDADD= -lutil -DPADD= ${LIBUTIL} +LIBADD= util # XXX hack for make's hash.[ch] CFLAGS+= -DORDER -I. Modified: head/sbin/routed/Makefile ============================================================================== --- head/sbin/routed/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/routed/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -5,8 +5,7 @@ PROG= routed MAN= routed.8 SRCS= if.c input.c main.c output.c parms.c radix.c rdisc.c table.c trace.c WARNS?= 3 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md SUBDIR= rtquery Modified: head/sbin/routed/rtquery/Makefile ============================================================================== --- head/sbin/routed/rtquery/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/routed/rtquery/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -4,8 +4,7 @@ PROG= rtquery MAN= rtquery.8 -LDADD= -lmd -DPADD= ${LIBMD} +LIBADD= md WARNS?= 3 NO_WARRAY_BOUNDS= Modified: head/sbin/savecore/Makefile ============================================================================== --- head/sbin/savecore/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/savecore/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= savecore -DPADD= ${LIBZ} -LDADD= -lz +LIBADD= z MAN= savecore.8 .include Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/setkey/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -37,8 +37,7 @@ WARNS?= 1 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libipsec YFLAGS= -d -DPADD= ${LIBL} ${LIBY} -LDADD= -ll -ly +LIBADD= l y CLEANFILES= y.tab.c y.tab.h key_test.o keytest @@ -55,8 +54,7 @@ CFLAGS+= -DIPSEC_DEBUG -DYY_NO_UNPUT CFLAGS+= -DINET6 .endif CFLAGS+= -I. -DPADD+= ${LIBIPSEC} -LDADD+= -lipsec +LIBADD+= ipsec CLEANFILES+= scriptdump y.tab.h #SCRIPTS= scriptdump Modified: head/sbin/sunlabel/Makefile ============================================================================== --- head/sbin/sunlabel/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/sunlabel/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -11,8 +11,7 @@ LINKS= ${BINDIR}/sunlabel ${BINDIR}/disk MLINKS= sunlabel.8 disklabel.8 .endif -DPADD= ${LIBGEOM} -LDADD= -lgeom +LIBADD= geom .include Modified: head/sbin/swapon/Makefile ============================================================================== --- head/sbin/swapon/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/swapon/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -8,7 +8,6 @@ LINKS+= ${BINDIR}/swapon ${BINDIR}/swapc MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/sbin/tunefs/Makefile ============================================================================== --- head/sbin/tunefs/Makefile Tue Nov 25 11:22:28 2014 (r275029) +++ head/sbin/tunefs/Makefile Tue Nov 25 11:23:12 2014 (r275030) @@ -2,8 +2,7 @@ # $FreeBSD$ PROG= tunefs -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs MAN= tunefs.8 WARNS= 3 From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 11:38:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA57CE4E; Tue, 25 Nov 2014 11:38:37 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8C8A1B67; Tue, 25 Nov 2014 11:38:37 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id E04EEAD26; Tue, 25 Nov 2014 11:38:35 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id B4ED112AB; Tue, 25 Nov 2014 12:38:28 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ermal LuXXi Subject: Re: svn commit: r274709 - head/sys/netpfil/pf References: <201411191331.sAJDV9bH092190@svn.freebsd.org> <86tx1nvcy4.fsf@nine.des.no> <86ppcbvb04.fsf@nine.des.no> Date: Tue, 25 Nov 2014 12:38:28 +0100 In-Reply-To: <86ppcbvb04.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Tue, 25 Nov 2014 11:18:51 +0100") Message-ID: <86ioi3y0gb.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 11:38:37 -0000 Here's a patch that doesn't crash and tries not to break TSO. Index: sys/netpfil/pf/pf_ioctl.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/netpfil/pf/pf_ioctl.c (revision 274791) +++ sys/netpfil/pf/pf_ioctl.c (working copy) @@ -3576,9 +3576,10 @@ int chk; =20 /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + if ((*m)->m_pkthdr.csum_flags & + ((CSUM_DELAY_IP|CSUM_DELAY_DATA) & ~ifp->if_hwassist)) { in_delayed_cksum(*m); - (*m)->m_pkthdr.csum_flags &=3D ~CSUM_DELAY_DATA; + (*m)->m_pkthdr.csum_flags &=3D ~(CSUM_DELAY_IP|CSUM_DELAY_DATA); } =20 chk =3D pf_test(PF_OUT, ifp, m, inp); @@ -3620,12 +3621,14 @@ int chk; =20 /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + if ((*m)->m_pkthdr.csum_flags & + (CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist)) { in6_delayed_cksum(*m, (*m)->m_pkthdr.len - sizeof(struct ip6_hdr), sizeof(struct ip6_hdr)); (*m)->m_pkthdr.csum_flags &=3D ~CSUM_DELAY_DATA_IPV6; } + CURVNET_SET(ifp->if_vnet); chk =3D pf_test6(PF_OUT, ifp, m, inp); CURVNET_RESTORE(); DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 12:22:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A17E7C54; Tue, 25 Nov 2014 12:22:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D102F6; Tue, 25 Nov 2014 12:22:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPCMUmj030144; Tue, 25 Nov 2014 12:22:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPCMUZj030143; Tue, 25 Nov 2014 12:22:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411251222.sAPCMUZj030143@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 25 Nov 2014 12:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275032 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:22:30 -0000 Author: mav Date: Tue Nov 25 12:22:29 2014 New Revision: 275032 URL: https://svnweb.freebsd.org/changeset/base/275032 Log: Decouple datamove/done logic from CTL status set. Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Nov 25 12:19:05 2014 (r275031) +++ head/sys/cam/ctl/scsi_ctl.c Tue Nov 25 12:22:29 2014 (r275032) @@ -86,7 +86,6 @@ struct ctlfe_softc { STAILQ_HEAD(, ctlfe_softc) ctlfe_softc_list; struct mtx ctlfe_list_mtx; static char ctlfe_mtx_desc[] = "ctlfelist"; -static int ctlfe_dma_enabled = 1; #ifdef CTLFE_INIT_ENABLE static int ctlfe_max_targets = 1; static int ctlfe_num_targets = 0; @@ -101,7 +100,6 @@ struct ctlfe_lun_softc { struct ctlfe_softc *parent_softc; struct cam_periph *periph; ctlfe_lun_flags flags; - struct callout dma_callout; uint64_t ccbs_alloced; uint64_t ccbs_freed; uint64_t ctios_sent; @@ -136,6 +134,7 @@ struct ctlfe_lun_cmd_info { #define CTLFE_MAX_SEGS 32 bus_dma_segment_t cam_sglist[CTLFE_MAX_SEGS]; }; +CTASSERT(sizeof(struct ctlfe_lun_cmd_info) <= CTL_PORT_PRIV_SIZE); /* * When we register the adapter/bus, request that this many ctl_ios be @@ -181,8 +180,6 @@ struct ctlfe_lun_cmd_info { #define RANDOM_WWNN #endif -SYSCTL_INT(_kern_cam_ctl, OID_AUTO, dma_enabled, CTLFLAG_RW, - &ctlfe_dma_enabled, 0, "DMA enabled"); MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CAM CTL FE interface"); #define io_ptr ppriv_ptr0 @@ -211,8 +208,8 @@ static int ctlfe_lun_disable(void *arg int lun_id); static void ctlfe_dump_sim(struct cam_sim *sim); static void ctlfe_dump_queue(struct ctlfe_lun_softc *softc); -static void ctlfe_dma_timeout(void *arg); -static void ctlfe_datamove_done(union ctl_io *io); +static void ctlfe_datamove(union ctl_io *io); +static void ctlfe_done(union ctl_io *io); static void ctlfe_dump(void); static struct periph_driver ctlfe_driver = @@ -402,8 +399,8 @@ ctlfeasync(void *callback_arg, uint32_t port->lun_enable = ctlfe_lun_enable; port->lun_disable = ctlfe_lun_disable; port->targ_lun_arg = softc; - port->fe_datamove = ctlfe_datamove_done; - port->fe_done = ctlfe_datamove_done; + port->fe_datamove = ctlfe_datamove; + port->fe_done = ctlfe_done; /* * XXX KDM the path inquiry doesn't give us the maximum * number of targets supported. @@ -518,9 +515,6 @@ ctlferegister(struct cam_periph *periph, TAILQ_INIT(&softc->work_queue); softc->periph = periph; - - callout_init_mtx(&softc->dma_callout, xpt_path_mtx(periph->path), - /*flags*/ 0); periph->softc = softc; xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); @@ -679,8 +673,6 @@ ctlfecleanup(struct cam_periph *periph) * XXX KDM is there anything else that needs to be done here? */ - callout_stop(&softc->dma_callout); - free(softc, M_CTLFE); } @@ -772,260 +764,213 @@ static void ctlfestart(struct cam_periph *periph, union ccb *start_ccb) { struct ctlfe_lun_softc *softc; + struct ctlfe_lun_cmd_info *cmd_info; struct ccb_hdr *ccb_h; + struct ccb_accept_tio *atio; + struct ccb_scsiio *csio; + uint8_t *data_ptr; + uint32_t dxfer_len; + ccb_flags flags; + union ctl_io *io; + uint8_t scsi_status; softc = (struct ctlfe_lun_softc *)periph->softc; - softc->ccbs_alloced++; ccb_h = TAILQ_FIRST(&softc->work_queue); if (ccb_h == NULL) { softc->ccbs_freed++; xpt_release_ccb(start_ccb); - } else { - struct ccb_accept_tio *atio; - struct ccb_scsiio *csio; - uint8_t *data_ptr; - uint32_t dxfer_len; - ccb_flags flags; - union ctl_io *io; - uint8_t scsi_status; + return; + } + + /* Take the ATIO off the work queue */ + TAILQ_REMOVE(&softc->work_queue, ccb_h, periph_links.tqe); + atio = (struct ccb_accept_tio *)ccb_h; + io = (union ctl_io *)ccb_h->io_ptr; + csio = &start_ccb->csio; - /* Take the ATIO off the work queue */ - TAILQ_REMOVE(&softc->work_queue, ccb_h, periph_links.tqe); - atio = (struct ccb_accept_tio *)ccb_h; - io = (union ctl_io *)ccb_h->io_ptr; - csio = &start_ccb->csio; + flags = atio->ccb_h.flags & + (CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK); - flags = atio->ccb_h.flags & - (CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK); + if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) { + /* + * Datamove call, we need to setup the S/G list. + */ + cmd_info = (struct ctlfe_lun_cmd_info *) + io->io_hdr.port_priv; + bzero(cmd_info, sizeof(*cmd_info)); + scsi_status = 0; + csio->cdb_len = atio->cdb_len; + ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, + &csio->sglist_cnt); + io->scsiio.ext_data_filled += dxfer_len; + if (io->scsiio.ext_data_filled > io->scsiio.kern_total_len) { + xpt_print(periph->path, "%s: tag 0x%04x " + "fill len %u > total %u\n", + __func__, io->scsiio.tag_num, + io->scsiio.ext_data_filled, + io->scsiio.kern_total_len); + } + } else { + /* + * We're done, send status back. + */ + if ((io->io_hdr.flags & CTL_FLAG_ABORT) && + (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { + io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED; - if ((io == NULL) - || (io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) { /* - * We're done, send status back. + * If this command was aborted, we don't + * need to send status back to the SIM. + * Just free the CTIO and ctl_io, and + * recycle the ATIO back to the SIM. */ - flags |= CAM_SEND_STATUS; - if (io == NULL) { - scsi_status = SCSI_STATUS_BUSY; - csio->sense_len = 0; - } else if ((io->io_hdr.flags & CTL_FLAG_ABORT) && - (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { - io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED; - - /* - * If this command was aborted, we don't - * need to send status back to the SIM. - * Just free the CTIO and ctl_io, and - * recycle the ATIO back to the SIM. - */ - xpt_print(periph->path, "%s: aborted " - "command 0x%04x discarded\n", - __func__, io->scsiio.tag_num); - /* - * For a wildcard attachment, commands can - * come in with a specific target/lun. Reset - * the target and LUN fields back to the - * wildcard values before we send them back - * down to the SIM. The SIM has a wildcard - * LUN enabled, not whatever target/lun - * these happened to be. - */ - if (softc->flags & CTLFE_LUN_WILDCARD) { - atio->ccb_h.target_id = - CAM_TARGET_WILDCARD; - atio->ccb_h.target_lun = - CAM_LUN_WILDCARD; - } - - if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(periph->path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - atio->ccb_h.status &= ~CAM_DEV_QFRZN; - } - - ccb_h = TAILQ_FIRST(&softc->work_queue); - - if (atio->ccb_h.func_code != - XPT_ACCEPT_TARGET_IO) { - xpt_print(periph->path, "%s: func_code " - "is %#x\n", __func__, - atio->ccb_h.func_code); - } - start_ccb->ccb_h.func_code = XPT_ABORT; - start_ccb->cab.abort_ccb = (union ccb *)atio; - - /* Tell the SIM that we've aborted this ATIO */ - xpt_action(start_ccb); - softc->ccbs_freed++; - xpt_release_ccb(start_ccb); - - /* - * Send the ATIO back down to the SIM. - */ - xpt_action((union ccb *)atio); - softc->atios_sent++; - - /* - * If we still have work to do, ask for - * another CCB. Otherwise, deactivate our - * callout. - */ - if (ccb_h != NULL) - xpt_schedule(periph, /*priority*/ 1); - else - callout_stop(&softc->dma_callout); - - return; - } else { - io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED; - scsi_status = io->scsiio.scsi_status; - csio->sense_len = io->scsiio.sense_len; - } - data_ptr = NULL; - dxfer_len = 0; - if (io == NULL) { - printf("%s: tag %04x io is NULL\n", __func__, - atio->tag_id); - } else { -#ifdef CTLFEDEBUG - printf("%s: tag %04x status %x\n", __func__, - atio->tag_id, io->io_hdr.status); -#endif - } - csio->sglist_cnt = 0; - if (csio->sense_len != 0) { - csio->sense_data = io->scsiio.sense_data; - flags |= CAM_SEND_SENSE; - } else if (scsi_status == SCSI_STATUS_CHECK_COND) { - xpt_print(periph->path, "%s: check condition " - "with no sense\n", __func__); - } - } else { - struct ctlfe_lun_cmd_info *cmd_info; - + xpt_print(periph->path, "%s: aborted " + "command 0x%04x discarded\n", + __func__, io->scsiio.tag_num); /* - * Datamove call, we need to setup the S/G list. + * For a wildcard attachment, commands can + * come in with a specific target/lun. Reset + * the target and LUN fields back to the + * wildcard values before we send them back + * down to the SIM. The SIM has a wildcard + * LUN enabled, not whatever target/lun + * these happened to be. */ + if (softc->flags & CTLFE_LUN_WILDCARD) { + atio->ccb_h.target_id = CAM_TARGET_WILDCARD; + atio->ccb_h.target_lun = CAM_LUN_WILDCARD; + } - cmd_info = (struct ctlfe_lun_cmd_info *) - io->io_hdr.port_priv; + if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) { + cam_release_devq(periph->path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + atio->ccb_h.status &= ~CAM_DEV_QFRZN; + } + + if (atio->ccb_h.func_code != XPT_ACCEPT_TARGET_IO) { + xpt_print(periph->path, "%s: func_code " + "is %#x\n", __func__, + atio->ccb_h.func_code); + } + start_ccb->ccb_h.func_code = XPT_ABORT; + start_ccb->cab.abort_ccb = (union ccb *)atio; - KASSERT(sizeof(*cmd_info) < CTL_PORT_PRIV_SIZE, - ("%s: sizeof(struct ctlfe_lun_cmd_info) %zd < " - "CTL_PORT_PRIV_SIZE %d", __func__, - sizeof(*cmd_info), CTL_PORT_PRIV_SIZE)); - io->io_hdr.flags &= ~CTL_FLAG_DMA_QUEUED; + /* Tell the SIM that we've aborted this ATIO */ + xpt_action(start_ccb); + softc->ccbs_freed++; + xpt_release_ccb(start_ccb); /* - * Need to zero this, in case it has been used for - * a previous datamove for this particular I/O. + * Send the ATIO back down to the SIM. */ - bzero(cmd_info, sizeof(*cmd_info)); - scsi_status = 0; - - csio->cdb_len = atio->cdb_len; - - ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, - &csio->sglist_cnt); + xpt_action((union ccb *)atio); + softc->atios_sent++; - io->scsiio.ext_data_filled += dxfer_len; + /* + * If we still have work to do, ask for + * another CCB. Otherwise, deactivate our + * callout. + */ + if (!TAILQ_EMPTY(&softc->work_queue)) + xpt_schedule(periph, /*priority*/ 1); + return; + } - if (io->scsiio.ext_data_filled > - io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "fill len %u > total %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_filled, - io->scsiio.kern_total_len); - } + flags |= CAM_SEND_STATUS; + scsi_status = io->scsiio.scsi_status; + csio->sense_len = io->scsiio.sense_len; + data_ptr = NULL; + dxfer_len = 0; +#ifdef CTLFEDEBUG + printf("%s: tag %04x status %x\n", __func__, + atio->tag_id, io->io_hdr.status); +#endif + csio->sglist_cnt = 0; + if (csio->sense_len != 0) { + csio->sense_data = io->scsiio.sense_data; + flags |= CAM_SEND_SENSE; + } else if (scsi_status == SCSI_STATUS_CHECK_COND) { + xpt_print(periph->path, "%s: check condition " + "with no sense\n", __func__); } + } #ifdef CTLFEDEBUG - printf("%s: %s: tag %04x flags %x ptr %p len %u\n", __func__, - (flags & CAM_SEND_STATUS) ? "done" : "datamove", - atio->tag_id, flags, data_ptr, dxfer_len); + printf("%s: %s: tag %04x flags %x ptr %p len %u\n", __func__, + (flags & CAM_SEND_STATUS) ? "done" : "datamove", + atio->tag_id, flags, data_ptr, dxfer_len); #endif - /* - * Valid combinations: - * - CAM_SEND_STATUS, CAM_DATA_SG = 0, dxfer_len = 0, - * sglist_cnt = 0 - * - CAM_SEND_STATUS = 0, CAM_DATA_SG = 0, dxfer_len != 0, - * sglist_cnt = 0 - * - CAM_SEND_STATUS = 0, CAM_DATA_SG, dxfer_len != 0, - * sglist_cnt != 0 - */ + /* + * Valid combinations: + * - CAM_SEND_STATUS, CAM_DATA_SG = 0, dxfer_len = 0, + * sglist_cnt = 0 + * - CAM_SEND_STATUS = 0, CAM_DATA_SG = 0, dxfer_len != 0, + * sglist_cnt = 0 + * - CAM_SEND_STATUS = 0, CAM_DATA_SG, dxfer_len != 0, + * sglist_cnt != 0 + */ #ifdef CTLFEDEBUG - if (((flags & CAM_SEND_STATUS) - && (((flags & CAM_DATA_SG) != 0) - || (dxfer_len != 0) - || (csio->sglist_cnt != 0))) - || (((flags & CAM_SEND_STATUS) == 0) - && (dxfer_len == 0)) - || ((flags & CAM_DATA_SG) - && (csio->sglist_cnt == 0)) - || (((flags & CAM_DATA_SG) == 0) - && (csio->sglist_cnt != 0))) { - printf("%s: tag %04x cdb %02x flags %#x dxfer_len " - "%d sg %u\n", __func__, atio->tag_id, - atio->cdb_io.cdb_bytes[0], flags, dxfer_len, - csio->sglist_cnt); - if (io != NULL) { - printf("%s: tag %04x io status %#x\n", __func__, - atio->tag_id, io->io_hdr.status); - } else { - printf("%s: tag %04x no associated io\n", - __func__, atio->tag_id); - } - } + if (((flags & CAM_SEND_STATUS) + && (((flags & CAM_DATA_SG) != 0) + || (dxfer_len != 0) + || (csio->sglist_cnt != 0))) + || (((flags & CAM_SEND_STATUS) == 0) + && (dxfer_len == 0)) + || ((flags & CAM_DATA_SG) + && (csio->sglist_cnt == 0)) + || (((flags & CAM_DATA_SG) == 0) + && (csio->sglist_cnt != 0))) { + printf("%s: tag %04x cdb %02x flags %#x dxfer_len " + "%d sg %u\n", __func__, atio->tag_id, + atio->cdb_io.cdb_bytes[0], flags, dxfer_len, + csio->sglist_cnt); + printf("%s: tag %04x io status %#x\n", __func__, + atio->tag_id, io->io_hdr.status); + } #endif - cam_fill_ctio(csio, - /*retries*/ 2, - ctlfedone, - flags, - (flags & CAM_TAG_ACTION_VALID) ? - MSG_SIMPLE_Q_TAG : 0, - atio->tag_id, - atio->init_id, - scsi_status, - /*data_ptr*/ data_ptr, - /*dxfer_len*/ dxfer_len, - /*timeout*/ 5 * 1000); - start_ccb->ccb_h.flags |= CAM_UNLOCKED; - start_ccb->ccb_h.ccb_atio = atio; - if (((flags & CAM_SEND_STATUS) == 0) - && (io != NULL)) - io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; - - softc->ctios_sent++; - - cam_periph_unlock(periph); - xpt_action(start_ccb); - cam_periph_lock(periph); + cam_fill_ctio(csio, + /*retries*/ 2, + ctlfedone, + flags, + (flags & CAM_TAG_ACTION_VALID) ? MSG_SIMPLE_Q_TAG : 0, + atio->tag_id, + atio->init_id, + scsi_status, + /*data_ptr*/ data_ptr, + /*dxfer_len*/ dxfer_len, + /*timeout*/ 5 * 1000); + start_ccb->ccb_h.flags |= CAM_UNLOCKED; + start_ccb->ccb_h.ccb_atio = atio; + if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) + io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; + io->io_hdr.flags &= ~(CTL_FLAG_DMA_QUEUED | CTL_FLAG_STATUS_QUEUED); - if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(periph->path, - /*relsim_flags*/0, - /*reduction*/0, - /*timeout*/0, - /*getcount_only*/0); - atio->ccb_h.status &= ~CAM_DEV_QFRZN; - } + softc->ctios_sent++; - ccb_h = TAILQ_FIRST(&softc->work_queue); + cam_periph_unlock(periph); + xpt_action(start_ccb); + cam_periph_lock(periph); + + if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) { + cam_release_devq(periph->path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + atio->ccb_h.status &= ~CAM_DEV_QFRZN; } + /* - * If we still have work to do, ask for another CCB. Otherwise, - * deactivate our callout. + * If we still have work to do, ask for another CCB. */ - if (ccb_h != NULL) + if (!TAILQ_EMPTY(&softc->work_queue)) xpt_schedule(periph, /*priority*/ 1); - else - callout_stop(&softc->dma_callout); } static void @@ -1278,7 +1223,7 @@ ctlfedone(struct cam_periph *periph, uni | (done_ccb->csio.msg_ptr[6]); } - if (srr && (done_ccb->ccb_h.flags & CAM_SEND_STATUS)) { + if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { /* * If status was being sent, the back end data is now * history. Hack it up and resubmit a new command with @@ -1317,7 +1262,7 @@ ctlfedone(struct cam_periph *periph, uni * resources. If we were doing a datamove, call the * datamove done routine. */ - if (done_ccb->ccb_h.flags & CAM_SEND_STATUS) { + if ((io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { softc->ccbs_freed++; xpt_release_ccb(done_ccb); /* @@ -1986,7 +1931,6 @@ ctlfe_dump_sim(struct cam_sim *sim) printf("%s%d: max tagged openings: %d, max dev openings: %d\n", sim->sim_name, sim->unit_number, sim->max_tagged_dev_openings, sim->max_dev_openings); - printf("\n"); } /* @@ -2003,27 +1947,11 @@ ctlfe_dump_queue(struct ctlfe_lun_softc num_items = 0; TAILQ_FOREACH(hdr, &softc->work_queue, periph_links.tqe) { - union ctl_io *io; - - io = hdr->io_ptr; + union ctl_io *io = hdr->io_ptr; num_items++; /* - * This can happen when we get an ATIO but can't allocate - * a ctl_io. See the XPT_ACCEPT_TARGET_IO case in ctlfedone(). - */ - if (io == NULL) { - struct ccb_scsiio *csio; - - csio = (struct ccb_scsiio *)hdr; - - xpt_print(periph->path, "CCB %#x ctl_io allocation " - "failed\n", csio->tag_id); - continue; - } - - /* * Only regular SCSI I/O is put on the work * queue, so we can print sense here. There may be no * sense if it's no the queue for a DMA, but this serves to @@ -2035,20 +1963,15 @@ ctlfe_dump_queue(struct ctlfe_lun_softc ctl_io_error_print(io, NULL); /* - * We're sending status back to the - * initiator, so we're on the queue waiting - * for a CTIO to do that. + * Print DMA status if we are DMA_QUEUED. */ - if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) - continue; - - /* - * Otherwise, we're on the queue waiting to - * do a data transfer. - */ - xpt_print(periph->path, "Total %u, Current %u, Resid %u\n", - io->scsiio.kern_total_len, io->scsiio.kern_data_len, - io->scsiio.kern_data_resid); + if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) { + xpt_print(periph->path, + "Total %u, Current %u, Resid %u\n", + io->scsiio.kern_total_len, + io->scsiio.kern_data_len, + io->scsiio.kern_data_resid); + } } xpt_print(periph->path, "%d requests total waiting for CCBs\n", @@ -2064,66 +1987,43 @@ ctlfe_dump_queue(struct ctlfe_lun_softc } /* - * This function is called when we fail to get a CCB for a DMA or status return - * to the initiator within the specified time period. - * - * The callout code should insure that we hold the sim mutex here. + * Datamove/done routine called by CTL. Put ourselves on the queue to + * receive a CCB from CAM so we can queue the continue I/O request down + * to the adapter. */ static void -ctlfe_dma_timeout(void *arg) +ctlfe_datamove(union ctl_io *io) { - struct ctlfe_lun_softc *softc; + union ccb *ccb; struct cam_periph *periph; - struct cam_sim *sim; - int num_queued; - - softc = (struct ctlfe_lun_softc *)arg; - periph = softc->periph; - sim = xpt_path_sim(periph->path); - num_queued = 0; - - /* - * Nothing to do... - */ - if (TAILQ_FIRST(&softc->work_queue) == NULL) { - xpt_print(periph->path, "TIMEOUT triggered after %d " - "seconds, but nothing on work queue??\n", - CTLFE_DMA_TIMEOUT); - return; - } - - xpt_print(periph->path, "TIMEOUT (%d seconds) waiting for DMA to " - "start\n", CTLFE_DMA_TIMEOUT); - - ctlfe_dump_queue(softc); - - ctlfe_dump_sim(sim); + struct ctlfe_lun_softc *softc; - xpt_print(periph->path, "calling xpt_schedule() to attempt to " - "unstick our queue\n"); + KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, + ("Unexpected io_type (%d) in ctlfe_datamove", io->io_hdr.io_type)); + ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + periph = xpt_path_periph(ccb->ccb_h.path); + cam_periph_lock(periph); + softc = (struct ctlfe_lun_softc *)periph->softc; + io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED; + if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) + io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; + TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, + periph_links.tqe); xpt_schedule(periph, /*priority*/ 1); - - xpt_print(periph->path, "xpt_schedule() call complete\n"); + cam_periph_unlock(periph); } -/* - * Datamove/done routine called by CTL. Put ourselves on the queue to - * receive a CCB from CAM so we can queue the continue I/O request down - * to the adapter. - */ static void -ctlfe_datamove_done(union ctl_io *io) +ctlfe_done(union ctl_io *io) { union ccb *ccb; struct cam_periph *periph; struct ctlfe_lun_softc *softc; ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; - periph = xpt_path_periph(ccb->ccb_h.path); cam_periph_lock(periph); - softc = (struct ctlfe_lun_softc *)periph->softc; if (io->io_hdr.io_type == CTL_IO_TASK) { @@ -2143,27 +2043,10 @@ ctlfe_datamove_done(union ctl_io *io) ccb->ccb_h.func_code = XPT_NOTIFY_ACKNOWLEDGE; xpt_action(ccb); } else { - if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) - io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; - else - io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED; - + io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, periph_links.tqe); - - /* - * Reset the timeout for our latest active DMA. - */ - callout_reset(&softc->dma_callout, - CTLFE_DMA_TIMEOUT * hz, - ctlfe_dma_timeout, softc); - /* - * Ask for the CAM transport layer to send us a CCB to do - * the DMA or send status, unless ctlfe_dma_enabled is set - * to 0. - */ - if (ctlfe_dma_enabled != 0) - xpt_schedule(periph, /*priority*/ 1); + xpt_schedule(periph, /*priority*/ 1); } cam_periph_unlock(periph); @@ -2173,14 +2056,11 @@ static void ctlfe_dump(void) { struct ctlfe_softc *bus_softc; + struct ctlfe_lun_softc *lun_softc; STAILQ_FOREACH(bus_softc, &ctlfe_softc_list, links) { - struct ctlfe_lun_softc *lun_softc; - ctlfe_dump_sim(bus_softc->sim); - - STAILQ_FOREACH(lun_softc, &bus_softc->lun_softc_list, links) { + STAILQ_FOREACH(lun_softc, &bus_softc->lun_softc_list, links) ctlfe_dump_queue(lun_softc); - } } } From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 12:30:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9314EF3; Tue, 25 Nov 2014 12:30:45 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AE43209; Tue, 25 Nov 2014 12:30:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XtFDm-000Evp-MY; Tue, 25 Nov 2014 12:27:54 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Tue, 25 Nov 2014 12:27:54 +0000 (GMT) Date: Tue, 25 Nov 2014 12:27:54 +0000 From: Ruslan Bukin To: Gleb Smirnoff Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141125122754.GA57252@bsdpad.com> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <20141125073145.GT47144@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:30:45 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Nov 25, 2014 at 10:31:45AM +0300, Gleb Smirnoff wrote: > On Mon, Nov 24, 2014 at 09:16:20PM +0000, Ruslan Bukin wrote: > R> On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote: > R> > On Mon, Nov 24, 2014 at 06:03:56PM +0000, Ruslan Bukin wrote: > R> > R> > I this on stock kernel or on kernel with your modifications ? > R> > R> > R> > R> Stock one. I also checked with no virtio but MDROOT - same problems. > R> > > R> > I could expect a panic with a damaged 'struct buf', but not vm_page. > R> > > R> > Can you please do a clean build pre-r274914, and then again a clean > R> > build of r274914, and then confirm that the former is stable, but the > R> > latter panics? > R> > R> Yes, I just proceeded re-check both builds with removing obj dir each time and I still see the problem starting with r274914. > R> > R> Also restoring files like that on latest head makes things happy (no panics): > R> svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h > > Can you please try to un-union the struct buf and see if it helps? > Hi, Un-unioning helps partially: I receive much less panics and able to boot until login prompt in ~ 1/3 attempts with patch attached. Ruslan --uAKRQypu60I7Lcqm Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="buf.patch" Index: sys/sys/buf.h =================================================================== --- sys/sys/buf.h (revision 275031) +++ sys/sys/buf.h (working copy) @@ -107,6 +107,7 @@ off_t b_offset; /* Offset into file. */ TAILQ_ENTRY(buf) b_bobufs; /* (V) Buffer's associated vnode. */ uint32_t b_vflags; /* (V) BV_* flags */ + TAILQ_ENTRY(buf) b_freelist; /* (Q) Free list position inactive. */ unsigned short b_qindex; /* (Q) buffer queue index */ uint32_t b_flags; /* B_* flags. */ b_xflags_t b_xflags; /* extra flags */ @@ -123,16 +124,11 @@ struct ucred *b_rcred; /* Read credentials reference. */ struct ucred *b_wcred; /* Write credentials reference. */ void *b_saveaddr; /* Original b_addr for physio. */ - union { - TAILQ_ENTRY(buf) bu_freelist; /* (Q) */ - struct { - void (*pg_iodone)(void *, vm_page_t *, int, int); - int pg_reqpage; - } bu_pager; - } b_union; -#define b_freelist b_union.bu_freelist -#define b_pager b_union.bu_pager - union cluster_info { + struct pager_info { + void (*pg_iodone)(void *, vm_page_t *, int, int); + int pg_reqpage; + } b_pager; + struct cluster_info { TAILQ_HEAD(cluster_list_head, buf) cluster_head; TAILQ_ENTRY(buf) cluster_entry; } b_cluster; --uAKRQypu60I7Lcqm-- From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 12:44:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70A5F338; Tue, 25 Nov 2014 12:44:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42F10364; Tue, 25 Nov 2014 12:44:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPCiJmU039988; Tue, 25 Nov 2014 12:44:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPCiJ5U039987; Tue, 25 Nov 2014 12:44:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411251244.sAPCiJ5U039987@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Nov 2014 12:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275033 - head/contrib/netbsd-tests/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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:44:19 -0000 Author: jhb Date: Tue Nov 25 12:44:18 2014 New Revision: 275033 URL: https://svnweb.freebsd.org/changeset/base/275033 Log: Only pass 6 arguments to the 'run' function on amd64. amd64's makecontext on FreeBSD only supports a maximum of 6 arguments. This fixes the setcontext_link test on amd64. PR: 194828 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Tue Nov 25 12:22:29 2014 (r275032) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Tue Nov 25 12:44:18 2014 (r275033) @@ -51,7 +51,11 @@ run(int n, ...) ATF_REQUIRE_EQ(n, DEPTH - calls - 1); va_start(va, n); +#if defined(__FreeBSD__) && defined(__amd64__) + for (i = 0; i < 5; i++) { +#else for (i = 0; i < 9; i++) { +#endif ia = va_arg(va, int); ATF_REQUIRE_EQ(i, ia); } @@ -101,13 +105,6 @@ ATF_TC_BODY(setcontext_link, tc) ucontext_t save; volatile int i = 0; /* avoid longjmp clobbering */ -#ifdef __FreeBSD__ -#ifdef __amd64__ - atf_tc_expect_fail("setcontext in this testcase fails on " - "FreeBSD/amd64 with rc == -1/errno == EINVAL; see PR # 194828"); -#endif -#endif - for (i = 0; i < DEPTH; ++i) { ATF_REQUIRE_EQ(getcontext(&uc[i]), 0); @@ -115,21 +112,20 @@ ATF_TC_BODY(setcontext_link, tc) uc[i].uc_stack.ss_size = STACKSZ; uc[i].uc_link = (i > 0) ? &uc[i - 1] : &save; +#if defined(__FreeBSD__) && defined(__amd64__) + /* FreeBSD/amd64 only permits up to 6 arguments. */ + makecontext(&uc[i], (void *)run, 6, i, + 0, 1, 2, 3, 4); +#else makecontext(&uc[i], (void *)run, 10, i, 0, 1, 2, 3, 4, 5, 6, 7, 8); +#endif } ATF_REQUIRE_EQ(getcontext(&save), 0); -#ifdef __FreeBSD__ - if (calls == 0) { - int rc = setcontext(&uc[DEPTH-1]); - ATF_REQUIRE_EQ_MSG(rc, 0, "%d != 0; (errno = %d)", rc, errno); - } -#else if (calls == 0) ATF_REQUIRE_EQ(setcontext(&uc[DEPTH-1]), 0); -#endif } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 12:52:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BE5B9D1; Tue, 25 Nov 2014 12:52:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 887F3647; Tue, 25 Nov 2014 12:52:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPCq1kc044561; Tue, 25 Nov 2014 12:52:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPCq1oQ044560; Tue, 25 Nov 2014 12:52:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411251252.sAPCq1oQ044560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 25 Nov 2014 12:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275035 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:52:01 -0000 Author: jhb Date: Tue Nov 25 12:52:00 2014 New Revision: 275035 URL: https://svnweb.freebsd.org/changeset/base/275035 Log: MFamd64: Check for invalid flags in the machine context in sigreturn() and setcontext(). Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Nov 25 12:45:31 2014 (r275034) +++ head/sys/i386/i386/machdep.c Tue Nov 25 12:52:00 2014 (r275035) @@ -1060,6 +1060,11 @@ sys_sigreturn(td, uap) if (error != 0) return (error); ucp = &uc; + if ((ucp->uc_mcontext.mc_flags & ~_MC_FLAG_MASK) != 0) { + uprintf("pid %d (%s): sigreturn mc_flags %x\n", p->p_pid, + td->td_name, ucp->uc_mcontext.mc_flags); + return (EINVAL); + } regs = td->td_frame; eflags = ucp->uc_mcontext.mc_eflags; if (eflags & PSL_VM) { @@ -3858,7 +3863,8 @@ set_mcontext(struct thread *td, const mc int eflags, ret; tp = td->td_frame; - if (mcp->mc_len != sizeof(*mcp)) + if (mcp->mc_len != sizeof(*mcp) || + (mcp->mc_flags & ~_MC_FLAG_MASK) != 0) return (EINVAL); eflags = (mcp->mc_eflags & PSL_USERCHANGE) | (tp->tf_eflags & ~PSL_USERCHANGE); From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 13:33:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D6AB129; Tue, 25 Nov 2014 13:33:31 +0000 (UTC) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48C87B76; Tue, 25 Nov 2014 13:33:31 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id lj1so582938pab.33 for ; Tue, 25 Nov 2014 05:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=q1IEwz0G4iNF3kFWfwIP2tf5Wv5fyON9YBGz4NnTbY8=; b=Vr8O2paSDZVtZvvXahi7zoPFHZg2+GLb59ShNDjp7+03uLd1U2G4jglbDcMftmc36g RTVcC9B9YIxGCEx6JJCW2UEP/TT1PSGau5+znyUSLFFLi2mKT9smN/dI4sopp3NYC0kG 1Nsv3PZPpBvzWK0OeI9SpXduUXkeNUmT6M2ZJw7lBKxs4dgnMK0lJ2o0LoGul+htUcph TZczWprZ4bznI+YvG0Kq0et2kXPrTveisJKHKYIGL6B/P6UfekFQ/J0jDgJDeuBRnzaj cH7EXH6P7T/4U8D1DiCXWEesItC5TujK291TAJngweruuggHfzadPxGQWLtfX/cLtmeH keJA== MIME-Version: 1.0 X-Received: by 10.70.131.199 with SMTP id oo7mr43749593pdb.138.1416922410795; Tue, 25 Nov 2014 05:33:30 -0800 (PST) Sender: ermal.luci@gmail.com Received: by 10.70.91.232 with HTTP; Tue, 25 Nov 2014 05:33:30 -0800 (PST) In-Reply-To: <86ioi3y0gb.fsf@nine.des.no> References: <201411191331.sAJDV9bH092190@svn.freebsd.org> <86tx1nvcy4.fsf@nine.des.no> <86ppcbvb04.fsf@nine.des.no> <86ioi3y0gb.fsf@nine.des.no> Date: Tue, 25 Nov 2014 14:33:30 +0100 X-Google-Sender-Auth: O6BWEGxviD_T8itGtCJcJCEOA1o Message-ID: Subject: Re: svn commit: r274709 - head/sys/netpfil/pf From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 13:33:31 -0000 Hello Dag, if its working for you i have no issues. For me these changes are taken into consideration during policy routing on pf(4). If you check the pf_route() call it does the same checks as outgoing processing of the modules. If they need to be considered after pf(4) does it internal processing probably should be after the call to pf_test6. There is no reason to have different behaviour for ipv6 from ipv4 internally in pf(4). Also this only affects the traffic sourced by the host itself and not forwarded traffic and i think this patch will provide a regression for the issues that the committed patch does. On Tue, Nov 25, 2014 at 12:38 PM, Dag-Erling Sm=C3=B8rgrav wro= te: > Here's a patch that doesn't crash and tries not to break TSO. > > Index: sys/netpfil/pf/pf_ioctl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/netpfil/pf/pf_ioctl.c (revision 274791) > +++ sys/netpfil/pf/pf_ioctl.c (working copy) > @@ -3576,9 +3576,10 @@ > int chk; > > /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ > - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { > + if ((*m)->m_pkthdr.csum_flags & > + ((CSUM_DELAY_IP|CSUM_DELAY_DATA) & ~ifp->if_hwassist)) { > in_delayed_cksum(*m); > - (*m)->m_pkthdr.csum_flags &=3D ~CSUM_DELAY_DATA; > + (*m)->m_pkthdr.csum_flags &=3D > ~(CSUM_DELAY_IP|CSUM_DELAY_DATA); > } > > chk =3D pf_test(PF_OUT, ifp, m, inp); > @@ -3620,12 +3621,14 @@ > int chk; > > /* We need a proper CSUM before we start (s. OpenBSD ip_output) *= / > - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { > + if ((*m)->m_pkthdr.csum_flags & > + (CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist)) { > in6_delayed_cksum(*m, > (*m)->m_pkthdr.len - sizeof(struct ip6_hdr), > sizeof(struct ip6_hdr)); > (*m)->m_pkthdr.csum_flags &=3D ~CSUM_DELAY_DATA_IPV6; > } > + > CURVNET_SET(ifp->if_vnet); > chk =3D pf_test6(PF_OUT, ifp, m, inp); > CURVNET_RESTORE(); > > DES > -- > Dag-Erling Sm=C3=B8rgrav - des@des.no > --=20 Ermal From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 13:49:33 2014 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47AD168C; Tue, 25 Nov 2014 13:49:33 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF5BCD7; Tue, 25 Nov 2014 13:49:31 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA23982; Tue, 25 Nov 2014 15:51:23 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XtGUj-000Dru-Ky; Tue, 25 Nov 2014 15:49:29 +0200 Message-ID: <547488B1.80400@FreeBSD.org> Date: Tue, 25 Nov 2014 15:48:33 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Alexander Kabaev Subject: Re: svn commit: r274200 - head/share/mk References: <201411062246.sA6MkeLN018716@svn.freebsd.org> <20141108120000.3f16feab@kan> <545E7882.90209@FreeBSD.org> <20141108172440.12418020@kan> In-Reply-To: <20141108172440.12418020@kan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Mark Johnston , src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 13:49:33 -0000 [I see that Mark reverted the change almost immediately.] On 09/11/2014 00:24, Alexander Kabaev wrote: > Because when building stuff with unwanted debug symbols one should make > sure they are really gone and the patch basically undoes than promise. > Whose job is it to strip .o's that end up in as the part of the .a > archives, for example? DEBUG_FLAGS are there for users to be able to > specify, khm, own debug flags and stuffing values in there > automatically is just wrong. Also, there are these bits in our .mk > files which I did not remember were there: > > .if !defined(DEBUG_FLAGS) > STRIP?= -s > .endif > > So, when present, DEBUG_FLAGS do prevent the stripping of binaries > completely, making the patch as is even more wrong that I thought > originally. Yes, I see now. You are right. So, probably we need a new make variable, e.g. CTF_DEBUG_FLAGS, where we would put C compiler flags required to produce objects suitable for generating CTF data, if requested. Then expansion of this variable should be on C compiler command line(s). And finally, CTFFLAGS should include -g option only if DEBUG_FLAGS have it. Does this sound about right? Also, I think that there is a possible interaction between build options to be kept in mind: WITH_CTF vs WITH_DEBUG_FILES. For example, the latter is careful enough to add -g specifically to SHARED_CFLAGS, but it also adds that option to CTFFLAGS as well. So, if "static" .o files are compiled with debug data because of WITH_CTF, then the debug data may be left around because of WITH_DEBUG_FILES. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 14:15:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A46D7ADE; Tue, 25 Nov 2014 14:15:07 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 629F5FFD; Tue, 25 Nov 2014 14:15:07 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 87B2BA0B7; Tue, 25 Nov 2014 14:15:06 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 0554B12C3; Tue, 25 Nov 2014 15:14:56 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ermal =?utf-8?Q?Lu=C3=A7i?= Subject: Re: svn commit: r274709 - head/sys/netpfil/pf References: <201411191331.sAJDV9bH092190@svn.freebsd.org> <86tx1nvcy4.fsf@nine.des.no> <86ppcbvb04.fsf@nine.des.no> <86ioi3y0gb.fsf@nine.des.no> Date: Tue, 25 Nov 2014 15:14:56 +0100 In-Reply-To: ("Ermal =?utf-8?Q?Lu=C3=A7i=22's?= message of "Tue, 25 Nov 2014 14:33:30 +0100") Message-ID: <861torxt7j.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 14:15:07 -0000 Ermal Lu=C3=A7i writes: > Also this only affects the traffic sourced by the host itself and not > forwarded traffic and I think this patch will provide a regression for > the issues that the committed patch does. How? The code as it stands (after your commit) is incorrect and will trigger an assertion in vtnet(4). You could argue that it is less incorrect than the original, but the cure is worse than the disease. My patch fixes the panic as well as two preexisting bugs (not taking the IP checksum into account in the IPv4 path, and ignoring hardware offloading). See https://bugs.freebsd.org/192013#c10 for an explanation of what it does and why. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 14:28:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A5E5F39; Tue, 25 Nov 2014 14:28:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CEF118A; Tue, 25 Nov 2014 14:28:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPESFmc090564; Tue, 25 Nov 2014 14:28:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPESFgf090563; Tue, 25 Nov 2014 14:28:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251428.sAPESFgf090563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 14:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275041 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 14:28:16 -0000 Author: bapt Date: Tue Nov 25 14:28:15 2014 New Revision: 275041 URL: https://svnweb.freebsd.org/changeset/base/275041 Log: Defines all the libraries needed for usr.bin Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 13:47:53 2014 (r275040) +++ head/share/mk/src.libnames.mk Tue Nov 25 14:28:15 2014 (r275041) @@ -32,6 +32,9 @@ _INTERNALIBS= \ readline \ sl \ sm \ + smdb \ + smutil \ + telnet \ vers _LIBRARIES= \ @@ -40,9 +43,13 @@ _LIBRARIES= \ alias \ archive \ asn1 \ + begemot \ + bluetooth \ bsdxml \ bsnmp \ + bsm \ bz2 \ + calendar \ cam \ capsicum \ casper \ @@ -63,6 +70,7 @@ _LIBRARIES= \ fetch \ figpar \ geom \ + gnuregex \ gssapi \ hdb \ heimbase \ @@ -88,6 +96,8 @@ _LIBRARIES= \ memstat \ mp \ nandfs \ + netgraph \ + ngatm \ ncursesw \ nv \ opie \ @@ -101,8 +111,10 @@ _LIBRARIES= \ readline \ roken \ rpcsec_gss \ + rpcsvc \ rt \ sbuf \ + sdp \ sm \ smb \ ssl \ @@ -114,6 +126,7 @@ _LIBRARIES= \ ufs \ ulog \ usb \ + usbhid \ util \ wind \ wrap \ @@ -175,6 +188,17 @@ _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c _DP_devstat= kvm +_DP_pam= radius tacplus opie md util +.if ${MK_KERBEROS} != "no" +_DP_pam+= krb5 +.endif +.if ${MK_OPENSSH} != "no" +_DP_pam+= ssh +.endif +.if ${MK_NIS} != "no" +_DP_pam+= ypclnt +.endif +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc # Define spacial cases LDADD_supcplusplus= -lsupc++ @@ -288,6 +312,12 @@ LIBSMDIR= ${ROOTOBJDIR}/lib/libsm LDSM?= ${LIBSMDIR}/libsm.a LIBSM?= ${LIBSMDIR}/libsm.a +LIBSMDBDIR= ${ROOTOBJDIR}/lib/libsmdb +LIBSMDB?= ${LIBSMDBDIR}/libsmdb.a + +LIBSMUTILDIR= ${ROOTOBJDIR}/lib/libsmutil +LIBSMUTIL?= ${LIBSMDBDIR}/libsmutil.a + LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a @@ -299,3 +329,6 @@ LIBSL?= ${LIBSLDIR}/libsl.a LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf LIBIPF?= ${LIBIPFDIR}/libipf.a + +LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet +LIBTELNET?= ${LIBIPFDIR}/libtelnet.a From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 14:29:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA0C813B; Tue, 25 Nov 2014 14:29:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2D971B4; Tue, 25 Nov 2014 14:29:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPETWi4090853; Tue, 25 Nov 2014 14:29:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPETBfX090723; Tue, 25 Nov 2014 14:29:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251429.sAPETBfX090723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 14:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275042 - in head/usr.bin: . apply ar atm/sscop awk bc bluetooth/bthost bluetooth/btsockstat bluetooth/rfcomm_sppd bsdiff/bsdiff bsdiff/bspatch bzip2 calendar chkey chpass colldef compi... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 14:29:33 -0000 Author: bapt Date: Tue Nov 25 14:29:10 2014 New Revision: 275042 URL: https://svnweb.freebsd.org/changeset/base/275042 Log: Convert to usr.bin/ to LIBADD Reduce overlinking Modified: head/usr.bin/Makefile head/usr.bin/apply/Makefile head/usr.bin/ar/Makefile head/usr.bin/atm/sscop/Makefile head/usr.bin/awk/Makefile head/usr.bin/bc/Makefile head/usr.bin/bluetooth/bthost/Makefile head/usr.bin/bluetooth/btsockstat/Makefile head/usr.bin/bluetooth/rfcomm_sppd/Makefile head/usr.bin/bsdiff/bsdiff/Makefile head/usr.bin/bsdiff/bspatch/Makefile head/usr.bin/bzip2/Makefile head/usr.bin/calendar/Makefile head/usr.bin/chkey/Makefile head/usr.bin/chpass/Makefile head/usr.bin/colldef/Makefile head/usr.bin/compile_et/Makefile head/usr.bin/cpio/Makefile head/usr.bin/cpio/test/Makefile head/usr.bin/dc/Makefile head/usr.bin/dpv/Makefile head/usr.bin/drill/Makefile head/usr.bin/du/Makefile head/usr.bin/ee/Makefile head/usr.bin/enigma/Makefile head/usr.bin/fetch/Makefile head/usr.bin/file/Makefile head/usr.bin/fstat/Makefile head/usr.bin/ftp/Makefile head/usr.bin/gcore/Makefile head/usr.bin/grep/Makefile head/usr.bin/gzip/Makefile head/usr.bin/host/Makefile head/usr.bin/ipcrm/Makefile head/usr.bin/ipcs/Makefile head/usr.bin/iscsictl/Makefile head/usr.bin/kdump/Makefile head/usr.bin/keylogin/Makefile head/usr.bin/killall/Makefile head/usr.bin/ktrdump/Makefile head/usr.bin/less/Makefile head/usr.bin/limits/Makefile head/usr.bin/lock/Makefile head/usr.bin/login/Makefile head/usr.bin/lzmainfo/Makefile head/usr.bin/m4/Makefile head/usr.bin/makewhatis/Makefile head/usr.bin/minigzip/Makefile head/usr.bin/ministat/Makefile head/usr.bin/mkimg/Makefile head/usr.bin/mkulzma/Makefile head/usr.bin/mkuzip/Makefile head/usr.bin/msgs/Makefile head/usr.bin/nc/Makefile head/usr.bin/ncal/Makefile head/usr.bin/netstat/Makefile head/usr.bin/newgrp/Makefile head/usr.bin/newkey/Makefile head/usr.bin/nfsstat/Makefile head/usr.bin/opieinfo/Makefile head/usr.bin/opiekey/Makefile head/usr.bin/opiepasswd/Makefile head/usr.bin/pamtest/Makefile head/usr.bin/passwd/Makefile head/usr.bin/procstat/Makefile head/usr.bin/quota/Makefile head/usr.bin/rctl/Makefile head/usr.bin/rup/Makefile head/usr.bin/rusers/Makefile head/usr.bin/script/Makefile head/usr.bin/seq/Makefile head/usr.bin/smbutil/Makefile head/usr.bin/sort/Makefile head/usr.bin/split/Makefile head/usr.bin/su/Makefile head/usr.bin/systat/Makefile head/usr.bin/tabs/Makefile head/usr.bin/talk/Makefile head/usr.bin/tar/Makefile head/usr.bin/telnet/Makefile head/usr.bin/tftp/Makefile head/usr.bin/top/Makefile head/usr.bin/tput/Makefile head/usr.bin/truncate/Makefile head/usr.bin/tset/Makefile head/usr.bin/ul/Makefile head/usr.bin/units/Makefile head/usr.bin/unzip/Makefile head/usr.bin/usbhidaction/Makefile head/usr.bin/usbhidctl/Makefile head/usr.bin/vacation/Makefile head/usr.bin/vi/Makefile head/usr.bin/vmstat/Makefile head/usr.bin/w/Makefile head/usr.bin/wc/Makefile head/usr.bin/xinstall/Makefile head/usr.bin/xlint/lint1/Makefile head/usr.bin/xo/Makefile head/usr.bin/xz/Makefile head/usr.bin/xzdec/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -134,7 +134,6 @@ SUBDIR= alias \ printenv \ printf \ procstat \ - protect \ rctl \ renice \ rev \ Modified: head/usr.bin/apply/Makefile ============================================================================== --- head/usr.bin/apply/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/apply/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,8 +4,8 @@ .include PROG= apply -DPADD= ${LIBSBUF} -LDADD= -lsbuf + +LIBADD= sbuf .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: head/usr.bin/ar/Makefile ============================================================================== --- head/usr.bin/ar/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ar/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,8 +5,7 @@ PROG= ar SRCS= ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h -DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBZ} -LDADD= -larchive -lelf -lz +LIBADD= archive elf NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/atm/sscop/Makefile ============================================================================== --- head/usr.bin/atm/sscop/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/atm/sscop/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -8,7 +8,6 @@ PROG= sscop SRCS= common.c sscop_main.c CFLAGS+= -I${CONTRIB} -DUSE_LIBBEGEMOT -DPADD= ${LIBBEGEMOT} ${LIBNETGRAPH} ${LIBNGATM} -LDADD= -lbegemot -lnetgraph -lngatm +LIBADD= begemot ngatm .include Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/awk/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -10,8 +10,7 @@ CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC} - WARNS?= 1 -DPADD= ${LIBM} -LDADD= -lm +LIBADD= m LINKS= ${BINDIR}/awk ${BINDIR}/nawk MLINKS= awk.1 nawk.1 Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bc/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,8 +5,7 @@ PROG= bc SRCS= bc.y scan.l tty.c CFLAGS+= -I. -I${.CURDIR} -DPADD+= ${LIBEDIT} ${LIBNCURSESW} -LDADD+= -ledit -lncursesw +LIBADD= edit NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/bluetooth/bthost/Makefile ============================================================================== --- head/usr.bin/bluetooth/bthost/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bluetooth/bthost/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,7 +3,6 @@ PROG= bthost -DPADD= ${LIBBLUETOOTH} -LDADD= -lbluetooth +LIBADD= bluetooth .include Modified: head/usr.bin/bluetooth/btsockstat/Makefile ============================================================================== --- head/usr.bin/bluetooth/btsockstat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bluetooth/btsockstat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,7 +6,6 @@ WARNS?= 2 BINGRP= kmem BINMODE= 2555 -DPADD= ${LIBBLUETOOTH} ${LIBKVM} -LDADD= -lbluetooth -lkvm +LIBADD= bluetooth kvm .include Modified: head/usr.bin/bluetooth/rfcomm_sppd/Makefile ============================================================================== --- head/usr.bin/bluetooth/rfcomm_sppd/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bluetooth/rfcomm_sppd/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,7 +5,6 @@ PROG= rfcomm_sppd SRCS= rfcomm_sppd.c rfcomm_sdp.c WARNS?= 2 -DPADD= ${LIBBLUETOOTH} ${LIBSDP} -LDADD= -lbluetooth -lsdp -lutil +LIBADD= bluetooth sdp util .include Modified: head/usr.bin/bsdiff/bsdiff/Makefile ============================================================================== --- head/usr.bin/bsdiff/bsdiff/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bsdiff/bsdiff/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,6 @@ PROG= bsdiff -DPADD= ${LIBBZ2} -LDADD= -lbz2 +LIBADD= bz2 .include Modified: head/usr.bin/bsdiff/bspatch/Makefile ============================================================================== --- head/usr.bin/bsdiff/bspatch/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bsdiff/bspatch/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,6 @@ PROG= bspatch -DPADD= ${LIBBZ2} -LDADD= -lbz2 +LIBADD= bz2 .include Modified: head/usr.bin/bzip2/Makefile ============================================================================== --- head/usr.bin/bzip2/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/bzip2/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -8,8 +8,7 @@ CFLAGS+= -D_FILE_OFFSET_BITS=64 WARNS?= 3 -DPADD= ${LIBBZ2} -LDADD= -lbz2 +LIBADD= bz2 LINKS= ${BINDIR}/bzip2 ${BINDIR}/bunzip2 LINKS+= ${BINDIR}/bzip2 ${BINDIR}/bzcat Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/calendar/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,8 +6,7 @@ PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c calcpp.c -DPADD= ${LIBM} -LDADD= -lm +LIBADD= m INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U Modified: head/usr.bin/chkey/Makefile ============================================================================== --- head/usr.bin/chkey/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/chkey/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -10,7 +10,6 @@ CFLAGS+= -I${.CURDIR}/../newkey .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif -DPADD= ${LIBRPCSVC} ${LIBMP} ${LIBCRYPTO} -LDADD= -lrpcsvc -lmp -lcrypto +LIBADD+= rpcsvc mp .include Modified: head/usr.bin/chpass/Makefile ============================================================================== --- head/usr.bin/chpass/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/chpass/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -16,11 +16,9 @@ CFLAGS+= -DYP #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I. -DPADD= ${LIBCRYPT} ${LIBUTIL} -LDADD= -lcrypt -lutil +LIBADD= crypt util .if ${MK_NIS} != "no" -DPADD+= ${LIBYPCLNT} -LDADD+= -lypclnt +LIBADD+= ypclnt .endif LINKS= ${BINDIR}/chpass ${BINDIR}/chfn Modified: head/usr.bin/colldef/Makefile ============================================================================== --- head/usr.bin/colldef/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/colldef/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,8 +5,7 @@ SRCS= parse.y scan.l y.tab.h LFLAGS= -8 -i CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale CFLAGS+=-DCOLLATE_DEBUG -DYY_NO_UNPUT -DYY_NO_INPUT -LDADD= -ll -DPADD= ${LIBL} +LIBADD= l WARNS?= 2 Modified: head/usr.bin/compile_et/Makefile ============================================================================== --- head/usr.bin/compile_et/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/compile_et/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,12 +2,9 @@ .PATH: ${.CURDIR}/../../contrib/com_err -LIBVERS= ${.OBJDIR}/../../kerberos5/lib/libvers/libvers.a - PROG= compile_et SRCS= compile_et.c parse.y lex.l -LDADD= -lroken ${LIBVERS} -DPADD= ${LIBROKEN} ${LIBVERS} +LIBADD= roken vers CFLAGS+=-I. -I${.CURDIR}/../../contrib/com_err WARNS?= 0 Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/cpio/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -23,15 +23,7 @@ CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIB # statically linked, cannot use -lcrypto, and are size sensitive. CFLAGS+= -DSMALLER .endif -DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBLZMA} ${LIBBSDXML} -LDADD= -larchive -lz -lbz2 -llzma -lbsdxml -.if ${MK_OPENSSL} != "no" -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto -.else -DPADD+= ${LIBMD} -LDADD+= -lmd -.endif +LIBADD= archive .if ${MK_ICONV} != "no" CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const Modified: head/usr.bin/cpio/test/Makefile ============================================================================== --- head/usr.bin/cpio/test/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/cpio/test/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -67,10 +67,9 @@ CLEANFILES+= list.h bsdcpio_test MAN= PROG=bsdcpio_test -DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../../lib/libarchive/config_freebsd.h\" CFLAGS+= -I${.CURDIR}/../../../lib/libarchive -I${.OBJDIR} -LDADD= -larchive -lz -lbz2 -llzma +LIBADD= archive #CFLAGS+= -static -g -O2 -Wall CFLAGS+= -g -O2 -Wall CFLAGS+= -I${.OBJDIR} Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/dc/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,7 +3,6 @@ PROG= dc SRCS= dc.c bcode.c inout.c mem.c stack.c -DPADD= ${LIBCRYPTO} -LDADD= -lcrypto +LIBADD= crypto .include Modified: head/usr.bin/dpv/Makefile ============================================================================== --- head/usr.bin/dpv/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/dpv/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,8 +4,7 @@ PROG= dpv CFLAGS+= -I${.CURDIR} -DPADD= ${LIBDPV} ${LIBDIALOG} ${LIBFIGPAR} ${LIBNCURSESW} ${LIBUTIL} ${LIBM} -LDADD= -ldpv -ldialog -lfigpar -lncursesw -lutil -lm +LIBADD= dpv dialog WARNS?= 6 Modified: head/usr.bin/drill/Makefile ============================================================================== --- head/usr.bin/drill/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/drill/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -12,8 +12,6 @@ CFLAGS+= -I${LDNSDIR} NO_WERROR= true MAN= drill.1 -DPADD+= ${LIBLDNS} ${LIBCRYPTO} -LDADD+= ${LDLDNS} -lcrypto -USEPRIVATELIB= ldns +LIBADD= ldns crypto .include Modified: head/usr.bin/du/Makefile ============================================================================== --- head/usr.bin/du/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/du/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= du -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/usr.bin/ee/Makefile ============================================================================== --- head/usr.bin/ee/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ee/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -8,8 +8,7 @@ CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHA PROG= ee LINKS= ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit MLINKS= ee.1 ree.1 ee.1 edit.1 -DPADD= ${LIBNCURSESW} -LDADD= -lncursesw +LIBADD= ncursesw WARNS?= 2 Modified: head/usr.bin/enigma/Makefile ============================================================================== --- head/usr.bin/enigma/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/enigma/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,7 +5,6 @@ PROG= enigma LINKS= ${BINDIR}/enigma ${BINDIR}/crypt MLINKS= enigma.1 crypt.1 -DPADD= ${LIBCRYPT} -LDADD= -lcrypt +LIBADD= crypt .include Modified: head/usr.bin/fetch/Makefile ============================================================================== --- head/usr.bin/fetch/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/fetch/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,15 +1,7 @@ # $FreeBSD$ -.include - PROG= fetch CSTD?= c99 -.if ${MK_OPENSSL} != "no" -DPADD= ${LIBFETCH} ${LIBSSL} ${LIBCRYPTO} -LDADD= -lfetch -lssl -lcrypto -.else -DPADD= ${LIBFETCH} ${LIBMD} -LDADD= -lfetch -lmd -.endif +LIBADD= fetch .include Modified: head/usr.bin/file/Makefile ============================================================================== --- head/usr.bin/file/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/file/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -31,8 +31,7 @@ MAGICPATH?= /usr/share/misc CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H CFLAGS+= -I${.CURDIR}/../../lib/libmagic -DPADD= ${LIBMAGIC} ${LIBZ} -LDADD= -lmagic -lz +LIBADD= magic FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/../../lib/libmagic/config.h Modified: head/usr.bin/fstat/Makefile ============================================================================== --- head/usr.bin/fstat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/fstat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,8 +4,7 @@ PROG= fstat SRCS= fstat.c fuser.c main.c LINKS= ${BINDIR}/fstat ${BINDIR}/fuser -DPADD= ${LIBKVM} ${LIBUTIL} ${LIBPROCSTAT} -LDADD= -lkvm -lutil -lprocstat +LIBADD= procstat MAN1= fuser.1 fstat.1 Modified: head/usr.bin/ftp/Makefile ============================================================================== --- head/usr.bin/ftp/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ftp/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -20,8 +20,7 @@ CFLAGS+= -DINET6 .endif CFLAGS+= -I${.CURDIR} -I${TNFTP} -LDADD= -ledit -ltermcapw -DPADD= ${LIBEDIT} ${LIBTERMCAPW} +LIBADD= edit WARNS?= 2 Modified: head/usr.bin/gcore/Makefile ============================================================================== --- head/usr.bin/gcore/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/gcore/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,8 +3,7 @@ PROG= gcore SRCS= elfcore.c gcore.c -DPADD= ${LIBSBUF} ${LIBUTIL} -LDADD= -lsbuf -lutil +LIBADD= sbuf util .if ${MACHINE_ARCH} == "amd64" SRCS+= elf32core.c Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/grep/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -40,12 +40,10 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif -LDADD= -lz -DPADD= ${LIBZ} +LIBADD= z .if ${MK_LZMA_SUPPORT} != "no" -LDADD+= -llzma -DPADD+= ${LIBLZMA} +LIBADD+= lzma LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ @@ -58,8 +56,7 @@ CFLAGS+= -DWITHOUT_LZMA .endif .if ${MK_BZIP2_SUPPORT} != "no" -LDADD+= -lbz2 -DPADD+= ${LIBBZ2} +LIBADD+= bz2 .if ${MK_BSD_GREP} == "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ @@ -75,8 +72,7 @@ CFLAGS+= -DWITHOUT_BZIP2 .if ${MK_GNU_GREP_COMPAT} != "no" CFLAGS+= -I${DESTDIR}/usr/include/gnu -LDADD+= -lgnuregex -DPADD+= ${LIBGNUREGEX} +LIBADD+= gnuregex .endif .if ${MK_NLS} != "no" Modified: head/usr.bin/gzip/Makefile ============================================================================== --- head/usr.bin/gzip/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/gzip/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,12 +6,10 @@ PROG= gzip MAN= gzip.1 gzexe.1 zdiff.1 zforce.1 zmore.1 znew.1 -DPADD= ${LIBZ} ${LIBLZMA} -LDADD= -lz -llzma +LIBADD= z lzma .if ${MK_BZIP2_SUPPORT} != "no" -DPADD+= ${LIBBZ2} -LDADD+= -lbz2 +LIBADD+= bz2 .else CFLAGS+= -DNO_BZIP2_SUPPORT .endif Modified: head/usr.bin/host/Makefile ============================================================================== --- head/usr.bin/host/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/host/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -15,8 +15,6 @@ host.1: ldns-host.1 (rm -rf ${.TARGET} ; false) CFLAGS+= -I${LDNSDIR} -DPADD+= ${LIBLDNS} ${LIBCRYPTO} -LDADD+= ${LDLDNS} -lcrypto -USEPRIVATELIB= ldns +LIBADD= ldns .include Modified: head/usr.bin/ipcrm/Makefile ============================================================================== --- head/usr.bin/ipcrm/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ipcrm/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,8 +2,7 @@ PROG= ipcrm SRCS= ipcrm.c ipc.c -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm CFLAGS+=-I${.CURDIR}/../ipcs .PATH: ${.CURDIR}/../ipcs Modified: head/usr.bin/ipcs/Makefile ============================================================================== --- head/usr.bin/ipcs/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ipcs/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,8 +2,7 @@ PROG= ipcs SRCS= ipcs.c ipc.c -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm WARNS?= 1 Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/iscsictl/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,8 +6,7 @@ CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi MAN= iscsictl.8 -DPADD= ${LIBCAM} ${LIBUTIL} -LDADD= -lcam -lutil +LIBADD= cam util YFLAGS+= -v LFLAGS+= -i Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/kdump/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -11,12 +11,11 @@ SFX= 32 PROG= kdump SRCS= kdump_subr.c kdump.c ioctl.c subr.c -DPSRCS= kdump_subr.h +DPSRCS= kdump_subr.h CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MK_CASPER} != "no" -DPADD+= ${LIBCAPSICUM} ${LIBNV} -LDADD+= -lcapsicum -lnv +LIBADD= capsicum CFLAGS+=-DHAVE_LIBCAPSICUM .endif Modified: head/usr.bin/keylogin/Makefile ============================================================================== --- head/usr.bin/keylogin/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/keylogin/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,8 +2,7 @@ PROG= keylogin -DPADD= ${LIBRPCSVC} -LDADD= -lrpcsvc +LIBADD= rpcsvc WARNS?= 0 Modified: head/usr.bin/killall/Makefile ============================================================================== --- head/usr.bin/killall/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/killall/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,7 +1,6 @@ # $FreeBSD$ PROG= killall -DPADD= ${LIBJAIL} -LDADD= -ljail +LIBADD= jail .include Modified: head/usr.bin/ktrdump/Makefile ============================================================================== --- head/usr.bin/ktrdump/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ktrdump/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= ktrdump -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm MAN= ktrdump.8 WARNS?= 2 Modified: head/usr.bin/less/Makefile ============================================================================== --- head/usr.bin/less/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/less/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -8,8 +8,7 @@ SRCS= main.c screen.c brac.c ch.c charse signal.c tags.c ttyin.c version.c SCRIPTS=lesspipe.sh zless.sh SCRIPTSNAME_lesspipe.sh=lesspipe.sh -DPADD= ${LIBTERMCAPW} -LDADD= -ltermcapw +LIBADD= ncursesw LINKS= ${BINDIR}/less ${BINDIR}/more \ ${BINDIR}/zless ${BINDIR}/bzless \ ${BINDIR}/zless ${BINDIR}/xzless \ Modified: head/usr.bin/limits/Makefile ============================================================================== --- head/usr.bin/limits/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/limits/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,7 +1,6 @@ # $FreeBSD$ PROG= limits -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/usr.bin/lock/Makefile ============================================================================== --- head/usr.bin/lock/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/lock/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,7 +4,7 @@ PROG= lock BINOWN= root BINMODE=4555 -DPADD= ${LIBCRYPT} -LDADD= -lcrypt + +LIBADD= crypt .include Modified: head/usr.bin/login/Makefile ============================================================================== --- head/usr.bin/login/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/login/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,16 +6,14 @@ PROG= login SRCS= login.c login_fbtab.c CFLAGS+=-DLOGALL -DPADD= ${LIBUTIL} ${LIBPAM} -LDADD= -lutil ${MINUSLPAM} +LIBADD= util pam WARNS?= 5 .if ${MK_AUDIT} != "no" SRCS+= login_audit.c CFLAGS+= -DUSE_BSM_AUDIT -DPADD+= ${LIBBSM} -LDADD+= -lbsm +LIBADD+= bsm .endif .if ${MK_SETUID_LOGIN} != "no" Modified: head/usr.bin/lzmainfo/Makefile ============================================================================== --- head/usr.bin/lzmainfo/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/lzmainfo/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -16,7 +16,6 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common -DPADD= ${LIBLZMA} -LDADD= -llzma +LIBADD= lzma .include Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/m4/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -8,8 +8,7 @@ PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libohash -DPADD= ${LIBY} ${LIBL} ${LIBM} ${LIBOHASH} -LDADD= -ly -ll -lm ${LDOHASH} +LIBADD= y l m ohash NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/makewhatis/Makefile ============================================================================== --- head/usr.bin/makewhatis/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/makewhatis/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= makewhatis -DPADD= ${LIBZ} -LDADD= -lz +LIBADD= z SCRIPTS= makewhatis.local.sh MAN= makewhatis.1 makewhatis.local.8 SCRIPTSDIR= /usr/libexec Modified: head/usr.bin/minigzip/Makefile ============================================================================== --- head/usr.bin/minigzip/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/minigzip/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -7,7 +7,6 @@ PROG= minigzip WARNS?= 5 CFLAGS+=-DUSE_MMAP -DPADD= ${LIBZ} -LDADD= -lz +LIBADD= z .include Modified: head/usr.bin/ministat/Makefile ============================================================================== --- head/usr.bin/ministat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ministat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,13 +1,13 @@ # $FreeBSD$ PROG= ministat -DPADD= ${LIBM} -LDADD= -lm + +LIBADD= m .include test: ${PROG} - ./${PROG} < ${.CURDIR}/chameleon - ./${PROG} ${.CURDIR}/chameleon + ./${PROG} < ${.CURDIR}/chameleon + ./${PROG} ${.CURDIR}/chameleon ./${PROG} ${.CURDIR}/iguana ${.CURDIR}/chameleon ./${PROG} -c 80 ${.CURDIR}/iguana ${.CURDIR}/chameleon ./${PROG} -s -c 80 ${.CURDIR}/chameleon ${.CURDIR}/iguana Modified: head/usr.bin/mkimg/Makefile ============================================================================== --- head/usr.bin/mkimg/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/mkimg/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -31,8 +31,7 @@ SRCS+= \ BINDIR?=/usr/bin -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util WARNS?= 6 Modified: head/usr.bin/mkulzma/Makefile ============================================================================== --- head/usr.bin/mkulzma/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/mkulzma/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,7 @@ PROG= mkulzma MAN= mkulzma.8 -DPADD= ${LIBLZMA} -LDADD= -llzma + +LIBADD= lzma .include Modified: head/usr.bin/mkuzip/Makefile ============================================================================== --- head/usr.bin/mkuzip/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/mkuzip/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,8 +3,6 @@ PROG= mkuzip MAN= mkuzip.8 -DPADD= ${LIBZ} -LDADD= -lz - +LIBADD= z .include Modified: head/usr.bin/msgs/Makefile ============================================================================== --- head/usr.bin/msgs/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/msgs/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= msgs -DPADD= ${LIBTERMCAPW} -LDADD= -ltermcapw + +LIBADD= ncursesw .include Modified: head/usr.bin/nc/Makefile ============================================================================== --- head/usr.bin/nc/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/nc/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,8 +6,7 @@ PROG= nc SRCS= netcat.c atomicio.c socks.c CFLAGS+=-DIPSEC -LDADD= -lipsec -DPADD= ${LIBIPSEC} +LIBADD= ipsec WARNS?= 2 Modified: head/usr.bin/ncal/Makefile ============================================================================== --- head/usr.bin/ncal/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/ncal/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,8 +4,7 @@ PROG= ncal -DPADD= ${LIBCALENDAR} ${LIBTERMCAPW} -LDADD= -lcalendar -ltermcapw +LIBADD= calendar ncursesw LINKS= ${BINDIR}/ncal ${BINDIR}/cal MLINKS= ncal.1 cal.1 Modified: head/usr.bin/netstat/Makefile ============================================================================== --- head/usr.bin/netstat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/netstat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -33,13 +33,11 @@ CFLAGS+=-DPF BINGRP= kmem BINMODE=2555 -DPADD= ${LIBKVM} ${LIBMEMSTAT} ${LIBUTIL} -LDADD= -lkvm -lmemstat -lutil +LIBADD= kvm memstat util .if ${MK_NETGRAPH_SUPPORT} != "no" SRCS+= netgraph.c -DPADD+= ${LIBNETGRAPH} -LDADD+= -lnetgraph +LIBADD+= netgraph CFLAGS+=-DNETGRAPH .endif Modified: head/usr.bin/newgrp/Makefile ============================================================================== --- head/usr.bin/newgrp/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/newgrp/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,8 +1,8 @@ # $FreeBSD$ PROG= newgrp -DPADD= ${LIBCRYPT} ${LIBUTIL} -LDADD= -lcrypt -lutil + +LIBADD= crypt util .if defined(ENABLE_SUID_NEWGRP) BINMODE= 4555 Modified: head/usr.bin/newkey/Makefile ============================================================================== --- head/usr.bin/newkey/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/newkey/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -8,7 +8,6 @@ SRCS= newkey.c generic.c update.c CFLAGS+= -DYP .endif MAN= newkey.8 -DPADD= ${LIBRPCSVC} ${LIBMP} ${LIBCRYPTO} -LDADD= -lrpcsvc -lmp -lcrypto +LIBADD= rpcsvc mp .include Modified: head/usr.bin/nfsstat/Makefile ============================================================================== --- head/usr.bin/nfsstat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/nfsstat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,8 +3,8 @@ PROG= nfsstat CFLAGS+=-DNFS -DPADD= ${LIBKVM} -LDADD= -lkvm + +LIBADD= kvm WARNS?= 3 Modified: head/usr.bin/opieinfo/Makefile ============================================================================== --- head/usr.bin/opieinfo/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/opieinfo/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -10,8 +10,7 @@ CFLAGS+=-DINSECURE_OVERRIDE WARNS?= 0 -DPADD= ${LIBOPIE} ${LIBMD} -LDADD= -lopie -lmd +LIBADD= opie BINOWN= root BINMODE=4555 Modified: head/usr.bin/opiekey/Makefile ============================================================================== --- head/usr.bin/opiekey/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/opiekey/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -10,8 +10,7 @@ CFLAGS+=-DINSECURE_OVERRIDE WARNS?= 0 -DPADD= ${LIBOPIE} ${LIBMD} -LDADD= -lopie -lmd +LIBADD= opie LINKS= ${BINDIR}/opiekey ${BINDIR}/otp-md4 LINKS+= ${BINDIR}/opiekey ${BINDIR}/otp-md5 Modified: head/usr.bin/opiepasswd/Makefile ============================================================================== --- head/usr.bin/opiepasswd/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/opiepasswd/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -10,8 +10,7 @@ CFLAGS+=-DINSECURE_OVERRIDE WARNS?= 0 -DPADD= ${LIBOPIE} ${LIBMD} -LDADD= -lopie -lmd +LIBADD= opie BINOWN= root BINMODE=4555 Modified: head/usr.bin/pamtest/Makefile ============================================================================== --- head/usr.bin/pamtest/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/pamtest/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,7 +5,7 @@ OPENPAM= ${.CURDIR}/../../contrib/openpa PROG= pamtest SRCS= pamtest.c -DPADD= ${LIBPAM} -LDADD= ${MINUSLPAM} + +LIBADD= pam .include Modified: head/usr.bin/passwd/Makefile ============================================================================== --- head/usr.bin/passwd/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/passwd/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -6,8 +6,7 @@ PROG = passwd BINOWN = root BINMODE = 4555 -DPADD = ${LIBPAM} -LDADD = ${MINUSLPAM} +LIBADD = pam .if ${MK_NIS} != "no" LINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd MLINKS = passwd.1 yppasswd.1 Modified: head/usr.bin/procstat/Makefile ============================================================================== --- head/usr.bin/procstat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/procstat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -16,7 +16,6 @@ SRCS= procstat.c \ procstat_threads.c \ procstat_vm.c -LDADD+= -lutil -lprocstat -lkvm -DPADD+= ${LIBUTIL} ${LIBPROCSTAT} ${LIBKVM} +LIBADD+= util procstat .include Modified: head/usr.bin/quota/Makefile ============================================================================== --- head/usr.bin/quota/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/quota/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -5,7 +5,6 @@ PROG= quota BINOWN= root BINMODE=4555 -DPADD= ${LIBRPCSVC} ${LIBUTIL} -LDADD= -lrpcsvc -lutil +LIBADD= rpcsvc util .include Modified: head/usr.bin/rctl/Makefile ============================================================================== --- head/usr.bin/rctl/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/rctl/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,7 +3,6 @@ PROG= rctl MAN= rctl.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/usr.bin/rup/Makefile ============================================================================== --- head/usr.bin/rup/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/rup/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,7 +4,6 @@ PROG= rup WARNS?= 1 -DPADD= ${LIBRPCSVC} -LDADD= -lrpcsvc +LIBADD= rpcsvc .include Modified: head/usr.bin/rusers/Makefile ============================================================================== --- head/usr.bin/rusers/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/rusers/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,6 @@ PROG = rusers -DPADD= ${LIBRPCSVC} -LDADD= -lrpcsvc +LIBADD= rpcsvc .include Modified: head/usr.bin/script/Makefile ============================================================================== --- head/usr.bin/script/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/script/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= script -LDADD= -lutil -DPADD= ${LIBUTIL} + +LIBADD= util .include Modified: head/usr.bin/seq/Makefile ============================================================================== --- head/usr.bin/seq/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/seq/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= seq -DPADD= ${LIBM} -LDADD= -lm + +LIBADD= m .include Modified: head/usr.bin/smbutil/Makefile ============================================================================== --- head/usr.bin/smbutil/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/smbutil/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -3,8 +3,7 @@ PROG= smbutil SRCS= smbutil.c dumptree.c login.c lookup.c view.c print.c -DPADD= ${LIBSMB} ${LIBKICONV} -LDADD= -lsmb -lkiconv +LIBADD= smb kiconv CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs CFLAGS+= -I${CONTRIBDIR}/include Modified: head/usr.bin/sort/Makefile ============================================================================== --- head/usr.bin/sort/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/sort/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -13,12 +13,10 @@ CLEANFILES+= sort.1 .if ${MK_SORT_THREADS} != "no" CFLAGS+= -DSORT_THREADS -LDADD= -lpthread -lmd -DPADD= ${LIBPTHREAD} ${LIBMD} +LIBADD= pthread md MAN_SUB+= -e 's|%%THREADS%%||g' .else -LDADD= -lmd -DPADD= ${LIBMD} +LIBADD= md MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' .endif Modified: head/usr.bin/split/Makefile ============================================================================== --- head/usr.bin/split/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/split/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= split -LDADD= -lutil -DPADD= ${LIBUTIL} + +LIBADD= util .include Modified: head/usr.bin/su/Makefile ============================================================================== --- head/usr.bin/su/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/su/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -7,13 +7,11 @@ PROG= su WARNS?= 5 -DPADD= ${LIBUTIL} ${LIBPAM} -LDADD= -lutil ${MINUSLPAM} +LIBADD= util pam .if ${MK_AUDIT} != "no" CFLAGS+= -DUSE_BSM_AUDIT -DPADD+= ${LIBBSM} -LDADD+= -lbsm +LIBADD+= bsm .endif BINOWN= root Modified: head/usr.bin/systat/Makefile ============================================================================== --- head/usr.bin/systat/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/systat/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -16,7 +16,6 @@ CFLAGS+= -DINET6 WARNS?= 0 -DPADD= ${LIBNCURSESW} ${LIBM} ${LIBDEVSTAT} ${LIBKVM} -LDADD= -lncursesw -lm -ldevstat -lkvm +LIBADD= ncursesw m devstat kvm .include Modified: head/usr.bin/tabs/Makefile ============================================================================== --- head/usr.bin/tabs/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/tabs/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= tabs -DPADD= ${LIBTERMCAPW} -LDADD= -ltermcapw + +LIBADD= ncursesw .include Modified: head/usr.bin/talk/Makefile ============================================================================== --- head/usr.bin/talk/Makefile Tue Nov 25 14:28:15 2014 (r275041) +++ head/usr.bin/talk/Makefile Tue Nov 25 14:29:10 2014 (r275042) @@ -4,7 +4,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 14:40:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 695EF538; Tue, 25 Nov 2014 14:40:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 558B9374; Tue, 25 Nov 2014 14:40:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPEed5C096494; Tue, 25 Nov 2014 14:40:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPEedXb096493; Tue, 25 Nov 2014 14:40:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251440.sAPEedXb096493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 14:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275043 - head/usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 14:40:39 -0000 Author: bapt Date: Tue Nov 25 14:40:38 2014 New Revision: 275043 URL: https://svnweb.freebsd.org/changeset/base/275043 Log: Readd protect(2) removed by mistake Reported by: emaste Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Nov 25 14:29:10 2014 (r275042) +++ head/usr.bin/Makefile Tue Nov 25 14:40:38 2014 (r275043) @@ -134,6 +134,7 @@ SUBDIR= alias \ printenv \ printf \ procstat \ + protect \ rctl \ renice \ rev \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 15:09:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA876DCC; Tue, 25 Nov 2014 15:09:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7155897; Tue, 25 Nov 2014 15:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPF9Zfm010379; Tue, 25 Nov 2014 15:09:35 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPF9Z87010378; Tue, 25 Nov 2014 15:09:35 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201411251509.sAPF9Z87010378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Tue, 25 Nov 2014 15:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275044 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 15:09:35 -0000 Author: pluknet Date: Tue Nov 25 15:09:34 2014 New Revision: 275044 URL: https://svnweb.freebsd.org/changeset/base/275044 Log: Fix ifa_data description. PR: 176583 Discussed with: glebius MFC after: 1 week Sponsored by: Nginx, Inc. Modified: head/lib/libc/net/getifaddrs.3 Modified: head/lib/libc/net/getifaddrs.3 ============================================================================== --- head/lib/libc/net/getifaddrs.3 Tue Nov 25 14:40:38 2014 (r275043) +++ head/lib/libc/net/getifaddrs.3 Tue Nov 25 15:09:34 2014 (r275044) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 21, 2013 +.Dd November 25, 2014 .Dt GETIFADDRS 3 .Os .Sh NAME @@ -110,19 +110,17 @@ if one exists, otherwise it is NULL. .Pp The .Li ifa_data -field references address family specific data. -For -.Dv AF_LINK -addresses it contains a pointer to the +field references address family specific data +in a pointer to the .Fa struct if_data (as defined in include file -.In net/if.h ) -which contains various interface attributes and statistics. -For all other address families, it contains a pointer to the -.Fa struct ifa_data -(as defined in include file -.In net/if.h ) -which contains per-address interface statistics. +.In net/if.h ) . +For +.Dv AF_LINK +addresses, +it contains various interface attributes and statistics. +For all other address families, +it contains per-address interface statistics. .Pp The data returned by .Fn getifaddrs From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 15:21:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CFDD1B2; Tue, 25 Nov 2014 15:21:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8902CA6E; Tue, 25 Nov 2014 15:21:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPFLMFK016260; Tue, 25 Nov 2014 15:21:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPFLL25016256; Tue, 25 Nov 2014 15:21:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411251521.sAPFLL25016256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 25 Nov 2014 15:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275045 - in head: share/man/man9 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 15:21:22 -0000 Author: avg Date: Tue Nov 25 15:21:21 2014 New Revision: 275045 URL: https://svnweb.freebsd.org/changeset/base/275045 Log: callout(9): add sbt flavors of callout_schedule Differential Revision: https://reviews.freebsd.org/D1161 (partial) Reviewed by: jhb, markj MFC after: 1 week Modified: head/share/man/man9/Makefile head/share/man/man9/timeout.9 head/sys/sys/callout.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Nov 25 15:09:34 2014 (r275044) +++ head/share/man/man9/Makefile Tue Nov 25 15:21:21 2014 (r275045) @@ -1576,12 +1576,16 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_pending.9 \ timeout.9 callout_reset.9 \ timeout.9 callout_reset_curcpu.9 \ - timeout.9 callout_reset_sbt.9 \ timeout.9 callout_reset_on.9 \ + timeout.9 callout_reset_sbt.9 \ + timeout.9 callout_reset_sbt_curcpu.9 \ timeout.9 callout_reset_sbt_on.9 \ timeout.9 callout_schedule.9 \ timeout.9 callout_schedule_curcpu.9 \ timeout.9 callout_schedule_on.9 \ + timeout.9 callout_schedule_sbt.9 \ + timeout.9 callout_schedule_sbt_curcpu.9 \ + timeout.9 callout_schedule_sbt_on.9 \ timeout.9 callout_stop.9 \ timeout.9 untimeout.9 MLINKS+=ucred.9 cred_update_thread.9 \ Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Tue Nov 25 15:09:34 2014 (r275044) +++ head/share/man/man9/timeout.9 Tue Nov 25 15:21:21 2014 (r275045) @@ -51,6 +51,9 @@ .Nm callout_schedule , .Nm callout_schedule_curcpu , .Nm callout_schedule_on , +.Nm callout_schedule_sbt , +.Nm callout_schedule_sbt_curcpu , +.Nm callout_schedule_sbt_on , .Nm callout_stop , .Nm timeout , .Nm untimeout @@ -106,6 +109,15 @@ struct callout_handle handle = CALLOUT_H .Ft int .Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" .Ft int +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +.Ft int +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +.Ft int +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int cpu" "int flags" +.Ft int .Fn callout_stop "struct callout *c" .Ft struct callout_handle .Fn timeout "timeout_t *func" "void *arg" "int ticks" @@ -386,21 +398,24 @@ callouts are assigned to CPU 0. The .Fn callout_reset_on , .Fn callout_reset_sbt_on , -and .Fn callout_schedule_on +and +.Fn callout_schedule_sbt_on functions assign the callout to CPU .Fa cpu . The .Fn callout_reset_curcpu , .Fn callout_reset_sbt_curpu , -and .Fn callout_schedule_curcpu +and +.Fn callout_schedule_sbt_curcpu functions assign the callout to the current CPU. The .Fn callout_reset , .Fn callout_reset_sbt , -and .Fn callout_schedule +and +.Fn callout_schedule_sbt functions schedule the callout to execute in the softclock thread of the CPU to which it is currently assigned. .Pp Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Tue Nov 25 15:09:34 2014 (r275044) +++ head/sys/sys/callout.h Tue Nov 25 15:21:21 2014 (r275045) @@ -91,6 +91,13 @@ int callout_reset_sbt_on(struct callout callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu) #define callout_reset_curcpu(c, on_tick, fn, arg) \ callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid)) +#define callout_schedule_sbt_on(c, sbt, pr, cpu, flags) \ + callout_reset_sbt_on((c), (sbt), (pr), (c)->c_func, (c)->c_arg, \ + (cpu), (flags)) +#define callout_schedule_sbt(c, sbt, pr, flags) \ + callout_schedule_sbt_on((c), (sbt), (pr), (c)->c_cpu, (flags)) +#define callout_schedule_sbt_curcpu(c, sbt, pr, flags) \ + callout_schedule_sbt_on((c), (sbt), (pr), PCPU_GET(cpuid), (flags)) int callout_schedule(struct callout *, int); int callout_schedule_on(struct callout *, int, int); #define callout_schedule_curcpu(c, on_tick) \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 15:24:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 637E330D; Tue, 25 Nov 2014 15:24:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50162A87; Tue, 25 Nov 2014 15:24:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPFO6SQ019111; Tue, 25 Nov 2014 15:24:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPFO6ZB019110; Tue, 25 Nov 2014 15:24:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411251524.sAPFO6ZB019110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 25 Nov 2014 15:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275046 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 15:24:06 -0000 Author: avg Date: Tue Nov 25 15:24:05 2014 New Revision: 275046 URL: https://svnweb.freebsd.org/changeset/base/275046 Log: whitespace and cosmetic changes in callout_reset family of macros - add parentheses around macro parameters for consistent style - remove redundant parentheses around an expression - use tab before a line continuation symbol Differential Revision: https://reviews.freebsd.org/D1161 (partial) Reviewed by: markj MFC after: 1 week Modified: head/sys/sys/callout.h Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Tue Nov 25 15:21:21 2014 (r275045) +++ head/sys/sys/callout.h Tue Nov 25 15:24:05 2014 (r275046) @@ -81,11 +81,12 @@ void _callout_init_lock(struct callout * int callout_reset_sbt_on(struct callout *, sbintime_t, sbintime_t, void (*)(void *), void *, int, int); #define callout_reset_sbt(c, sbt, pr, fn, arg, flags) \ - callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), (c)->c_cpu, flags) + callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), (c)->c_cpu, (flags)) #define callout_reset_sbt_curcpu(c, sbt, pr, fn, arg, flags) \ - callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid), flags) + callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid),\ + (flags)) #define callout_reset_on(c, to_ticks, fn, arg, cpu) \ - callout_reset_sbt_on((c), (tick_sbt * (to_ticks)), 0, (fn), (arg), \ + callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg), \ (cpu), C_HARDCLOCK) #define callout_reset(c, on_tick, fn, arg) \ callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu) From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 15:29:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03CD54AA; Tue, 25 Nov 2014 15:29:28 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DF6AAB9; Tue, 25 Nov 2014 15:29:26 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAPFTMjr092871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Nov 2014 18:29:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAPFTMBt092870; Tue, 25 Nov 2014 18:29:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 25 Nov 2014 18:29:22 +0300 From: Gleb Smirnoff To: Ruslan Bukin Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141125152922.GX47144@FreeBSD.org> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> <20141125122754.GA57252@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141125122754.GA57252@bsdpad.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 15:29:28 -0000 On Tue, Nov 25, 2014 at 12:27:54PM +0000, Ruslan Bukin wrote: R> On Tue, Nov 25, 2014 at 10:31:45AM +0300, Gleb Smirnoff wrote: R> > On Mon, Nov 24, 2014 at 09:16:20PM +0000, Ruslan Bukin wrote: R> > R> On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote: R> > R> > On Mon, Nov 24, 2014 at 06:03:56PM +0000, Ruslan Bukin wrote: R> > R> > R> > I this on stock kernel or on kernel with your modifications ? R> > R> > R> R> > R> > R> Stock one. I also checked with no virtio but MDROOT - same problems. R> > R> > R> > R> > I could expect a panic with a damaged 'struct buf', but not vm_page. R> > R> > R> > R> > Can you please do a clean build pre-r274914, and then again a clean R> > R> > build of r274914, and then confirm that the former is stable, but the R> > R> > latter panics? R> > R> R> > R> Yes, I just proceeded re-check both builds with removing obj dir each time and I still see the problem starting with r274914. R> > R> R> > R> Also restoring files like that on latest head makes things happy (no panics): R> > R> svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h R> > R> > Can you please try to un-union the struct buf and see if it helps? R> > R> R> Hi, R> R> Un-unioning helps partially: I receive much less panics and able to boot until login prompt in ~ 1/3 attempts with patch attached. What happens then? Same panic as w/o patch? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 15:59:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7563EA71; Tue, 25 Nov 2014 15:59:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60D2DDC8; Tue, 25 Nov 2014 15:59:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPFx0Rp033877; Tue, 25 Nov 2014 15:59:00 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPFwxCr033868; Tue, 25 Nov 2014 15:58:59 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411251558.sAPFwxCr033868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 25 Nov 2014 15:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275048 - head/sys/dev/beri/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 15:59:00 -0000 Author: br Date: Tue Nov 25 15:58:59 2014 New Revision: 275048 URL: https://svnweb.freebsd.org/changeset/base/275048 Log: Add BERI-specific virtio block backend device driver. This part intended to operate on ARM side in heterogeneous (ARM/BERI) system on crystal. Added: head/sys/dev/beri/virtio/virtio.c (contents, props changed) head/sys/dev/beri/virtio/virtio.h (contents, props changed) head/sys/dev/beri/virtio/virtio_block.c (contents, props changed) Added: head/sys/dev/beri/virtio/virtio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/beri/virtio/virtio.c Tue Nov 25 15:58:59 2014 (r275048) @@ -0,0 +1,183 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * BERI virtio mmio backend common methods + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +int +vq_ring_ready(struct vqueue_info *vq) +{ + + return (vq->vq_flags & VQ_ALLOC); +} + +int +vq_has_descs(struct vqueue_info *vq) +{ + + return (vq_ring_ready(vq) && vq->vq_last_avail != + be16toh(vq->vq_avail->idx)); +} + +void * +paddr_map(uint32_t offset, uint32_t phys, uint32_t size) +{ + bus_space_handle_t bsh; + + if (bus_space_map(fdtbus_bs_tag, (phys + offset), + size, 0, &bsh) != 0) { + panic("Couldn't map 0x%08x\n", (phys + offset)); + } + + return (void *)(bsh); +} + +void +paddr_unmap(void *phys, uint32_t size) +{ + + bus_space_unmap(fdtbus_bs_tag, (bus_space_handle_t)phys, size); +} + +static inline void +_vq_record(uint32_t offs, int i, volatile struct vring_desc *vd, + struct iovec *iov, int n_iov, uint16_t *flags) { + + if (i >= n_iov) + return; + + iov[i].iov_base = paddr_map(offs, be64toh(vd->addr), + be32toh(vd->len)); + iov[i].iov_len = be32toh(vd->len); + if (flags != NULL) + flags[i] = be16toh(vd->flags); +} + +int +vq_getchain(uint32_t offs, struct vqueue_info *vq, + struct iovec *iov, int n_iov, uint16_t *flags) +{ + volatile struct vring_desc *vdir, *vindir, *vp; + int idx, ndesc, n_indir; + int head, next; + int i; + + idx = vq->vq_last_avail; + ndesc = (be16toh(vq->vq_avail->idx) - idx); + if (ndesc == 0) + return (0); + + head = be16toh(vq->vq_avail->ring[idx & (vq->vq_qsize - 1)]); + next = head; + + for (i = 0; i < VQ_MAX_DESCRIPTORS; next = be16toh(vdir->next)) { + vdir = &vq->vq_desc[next]; + if ((be16toh(vdir->flags) & VRING_DESC_F_INDIRECT) == 0) { + _vq_record(offs, i, vdir, iov, n_iov, flags); + i++; + } else { + n_indir = be32toh(vdir->len) / 16; + vindir = paddr_map(offs, be64toh(vdir->addr), + be32toh(vdir->len)); + next = 0; + for (;;) { + vp = &vindir[next]; + _vq_record(offs, i, vp, iov, n_iov, flags); + i+=1; + if ((be16toh(vp->flags) & \ + VRING_DESC_F_NEXT) == 0) + break; + next = be16toh(vp->next); + } + paddr_unmap((void *)vindir, be32toh(vdir->len)); + } + + if ((be16toh(vdir->flags) & VRING_DESC_F_NEXT) == 0) + return (i); + } + + return (i); +} + +void +vq_relchain(struct vqueue_info *vq, struct iovec *iov, int n, uint32_t iolen) +{ + volatile struct vring_used_elem *vue; + volatile struct vring_used *vu; + uint16_t head, uidx, mask; + int i; + + mask = vq->vq_qsize - 1; + head = be16toh(vq->vq_avail->ring[vq->vq_last_avail++ & mask]); + + vu = vq->vq_used; + uidx = be16toh(vu->idx); + vue = &vu->ring[uidx++ & mask]; + vue->id = htobe16(head); + vue->len = htobe32(iolen); + vu->idx = htobe16(uidx); + + /* Clean up */ + for (i = 1; i < (n-1); i++) { + paddr_unmap((void *)iov[i].iov_base, iov[i].iov_len); + } +} Added: head/sys/dev/beri/virtio/virtio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/beri/virtio/virtio.h Tue Nov 25 15:58:59 2014 (r275048) @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define READ2(_sc, _reg) \ + bus_read_2((_sc)->res[0], _reg) +#define READ4(_sc, _reg) \ + bus_read_4((_sc)->res[0], _reg) +#define WRITE2(_sc, _reg, _val) \ + bus_write_2((_sc)->res[0], _reg, _val) +#define WRITE4(_sc, _reg, _val) \ + bus_write_4((_sc)->res[0], _reg, _val) + +#define PAGE_SHIFT 12 +#define VRING_ALIGN 4096 +#define NUM_QUEUES 1 + +#define VQ_ALLOC 0x01 /* set once we have a pfn */ +#define VQ_MAX_DESCRIPTORS 512 + +#define VTBLK_BLK_ID_BYTES 20 +#define VTBLK_MAXSEGS 256 + +struct vqueue_info { + uint16_t vq_qsize; /* size of this queue (a power of 2) */ + uint16_t vq_num; + uint16_t vq_flags; + uint16_t vq_last_avail; /* a recent value of vq_avail->va_idx */ + uint16_t vq_save_used; /* saved vq_used->vu_idx; see vq_endchains */ + uint32_t vq_pfn; /* PFN of virt queue (not shifted!) */ + + volatile struct vring_desc *vq_desc; /* descriptor array */ + volatile struct vring_avail *vq_avail; /* the "avail" ring */ + volatile struct vring_used *vq_used; /* the "used" ring */ +}; + +int vq_ring_ready(struct vqueue_info *vq); +int vq_has_descs(struct vqueue_info *vq); +void * paddr_map(uint32_t offset, uint32_t phys, uint32_t size); +void paddr_unmap(void *phys, uint32_t size); +int vq_getchain(uint32_t beri_mem_offset, struct vqueue_info *vq, + struct iovec *iov, int n_iov, uint16_t *flags); +void vq_relchain(struct vqueue_info *vq, struct iovec *iov, int n, uint32_t iolen); + Added: head/sys/dev/beri/virtio/virtio_block.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/beri/virtio/virtio_block.c Tue Nov 25 15:58:59 2014 (r275048) @@ -0,0 +1,602 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * BERI virtio block backend driver + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "pio_if.h" + +#define DPRINTF(fmt, ...) + +struct beri_vtblk_softc { + struct resource *res[1]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + struct cdev *cdev; + device_t dev; + int opened; + device_t pio_recv; + device_t pio_send; + struct vqueue_info vs_queues[NUM_QUEUES]; + char ident[VTBLK_BLK_ID_BYTES]; + struct ucred *cred; + struct vnode *vnode; + struct thread *vtblk_ktd; + struct sx sc_mtx; + int beri_mem_offset; + struct md_ioctl *mdio; + struct virtio_blk_config *cfg; +}; + +static struct resource_spec beri_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +vtblk_rdwr(struct beri_vtblk_softc *sc, struct iovec *iov, + int cnt, int offset, int operation, int iolen) +{ + struct vnode *vp; + struct mount *mp; + struct uio auio; + int error; + + bzero(&auio, sizeof(auio)); + + vp = sc->vnode; + + KASSERT(vp != NULL, ("file not opened")); + + auio.uio_iov = iov; + auio.uio_iovcnt = cnt; + auio.uio_offset = offset; + auio.uio_segflg = UIO_SYSSPACE; + auio.uio_rw = operation; + auio.uio_resid = iolen; + auio.uio_td = curthread; + + if (operation == 0) { + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_READ(vp, &auio, IO_DIRECT, sc->cred); + VOP_UNLOCK(vp, 0); + } else { + (void) vn_start_write(vp, &mp, V_WAIT); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_WRITE(vp, &auio, IO_SYNC, sc->cred); + VOP_UNLOCK(vp, 0); + vn_finished_write(mp); + } + + return (error); +} + +static void +vtblk_proc(struct beri_vtblk_softc *sc, struct vqueue_info *vq) +{ + struct iovec iov[VTBLK_MAXSEGS + 2]; + uint16_t flags[VTBLK_MAXSEGS + 2]; + struct virtio_blk_outhdr *vbh; + uint8_t *status; + off_t offset; + int iolen; + int type; + int i, n; + int err; + + n = vq_getchain(sc->beri_mem_offset, vq, iov, + VTBLK_MAXSEGS + 2, flags); + + KASSERT(n >= 2 && n <= VTBLK_MAXSEGS + 2, + ("wrong n value %d", n)); + + vbh = iov[0].iov_base; + + status = iov[n-1].iov_base; + KASSERT(iov[n-1].iov_len == 1, + ("iov_len == %d", iov[n-1].iov_len)); + + type = be32toh(vbh->type) & ~VIRTIO_BLK_T_BARRIER; + offset = be64toh(vbh->sector) * DEV_BSIZE; + + iolen = 0; + for (i = 1; i < (n-1); i++) { + iolen += iov[i].iov_len; + } + + switch (type) { + case VIRTIO_BLK_T_OUT: + case VIRTIO_BLK_T_IN: + err = vtblk_rdwr(sc, iov + 1, i - 1, + offset, type, iolen); + break; + case VIRTIO_BLK_T_GET_ID: + /* Assume a single buffer */ + strlcpy(iov[1].iov_base, sc->ident, + MIN(iov[1].iov_len, sizeof(sc->ident))); + err = 0; + break; + case VIRTIO_BLK_T_FLUSH: + /* Possible? */ + default: + err = -ENOSYS; + break; + } + + if (err < 0) { + if (err == -ENOSYS) { + *status = VIRTIO_BLK_S_UNSUPP; + } else + *status = VIRTIO_BLK_S_IOERR; + } else + *status = VIRTIO_BLK_S_OK; + + vq_relchain(vq, iov, n, 1); +} + +static int +close_file(struct beri_vtblk_softc *sc, struct thread *td) +{ + int error; + + if (sc->vnode != NULL) { + vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); + sc->vnode->v_vflag &= ~VV_MD; + VOP_UNLOCK(sc->vnode, 0); + error = vn_close(sc->vnode, (FREAD|FWRITE), + sc->cred, td); + if (error != 0) + return (error); + sc->vnode = NULL; + } + + if (sc->cred != NULL) + crfree(sc->cred); + + return (0); +} + +static int +open_file(struct beri_vtblk_softc *sc, struct thread *td) +{ + struct nameidata nd; + struct vattr vattr; + int error; + int flags; + + flags = (FREAD | FWRITE); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, + sc->mdio->md_file, td); + error = vn_open(&nd, &flags, 0, NULL); + if (error != 0) + return (error); + NDFREE(&nd, NDF_ONLY_PNBUF); + + if (nd.ni_vp->v_type != VREG) { + return (EINVAL); + } + + error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); + if (error != 0) + return (error); + + if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { + vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); + if (nd.ni_vp->v_iflag & VI_DOOMED) { + return (1); + } + } + nd.ni_vp->v_vflag |= VV_MD; + VOP_UNLOCK(nd.ni_vp, 0); + + sc->vnode = nd.ni_vp; + sc->cred = crhold(td->td_ucred); + + return (0); +} + +static int +vtblk_notify(struct beri_vtblk_softc *sc) +{ + struct vqueue_info *vq; + int queue; + int reg; + + vq = &sc->vs_queues[0]; + if (!vq_ring_ready(vq)) + return (0); + + if (!sc->opened) + return (0); + + reg = READ2(sc, VIRTIO_MMIO_QUEUE_NOTIFY); + queue = be16toh(reg); + + KASSERT(queue == 0, ("we support single queue only")); + + /* Process new descriptors */ + vq = &sc->vs_queues[queue]; + vq->vq_save_used = be16toh(vq->vq_used->idx); + while (vq_has_descs(vq)) + vtblk_proc(sc, vq); + + /* Interrupt other side */ + PIO_SET(sc->pio_send, Q_INTR, 1); + + return (0); +} + +static int +vq_init(struct beri_vtblk_softc *sc) +{ + struct vqueue_info *vq; + uint8_t *base; + int size; + int reg; + int pfn; + + vq = &sc->vs_queues[0]; + vq->vq_qsize = NUM_QUEUES; + + reg = READ4(sc, VIRTIO_MMIO_QUEUE_PFN); + pfn = be32toh(reg); + vq->vq_pfn = pfn; + + size = vring_size(vq->vq_qsize, VRING_ALIGN); + base = paddr_map(sc->beri_mem_offset, + (pfn << PAGE_SHIFT), size); + + /* First pages are descriptors */ + vq->vq_desc = (struct vring_desc *)base; + base += vq->vq_qsize * sizeof(struct vring_desc); + + /* Then avail ring */ + vq->vq_avail = (struct vring_avail *)base; + base += (2 + vq->vq_qsize + 1) * sizeof(uint16_t); + + /* Then it's rounded up to the next page */ + base = (uint8_t *)roundup2((uintptr_t)base, VRING_ALIGN); + + /* And the last pages are the used ring */ + vq->vq_used = (struct vring_used *)base; + + /* Mark queue as allocated, and start at 0 when we use it. */ + vq->vq_flags = VQ_ALLOC; + vq->vq_last_avail = 0; + + return (0); +} + + +static void +vtblk_thread(void *arg) +{ + struct beri_vtblk_softc *sc; + int err; + + sc = arg; + + sx_xlock(&sc->sc_mtx); + for (;;) { + err = msleep(sc, &sc->sc_mtx, PCATCH | PZERO, "prd", hz); + vtblk_notify(sc); + } + sx_xunlock(&sc->sc_mtx); + + kthread_exit(); +} + +static int +setup_pio(struct beri_vtblk_softc *sc, char *name, device_t *dev) +{ + phandle_t pio_node; + struct fdt_ic *ic; + phandle_t xref; + phandle_t node; + + if ((node = ofw_bus_get_node(sc->dev)) == -1) + return (ENXIO); + + if (OF_searchencprop(node, name, &xref, + sizeof(xref)) == -1) { + return (ENXIO); + } + + pio_node = OF_node_from_xref(xref); + SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { + if (ic->iph == pio_node) { + *dev = ic->dev; + PIO_CONFIGURE(*dev, PIO_OUT_ALL, + PIO_UNMASK_ALL); + return (0); + } + } + + return (ENXIO); +} + +static int +setup_offset(struct beri_vtblk_softc *sc) +{ + pcell_t dts_value[2]; + phandle_t mem_node; + phandle_t xref; + phandle_t node; + int len; + + if ((node = ofw_bus_get_node(sc->dev)) == -1) + return (ENXIO); + + if (OF_searchencprop(node, "beri-mem", &xref, + sizeof(xref)) == -1) { + return (ENXIO); + } + + mem_node = OF_node_from_xref(xref); + if ((len = OF_getproplen(mem_node, "reg")) <= 0) + return (ENXIO); + OF_getencprop(mem_node, "reg", dts_value, len); + sc->beri_mem_offset = dts_value[0]; + + return (0); +} + +static int +backend_info(struct beri_vtblk_softc *sc) +{ + struct virtio_blk_config *cfg; + uint32_t *s; + int reg; + int i; + + /* Specify that we provide block device */ + reg = htobe32(VIRTIO_ID_BLOCK); + WRITE4(sc, VIRTIO_MMIO_DEVICE_ID, reg); + + /* The number of queues we support */ + reg = htobe16(NUM_QUEUES); + WRITE2(sc, VIRTIO_MMIO_QUEUE_NUM, reg); + + /* Our features */ + reg = htobe32(VIRTIO_RING_F_INDIRECT_DESC + | VIRTIO_BLK_F_BLK_SIZE + | VIRTIO_BLK_F_SEG_MAX); + WRITE4(sc, VIRTIO_MMIO_HOST_FEATURES, reg); + + cfg = sc->cfg; + cfg->capacity = htobe64(sc->mdio->md_mediasize / DEV_BSIZE); + cfg->size_max = 0; /* not negotiated */ + cfg->seg_max = htobe32(VTBLK_MAXSEGS); + cfg->blk_size = htobe32(DEV_BSIZE); + + s = (uint32_t *)cfg; + + for (i = 0; i < sizeof(struct virtio_blk_config); i+=4) { + WRITE4(sc, VIRTIO_MMIO_CONFIG + i, *s); + s+=1; + } + + sprintf(sc->ident, "Virtio block backend"); + + return (0); +} + +static void +vtblk_intr(void *arg) +{ + struct beri_vtblk_softc *sc; + int pending; + int reg; + + sc = arg; + + reg = PIO_READ(sc->pio_recv); + + /* Ack */ + PIO_SET(sc->pio_recv, reg, 0); + + pending = htobe32(reg); + + if (pending & Q_PFN) { + vq_init(sc); + } + + if (pending & Q_NOTIFY) { + wakeup(sc); + } +} + +static int +beri_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, + int flags, struct thread *td) +{ + struct beri_vtblk_softc *sc; + int err; + + sc = dev->si_drv1; + + switch (cmd) { + case MDIOCATTACH: + /* take file as argument */ + if (sc->vnode != NULL) { + /* Already opened */ + return (1); + } + sc->mdio = (struct md_ioctl *)addr; + backend_info(sc); + DPRINTF("opening file, td 0x%08x\n", (int)td); + err = open_file(sc, td); + if (err) + return (err); + PIO_SETUP_IRQ(sc->pio_recv, vtblk_intr, sc); + sc->opened = 1; + break; + case MDIOCDETACH: + if (sc->vnode == 0) { + /* File not opened */ + return (1); + } + sc->opened = 0; + DPRINTF("closing file, td 0x%08x\n", (int)td); + err = close_file(sc, td); + if (err) + return (err); + PIO_TEARDOWN_IRQ(sc->pio_recv); + break; + default: + break; + } + + return (0); +} + +static struct cdevsw beri_cdevsw = { + .d_version = D_VERSION, + .d_ioctl = beri_ioctl, + .d_name = "virtio block backend", +}; + +static int +beri_vtblk_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "sri-cambridge,beri-vtblk")) + return (ENXIO); + + device_set_desc(dev, "SRI-Cambridge BERI block"); + return (BUS_PROBE_DEFAULT); +} + +static int +beri_vtblk_attach(device_t dev) +{ + struct beri_vtblk_softc *sc; + int error; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, beri_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + sc->cfg = malloc(sizeof(struct virtio_blk_config), + M_DEVBUF, M_NOWAIT|M_ZERO); + + sx_init(&sc->sc_mtx, device_get_nameunit(sc->dev)); + + error = kthread_add(vtblk_thread, sc, NULL, &sc->vtblk_ktd, + 0, 0, "beri_virtio_block"); + if (error) { + device_printf(dev, "cannot create kthread\n"); + return (ENXIO); + } + + if (setup_offset(sc) != 0) + return (ENXIO); + if (setup_pio(sc, "pio-send", &sc->pio_send) != 0) + return (ENXIO); + if (setup_pio(sc, "pio-recv", &sc->pio_recv) != 0) + return (ENXIO); + + sc->cdev = make_dev(&beri_cdevsw, 0, UID_ROOT, GID_WHEEL, + S_IRWXU, "beri_vtblk"); + if (sc->cdev == NULL) { + device_printf(dev, "Failed to create character device.\n"); + return (ENXIO); + } + + sc->cdev->si_drv1 = sc; + return (0); +} + +static device_method_t beri_vtblk_methods[] = { + DEVMETHOD(device_probe, beri_vtblk_probe), + DEVMETHOD(device_attach, beri_vtblk_attach), + { 0, 0 } +}; + +static driver_t beri_vtblk_driver = { + "beri_vtblk", + beri_vtblk_methods, + sizeof(struct beri_vtblk_softc), +}; + +static devclass_t beri_vtblk_devclass; + +DRIVER_MODULE(beri_vtblk, simplebus, beri_vtblk_driver, + beri_vtblk_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 16:06:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7C34ED6; Tue, 25 Nov 2014 16:06:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88F99ECA; Tue, 25 Nov 2014 16:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPG6KUL038356; Tue, 25 Nov 2014 16:06:20 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPG6J6K038348; Tue, 25 Nov 2014 16:06:19 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411251606.sAPG6J6K038348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 25 Nov 2014 16:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275049 - in head/sys: arm/altera/socfpga boot/fdt/dts/arm dev/beri/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 16:06:20 -0000 Author: br Date: Tue Nov 25 16:06:19 2014 New Revision: 275049 URL: https://svnweb.freebsd.org/changeset/base/275049 Log: o Add PIO and vtblk mmio device info to the tree o Add FPGA memory window to static dev mappings o Fix whitespace Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts head/sys/dev/beri/virtio/virtio.h Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Nov 25 15:58:59 2014 (r275048) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Nov 25 16:06:19 2014 (r275049) @@ -95,6 +95,9 @@ platform_devmap_init(void) /* scu */ arm_devmap_add_entry(0xfff00000, 0x100000); + /* FPGA memory window, 256MB */ + arm_devmap_add_entry(0xd0000000, 0x10000000); + return (0); } Modified: head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts Tue Nov 25 15:58:59 2014 (r275048) +++ head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts Tue Nov 25 16:06:19 2014 (r275049) @@ -38,8 +38,8 @@ model = "Terasic SoCKit"; compatible = "altr,socfpga-cyclone5", "altr,socfpga"; - /* Reserve first page for secondary CPU trampoline code */ - memreserve = < 0x00000000 0x1000 >; + memreserve = < 0x00000000 0x1000 >, /* SMP trampoline */ + < 0x00001000 0x1000 >; /* virtio block */ memory { device_type = "memory"; @@ -69,6 +69,8 @@ }; mmc: dwmmc@ff704000 { + #address-cells = <1>; + #size-cells = <0>; status = "okay"; num-slots = <1>; supports-highspeed; @@ -81,9 +83,34 @@ }; }; - beri_mem: mem@d0000000 { + beri_mem0: mem@d0000000 { compatible = "sri-cambridge,beri-mem"; - reg = <0xd0000000 0x10000000>; + reg = <0xd0000000 0x10000000>; /* 256mb */ + status = "okay"; + }; + + pio0: pio@c0020000 { + compatible = "altr,pio"; + reg = <0xc0020000 0x1000>; /* recv */ + interrupts = < 76 >; + interrupt-parent = <&GIC>; + status = "okay"; + }; + + pio1: pio@c0021000 { + compatible = "altr,pio"; + reg = <0xc0021000 0x1000>; /* send */ + interrupts = < 82 >; /* not in use on arm side */ + interrupt-parent = <&GIC>; + status = "okay"; + }; + + beri_vtblk: vtblk@00001000 { + compatible = "sri-cambridge,beri-vtblk"; + reg = <0x00001000 0x1000>; + pio-recv = <&pio0>; + pio-send = <&pio1>; + beri-mem = <&beri_mem0>; status = "okay"; }; Modified: head/sys/dev/beri/virtio/virtio.h ============================================================================== --- head/sys/dev/beri/virtio/virtio.h Tue Nov 25 15:58:59 2014 (r275048) +++ head/sys/dev/beri/virtio/virtio.h Tue Nov 25 16:06:19 2014 (r275049) @@ -39,7 +39,7 @@ #define WRITE4(_sc, _reg, _val) \ bus_write_4((_sc)->res[0], _reg, _val) -#define PAGE_SHIFT 12 +#define PAGE_SHIFT 12 #define VRING_ALIGN 4096 #define NUM_QUEUES 1 From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 16:24:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAAFE63D; Tue, 25 Nov 2014 16:24:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A774E14E; Tue, 25 Nov 2014 16:24:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPGOWnj047544; Tue, 25 Nov 2014 16:24:32 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPGOVIu047541; Tue, 25 Nov 2014 16:24:31 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411251624.sAPGOVIu047541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 25 Nov 2014 16:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275050 - in head/sys: arm/altera/socfpga 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 16:24:32 -0000 Author: br Date: Tue Nov 25 16:24:31 2014 New Revision: 275050 URL: https://svnweb.freebsd.org/changeset/base/275050 Log: Add new devices to the config. Modified: head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/conf/SOCKIT-BERI head/sys/conf/files Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Tue Nov 25 16:06:19 2014 (r275049) +++ head/sys/arm/altera/socfpga/files.socfpga Tue Nov 25 16:24:31 2014 (r275050) @@ -26,3 +26,5 @@ dev/mmc/host/dwmmc.c optional dwmmc # BERI specific dev/beri/beri_ring.c optional beri_ring dev/beri/beri_mem.c optional beri_mem +dev/beri/virtio/virtio.c optional beri_vtblk +dev/beri/virtio/virtio_block.c optional beri_vtblk Modified: head/sys/arm/conf/SOCKIT-BERI ============================================================================== --- head/sys/arm/conf/SOCKIT-BERI Tue Nov 25 16:06:19 2014 (r275049) +++ head/sys/arm/conf/SOCKIT-BERI Tue Nov 25 16:24:31 2014 (r275050) @@ -122,6 +122,8 @@ device spibus # BERI specific device beri_ring device beri_mem +device beri_vtblk +device altera_pio # Ethernet device ether Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 25 16:06:19 2014 (r275049) +++ head/sys/conf/files Tue Nov 25 16:24:31 2014 (r275050) @@ -660,6 +660,8 @@ dev/altera/sdcard/altera_sdcard_disk.c o dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_fdt.c optional altera_sdcard fdt dev/altera/sdcard/altera_sdcard_nexus.c optional altera_sdcard +dev/altera/pio/pio.c optional altera_pio +dev/altera/pio/pio_if.m optional altera_pio dev/amdpm/amdpm.c optional amdpm pci | nfpm pci dev/amdsmb/amdsmb.c optional amdsmb pci dev/amr/amr.c optional amr From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 16:51:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8EDC2B9; Tue, 25 Nov 2014 16:51:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BF8D6C7; Tue, 25 Nov 2014 16:51:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPGp7dE059320; Tue, 25 Nov 2014 16:51:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPGp7ad059319; Tue, 25 Nov 2014 16:51:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251651.sAPGp7ad059319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 16:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275052 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 16:51:07 -0000 Author: bapt Date: Tue Nov 25 16:51:06 2014 New Revision: 275052 URL: https://svnweb.freebsd.org/changeset/base/275052 Log: Defined the needed library to convert usr.sbin to LIBADD Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 16:45:40 2014 (r275051) +++ head/share/mk/src.libnames.mk Tue Nov 25 16:51:06 2014 (r275052) @@ -24,11 +24,19 @@ _PRIVATELIBS= \ unbound _INTERNALIBS= \ + amu \ + bsnmptools \ + cron \ event \ + fifolog \ ipf \ + lpr \ mandoc \ netbsd \ + ntp \ ohash \ + opts \ + parse \ readline \ sl \ sm \ @@ -43,6 +51,7 @@ _LIBRARIES= \ alias \ archive \ asn1 \ + auditd \ begemot \ bluetooth \ bsdxml \ @@ -60,6 +69,7 @@ _LIBRARIES= \ ctf \ cuse \ cxxrt \ + devinfo \ devstat \ dialog \ dpv \ @@ -103,7 +113,9 @@ _LIBRARIES= \ opie \ pam \ pcap \ + pcsclite \ pjdlog \ + pmc \ proc \ procstat \ pthread \ @@ -123,11 +135,13 @@ _LIBRARIES= \ ssp_nonshared \ tacplus \ termcapw \ + ugidfw \ ufs \ ulog \ usb \ usbhid \ util \ + vmmapi \ wind \ wrap \ xo \ @@ -332,3 +346,27 @@ LIBIPF?= ${LIBIPFDIR}/libipf.a LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet LIBTELNET?= ${LIBIPFDIR}/libtelnet.a + +LIBCRONDIR= ${ROOTOBJDIR}/usr.sbin/cron/lib +LIBCRON?= ${LIBCRONDIR}/libcron.a + +LIBNTPDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntp +LIBNTP?= ${LIBNTPDIR}/libntp.a + +LIBOPTSDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libopts +LIBOTPS?= ${LIBOPTSDIR}/libopts.a + +LIBPARSEDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libparse +LIBPARSE?= ${LIBOPTSDIR}/libparse.a + +LIBLPRDIR= ${ROOTOBJDIR}/usr.sbin/lpr/common_source +LIBLPR?= ${LIBOPTSDIR}/liblpr.a + +LIBFIFOLOGDIR= ${ROOTOBJDIR}/usr.sbin/fifolog/lib +LIBFIFOLOG?= ${LIBOPTSDIR}/libfifolog.a + +LIBBSNMPTOOLSDIR= ${ROOTOBJDIR}/usr.sbin/bsnmpd/tools/libbsnmptools +LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a + +LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu +LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 16:53:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 152CB439; Tue, 25 Nov 2014 16:53:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0218B74D; Tue, 25 Nov 2014 16:53:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPGrNIZ062085; Tue, 25 Nov 2014 16:53:23 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPGrNFx062076; Tue, 25 Nov 2014 16:53:23 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411251653.sAPGrNFx062076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 25 Nov 2014 16:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275053 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 16:53:24 -0000 Author: br Date: Tue Nov 25 16:53:22 2014 New Revision: 275053 URL: https://svnweb.freebsd.org/changeset/base/275053 Log: o Add Virtio MMIO bus driver to config o Move Virtio-related to common config file Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 25 16:51:06 2014 (r275052) +++ head/sys/conf/files Tue Nov 25 16:53:22 2014 (r275053) @@ -2572,6 +2572,19 @@ dev/utopia/suni.c optional utopia dev/utopia/utopia.c optional utopia dev/vge/if_vge.c optional vge dev/viapm/viapm.c optional viapm pci +dev/virtio/virtio.c optional virtio +dev/virtio/virtqueue.c optional virtio +dev/virtio/virtio_bus_if.m optional virtio +dev/virtio/virtio_if.m optional virtio +dev/virtio/pci/virtio_pci.c optional virtio_pci +dev/virtio/mmio/virtio_mmio.c optional virtio_mmio +dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio +dev/virtio/network/if_vtnet.c optional vtnet +dev/virtio/block/virtio_blk.c optional virtio_blk +dev/virtio/balloon/virtio_balloon.c optional virtio_balloon +dev/virtio/scsi/virtio_scsi.c optional virtio_scsi +dev/virtio/random/virtio_random.c optional virtio_random +dev/virtio/console/virtio_console.c optional virtio_console dev/vkbd/vkbd.c optional vkbd dev/vr/if_vr.c optional vr pci dev/vt/colors/vt_termcolors.c optional vt Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Nov 25 16:51:06 2014 (r275052) +++ head/sys/conf/files.amd64 Tue Nov 25 16:53:22 2014 (r275053) @@ -445,17 +445,6 @@ dev/isci/scil/scif_sas_task_request.c dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci dev/isci/scil/scif_sas_task_request_states.c optional isci dev/isci/scil/scif_sas_timer.c optional isci -dev/virtio/virtio.c optional virtio -dev/virtio/virtqueue.c optional virtio -dev/virtio/virtio_bus_if.m optional virtio -dev/virtio/virtio_if.m optional virtio -dev/virtio/pci/virtio_pci.c optional virtio_pci -dev/virtio/network/if_vtnet.c optional vtnet -dev/virtio/block/virtio_blk.c optional virtio_blk -dev/virtio/balloon/virtio_balloon.c optional virtio_balloon -dev/virtio/scsi/virtio_scsi.c optional virtio_scsi -dev/virtio/random/virtio_random.c optional virtio_random -dev/virtio/console/virtio_console.c optional virtio_console isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/kern_clocksource.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Nov 25 16:51:06 2014 (r275052) +++ head/sys/conf/files.i386 Tue Nov 25 16:53:22 2014 (r275053) @@ -392,17 +392,6 @@ dev/isci/scil/scif_sas_task_request.c dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci dev/isci/scil/scif_sas_task_request_states.c optional isci dev/isci/scil/scif_sas_timer.c optional isci -dev/virtio/virtio.c optional virtio -dev/virtio/virtqueue.c optional virtio -dev/virtio/virtio_bus_if.m optional virtio -dev/virtio/virtio_if.m optional virtio -dev/virtio/pci/virtio_pci.c optional virtio_pci -dev/virtio/network/if_vtnet.c optional vtnet -dev/virtio/block/virtio_blk.c optional virtio_blk -dev/virtio/balloon/virtio_balloon.c optional virtio_balloon -dev/virtio/scsi/virtio_scsi.c optional virtio_scsi -dev/virtio/random/virtio_random.c optional virtio_random -dev/virtio/console/virtio_console.c optional virtio_console i386/acpica/acpi_machdep.c optional acpi acpi_wakecode.o optional acpi \ dependency "$S/i386/acpica/acpi_wakecode.S assym.s" \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 16:57:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0931265E; Tue, 25 Nov 2014 16:57:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E65F5787; Tue, 25 Nov 2014 16:57:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPGvooT062772; Tue, 25 Nov 2014 16:57:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPGvSBD062652; Tue, 25 Nov 2014 16:57:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251657.sAPGvSBD062652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 16:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275054 - in head/usr.sbin: acpi/acpidb amd amd/amd amd/amq amd/fixmount amd/fsinfo amd/hlfsd amd/mk-amd-map amd/pawd amd/wire-test ancontrol apmd asf audit auditd auditdistd auditreduc... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 16:57:51 -0000 Author: bapt Date: Tue Nov 25 16:57:27 2014 New Revision: 275054 URL: https://svnweb.freebsd.org/changeset/base/275054 Log: Convert usr.sbin to LIBADD Reduce overlinking Deleted: head/usr.sbin/cron/Makefile.inc head/usr.sbin/fifolog/Makefile.inc Modified: head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/amd/Makefile.inc head/usr.sbin/amd/amd/Makefile head/usr.sbin/amd/amq/Makefile head/usr.sbin/amd/fixmount/Makefile head/usr.sbin/amd/fsinfo/Makefile head/usr.sbin/amd/hlfsd/Makefile head/usr.sbin/amd/mk-amd-map/Makefile head/usr.sbin/amd/pawd/Makefile head/usr.sbin/amd/wire-test/Makefile head/usr.sbin/ancontrol/Makefile head/usr.sbin/apmd/Makefile head/usr.sbin/asf/Makefile head/usr.sbin/audit/Makefile head/usr.sbin/auditd/Makefile head/usr.sbin/auditdistd/Makefile head/usr.sbin/auditreduce/Makefile head/usr.sbin/authpf/Makefile head/usr.sbin/autofs/Makefile head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyvectl/Makefile head/usr.sbin/bhyveload/Makefile head/usr.sbin/bluetooth/ath3kfw/Makefile head/usr.sbin/bluetooth/bt3cfw/Makefile head/usr.sbin/bluetooth/bthidcontrol/Makefile head/usr.sbin/bluetooth/bthidd/Makefile head/usr.sbin/bluetooth/btpand/Makefile head/usr.sbin/bluetooth/hccontrol/Makefile head/usr.sbin/bluetooth/hcsecd/Makefile head/usr.sbin/bluetooth/hcseriald/Makefile head/usr.sbin/bluetooth/l2control/Makefile head/usr.sbin/bluetooth/l2ping/Makefile head/usr.sbin/bluetooth/rfcomm_pppd/Makefile head/usr.sbin/bluetooth/sdpcontrol/Makefile head/usr.sbin/boot0cfg/Makefile head/usr.sbin/boot98cfg/Makefile head/usr.sbin/bsdinstall/distextract/Makefile head/usr.sbin/bsdinstall/distfetch/Makefile head/usr.sbin/bsdinstall/partedit/Makefile head/usr.sbin/bsnmpd/bsnmpd/Makefile head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile head/usr.sbin/cdcontrol/Makefile head/usr.sbin/ckdist/Makefile head/usr.sbin/clear_locks/Makefile head/usr.sbin/config/Makefile head/usr.sbin/cron/cron/Makefile head/usr.sbin/cron/crontab/Makefile head/usr.sbin/ctladm/Makefile head/usr.sbin/ctld/Makefile head/usr.sbin/ctm/ctm/Makefile head/usr.sbin/ctm/mkCTM/Makefile head/usr.sbin/daemon/Makefile head/usr.sbin/dconschat/Makefile head/usr.sbin/devinfo/Makefile head/usr.sbin/diskinfo/Makefile head/usr.sbin/editmap/Makefile head/usr.sbin/edquota/Makefile head/usr.sbin/fifolog/fifolog_create/Makefile head/usr.sbin/fifolog/fifolog_reader/Makefile head/usr.sbin/fifolog/fifolog_writer/Makefile head/usr.sbin/flowctl/Makefile head/usr.sbin/ftp-proxy/Makefile head/usr.sbin/gssd/Makefile head/usr.sbin/gstat/Makefile head/usr.sbin/ifmcstat/Makefile head/usr.sbin/inetd/Makefile head/usr.sbin/iostat/Makefile head/usr.sbin/ipfwpcap/Makefile head/usr.sbin/iscsid/Makefile head/usr.sbin/jail/Makefile head/usr.sbin/jexec/Makefile head/usr.sbin/jls/Makefile head/usr.sbin/kbdcontrol/Makefile head/usr.sbin/keyserv/Makefile head/usr.sbin/kgmon/Makefile head/usr.sbin/lmcconfig/Makefile head/usr.sbin/lpr/Makefile.inc head/usr.sbin/lpr/chkprintcap/Makefile head/usr.sbin/lpr/lpc/Makefile head/usr.sbin/lpr/lpd/Makefile head/usr.sbin/lpr/lpq/Makefile head/usr.sbin/lpr/lpr/Makefile head/usr.sbin/lpr/lprm/Makefile head/usr.sbin/lpr/pac/Makefile head/usr.sbin/mailstats/Makefile head/usr.sbin/mailwrapper/Makefile head/usr.sbin/makemap/Makefile head/usr.sbin/mfiutil/Makefile head/usr.sbin/mount_smbfs/Makefile head/usr.sbin/mountd/Makefile head/usr.sbin/moused/Makefile head/usr.sbin/mptutil/Makefile head/usr.sbin/mtree/Makefile head/usr.sbin/nandtool/Makefile head/usr.sbin/ndiscvt/Makefile head/usr.sbin/ngctl/Makefile head/usr.sbin/nghook/Makefile head/usr.sbin/nmtree/Makefile head/usr.sbin/nscd/Makefile head/usr.sbin/ntp/Makefile.inc head/usr.sbin/ntp/ntp-keygen/Makefile head/usr.sbin/ntp/ntpd/Makefile head/usr.sbin/ntp/ntpdate/Makefile head/usr.sbin/ntp/ntpdc/Makefile head/usr.sbin/ntp/ntpq/Makefile head/usr.sbin/ntp/ntptime/Makefile head/usr.sbin/ntp/sntp/Makefile head/usr.sbin/pkg/Makefile head/usr.sbin/pmccontrol/Makefile head/usr.sbin/pmcstat/Makefile head/usr.sbin/powerd/Makefile head/usr.sbin/ppp/Makefile head/usr.sbin/pppctl/Makefile head/usr.sbin/praliases/Makefile head/usr.sbin/praudit/Makefile head/usr.sbin/pstat/Makefile head/usr.sbin/quotaon/Makefile head/usr.sbin/rarpd/Makefile head/usr.sbin/repquota/Makefile head/usr.sbin/rpc.lockd/Makefile head/usr.sbin/rpc.statd/Makefile head/usr.sbin/rpc.yppasswdd/Makefile head/usr.sbin/rpc.ypupdated/Makefile head/usr.sbin/rpc.ypxfrd/Makefile head/usr.sbin/rpcbind/Makefile head/usr.sbin/rrenumd/Makefile head/usr.sbin/rtadvd/Makefile head/usr.sbin/rtsold/Makefile head/usr.sbin/sendmail/Makefile head/usr.sbin/services_mkdb/Makefile head/usr.sbin/snapinfo/Makefile head/usr.sbin/spray/Makefile head/usr.sbin/syslogd/Makefile head/usr.sbin/tcpdchk/Makefile head/usr.sbin/tcpdmatch/Makefile head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/timed/timed/Makefile head/usr.sbin/traceroute/Makefile head/usr.sbin/traceroute6/Makefile head/usr.sbin/tzsetup/Makefile head/usr.sbin/ugidfw/Makefile head/usr.sbin/uhsoctl/Makefile head/usr.sbin/unbound/anchor/Makefile head/usr.sbin/unbound/checkconf/Makefile head/usr.sbin/unbound/control/Makefile head/usr.sbin/unbound/daemon/Makefile head/usr.sbin/usbconfig/Makefile head/usr.sbin/vipw/Makefile head/usr.sbin/watch/Makefile head/usr.sbin/watchdogd/Makefile head/usr.sbin/wpa/Makefile.crypto head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/hostapd_cli/Makefile head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_passphrase/Makefile head/usr.sbin/wpa/wpa_priv/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile head/usr.sbin/ypserv/Makefile Modified: head/usr.sbin/acpi/acpidb/Makefile ============================================================================== --- head/usr.sbin/acpi/acpidb/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/acpi/acpidb/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -74,7 +74,6 @@ MAN= acpidb.8 WARNS?= 3 CFLAGS+= -DACPI_EXEC_APP -fno-strict-aliasing -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread .include Modified: head/usr.sbin/amd/Makefile.inc ============================================================================== --- head/usr.sbin/amd/Makefile.inc Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/Makefile.inc Tue Nov 25 16:57:27 2014 (r275054) @@ -29,13 +29,6 @@ CFLAGS+= -DYES_HESIOD CFLAGS+= -DHOST_CPU=\"${MACHINE_CPUARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\" -.if exists(${.OBJDIR}/../libamu) -LIBAMUDIR= ${.OBJDIR}/../libamu -.else -LIBAMUDIR= ${.CURDIR}/../libamu -.endif -LIBAMU= ${LIBAMUDIR}/libamu.a - RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen MOUNT_X= ${DESTDIR}/usr/include/rpcsvc/mount.x NFS_PROT_X= ${DESTDIR}/usr/include/rpcsvc/nfs_prot.x Modified: head/usr.sbin/amd/amd/Makefile ============================================================================== --- head/usr.sbin/amd/amd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/amd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -27,8 +27,7 @@ SRCS+= srvr_amfs_auto.c srvr_nfs.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ -I${DESTDIR}/usr/include/rpcsvc -DPADD= ${LIBAMU} ${LIBWRAP} -LDADD= ${LIBAMU} -lwrap +LIBADD= amu wrap CLEANFILES+= conf_parse.c conf_parse.h conf_tok.c Modified: head/usr.sbin/amd/amq/Makefile ============================================================================== --- head/usr.sbin/amd/amq/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/amq/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -14,7 +14,6 @@ SRCS= amq.c amq_clnt.c amq_xdr.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq -DPADD= ${LIBAMU} -LDADD= ${LIBAMU} +LIBADD= amu .include Modified: head/usr.sbin/amd/fixmount/Makefile ============================================================================== --- head/usr.sbin/amd/fixmount/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/fixmount/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,12 +10,11 @@ PROG= fixmount MAN= fixmount.8 -SRCS= fixmount.c +SRCS= fixmount.c # These would be links created by the GNU-style configure SRCS+= checkmount_bsd44.c -DPADD= ${LIBAMU} ${LIBRPCSVC} -LDADD= ${LIBAMU} -lrpcsvc +LIBADD+= amu rpcsvc .include Modified: head/usr.sbin/amd/fsinfo/Makefile ============================================================================== --- head/usr.sbin/amd/fsinfo/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/fsinfo/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -15,8 +15,7 @@ SRCS+= wr_bparam.c wr_dumpset.c wr_expor CFLAGS+= -I${.CURDIR}/../../../contrib/amd/fsinfo -DPADD= ${LIBAMU} -LDADD= ${LIBAMU} +LIBADD= amu CLEANFILES+= fsi_gram.c fsi_gram.h fsi_lex.c Modified: head/usr.sbin/amd/hlfsd/Makefile ============================================================================== --- head/usr.sbin/amd/hlfsd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/hlfsd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -13,7 +13,6 @@ SRCS= hlfsd.c homedir.c nfs_prot_svc.c s CFLAGS+= -I${.CURDIR}/../../../contrib/amd/hlfsd -DPADD= ${LIBAMU} -LDADD= ${LIBAMU} +LIBADD= amu .include Modified: head/usr.sbin/amd/mk-amd-map/Makefile ============================================================================== --- head/usr.sbin/amd/mk-amd-map/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/mk-amd-map/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,7 +10,6 @@ PROG= mk-amd-map MAN= mk-amd-map.8 -DPADD= ${LIBAMU} -LDADD= ${LIBAMU} +LIBADD= amu .include Modified: head/usr.sbin/amd/pawd/Makefile ============================================================================== --- head/usr.sbin/amd/pawd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/pawd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -14,7 +14,6 @@ SRCS= pawd.c amq_clnt.c amq_xdr.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq -DPADD= ${LIBAMU} -LDADD= ${LIBAMU} +LIBADD= amu .include Modified: head/usr.sbin/amd/wire-test/Makefile ============================================================================== --- head/usr.sbin/amd/wire-test/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/amd/wire-test/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,7 +10,6 @@ PROG= wire-test MAN= wire-test.8 -DPADD= ${LIBAMU} -LDADD= ${LIBAMU} +LIBADD= amu .include Modified: head/usr.sbin/ancontrol/Makefile ============================================================================== --- head/usr.sbin/ancontrol/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ancontrol/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,7 +6,6 @@ MAN= ancontrol.8 WARNS?= 3 CFLAGS+= -DANCACHE -I${.CURDIR}/../../sys -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/usr.sbin/apmd/Makefile ============================================================================== --- head/usr.sbin/apmd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/apmd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -7,8 +7,7 @@ SRCS= apmd.c apmdlex.l apmdparse.y y.tab WARNS?= 3 -DPADD= ${LIBL} -LDADD= -ll +LIBADD= l CFLAGS+= -I${.CURDIR} Modified: head/usr.sbin/asf/Makefile ============================================================================== --- head/usr.sbin/asf/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/asf/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -4,7 +4,6 @@ PROG= asf SRCS= asf.c asf_kld.c asf_kvm.c asf_prog.c MAN= asf.8 -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm .include Modified: head/usr.sbin/audit/Makefile ============================================================================== --- head/usr.sbin/audit/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/audit/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,8 +10,7 @@ CFLAGS+= -I${OPENBSMDIR} PROG= audit MAN= audit.8 -DPADD= ${LIBBSM} -LDADD= -lbsm +LIBADD= bsm WARNS?= 5 Modified: head/usr.sbin/auditd/Makefile ============================================================================== --- head/usr.sbin/auditd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/auditd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -11,8 +11,7 @@ PROG= auditd SRCS= auditd.c audit_warn.c auditd_fbsd.c MAN= auditd.8 -DPADD= ${LIBAUDITD} ${LIBBSM} -LDADD= -lauditd -lbsm +LIBADD= auditd bsm WARNS?= 3 Modified: head/usr.sbin/auditdistd/Makefile ============================================================================== --- head/usr.sbin/auditdistd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/auditdistd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -21,10 +21,7 @@ SRCS+= sandbox.c sender.c subr.c SRCS+= token.l trail.c MAN= auditdistd.8 auditdistd.conf.5 -DPADD= ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -ll -lpthread -lutil -DPADD+= ${LIBCRYPTO} ${LIBSSL} -LDADD+= -lcrypto -lssl +LIBADD+= l pthread util crypto ssl YFLAGS+=-v Modified: head/usr.sbin/auditreduce/Makefile ============================================================================== --- head/usr.sbin/auditreduce/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/auditreduce/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,8 +10,7 @@ CFLAGS+= -I${OPENBSMDIR} PROG= auditreduce MAN= auditreduce.1 -DPADD= ${LIBBSM} -LDADD= -lbsm +LIBADD= bsm WARNS?= 3 Modified: head/usr.sbin/authpf/Makefile ============================================================================== --- head/usr.sbin/authpf/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/authpf/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -13,8 +13,7 @@ SRCS= authpf.c # XXX ALTQ: CFLAGS+= -DENABLE_ALTQ -LDADD+= -lm -lmd -lutil -DPADD+= ${LIBM} ${LIBMD} ${LIBUTIL} +LIBADD= m md util WARNS?= 3 Modified: head/usr.sbin/autofs/Makefile ============================================================================== --- head/usr.sbin/autofs/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/autofs/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -16,8 +16,7 @@ CFLAGS+=-I${.CURDIR}/../../sys/fs/autofs MAN= automount.8 automountd.8 autounmountd.8 auto_master.5 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util # Needed for getmntopts.c MOUNT= ${.CURDIR}/../../sbin/mount Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bhyve/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -4,7 +4,7 @@ PROG= bhyve -DEBUG_FLAGS= -g -O0 +DEBUG_FLAGS= -g -O0 MAN= bhyve.8 @@ -43,8 +43,7 @@ SRCS= \ .PATH: ${.CURDIR}/../../sys/amd64/vmm SRCS+= vmm_instruction_emul.c -DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD} -LDADD= -lvmmapi -lmd -lutil -lpthread +LIBADD= vmmapi md util pthread WARNS?= 2 Modified: head/usr.sbin/bhyvectl/Makefile ============================================================================== --- head/usr.sbin/bhyvectl/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bhyvectl/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -7,8 +7,7 @@ SRCS= bhyvectl.c MAN= -DPADD= ${LIBVMMAPI} ${LIBUTIL} -LDADD= -lvmmapi -lutil +LIBADD= vmmapi util WARNS?= 3 Modified: head/usr.sbin/bhyveload/Makefile ============================================================================== --- head/usr.sbin/bhyveload/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bhyveload/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -4,8 +4,7 @@ PROG= bhyveload SRCS= bhyveload.c MAN= bhyveload.8 -DPADD+= ${LIBVMMAPI} ${LIBUTIL} -LDADD+= -lvmmapi -lutil +LIBADD= vmmapi util WARNS?= 3 Modified: head/usr.sbin/bluetooth/ath3kfw/Makefile ============================================================================== --- head/usr.sbin/bluetooth/ath3kfw/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/ath3kfw/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,7 +2,6 @@ PROG= ath3kfw MAN= ath3kfw.8 -DPADD+= ${LIBUSB} -LDADD+= -lusb +LIBADD+= usb .include Modified: head/usr.sbin/bluetooth/bt3cfw/Makefile ============================================================================== --- head/usr.sbin/bluetooth/bt3cfw/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/bt3cfw/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,7 +5,6 @@ PROG= bt3cfw MAN= bt3cfw.8 WARNS?= 2 -DPADD= ${LIBNETGRAPH} -LDADD= -lnetgraph +LIBADD+= netgraph .include Modified: head/usr.sbin/bluetooth/bthidcontrol/Makefile ============================================================================== --- head/usr.sbin/bluetooth/bthidcontrol/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/bthidcontrol/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -9,7 +9,6 @@ SRCS= bthidcontrol.c hid.c lexer.l par WARNS?= 1 CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR}/../bthidd -DPADD= ${LIBBLUETOOTH} ${LIBSDP} ${LIBUSBHID} -LDADD= -lbluetooth -lsdp -lusbhid +LIBADD+= bluetooth sdp usbhid .include Modified: head/usr.sbin/bluetooth/bthidd/Makefile ============================================================================== --- head/usr.sbin/bluetooth/bthidd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/bthidd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,8 +10,7 @@ SRCS= bthidd.c client.c hid.c kbd.c lex CFLAGS+= -I${.CURDIR} DEBUG_FLAGS= -g -DPADD= ${LIBBLUETOOTH} ${LIBUSBHID} -LDADD= -lbluetooth -lusbhid +LIBADD+= bluetooth usbhid NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.sbin/bluetooth/btpand/Makefile ============================================================================== --- head/usr.sbin/bluetooth/btpand/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/btpand/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -7,7 +7,6 @@ SRCS= btpand.c bnep.c channel.c client.c WARNS?= 3 -DPADD+= ${LIBBLUETOOTH} ${LIBSDP} ${LIBUTIL} -LDADD+= -lbluetooth -lsdp -lutil +LIBADD= bluetooth sdp util .include Modified: head/usr.sbin/bluetooth/hccontrol/Makefile ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/hccontrol/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -8,7 +8,6 @@ SRCS= send_recv.c link_policy.c link_co util.c WARNS?= 2 -DPADD= ${LIBBLUETOOTH} -LDADD= -lbluetooth +LIBADD= bluetooth .include Modified: head/usr.sbin/bluetooth/hcsecd/Makefile ============================================================================== --- head/usr.sbin/bluetooth/hcsecd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/hcsecd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -7,7 +7,6 @@ SRCS= hcsecd.c lexer.l parser.y WARNS?= 2 CFLAGS+= -I${.CURDIR} -DPADD= ${LIBBLUETOOTH} -LDADD= -lbluetooth +LIBADD= bluetooth .include Modified: head/usr.sbin/bluetooth/hcseriald/Makefile ============================================================================== --- head/usr.sbin/bluetooth/hcseriald/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/hcseriald/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,7 +5,6 @@ PROG= hcseriald MAN= hcseriald.8 WARNS?= 2 -DPADD= ${LIBNETGRAPH} -LDADD= -lnetgraph +LIBADD= netgraph .include Modified: head/usr.sbin/bluetooth/l2control/Makefile ============================================================================== --- head/usr.sbin/bluetooth/l2control/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/l2control/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,7 +6,6 @@ MAN= l2control.8 SRCS= l2cap.c l2control.c WARNS?= 2 -DPADD= ${LIBBLUETOOTH} -LDADD= -lbluetooth +LIBADD= bluetooth .include Modified: head/usr.sbin/bluetooth/l2ping/Makefile ============================================================================== --- head/usr.sbin/bluetooth/l2ping/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/l2ping/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,7 +5,6 @@ PROG= l2ping MAN= l2ping.8 WARNS?= 2 -DPADD= ${LIBBLUETOOTH} -LDADD= -lbluetooth +LIBADD= bluetooth .include Modified: head/usr.sbin/bluetooth/rfcomm_pppd/Makefile ============================================================================== --- head/usr.sbin/bluetooth/rfcomm_pppd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/rfcomm_pppd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -8,7 +8,6 @@ MAN= rfcomm_pppd.8 SRCS= rfcomm_pppd.c rfcomm_sdp.c WARNS?= 2 -DPADD= ${LIBBLUETOOTH} ${LIBSDP} -LDADD= -lbluetooth -lsdp +LIBADD= bluetooth sdp .include Modified: head/usr.sbin/bluetooth/sdpcontrol/Makefile ============================================================================== --- head/usr.sbin/bluetooth/sdpcontrol/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bluetooth/sdpcontrol/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,7 +6,6 @@ MAN= sdpcontrol.8 SRCS= sdpcontrol.c search.c WARNS?= 2 -DPADD= ${LIBBLUETOOTH} ${LIBSDP} -LDADD= -lbluetooth -lsdp +LIBADD= bluetooth sdp .include Modified: head/usr.sbin/boot0cfg/Makefile ============================================================================== --- head/usr.sbin/boot0cfg/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/boot0cfg/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -3,8 +3,7 @@ PROG= boot0cfg MAN= boot0cfg.8 -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD= -lgeom -lbsdxml -lsbuf +LIBADD= geom NO_WCAST_ALIGN= Modified: head/usr.sbin/boot98cfg/Makefile ============================================================================== --- head/usr.sbin/boot98cfg/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/boot98cfg/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,7 +5,6 @@ MAN= boot98cfg.8 WARNS?= 2 -DPADD= ${LIBGEOM} -LDADD= -lgeom +LIBADD= geom .include Modified: head/usr.sbin/bsdinstall/distextract/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/distextract/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsdinstall/distextract/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,8 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= distextract -DPADD= ${LIBARCHIVE} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM} -LDADD= -larchive -lncursesw -ldialog -lm +LIBADD= archive ncursesw dialog m WARNS?= 6 MAN= Modified: head/usr.sbin/bsdinstall/distfetch/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/distfetch/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsdinstall/distfetch/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,8 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= distfetch -DPADD= ${LIBFETCH} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM} -LDADD= -lfetch -lncursesw -ldialog -lm +LIBADD= fetch ncursesw dialog m WARNS?= 6 MAN= Modified: head/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/partedit/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsdinstall/partedit/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,8 +5,7 @@ PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade -DPADD= ${LIBGEOM} ${LIBNCURSESW} ${LIBUTIL} ${LIBDIALOG} ${LIBM} -LDADD= -lgeom -lncursesw -lutil -ldialog -lm +LIBADD+= geom ncursesw util dialog m PARTEDIT_ARCH= ${MACHINE} .if ${MACHINE} == "i386" || ${MACHINE} == "amd64" Modified: head/usr.sbin/bsnmpd/bsnmpd/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/bsnmpd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsnmpd/bsnmpd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -29,8 +29,7 @@ CFLAGS+= -DSNMPTREE_TYPES CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT CFLAGS+= -DUSE_TCPWRAPPERS -DQUADFMT='"llu"' -DQUADXFMT='"llx"' CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY -DPADD= ${LIBBEGEMOT} ${LIBBSNMP} ${LIBWRAP} -LDADD= -lbegemot -lbsnmp -lwrap +LIBADD= begemot bsnmp wrap LDFLAGS= -Wl,-export-dynamic Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -29,8 +29,7 @@ CFLAGS+=-DYY_NO_UNPUT CFLAGS+=-DYY_NO_INPUT CFLAGS+= -DSNMPTREE_TYPES -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util XSYM= begemotHast DEFS= ${MOD}_tree.def Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -69,8 +69,7 @@ MAN= snmp_hostres.3 DEFS= ${MOD}_tree.def BMIBS= BEGEMOT-HOSTRES-MIB.txt -DPADD= ${LIBKVM} ${LIBDEVINFO} ${LIBM} ${LIBGEOM} ${LIBMEMSTAT} -LDADD= -lkvm -ldevinfo -lm -lgeom -lmemstat +LIBADD= kvm devinfo m geom memstat .include Modified: head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -11,7 +11,6 @@ BMIBS= BEGEMOT-NETGRAPH.txt DEFS= ${MOD}_tree.def INCS= snmp_${MOD}.h -DPADD= ${LIBNETGRAPH} -LDADD= -lnetgraph +LIBADD= netgraph .include Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -7,14 +7,11 @@ PROG= bsnmpget -DPADD+= ${LIBBSNMP} ${LIBBSNMPTOOLS} -LDADD+= -lbsnmp -lbsnmptools +LIBADD= bsnmp bsnmptools CFLAGS+= -I${.CURDIR}/../libbsnmptools -LDFLAGS+= -L${LIBBSNMPTOOLSDIR} .if ${MK_OPENSSL} != "no" -DPADD+= ${LIBCRYPTO} -LDADD+= -lcrypto +LIBADD+= crypto .endif LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk Modified: head/usr.sbin/cdcontrol/Makefile ============================================================================== --- head/usr.sbin/cdcontrol/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/cdcontrol/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,7 +2,6 @@ PROG= cdcontrol -DPADD= ${LIBEDIT} ${LIBTERMCAPW} -LDADD= -ledit -ltermcapw +LIBADD= edit .include Modified: head/usr.sbin/ckdist/Makefile ============================================================================== --- head/usr.sbin/ckdist/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ckdist/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,7 +5,6 @@ PROG= ckdist SRCS= ckdist.c crc.c -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/usr.sbin/clear_locks/Makefile ============================================================================== --- head/usr.sbin/clear_locks/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/clear_locks/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,7 +2,6 @@ PROG= clear_locks MAN= clear_locks.8 -DPADD= ${LIBRPCSVC} -LDADD= -lrpcsvc +LIBADD= rpcsvc .include Modified: head/usr.sbin/config/Makefile ============================================================================== --- head/usr.sbin/config/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/config/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -13,8 +13,7 @@ CFLAGS+= -I. -I${.CURDIR} NO_WMISSING_VARIABLE_DECLARATIONS= -DPADD= ${LIBL} ${LIBSBUF} -LDADD= -ll -lsbuf +LIBADD= l sbuf CLEANFILES+= kernconf.c Modified: head/usr.sbin/cron/cron/Makefile ============================================================================== --- head/usr.sbin/cron/cron/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/cron/cron/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,8 +6,7 @@ SRCS= cron.c database.c do_command.c job CFLAGS+= -DLOGIN_CAP -DPAM -DPADD= ${LIBCRON} ${LIBPAM} ${LIBUTIL} -LDADD= ${LIBCRON} ${MINUSLPAM} -lutil +LIBADD= cron pam util WARNS?= 2 Modified: head/usr.sbin/cron/crontab/Makefile ============================================================================== --- head/usr.sbin/cron/crontab/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/cron/crontab/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -12,7 +12,6 @@ WARNS?= 3 CFLAGS+= -I${.CURDIR}/../cron -DPADD= ${LIBCRON} ${LIBMD} ${LIBUTIL} -LDADD= ${LIBCRON} -lmd -lutil +LIBADD= cron md util .include Modified: head/usr.sbin/ctladm/Makefile ============================================================================== --- head/usr.sbin/ctladm/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ctladm/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -14,8 +14,7 @@ CFLAGS+= -I${SDIR} WARNS?= 3 .endif -DPADD= ${LIBCAM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lcam -lsbuf -lbsdxml -lutil +LIBADD= cam sbuf bsdxml util MAN= ctladm.8 .include Modified: head/usr.sbin/ctld/Makefile ============================================================================== --- head/usr.sbin/ctld/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ctld/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -10,8 +10,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -DPADD= ${LIBBSDXML} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBUTIL} -LDADD= -lbsdxml -lcrypto -ll -lsbuf -lutil +LIBADD= bsdxml crypto l sbuf util YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output Modified: head/usr.sbin/ctm/ctm/Makefile ============================================================================== --- head/usr.sbin/ctm/ctm/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ctm/ctm/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -14,8 +14,7 @@ SRCS= ctm.c ctm_input.c ctm_pass1.c ct NOTYET= ctm_ed.c -LDADD= -lmd -DPADD= ${LIBMD} +LIBADD= md WARNS?= 2 Modified: head/usr.sbin/ctm/mkCTM/Makefile ============================================================================== --- head/usr.sbin/ctm/mkCTM/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ctm/mkCTM/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -3,8 +3,7 @@ PROG= mkctm MAN= -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md test: mkctm rm -f tst.out* Modified: head/usr.sbin/daemon/Makefile ============================================================================== --- head/usr.sbin/daemon/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/daemon/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -3,7 +3,6 @@ PROG= daemon MAN= daemon.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/usr.sbin/dconschat/Makefile ============================================================================== --- head/usr.sbin/dconschat/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/dconschat/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,8 +5,7 @@ MAN= dconschat.8 CFLAGS+= -I${.CURDIR}/../../sys -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm WARNS?= 1 Modified: head/usr.sbin/devinfo/Makefile ============================================================================== --- head/usr.sbin/devinfo/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/devinfo/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -3,7 +3,6 @@ PROG= devinfo MAN= devinfo.8 -DPADD= ${LIBDEVINFO} -LDADD= -ldevinfo +LIBADD= devinfo .include Modified: head/usr.sbin/diskinfo/Makefile ============================================================================== --- head/usr.sbin/diskinfo/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/diskinfo/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -3,8 +3,7 @@ PROG= diskinfo MAN= diskinfo.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/usr.sbin/editmap/Makefile ============================================================================== --- head/usr.sbin/editmap/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/editmap/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -12,17 +12,7 @@ CFLAGS+= -DNEWDB -DNOT_SENDMAIL WARNS?= 2 -LIBSMDIR= ${.OBJDIR}/../../lib/libsm -LIBSM= ${LIBSMDIR}/libsm.a - -LIBSMDBDIR= ${.OBJDIR}/../../lib/libsmdb -LIBSMDB= ${LIBSMDBDIR}/libsmdb.a - -LIBSMUTILDIR= ${.OBJDIR}/../../lib/libsmutil -LIBSMUTIL= ${LIBSMUTILDIR}/libsmutil.a - -DPADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM} -LDADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM} +LIBADD= smdb smutil sm SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: head/usr.sbin/edquota/Makefile ============================================================================== --- head/usr.sbin/edquota/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/edquota/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -7,7 +7,6 @@ MAN= edquota.8 CSTD= gnu99 WARNS?= 4 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Modified: head/usr.sbin/fifolog/fifolog_create/Makefile ============================================================================== --- head/usr.sbin/fifolog/fifolog_create/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/fifolog/fifolog_create/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -4,8 +4,7 @@ PROG= fifolog_create CFLAGS+= -I${.CURDIR}/../lib -DPADD= ${LIBFIFOLOG} ${LIBUTIL} -LDADD= ${LIBFIFOLOG} -lutil +LIBADD= util fifolog MAN= fifolog.1 MLINKS= fifolog.1 fifolog_create.1 \ Modified: head/usr.sbin/fifolog/fifolog_reader/Makefile ============================================================================== --- head/usr.sbin/fifolog/fifolog_reader/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/fifolog/fifolog_reader/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,8 +6,7 @@ CFLAGS+= -I${.CURDIR}/../lib MAN= -DPADD= ${LIBFIFOLOG} ${LIBZ} -LDADD= ${LIBFIFOLOG} -lz +LIBADD= z fifolog regress: ./${PROG} /tmp/fifolog.0 Modified: head/usr.sbin/fifolog/fifolog_writer/Makefile ============================================================================== --- head/usr.sbin/fifolog/fifolog_writer/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/fifolog/fifolog_writer/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,8 +6,7 @@ CFLAGS+= -I${.CURDIR}/../lib MAN= -DPADD= ${LIBFIFOLOG} ${LIBZ} -LDADD= ${LIBFIFOLOG} -lz +LIBADD= z fifolog regress: date | ./${PROG} -z 0 /tmp/fifolog.0 Modified: head/usr.sbin/flowctl/Makefile ============================================================================== --- head/usr.sbin/flowctl/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/flowctl/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -8,8 +8,7 @@ PROG= flowctl MAN= flowctl.8 WARNS?= 2 -DPADD= ${LIBNETGRAPH} -LDADD= -lnetgraph +LIBADD= netgraph .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 Modified: head/usr.sbin/ftp-proxy/Makefile ============================================================================== --- head/usr.sbin/ftp-proxy/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ftp-proxy/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -9,8 +9,7 @@ SRCS= ftp-proxy.c filter.c CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent -LDADD+= ${LIBEVENT} -DPADD+= ${LIBEVENT} +LIBADD= event WARNS?= 3 Modified: head/usr.sbin/gssd/Makefile ============================================================================== --- head/usr.sbin/gssd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/gssd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -9,11 +9,9 @@ SRCS= gssd.c gssd.h gssd_svc.c gssd_xdr. CFLAGS+= -I. WARNS?= 1 -DPADD= ${LIBGSSAPI} -LDADD= -lgssapi +LIBADD= gssapi .if ${MK_KERBEROS_SUPPORT} != "no" -DPADD+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} -LDADD+= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto +LIBADD+= krb5 roken .else CFLAGS+= -DWITHOUT_KERBEROS .endif Modified: head/usr.sbin/gstat/Makefile ============================================================================== --- head/usr.sbin/gstat/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/gstat/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,7 +2,6 @@ PROG= gstat MAN= gstat.8 -DPADD= ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBEDIT} ${LIBNCURSESW} -LDADD= -ldevstat -lkvm -lgeom -lbsdxml -lsbuf -ledit -lncursesw +LIBADD= devstat geom edit ncursesw .include Modified: head/usr.sbin/ifmcstat/Makefile ============================================================================== --- head/usr.sbin/ifmcstat/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ifmcstat/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -17,8 +17,7 @@ CFLAGS+=-DINET6 .if ${MK_KVM_SUPPORT} != "no" CFLAGS+=-DWITH_KVM -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm .endif .include Modified: head/usr.sbin/inetd/Makefile ============================================================================== --- head/usr.sbin/inetd/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/inetd/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -16,14 +16,12 @@ CFLAGS+= -DLOGIN_CAP CFLAGS+= -DINET6 .endif -DPADD= ${LIBUTIL} ${LIBWRAP} -LDADD= -lutil -lwrap +LIBADD= util wrap # XXX for src/release/picobsd .if !defined(RELEASE_CRUNCH) CFLAGS+= -DIPSEC -DPADD+= ${LIBIPSEC} -LDADD+= -lipsec +LIBADD+= ipsec .endif .include Modified: head/usr.sbin/iostat/Makefile ============================================================================== --- head/usr.sbin/iostat/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/iostat/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -4,8 +4,7 @@ PROG= iostat MAN= iostat.8 -DPADD= ${LIBDEVSTAT} ${LIBKVM} ${LIBM} -LDADD= -ldevstat -lkvm -lm +LIBADD= devstat kvm m WARNS?= 1 Modified: head/usr.sbin/ipfwpcap/Makefile ============================================================================== --- head/usr.sbin/ipfwpcap/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/ipfwpcap/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,8 +6,7 @@ PROG= ipfwpcap -LDADD= -lpcap -DPADD= ${LIBPCAP} +LIBADD= pcap MAN= ipfwpcap.8 Modified: head/usr.sbin/iscsid/Makefile ============================================================================== --- head/usr.sbin/iscsid/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/iscsid/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -8,8 +8,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= iscsid.8 -DPADD= ${LIBCRYPTO} ${LIBUTIL} -LDADD= -lcrypto -lutil +LIBADD= crypto util WARNS= 6 Modified: head/usr.sbin/jail/Makefile ============================================================================== --- head/usr.sbin/jail/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/jail/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,8 +6,7 @@ PROG= jail MAN= jail.8 jail.conf.5 SRCS= jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h -DPADD= ${LIBJAIL} ${LIBKVM} ${LIBUTIL} ${LIBL} -LDADD= -ljail -lkvm -lutil -ll +LIBADD= jail kvm util l NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.sbin/jexec/Makefile ============================================================================== --- head/usr.sbin/jexec/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/jexec/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -2,7 +2,6 @@ PROG= jexec MAN= jexec.8 -DPADD= ${LIBJAIL} ${LIBUTIL} -LDADD= -ljail -lutil +LIBADD= jail util .include Modified: head/usr.sbin/jls/Makefile ============================================================================== --- head/usr.sbin/jls/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/jls/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -4,8 +4,7 @@ PROG= jls MAN= jls.8 -DPADD= ${LIBJAIL} -LDADD= -ljail +LIBADD= jail .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 Modified: head/usr.sbin/kbdcontrol/Makefile ============================================================================== --- head/usr.sbin/kbdcontrol/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/kbdcontrol/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -8,7 +8,6 @@ SRCS= kbdcontrol.c lex.l WARNS?= 4 CFLAGS+= -I${.CURDIR} -DPADD= ${LIBL} -LDADD= -ll +LIBADD= l .include Modified: head/usr.sbin/keyserv/Makefile ============================================================================== --- head/usr.sbin/keyserv/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/keyserv/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -6,8 +6,7 @@ SRCS= keyserv.c setkey.c crypt_svc.c cry CFLAGS+= -DKEYSERV_RANDOM -DBROKEN_DES -I. -DPADD= ${LIBMP} ${LIBCRYPTO} ${LIBRPCSVC} -LDADD= -lmp -lcrypto -lrpcsvc +LIBADD= mp rpcsvc WARNS?= 1 Modified: head/usr.sbin/kgmon/Makefile ============================================================================== --- head/usr.sbin/kgmon/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/kgmon/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -11,7 +11,6 @@ WARNS?= 2 #BINOWN=root #BINMODE=4555 -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm .include Modified: head/usr.sbin/lmcconfig/Makefile ============================================================================== --- head/usr.sbin/lmcconfig/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/lmcconfig/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -3,8 +3,7 @@ PROG= lmcconfig MAN= lmcconfig.8 -DPADD= ${LIBNETGRAPH} -LDADD= -lnetgraph +LIBADD= netgraph WARNS?= 3 Modified: head/usr.sbin/lpr/Makefile.inc ============================================================================== --- head/usr.sbin/lpr/Makefile.inc Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/lpr/Makefile.inc Tue Nov 25 16:57:27 2014 (r275054) @@ -6,6 +6,4 @@ CFLAGS+= -DINET6 .endif -LIBLPR= ${.OBJDIR}/../common_source/liblpr.a - .include "../Makefile.inc" Modified: head/usr.sbin/lpr/chkprintcap/Makefile ============================================================================== --- head/usr.sbin/lpr/chkprintcap/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/lpr/chkprintcap/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -8,7 +8,6 @@ SRCS= chkprintcap.c skimprintcap.c CFLAGS+= -I${.CURDIR}/../common_source -DPADD= ${LIBLPR} -LDADD= ${LIBLPR} +LIBADD= lpr .include Modified: head/usr.sbin/lpr/lpc/Makefile ============================================================================== --- head/usr.sbin/lpr/lpc/Makefile Tue Nov 25 16:53:22 2014 (r275053) +++ head/usr.sbin/lpr/lpc/Makefile Tue Nov 25 16:57:27 2014 (r275054) @@ -5,7 +5,7 @@ PROG= lpc MAN= lpc.8 -SRCS= lpc.c cmds.c cmdtab.c movejobs.c +SRCS= lpc.c cmds.c cmdtab.c movejobs.c BINGRP= daemon BINMODE= 2555 @@ -13,7 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common_source WARNS?= 0 -DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAPW} -LDADD= ${LIBLPR} -ledit -ltermcapw *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 17:33:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90404737; Tue, 25 Nov 2014 17:33:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71F8FBE9; Tue, 25 Nov 2014 17:33:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPHXNsI081857; Tue, 25 Nov 2014 17:33:23 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPHXN9s081855; Tue, 25 Nov 2014 17:33:23 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201411251733.sAPHXN9s081855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 25 Nov 2014 17:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275057 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 17:33:23 -0000 Author: sbruno Date: Tue Nov 25 17:33:22 2014 New Revision: 275057 URL: https://svnweb.freebsd.org/changeset/base/275057 Log: Add support for Buffalo WZR-HP-AG300H atheros MIPS router. Special thanks to Nicholas Esborn for the loaner router to get this target bootstrapped. Review: D777 Reviewed by: adrian Sponsored by: Nicholas Esborn Added: head/sys/mips/conf/WZR-HPAG300H (contents, props changed) head/sys/mips/conf/WZR-HPAG300H.hints (contents, props changed) Added: head/sys/mips/conf/WZR-HPAG300H ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/WZR-HPAG300H Tue Nov 25 17:33:22 2014 (r275057) @@ -0,0 +1,49 @@ +# +# Specific board setup for the Buffalo Airstation WZR-HPAG300H +# +# The WZR-HPAG300H has the following hardware: +# +# + AR7161 CPU SoC +# + 2x AR9280 5GHz 11n +# + AR8136 Gigabit switch +# + 2 m25ll128(really w25q128) based 16MB flash +# + 128MB RAM +# + uboot environment + +# $FreeBSD$ + +include "AR71XX_BASE" +ident "WZR-HPAG300H" +hints "WZR-HPAG300H.hints" + +options AR71XX_REALMEM=128*1024*1024 + +options AR71XX_ENV_UBOOT + +options BOOTVERBOSE + +# GEOM modules +device geom_uncompress # compressed in-memory filesystem hackery! +device geom_map # to get access to the SPI flash partitions + +options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" + +options AR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash +options ATH_EEPROM_FIRMWARE # Use EEPROM from flash +device firmware # Used by the above + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# hwpmc +device hwpmc_mips24k +device hwpmc + +# load these via modules, shrink kernel +nodevice if_bridge +nodevice bridgestp +nodevice random Added: head/sys/mips/conf/WZR-HPAG300H.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/WZR-HPAG300H.hints Tue Nov 25 17:33:22 2014 (r275057) @@ -0,0 +1,132 @@ +# $FreeBSD$ + +# arge0 is connected to the LAN side of the switch PHY. +# arge1 is connected to the single port WAN side of the switch PHY. + +# arge1 MDIO bus +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +hint.arge.0.phymask=0x0 +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 +hint.arge.0.eeprommac=0x1f05120c +hint.arge.0.mdio=mdioproxy0 # .. off of the switch mdiobus +hint.arge.0.miimode=3 + +hint.arge.1.phymask=0x10 +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 +hint.arge.1.eeprommac=0x1f05520c +hint.arge.1.mdio=mdioproxy0 # .. off of the switch mdiobus +hint.arge.1.miimode=3 +# +# AR7240 switch config +# +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=0 # We need to be explicitly told this +hint.arswitch.0.numphys=4 # 5 active switch PHYs (PHY 0 -> 4) +hint.arswitch.0.phy4cpu=0 # No, PHY 4 == dedicated PHY +hint.arswitch.0.is_rgmii=1 # Yes, is RGMII +hint.arswitch.0.is_gmii=0 # No, not GMII + +# ath0 - slot 17 +hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1f051000 +hint.pcib.0.bus.0.17.0.ath_fixup_size=4096 + +# ath1 - slot 18 +hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1f055000 +hint.pcib.0.bus.0.18.0.ath_fixup_size=4096 +# .. and now, telling each ath(4) NIC where to find the firmware +# image. +hint.ath.0.eeprom_firmware="pcib.0.bus.0.17.0.eeprom_firmware" +hint.ath.1.eeprom_firmware="pcib.0.bus.0.18.0.eeprom_firmware" + +# Inherited from AR71XX_BASE.hints +#hint.mx25l.0.at="spibus0" +#hint.mx25l.0.cs=0 +# This board has two 16 MB flash devices on difference Chip Select pins +hint.mx25l.1.at="spibus0" +hint.mx25l.1.cs=1 + + +# Geom MAP + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00040000 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end=0x00050000 +hint.map.1.name="u-boot-env" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00050000 +hint.map.2.end=0x00060000 +hint.map.2.name="ART" +hint.map.2.readonly=1 + +# requires a 1M alignment and padding in the image. +# make sure you are using conv=sync and bs=1M in your dd +hint.map.3.at="flash/spi0" +hint.map.3.start=0x00060000 +hint.map.3.end="search:0x00160000:0x100000:.!/bin/sh" +hint.map.3.name="kernel" +hint.map.3.readonly=1 + +hint.map.4.at="flash/spi0" +hint.map.4.start="search:0x00160000:0x100000:.!/bin/sh" +hint.map.4.end=0x01000000 +hint.map.4.name="rootfs" +hint.map.4.readonly=1 + +hint.map.5.at="flash/spi1" +hint.map.5.start=0x00FF0000 +hint.map.5.end=0x01000000 +hint.map.5.name="cfg" +hint.map.5.readonly=0 + +# Pin 1 - SCK +# Pin 2 - SDA +# Pin 3 - usb +# Pin 4 - +# Pin 5 - aoss +# Pin 6 - router auto +# Pin 7 - router off +# Pin 8 - movie engine +# Pin 9 - +# Pin 10 - +# Pin 11 - reset button +# Pin 12 - CS0 +# Pin 13 - CS1 +# Pin 14 - +# Pin 15 - +# Pin 16 - +# Pin 17 - + +# Don't flip on anything that isn't already enabled. +# Force on CS lines for flash devices, apparently this isn't done +# by uboot in normal booting. No idea why. +hint.gpio.0.function_set=0x00003004 +hint.gpio.0.function_clear=0x00000000 + +# These are the GPIO LEDs and buttons which can be software controlled. +hint.gpio.0.pinmask=0x0001 + +hint.gpio.0.pinon=0x00000004 + +hint.gpioiic.0.at="gpiobus0" +#hint.gpioiic.0.pins=0x0003 +hint.gpioiic.0.sda=0 +hint.gpioiic.0.scl=1 + +# LEDs are configured separately and driven by the LED device +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="red-diag" +hint.gpioled.0.pins=0x0001 From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 17:41:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BA459DE; Tue, 25 Nov 2014 17:41:17 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EC88CC6; Tue, 25 Nov 2014 17:41:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XtK4N-000FqW-14; Tue, 25 Nov 2014 17:38:31 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Tue, 25 Nov 2014 17:38:31 +0000 (GMT) Date: Tue, 25 Nov 2014 17:38:30 +0000 From: Ruslan Bukin To: Gleb Smirnoff Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141125173830.GA60905@bsdpad.com> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> <20141125122754.GA57252@bsdpad.com> <20141125152922.GX47144@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141125152922.GX47144@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 17:41:17 -0000 On Tue, Nov 25, 2014 at 06:29:22PM +0300, Gleb Smirnoff wrote: > R> Un-unioning helps partially: I receive much less panics and able to boot until login prompt in ~ 1/3 attempts with patch attached. > > What happens then? Same panic as w/o patch? > Same random panics: [..] Starting file system checks: /dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% fragmentation) MAP: No valid partition found at vtbd0 MAP: No valid partition found at md0 MAP: No valid partition found at md0 panic: vm_page_insert_after: msucc doesn't succeed pindex KDB: enter: panic [ thread pid 53 tid 100030 ] Stopped at kdb_enter+0x8c: lui at,0x0 db> bt Tracing pid 53 tid 100030 td 0x9800000000b8f000 db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056d90f0 sz 16 ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056d9100 sz 48 ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056d9130 sz 192 db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056d91f0 sz 16 ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff80282338 sp c0000000056d9200 sz 816 kdb_trap+188 (?,?,?,?) ra ffffffff804b10a4 sp c0000000056d9530 sz 64 trap+1114 (?,?,?,?) ra ffffffff8049c63c sp c0000000056d9570 sz 288 MipsKernGenException+154 (0,4,804f60d0,12f) ra ffffffff80281ed4 sp c0000000056d9690 sz 368 kdb_enter+8c (?,?,?,?) ra ffffffff80234398 sp c0000000056d9800 sz 16 ffffffff802341e8+1b0 (?,?,?,?) ra ffffffff802344c8 sp c0000000056d9810 sz 32 kassert_panic+c8 (?,4,b82c00,3d7) ra ffffffff8047c580 sp c0000000056d9830 sz 96 ffffffff8047c460+120 (?,?,?,?) ra ffffffff8047ff28 sp c0000000056d9890 sz 64 vm_page_alloc+7f8 (?,?,?,?) ra ffffffff80464524 sp c0000000056d98d0 sz 80 ffffffff80463a00+b24 (?,?,?,?) ra 0 sp c0000000056d9920 sz 272 pid 53 Starting file system checks: /dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% fragmentation) MAP: No valid partition found at vtbd0 MAP: No valid partition found at md0 MAP: No valid partition found at md0 panic: Bad link elm 0x9800000000bb3000 prev->next != elm KDB: enter: panic [ thread pid 44 tid 100030 ] Stopped at kdb_enter+0x8c: lui at,0x0 db> bt Tracing pid 44 tid 100030 td 0x9800000000b8f000 db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056d8ea0 sz 16 ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056d8eb0 sz 48 ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056d8ee0 sz 192 db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056d8fa0 sz 16 ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff80282338 sp c0000000056d8fb0 sz 816 kdb_trap+188 (?,?,?,?) ra ffffffff804b10a4 sp c0000000056d92e0 sz 64 trap+1114 (?,?,?,?) ra ffffffff8049c63c sp c0000000056d9320 sz 288 MipsKernGenException+154 (0,4,804f60d0,12f) ra ffffffff80281ed4 sp c0000000056d9440 sz 368 kdb_enter+8c (?,?,?,?) ra ffffffff80234398 sp c0000000056d95b0 sz 16 ffffffff802341e8+1b0 (?,?,?,?) ra ffffffff80234400 sp c0000000056d95c0 sz 32 panic+30 (?,bb3000,8051f738,8051f738) ra ffffffff804790c8 sp c0000000056d95e0 sz 96 vm_object_deallocate+960 (?,?,?,?) ra ffffffff8046b184 sp c0000000056d9640 sz 96 ffffffff8046b158+2c (?,?,?,?) ra ffffffff8046b2a4 sp c0000000056d96a0 sz 32 ffffffff8046b1e8+bc (?,?,?,?) ra ffffffff8046b308 sp c0000000056d96c0 sz 32 _vm_map_unlock+40 (?,?,?,?) ra ffffffff8046d990 sp c0000000056d96e0 sz 16 vm_map_remove+98 (?,?,?,?) ra ffffffff801eb2e4 sp c0000000056d96f0 sz 32 exec_new_vmspace+274 (?,?,?,?) ra ffffffff801c4ea0 sp c0000000056d9710 sz 80 ffffffff801c4828+678 (?,?,?,?) ra ffffffff801eb81c sp c0000000056d9760 sz 304 kern_execve+404 (?,?,?,?) ra ffffffff801ec6b4 sp c0000000056d9890 sz 784 sys_execve+44 (?,?,?,?) ra ffffffff804b0a88 sp c0000000056d9ba0 sz 80 trap+af8 (?,?,?,?) ra ffffffff8049c880 sp c0000000056d9bf0 sz 288 MipsUserGenException+13c (?,?,?,600e30b4) ra 0 sp c0000000056d9d10 sz 0 pid 44 db> Ruslan From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 17:53:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14D2AC77; Tue, 25 Nov 2014 17:53:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00B4EDEA; Tue, 25 Nov 2014 17:53:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPHrbXb091534; Tue, 25 Nov 2014 17:53:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPHralv091526; Tue, 25 Nov 2014 17:53:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411251753.sAPHralv091526@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 25 Nov 2014 17:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275058 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 17:53:38 -0000 Author: mav Date: Tue Nov 25 17:53:35 2014 New Revision: 275058 URL: https://svnweb.freebsd.org/changeset/base/275058 Log: Coalesce last data move and command status for read commands. Make CTL core and block backend set success status before initiating last data move for read commands. Make CAM target and iSCSI frontends detect such condition and send command status together with data. New I/O flag allows to skip duplicate status sending on later fe_done() call. For Fibre Channel this change saves one of three interrupts per read command, increasing performance from 126K to 160K IOPS. For iSCSI this change saves one of three PDUs per read command, increasing performance from 1M to 1.2M IOPS. MFC after: 1 month Sponsored by: iXsystems, Inc. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_tpc.c head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/ctl.c Tue Nov 25 17:53:35 2014 (r275058) @@ -4996,23 +4996,13 @@ ctl_config_move_done(union ctl_io *io) { int retval; - retval = CTL_RETVAL_COMPLETE; - - CTL_DEBUG_PRINT(("ctl_config_move_done\n")); - /* - * XXX KDM this shouldn't happen, but what if it does? - */ - if (io->io_hdr.io_type != CTL_IO_SCSI) - panic("I/O type isn't CTL_IO_SCSI!"); + KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, + ("Config I/O type isn't CTL_IO_SCSI (%d)!", io->io_hdr.io_type)); - if ((io->io_hdr.port_status == 0) - && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) - io->io_hdr.status = CTL_SUCCESS; - else if ((io->io_hdr.port_status != 0) - && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){ + if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { /* * For hardware error sense keys, the sense key * specific value is defined to be a retry count, @@ -5025,15 +5015,12 @@ ctl_config_move_done(union ctl_io *io) /*sks_valid*/ 1, /*retry_count*/ io->io_hdr.port_status); - if (io->io_hdr.flags & CTL_FLAG_ALLOCATED) - free(io->scsiio.kern_data_ptr, M_CTL); - ctl_done(io); - goto bailout; } - if (((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) - || ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) - || ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0)) { + if (((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) || + ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) || + ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0)) { /* * XXX KDM just assuming a single pointer here, and not a * S/G list. If we start using S/G lists for config data, @@ -5041,8 +5028,8 @@ ctl_config_move_done(union ctl_io *io) */ if (io->io_hdr.flags & CTL_FLAG_ALLOCATED) free(io->scsiio.kern_data_ptr, M_CTL); - /* Hopefully the user has already set the status... */ ctl_done(io); + retval = CTL_RETVAL_COMPLETE; } else { /* * XXX KDM now we need to continue data movement. Some @@ -5065,7 +5052,6 @@ ctl_config_move_done(union ctl_io *io) */ retval = ctl_scsiio(&io->scsiio); } -bailout: return (retval); } @@ -5211,13 +5197,12 @@ ctl_scsi_release(struct ctl_scsiio *ctsi mtx_unlock(&lun->lun_lock); - ctl_set_success(ctsio); - if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { free(ctsio->kern_data_ptr, M_CTL); ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED; } + ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -5681,9 +5666,9 @@ ctl_read_buffer(struct ctl_scsiio *ctsio ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctl_set_success(ctsio); ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -5746,8 +5731,8 @@ ctl_write_buffer(struct ctl_scsiio *ctsi return (CTL_RETVAL_COMPLETE); } + ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -6870,12 +6855,10 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) } } - ctsio->scsi_status = SCSI_STATUS_OK; - + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -7025,11 +7008,10 @@ ctl_log_sense(struct ctl_scsiio *ctsio) memcpy(header + 1, page_index->page_data, page_index->page_len); - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -7084,12 +7066,10 @@ ctl_read_capacity(struct ctl_scsiio *cts */ scsi_ulto4b(lun->be_lun->blocksize, data->length); - ctsio->scsi_status = SCSI_STATUS_OK; - + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -7147,12 +7127,10 @@ ctl_read_capacity_16(struct ctl_scsiio * if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) data->lalba_lbp[0] |= SRC16_LBPME | SRC16_LBPRZ; - ctsio->scsi_status = SCSI_STATUS_OK; - + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -7212,7 +7190,7 @@ ctl_read_defect(struct ctl_scsiio *ctsio scsi_ulto4b(0, data12->length); } - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -7355,15 +7333,9 @@ ctl_report_tagret_port_groups(struct ctl } mtx_unlock(&softc->ctl_lock); + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - - CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n", - ctsio->kern_data_ptr[0], ctsio->kern_data_ptr[1], - ctsio->kern_data_ptr[2], ctsio->kern_data_ptr[3], - ctsio->kern_data_ptr[4], ctsio->kern_data_ptr[5], - ctsio->kern_data_ptr[6], ctsio->kern_data_ptr[7])); - ctl_datamove((union ctl_io *)ctsio); return(retval); } @@ -7527,9 +7499,9 @@ fill_one: break; } + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return(retval); } @@ -7571,9 +7543,9 @@ ctl_report_supported_tmf(struct ctl_scsi data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_TRS; data->byte2 |= RST_ITNRS; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -7621,9 +7593,9 @@ ctl_report_timestamp(struct ctl_scsiio * scsi_ulto4b(timestamp >> 16, data->timestamp); scsi_ulto2b(timestamp & 0xffff, &data->timestamp[4]); + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -7888,17 +7860,10 @@ retry: } mtx_unlock(&lun->lun_lock); + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - - CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n", - ctsio->kern_data_ptr[0], ctsio->kern_data_ptr[1], - ctsio->kern_data_ptr[2], ctsio->kern_data_ptr[3], - ctsio->kern_data_ptr[4], ctsio->kern_data_ptr[5], - ctsio->kern_data_ptr[6], ctsio->kern_data_ptr[7])); - ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9427,12 +9392,10 @@ ctl_report_luns(struct ctl_scsiio *ctsio * We can only return SCSI_STATUS_CHECK_COND when we can't satisfy * this request. */ - ctsio->scsi_status = SCSI_STATUS_OK; - + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (retval); } @@ -9546,19 +9509,14 @@ ctl_request_sense(struct ctl_scsiio *cts /* * We report the SCSI status as OK, since the status of the * request sense command itself is OK. - */ - ctsio->scsi_status = SCSI_STATUS_OK; - - /* * We report 0 for the sense length, because we aren't doing * autosense in this case. We're reporting sense as * parameter data. */ - ctsio->sense_len = 0; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9577,17 +9535,14 @@ no_sense: /*ascq*/ 0x00, SSD_ELEM_NONE); - ctsio->scsi_status = SCSI_STATUS_OK; - /* * We report 0 for the sense length, because we aren't doing * autosense in this case. We're reporting sense as parameter data. */ - ctsio->sense_len = 0; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9672,12 +9627,10 @@ ctl_inquiry_evpd_supported(struct ctl_sc /* Logical Block Provisioning */ pages->page_list[9] = SVPD_LBP; - ctsio->scsi_status = SCSI_STATUS_OK; - + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9728,12 +9681,11 @@ ctl_inquiry_evpd_serial(struct ctl_scsii (char *)lun->be_lun->serial_num, CTL_SN_LEN); } else memset(sn_ptr->serial_num, 0x20, CTL_SN_LEN); - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9779,11 +9731,10 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * eid_ptr->flags2 = SVPD_EID_HEADSUP | SVPD_EID_ORDSUP | SVPD_EID_SIMPSUP; eid_ptr->flags3 = SVPD_EID_V_SUP; - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9831,11 +9782,10 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * mpp_ptr->descr[0].subpage_code = 0xff; mpp_ptr->descr[0].policy = SVPD_MPP_SHARED; - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -9953,11 +9903,10 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio memcpy(desc, port->target_devid->data, port->target_devid->len); } - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -10068,11 +10017,10 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s } mtx_unlock(&softc->ctl_lock); - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -10137,11 +10085,10 @@ ctl_inquiry_evpd_block_limits(struct ctl } scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length); - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -10198,11 +10145,10 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * bdc_ptr->wab_wac_ff = (i & 0x0f); bdc_ptr->flags = SVPD_FUAB | SVPD_VBULS; - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -10251,11 +10197,10 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * lbp_ptr->prov_type = SVPD_LBP_THIN; } - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); } @@ -10555,7 +10500,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio } } - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -13526,8 +13471,9 @@ ctl_process_done(union ctl_io *io) * Check to see if we have any errors to inject here. We only * inject errors for commands that don't already have errors set. */ - if ((STAILQ_FIRST(&lun->error_list) != NULL) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) + if ((STAILQ_FIRST(&lun->error_list) != NULL) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) && + ((io->io_hdr.flags & CTL_FLAG_STATUS_SENT) == 0)) ctl_inject_error(lun, io); /* Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Nov 25 17:53:35 2014 (r275058) @@ -381,8 +381,9 @@ ctl_be_block_move_done(union ctl_io *io) * We set status at this point for read commands, and write * commands with errors. */ - if ((io->io_hdr.port_status == 0) && - ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && + if (io->io_hdr.flags & CTL_FLAG_ABORT) { + ; + } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { lbalen = ARGS(beio->io); if (lbalen->flags & CTL_LLF_READ) { @@ -405,10 +406,9 @@ ctl_be_block_move_done(union ctl_io *io) else ctl_set_success(&io->scsiio); } - } - else if ((io->io_hdr.port_status != 0) - && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { + } else if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { /* * For hardware error sense keys, the sense key * specific value is defined to be a retry count, @@ -532,6 +532,9 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else { + if ((ARGS(io)->flags & CTL_LLF_READ) && + beio->beio_cont == NULL) + ctl_set_success(&io->scsiio); #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -739,6 +742,9 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else { + if ((ARGS(io)->flags & CTL_LLF_READ) && + beio->beio_cont == NULL) + ctl_set_success(&io->scsiio); #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -828,6 +834,9 @@ ctl_be_block_dispatch_zvol(struct ctl_be ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else { + if ((ARGS(io)->flags & CTL_LLF_READ) && + beio->beio_cont == NULL) + ctl_set_success(&io->scsiio); #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Nov 25 17:53:35 2014 (r275058) @@ -238,9 +238,10 @@ ctl_backend_ramdisk_move_done(union ctl_ if (io->scsiio.kern_sg_entries > 0) free(io->scsiio.kern_data_ptr, M_RAMDISK); io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; - if ((io->io_hdr.port_status == 0) - && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { + if (io->io_hdr.flags & CTL_FLAG_ABORT) { + ; + } else if ((io->io_hdr.port_status == 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { mtx_lock(&be_lun->queue_lock); STAILQ_INSERT_TAIL(&be_lun->cont_queue, @@ -251,9 +252,9 @@ ctl_backend_ramdisk_move_done(union ctl_ return (0); } ctl_set_success(&io->scsiio); - } else if ((io->io_hdr.port_status != 0) - && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) - && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){ + } else if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { /* * For hardware error sense keys, the sense key * specific value is defined to be a retry count, Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Nov 25 17:53:35 2014 (r275058) @@ -367,14 +367,16 @@ cfiscsi_pdu_prepare(struct icl_pdu *resp * See the comment below - StatSN is not meaningful and must * not be advanced. */ - if (bhssr->bhssr_opcode == ISCSI_BHS_OPCODE_SCSI_DATA_IN) + if (bhssr->bhssr_opcode == ISCSI_BHS_OPCODE_SCSI_DATA_IN && + (bhssr->bhssr_flags & BHSDI_FLAGS_S) == 0) advance_statsn = false; /* * 10.7.3: "The fields StatSN, Status, and Residual Count * only have meaningful content if the S bit is set to 1." */ - if (bhssr->bhssr_opcode != ISCSI_BHS_OPCODE_SCSI_DATA_IN) + if (bhssr->bhssr_opcode != ISCSI_BHS_OPCODE_SCSI_DATA_IN || + (bhssr->bhssr_flags & BHSDI_FLAGS_S)) bhssr->bhssr_statsn = htonl(cs->cs_statsn); bhssr->bhssr_expcmdsn = htonl(cs->cs_cmdsn); bhssr->bhssr_maxcmdsn = htonl(cs->cs_cmdsn + maxcmdsn_delta); @@ -2548,8 +2550,10 @@ cfiscsi_datamove_in(union ctl_io *io) */ buffer_offset += response->ip_data_len; if (buffer_offset == io->scsiio.kern_total_len || - buffer_offset == expected_len) - bhsdi->bhsdi_flags |= BHSDI_FLAGS_F; + buffer_offset == expected_len) { + buffer_offset -= response->ip_data_len; + break; + } cfiscsi_pdu_queue(response); response = NULL; bhsdi = NULL; @@ -2558,8 +2562,27 @@ cfiscsi_datamove_in(union ctl_io *io) if (response != NULL) { buffer_offset += response->ip_data_len; if (buffer_offset == io->scsiio.kern_total_len || - buffer_offset == expected_len) + buffer_offset == expected_len) { bhsdi->bhsdi_flags |= BHSDI_FLAGS_F; + if (io->io_hdr.status == CTL_SUCCESS) { + bhsdi->bhsdi_flags |= BHSDI_FLAGS_S; + if (PDU_TOTAL_TRANSFER_LEN(request) < + ntohl(bhssc->bhssc_expected_data_transfer_length)) { + bhsdi->bhsdi_flags |= BHSSR_FLAGS_RESIDUAL_UNDERFLOW; + bhsdi->bhsdi_residual_count = + htonl(ntohl(bhssc->bhssc_expected_data_transfer_length) - + PDU_TOTAL_TRANSFER_LEN(request)); + } else if (PDU_TOTAL_TRANSFER_LEN(request) > + ntohl(bhssc->bhssc_expected_data_transfer_length)) { + bhsdi->bhsdi_flags |= BHSSR_FLAGS_RESIDUAL_OVERFLOW; + bhsdi->bhsdi_residual_count = + htonl(PDU_TOTAL_TRANSFER_LEN(request) - + ntohl(bhssc->bhssc_expected_data_transfer_length)); + } + bhsdi->bhsdi_status = io->scsiio.scsi_status; + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + } + } KASSERT(response->ip_data_len > 0, ("sending empty Data-In")); cfiscsi_pdu_queue(response); } @@ -2765,8 +2788,9 @@ cfiscsi_scsi_command_done(union ctl_io * * Do not return status for aborted commands. * There are exceptions, but none supported by CTL yet. */ - if ((io->io_hdr.flags & CTL_FLAG_ABORT) && - (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { + if (((io->io_hdr.flags & CTL_FLAG_ABORT) && + (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) || + (io->io_hdr.flags & CTL_FLAG_STATUS_SENT)) { ctl_free_io(io); icl_pdu_free(request); return; Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/ctl_io.h Tue Nov 25 17:53:35 2014 (r275058) @@ -124,9 +124,10 @@ typedef enum { CTL_FLAG_FAILOVER = 0x04000000, /* Killed by a failover */ CTL_FLAG_IO_ACTIVE = 0x08000000, /* I/O active on this SC */ CTL_FLAG_RDMA_MASK = CTL_FLAG_NO_DATASYNC | CTL_FLAG_BUS_ADDR | - CTL_FLAG_AUTO_MIRROR | CTL_FLAG_REDIR_DONE + CTL_FLAG_AUTO_MIRROR | CTL_FLAG_REDIR_DONE, /* Flags we care about for remote DMA */ + CTL_FLAG_STATUS_SENT = 0x10000000 /* Status sent by datamove */ } ctl_io_flags; Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/ctl_tpc.c Tue Nov 25 17:53:35 2014 (r275058) @@ -425,7 +425,7 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * gco_ptr->data_segment_granularity = 0; gco_ptr->inline_data_granularity = 0; - ctsio->scsi_status = SCSI_STATUS_OK; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; ctl_datamove((union ctl_io *)ctsio); @@ -487,9 +487,9 @@ ctl_receive_copy_operating_parameters(st data->list_of_implemented_descriptor_type_codes[2] = EC_SEG_REGISTER_KEY; data->list_of_implemented_descriptor_type_codes[3] = EC_CSCD_ID; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -584,9 +584,9 @@ ctl_receive_copy_status_lid1(struct ctl_ scsi_ulto4b(list_copy.curbytes >> 20, data->transfer_count); } + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -656,9 +656,9 @@ ctl_receive_copy_failure_details(struct scsi_ulto2b(list_copy.sense_len, data->sense_data_length); memcpy(data->sense_data, &list_copy.sense_data, list_copy.sense_len); + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -742,9 +742,9 @@ ctl_receive_copy_status_lid4(struct ctl_ data->sense_data_length = list_copy.sense_len; memcpy(data->sense_data, &list_copy.sense_data, list_copy.sense_len); + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -1482,8 +1482,6 @@ tpc_done(union ctl_io *io) * more sophisticated initiator type behavior, the CAM error * recovery code in ../common might be helpful. */ -// if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) -// ctl_io_error_print(io, NULL); tio = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) && (io->io_hdr.retries > 0)) { @@ -2168,9 +2166,9 @@ ctl_receive_rod_token_information(struct printf("RRTI(list=%u) valid=%d\n", scsi_4btoul(cdb->list_identifier), list_copy.res_token_valid); */ + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } @@ -2234,9 +2232,9 @@ ctl_report_all_rod_tokens(struct ctl_scs /* printf("RART tokens=%d\n", i); */ + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); return (retval); } Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Nov 25 17:33:22 2014 (r275057) +++ head/sys/cam/ctl/scsi_ctl.c Tue Nov 25 17:53:35 2014 (r275058) @@ -792,14 +792,15 @@ ctlfestart(struct cam_periph *periph, un flags = atio->ccb_h.flags & (CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK); + cmd_info = (struct ctlfe_lun_cmd_info *)io->io_hdr.port_priv; + cmd_info->cur_transfer_index = 0; + cmd_info->cur_transfer_off = 0; + cmd_info->flags = 0; if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) { /* * Datamove call, we need to setup the S/G list. */ - cmd_info = (struct ctlfe_lun_cmd_info *) - io->io_hdr.port_priv; - bzero(cmd_info, sizeof(*cmd_info)); scsi_status = 0; csio->cdb_len = atio->cdb_len; ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, @@ -880,17 +881,23 @@ ctlfestart(struct cam_periph *periph, un xpt_schedule(periph, /*priority*/ 1); return; } - + data_ptr = NULL; + dxfer_len = 0; + csio->sglist_cnt = 0; + scsi_status = 0; + } + if ((io->io_hdr.flags & CTL_FLAG_STATUS_QUEUED) && + (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && + ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || + io->io_hdr.status == CTL_SUCCESS)) { + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; flags |= CAM_SEND_STATUS; scsi_status = io->scsiio.scsi_status; csio->sense_len = io->scsiio.sense_len; - data_ptr = NULL; - dxfer_len = 0; #ifdef CTLFEDEBUG printf("%s: tag %04x status %x\n", __func__, atio->tag_id, io->io_hdr.status); #endif - csio->sglist_cnt = 0; if (csio->sense_len != 0) { csio->sense_data = io->scsiio.sense_data; flags |= CAM_SEND_SENSE; @@ -2042,6 +2049,19 @@ ctlfe_done(union ctl_io *io) ccb->ccb_h.status = CAM_REQ_INPROG; ccb->ccb_h.func_code = XPT_NOTIFY_ACKNOWLEDGE; xpt_action(ccb); + } else if (io->io_hdr.flags & CTL_FLAG_STATUS_SENT) { + if (softc->flags & CTLFE_LUN_WILDCARD) { + ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; + } + if (periph->flags & CAM_PERIPH_INVALID) { + ctlfe_free_ccb(periph, ccb); + } else { + softc->atios_sent++; + cam_periph_unlock(periph); + xpt_action(ccb); + return; + } } else { io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 18:35:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 878BFB0E; Tue, 25 Nov 2014 18:35:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8512F8; Tue, 25 Nov 2014 18:35:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPIZmYh011866; Tue, 25 Nov 2014 18:35:48 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPIZm6C011865; Tue, 25 Nov 2014 18:35:48 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201411251835.sAPIZm6C011865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Tue, 25 Nov 2014 18:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275059 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 18:35:48 -0000 Author: rdivacky Date: Tue Nov 25 18:35:47 2014 New Revision: 275059 URL: https://svnweb.freebsd.org/changeset/base/275059 Log: Shrink boot2 by a couple more bytes. Reviewed by: jhb Tested by: me, dim Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Tue Nov 25 17:53:35 2014 (r275058) +++ head/sys/boot/i386/boot2/boot2.c Tue Nov 25 18:35:47 2014 (r275059) @@ -323,7 +323,8 @@ load(void) caddr_t p; ufs_ino_t ino; uint32_t addr; - int i, j; + uint8_t i, j; + int k; if (!(ino = lookup(kname))) { if (!ls) @@ -344,7 +345,7 @@ load(void) return; } else if (IS_ELF(hdr.eh)) { fs_off = hdr.eh.e_phoff; - for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) { + for (j = k = 0; k < hdr.eh.e_phnum && j < 2; k++) { if (xfsread(ino, ep + j, sizeof(ep[0]))) return; if (ep[j].p_type == PT_LOAD) @@ -393,7 +394,9 @@ parse() char *ep, *p, *q; const char *cp; unsigned int drv; - int c, i, j; + uint8_t i; + int c, j; + size_t k; while ((c = *arg++)) { if (c == ' ' || c == '\t' || c == '\n') @@ -416,7 +419,7 @@ parse() #if SERIAL } else if (c == 'S') { j = 0; - while ((unsigned int)(i = *arg++ - '0') <= 9) + while ((i = *arg++ - '0') <= 9) j = j * 10 + i; if (j > 0 && i == -'0') { comspeed = j; @@ -479,10 +482,10 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i >= sizeof(knamebuf)) + if (k = ep - arg) { + if (k >= sizeof(knamebuf)) return -1; - memcpy(knamebuf, arg, i + 1); + memcpy(knamebuf, arg, k + 1); kname = knamebuf; } } @@ -605,8 +608,10 @@ drvread(void *buf, unsigned lba, unsigne { static unsigned c = 0x2d5c7c2f; - if (!OPT_CHECK(RBX_QUIET)) - printf("%c\b", c = c << 8 | c >> 24); + if (!OPT_CHECK(RBX_QUIET)) { + xputc(c = c << 8 | c >> 24); + xputc('\b'); + } v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; v86.addr = XREADORG; /* call to xread in boot1 */ v86.es = VTOPSEG(buf); From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 18:39:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A467D47; Tue, 25 Nov 2014 18:39:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D525332; Tue, 25 Nov 2014 18:39:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPIdbqG012372; Tue, 25 Nov 2014 18:39:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPIdbCc012371; Tue, 25 Nov 2014 18:39:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411251839.sAPIdbCc012371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 25 Nov 2014 18:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275060 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 18:39:38 -0000 Author: emaste Date: Tue Nov 25 18:39:37 2014 New Revision: 275060 URL: https://svnweb.freebsd.org/changeset/base/275060 Log: Fix b64_pton output buffer overrun test for exact-sized buffer b64_pton would sometimes erroneously fail to decode a base64 string into a precisely sized buffer. The overflow check was a little too greedy. Reported by: Ted Unangst on freebsd-hackers@ Reviewed by: loos, trasz Obtained from: OpenBSD MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1218 Modified: head/lib/libc/net/base64.c Modified: head/lib/libc/net/base64.c ============================================================================== --- head/lib/libc/net/base64.c Tue Nov 25 18:35:47 2014 (r275059) +++ head/lib/libc/net/base64.c Tue Nov 25 18:39:37 2014 (r275060) @@ -199,6 +199,7 @@ b64_pton(src, target, targsize) size_t targsize; { int tarindex, state, ch; + u_char nextbyte; char *pos; state = 0; @@ -226,22 +227,28 @@ b64_pton(src, target, targsize) break; case 1: if (target) { - if ((size_t)tarindex + 1 >= targsize) + if ((size_t)tarindex >= targsize) return (-1); target[tarindex] |= (pos - Base64) >> 4; - target[tarindex+1] = ((pos - Base64) & 0x0f) - << 4 ; + nextbyte = ((pos - Base64) & 0x0f) << 4; + if ((size_t)tarindex + 1 < targsize) + target[tarindex + 1] = nextbyte; + else if (nextbyte) + return (-1); } tarindex++; state = 2; break; case 2: if (target) { - if ((size_t)tarindex + 1 >= targsize) + if ((size_t)tarindex >= targsize) return (-1); target[tarindex] |= (pos - Base64) >> 2; - target[tarindex+1] = ((pos - Base64) & 0x03) - << 6; + nextbyte = ((pos - Base64) & 0x03) << 6; + if ((size_t)tarindex + 1 < targsize) + target[tarindex + 1] = nextbyte; + else if (nextbyte) + return (-1); } tarindex++; state = 3; @@ -299,7 +306,8 @@ b64_pton(src, target, targsize) * zeros. If we don't check them, they become a * subliminal channel. */ - if (target && target[tarindex] != 0) + if (target && (size_t)tarindex < targsize && + target[tarindex] != 0) return (-1); } } else { From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 18:53:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31FC4376; Tue, 25 Nov 2014 18:53:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EE2F6E7; Tue, 25 Nov 2014 18:53:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPIrHU5020973; Tue, 25 Nov 2014 18:53:17 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPIrHsu020972; Tue, 25 Nov 2014 18:53:17 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201411251853.sAPIrHsu020972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Tue, 25 Nov 2014 18:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275061 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 18:53:18 -0000 Author: rdivacky Date: Tue Nov 25 18:53:17 2014 New Revision: 275061 URL: https://svnweb.freebsd.org/changeset/base/275061 Log: Fix style(9). Suggested by: jkim Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Tue Nov 25 18:39:37 2014 (r275060) +++ head/sys/boot/i386/boot2/boot2.c Tue Nov 25 18:53:17 2014 (r275061) @@ -394,9 +394,9 @@ parse() char *ep, *p, *q; const char *cp; unsigned int drv; - uint8_t i; int c, j; size_t k; + uint8_t i; while ((c = *arg++)) { if (c == ' ' || c == '\t' || c == '\n') From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 18:58:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C5A068B; Tue, 25 Nov 2014 18:58:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3921579E; Tue, 25 Nov 2014 18:58:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPIwfkZ021662; Tue, 25 Nov 2014 18:58:41 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPIwfEq021661; Tue, 25 Nov 2014 18:58:41 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201411251858.sAPIwfEq021661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Tue, 25 Nov 2014 18:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275062 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 18:58:41 -0000 Author: rdivacky Date: Tue Nov 25 18:58:40 2014 New Revision: 275062 URL: https://svnweb.freebsd.org/changeset/base/275062 Log: Fix style(9). Suggested by: jkim Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Tue Nov 25 18:53:17 2014 (r275061) +++ head/sys/boot/i386/boot2/boot2.c Tue Nov 25 18:58:40 2014 (r275062) @@ -323,8 +323,8 @@ load(void) caddr_t p; ufs_ino_t ino; uint32_t addr; - uint8_t i, j; int k; + uint8_t i, j; if (!(ino = lookup(kname))) { if (!ls) From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 19:07:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9FDFB2E; Tue, 25 Nov 2014 19:07:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 972368D8; Tue, 25 Nov 2014 19:07:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPJ7Wme026325; Tue, 25 Nov 2014 19:07:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPJ7Whk026324; Tue, 25 Nov 2014 19:07:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251907.sAPJ7Whk026324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 19:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275064 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 19:07:32 -0000 Author: bapt Date: Tue Nov 25 19:07:31 2014 New Revision: 275064 URL: https://svnweb.freebsd.org/changeset/base/275064 Log: Remove duplicated krb5 Reported by: markj Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 19:01:49 2014 (r275063) +++ head/share/mk/src.libnames.mk Tue Nov 25 19:07:31 2014 (r275064) @@ -94,7 +94,6 @@ _LIBRARIES= \ kafs5 \ kdc \ kiconv \ - krb5 \ kvm \ krb5 \ l \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 19:09:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D5F2D8D; Tue, 25 Nov 2014 19:09:56 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5868901; Tue, 25 Nov 2014 19:09:55 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id h11so2553002wiw.3 for ; Tue, 25 Nov 2014 11:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WLWKodzB2RgnBhKhXykiYzBKaQayyIq1zyjvCxuY8oU=; b=Pwi2O0kXZB1qXQv4l7tFMs91GzCStcSpg5Kvn8DcHvH+f6F3DlL/fGW6TeW98NNOvP k9Fd/yuQrvnbzOrMI/zGKtnU8B7A5ITqeMtGnzUZzgZKpWTGjyHKVdaR4hEh8bKoOBR2 /I5M1IdyRRTt+vzaDcQEZwtWyvhqcLPadOKB7N10Q73+HTNu8afBJXzCqfGMuRX36JwZ qp32cX9Q5PygHkSmJhEspTKyTEq9VwSs17iFfsgzgUh29c8xS0ClKTE+9Y2DA9JCY4s+ /Q4jq+034cCGM2Dd/+Du8MutrSfFvKobD+KT5P2GCgB/nYrnCWhGQ3Ps8tTIIRwo+dkW 0clg== MIME-Version: 1.0 X-Received: by 10.180.205.196 with SMTP id li4mr35320950wic.63.1416942594086; Tue, 25 Nov 2014 11:09:54 -0800 (PST) Received: by 10.27.179.168 with HTTP; Tue, 25 Nov 2014 11:09:54 -0800 (PST) In-Reply-To: <201411251907.sAPJ7Whk026324@svn.freebsd.org> References: <201411251907.sAPJ7Whk026324@svn.freebsd.org> Date: Tue, 25 Nov 2014 14:09:54 -0500 Message-ID: Subject: Re: svn commit: r275064 - head/share/mk From: Benjamin Kaduk To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 19:09:56 -0000 On Tue, Nov 25, 2014 at 2:07 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Tue Nov 25 19:07:31 2014 > New Revision: 275064 > URL: https://svnweb.freebsd.org/changeset/base/275064 > > Log: > Remove duplicated krb5 > Removing the other one would have left things sorted... -Ben > Modified: head/share/mk/src.libnames.mk > > ============================================================================== > --- head/share/mk/src.libnames.mk Tue Nov 25 19:01:49 2014 > (r275063) > +++ head/share/mk/src.libnames.mk Tue Nov 25 19:07:31 2014 > (r275064) > @@ -94,7 +94,6 @@ _LIBRARIES= \ > kafs5 \ > kdc \ > kiconv \ > - krb5 \ > kvm \ > krb5 \ > l \ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 19:13:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B217EF9; Tue, 25 Nov 2014 19:13:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A0A9AC; Tue, 25 Nov 2014 19:13:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPJD3Mv030470; Tue, 25 Nov 2014 19:13:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPJD3fo030469; Tue, 25 Nov 2014 19:13:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411251913.sAPJD3fo030469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 19:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275065 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 19:13:04 -0000 Author: bapt Date: Tue Nov 25 19:13:03 2014 New Revision: 275065 URL: https://svnweb.freebsd.org/changeset/base/275065 Log: Sort libraries definitions Reported by: bjk Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 19:07:31 2014 (r275064) +++ head/share/mk/src.libnames.mk Tue Nov 25 19:13:03 2014 (r275065) @@ -55,8 +55,8 @@ _LIBRARIES= \ begemot \ bluetooth \ bsdxml \ - bsnmp \ bsm \ + bsnmp \ bz2 \ calendar \ cam \ @@ -94,8 +94,8 @@ _LIBRARIES= \ kafs5 \ kdc \ kiconv \ - kvm \ krb5 \ + kvm \ l \ lzma \ m \ @@ -105,9 +105,9 @@ _LIBRARIES= \ memstat \ mp \ nandfs \ + ncursesw \ netgraph \ ngatm \ - ncursesw \ nv \ opie \ pam \ @@ -129,13 +129,13 @@ _LIBRARIES= \ sm \ smb \ ssl \ + ssp_nonshared \ stdthreads \ supcplusplus \ - ssp_nonshared \ tacplus \ termcapw \ - ugidfw \ ufs \ + ugidfw \ ulog \ usb \ usbhid \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 20:59:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D1F4F85; Tue, 25 Nov 2014 20:59:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E147753; Tue, 25 Nov 2014 20:59:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPKxNCB078764; Tue, 25 Nov 2014 20:59:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPKxNwn078763; Tue, 25 Nov 2014 20:59:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411252059.sAPKxNwn078763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 25 Nov 2014 20:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275071 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 20:59:23 -0000 Author: delphij Date: Tue Nov 25 20:59:22 2014 New Revision: 275071 URL: https://svnweb.freebsd.org/changeset/base/275071 Log: Reinstitate send() after syslogd restarts. In r228193 the test of CONNPRIV have been moved to before the _usleep and send in vsyslog(). When syslogd restarts, this would prevent the message being logged after the disconnect/connect dance for scenario #1. PR: 194751 Submitted by: Peter Creath Reviewed By: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D1227 Modified: head/lib/libc/gen/syslog.c Modified: head/lib/libc/gen/syslog.c ============================================================================== --- head/lib/libc/gen/syslog.c Tue Nov 25 19:45:28 2014 (r275070) +++ head/lib/libc/gen/syslog.c Tue Nov 25 20:59:22 2014 (r275071) @@ -261,26 +261,45 @@ vsyslog(int pri, const char *fmt, va_lis connectlog(); /* - * If the send() failed, there are two likely scenarios: + * If the send() fails, there are two likely scenarios: * 1) syslogd was restarted * 2) /var/run/log is out of socket buffer space, which * in most cases means local DoS. - * We attempt to reconnect to /var/run/log[priv] to take care of - * case #1 and keep send()ing data to cover case #2 - * to give syslogd a chance to empty its socket buffer. + * If the error does not indicate a full buffer, we address + * case #1 by attempting to reconnect to /var/run/log[priv] + * and resending the message once. * - * If we are working with a priveleged socket, then take - * only one attempt, because we don't want to freeze a + * If we are working with a privileged socket, the retry + * attempts end there, because we don't want to freeze a * critical application like su(1) or sshd(8). * + * Otherwise, we address case #2 by repeatedly retrying the + * send() to give syslogd a chance to empty its socket buffer. */ if (send(LogFile, tbuf, cnt, 0) < 0) { if (errno != ENOBUFS) { + /* + * Scenario 1: syslogd was restarted + * reconnect and resend once + */ disconnectlog(); connectlog(); + if (send(LogFile, tbuf, cnt, 0) >= 0) { + THREAD_UNLOCK(); + return; + } + /* + * if the resend failed, fall through to + * possible scenario 2 + */ } - do { + while (errno == ENOBUFS) { + /* + * Scenario 2: out of socket buffer space + * possible DoS, fail fast on a privileged + * socket + */ if (status == CONNPRIV) break; _usleep(1); @@ -288,7 +307,7 @@ vsyslog(int pri, const char *fmt, va_lis THREAD_UNLOCK(); return; } - } while (errno == ENOBUFS); + } } else { THREAD_UNLOCK(); return; @@ -350,7 +369,7 @@ connectlog(void) SyslogAddr.sun_family = AF_UNIX; /* - * First try priveleged socket. If no success, + * First try privileged socket. If no success, * then try default socket. */ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG_PRIV, From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 21:01:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8E03166; Tue, 25 Nov 2014 21:01:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C41D3768; Tue, 25 Nov 2014 21:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPL1AKO081197; Tue, 25 Nov 2014 21:01:10 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPL19la081191; Tue, 25 Nov 2014 21:01:09 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201411252101.sAPL19la081191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Tue, 25 Nov 2014 21:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275073 - in head: lib/libjail usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 21:01:11 -0000 Author: jamie Date: Tue Nov 25 21:01:08 2014 New Revision: 275073 URL: https://svnweb.freebsd.org/changeset/base/275073 Log: In preparation for using clang's -Wcast-qual: Use __DECONST (instead of my own attempted re-invention) for the iov parameters to jail_get/set(2). Similarly remove the decost-ish hack from execvp's argv, except the __DECONST is only added at very end. While I'm at it, remove an unused variable and fix a comment typo. Modified: head/lib/libjail/jail.c head/lib/libjail/jail_getid.c head/usr.sbin/jail/command.c head/usr.sbin/jail/jail.c head/usr.sbin/jail/state.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Tue Nov 25 21:00:58 2014 (r275072) +++ head/lib/libjail/jail.c Tue Nov 25 21:01:08 2014 (r275073) @@ -531,7 +531,7 @@ jailparam_set(struct jailparam *jp, unsi } i++; } - *(const void **)&jiov[i].iov_base = "errmsg"; + jiov[i].iov_base = __DECONST(char *, "errmsg"); jiov[i].iov_len = sizeof("errmsg"); i++; jiov[i].iov_base = jail_errmsg; @@ -601,7 +601,7 @@ jailparam_get(struct jailparam *jp, unsi jiov[ki].iov_len = (jp_key->jp_ctltype & CTLTYPE) == CTLTYPE_STRING ? strlen(jp_key->jp_value) + 1 : jp_key->jp_valuelen; ki++; - *(const void **)&jiov[ki].iov_base = "errmsg"; + jiov[ki].iov_base = __DECONST(char *, "errmsg"); jiov[ki].iov_len = sizeof("errmsg"); ki++; jiov[ki].iov_base = jail_errmsg; Modified: head/lib/libjail/jail_getid.c ============================================================================== --- head/lib/libjail/jail_getid.c Tue Nov 25 21:00:58 2014 (r275072) +++ head/lib/libjail/jail_getid.c Tue Nov 25 21:01:08 2014 (r275073) @@ -53,12 +53,12 @@ jail_getid(const char *name) jid = strtoul(name, &ep, 10); if (*name && !*ep) return jid; - *(const void **)&jiov[0].iov_base = "name"; + jiov[0].iov_base = __DECONST(char *, "name"); jiov[0].iov_len = sizeof("name"); jiov[1].iov_len = strlen(name) + 1; jiov[1].iov_base = alloca(jiov[1].iov_len); strcpy(jiov[1].iov_base, name); - *(const void **)&jiov[2].iov_base = "errmsg"; + jiov[2].iov_base = __DECONST(char *, "errmsg"); jiov[2].iov_len = sizeof("errmsg"); jiov[3].iov_base = jail_errmsg; jiov[3].iov_len = JAIL_ERRMSGLEN; @@ -80,15 +80,15 @@ jail_getname(int jid) char *name; char namebuf[MAXHOSTNAMELEN]; - *(const void **)&jiov[0].iov_base = "jid"; + jiov[0].iov_base = __DECONST(char *, "jid"); jiov[0].iov_len = sizeof("jid"); jiov[1].iov_base = &jid; jiov[1].iov_len = sizeof(jid); - *(const void **)&jiov[2].iov_base = "name"; + jiov[2].iov_base = __DECONST(char *, "name"); jiov[2].iov_len = sizeof("name"); jiov[3].iov_base = namebuf; jiov[3].iov_len = sizeof(namebuf); - *(const void **)&jiov[4].iov_base = "errmsg"; + jiov[4].iov_base = __DECONST(char *, "errmsg"); jiov[4].iov_len = sizeof("errmsg"); jiov[5].iov_base = jail_errmsg; jiov[5].iov_len = JAIL_ERRMSGLEN; Modified: head/usr.sbin/jail/command.c ============================================================================== --- head/usr.sbin/jail/command.c Tue Nov 25 21:00:58 2014 (r275072) +++ head/usr.sbin/jail/command.c Tue Nov 25 21:01:08 2014 (r275073) @@ -260,8 +260,8 @@ run_command(struct cfjail *j) const struct passwd *pwd; const struct cfstring *comstring, *s; login_cap_t *lcap; - char **argv; - char *cs, *comcs, *devpath; + const char **argv; + char *acs, *cs, *comcs, *devpath; const char *jidstr, *conslog, *path, *ruleset, *term, *username; enum intparam comparam; size_t comlen; @@ -332,27 +332,26 @@ run_command(struct cfjail *j) } argv = alloca((8 + argc) * sizeof(char *)); - *(const char **)&argv[0] = _PATH_IFCONFIG; + argv[0] = _PATH_IFCONFIG; if ((cs = strchr(val, '|'))) { - argv[1] = alloca(cs - val + 1); - strlcpy(argv[1], val, cs - val + 1); + argv[1] = acs = alloca(cs - val + 1); + strlcpy(acs, val, cs - val + 1); addr = cs + 1; } else { - *(const char **)&argv[1] = - string_param(j->intparams[IP_INTERFACE]); + argv[1] = string_param(j->intparams[IP_INTERFACE]); addr = val; } - *(const char **)&argv[2] = "inet"; + argv[2] = "inet"; if (!(cs = strchr(addr, '/'))) { argv[3] = addr; - *(const char **)&argv[4] = "netmask"; - *(const char **)&argv[5] = "255.255.255.255"; + argv[4] = "netmask"; + argv[5] = "255.255.255.255"; argc = 6; } else if (strchr(cs + 1, '.')) { - argv[3] = alloca(cs - addr + 1); - strlcpy(argv[3], addr, cs - addr + 1); - *(const char **)&argv[4] = "netmask"; - *(const char **)&argv[5] = cs + 1; + argv[3] = acs = alloca(cs - addr + 1); + strlcpy(acs, addr, cs - addr + 1); + argv[4] = "netmask"; + argv[5] = cs + 1; argc = 6; } else { argv[3] = addr; @@ -360,14 +359,15 @@ run_command(struct cfjail *j) } if (!down) { - for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { + for (cs = strtok(extrap, " "); cs; + cs = strtok(NULL, " ")) { size_t len = strlen(cs) + 1; - argv[argc] = alloca(len); - strlcpy(argv[argc++], cs, len); + argv[argc++] = acs = alloca(len); + strlcpy(acs, cs, len); } } - *(const char **)&argv[argc] = down ? "-alias" : "alias"; + argv[argc] = down ? "-alias" : "alias"; argv[argc + 1] = NULL; break; #endif @@ -389,46 +389,45 @@ run_command(struct cfjail *j) } argv = alloca((8 + argc) * sizeof(char *)); - *(const char **)&argv[0] = _PATH_IFCONFIG; + argv[0] = _PATH_IFCONFIG; if ((cs = strchr(val, '|'))) { - argv[1] = alloca(cs - val + 1); - strlcpy(argv[1], val, cs - val + 1); + argv[1] = acs = alloca(cs - val + 1); + strlcpy(acs, val, cs - val + 1); addr = cs + 1; } else { - *(const char **)&argv[1] = - string_param(j->intparams[IP_INTERFACE]); + argv[1] = string_param(j->intparams[IP_INTERFACE]); addr = val; } - *(const char **)&argv[2] = "inet6"; + argv[2] = "inet6"; argv[3] = addr; if (!(cs = strchr(addr, '/'))) { - *(const char **)&argv[4] = "prefixlen"; - *(const char **)&argv[5] = "128"; + argv[4] = "prefixlen"; + argv[5] = "128"; argc = 6; } else argc = 4; if (!down) { - for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { + for (cs = strtok(extrap, " "); cs; + cs = strtok(NULL, " ")) { size_t len = strlen(cs) + 1; - argv[argc] = alloca(len); - strlcpy(argv[argc++], cs, len); + argv[argc++] = acs = alloca(len); + strlcpy(acs, cs, len); } } - *(const char **)&argv[argc] = down ? "-alias" : "alias"; + argv[argc] = down ? "-alias" : "alias"; argv[argc + 1] = NULL; break; #endif case IP_VNET_INTERFACE: argv = alloca(5 * sizeof(char *)); - *(const char **)&argv[0] = _PATH_IFCONFIG; + argv[0] = _PATH_IFCONFIG; argv[1] = comstring->s; - *(const char **)&argv[2] = down ? "-vnet" : "vnet"; + argv[2] = down ? "-vnet" : "vnet"; jidstr = string_param(j->intparams[KP_JID]); - *(const char **)&argv[3] = - jidstr ? jidstr : string_param(j->intparams[KP_NAME]); + argv[3] = jidstr ? jidstr : string_param(j->intparams[KP_NAME]); argv[4] = NULL; break; @@ -454,22 +453,22 @@ run_command(struct cfjail *j) if (down) { argv[4] = NULL; argv[3] = argv[1]; - *(const char **)&argv[0] = "/sbin/umount"; + argv[0] = "/sbin/umount"; } else { if (argc == 4) { argv[7] = NULL; argv[6] = argv[1]; argv[5] = argv[0]; argv[4] = argv[3]; - *(const char **)&argv[3] = "-o"; + argv[3] = "-o"; } else { argv[5] = NULL; argv[4] = argv[1]; argv[3] = argv[0]; } - *(const char **)&argv[0] = _PATH_MOUNT; + argv[0] = _PATH_MOUNT; } - *(const char **)&argv[1] = "-t"; + argv[1] = "-t"; break; case IP_MOUNT_DEVFS: @@ -485,19 +484,19 @@ run_command(struct cfjail *j) down ? "devfs" : NULL) < 0) return -1; if (down) { - *(const char **)&argv[0] = "/sbin/umount"; + argv[0] = "/sbin/umount"; argv[1] = devpath; argv[2] = NULL; } else { - *(const char **)&argv[0] = _PATH_MOUNT; - *(const char **)&argv[1] = "-t"; - *(const char **)&argv[2] = "devfs"; + argv[0] = _PATH_MOUNT; + argv[1] = "-t"; + argv[2] = "devfs"; ruleset = string_param(j->intparams[KP_DEVFS_RULESET]); if (!ruleset) ruleset = "4"; /* devfsrules_jail */ - argv[3] = alloca(11 + strlen(ruleset)); - sprintf(argv[3], "-oruleset=%s", ruleset); - *(const char **)&argv[4] = "."; + argv[3] = acs = alloca(11 + strlen(ruleset)); + sprintf(acs, "-oruleset=%s", ruleset); + argv[4] = "."; argv[5] = devpath; argv[6] = NULL; } @@ -516,14 +515,14 @@ run_command(struct cfjail *j) down ? "fdescfs" : NULL) < 0) return -1; if (down) { - *(const char **)&argv[0] = "/sbin/umount"; + argv[0] = "/sbin/umount"; argv[1] = devpath; argv[2] = NULL; } else { - *(const char **)&argv[0] = _PATH_MOUNT; - *(const char **)&argv[1] = "-t"; - *(const char **)&argv[2] = "fdescfs"; - *(const char **)&argv[3] = "."; + argv[0] = _PATH_MOUNT; + argv[1] = "-t"; + argv[2] = "fdescfs"; + argv[3] = "."; argv[4] = devpath; argv[5] = NULL; } @@ -548,8 +547,8 @@ run_command(struct cfjail *j) if ((cs = strpbrk(comstring->s, "!\"$&'()*;<>?[\\]`{|}~")) && !(cs[0] == '&' && cs[1] == '\0')) { argv = alloca(4 * sizeof(char *)); - *(const char **)&argv[0] = _PATH_BSHELL; - *(const char **)&argv[1] = "-c"; + argv[0] = _PATH_BSHELL; + argv[1] = "-c"; argv[2] = comstring->s; argv[3] = NULL; } else { @@ -693,7 +692,7 @@ run_command(struct cfjail *j) exit(1); } closefrom(3); - execvp(argv[0], argv); + execvp(argv[0], __DECONST(char *const*, argv)); jail_warnx(j, "exec %s: %s", argv[0], strerror(errno)); exit(1); } Modified: head/usr.sbin/jail/jail.c ============================================================================== --- head/usr.sbin/jail/jail.c Tue Nov 25 21:00:58 2014 (r275072) +++ head/usr.sbin/jail/jail.c Tue Nov 25 21:01:08 2014 (r275073) @@ -656,11 +656,11 @@ create_jail(struct cfjail *j) * The jail already exists, but may be dying. * Make sure it is, in which case an update is appropriate. */ - *(const void **)&jiov[0].iov_base = "jid"; + jiov[0].iov_base = __DECONST(char *, "jid"); jiov[0].iov_len = sizeof("jid"); jiov[1].iov_base = &jid; jiov[1].iov_len = sizeof(jid); - *(const void **)&jiov[2].iov_base = "dying"; + jiov[2].iov_base = __DECONST(char *, "dying"); jiov[2].iov_len = sizeof("dying"); jiov[3].iov_base = &dying; jiov[3].iov_len = sizeof(dying); @@ -721,11 +721,11 @@ clear_persist(struct cfjail *j) if (!(j->flags & JF_PERSIST)) return; j->flags &= ~JF_PERSIST; - *(const void **)&jiov[0].iov_base = "jid"; + jiov[0].iov_base = __DECONST(char *, "jid"); jiov[0].iov_len = sizeof("jid"); jiov[1].iov_base = &j->jid; jiov[1].iov_len = sizeof(j->jid); - *(const void **)&jiov[2].iov_base = "nopersist"; + jiov[2].iov_base = __DECONST(char *, "nopersist"); jiov[2].iov_len = sizeof("nopersist"); jiov[3].iov_base = NULL; jiov[3].iov_len = 0; @@ -849,12 +849,12 @@ running_jid(struct cfjail *j, int dflag) j->jid = -1; return; } - *(const void **)&jiov[0].iov_base = "jid"; + jiov[0].iov_base = __DECONST(char *, "jid"); jiov[0].iov_len = sizeof("jid"); jiov[1].iov_base = &jid; jiov[1].iov_len = sizeof(jid); } else if ((pval = string_param(j->intparams[KP_NAME]))) { - *(const void **)&jiov[0].iov_base = "name"; + jiov[0].iov_base = __DECONST(char *, "name"); jiov[0].iov_len = sizeof("name"); jiov[1].iov_len = strlen(pval) + 1; jiov[1].iov_base = alloca(jiov[1].iov_len); @@ -880,7 +880,7 @@ jail_quoted_warnx(const struct cfjail *j } /* - * Set jail parameters and possible print them out. + * Set jail parameters and possibly print them out. */ static int jailparam_set_note(const struct cfjail *j, struct jailparam *jp, unsigned njp, Modified: head/usr.sbin/jail/state.c ============================================================================== --- head/usr.sbin/jail/state.c Tue Nov 25 21:00:58 2014 (r275072) +++ head/usr.sbin/jail/state.c Tue Nov 25 21:01:08 2014 (r275073) @@ -60,7 +60,7 @@ dep_setup(int docf) const char *cs; char *pname; size_t plen; - int error, deps, ldeps; + int deps, ldeps; if (!docf) { /* @@ -88,7 +88,6 @@ dep_setup(int docf) TAILQ_FOREACH(j, &cfjails, tq) jails_byname[njails++] = j; qsort(jails_byname, njails, sizeof(struct cfjail *), cmp_jailptr); - error = 0; deps = 0; ldeps = 0; plen = 0; @@ -331,15 +330,15 @@ start_state(const char *target, int docf * -R matches its wildcards against currently running * jails, not against the config file. */ - *(const void **)&jiov[0].iov_base = "lastjid"; + jiov[0].iov_base = __DECONST(char *, "lastjid"); jiov[0].iov_len = sizeof("lastjid"); jiov[1].iov_base = &jid; jiov[1].iov_len = sizeof(jid); - *(const void **)&jiov[2].iov_base = "jid"; + jiov[2].iov_base = __DECONST(char *, "jid"); jiov[2].iov_len = sizeof("jid"); jiov[3].iov_base = &jid; jiov[3].iov_len = sizeof(jid); - *(const void **)&jiov[4].iov_base = "name"; + jiov[4].iov_base = __DECONST(char *, "name"); jiov[4].iov_len = sizeof("name"); jiov[5].iov_base = &namebuf; jiov[5].iov_len = sizeof(namebuf); @@ -454,12 +453,12 @@ running_jid(const char *name, int flags) int jid; if ((jid = strtol(name, &ep, 10)) && !*ep) { - *(const void **)&jiov[0].iov_base = "jid"; + jiov[0].iov_base = __DECONST(char *, "jid"); jiov[0].iov_len = sizeof("jid"); jiov[1].iov_base = &jid; jiov[1].iov_len = sizeof(jid); } else { - *(const void **)&jiov[0].iov_base = "name"; + jiov[0].iov_base = __DECONST(char *, "name"); jiov[0].iov_len = sizeof("name"); jiov[1].iov_len = strlen(name) + 1; jiov[1].iov_base = alloca(jiov[1].iov_len); From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 21:16:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05ABD88C; Tue, 25 Nov 2014 21:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E632C92C; Tue, 25 Nov 2014 21:16:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPLGi4F088450; Tue, 25 Nov 2014 21:16:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPLGiQY088449; Tue, 25 Nov 2014 21:16:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252116.sAPLGiQY088449@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 21:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275076 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 21:16:45 -0000 Author: bapt Date: Tue Nov 25 21:16:44 2014 New Revision: 275076 URL: https://svnweb.freebsd.org/changeset/base/275076 Log: Define missing libraries to be able to convert gnu, cddl and secure to LIBADD Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 21:08:31 2014 (r275075) +++ head/share/mk/src.libnames.mk Tue Nov 25 21:16:44 2014 (r275076) @@ -58,6 +58,8 @@ _LIBRARIES= \ bsm \ bsnmp \ bz2 \ + c \ + c_pic \ calendar \ cam \ capsicum \ @@ -82,6 +84,7 @@ _LIBRARIES= \ geom \ gnuregex \ gssapi \ + gssapi_krb5 \ hdb \ heimbase \ heimntlm \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 21:18:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41A1E9F4; Tue, 25 Nov 2014 21:18:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE0493F; Tue, 25 Nov 2014 21:18:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPLIYiY088818; Tue, 25 Nov 2014 21:18:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPLIJHB088697; Tue, 25 Nov 2014 21:18:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252118.sAPLIJHB088697@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 21:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275077 - in head: gnu/lib/libdialog gnu/lib/libgcc gnu/lib/libreadline/readline gnu/lib/libstdc++ gnu/usr.bin/dialog gnu/usr.bin/diff gnu/usr.bin/gdb/gdb gnu/usr.bin/gdb/gdbtui gnu/usr... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 21:18:34 -0000 Author: bapt Date: Tue Nov 25 21:18:18 2014 New Revision: 275077 URL: https://svnweb.freebsd.org/changeset/base/275077 Log: Convert to LIBADD Reduce overlinking Modified: head/gnu/lib/libdialog/Makefile head/gnu/lib/libgcc/Makefile head/gnu/lib/libreadline/readline/Makefile head/gnu/lib/libstdc++/Makefile head/gnu/usr.bin/dialog/Makefile head/gnu/usr.bin/diff/Makefile head/gnu/usr.bin/gdb/gdb/Makefile head/gnu/usr.bin/gdb/gdbtui/Makefile head/gnu/usr.bin/gdb/kgdb/Makefile head/gnu/usr.bin/grep/Makefile head/libexec/atf/atf-check/Makefile head/libexec/atf/atf-sh/Makefile head/libexec/atrun/Makefile head/libexec/casper/dns/Makefile head/libexec/casper/grp/Makefile head/libexec/casper/pwd/Makefile head/libexec/casper/random/Makefile head/libexec/casper/sysctl/Makefile head/libexec/dma/Makefile head/libexec/fingerd/Makefile head/libexec/ftpd/Makefile head/libexec/getty/Makefile head/libexec/mail.local/Makefile head/libexec/pppoed/Makefile head/libexec/rlogind/Makefile head/libexec/rpc.rquotad/Makefile head/libexec/rpc.rstatd/Makefile head/libexec/rpc.rusersd/Makefile head/libexec/rpc.rwalld/Makefile head/libexec/rpc.sprayd/Makefile head/libexec/rshd/Makefile head/libexec/rtld-elf/Makefile head/libexec/smrsh/Makefile head/libexec/tcpd/Makefile head/libexec/telnetd/Makefile head/libexec/tftpd/Makefile head/libexec/ulog-helper/Makefile head/libexec/ypxfr/Makefile head/secure/lib/libssh/Makefile head/secure/lib/libssl/Makefile head/secure/libexec/sftp-server/Makefile head/secure/libexec/ssh-keysign/Makefile head/secure/libexec/ssh-pkcs11-helper/Makefile head/secure/usr.bin/bdes/Makefile head/secure/usr.bin/openssl/Makefile head/secure/usr.bin/scp/Makefile head/secure/usr.bin/sftp/Makefile head/secure/usr.bin/ssh-add/Makefile head/secure/usr.bin/ssh-agent/Makefile head/secure/usr.bin/ssh-keygen/Makefile head/secure/usr.bin/ssh-keyscan/Makefile head/secure/usr.bin/ssh/Makefile head/secure/usr.sbin/sshd/Makefile Modified: head/gnu/lib/libdialog/Makefile ============================================================================== --- head/gnu/lib/libdialog/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/lib/libdialog/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -13,8 +13,7 @@ SRCS= argv.c arrows.c buildlist.c butto INCS= dialog.h dlg_colors.h dlg_config.h dlg_keys.h MAN= dialog.3 -DPADD= ${LIBNCURSESW} ${LIBM} -LDADD= -lncursesw -lm +LIBADD= ncursesw m CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -DGCC_UNUSED=__unused .PATH: ${DIALOG} Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/lib/libgcc/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -28,8 +28,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F -I${.CURDIR}/../../usr.bin/cc/cc_tools LDFLAGS+= -nodefaultlibs -DPADD+= ${LIBC} -LDADD+= -lc +LIBADD+= c OBJS= # added to below in various ways depending on TARGET_CPUARCH @@ -119,8 +118,7 @@ LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c # Some compilers generate __aeabi_ functions libgcc_s is missing -DPADD+= ${LIBCOMPILER_RT} -LDADD+= -lcompiler_rt +LIBADD+= compiler_rt .endif .if ${TARGET_CPUARCH} == mips Modified: head/gnu/lib/libreadline/readline/Makefile ============================================================================== --- head/gnu/lib/libreadline/readline/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/lib/libreadline/readline/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -23,7 +23,6 @@ ${.OBJDIR}/${_h}: ${SRCDIR}/${_h} ${INSTALL} ${.ALLSRC} ${.TARGET} .endfor -DPADD= ${LIBTERMCAPW} -LDADD= -ltermcapw +LIBADD= ncursesw .include Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/lib/libstdc++/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -23,8 +23,8 @@ CXXFLAGS+= -fno-implicit-templates -ffun -Wno-deprecated PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} -DPADD= ${LIBM} -LDADD= -lm -Wl,-f,libsupc++.so.1 +LIBADD+= m +LDADD= -Wl,-f,libsupc++.so.1 # libstdc++ sources SRCS+= bitmap_allocator.cc pool_allocator.cc \ Modified: head/gnu/usr.bin/dialog/Makefile ============================================================================== --- head/gnu/usr.bin/dialog/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/usr.bin/dialog/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -3,8 +3,7 @@ DIALOG= ${.CURDIR}/../../../contrib/dialog PROG= dialog -DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM} -LDADD= -ldialog -lncursesw -lm +LIBADD= dialog ncursesw m CFLAGS+= -I${.CURDIR} -I${DIALOG} .PATH: ${DIALOG} Modified: head/gnu/usr.bin/diff/Makefile ============================================================================== --- head/gnu/usr.bin/diff/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/usr.bin/diff/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -26,8 +26,7 @@ CFLAGS+=-I${DESTDIR}/usr/include/gnu SUBDIR+=doc -DPADD= ${LIBGNUREGEX} -LDADD= -lgnuregex +LIBADD+= gnuregex .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: head/gnu/usr.bin/gdb/gdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/gdb/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/usr.bin/gdb/gdb/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -11,8 +11,9 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a # global symbols visible. LDFLAGS+= -Wl,-E -DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX} -LDADD= ${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex +DPADD= ${GDBLIBS} ${BULIBS} +LDADD= ${GDBLIBS} ${BULIBS} +LIBADD+= m readline ncursesw gnuregex .include CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\" Modified: head/gnu/usr.bin/gdb/gdbtui/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/gdbtui/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/usr.bin/gdb/gdbtui/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -12,7 +12,8 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a # global symbols visible. LDFLAGS+= -Wl,-E -DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX} -LDADD= ${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex +DPADD= ${GDBLIBS} ${BULIBS} +LDADD= ${GDBLIBS} ${BULIBS} +LIBADD+= m readline ncursesw gnuregex .include Modified: head/gnu/usr.bin/gdb/kgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/usr.bin/gdb/kgdb/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -8,10 +8,9 @@ BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_ ${OBJ_BU}/libiberty/libiberty.a GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a -DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} \ - ${LIBGNUREGEX} -LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LDREADLINE} -ltermcapw \ - -lgnuregex +DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} +LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} +LIBADD+= m readline ncursesw gnuregex .if defined(GDB_CROSS_DEBUGGER) CFLAGS+= -Wl,-export-dynamic Modified: head/gnu/usr.bin/grep/Makefile ============================================================================== --- head/gnu/usr.bin/grep/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/gnu/usr.bin/grep/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -22,8 +22,7 @@ LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ MLINKS= grep.1 egrep.1 grep.1 fgrep.1 .endif -DPADD= ${LIBGNUREGEX} ${LIBBZ2} -LDADD= -lgnuregex -lbz2 +LIBADD= gnuregex bz2 .if ${MK_BSD_GREP} != "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ @@ -33,8 +32,7 @@ MLINKS+=grep.1 bzgrep.1 grep.1 bzegrep.1 .endif .if defined(GREP_LIBZ) && !empty(GREP_LIBZ) -LDADD+= -lz -DPADD+= ${LIBZ} +LIBADD+= z CFLAGS+=-DHAVE_LIBZ=1 .if ${MK_BSD_GREP} != "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \ Modified: head/libexec/atf/atf-check/Makefile ============================================================================== --- head/libexec/atf/atf-check/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/atf/atf-check/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -38,9 +38,7 @@ MAN= atf-check.1 CFLAGS+= -I${ATF} CFLAGS+= -DATF_SHELL='"/bin/sh"' -DPADD+= ${LIBATF_CXX} ${LIBATF_C} -LDADD+= ${LDATF_CXX} ${LDATF_C} -USEPRIVATELIB= atf-c++ atf-c +LIBADD= atf_cxx .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: head/libexec/atf/atf-sh/Makefile ============================================================================== --- head/libexec/atf/atf-sh/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/atf/atf-sh/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -42,9 +42,7 @@ CFLAGS+= -DATF_PKGDATADIR='"${SHAREDIR}/ CFLAGS+= -DATF_SHELL='"/bin/sh"' CFLAGS+= -I${ATF} -DPADD+= ${LIBATF_C} ${LIBATF_CXX} -LDADD+= ${LDATF_C} ${LDATF_CXX} -USEPRIVATELIB= atf-c++ atf-c +LIBADD= atf_cxx FILESGROUPS= SUBR Modified: head/libexec/atrun/Makefile ============================================================================== --- head/libexec/atrun/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/atrun/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -17,8 +17,7 @@ CFLAGS+=-DLOGIN_CAP -DPAM WARNS?= 2 WFORMAT=0 -DPADD= ${LIBPAM} ${LIBUTIL} -LDADD= ${MINUSLPAM} -lutil +LIBADD= pam util atrun.8: atrun.man @${ECHO} Making ${.TARGET:T} from ${.ALLSRC:T}; \ Modified: head/libexec/casper/dns/Makefile ============================================================================== --- head/libexec/casper/dns/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/casper/dns/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -6,8 +6,7 @@ PROG= dns SRCS= dns.c -DPADD= ${LIBCAPSICUM} ${LIBCASPER} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL} -LDADD= -lcapsicum -lcasper -lnv -lpjdlog -lutil +LIBADD= casper nv BINDIR= /libexec/casper Modified: head/libexec/casper/grp/Makefile ============================================================================== --- head/libexec/casper/grp/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/casper/grp/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -6,8 +6,7 @@ PROG= grp SRCS= grp.c -DPADD= ${LIBCAPSICUM} ${LIBCASPER} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL} -LDADD= -lcapsicum -lcasper -lnv -lpjdlog -lutil +LIBADD= casper nv pjdlog BINDIR= /libexec/casper Modified: head/libexec/casper/pwd/Makefile ============================================================================== --- head/libexec/casper/pwd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/casper/pwd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -6,8 +6,7 @@ PROG= pwd SRCS= pwd.c -DPADD= ${LIBCAPSICUM} ${LIBCASPER} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL} -LDADD= -lcapsicum -lcasper -lnv -lpjdlog -lutil +LIBADD= casper nv pjdlog BINDIR= /libexec/casper Modified: head/libexec/casper/random/Makefile ============================================================================== --- head/libexec/casper/random/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/casper/random/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -6,8 +6,7 @@ PROG= random SRCS= random.c -DPADD= ${LIBCAPSICUM} ${LIBCASPER} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL} -LDADD= -lcapsicum -lcasper -lnv -lpjdlog -lutil +LIBADD= casper nv BINDIR= /libexec/casper Modified: head/libexec/casper/sysctl/Makefile ============================================================================== --- head/libexec/casper/sysctl/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/casper/sysctl/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -6,8 +6,7 @@ PROG= sysctl SRCS= sysctl.c -DPADD= ${LIBCAPSICUM} ${LIBCASPER} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL} -LDADD= -lcapsicum -lcasper -lnv -lpjdlog -lutil +LIBADD= casper nv pjdlog BINDIR= /libexec/casper Modified: head/libexec/dma/Makefile ============================================================================== --- head/libexec/dma/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/dma/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -8,8 +8,7 @@ CFLAGS= -I${.CURDIR}/../../contrib/dma \ -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' \ -DDMA_ROOT_USER='"mailnull"' \ -DDMA_GROUP='"mail"' -DPADD= ${LIBSSL} ${LIBCRYPTO} -LDADD= -lssl -lcrypto +LIBADD= ssl crypto PROG= dma SRCS= aliases_parse.y \ Modified: head/libexec/fingerd/Makefile ============================================================================== --- head/libexec/fingerd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/fingerd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -2,8 +2,7 @@ # $FreeBSD$ PROG= fingerd -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util MAN= fingerd.8 WARNS?= 2 Modified: head/libexec/ftpd/Makefile ============================================================================== --- head/libexec/ftpd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/ftpd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -13,19 +13,16 @@ YFLAGS= WARNS?= 2 WFORMAT=0 -DPADD= ${LIBUTIL} ${LIBCRYPT} -LDADD= -lutil -lcrypt +LIBADD= util crypt # XXX Kluge! Conversation mechanism needs to be fixed. -DPADD+= ${LIBOPIE} ${LIBMD} -LDADD+= -lopie -lmd +LIBADD+= opie md LSDIR= ../../bin/ls .PATH: ${.CURDIR}/${LSDIR} SRCS+= ls.c cmp.c print.c util.c CFLAGS+=-Dmain=ls_main -I${.CURDIR}/${LSDIR} -DPADD+= ${LIBM} -LDADD+= -lm +LIBADD+= m .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 @@ -33,8 +30,7 @@ CFLAGS+=-DINET6 .if ${MK_PAM_SUPPORT} != "no" CFLAGS+=-DUSE_PAM -DPADD+= ${LIBPAM} -LDADD+= ${MINUSLPAM} +LIBADD+= pam .endif .include Modified: head/libexec/getty/Makefile ============================================================================== --- head/libexec/getty/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/getty/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -3,8 +3,7 @@ PROG= getty SRCS= main.c init.c subr.c chat.c -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util MAN= gettytab.5 ttys.5 getty.8 WARNS?= 1 Modified: head/libexec/mail.local/Makefile ============================================================================== --- head/libexec/mail.local/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/mail.local/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -12,11 +12,7 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I. WARNS?= 2 WFORMAT=0 -LIBSMDIR= ${.OBJDIR}/../../lib/libsm -LIBSM= ${LIBSMDIR}/libsm.a - -DPADD= ${LIBSM} -LDADD= ${LIBSM} +LIBADD= sm SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: head/libexec/pppoed/Makefile ============================================================================== --- head/libexec/pppoed/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/pppoed/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= pppoed -DPADD= ${LIBNETGRAPH} -LDADD= -lnetgraph +LIBADD= netgraph MAN= pppoed.8 WARNS?= 1 Modified: head/libexec/rlogind/Makefile ============================================================================== --- head/libexec/rlogind/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rlogind/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -5,8 +5,7 @@ PROG= rlogind MAN= rlogind.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util WARNS?= 2 .if ${MK_INET6_SUPPORT} != "no" Modified: head/libexec/rpc.rquotad/Makefile ============================================================================== --- head/libexec/rpc.rquotad/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rpc.rquotad/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -4,7 +4,6 @@ PROG = rpc.rquotad SRCS = rquotad.c MAN = rpc.rquotad.8 -DPADD= ${LIBRPCSVC} ${LIBUTIL} -LDADD= -lrpcsvc -lutil +LIBADD= rpcsvc util .include Modified: head/libexec/rpc.rstatd/Makefile ============================================================================== --- head/libexec/rpc.rstatd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rpc.rstatd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -4,8 +4,7 @@ PROG = rpc.rstatd SRCS = rstatd.c rstat_proc.c MAN = rpc.rstatd.8 -DPADD= ${LIBRPCSVC} ${LIBUTIL} ${LIBDEVSTAT} ${LIBKVM} -LDADD= -lrpcsvc -lutil -ldevstat -lkvm +LIBADD= rpcsvc devstat WARNS?= 1 Modified: head/libexec/rpc.rusersd/Makefile ============================================================================== --- head/libexec/rpc.rusersd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rpc.rusersd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -4,8 +4,7 @@ PROG = rpc.rusersd SRCS = rusersd.c rusers_proc.c extern.h MAN = rpc.rusersd.8 -DPADD= ${LIBRPCSVC} ${LIBUTIL} -LDADD= -lrpcsvc -lutil +LIBADD= rpcsvc #.if exists(/usr/X11R6/include/X11/extensions/xidle.h) #CFLAGS+= -DXIDLE Modified: head/libexec/rpc.rwalld/Makefile ============================================================================== --- head/libexec/rpc.rwalld/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rpc.rwalld/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -4,8 +4,7 @@ PROG = rpc.rwalld SRCS = rwalld.c MAN = rpc.rwalld.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util WARNS?= 2 Modified: head/libexec/rpc.sprayd/Makefile ============================================================================== --- head/libexec/rpc.sprayd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rpc.sprayd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -4,8 +4,7 @@ PROG = rpc.sprayd SRCS = sprayd.c MAN = rpc.sprayd.8 -DPADD= ${LIBRPCSVC} -LDADD= -lrpcsvc +LIBADD= rpcsvc WARNS?= 2 Modified: head/libexec/rshd/Makefile ============================================================================== --- head/libexec/rshd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rshd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -7,7 +7,6 @@ MAN= rshd.8 WARNS?= 3 WFORMAT=0 -DPADD= ${LIBUTIL} ${LIBPAM} -LDADD= -lutil ${MINUSLPAM} +LIBADD= util pam .include Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/rtld-elf/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -43,16 +43,14 @@ CFLAGS+= -fpic .endif CFLAGS+= -DPIC $(DEBUG) LDFLAGS+= -shared -Wl,-Bsymbolic -DPADD= ${LIBC_PIC} -LDADD= -lc_pic +LIBADD= c_pic .if ${MACHINE_CPUARCH} == "arm" # Some of the required math functions (div & mod) are implemented in # libcompiler_rt on ARM. The library also needs to be placed first to be # correctly linked. As some of the functions are used before we have # shared libraries. -DPADD+= ${LIBCOMPILER_RT} -LDADD+= -lcompiler_rt +LIBADD+= compiler_rt .endif Modified: head/libexec/smrsh/Makefile ============================================================================== --- head/libexec/smrsh/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/smrsh/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -9,11 +9,7 @@ SRCS= smrsh.c MAN= smrsh.8 CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. -LIBSMDIR= ${.OBJDIR}/../../lib/libsm -LIBSM= ${LIBSMDIR}/libsm.a - -DPADD= ${LIBSM} -LDADD= ${LIBSM} +LIBADD= sm WARNS?= 2 Modified: head/libexec/tcpd/Makefile ============================================================================== --- head/libexec/tcpd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/tcpd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -15,8 +15,7 @@ CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec CFLAGS+=-DINET6 .endif -DPADD= ${LIBWRAP} -LDADD= -lwrap +LIBADD= wrap WARNS?= 1 Modified: head/libexec/telnetd/Makefile ============================================================================== --- head/libexec/telnetd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/telnetd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -29,20 +29,17 @@ CFLAGS+= -I${TELNETDIR}/telnet LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a -DPADD= ${LIBUTIL} ${LIBTERMCAPW} ${LIBTELNET} -LDADD= -lutil -ltermcapw ${LIBTELNET} +LIBADD= telnet util ncursesw .if ${MK_OPENSSL} != "no" SRCS+= authenc.c CFLAGS+= -DAUTHENTICATION -DENCRYPTION -DPADD+= ${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBPAM} -LDADD+= -lmp -lcrypto -lcrypt ${MINUSLPAM} +LIBADD+= mp crypto pam .endif .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write -DPADD+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} -LDADD+= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err +LIBADD+= krb5 roken .endif .include Modified: head/libexec/tftpd/Makefile ============================================================================== --- head/libexec/tftpd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/tftpd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -7,7 +7,6 @@ SRCS= tftp-file.c tftp-io.c tftp-options SRCS+= tftpd.c WFORMAT=0 -DPADD= ${LIBWRAP} -LDADD= -lwrap +LIBADD= wrap .include Modified: head/libexec/ulog-helper/Makefile ============================================================================== --- head/libexec/ulog-helper/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/ulog-helper/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -5,7 +5,6 @@ BINOWN= root BINMODE=4555 MAN= -DPADD= ${LIBULOG} -LDADD= -lulog +LIBADD= ulog .include Modified: head/libexec/ypxfr/Makefile ============================================================================== --- head/libexec/ypxfr/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/libexec/ypxfr/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -16,8 +16,7 @@ CFLAGS+= -I. WARNS?= 2 WFORMAT=0 -DPADD= ${LIBRPCSVC} -LDADD= -lrpcsvc +LIBADD= rpcsvc CLEANFILES= ${GENSRCS} Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/lib/libssh/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -34,17 +34,14 @@ SRCS+= getrrsetbyname.c LDNSDIR= ${.CURDIR}/../../../contrib/ldns CFLAGS+= -DHAVE_LDNS=1 -I${LDNSDIR} SRCS+= getrrsetbyname-ldns.c -DPADD+= ${LIBLDNS} -LDADD+= ${LDLDNS} -USEPRIVATELIB+= ldns +LIBADD+= ldns .endif CFLAGS+= -I${SSHDIR} -include ssh_namespace.h .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h -DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBMD} ${LIBROKEN} -LDADD+= -lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken +LIBADD+= gssapi krb5 hx509 asn1 com_err md roken .endif .if ${MK_OPENSSH_NONE_CIPHER} != "no" @@ -53,8 +50,7 @@ CFLAGS+= -DNONE_CIPHER_ENABLED NO_LINT= -DPADD+= ${LIBCRYPTO} ${LIBCRYPT} ${LIBZ} -LDADD+= -lcrypto -lcrypt -lz +LIBADD+= crypto crypt z .include Modified: head/secure/lib/libssl/Makefile ============================================================================== --- head/secure/lib/libssl/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/lib/libssl/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -21,8 +21,7 @@ SRCS= bio_ssl.c d1_both.c d1_clnt.c d1_e INCS= dtls1.h kssl.h srtp.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h INCSDIR=${INCLUDEDIR}/openssl -DPADD= ${LIBCRYPTO} -LDADD= -lcrypto +LIBADD= crypto .include Modified: head/secure/libexec/sftp-server/Makefile ============================================================================== --- head/secure/libexec/sftp-server/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/libexec/sftp-server/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -12,9 +12,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -23,8 +21,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypto crypto z .include Modified: head/secure/libexec/ssh-keysign/Makefile ============================================================================== --- head/secure/libexec/ssh-keysign/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/libexec/ssh-keysign/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -8,9 +8,7 @@ MAN= ssh-keysign.8 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h BINMODE=4555 -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -19,8 +17,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/libexec/ssh-pkcs11-helper/Makefile ============================================================================== --- head/secure/libexec/ssh-pkcs11-helper/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/libexec/ssh-pkcs11-helper/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -12,9 +12,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -23,8 +21,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/usr.bin/bdes/Makefile ============================================================================== --- head/secure/usr.bin/bdes/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/bdes/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -5,7 +5,6 @@ PROG= bdes WARNS?= 2 -DPADD= ${LIBCRYPTO} -LDADD= -lcrypto +LIBADD= crypto .include Modified: head/secure/usr.bin/openssl/Makefile ============================================================================== --- head/secure/usr.bin/openssl/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/openssl/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -2,8 +2,7 @@ PROG= openssl -DPADD= ${LIBSSL} ${LIBCRYPTO} -LDADD= -lssl -lcrypto +LIBADD= ssl crypto .if exists(Makefile.man) .include "Makefile.man" Modified: head/secure/usr.bin/scp/Makefile ============================================================================== --- head/secure/usr.bin/scp/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/scp/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -11,9 +11,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -22,8 +20,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/usr.bin/sftp/Makefile ============================================================================== --- head/secure/usr.bin/sftp/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/sftp/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -11,9 +11,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} ${LIBEDIT} ${LIBNCURSESW} -LDADD= ${LDSSH} -ledit -lncursesw -USEPRIVATELIB= ssh +LIBADD= ssh edit .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -22,8 +20,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIABDD+= crypt crypto z .include Modified: head/secure/usr.bin/ssh-add/Makefile ============================================================================== --- head/secure/usr.bin/ssh-add/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/ssh-add/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -11,9 +11,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -22,8 +20,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/usr.bin/ssh-agent/Makefile ============================================================================== --- head/secure/usr.bin/ssh-agent/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/ssh-agent/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -11,9 +11,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -22,8 +20,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/usr.bin/ssh-keygen/Makefile ============================================================================== --- head/secure/usr.bin/ssh-keygen/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/ssh-keygen/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -11,19 +11,14 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= roaming_dummy.c .endif -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 -DPADD+= ${LIBLDNS} -LDADD+= ${LDLDNS} -USEPRIVATELIB+= ldns +LIBADD+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/usr.bin/ssh-keyscan/Makefile ============================================================================== --- head/secure/usr.bin/ssh-keyscan/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/ssh-keyscan/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -6,9 +6,7 @@ PROG= ssh-keyscan SRCS= ssh-keyscan.c roaming_dummy.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -DPADD= ${LIBSSH} -LDADD= ${LDSSH} -USEPRIVATELIB= ssh +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -17,8 +15,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .include Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.bin/ssh/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -15,29 +15,23 @@ SRCS= ssh.c readconf.c clientloop.c ssht # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile SRCS+= gss-genr.c -DPADD= ${LIBSSH} ${LIBUTIL} -LDADD= ${LDSSH} -lutil -USEPRIVATELIB= ssh +LIBADD= ssh util .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 -DPADD+= ${LIBLDNS} -LDADD+= ${LDLDNS} -USEPRIVATELIB+= ldns +LIBADD+= ldns .endif .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h -DPADD+= ${LIBGSSAPI} -LDADD+= -lgssapi +LIBADD+= gssapi .endif .if ${MK_OPENSSH_NONE_CIPHER} != "no" CFLAGS+= -DNONE_CIPHER_ENABLED .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Tue Nov 25 21:16:44 2014 (r275076) +++ head/secure/usr.sbin/sshd/Makefile Tue Nov 25 21:18:18 2014 (r275077) @@ -25,9 +25,7 @@ SRCS+= gss-genr.c MAN= sshd.8 sshd_config.5 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -DPADD= ${LIBSSH} ${LIBUTIL} ${LIBWRAP} ${LIBPAM} -LDADD= ${LDSSH} -lutil -lwrap ${MINUSLPAM} -USEPRIVATELIB= ssh +LIBADD= ssh util wrap pam .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -38,33 +36,29 @@ CFLAGS+= -DHAVE_LDNS=1 .if ${MK_AUDIT} != "no" CFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR -DPADD+= ${LIBBSM} -LDADD+= -lbsm +LIBADD+= bsm .endif .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h -DPADD+= ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \ - ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC} -LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \ - -lcom_err -lroken -lwind -lheimbase ${LDHEIMIPCC} +LIBADD+= gssapi_krb5 gssapi krb5 hx509 asn1 com_err roken wind heimbase \ + heimipcc .endif .if ${MK_OPENSSH_NONE_CIPHER} != "no" CFLAGS+= -DNONE_CIPHER_ENABLED .endif -DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} -LDADD+= -lcrypt -lcrypto -lz +LIBADD+= crypt crypto z # Fix the order of NEEDED entries for libthr and libc. The libthr # needs to interpose libc symbols, leaving the libthr loading as # dependency of krb causes reversed order and broken interposing. Put # the threading library last on the linker command line, just before # the -lc added by a compiler driver. +# XXX In theory the framework now takes care of that, it needs to be checked .if ${MK_KERBEROS_SUPPORT} != "no" -DPADD+= ${LIBPTHREAD} -LDADD+= -lpthread +LIBADD+= pthread .endif .if defined(LOCALBASE) From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 21:43:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2AC0460; Tue, 25 Nov 2014 21:43:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D567C43; Tue, 25 Nov 2014 21:43:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPLhsja003391; Tue, 25 Nov 2014 21:43:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPLhqAB003369; Tue, 25 Nov 2014 21:43:52 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252143.sAPLhqAB003369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 21:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275079 - in head/usr.bin/svn: svn svnadmin svndumpfilter svnlook svnmucc svnrdump svnserve svnsync svnversion X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 21:43:54 -0000 Author: bapt Date: Tue Nov 25 21:43:51 2014 New Revision: 275079 URL: https://svnweb.freebsd.org/changeset/base/275079 Log: Convert svn to LIBADD reduce overlinking Modified: head/usr.bin/svn/svn/Makefile head/usr.bin/svn/svnadmin/Makefile head/usr.bin/svn/svndumpfilter/Makefile head/usr.bin/svn/svnlook/Makefile head/usr.bin/svn/svnmucc/Makefile head/usr.bin/svn/svnrdump/Makefile head/usr.bin/svn/svnserve/Makefile head/usr.bin/svn/svnsync/Makefile head/usr.bin/svn/svnversion/Makefile Modified: head/usr.bin/svn/svn/Makefile ============================================================================== --- head/usr.bin/svn/svn/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svn/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -39,18 +39,14 @@ LDADD= -L${LIBSVN_CLIENTDIR} -lsvn_clien -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBSERFDIR} -lserf \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lmagic -lcrypto -lssl -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z magic crypto ssl pthread DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} \ ${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} ${LIBSVN_REPOS} \ ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} ${LIBSVN_DELTA} \ ${LIBSVN_DIFF} ${LIBSVN_SUBR} ${LIBSERF} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \ - ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR} CLEANFILES+= svnlite.1 .if(defined(ORGANIZATION) && !empty(ORGANIZATION)) Modified: head/usr.bin/svn/svnadmin/Makefile ============================================================================== --- head/usr.bin/svn/svnadmin/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnadmin/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -25,15 +25,11 @@ LDADD= -L${LIBSVN_REPOSDIR} -lsvn_repos -L${LIBSVN_DELTADIR} -lsvn_delta \ -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z pthread DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \ ${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD} - -USEPRIVATELIB= sqlite3 + ${LIBAPR} .include Modified: head/usr.bin/svn/svndumpfilter/Makefile ============================================================================== --- head/usr.bin/svn/svndumpfilter/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svndumpfilter/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -25,14 +25,11 @@ LDADD= -L${LIBSVN_REPOSDIR} -lsvn_repos -L${LIBSVN_DELTADIR} -lsvn_delta \ -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z crypt pthread DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \ ${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR} .include Modified: head/usr.bin/svn/svnlook/Makefile ============================================================================== --- head/usr.bin/svn/svnlook/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnlook/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -26,14 +26,11 @@ LDADD= -L${LIBSVN_REPOSDIR} -lsvn_repos -L${LIBSVN_DIFFDIR} -lsvn_diff \ -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z pthread DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \ ${LIBSVN_DELTA} ${LIBSVN_DIFF} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR} .include Modified: head/usr.bin/svn/svnmucc/Makefile ============================================================================== --- head/usr.bin/svn/svnmucc/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnmucc/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -31,16 +31,12 @@ LDADD= -L${LIBSVN_CLIENTDIR} -lsvn_clien -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBSERFDIR} -lserf \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lmagic -lcrypto -lssl -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z crypto ssl pthread DPADD= ${LIBSVN_CLIENT} ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} ${LIBSVN_RA_SVN} \ ${LIBSVN_RA_SERF} ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} \ ${LIBSVN_FS_UTIL} ${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBSERF} \ - ${LIBAPR_UTIL} ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} \ - ${LIBCRYPT} ${LIBMAGIC} ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR_UTIL} ${LIBAPR} .include Modified: head/usr.bin/svn/svnrdump/Makefile ============================================================================== --- head/usr.bin/svn/svnrdump/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnrdump/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -33,17 +33,13 @@ LDADD= -L${LIBSVN_CLIENTDIR} -lsvn_clien -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBSERFDIR} -lserf \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lmagic -lcrypto -lssl -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z crypto ssl pthread DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} \ ${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} ${LIBSVN_REPOS} \ ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} ${LIBSVN_DELTA} \ ${LIBSVN_DIFF} ${LIBSVN_SUBR} ${LIBSERF} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \ - ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR} .include Modified: head/usr.bin/svn/svnserve/Makefile ============================================================================== --- head/usr.bin/svn/svnserve/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnserve/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -30,16 +30,12 @@ LDADD= -L${LIBSVN_RADIR} -lsvn_ra \ -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBSERFDIR} -lserf \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lmagic -lcrypto -lssl -lpthread + -L${LIBAPRDIR} -lapr +LIBADD= bsdxml sqlite3 z pthread DPADD= ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} ${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} \ ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \ ${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBSERF} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \ - ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR} .include Modified: head/usr.bin/svn/svnsync/Makefile ============================================================================== --- head/usr.bin/svn/svnsync/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnsync/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -30,16 +30,12 @@ LDADD= -L${LIBSVN_RADIR} -lsvn_ra \ -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBSERFDIR} -lserf \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lmagic -lcrypto -lssl -lpthread + -L${LIBAPRDIR} -lapr +LIBADD= bsdxml sqlite3 z crypto ssl pthread DPADD= ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} ${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} \ ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \ ${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBSERF} ${LIBAPR_UTIL} \ - ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \ - ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBAPR} .include Modified: head/usr.bin/svn/svnversion/Makefile ============================================================================== --- head/usr.bin/svn/svnversion/Makefile Tue Nov 25 21:43:01 2014 (r275078) +++ head/usr.bin/svn/svnversion/Makefile Tue Nov 25 21:43:51 2014 (r275079) @@ -23,14 +23,10 @@ LDADD= -L${LIBSVN_WCDIR} -lsvn_wc \ -L${LIBSVN_DIFFDIR} -lsvn_diff \ -L${LIBSVN_SUBRDIR} -lsvn_subr \ -L${LIBAPR_UTILDIR} -lapr-util \ - -lbsdxml \ - -L${LIBAPRDIR} -lapr \ - ${LDSQLITE3} \ - -lz -lcrypt -lpthread + -L${LIBAPRDIR} -lapr +LIBADD+= bsdxml sqlite3 z pthread DPADD= ${LIBSVN_WC} ${LIBSVN_DELTA} ${LIBSVN_DIFF} ${LIBSVN_SUBR} \ - ${LIBSERF} ${LIBAPR_UTIL} ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} \ - ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD} -USEPRIVATELIB= sqlite3 + ${LIBSERF} ${LIBAPR_UTIL}${LIBAPR} .include From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:10:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A0FACAE; Tue, 25 Nov 2014 22:10:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0679AF0A; Tue, 25 Nov 2014 22:10:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMAV2w014396; Tue, 25 Nov 2014 22:10:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMAVje014395; Tue, 25 Nov 2014 22:10:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252210.sAPMAVje014395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:10:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275080 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:10:32 -0000 Author: bapt Date: Tue Nov 25 22:10:31 2014 New Revision: 275080 URL: https://svnweb.freebsd.org/changeset/base/275080 Log: Defines the libssh dependencies Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 21:43:51 2014 (r275079) +++ head/share/mk/src.libnames.mk Tue Nov 25 22:10:31 2014 (r275080) @@ -159,6 +159,9 @@ _DP_archive+= md .endif _DP_ssl= crypto _DP_ssh= crypto crypt +.if ${MK_LDNS} != "no" +_DP_ssh+= ldns z +.endif _DP_edit= ncursesw .if ${MK_OPENSSL} != "no" _DP_bsnmp= crypto @@ -372,3 +375,4 @@ LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libb LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a + From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:17:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB0EFF80; Tue, 25 Nov 2014 22:17:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957A1F5C; Tue, 25 Nov 2014 22:17:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMHV0Y018380; Tue, 25 Nov 2014 22:17:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMHVOm018379; Tue, 25 Nov 2014 22:17:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252217.sAPMHVOm018379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275082 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:17:31 -0000 Author: bapt Date: Tue Nov 25 22:17:31 2014 New Revision: 275082 URL: https://svnweb.freebsd.org/changeset/base/275082 Log: Register the explicit (pthread) and implicit (for static) dependencies for kerberos Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 22:16:43 2014 (r275081) +++ head/share/mk/src.libnames.mk Tue Nov 25 22:17:31 2014 (r275082) @@ -217,7 +217,9 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ + pthread +_DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err # Define spacial cases LDADD_supcplusplus= -lsupc++ @@ -259,6 +261,10 @@ DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} DPADD_kadm5srv+= ${DPADD_pthread} LDADD_kadm5srv+= ${LDADD_pthread} +DPADD_krb5+= ${DPADD_pthread} +LDADD_krb5+= ${LDADD_pthread} +DPADD_gssapi_krb5+= ${DPADD_pthread} +LDADD_gssapi_krb5+= ${LDADD_pthread} .for _l in ${LIBADD} .if ${_PRIVATELIBS:M${_l}} From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:25:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10FB22BB; Tue, 25 Nov 2014 22:25:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6218A7; Tue, 25 Nov 2014 22:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMPGqu022828; Tue, 25 Nov 2014 22:25:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMPDb6022813; Tue, 25 Nov 2014 22:25:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252225.sAPMPDb6022813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275083 - in head/secure: lib/libssh libexec/sftp-server libexec/ssh-keysign libexec/ssh-pkcs11-helper usr.bin/scp usr.bin/sftp usr.bin/ssh usr.bin/ssh-add usr.bin/ssh-agent usr.bin/ssh... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:25:17 -0000 Author: bapt Date: Tue Nov 25 22:25:13 2014 New Revision: 275083 URL: https://svnweb.freebsd.org/changeset/base/275083 Log: Reduce overlinking The framework now ensure by itself that pthread is added to the link chain as the last component if linked to kerberos hence avoid with out any explicit addition prevent issue like CVE-2014-8475 Modified: head/secure/lib/libssh/Makefile head/secure/libexec/sftp-server/Makefile head/secure/libexec/ssh-keysign/Makefile head/secure/libexec/ssh-pkcs11-helper/Makefile head/secure/usr.bin/scp/Makefile head/secure/usr.bin/sftp/Makefile head/secure/usr.bin/ssh-add/Makefile head/secure/usr.bin/ssh-agent/Makefile head/secure/usr.bin/ssh-keygen/Makefile head/secure/usr.bin/ssh-keyscan/Makefile head/secure/usr.bin/ssh/Makefile head/secure/usr.sbin/sshd/Makefile Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/lib/libssh/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -41,7 +41,6 @@ CFLAGS+= -I${SSHDIR} -include ssh_namesp .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h -LIBADD+= gssapi krb5 hx509 asn1 com_err md roken .endif .if ${MK_OPENSSH_NONE_CIPHER} != "no" Modified: head/secure/libexec/sftp-server/Makefile ============================================================================== --- head/secure/libexec/sftp-server/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/libexec/sftp-server/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -21,8 +21,6 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypto crypto z - .include .PATH: ${SSHDIR} Modified: head/secure/libexec/ssh-keysign/Makefile ============================================================================== --- head/secure/libexec/ssh-keysign/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/libexec/ssh-keysign/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -17,7 +17,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypt crypto z +LIBADD+= crypto .include Modified: head/secure/libexec/ssh-pkcs11-helper/Makefile ============================================================================== --- head/secure/libexec/ssh-pkcs11-helper/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/libexec/ssh-pkcs11-helper/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -21,7 +21,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypt crypto z +LIBADD+= crypto .include Modified: head/secure/usr.bin/scp/Makefile ============================================================================== --- head/secure/usr.bin/scp/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/scp/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -20,8 +20,6 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypt crypto z - .include .PATH: ${SSHDIR} Modified: head/secure/usr.bin/sftp/Makefile ============================================================================== --- head/secure/usr.bin/sftp/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/sftp/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -20,8 +20,6 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIABDD+= crypt crypto z - .include .PATH: ${SSHDIR} Modified: head/secure/usr.bin/ssh-add/Makefile ============================================================================== --- head/secure/usr.bin/ssh-add/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/ssh-add/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -20,8 +20,6 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypt crypto z - .include .PATH: ${SSHDIR} Modified: head/secure/usr.bin/ssh-agent/Makefile ============================================================================== --- head/secure/usr.bin/ssh-agent/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/ssh-agent/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -20,7 +20,7 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypt crypto z +LIBADD+= crypto .include Modified: head/secure/usr.bin/ssh-keygen/Makefile ============================================================================== --- head/secure/usr.bin/ssh-keygen/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/ssh-keygen/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -15,10 +15,9 @@ LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 -LIBADD+= ldns .endif -LIBADD+= crypt crypto z +LIBADD+= crypto .include Modified: head/secure/usr.bin/ssh-keyscan/Makefile ============================================================================== --- head/secure/usr.bin/ssh-keyscan/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/ssh-keyscan/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -15,8 +15,6 @@ CFLAGS+= -DHAVE_LDNS=1 #USEPRIVATELIB+= ldns .endif -LIBADD+= crypt crypto z - .include .PATH: ${SSHDIR} Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.bin/ssh/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -15,11 +15,10 @@ SRCS= ssh.c readconf.c clientloop.c ssht # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile SRCS+= gss-genr.c -LIBADD= ssh util +LIBADD= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 -LIBADD+= ldns .endif .if ${MK_KERBEROS_SUPPORT} != "no" @@ -31,7 +30,7 @@ LIBADD+= gssapi CFLAGS+= -DNONE_CIPHER_ENABLED .endif -LIBADD+= crypt crypto z +LIBADD+= crypto .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Tue Nov 25 22:17:31 2014 (r275082) +++ head/secure/usr.sbin/sshd/Makefile Tue Nov 25 22:25:13 2014 (r275083) @@ -25,7 +25,8 @@ SRCS+= gss-genr.c MAN= sshd.8 sshd_config.5 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h -LIBADD= ssh util wrap pam +# pam should always happen before ssh here for static linking +LIBADD= pam ssh util wrap .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -41,25 +42,14 @@ LIBADD+= bsm .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h -LIBADD+= gssapi_krb5 gssapi krb5 hx509 asn1 com_err roken wind heimbase \ - heimipcc +LIBADD+= gssapi_krb5 gssapi krb5 .endif .if ${MK_OPENSSH_NONE_CIPHER} != "no" CFLAGS+= -DNONE_CIPHER_ENABLED .endif -LIBADD+= crypt crypto z - -# Fix the order of NEEDED entries for libthr and libc. The libthr -# needs to interpose libc symbols, leaving the libthr loading as -# dependency of krb causes reversed order and broken interposing. Put -# the threading library last on the linker command line, just before -# the -lc added by a compiler driver. -# XXX In theory the framework now takes care of that, it needs to be checked -.if ${MK_KERBEROS_SUPPORT} != "no" -LIBADD+= pthread -.endif +LIBADD+= crypto .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:37:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A980C70C; Tue, 25 Nov 2014 22:37:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957641A8; Tue, 25 Nov 2014 22:37:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMbSmr027826; Tue, 25 Nov 2014 22:37:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMbRth027823; Tue, 25 Nov 2014 22:37:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252237.sAPMbRth027823@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275084 - in head/tools/tools: ath/athaggrstats ath/athstats net80211/wlanstats X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:37:28 -0000 Author: bapt Date: Tue Nov 25 22:37:27 2014 New Revision: 275084 URL: https://svnweb.freebsd.org/changeset/base/275084 Log: Convert to LIBADD Modified: head/tools/tools/ath/athaggrstats/Makefile head/tools/tools/ath/athstats/Makefile head/tools/tools/net80211/wlanstats/Makefile Modified: head/tools/tools/ath/athaggrstats/Makefile ============================================================================== --- head/tools/tools/ath/athaggrstats/Makefile Tue Nov 25 22:25:13 2014 (r275083) +++ head/tools/tools/ath/athaggrstats/Makefile Tue Nov 25 22:37:27 2014 (r275084) @@ -12,8 +12,7 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA -USEPRIVATELIB= bsdstat -LDADD= ${LDBSDSTAT} +LIBADD+= bsdstat opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h Modified: head/tools/tools/ath/athstats/Makefile ============================================================================== --- head/tools/tools/ath/athstats/Makefile Tue Nov 25 22:25:13 2014 (r275083) +++ head/tools/tools/ath/athstats/Makefile Tue Nov 25 22:37:27 2014 (r275084) @@ -23,9 +23,7 @@ CFLAGS+=-DATH_SUPPORT_TDMA CFLAGS.clang+= -fbracket-depth=512 -USEPRIVATELIB= bsdstat - -LDADD= ${LDBSDSTAT} +LIBADD= bsdstat opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h Modified: head/tools/tools/net80211/wlanstats/Makefile ============================================================================== --- head/tools/tools/net80211/wlanstats/Makefile Tue Nov 25 22:25:13 2014 (r275083) +++ head/tools/tools/net80211/wlanstats/Makefile Tue Nov 25 22:37:27 2014 (r275084) @@ -5,8 +5,7 @@ PROG= wlanstats BINDIR= /usr/local/bin MAN= -USEPRIVATELIB= bsdstat -LDADD= ${LDBSDSTAT} +LIBADD= bsdstat SRCS= wlanstats.c main.c From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:40:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BEEC963; Tue, 25 Nov 2014 22:40:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2DAD1CF; Tue, 25 Nov 2014 22:39:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMdxOt028218; Tue, 25 Nov 2014 22:39:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMdxNm028217; Tue, 25 Nov 2014 22:39:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252239.sAPMdxNm028217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275086 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:40:00 -0000 Author: bapt Date: Tue Nov 25 22:39:59 2014 New Revision: 275086 URL: https://svnweb.freebsd.org/changeset/base/275086 Log: Remove all remnant ugly LD but atf one until the aft framework knows about LIBADD Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Nov 25 22:38:16 2014 (r275085) +++ head/share/mk/src.libnames.mk Tue Nov 25 22:39:59 2014 (r275086) @@ -287,54 +287,42 @@ LDATF_CXX?= ${LIBATF_CXXDIR}/libatf-c++. LIBATF_CXX?= ${LIBATF_CXXDIR}/libatf-c++.a LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat -LDBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.so LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent -LDEVENT?= ${LIBEVENTDIR}/libevent.a LIBEVENT?= ${LIBEVENTDIR}/libevent.a LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc -LDHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.so LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a LIBHEIMIPCSDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcs -LDHEIMIPCS?= ${LIBHEIMIPCSDIR}/libheimipcs.so LIBHEIMIPCS?= ${LIBHEIMIPCSDIR}/libheimipcs.a LIBLDNSDIR= ${ROOTOBJDIR}/lib/libldns -LDLDNS?= ${LIBLDNSDIR}/libldns.so LIBLDNS?= ${LIBLDNSDIR}/libldns.a LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh -LDSSH?= ${LIBSSHDIR}/libssh.so LIBSSH?= ${LIBSSHDIR}/libssh.a LIBUNBOUNDDIR= ${ROOTOBJDIR}/lib/libunbound -LDUNBOUND?= ${LIBUNBOUNDDIR}/libunbound.so LIBUNBOUND?= ${LIBUNBOUNDDIR}/libunbound.a LIBUCLDIR= ${ROOTOBJDIR}/lib/libucl -LDUCL?= ${LIBUCLDIR}/libucl.so LIBUCL?= ${LIBUCLDIR}/libucl.a LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline -LDREADLINE?= ${LIBREADLINEDIR}/libreadline.a LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash -LDOHASH?= ${LIBOHASHDIR}/libohash.a LIBOHASH?= ${LIBOHASHDIR}/libohash.a LIBSQLITE3DIR= ${ROOTOBJDIR}/lib/libsqlite3 -LDSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3.so LIBSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3.a LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a LIBSMDIR= ${ROOTOBJDIR}/lib/libsm -LDSM?= ${LIBSMDIR}/libsm.a LIBSM?= ${LIBSMDIR}/libsm.a LIBSMDBDIR= ${ROOTOBJDIR}/lib/libsmdb From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:41:04 2014 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 120C0AB0; Tue, 25 Nov 2014 22:41:04 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A5AAC272; Tue, 25 Nov 2014 22:41:03 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id sAPMf1B9074833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Nov 2014 14:41:02 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id sAPMf1x6074832; Tue, 25 Nov 2014 14:41:01 -0800 (PST) (envelope-from jmg) Date: Tue, 25 Nov 2014 14:41:01 -0800 From: John-Mark Gurney To: Gleb Smirnoff , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r274966 - head/sys/net Message-ID: <20141125224101.GK99957@funkthat.com> References: <201411241400.sAOE0Srq063100@svn.freebsd.org> <20141124194022.GR47144@FreeBSD.org> <20141124201821.GY95784@rincewind.trouble.is> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141124201821.GY95784@rincewind.trouble.is> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 25 Nov 2014 14:41:02 -0800 (PST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:41:04 -0000 Philip Paeps wrote this message on Mon, Nov 24, 2014 at 21:18 +0100: > On 2014-11-24 22:40:22 (+0300), Gleb Smirnoff wrote: > > On Mon, Nov 24, 2014 at 02:00:28PM +0000, Philip Paeps wrote: > > P> Author: philip > > P> Date: Mon Nov 24 14:00:27 2014 > > P> New Revision: 274966 > > P> URL: https://svnweb.freebsd.org/changeset/base/274966 > > P> > > P> Log: > > P> Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap > > P> should delete configured addresses and routes when the interface is > > P> closed. Default is enabled (preserve current behaviour). > > P> > > P> MFC after: 1 week > > > > Any time I see yet another sysctl knob added I ask myself: what if I want > > this feature on tap0 but doesn't want it on tap1? What if want it on host, > > but doesn't want it on vmnet-enabled jail? Where from could I learn about > > this sysctl if I am not subscribed to svn-src-*@? > > I admit that this one was a hack written in anger a while back. When I > hacked this, I was struggling with a bunch of bhyve instances with > fiddly point to point routes and every time I restarted a bhyve, I'd > have to fix my routing table again. That got frustrating quickly. Not > an excuse. Just an explanation. > > > Of course adding a sysctl knob is faster and easier for a FreeBSD hacker. > > But is it a better for a FreeBSD user? Are we making OS for just ourselves? > > > > Look, we've got tapifioctl(). If you are too lazy to introduce new > > ioctl command and code it support in ifconfig, in this case you can just > > use any of IFF_LINK0, IFF_LINK1, IFF_LINK2 flag to toggle this feature > > via SIOCSIFFLAGS. And then document it in tap(4). > > Note that I semi-purposely didn't document this in tap(4). I should > have pointed that out in the commit message, sorry. When I wrote this, Can you update the description of the sysctl? That way when we want to remove it, we can... Any sysctl that makes a release is an API that we need to provide compatibility for... :( -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:43:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA536CEF; Tue, 25 Nov 2014 22:43:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6C0129F; Tue, 25 Nov 2014 22:43:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMhIks032096; Tue, 25 Nov 2014 22:43:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMhInh032095; Tue, 25 Nov 2014 22:43:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252243.sAPMhInh032095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275087 - head/kerberos5/lib/libkrb5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:43:19 -0000 Author: bapt Date: Tue Nov 25 22:43:17 2014 New Revision: 275087 URL: https://svnweb.freebsd.org/changeset/base/275087 Log: Remove now useless USEPRIVATELIB Modified: head/kerberos5/lib/libkrb5/Makefile Modified: head/kerberos5/lib/libkrb5/Makefile ============================================================================== --- head/kerberos5/lib/libkrb5/Makefile Tue Nov 25 22:39:59 2014 (r275086) +++ head/kerberos5/lib/libkrb5/Makefile Tue Nov 25 22:43:17 2014 (r275087) @@ -626,4 +626,3 @@ CFLAGS+= -I${KRB5DIR}/lib/krb5 \ .include .PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include ${KRB5DIR}/doc/doxyout/krb5/man/man3/ -USEPRIVATELIB= heimipcc From owner-svn-src-head@FreeBSD.ORG Tue Nov 25 22:45:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D89ACE5F; Tue, 25 Nov 2014 22:45:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4A072D9; Tue, 25 Nov 2014 22:45:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMjaMJ032495; Tue, 25 Nov 2014 22:45:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMjaYh032493; Tue, 25 Nov 2014 22:45:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411252245.sAPMjaYh032493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 25 Nov 2014 22:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275088 - in head/tools/tools: mwl/mwlstats npe/npestats X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:45:37 -0000 Author: bapt Date: Tue Nov 25 22:45:35 2014 New Revision: 275088 URL: https://svnweb.freebsd.org/changeset/base/275088 Log: Convert to LIBADD Modified: head/tools/tools/mwl/mwlstats/Makefile head/tools/tools/npe/npestats/Makefile Modified: head/tools/tools/mwl/mwlstats/Makefile ============================================================================== --- head/tools/tools/mwl/mwlstats/Makefile Tue Nov 25 22:43:17 2014 (r275087) +++ head/tools/tools/mwl/mwlstats/Makefile Tue Nov 25 22:45:35 2014 (r275088) @@ -5,8 +5,7 @@ BINDIR= /usr/local/bin MAN= SRCS= main.c mwlstats.c -USEPRIVATELIB= -LDADD=-lbsdstat +LIBADD= bsdstat .include Modified: head/tools/tools/npe/npestats/Makefile ============================================================================== --- head/tools/tools/npe/npestats/Makefile Tue Nov 25 22:43:17 2014 (r275087) +++ head/tools/tools/npe/npestats/Makefile Tue Nov 25 22:45:35 2014 (r275088) @@ -4,7 +4,6 @@ PROG= npestats SRCS= main.c npestats.c BINDIR= /usr/local/bin MAN= -USEPRIVATELIB= -LDADD= -lbsdstat +LIBADD= bsdstat .include From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 02:20:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2087C5FB; Wed, 26 Nov 2014 02:20:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4BBBAC; Wed, 26 Nov 2014 02:20:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ2KPSX033239; Wed, 26 Nov 2014 02:20:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ2KPd4033238; Wed, 26 Nov 2014 02:20:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411260220.sAQ2KPd4033238@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 26 Nov 2014 02:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275096 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 02:20:26 -0000 Author: delphij Date: Wed Nov 26 02:20:25 2014 New Revision: 275096 URL: https://svnweb.freebsd.org/changeset/base/275096 Log: Revert r273060 per discussion with avg@ as we need to make L2ARC aware of 4K devices and this one is not the right fix anyway. 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 Nov 26 00:58:36 2014 (r275095) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Nov 26 02:20:25 2014 (r275096) @@ -5274,7 +5274,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 04:23:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23092D61; Wed, 26 Nov 2014 04:23:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE32A8D; Wed, 26 Nov 2014 04:23:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ4NONO093617; Wed, 26 Nov 2014 04:23:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ4NMBP093591; Wed, 26 Nov 2014 04:23:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411260423.sAQ4NMBP093591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Nov 2014 04:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275101 - in head/sys/dev: ahci ata ata/chipsets ichsmb ichwd sound/pci/hda uart 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 04:23:25 -0000 Author: mav Date: Wed Nov 26 04:23:21 2014 New Revision: 275101 URL: https://svnweb.freebsd.org/changeset/base/275101 Log: Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets. MFC after: 1 week Modified: head/sys/dev/ahci/ahci_pci.c head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-intel.c head/sys/dev/ichsmb/ichsmb_pci.c head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdac.h head/sys/dev/uart/uart_bus_pci.c head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/ahci/ahci_pci.c Wed Nov 26 04:23:21 2014 (r275101) @@ -148,6 +148,14 @@ static struct { {0x8c078086, 0x00, "Intel Lynx Point (RAID)", 0}, {0x8c0e8086, 0x00, "Intel Lynx Point (RAID)", 0}, {0x8c0f8086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8c828086, 0x00, "Intel Wildcat Point", 0}, + {0x8c838086, 0x00, "Intel Wildcat Point", 0}, + {0x8c848086, 0x00, "Intel Wildcat Point (RAID)", 0}, + {0x8c858086, 0x00, "Intel Wildcat Point (RAID)", 0}, + {0x8c868086, 0x00, "Intel Wildcat Point (RAID)", 0}, + {0x8c878086, 0x00, "Intel Wildcat Point (RAID)", 0}, + {0x8c8e8086, 0x00, "Intel Wildcat Point (RAID)", 0}, + {0x8c8f8086, 0x00, "Intel Wildcat Point (RAID)", 0}, {0x8d028086, 0x00, "Intel Wellsburg", 0}, {0x8d048086, 0x00, "Intel Wellsburg (RAID)", 0}, {0x8d068086, 0x00, "Intel Wellsburg (RAID)", 0}, Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/ata/ata-pci.h Wed Nov 26 04:23:21 2014 (r275101) @@ -275,6 +275,19 @@ struct ata_pci_controller { #define ATA_LPT_R5 0x8c0e8086 #define ATA_LPT_R6 0x8c0f8086 +#define ATA_WCPT_S1 0x8c808086 +#define ATA_WCPT_S2 0x8c818086 +#define ATA_WCPT_AH1 0x8c828086 +#define ATA_WCPT_AH2 0x8c838086 +#define ATA_WCPT_R1 0x8c848086 +#define ATA_WCPT_R2 0x8c858086 +#define ATA_WCPT_R3 0x8c868086 +#define ATA_WCPT_R4 0x8c878086 +#define ATA_WCPT_S3 0x8c888086 +#define ATA_WCPT_S4 0x8c898086 +#define ATA_WCPT_R5 0x8c8e8086 +#define ATA_WCPT_R6 0x8c8f8086 + #define ATA_WELLS_S1 0x8d008086 #define ATA_WELLS_S2 0x8d088086 #define ATA_WELLS_S3 0x8d608086 Modified: head/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-intel.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/ata/chipsets/ata-intel.c Wed Nov 26 04:23:21 2014 (r275101) @@ -227,6 +227,18 @@ ata_intel_probe(device_t dev) { ATA_LPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_WCPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_R4, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, + { ATA_WCPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, { ATA_WELLS_S1, 0, INTEL_6CH, 0, ATA_SA300, "Wellsburg" }, { ATA_WELLS_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Wellsburg" }, { ATA_WELLS_S3, 0, INTEL_6CH, 0, ATA_SA300, "Wellsburg" }, Modified: head/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- head/sys/dev/ichsmb/ichsmb_pci.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/ichsmb/ichsmb_pci.c Wed Nov 26 04:23:21 2014 (r275101) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #define ID_AVOTON 0x1f3c8086 #define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 +#define ID_WCPT 0x8ca28086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -197,6 +198,9 @@ ichsmb_pci_probe(device_t dev) case ID_LPT: device_set_desc(dev, "Intel Lynx Point SMBus controller"); break; + case ID_WCPT: + device_set_desc(dev, "Intel Wildcat Point SMBus controller"); + break; case ID_COLETOCRK: device_set_desc(dev, "Intel Coleto Creek SMBus controller"); break; Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/ichwd/ichwd.c Wed Nov 26 04:23:21 2014 (r275101) @@ -194,6 +194,9 @@ static struct ichwd_device ichwd_devices { DEVICEID_LPT0, "Intel Lynx Point watchdog timer", 10 }, { DEVICEID_LPT1, "Intel Lynx Point watchdog timer", 10 }, { DEVICEID_LPT2, "Intel Lynx Point watchdog timer", 10 }, + { DEVICEID_WCPT2, "Intel Wildcat Point watchdog timer", 10 }, + { DEVICEID_WCPT4, "Intel Wildcat Point watchdog timer", 10 }, + { DEVICEID_WCPT6, "Intel Wildcat Point watchdog timer", 10 }, { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, { DEVICEID_COLETOCRK_LPC, "Intel Coleto Creek watchdog timer", 10 }, { 0, NULL, 0 }, Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/ichwd/ichwd.h Wed Nov 26 04:23:21 2014 (r275101) @@ -210,6 +210,9 @@ struct ichwd_softc { #define DEVICEID_LPT29 0x8c5d #define DEVICEID_LPT30 0x8c5e #define DEVICEID_LPT31 0x8c5f +#define DEVICEID_WCPT2 0x8cc2 +#define DEVICEID_WCPT4 0x8cc4 +#define DEVICEID_WCPT6 0x8cc6 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ #define ICH_GEN_STA 0xd4 Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/sound/pci/hda/hdac.c Wed Nov 26 04:23:21 2014 (r275101) @@ -86,6 +86,7 @@ static const struct { { HDA_INTEL_PPT1, "Intel Panther Point", 0, 0 }, { HDA_INTEL_LPT1, "Intel Lynx Point", 0, 0 }, { HDA_INTEL_LPT2, "Intel Lynx Point", 0, 0 }, + { HDA_INTEL_WCPT, "Intel Wildcat Point", 0, 0 }, { HDA_INTEL_WELLS1, "Intel Wellsburg", 0, 0 }, { HDA_INTEL_WELLS2, "Intel Wellsburg", 0, 0 }, { HDA_INTEL_LPTLP1, "Intel Lynx Point-LP", 0, 0 }, Modified: head/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.h Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/sound/pci/hda/hdac.h Wed Nov 26 04:23:21 2014 (r275101) @@ -62,6 +62,7 @@ #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20) #define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21) +#define HDA_INTEL_WCPT HDA_MODEL_CONSTRUCT(INTEL, 0x8ca0) #define HDA_INTEL_WELLS1 HDA_MODEL_CONSTRUCT(INTEL, 0x8d20) #define HDA_INTEL_WELLS2 HDA_MODEL_CONSTRUCT(INTEL, 0x8d21) #define HDA_INTEL_LPTLP1 HDA_MODEL_CONSTRUCT(INTEL, 0x9c20) Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/uart/uart_bus_pci.c Wed Nov 26 04:23:21 2014 (r275101) @@ -127,6 +127,7 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 }, { 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 }, { 0x8086, 0x8c3d, 0xffff, 0, "Intel Lynx Point KT Controller", 0x10 }, +{ 0x8086, 0x8cbd, 0xffff, 0, "Intel Wildcat Point KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/usb/controller/ehci_pci.c Wed Nov 26 04:23:21 2014 (r275101) @@ -164,6 +164,10 @@ ehci_pci_match(device_t self) return ("Intel Lynx Point USB 2.0 controller USB-A"); case 0x8c2d8086: return ("Intel Lynx Point USB 2.0 controller USB-B"); + case 0x8ca68086: + return ("Intel Wildcat Point USB 2.0 controller USB-A"); + case 0x8cad8086: + return ("Intel Wildcat Point USB 2.0 controller USB-B"); case 0x00e01033: return ("NEC uPD 720100 USB 2.0 controller"); Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Wed Nov 26 03:38:12 2014 (r275100) +++ head/sys/dev/usb/controller/xhci_pci.c Wed Nov 26 04:23:21 2014 (r275101) @@ -109,6 +109,8 @@ xhci_pci_match(device_t self) return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); + case 0x8cb18086: + return ("Intel Wildcat Point USB 3.0 controller"); default: break; From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 08:09:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42C9DC7D; Wed, 26 Nov 2014 08:09:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EF75D3; Wed, 26 Nov 2014 08:09:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ89jo1096158; Wed, 26 Nov 2014 08:09:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ89jOw096157; Wed, 26 Nov 2014 08:09:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411260809.sAQ89jOw096157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 26 Nov 2014 08:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275103 - head/lib/libpam/libpam/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 08:09:45 -0000 Author: bapt Date: Wed Nov 26 08:09:44 2014 New Revision: 275103 URL: https://svnweb.freebsd.org/changeset/base/275103 Log: Convert to LIBADD Modified: head/lib/libpam/libpam/tests/Makefile Modified: head/lib/libpam/libpam/tests/Makefile ============================================================================== --- head/lib/libpam/libpam/tests/Makefile Wed Nov 26 06:54:17 2014 (r275102) +++ head/lib/libpam/libpam/tests/Makefile Wed Nov 26 08:09:44 2014 (r275103) @@ -13,7 +13,6 @@ SRCS.${test} = ${test}.c ${COMMONSRC} CFLAGS +=-I${OPENPAM}/include -I${OPENPAM}/lib/libpam -I${OPENPAM}/t WARNS ?= 6 -DPADD = ${LIBPAM} -LDADD = ${MINUSLPAM} +LIBADD = pam .include From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 08:12:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D39CDD1; Wed, 26 Nov 2014 08:12:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FAD4177; Wed, 26 Nov 2014 08:12:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ8CNJI099986; Wed, 26 Nov 2014 08:12:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ8CMtP099983; Wed, 26 Nov 2014 08:12:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411260812.sAQ8CMtP099983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 26 Nov 2014 08:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275104 - in head/release/picobsd/tinyware: login oinit passwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 08:12:23 -0000 Author: bapt Date: Wed Nov 26 08:12:21 2014 New Revision: 275104 URL: https://svnweb.freebsd.org/changeset/base/275104 Log: Convert to LIBADD Modified: head/release/picobsd/tinyware/login/Makefile head/release/picobsd/tinyware/oinit/Makefile head/release/picobsd/tinyware/passwd/Makefile Modified: head/release/picobsd/tinyware/login/Makefile ============================================================================== --- head/release/picobsd/tinyware/login/Makefile Wed Nov 26 08:09:44 2014 (r275103) +++ head/release/picobsd/tinyware/login/Makefile Wed Nov 26 08:12:21 2014 (r275104) @@ -11,13 +11,11 @@ MAN= login.1 CFLAGS+=-DLOGALL -DPADD= ${LIBUTIL} ${LIBCRYPT} -LDADD= -lutil -lcrypt +LIBADD= util crypt .if ${MK_PAM_SUPPORT} != "no" CFLAGS+= -DUSE_PAM -DPADD+= ${LIBPAM} -LDADD+= ${MINUSLPAM} +LIBADD+= pam .endif BINOWN= root Modified: head/release/picobsd/tinyware/oinit/Makefile ============================================================================== --- head/release/picobsd/tinyware/oinit/Makefile Wed Nov 26 08:09:44 2014 (r275103) +++ head/release/picobsd/tinyware/oinit/Makefile Wed Nov 26 08:12:21 2014 (r275104) @@ -14,7 +14,7 @@ CFLAGS= -DSH_PATH=\"${SH_PATH}\" -DSH_N #CFLAGS+= -DOINIT_RC=\"/etc/oinit.rc\" #LDADD= -lutil -ledit -ltermcap -LDADD=-lutil +LIBADD= util MAN= .include Modified: head/release/picobsd/tinyware/passwd/Makefile ============================================================================== --- head/release/picobsd/tinyware/passwd/Makefile Wed Nov 26 08:09:44 2014 (r275103) +++ head/release/picobsd/tinyware/passwd/Makefile Wed Nov 26 08:12:21 2014 (r275104) @@ -11,8 +11,7 @@ GENSRCS=yp.h yp_clnt.c yppasswd.h yppass yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c CFLAGS+=-Wall -DPADD= ${LIBCRYPT} ${LIBUTIL} -LDADD= -lcrypt -lutil +LIBADD= crypt util .PATH: ${.CURDIR}/../../../../usr.bin/chpass \ # ${.CURDIR}/../../../../usr.sbin/vipw \ # ${.CURDIR}/../../../../usr.bin/passwd From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 08:14:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEB86F24; Wed, 26 Nov 2014 08:14:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BACE3185; Wed, 26 Nov 2014 08:14:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ8EVv7000386; Wed, 26 Nov 2014 08:14:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ8EV2G000385; Wed, 26 Nov 2014 08:14:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411260814.sAQ8EV2G000385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 26 Nov 2014 08:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275105 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 08:14:31 -0000 Author: bapt Date: Wed Nov 26 08:14:30 2014 New Revision: 275105 URL: https://svnweb.freebsd.org/changeset/base/275105 Log: Remove MINUSLPAM the LIBADD framework handles static dependencies just fine Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Wed Nov 26 08:12:21 2014 (r275104) +++ head/share/mk/bsd.libnames.mk Wed Nov 26 08:14:30 2014 (r275105) @@ -91,33 +91,7 @@ LIBNGATM?= ${DESTDIR}${LIBDIR}/libngatm. LIBNV?= ${DESTDIR}${LIBDIR}/libnv.a LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpair.a LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a - -# The static PAM library doesn't know its secondary dependencies, -# so we have to specify them explicitly. Ths is an unfortunate, -# but necessary departure from testing MK_ flags to define -# values here. LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a -MINUSLPAM= -lpam -.if defined(LDFLAGS) && !empty(LDFLAGS:M-static) -.if ${MK_KERBEROS} != "no" -LIBPAM+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} \ - ${LIBROKEN} ${LIBCOM_ERR} -MINUSLPAM+= -lkrb5 -lhx509 -lasn1 -lcrypto -lcrypt -lroken -lcom_err -.endif -LIBPAM+= ${LIBRADIUS} ${LIBTACPLUS} ${LIBCRYPT} \ - ${LIBUTIL} ${LIBOPIE} ${LIBMD} -MINUSLPAM+= -lradius -ltacplus -lcrypt \ - -lutil -lopie -lmd -.if ${MK_OPENSSH} != "no" -LIBPAM+= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT} -MINUSLPAM+= -lssh -lcrypto -lcrypt -.endif -.if ${MK_NIS} != "no" -LIBPAM+= ${LIBYPCLNT} -MINUSLPAM+= -lypclnt -.endif -.endif - LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 09:51:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A65C4D2; Wed, 26 Nov 2014 09:51:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 058D1D3F; Wed, 26 Nov 2014 09:51:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ9pdpk046752; Wed, 26 Nov 2014 09:51:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ9pcKP046747; Wed, 26 Nov 2014 09:51:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411260951.sAQ9pcKP046747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 26 Nov 2014 09:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275109 - head/contrib/ofed/libmlx4/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 09:51:40 -0000 Author: hselasky Date: Wed Nov 26 09:51:38 2014 New Revision: 275109 URL: https://svnweb.freebsd.org/changeset/base/275109 Log: Add support for 64-byte CQE size. Sponsored by: Mellanox Technologies MFC after: 3 days Modified: head/contrib/ofed/libmlx4/src/cq.c head/contrib/ofed/libmlx4/src/mlx4-abi.h head/contrib/ofed/libmlx4/src/mlx4.c head/contrib/ofed/libmlx4/src/mlx4.h head/contrib/ofed/libmlx4/src/verbs.c Modified: head/contrib/ofed/libmlx4/src/cq.c ============================================================================== --- head/contrib/ofed/libmlx4/src/cq.c Wed Nov 26 09:43:31 2014 (r275108) +++ head/contrib/ofed/libmlx4/src/cq.c Wed Nov 26 09:51:38 2014 (r275109) @@ -109,15 +109,16 @@ struct mlx4_err_cqe { static struct mlx4_cqe *get_cqe(struct mlx4_cq *cq, int entry) { - return cq->buf.buf + entry * MLX4_CQ_ENTRY_SIZE; + return cq->buf.buf + entry * cq->cqe_size; } static void *get_sw_cqe(struct mlx4_cq *cq, int n) { struct mlx4_cqe *cqe = get_cqe(cq, n & cq->ibv_cq.cqe); + struct mlx4_cqe *tcqe = cq->cqe_size == 64 ? cqe + 1 : cqe; - return (!!(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK) ^ - !!(n & (cq->ibv_cq.cqe + 1))) ? NULL : cqe; + return (!!(tcqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK) ^ + !!(n & (cq->ibv_cq.cqe + 1))) ? NULL : tcqe; } static struct mlx4_cqe *next_cqe_sw(struct mlx4_cq *cq) @@ -402,6 +403,7 @@ void __mlx4_cq_clean(struct mlx4_cq *cq, uint8_t owner_bit; int nfreed = 0; int is_xrc_srq = 0; + int cqe_inc = cq->cqe_size == 64 ? 1 : 0; if (srq && srq->ibv_srq.xrc_cq) is_xrc_srq = 1; @@ -423,6 +425,7 @@ void __mlx4_cq_clean(struct mlx4_cq *cq, */ while ((int) --prod_index - (int) cq->cons_index >= 0) { cqe = get_cqe(cq, prod_index & cq->ibv_cq.cqe); + cqe += cqe_inc; if (is_xrc_srq && (ntohl(cqe->g_mlpath_rqpn & 0xffffff) == srq->srqn) && !(cqe->owner_sr_opcode & MLX4_CQE_IS_SEND_MASK)) { @@ -434,6 +437,7 @@ void __mlx4_cq_clean(struct mlx4_cq *cq, ++nfreed; } else if (nfreed) { dest = get_cqe(cq, (prod_index + nfreed) & cq->ibv_cq.cqe); + dest += cqe_inc; owner_bit = dest->owner_sr_opcode & MLX4_CQE_OWNER_MASK; memcpy(dest, cqe, sizeof *cqe); dest->owner_sr_opcode = owner_bit | @@ -473,28 +477,32 @@ void mlx4_cq_resize_copy_cqes(struct mlx { struct mlx4_cqe *cqe; int i; + int cqe_inc = cq->cqe_size == 64 ? 1 : 0; i = cq->cons_index; cqe = get_cqe(cq, (i & old_cqe)); + cqe += cqe_inc; while ((cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) != MLX4_CQE_OPCODE_RESIZE) { cqe->owner_sr_opcode = (cqe->owner_sr_opcode & ~MLX4_CQE_OWNER_MASK) | (((i + 1) & (cq->ibv_cq.cqe + 1)) ? MLX4_CQE_OWNER_MASK : 0); - memcpy(buf + ((i + 1) & cq->ibv_cq.cqe) * MLX4_CQ_ENTRY_SIZE, - cqe, MLX4_CQ_ENTRY_SIZE); + memcpy(buf + ((i + 1) & cq->ibv_cq.cqe) * cq->cqe_size, + cqe - cqe_inc, cq->cqe_size); ++i; cqe = get_cqe(cq, (i & old_cqe)); + cqe += cqe_inc; } ++cq->cons_index; } -int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent) +int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent, + int entry_size) { - if (mlx4_alloc_buf(buf, align(nent * MLX4_CQ_ENTRY_SIZE, dev->page_size), + if (mlx4_alloc_buf(buf, align(nent * entry_size, dev->page_size), dev->page_size)) return -1; - memset(buf->buf, 0, nent * MLX4_CQ_ENTRY_SIZE); + memset(buf->buf, 0, nent * entry_size); return 0; } Modified: head/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4-abi.h Wed Nov 26 09:43:31 2014 (r275108) +++ head/contrib/ofed/libmlx4/src/mlx4-abi.h Wed Nov 26 09:51:38 2014 (r275109) @@ -40,9 +40,11 @@ struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; + __u32 dev_caps; __u32 qp_tab_size; __u16 bf_reg_size; __u16 bf_regs_per_page; + __u32 cqe_size; }; struct mlx4_alloc_pd_resp { Modified: head/contrib/ofed/libmlx4/src/mlx4.c ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4.c Wed Nov 26 09:43:31 2014 (r275108) +++ head/contrib/ofed/libmlx4/src/mlx4.c Wed Nov 26 09:51:38 2014 (r275109) @@ -201,6 +201,7 @@ static struct ibv_context *mlx4_alloc_co context->bf_buf_size = 0; } + context->cqe_size = resp.cqe_size; pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE); context->ibv_ctx.ops = mlx4_ctx_ops; Modified: head/contrib/ofed/libmlx4/src/mlx4.h ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4.h Wed Nov 26 09:43:31 2014 (r275108) +++ head/contrib/ofed/libmlx4/src/mlx4.h Wed Nov 26 09:51:38 2014 (r275109) @@ -103,10 +103,6 @@ #endif enum { - MLX4_CQ_ENTRY_SIZE = 0x20 -}; - -enum { MLX4_STAT_RATE_OFFSET = 5 }; @@ -192,6 +188,7 @@ struct mlx4_context { int max_qp_wr; int max_sge; int max_cqe; + int cqe_size; struct { struct mlx4_srq **table; @@ -226,6 +223,7 @@ struct mlx4_cq { uint32_t *set_ci_db; uint32_t *arm_db; int arm_sn; + int cqe_size; }; struct mlx4_srq { @@ -369,7 +367,8 @@ int mlx4_dereg_mr(struct ibv_mr *mr); struct ibv_cq *mlx4_create_cq(struct ibv_context *context, int cqe, struct ibv_comp_channel *channel, int comp_vector); -int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent); +int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent, + int entry_size); int mlx4_resize_cq(struct ibv_cq *cq, int cqe); int mlx4_destroy_cq(struct ibv_cq *cq); int mlx4_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc); Modified: head/contrib/ofed/libmlx4/src/verbs.c ============================================================================== --- head/contrib/ofed/libmlx4/src/verbs.c Wed Nov 26 09:43:31 2014 (r275108) +++ head/contrib/ofed/libmlx4/src/verbs.c Wed Nov 26 09:51:38 2014 (r275109) @@ -168,6 +168,7 @@ struct ibv_cq *mlx4_create_cq(struct ibv struct mlx4_create_cq_resp resp; struct mlx4_cq *cq; int ret; + struct mlx4_context *mctx = to_mctx(context); /* Sanity check CQ size before proceeding */ if (cqe > 0x3fffff) @@ -184,9 +185,11 @@ struct ibv_cq *mlx4_create_cq(struct ibv cqe = align_queue_size(cqe + 1); - if (mlx4_alloc_cq_buf(to_mdev(context->device), &cq->buf, cqe)) + if (mlx4_alloc_cq_buf(to_mdev(context->device), &cq->buf, cqe, mctx->cqe_size)) goto err; + cq->cqe_size = mctx->cqe_size; + cq->set_ci_db = mlx4_alloc_db(to_mctx(context), MLX4_DB_TYPE_CQ); if (!cq->set_ci_db) goto err_buf; @@ -247,7 +250,8 @@ int mlx4_resize_cq(struct ibv_cq *ibcq, goto out; } - ret = mlx4_alloc_cq_buf(to_mdev(ibcq->context->device), &buf, cqe); + ret = mlx4_alloc_cq_buf(to_mdev(ibcq->context->device), &buf, cqe, + cq->cqe_size); if (ret) goto out; From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 10:58:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D86E524F; Wed, 26 Nov 2014 10:58:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4ED4695; Wed, 26 Nov 2014 10:58:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQAw9hi075831; Wed, 26 Nov 2014 10:58:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQAw96e075829; Wed, 26 Nov 2014 10:58:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411261058.sAQAw96e075829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 26 Nov 2014 10:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275110 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 10:58:10 -0000 Author: hselasky Date: Wed Nov 26 10:58:08 2014 New Revision: 275110 URL: https://svnweb.freebsd.org/changeset/base/275110 Log: Add new USB quirk. MFC after: 1 week PR: 195372 Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Nov 26 09:51:38 2014 (r275109) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Nov 26 10:58:08 2014 (r275110) @@ -253,6 +253,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(LEXAR, CF_READER, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(LEXAR, JUMPSHOT, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(LEXAR, JUMPDRIVE, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(LOGITEC, LDR_H443SU2, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(LOGITEC, LDR_H443U2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Nov 26 09:51:38 2014 (r275109) +++ head/sys/dev/usb/usbdevs Wed Nov 26 10:58:08 2014 (r275110) @@ -2604,6 +2604,7 @@ product LENOVO ETHERNET 0x7203 USB 2.0 /* Lexar products */ product LEXAR JUMPSHOT 0x0001 jumpSHOT CompactFlash Reader product LEXAR CF_READER 0xb002 USB CF Reader +product LEXAR JUMPDRIVE 0xa833 USB Jumpdrive Flash Drive /* Lexmark products */ product LEXMARK S2450 0x0009 Optra S 2450 From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 12:25:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3541A2F0; Wed, 26 Nov 2014 12:25:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2247C96; Wed, 26 Nov 2014 12:25:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQCP06q018493; Wed, 26 Nov 2014 12:25:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQCP0xr018492; Wed, 26 Nov 2014 12:25:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411261225.sAQCP0xr018492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Nov 2014 12:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275112 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 12:25:01 -0000 Author: mav Date: Wed Nov 26 12:25:00 2014 New Revision: 275112 URL: https://svnweb.freebsd.org/changeset/base/275112 Log: Make isp_find_pdb_by_*() search for targets in portdb in reverse order. Records with target_mode == 1 are allocated from the end of portdb, so it seems logical to start search from the end not traverse whole array. MFC after: 1 month Modified: head/sys/dev/isp/isp_library.c Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Wed Nov 26 11:41:12 2014 (r275111) +++ head/sys/dev/isp/isp_library.c Wed Nov 26 12:25:00 2014 (r275112) @@ -2369,7 +2369,7 @@ isp_find_pdb_by_wwn(ispsoftc_t *isp, int if (chan < isp->isp_nchan) { fcp = FCPARAM(isp, chan); - for (i = 0; i < MAX_FC_TARG; i++) { + for (i = MAX_FC_TARG - 1; i >= 0; i--) { fcportdb_t *lp = &fcp->portdb[i]; if (lp->target_mode == 0) { @@ -2392,7 +2392,7 @@ isp_find_pdb_by_loopid(ispsoftc_t *isp, if (chan < isp->isp_nchan) { fcp = FCPARAM(isp, chan); - for (i = 0; i < MAX_FC_TARG; i++) { + for (i = MAX_FC_TARG - 1; i >= 0; i--) { fcportdb_t *lp = &fcp->portdb[i]; if (lp->target_mode == 0) { @@ -2418,7 +2418,7 @@ isp_find_pdb_by_sid(ispsoftc_t *isp, int } fcp = FCPARAM(isp, chan); - for (i = 0; i < MAX_FC_TARG; i++) { + for (i = MAX_FC_TARG - 1; i >= 0; i--) { fcportdb_t *lp = &fcp->portdb[i]; if (lp->target_mode == 0) { From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 13:56:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 621D3C63; Wed, 26 Nov 2014 13:56:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EA63C6A; Wed, 26 Nov 2014 13:56:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQDutCu065880; Wed, 26 Nov 2014 13:56:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQDusYQ065878; Wed, 26 Nov 2014 13:56:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411261356.sAQDusYQ065878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Nov 2014 13:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275118 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 13:56:55 -0000 Author: mav Date: Wed Nov 26 13:56:54 2014 New Revision: 275118 URL: https://svnweb.freebsd.org/changeset/base/275118 Log: Some microoptimizations. MFC after: 1 month Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Nov 26 13:26:12 2014 (r275117) +++ head/sys/dev/isp/isp_freebsd.c Wed Nov 26 13:56:54 2014 (r275118) @@ -894,7 +894,7 @@ is_lun_enabled(ispsoftc_t *isp, int bus, ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); SLIST_FOREACH(tptr, lhp, next) { - if (xpt_path_lun_id(tptr->owner) == lun) { + if (tptr->ts_lun == lun) { return (1); } } @@ -926,16 +926,13 @@ get_lun_statep(ispsoftc_t *isp, int bus, { tstate_t *tptr = NULL; struct tslist *lhp; - int i; if (bus < isp->isp_nchan) { - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - if (xpt_path_lun_id(tptr->owner) == lun) { - tptr->hold++; - return (tptr); - } + ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); + SLIST_FOREACH(tptr, lhp, next) { + if (tptr->ts_lun == lun) { + tptr->hold++; + return (tptr); } } } @@ -1149,6 +1146,7 @@ create_lun_state(ispsoftc_t *isp, int bu if (tptr == NULL) { return (CAM_RESRC_UNAVAIL); } + tptr->ts_lun = lun; status = xpt_create_path(&tptr->owner, NULL, xpt_path_path_id(path), xpt_path_target_id(path), lun); if (status != CAM_REQ_CMP) { free(tptr, M_DEVBUF); @@ -1166,7 +1164,7 @@ create_lun_state(ispsoftc_t *isp, int bu tptr->ntpool[i].next = &tptr->ntpool[i+1]; tptr->ntfree = tptr->ntpool; tptr->hold = 1; - ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); + ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); SLIST_INSERT_HEAD(lhp, tptr, next); *rslt = tptr; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, path, "created tstate\n"); @@ -1197,7 +1195,7 @@ destroy_lun_state(ispsoftc_t *isp, tstat xpt_done(ccb); } } while (ccb); - ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); + ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(tptr->ts_lun)], lhp); SLIST_REMOVE(lhp, tptr, tstate, next); ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, tptr->owner, "destroyed tstate\n"); xpt_free_path(tptr->owner); @@ -1373,7 +1371,7 @@ isp_enable_deferred_luns(ispsoftc_t *isp SLIST_FOREACH(tptr, lhp, next) { tptr->hold++; if (tptr->enabled == 0) { - if (isp_enable_deferred(isp, bus, xpt_path_lun_id(tptr->owner)) == CAM_REQ_CMP) { + if (isp_enable_deferred(isp, bus, tptr->ts_lun) == CAM_REQ_CMP) { tptr->enabled = 1; n++; } @@ -6042,7 +6040,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm */ tptr = get_lun_statep_from_tag(isp, chan, abts->abts_rxid_task); if (tptr) { - nt->nt_lun = xpt_path_lun_id(tptr->owner); + nt->nt_lun = tptr->ts_lun; rls_lun_statep(isp, tptr); } else { nt->nt_lun = LUN_ANY; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Wed Nov 26 13:26:12 2014 (r275117) +++ head/sys/dev/isp/isp_freebsd.h Wed Nov 26 13:56:54 2014 (r275118) @@ -95,7 +95,7 @@ void isp_put_ecmd(struct ispsoftc *, is #define ISP_TARGET_FUNCTIONS 1 #define ATPDPSIZE 4096 -#define ATPDPHASHSIZE 16 +#define ATPDPHASHSIZE 32 #define ATPDPHASH(x) ((((x) >> 24) ^ ((x) >> 16) ^ ((x) >> 8) ^ (x)) & \ ((ATPDPHASHSIZE) - 1)) @@ -164,6 +164,7 @@ typedef struct isp_timed_notify_ack { TAILQ_HEAD(isp_ccbq, ccb_hdr); typedef struct tstate { SLIST_ENTRY(tstate) next; + lun_id_t ts_lun; struct cam_path *owner; struct isp_ccbq waitq; /* waiting CCBs */ struct ccb_hdr_slist atios; From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 14:09:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3CF81A9; Wed, 26 Nov 2014 14:09:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B093FDA7; Wed, 26 Nov 2014 14:09:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQE95FL070877; Wed, 26 Nov 2014 14:09:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQE95jv070876; Wed, 26 Nov 2014 14:09:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411261409.sAQE95jv070876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 26 Nov 2014 14:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275120 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 14:09:06 -0000 Author: kib Date: Wed Nov 26 14:09:04 2014 New Revision: 275120 URL: https://svnweb.freebsd.org/changeset/base/275120 Log: Fix SA_SIGINFO | SA_RESETHAND handling. The sysent' sv_sendsig() method needs pre-reset state of the ps_siginfo to correctly construct signal frame. Move sigdflt() call after the sv_sendsig() invocation in postsig(). Simultaneously extract common code from trapsignal() and postsig() into new helper postsig_done(). Submitted by: rea MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Nov 26 14:01:27 2014 (r275119) +++ head/sys/kern/kern_sig.c Wed Nov 26 14:09:04 2014 (r275120) @@ -1882,6 +1882,30 @@ pgsignal(struct pgrp *pgrp, int sig, int } } + +/* + * Recalculate the signal mask and reset the signal disposition after + * usermode frame for delivery is formed. Should be called after + * mach-specific routine, because sysent->sv_sendsig() needs correct + * ps_siginfo and signal mask. + */ +static void +postsig_done(int sig, struct thread *td, struct sigacts *ps) +{ + sigset_t mask; + + mtx_assert(&ps->ps_mtx, MA_OWNED); + td->td_ru.ru_nsignals++; + mask = ps->ps_catchmask[_SIG_IDX(sig)]; + if (!SIGISMEMBER(ps->ps_signodefer, sig)) + SIGADDSET(mask, sig); + kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, + SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); + if (SIGISMEMBER(ps->ps_sigreset, sig)) + sigdflt(ps, sig); +} + + /* * Send a signal caused by a trap to the current thread. If it will be * caught immediately, deliver it with correct code. Otherwise, post it @@ -1891,7 +1915,6 @@ void trapsignal(struct thread *td, ksiginfo_t *ksi) { struct sigacts *ps; - sigset_t mask; struct proc *p; int sig; int code; @@ -1906,7 +1929,6 @@ trapsignal(struct thread *td, ksiginfo_t mtx_lock(&ps->ps_mtx); if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(ps->ps_sigcatch, sig) && !SIGISMEMBER(td->td_sigmask, sig)) { - td->td_ru.ru_nsignals++; #ifdef KTRACE if (KTRPOINT(curthread, KTR_PSIG)) ktrpsig(sig, ps->ps_sigact[_SIG_IDX(sig)], @@ -1914,13 +1936,7 @@ trapsignal(struct thread *td, ksiginfo_t #endif (*p->p_sysent->sv_sendsig)(ps->ps_sigact[_SIG_IDX(sig)], ksi, &td->td_sigmask); - mask = ps->ps_catchmask[_SIG_IDX(sig)]; - if (!SIGISMEMBER(ps->ps_signodefer, sig)) - SIGADDSET(mask, sig); - kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, - SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); - if (SIGISMEMBER(ps->ps_sigreset, sig)) - sigdflt(ps, sig); + postsig_done(sig, td, ps); mtx_unlock(&ps->ps_mtx); } else { /* @@ -2802,7 +2818,7 @@ postsig(sig) struct sigacts *ps; sig_t action; ksiginfo_t ksi; - sigset_t returnmask, mask; + sigset_t returnmask; KASSERT(sig != 0, ("postsig")); @@ -2857,20 +2873,12 @@ postsig(sig) } else returnmask = td->td_sigmask; - mask = ps->ps_catchmask[_SIG_IDX(sig)]; - if (!SIGISMEMBER(ps->ps_signodefer, sig)) - SIGADDSET(mask, sig); - kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, - SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); - - if (SIGISMEMBER(ps->ps_sigreset, sig)) - sigdflt(ps, sig); - td->td_ru.ru_nsignals++; if (p->p_sig == sig) { p->p_code = 0; p->p_sig = 0; } (*p->p_sysent->sv_sendsig)(action, &ksi, &returnmask); + postsig_done(sig, td, ps); } return (1); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 14:10:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0E552FF; Wed, 26 Nov 2014 14:10:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB8A9DB3; Wed, 26 Nov 2014 14:10:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQEA4tt071116; Wed, 26 Nov 2014 14:10:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQEA0JO071065; Wed, 26 Nov 2014 14:10:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411261410.sAQEA0JO071065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 26 Nov 2014 14:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275121 - in head/sys: compat/linux compat/svr4 fs/procfs 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 14:10:05 -0000 Author: kib Date: Wed Nov 26 14:10:00 2014 New Revision: 275121 URL: https://svnweb.freebsd.org/changeset/base/275121 Log: The process spin lock currently has the following distinct uses: - Threads lifetime cycle, in particular, counting of the threads in the process, and interlocking with process mutex and thread lock. The main reason of this is that turnstile locks are after thread locks, so you e.g. cannot unlock blockable mutex (think process mutex) while owning thread lock. - Virtual and profiling itimers, since the timers activation is done from the clock interrupt context. Replace the p_slock by p_itimmtx and PROC_ITIMLOCK(). - Profiling code (profil(2)), for similar reason. Replace the p_slock by p_profmtx and PROC_PROFLOCK(). - Resource usage accounting. Need for the spinlock there is subtle, my understanding is that spinlock blocks context switching for the current thread, which prevents td_runtime and similar fields from changing (updates are done at the mi_switch()). Replace the p_slock by p_statmtx and PROC_STATLOCK(). The split is done mostly for code clarity, and should not affect scalability. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/svr4/svr4_misc.c head/sys/fs/procfs/procfs_status.c head/sys/kern/init_main.c head/sys/kern/kern_clock.c head/sys/kern/kern_exit.c head/sys/kern/kern_mutex.c head/sys/kern/kern_proc.c head/sys/kern/kern_racct.c head/sys/kern/kern_resource.c head/sys/kern/kern_thread.c head/sys/kern/kern_time.c head/sys/kern/subr_prof.c head/sys/sys/proc.h head/sys/sys/resourcevar.h Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/compat/linux/linux_misc.c Wed Nov 26 14:10:00 2014 (r275121) @@ -690,9 +690,9 @@ linux_times(struct thread *td, struct li if (args->buf != NULL) { p = td->td_proc; PROC_LOCK(p); - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &utime, &stime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); calccru(p, &cutime, &cstime); PROC_UNLOCK(p); Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/compat/svr4/svr4_misc.c Wed Nov 26 14:10:00 2014 (r275121) @@ -864,9 +864,9 @@ svr4_sys_times(td, uap) p = td->td_proc; PROC_LOCK(p); - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &utime, &stime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); calccru(p, &cutime, &cstime); PROC_UNLOCK(p); @@ -1277,9 +1277,9 @@ loop: pid = p->p_pid; status = p->p_xstat; ru = p->p_ru; - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &ru.ru_utime, &ru.ru_stime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); PROC_UNLOCK(p); sx_sunlock(&proctree_lock); @@ -1304,9 +1304,9 @@ loop: pid = p->p_pid; status = W_STOPCODE(p->p_xstat); ru = p->p_ru; - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &ru.ru_utime, &ru.ru_stime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); PROC_UNLOCK(p); if (((uap->options & SVR4_WNOWAIT)) == 0) { @@ -1328,9 +1328,9 @@ loop: pid = p->p_pid; ru = p->p_ru; status = SIGCONT; - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &ru.ru_utime, &ru.ru_stime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); PROC_UNLOCK(p); if (((uap->options & SVR4_WNOWAIT)) == 0) { Modified: head/sys/fs/procfs/procfs_status.c ============================================================================== --- head/sys/fs/procfs/procfs_status.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/fs/procfs/procfs_status.c Wed Nov 26 14:10:00 2014 (r275121) @@ -125,9 +125,9 @@ procfs_doprocstatus(PFS_FILL_ARGS) if (p->p_flag & P_INMEM) { struct timeval start, ut, st; - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &ut, &st); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); start = p->p_stats->p_start; timevaladd(&start, &boottime); sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld", Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/init_main.c Wed Nov 26 14:10:00 2014 (r275121) @@ -603,9 +603,9 @@ proc0_post(void *dummy __unused) sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { microuptime(&p->p_stats->p_start); - PROC_SLOCK(p); + PROC_STATLOCK(p); rufetch(p, &ru); /* Clears thread stats */ - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); p->p_rux.rux_runtime = 0; p->p_rux.rux_uticks = 0; p->p_rux.rux_sticks = 0; Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_clock.c Wed Nov 26 14:10:00 2014 (r275121) @@ -432,16 +432,16 @@ hardclock_cpu(int usermode) flags = 0; if (usermode && timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value)) { - PROC_SLOCK(p); + PROC_ITIMLOCK(p); if (itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0) flags |= TDF_ALRMPEND | TDF_ASTPENDING; - PROC_SUNLOCK(p); + PROC_ITIMUNLOCK(p); } if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value)) { - PROC_SLOCK(p); + PROC_ITIMLOCK(p); if (itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) flags |= TDF_PROFPEND | TDF_ASTPENDING; - PROC_SUNLOCK(p); + PROC_ITIMUNLOCK(p); } thread_lock(td); sched_tick(1); @@ -520,18 +520,18 @@ hardclock_cnt(int cnt, int usermode) flags = 0; if (usermode && timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value)) { - PROC_SLOCK(p); + PROC_ITIMLOCK(p); if (itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick * cnt) == 0) flags |= TDF_ALRMPEND | TDF_ASTPENDING; - PROC_SUNLOCK(p); + PROC_ITIMUNLOCK(p); } if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value)) { - PROC_SLOCK(p); + PROC_ITIMLOCK(p); if (itimerdecr(&pstats->p_timer[ITIMER_PROF], tick * cnt) == 0) flags |= TDF_PROFPEND | TDF_ASTPENDING; - PROC_SUNLOCK(p); + PROC_ITIMUNLOCK(p); } thread_lock(td); sched_tick(cnt); Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_exit.c Wed Nov 26 14:10:00 2014 (r275121) @@ -614,7 +614,9 @@ exit1(struct thread *td, int rv) /* * Save our children's rusage information in our exit rusage. */ + PROC_STATLOCK(p); ruadd(&p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux); + PROC_STATUNLOCK(p); /* * Make sure the scheduler takes this thread out of its tables etc. @@ -990,8 +992,6 @@ proc_to_reap(struct thread *td, struct p return (0); } - PROC_SLOCK(p); - if (siginfo != NULL) { bzero(siginfo, sizeof(*siginfo)); siginfo->si_errno = 0; @@ -1038,7 +1038,9 @@ proc_to_reap(struct thread *td, struct p if (wrusage != NULL) { rup = &wrusage->wru_self; *rup = p->p_ru; + PROC_STATLOCK(p); calcru(p, &rup->ru_utime, &rup->ru_stime); + PROC_STATUNLOCK(p); rup = &wrusage->wru_children; *rup = p->p_stats->p_cru; @@ -1046,10 +1048,10 @@ proc_to_reap(struct thread *td, struct p } if (p->p_state == PRS_ZOMBIE) { + PROC_SLOCK(p); proc_reap(td, p, status, options); return (-1); } - PROC_SUNLOCK(p); PROC_UNLOCK(p); return (1); } Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_mutex.c Wed Nov 26 14:10:00 2014 (r275121) @@ -969,6 +969,9 @@ mutex_init(void) blocked_lock.mtx_lock = 0xdeadc0de; /* Always blocked. */ mtx_init(&proc0.p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); mtx_init(&proc0.p_slock, "process slock", NULL, MTX_SPIN | MTX_RECURSE); + mtx_init(&proc0.p_statmtx, "pstatl", NULL, MTX_SPIN); + mtx_init(&proc0.p_itimmtx, "pitiml", NULL, MTX_SPIN); + mtx_init(&proc0.p_profmtx, "pprofl", NULL, MTX_SPIN); mtx_init(&devmtx, "cdev", NULL, MTX_DEF); mtx_lock(&Giant); } Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_proc.c Wed Nov 26 14:10:00 2014 (r275121) @@ -228,6 +228,9 @@ proc_init(void *mem, int size, int flags bzero(&p->p_mtx, sizeof(struct mtx)); mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_RECURSE); + mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN); + mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN); + mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN); cv_init(&p->p_pwait, "ppwait"); cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ @@ -872,11 +875,11 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_fibnum = p->p_fibnum; kp->ki_start = p->p_stats->p_start; timevaladd(&kp->ki_start, &boottime); - PROC_SLOCK(p); + PROC_STATLOCK(p); rufetch(p, &kp->ki_rusage); kp->ki_runtime = cputick2usec(p->p_rux.rux_runtime); calcru(p, &kp->ki_rusage.ru_utime, &kp->ki_rusage.ru_stime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); calccru(p, &kp->ki_childutime, &kp->ki_childstime); /* Some callers want child times in a single value. */ kp->ki_childtime = kp->ki_childstime; @@ -944,7 +947,7 @@ fill_kinfo_thread(struct thread *td, str PROC_LOCK_ASSERT(p, MA_OWNED); if (preferthread) - PROC_SLOCK(p); + PROC_STATLOCK(p); thread_lock(td); if (td->td_wmesg != NULL) strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); @@ -1030,7 +1033,7 @@ fill_kinfo_thread(struct thread *td, str kp->ki_sigmask = td->td_sigmask; thread_unlock(td); if (preferthread) - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); } /* Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_racct.c Wed Nov 26 14:10:00 2014 (r275121) @@ -1129,11 +1129,11 @@ racctd(void) microuptime(&wallclock); timevalsub(&wallclock, &p->p_stats->p_start); - PROC_SLOCK(p); + PROC_STATLOCK(p); FOREACH_THREAD_IN_PROC(p, td) ruxagg(p, td); runtime = cputick2usec(p->p_rux.rux_runtime); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); #ifdef notyet KASSERT(runtime >= p->p_prev_runtime, ("runtime < p_prev_runtime")); Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_resource.c Wed Nov 26 14:10:00 2014 (r275121) @@ -619,11 +619,11 @@ lim_cb(void *arg) */ if (p->p_cpulimit == RLIM_INFINITY) return; - PROC_SLOCK(p); + PROC_STATLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { ruxagg(p, td); } - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); if (p->p_rux.rux_runtime > p->p_cpulimit * cpu_tickrate()) { lim_rlimit(p, RLIMIT_CPU, &rlim); if (p->p_rux.rux_runtime >= rlim.rlim_max * cpu_tickrate()) { @@ -825,7 +825,7 @@ calcru(struct proc *p, struct timeval *u uint64_t runtime, u; PROC_LOCK_ASSERT(p, MA_OWNED); - PROC_SLOCK_ASSERT(p, MA_OWNED); + PROC_STATLOCK_ASSERT(p, MA_OWNED); /* * If we are getting stats for the current process, then add in the * stats that this thread has accumulated in its current time slice. @@ -857,7 +857,7 @@ rufetchtd(struct thread *td, struct rusa uint64_t runtime, u; p = td->td_proc; - PROC_SLOCK_ASSERT(p, MA_OWNED); + PROC_STATLOCK_ASSERT(p, MA_OWNED); THREAD_LOCK_ASSERT(td, MA_OWNED); /* * If we are getting stats for the current thread, then add in the @@ -991,11 +991,11 @@ kern_getrusage(struct thread *td, int wh break; case RUSAGE_THREAD: - PROC_SLOCK(p); + PROC_STATLOCK(p); thread_lock(td); rufetchtd(td, rup); thread_unlock(td); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); break; default: @@ -1042,7 +1042,7 @@ ruxagg_locked(struct rusage_ext *rux, st { THREAD_LOCK_ASSERT(td, MA_OWNED); - PROC_SLOCK_ASSERT(td->td_proc, MA_OWNED); + PROC_STATLOCK_ASSERT(td->td_proc, MA_OWNED); rux->rux_runtime += td->td_incruntime; rux->rux_uticks += td->td_uticks; rux->rux_sticks += td->td_sticks; @@ -1072,7 +1072,7 @@ rufetch(struct proc *p, struct rusage *r { struct thread *td; - PROC_SLOCK_ASSERT(p, MA_OWNED); + PROC_STATLOCK_ASSERT(p, MA_OWNED); *ru = p->p_ru; if (p->p_numthreads > 0) { @@ -1093,10 +1093,10 @@ rufetchcalc(struct proc *p, struct rusag struct timeval *sp) { - PROC_SLOCK(p); + PROC_STATLOCK(p); rufetch(p, ru); calcru(p, up, sp); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); } /* Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_thread.c Wed Nov 26 14:10:00 2014 (r275121) @@ -470,6 +470,9 @@ thread_exit(void) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif PROC_UNLOCK(p); + PROC_STATLOCK(p); + thread_lock(td); + PROC_SUNLOCK(p); /* Do the same timestamp bookkeeping that mi_switch() would do. */ new_switchtime = cpu_ticks(); @@ -484,9 +487,8 @@ thread_exit(void) td->td_ru.ru_nvcsw++; ruxagg(p, td); rucollect(&p->p_ru, &td->td_ru); + PROC_STATUNLOCK(p); - thread_lock(td); - PROC_SUNLOCK(p); td->td_state = TDS_INACTIVE; #ifdef WITNESS witness_thread_exit(td); Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/kern_time.c Wed Nov 26 14:10:00 2014 (r275121) @@ -276,10 +276,10 @@ get_process_cputime(struct proc *targetp uint64_t runtime; struct rusage ru; - PROC_SLOCK(targetp); + PROC_STATLOCK(targetp); rufetch(targetp, &ru); runtime = targetp->p_rux.rux_runtime; - PROC_SUNLOCK(targetp); + PROC_STATUNLOCK(targetp); cputick2timespec(runtime, ats); } @@ -328,17 +328,17 @@ kern_clock_gettime(struct thread *td, cl break; case CLOCK_VIRTUAL: PROC_LOCK(p); - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &user, &sys); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); PROC_UNLOCK(p); TIMEVAL_TO_TIMESPEC(&user, ats); break; case CLOCK_PROF: PROC_LOCK(p); - PROC_SLOCK(p); + PROC_STATLOCK(p); calcru(p, &user, &sys); - PROC_SUNLOCK(p); + PROC_STATUNLOCK(p); PROC_UNLOCK(p); timevaladd(&user, &sys); TIMEVAL_TO_TIMESPEC(&user, ats); @@ -698,9 +698,9 @@ kern_getitimer(struct thread *td, u_int timevalsub(&aitv->it_value, &ctv); } } else { - PROC_SLOCK(p); + PROC_ITIMLOCK(p); *aitv = p->p_stats->p_timer[which]; - PROC_SUNLOCK(p); + PROC_ITIMUNLOCK(p); } return (0); } @@ -782,10 +782,10 @@ kern_setitimer(struct thread *td, u_int aitv->it_value.tv_usec != 0 && aitv->it_value.tv_usec < tick) aitv->it_value.tv_usec = tick; - PROC_SLOCK(p); + PROC_ITIMLOCK(p); *oitv = p->p_stats->p_timer[which]; p->p_stats->p_timer[which] = *aitv; - PROC_SUNLOCK(p); + PROC_ITIMUNLOCK(p); } return (0); } Modified: head/sys/kern/subr_prof.c ============================================================================== --- head/sys/kern/subr_prof.c Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/kern/subr_prof.c Wed Nov 26 14:10:00 2014 (r275121) @@ -421,12 +421,12 @@ sys_profil(struct thread *td, struct pro } PROC_LOCK(p); upp = &td->td_proc->p_stats->p_prof; - PROC_SLOCK(p); + PROC_PROFLOCK(p); upp->pr_off = uap->offset; upp->pr_scale = uap->scale; upp->pr_base = uap->samples; upp->pr_size = uap->size; - PROC_SUNLOCK(p); + PROC_PROFUNLOCK(p); startprofclock(p); PROC_UNLOCK(p); @@ -466,15 +466,15 @@ addupc_intr(struct thread *td, uintfptr_ if (ticks == 0) return; prof = &td->td_proc->p_stats->p_prof; - PROC_SLOCK(td->td_proc); + PROC_PROFLOCK(td->td_proc); if (pc < prof->pr_off || (i = PC_TO_INDEX(pc, prof)) >= prof->pr_size) { - PROC_SUNLOCK(td->td_proc); + PROC_PROFUNLOCK(td->td_proc); return; /* out of range; ignore */ } addr = prof->pr_base + i; - PROC_SUNLOCK(td->td_proc); + PROC_PROFUNLOCK(td->td_proc); if ((v = fuswintr(addr)) == -1 || suswintr(addr, v + ticks) == -1) { td->td_profil_addr = pc; td->td_profil_ticks = ticks; @@ -509,15 +509,15 @@ addupc_task(struct thread *td, uintfptr_ } p->p_profthreads++; prof = &p->p_stats->p_prof; - PROC_SLOCK(p); + PROC_PROFLOCK(p); if (pc < prof->pr_off || (i = PC_TO_INDEX(pc, prof)) >= prof->pr_size) { - PROC_SUNLOCK(p); + PROC_PROFUNLOCK(p); goto out; } addr = prof->pr_base + i; - PROC_SUNLOCK(p); + PROC_PROFUNLOCK(p); PROC_UNLOCK(p); if (copyin(addr, &v, sizeof(v)) == 0) { v += ticks; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/sys/proc.h Wed Nov 26 14:10:00 2014 (r275121) @@ -148,6 +148,8 @@ struct pargs { * q - td_contested lock * r - p_peers lock * t - thread lock + * u - process stat lock + * w - process timer lock * x - created at fork, only changes during single threading in exec * y - created at first aio, doesn't change until exit or exec at which * point we are single-threaded and only curthread changes it @@ -183,14 +185,14 @@ struct turnstile; * userland asks for rusage info. Backwards compatibility prevents putting * this directly in the user-visible rusage struct. * - * Locking for p_rux: (cj) means (j) for p_rux and (c) for p_crux. + * Locking for p_rux: (cu) means (u) for p_rux and (c) for p_crux. * Locking for td_rux: (t) for all fields. */ struct rusage_ext { - uint64_t rux_runtime; /* (cj) Real time. */ - uint64_t rux_uticks; /* (cj) Statclock hits in user mode. */ - uint64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ - uint64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ + uint64_t rux_runtime; /* (cu) Real time. */ + uint64_t rux_uticks; /* (cu) Statclock hits in user mode. */ + uint64_t rux_sticks; /* (cu) Statclock hits in sys mode. */ + uint64_t rux_iticks; /* (cu) Statclock hits in intr mode. */ uint64_t rux_uu; /* (c) Previous user time in usec. */ uint64_t rux_su; /* (c) Previous sys time in usec. */ uint64_t rux_tu; /* (c) Previous total time in usec. */ @@ -512,6 +514,9 @@ struct proc { LIST_ENTRY(proc) p_sibling; /* (e) List of sibling processes. */ LIST_HEAD(, proc) p_children; /* (e) Pointer to list of children. */ struct mtx p_mtx; /* (n) Lock for this struct. */ + struct mtx p_statmtx; /* Lock for the stats */ + struct mtx p_itimmtx; /* Lock for the virt/prof timers */ + struct mtx p_profmtx; /* Lock for the profiling */ struct ksiginfo *p_ksi; /* Locked by parent proc lock */ sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ #define p_siglist p_sigqueue.sq_signals @@ -523,7 +528,7 @@ struct proc { u_int p_swtick; /* (c) Tick when swapped in or out. */ struct itimerval p_realtimer; /* (c) Alarm timer. */ struct rusage p_ru; /* (a) Exit information. */ - struct rusage_ext p_rux; /* (cj) Internal resource usage. */ + struct rusage_ext p_rux; /* (cu) Internal resource usage. */ struct rusage_ext p_crux; /* (c) Internal child resource usage. */ int p_profthreads; /* (c) Num threads in addupc_task. */ volatile int p_exitthreads; /* (j) Number of threads exiting */ @@ -609,6 +614,18 @@ struct proc { #define PROC_SUNLOCK(p) mtx_unlock_spin(&(p)->p_slock) #define PROC_SLOCK_ASSERT(p, type) mtx_assert(&(p)->p_slock, (type)) +#define PROC_STATLOCK(p) mtx_lock_spin(&(p)->p_statmtx) +#define PROC_STATUNLOCK(p) mtx_unlock_spin(&(p)->p_statmtx) +#define PROC_STATLOCK_ASSERT(p, type) mtx_assert(&(p)->p_statmtx, (type)) + +#define PROC_ITIMLOCK(p) mtx_lock_spin(&(p)->p_itimmtx) +#define PROC_ITIMUNLOCK(p) mtx_unlock_spin(&(p)->p_itimmtx) +#define PROC_ITIMLOCK_ASSERT(p, type) mtx_assert(&(p)->p_itimmtx, (type)) + +#define PROC_PROFLOCK(p) mtx_lock_spin(&(p)->p_profmtx) +#define PROC_PROFUNLOCK(p) mtx_unlock_spin(&(p)->p_profmtx) +#define PROC_PROFLOCK_ASSERT(p, type) mtx_assert(&(p)->p_profmtx, (type)) + /* These flags are kept in p_flag. */ #define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock. */ #define P_CONTROLT 0x00002 /* Has a controlling terminal. */ Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Wed Nov 26 14:09:04 2014 (r275120) +++ head/sys/sys/resourcevar.h Wed Nov 26 14:10:00 2014 (r275121) @@ -47,21 +47,22 @@ * Locking key: * b - created at fork, never changes * c - locked by proc mtx - * j - locked by proc slock * k - only accessed by curthread + * w - locked by proc itim lock + * w2 - locked by proc prof lock */ struct pstats { #define pstat_startzero p_cru struct rusage p_cru; /* Stats for reaped children. */ - struct itimerval p_timer[3]; /* (j) Virtual-time timers. */ + struct itimerval p_timer[3]; /* (w) Virtual-time timers. */ #define pstat_endzero pstat_startcopy #define pstat_startcopy p_prof struct uprof { /* Profile arguments. */ - caddr_t pr_base; /* (c + j) Buffer base. */ - u_long pr_size; /* (c + j) Buffer size. */ - u_long pr_off; /* (c + j) PC offset. */ - u_long pr_scale; /* (c + j) PC scaling. */ + caddr_t pr_base; /* (c + w2) Buffer base. */ + u_long pr_size; /* (c + w2) Buffer size. */ + u_long pr_off; /* (c + w2) PC offset. */ + u_long pr_scale; /* (c + w2) PC scaling. */ } p_prof; #define pstat_endcopy p_start struct timeval p_start; /* (b) Starting time. */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 15:03:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4ACB11; Wed, 26 Nov 2014 15:03:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09A643B1; Wed, 26 Nov 2014 15:03:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQF3LPm098273; Wed, 26 Nov 2014 15:03:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQF3LvF098272; Wed, 26 Nov 2014 15:03:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411261503.sAQF3LvF098272@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Nov 2014 15:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275123 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 15:03:22 -0000 Author: mav Date: Wed Nov 26 15:03:21 2014 New Revision: 275123 URL: https://svnweb.freebsd.org/changeset/base/275123 Log: Fix incorrect check, blocking MULTIID functionality. MFC after: 1 week Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Wed Nov 26 14:36:04 2014 (r275122) +++ head/sys/dev/isp/isp.c Wed Nov 26 15:03:21 2014 (r275123) @@ -1219,7 +1219,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * work for them). */ if (IS_FC(isp) && isp->isp_nchan > 1) { - if (!IS_24XX(isp) || (fwt & ISP2400_FW_ATTR_MULTIID) == 0) { + if (!ISP_CAP_MULTI_ID(isp)) { isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only can enable 1 of %d channels", isp->isp_nchan); isp->isp_nchan = 1; } From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 16:05:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84AF7EF7; Wed, 26 Nov 2014 16:05:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 716E0C23; Wed, 26 Nov 2014 16:05:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQG523Q026313; Wed, 26 Nov 2014 16:05:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQG52TR026312; Wed, 26 Nov 2014 16:05:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411261605.sAQG52TR026312@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Nov 2014 16:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275124 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 16:05:02 -0000 Author: mav Date: Wed Nov 26 16:05:01 2014 New Revision: 275124 URL: https://svnweb.freebsd.org/changeset/base/275124 Log: Fix WWNN/WWPN generation for virtual channels. MFC after: 1 week Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Nov 26 15:03:21 2014 (r275123) +++ head/sys/dev/isp/isp_freebsd.c Wed Nov 26 16:05:01 2014 (r275124) @@ -6138,10 +6138,9 @@ isp_default_wwn(ispsoftc_t * isp, int ch return (seed); } return (0x400000007F000009ull); - } else { - seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } + seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; /* * For channel zero just return what we have. For either ACTIVE or @@ -6164,11 +6163,9 @@ isp_default_wwn(ispsoftc_t * isp, int ch if (seed) { return (seed); } - if (isactive) { + seed = iswwnn ? ISP_FC_PC(isp, 0)->def_wwnn : ISP_FC_PC(isp, 0)->def_wwpn; + if (seed == 0) seed = iswwnn ? FCPARAM(isp, 0)->isp_wwnn_nvram : FCPARAM(isp, 0)->isp_wwpn_nvram; - } else { - seed = iswwnn ? ISP_FC_PC(isp, 0)->def_wwnn : ISP_FC_PC(isp, 0)->def_wwpn; - } if (((seed >> 60) & 0xf) == 2) { /* From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 17:44:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B5E96A1; Wed, 26 Nov 2014 17:44:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D014A3A; Wed, 26 Nov 2014 17:44:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQHioSw073117; Wed, 26 Nov 2014 17:44:50 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQHiomi073114; Wed, 26 Nov 2014 17:44:50 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201411261744.sAQHiomi073114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 26 Nov 2014 17:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275133 - in head: . sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 17:44:51 -0000 Author: ae Date: Wed Nov 26 17:44:49 2014 New Revision: 275133 URL: https://svnweb.freebsd.org/changeset/base/275133 Log: Do not use xform_ipip as decapsulation fallback. xform_ipip was used as fallback with low priority for IPIP encapsulated packets that were decrypted. In some cases it can decapsulate packets, that it shouldn't. This leads to situations, when wrong configurations are magically working. Also it can propagate wrong ingress interface and this can break security. Now we redesigned the IPSEC code and IPIP encapsulation is called directly from ipsec_output, and decapsulation is done in the ipsec_input with m_striphdr. Differential Revision: https://reviews.freebsd.org/D1220 MFC after: 1 month Sponsored by: Yandex LLC Deleted: head/sys/netipsec/ipip_var.h Modified: head/ObsoleteFiles.inc head/sys/netipsec/xform.h head/sys/netipsec/xform_ipip.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Nov 26 17:40:03 2014 (r275132) +++ head/ObsoleteFiles.inc Wed Nov 26 17:44:49 2014 (r275133) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20141126: remove xform_ipip decapsulation fallback +OLD_FILES+=usr/include/netipsec/ipip_var.h # 20141109: faith/faithd removal OLD_FILES+=etc/rc.d/faith OLD_FILES+=usr/share/man/man4/faith.4.gz Modified: head/sys/netipsec/xform.h ============================================================================== --- head/sys/netipsec/xform.h Wed Nov 26 17:40:03 2014 (r275132) +++ head/sys/netipsec/xform.h Wed Nov 26 17:44:49 2014 (r275133) @@ -109,7 +109,6 @@ extern int xform_init(struct secasvar *s struct cryptoini; /* XF_IP4 */ -extern int ip4_input6(struct mbuf **m, int *offp, int proto); extern int ip4_input(struct mbuf **, int *, int); extern int ipip_output(struct mbuf *, struct ipsecrequest *, struct mbuf **, int, int); Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Wed Nov 26 17:40:03 2014 (r275132) +++ head/sys/netipsec/xform_ipip.c Wed Nov 26 17:44:49 2014 (r275133) @@ -64,290 +64,24 @@ #include #include #include -#include #include #include -#include - #ifdef INET6 #include #include #include #include -#include +#include #endif #include #include -#include - -/* - * We can control the acceptance of IP4 packets by altering the sysctl - * net.inet.ipip.allow value. Zero means drop them, all else is acceptance. - */ -VNET_DEFINE(int, ipip_allow) = 0; -VNET_PCPUSTAT_DEFINE(struct ipipstat, ipipstat); -VNET_PCPUSTAT_SYSINIT(ipipstat); - -#ifdef VIMAGE -VNET_PCPUSTAT_SYSUNINIT(ipipstat); -#endif /* VIMAGE */ - -SYSCTL_DECL(_net_inet_ipip); -SYSCTL_INT(_net_inet_ipip, OID_AUTO, ipip_allow, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ipip_allow), 0, ""); -SYSCTL_VNET_PCPUSTAT(_net_inet_ipip, IPSECCTL_STATS, stats, - struct ipipstat, ipipstat, - "IPIP statistics (struct ipipstat, netipsec/ipip_var.h)"); - -/* XXX IPCOMP */ -#define M_IPSEC (M_AUTHIPHDR|M_AUTHIPDGM|M_DECRYPTED) - -static void _ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp); - -#ifdef INET6 -/* - * Really only a wrapper for ipip_input(), for use with IPv6. - */ -int -ip4_input6(struct mbuf **m, int *offp, int proto) -{ -#if 0 - /* If we do not accept IP-in-IP explicitly, drop. */ - if (!V_ipip_allow && ((*m)->m_flags & M_IPSEC) == 0) { - DPRINTF(("%s: dropped due to policy\n", __func__)); - IPIPSTAT_INC(ipips_pdrops); - m_freem(*m); - return IPPROTO_DONE; - } -#endif - _ipip_input(*m, *offp, NULL); - return IPPROTO_DONE; -} -#endif /* INET6 */ - -#ifdef INET -/* - * Really only a wrapper for ipip_input(), for use with IPv4. - */ -int -ip4_input(struct mbuf **mp, int *offp, int proto) -{ -#if 0 - /* If we do not accept IP-in-IP explicitly, drop. */ - if (!V_ipip_allow && (m->m_flags & M_IPSEC) == 0) { - DPRINTF(("%s: dropped due to policy\n", __func__)); - IPIPSTAT_INC(ipips_pdrops); - m_freem(m); - return; - } -#endif - _ipip_input(*mp, *offp, NULL); - return (IPPROTO_DONE); -} -#endif /* INET */ - -/* - * ipip_input gets called when we receive an IP{46} encapsulated packet, - * either because we got it at a real interface, or because AH or ESP - * were being used in tunnel mode (in which case the rcvif element will - * contain the address of the encX interface associated with the tunnel. - */ - -static void -_ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp) -{ - struct ip *ipo; -#ifdef INET6 - struct ip6_hdr *ip6 = NULL; - u_int8_t itos; -#endif - int isr; - u_int8_t otos; - u_int8_t v; - int hlen; - - IPIPSTAT_INC(ipips_ipackets); - - m_copydata(m, 0, 1, &v); - - switch (v >> 4) { -#ifdef INET - case 4: - hlen = sizeof(struct ip); - break; -#endif /* INET */ -#ifdef INET6 - case 6: - hlen = sizeof(struct ip6_hdr); - break; -#endif - default: - IPIPSTAT_INC(ipips_family); - m_freem(m); - return /* EAFNOSUPPORT */; - } - - /* Bring the IP header in the first mbuf, if not there already */ - if (m->m_len < hlen) { - if ((m = m_pullup(m, hlen)) == NULL) { - DPRINTF(("%s: m_pullup (1) failed\n", __func__)); - IPIPSTAT_INC(ipips_hdrops); - return; - } - } - ipo = mtod(m, struct ip *); - - /* Keep outer ecn field. */ - switch (v >> 4) { -#ifdef INET - case 4: - otos = ipo->ip_tos; - break; -#endif /* INET */ -#ifdef INET6 - case 6: - otos = (ntohl(mtod(m, struct ip6_hdr *)->ip6_flow) >> 20) & 0xff; - break; -#endif - default: - panic("ipip_input: unknown ip version %u (outer)", v>>4); - } - - /* Remove outer IP header */ - m_adj(m, iphlen); - - /* Sanity check */ - if (m->m_pkthdr.len < sizeof(struct ip)) { - IPIPSTAT_INC(ipips_hdrops); - m_freem(m); - return; - } - - m_copydata(m, 0, 1, &v); - - switch (v >> 4) { -#ifdef INET - case 4: - hlen = sizeof(struct ip); - break; -#endif /* INET */ - -#ifdef INET6 - case 6: - hlen = sizeof(struct ip6_hdr); - break; -#endif - default: - IPIPSTAT_INC(ipips_family); - m_freem(m); - return; /* EAFNOSUPPORT */ - } - - /* - * Bring the inner IP header in the first mbuf, if not there already. - */ - if (m->m_len < hlen) { - if ((m = m_pullup(m, hlen)) == NULL) { - DPRINTF(("%s: m_pullup (2) failed\n", __func__)); - IPIPSTAT_INC(ipips_hdrops); - return; - } - } - - /* - * RFC 1853 specifies that the inner TTL should not be touched on - * decapsulation. There's no reason this comment should be here, but - * this is as good as any a position. - */ - - /* Some sanity checks in the inner IP header */ - switch (v >> 4) { -#ifdef INET - case 4: - ipo = mtod(m, struct ip *); - ip_ecn_egress(V_ip4_ipsec_ecn, &otos, &ipo->ip_tos); - break; -#endif /* INET */ -#ifdef INET6 - case 6: - ip6 = (struct ip6_hdr *) ipo; - itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; - ip_ecn_egress(V_ip6_ipsec_ecn, &otos, &itos); - ip6->ip6_flow &= ~htonl(0xff << 20); - ip6->ip6_flow |= htonl((u_int32_t) itos << 20); - break; -#endif - default: - panic("ipip_input: unknown ip version %u (inner)", v>>4); - } - - /* Check for local address spoofing. */ - if ((m->m_pkthdr.rcvif == NULL || - !(m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK)) && - V_ipip_allow != 2) { -#ifdef INET - if ((v >> 4) == IPVERSION && - in_localip(ipo->ip_src) != 0) { - IPIPSTAT_INC(ipips_spoof); - m_freem(m); - return; - } -#endif -#ifdef INET6 - if ((v & IPV6_VERSION_MASK) == IPV6_VERSION && - in6_localip(&ip6->ip6_src) != 0) { - IPIPSTAT_INC(ipips_spoof); - m_freem(m); - return; - } -#endif - } - - /* Statistics */ - IPIPSTAT_ADD(ipips_ibytes, m->m_pkthdr.len - iphlen); - - /* - * Interface pointer stays the same; if no IPsec processing has - * been done (or will be done), this will point to a normal - * interface. Otherwise, it'll point to an enc interface, which - * will allow a packet filter to distinguish between secure and - * untrusted packets. - */ - - switch (v >> 4) { -#ifdef INET - case 4: - isr = NETISR_IP; - break; -#endif -#ifdef INET6 - case 6: - isr = NETISR_IPV6; - break; -#endif - default: - panic("%s: bogus ip version %u", __func__, v>>4); - } - - if (netisr_queue(isr, m)) { /* (0) on success. */ - IPIPSTAT_INC(ipips_qfull); - DPRINTF(("%s: packet dropped because of full queue\n", - __func__)); - } -} - int -ipip_output( - struct mbuf *m, - struct ipsecrequest *isr, - struct mbuf **mp, - int skip, - int protoff -) +ipip_output(struct mbuf *m, struct ipsecrequest *isr, struct mbuf **mp, + int skip, int protoff) { struct secasvar *sav; u_int8_t tp, otos; @@ -383,7 +117,6 @@ ipip_output( "address in SA %s/%08lx\n", __func__, ipsec_address(&saidx->dst), (u_long) ntohl(sav->spi))); - IPIPSTAT_INC(ipips_unspec); error = EINVAL; goto bad; } @@ -391,7 +124,6 @@ ipip_output( M_PREPEND(m, sizeof(struct ip), M_NOWAIT); if (m == 0) { DPRINTF(("%s: M_PREPEND failed\n", __func__)); - IPIPSTAT_INC(ipips_hdrops); error = ENOBUFS; goto bad; } @@ -463,22 +195,17 @@ ipip_output( "address in SA %s/%08lx\n", __func__, ipsec_address(&saidx->dst), (u_long) ntohl(sav->spi))); - IPIPSTAT_INC(ipips_unspec); error = ENOBUFS; goto bad; } /* scoped address handling */ ip6 = mtod(m, struct ip6_hdr *); - if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) - ip6->ip6_src.s6_addr16[1] = 0; - if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst)) - ip6->ip6_dst.s6_addr16[1] = 0; - + in6_clearscope(&ip6->ip6_src); + in6_clearscope(&ip6->ip6_dst); M_PREPEND(m, sizeof(struct ip6_hdr), M_NOWAIT); if (m == 0) { DPRINTF(("%s: M_PREPEND failed\n", __func__)); - IPIPSTAT_INC(ipips_hdrops); error = ENOBUFS; goto bad; } @@ -532,39 +259,12 @@ ipip_output( nofamily: DPRINTF(("%s: unsupported protocol family %u\n", __func__, saidx->dst.sa.sa_family)); - IPIPSTAT_INC(ipips_family); error = EAFNOSUPPORT; /* XXX diffs from openbsd */ goto bad; } - IPIPSTAT_INC(ipips_opackets); *mp = m; - -#ifdef INET - if (saidx->dst.sa.sa_family == AF_INET) { -#if 0 - if (sav->tdb_xform->xf_type == XF_IP4) - tdb->tdb_cur_bytes += - m->m_pkthdr.len - sizeof(struct ip); -#endif - IPIPSTAT_ADD(ipips_obytes, - m->m_pkthdr.len - sizeof(struct ip)); - } -#endif /* INET */ - -#ifdef INET6 - if (saidx->dst.sa.sa_family == AF_INET6) { -#if 0 - if (sav->tdb_xform->xf_type == XF_IP4) - tdb->tdb_cur_bytes += - m->m_pkthdr.len - sizeof(struct ip6_hdr); -#endif - IPIPSTAT_ADD(ipips_obytes, - m->m_pkthdr.len - sizeof(struct ip6_hdr)); - } -#endif /* INET6 */ - - return 0; + return (0); bad: if (m) m_freem(m); @@ -572,8 +272,6 @@ bad: return (error); } -#ifdef IPSEC -#if defined(INET) || defined(INET6) static int ipe4_init(struct secasvar *sav, struct xformsw *xsp) { @@ -603,63 +301,10 @@ static struct xformsw ipe4_xformsw = { ipe4_init, ipe4_zeroize, ipe4_input, ipip_output, }; -extern struct domain inetdomain; -#endif /* INET || INET6 */ -#ifdef INET -static struct protosw ipe4_protosw = { - .pr_type = SOCK_RAW, - .pr_domain = &inetdomain, - .pr_protocol = IPPROTO_IPV4, - .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, - .pr_input = ip4_input, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs -}; -#endif /* INET */ -#if defined(INET6) && defined(INET) -static struct protosw ipe6_protosw = { - .pr_type = SOCK_RAW, - .pr_domain = &inetdomain, - .pr_protocol = IPPROTO_IPV6, - .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, - .pr_input = ip4_input6, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs -}; -#endif /* INET6 && INET */ - -#ifdef INET -/* - * Check the encapsulated packet to see if we want it - */ -static int -ipe4_encapcheck(const struct mbuf *m, int off, int proto, void *arg) -{ - /* - * Only take packets coming from IPSEC tunnels; the rest - * must be handled by the gif tunnel code. Note that we - * also return a minimum priority when we want the packet - * so any explicit gif tunnels take precedence. - */ - return ((m->m_flags & M_IPSEC) != 0 ? 1 : 0); -} -#endif /* INET */ - static void ipe4_attach(void) { xform_register(&ipe4_xformsw); - /* attach to encapsulation framework */ - /* XXX save return cookie for detach on module remove */ -#ifdef INET - (void) encap_attach_func(AF_INET, -1, - ipe4_encapcheck, &ipe4_protosw, NULL); -#endif -#if defined(INET6) && defined(INET) - (void) encap_attach_func(AF_INET6, -1, - ipe4_encapcheck, (struct protosw *)&ipe6_protosw, NULL); -#endif } SYSINIT(ipe4_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipe4_attach, NULL); -#endif /* IPSEC */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 20:19:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBDD1AC5; Wed, 26 Nov 2014 20:19:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACC67C64; Wed, 26 Nov 2014 20:19:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQKJbxj043562; Wed, 26 Nov 2014 20:19:37 GMT (envelope-from alfred@FreeBSD.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQKJaw4043557; Wed, 26 Nov 2014 20:19:36 GMT (envelope-from alfred@FreeBSD.org) Message-Id: <201411262019.sAQKJaw4043557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alfred set sender to alfred@FreeBSD.org using -f From: Alfred Perlstein Date: Wed, 26 Nov 2014 20:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275136 - in head/sys: dev/e1000 dev/ixgbe 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 20:19:38 -0000 Author: alfred Date: Wed Nov 26 20:19:36 2014 New Revision: 275136 URL: https://svnweb.freebsd.org/changeset/base/275136 Log: Make igb and ixgbe check tunables at probe time. This allows one to make a kernel module to tune the number of queues before the driver loads. This is needed so that a module at SI_SUB_CPU can set tunables for these drivers to take. Otherwise getenv is called too early by the TUNABLE macros. Reviewed by: smh Phabric: https://reviews.freebsd.org/D1149 Modified: head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/ixgbe.c head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Nov 26 18:03:25 2014 (r275135) +++ head/sys/dev/e1000/if_igb.c Wed Nov 26 20:19:36 2014 (r275136) @@ -188,6 +188,7 @@ static char *igb_strings[] = { /********************************************************************* * Function prototypes *********************************************************************/ +static int igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS); static int igb_probe(device_t); static int igb_attach(device_t); static int igb_detach(device_t); @@ -493,6 +494,11 @@ igb_attach(device_t dev) OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, igb_sysctl_nvm_info, "I", "NVM Information"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "num_queues", CTLTYPE_INT | CTLFLAG_RD, + adapter, 0, igb_per_unit_num_queues, "I", "Number of Queues"); + igb_set_sysctl_value(adapter, "enable_aim", "Interrupt Moderation", &adapter->enable_aim, igb_enable_aim); @@ -2831,6 +2837,7 @@ igb_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; int bar, want, queues, msgs, maxqueues; + int n_queues; /* tuneable override */ if (igb_enable_msix == 0) @@ -2858,8 +2865,18 @@ igb_setup_msix(struct adapter *adapter) goto msi; } - /* Figure out a reasonable auto config value */ - queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; + n_queues = 0; + /* try more specific tunable, then global, then finally default to boot time tunable if set. */ + if (device_getenv_int(dev, "num_queues", &n_queues) != 0) { + device_printf(dev, "using specific tunable num_queues=%d", n_queues); + } else if (TUNABLE_INT_FETCH("hw.igb.num_queues", &n_queues) != 0) { + if (igb_num_queues != n_queues) { + device_printf(dev, "using global tunable hw.igb.num_queues=%d", n_queues); + igb_num_queues = n_queues; + } + } else { + n_queues = igb_num_queues; + } #ifdef RSS /* If we're doing RSS, clamp at the number of RSS buckets */ @@ -2867,10 +2884,12 @@ igb_setup_msix(struct adapter *adapter) queues = rss_getnumbuckets(); #endif - - /* Manual override */ - if (igb_num_queues != 0) - queues = igb_num_queues; + if (n_queues != 0) { + queues = n_queues; + } else { + /* Figure out a reasonable auto config value */ + queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; + } /* Sanity check based on HW */ switch (adapter->hw.mac.type) { @@ -2893,12 +2912,17 @@ igb_setup_msix(struct adapter *adapter) maxqueues = 1; break; } - if (queues > maxqueues) + if (queues > maxqueues) { + device_printf(adapter->dev, "requested %d queues, but max for this adapter is %d\n", + queues, maxqueues); queues = maxqueues; - - /* Manual override */ - if (igb_num_queues != 0) - queues = igb_num_queues; + } else if (queues == 0) { + queues = 1; + } else if (queues < 0) { + device_printf(adapter->dev, "requested %d queues, but min for this adapter is %d\n", + queues, 1); + queues = 1; + } /* ** One vector (RX/TX pair) per queue @@ -6384,3 +6408,14 @@ igb_sysctl_eee(SYSCTL_HANDLER_ARGS) IGB_CORE_UNLOCK(adapter); return (0); } + +static int +igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter; + + adapter = (struct adapter *) arg1; + + return sysctl_handle_int(oidp, &adapter->num_queues, 0, req); +} + Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Wed Nov 26 18:03:25 2014 (r275135) +++ head/sys/dev/ixgbe/ixgbe.c Wed Nov 26 20:19:36 2014 (r275136) @@ -103,6 +103,7 @@ static char *ixgbe_strings[] = { /********************************************************************* * Function prototypes *********************************************************************/ +static int ixgbe_per_unit_num_queues(SYSCTL_HANDLER_ARGS); static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); @@ -475,6 +476,11 @@ ixgbe_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "num_queues", CTLTYPE_INT | CTLFLAG_RD, + adapter, 0, ixgbe_per_unit_num_queues, "I", "Number of Queues"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "ts", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_set_thermal_test, "I", "Thermal Test"); @@ -2516,6 +2522,7 @@ ixgbe_setup_msix(struct adapter *adapter { device_t dev = adapter->dev; int rid, want, queues, msgs; + int n_queues; /* Override by tuneable */ if (ixgbe_enable_msix == 0) @@ -2548,15 +2555,29 @@ ixgbe_setup_msix(struct adapter *adapter queues = rss_getnumbuckets(); #endif - if (ixgbe_num_queues != 0) - queues = ixgbe_num_queues; + /* try more specific tunable, then global, then finally default to boot time tunable if set. */ + if (device_getenv_int(dev, "num_queues", &n_queues) != 0) { + device_printf(dev, "using specific tunable numqueues=%d", n_queues); + } else if (TUNABLE_INT_FETCH("hw.ix.num_queues", &n_queues) != 0) { + if (ixgbe_num_queues != n_queues) { + device_printf(dev, "using global tunable num_queues=%d", n_queues); + ixgbe_num_queues = n_queues; + } + } else { + n_queues = ixgbe_num_queues; + } + + if (n_queues < 0) { + device_printf(dev, "tunable < 0, resetting to default"); + n_queues = 0; + } + + if (n_queues != 0) + queues = n_queues; /* Set max queues to 8 when autoconfiguring */ else if ((ixgbe_num_queues == 0) && (queues > 8)) queues = 8; - /* reflect correct sysctl value */ - ixgbe_num_queues = queues; - /* ** Want one vector (RX/TX pair) per queue ** plus an additional for Link. @@ -5943,6 +5964,16 @@ ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS) return error; } +static int +ixgbe_per_unit_num_queues(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter; + + adapter = (struct adapter *) arg1; + + return sysctl_handle_int(oidp, &adapter->num_queues, 0, req); +} + /* ** Control link advertise speed: ** 1 - advertise only 1G Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Nov 26 18:03:25 2014 (r275135) +++ head/sys/kern/subr_bus.c Wed Nov 26 20:19:36 2014 (r275136) @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -5031,3 +5033,18 @@ bus_free_resource(device_t dev, int type return (0); return (bus_release_resource(dev, type, rman_get_rid(r), r)); } + +int +device_getenv_int(device_t dev, const char *knob, int *iptr) +{ + char env[128]; + int sz; + + sz = snprintf(env, sizeof(env), "hw.%s.%d.%s", device_get_name(dev), device_get_unit(dev), knob); + if (sz >= sizeof(env)) { + /* XXX: log? return error? bump sysctl error? */ + log(LOG_ERR, "device_getenv_int: knob too long: '%s'", knob); + return 0; + } + return (getenv_int(env, iptr)); +} Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Wed Nov 26 18:03:25 2014 (r275135) +++ head/sys/sys/bus.h Wed Nov 26 20:19:36 2014 (r275136) @@ -449,6 +449,7 @@ const char *device_get_nameunit(device_t void *device_get_softc(device_t dev); device_state_t device_get_state(device_t dev); int device_get_unit(device_t dev); +int device_getenv_int(device_t dev, const char *knob, int *iptr); struct sysctl_ctx_list *device_get_sysctl_ctx(device_t dev); struct sysctl_oid *device_get_sysctl_tree(device_t dev); int device_is_alive(device_t dev); /* did probe succeed? */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 20:34:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E36C29F; Wed, 26 Nov 2014 20:34:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF880E4C; Wed, 26 Nov 2014 20:34:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQKY5np052180; Wed, 26 Nov 2014 20:34:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQKY5bb052179; Wed, 26 Nov 2014 20:34:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201411262034.sAQKY5bb052179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 26 Nov 2014 20:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275137 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 20:34:06 -0000 Author: adrian Date: Wed Nov 26 20:34:05 2014 New Revision: 275137 URL: https://svnweb.freebsd.org/changeset/base/275137 Log: Add PCI ID for Intel Lynx Point LP controller. PR: kern/195398 Submitted by: grembo Obtained from: DragonflyBSD MFC after: 1 week Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Wed Nov 26 20:19:36 2014 (r275136) +++ head/sys/dev/usb/controller/ehci_pci.c Wed Nov 26 20:34:05 2014 (r275137) @@ -168,6 +168,8 @@ ehci_pci_match(device_t self) return ("Intel Wildcat Point USB 2.0 controller USB-A"); case 0x8cad8086: return ("Intel Wildcat Point USB 2.0 controller USB-B"); + case 0x9c268086: + return ("Intel Lynx Point LP USB 2.0 controller USB"); case 0x00e01033: return ("NEC uPD 720100 USB 2.0 controller"); From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 20:43:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8517D381; Wed, 26 Nov 2014 20:43:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 575B6F6B; Wed, 26 Nov 2014 20:43:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQKhBlV056731; Wed, 26 Nov 2014 20:43:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQKhAPA056725; Wed, 26 Nov 2014 20:43:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201411262043.sAQKhAPA056725@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 26 Nov 2014 20:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275138 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 20:43:11 -0000 Author: gjb Date: Wed Nov 26 20:43:09 2014 New Revision: 275138 URL: https://svnweb.freebsd.org/changeset/base/275138 Log: Whitespace cleanup to fix rendering nits in src.conf(5). Sponsored by: The FreeBSD Foundation Modified: head/tools/build/options/WITHOUT_CROSS_COMPILER head/tools/build/options/WITHOUT_INCLUDES head/tools/build/options/WITHOUT_RCS head/tools/build/options/WITH_FMAKE Modified: head/tools/build/options/WITHOUT_CROSS_COMPILER ============================================================================== --- head/tools/build/options/WITHOUT_CROSS_COMPILER Wed Nov 26 20:34:05 2014 (r275137) +++ head/tools/build/options/WITHOUT_CROSS_COMPILER Wed Nov 26 20:43:09 2014 (r275138) @@ -1,13 +1,13 @@ .\" $FreeBSD$ Set to not build any cross compiler in the cross-tools stage of buildworld. If you are compiling a different version of -.Fx +.Fx than what is installed on the system, you will need to provide an alternate compiler with XCC to ensure success. If you are compiling with an identical version of -.Fx +.Fx to the host, this option may be safely used. This option may also be safe when the host version of -.Fx +.Fx is close to the sources being built, but all bets are off if there have been any changes to the toolchain between the versions. Modified: head/tools/build/options/WITHOUT_INCLUDES ============================================================================== --- head/tools/build/options/WITHOUT_INCLUDES Wed Nov 26 20:34:05 2014 (r275137) +++ head/tools/build/options/WITHOUT_INCLUDES Wed Nov 26 20:43:09 2014 (r275138) @@ -1,8 +1,7 @@ .\" $FreeBSD$ Set to not install header files. -This option used to be spelled +This option used to be spelled .Va NO_INCS . .Bf -symbolic The option does not work for build targets. .Ef - Modified: head/tools/build/options/WITHOUT_RCS ============================================================================== --- head/tools/build/options/WITHOUT_RCS Wed Nov 26 20:34:05 2014 (r275137) +++ head/tools/build/options/WITHOUT_RCS Wed Nov 26 20:43:09 2014 (r275138) @@ -1,6 +1,5 @@ .\" $FreeBSD$ Set to not build -.Xr rcs 1 -, -.Xr etcupdate 8 -, and related utilities. +.Xr rcs 1 , +.Xr etcupdate 8 , +and related utilities. Modified: head/tools/build/options/WITH_FMAKE ============================================================================== --- head/tools/build/options/WITH_FMAKE Wed Nov 26 20:34:05 2014 (r275137) +++ head/tools/build/options/WITH_FMAKE Wed Nov 26 20:43:09 2014 (r275138) @@ -1,4 +1,4 @@ .\" $FreeBSD$ -Causes the old FreeBSD +Causes the old FreeBSD .Xr make 1 program to be built and installed as fmake. From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 20:44:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29ECE4DB; Wed, 26 Nov 2014 20:44:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09EB0F78; Wed, 26 Nov 2014 20:44:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQKis5C057073; Wed, 26 Nov 2014 20:44:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQKissO057072; Wed, 26 Nov 2014 20:44:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201411262044.sAQKissO057072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 26 Nov 2014 20:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275139 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 20:44:55 -0000 Author: gjb Date: Wed Nov 26 20:44:54 2014 New Revision: 275139 URL: https://svnweb.freebsd.org/changeset/base/275139 Log: Regen src.conf(5) after r275138. Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Nov 26 20:43:09 2014 (r275138) +++ head/share/man/man5/src.conf.5 Wed Nov 26 20:44:54 2014 (r275139) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd October 21, 2014 +.Dd November 26, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -267,17 +267,17 @@ amd64/amd64, arm/arm, arm/armv6, arm/arm Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 264660 2014-04-18 17:03:58Z imp +.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 275138 2014-11-26 20:43:09Z gjb Set to not build any cross compiler in the cross-tools stage of buildworld. If you are compiling a different version of -.Fx +.Fx than what is installed on the system, you will need to provide an alternate compiler with XCC to ensure success. If you are compiling with an identical version of -.Fx +.Fx to the host, this option may be safely used. This option may also be safe when the host version of -.Fx +.Fx is close to the sources being built, but all bets are off if there have been any changes to the toolchain between the versions. When set, it also enforces the following options: @@ -396,8 +396,8 @@ This includes the device tree compiler ( Set to not build or install programs for operating floppy disk driver. .It Va WITH_FMAKE -.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 266752 2014-05-27 15:52:27Z gjb -Causes the old FreeBSD +.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 275138 2014-11-26 20:43:09Z gjb +Causes the old FreeBSD .Xr make 1 program to be built and installed as fmake. .It Va WITHOUT_FMTREE @@ -490,8 +490,8 @@ This is the default on platforms where g It is a default setting on arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_GREP_COMPAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 266752 2014-05-27 15:52:27Z gjb -Set this option to omit the gnu extentions to grep from being included in +.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste +Set this option to omit the gnu extensions to grep from being included in BSD grep. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru @@ -531,6 +531,14 @@ Set to not build or install HyperV utili .It Va WITHOUT_ICONV .\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. +.It Va WITHOUT_INCLUDES +.\" from FreeBSD: head/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb +Set to not install header files. +This option used to be spelled +.Va NO_INCS . +.Bf -symbolic +The option does not work for build targets. +.Ef .It Va WITHOUT_INET .\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. @@ -668,8 +676,8 @@ Set to not build programs that support a and .Xr vidcontrol 8 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru -On amd64, set to not build 32-bit library set and a +.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp +On 64-bit platforms, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBCPLUSPLUS @@ -938,12 +946,11 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 271401 2014-09-10 19:00:17Z asomers +.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 275138 2014-11-26 20:43:09Z gjb Set to not build -.Xr rcs 1 -, -.Xr etcupdate 8 -, and related utilities. +.Xr rcs 1 , +.Xr etcupdate 8 , +and related utilities. .It Va WITHOUT_RESCUE .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build @@ -1047,6 +1054,15 @@ See .Xr tests 7 for more details. This also disables the build of all test-related dependencies, including ATF. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_TESTS_SUPPORT +.El +.It Va WITHOUT_TESTS_SUPPORT +.\" from FreeBSD: head/tools/build/options/WITHOUT_TESTS_SUPPORT 274665 2014-11-18 17:06:50Z imp +Set to disables the build of all test-related dependencies, including ATF. .It Va WITHOUT_TEXTPROC .\" from FreeBSD: head/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam Set to not build @@ -1080,6 +1096,8 @@ When set, it also enforces the following .Va WITHOUT_GCC .It .Va WITHOUT_GDB +.It +.Va WITHOUT_INCLUDES .El .It Va WITHOUT_UNBOUND .\" from FreeBSD: head/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des @@ -1089,6 +1107,9 @@ and related programs. .It Va WITHOUT_USB .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. +.It Va WITHOUT_USB_GADGET_EXAMPLES +.\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 274665 2014-11-18 17:06:50Z imp +Set to build USB gadget kernel modules. .It Va WITHOUT_UTMPX .\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed Set to not build user accounting tools such as From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 20:56:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 861F37F3; Wed, 26 Nov 2014 20:56:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7264BD7; Wed, 26 Nov 2014 20:56:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQKu9Z8061903; Wed, 26 Nov 2014 20:56:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQKu97d061902; Wed, 26 Nov 2014 20:56:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411262056.sAQKu97d061902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Nov 2014 20:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275140 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 20:56:09 -0000 Author: emaste Date: Wed Nov 26 20:56:08 2014 New Revision: 275140 URL: https://svnweb.freebsd.org/changeset/base/275140 Log: Increase default and maximum callchain depths Bump the default from 16 to 32, to accommodate kernel flamegraphs. Bump the maximum from 32 to 128, to accommodate deep user stacks. Reviewed by: gnn MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1203 Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Wed Nov 26 20:44:54 2014 (r275139) +++ head/sys/sys/pmc.h Wed Nov 26 20:56:08 2014 (r275140) @@ -349,7 +349,7 @@ enum pmc_ops { #define PMC_F_NEEDS_LOGFILE 0x00020000 /*needs log file */ #define PMC_F_ATTACH_DONE 0x00040000 /*attached at least once */ -#define PMC_CALLCHAIN_DEPTH_MAX 32 +#define PMC_CALLCHAIN_DEPTH_MAX 128 #define PMC_CC_F_USERSPACE 0x01 /*userspace callchain*/ @@ -605,7 +605,7 @@ struct pmc_op_getdyneventinfo { #define PMC_LOG_BUFFER_SIZE 4 #define PMC_NLOGBUFFERS 1024 #define PMC_NSAMPLES 1024 -#define PMC_CALLCHAIN_DEPTH 16 +#define PMC_CALLCHAIN_DEPTH 32 #define PMC_SYSCTL_NAME_PREFIX "kern." PMC_MODULE_NAME "." From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 00:27:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79D99E42; Thu, 27 Nov 2014 00:27:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6778CAAF; Thu, 27 Nov 2014 00:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAR0ReWQ064339; Thu, 27 Nov 2014 00:27:40 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAR0Rej4064338; Thu, 27 Nov 2014 00:27:40 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201411270027.sAR0Rej4064338@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 27 Nov 2014 00:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275159 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 00:27:40 -0000 Author: ae Date: Thu Nov 27 00:27:39 2014 New Revision: 275159 URL: https://svnweb.freebsd.org/changeset/base/275159 Log: Remove ip4_input() declaration. It was removed in r275133. MFC after: 1 month Modified: head/sys/netipsec/xform.h Modified: head/sys/netipsec/xform.h ============================================================================== --- head/sys/netipsec/xform.h Thu Nov 27 00:10:59 2014 (r275158) +++ head/sys/netipsec/xform.h Thu Nov 27 00:27:39 2014 (r275159) @@ -109,7 +109,6 @@ extern int xform_init(struct secasvar *s struct cryptoini; /* XF_IP4 */ -extern int ip4_input(struct mbuf **, int *, int); extern int ipip_output(struct mbuf *, struct ipsecrequest *, struct mbuf **, int, int); From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 01:37:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6AE9932; Thu, 27 Nov 2014 01:37:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3E12126; Thu, 27 Nov 2014 01:37:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAR1b1rc096892; Thu, 27 Nov 2014 01:37:01 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAR1b1EC096891; Thu, 27 Nov 2014 01:37:01 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201411270137.sAR1b1EC096891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 27 Nov 2014 01:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275162 - head/usr.bin/dc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 01:37:01 -0000 Author: kevlo Date: Thu Nov 27 01:37:01 2014 New Revision: 275162 URL: https://svnweb.freebsd.org/changeset/base/275162 Log: Init array field in the proper place. Obtained from: OpenBSD Modified: head/usr.bin/dc/stack.c Modified: head/usr.bin/dc/stack.c ============================================================================== --- head/usr.bin/dc/stack.c Thu Nov 27 00:39:01 2014 (r275161) +++ head/usr.bin/dc/stack.c Thu Nov 27 01:37:01 2014 (r275162) @@ -137,14 +137,12 @@ stack_swap(struct stack *stack) static void stack_grow(struct stack *stack) { - size_t i, new_size; + size_t new_size; if (++stack->sp == stack->size) { new_size = stack->size * 2 + 1; stack->stack = brealloc(stack->stack, new_size * sizeof(*stack->stack)); - for (i = stack->size; i < new_size; i++) - stack->stack[i].array = NULL; stack->size = new_size; } } @@ -156,6 +154,7 @@ stack_pushnumber(struct stack *stack, st stack_grow(stack); stack->stack[stack->sp].type = BCODE_NUMBER; stack->stack[stack->sp].u.num = b; + stack->stack[stack->sp].array = NULL; } void @@ -165,6 +164,7 @@ stack_pushstring(struct stack *stack, ch stack_grow(stack); stack->stack[stack->sp].type = BCODE_STRING; stack->stack[stack->sp].u.string = string; + stack->stack[stack->sp].array = NULL; } void From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 02:15:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC08AEB; Thu, 27 Nov 2014 02:15:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D98916A3; Thu, 27 Nov 2014 02:15:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAR2FZw9015414; Thu, 27 Nov 2014 02:15:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAR2FZx8015413; Thu, 27 Nov 2014 02:15:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411270215.sAR2FZx8015413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 27 Nov 2014 02:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275163 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 02:15:36 -0000 Author: emaste Date: Thu Nov 27 02:15:35 2014 New Revision: 275163 URL: https://svnweb.freebsd.org/changeset/base/275163 Log: ANSIfy b64_pton Modified: head/lib/libc/net/base64.c Modified: head/lib/libc/net/base64.c ============================================================================== --- head/lib/libc/net/base64.c Thu Nov 27 01:37:01 2014 (r275162) +++ head/lib/libc/net/base64.c Thu Nov 27 02:15:35 2014 (r275163) @@ -193,10 +193,7 @@ b64_ntop(u_char const *src, size_t srcle */ int -b64_pton(src, target, targsize) - char const *src; - u_char *target; - size_t targsize; +b64_pton(const char *src, u_char *target, size_t targsize) { int tarindex, state, ch; u_char nextbyte; From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 06:04:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7056323C; Thu, 27 Nov 2014 06:04:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52371E6D; Thu, 27 Nov 2014 06:04:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAR641Aa023999; Thu, 27 Nov 2014 06:04:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAR640WO023986; Thu, 27 Nov 2014 06:04:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411270604.sAR640WO023986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 27 Nov 2014 06:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275170 - in head: . sbin/mdconfig/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 06:04:01 -0000 Author: ngie Date: Thu Nov 27 06:04:00 2014 New Revision: 275170 URL: https://svnweb.freebsd.org/changeset/base/275170 Log: Convert sbin/mdconfig/tests from prove format tests to ATF format tests As a side effect... 1. The tests now checks for the root user before continuing with kyua, which is more visible than the test being skipped with the TAP protocol 2. The tests work with devices that aren't /dev/md0 by caching the device attached during the test to a file, and later use the cached information to detach the device in the cleanup routine 3. The tests no longer require perl to run MFC after: 1 week PR: 191191 Sponsored by: EMC / Isilon Storage Division Added: head/sbin/mdconfig/tests/mdconfig_test.sh (contents, props changed) Deleted: head/sbin/mdconfig/tests/legacy_test.sh head/sbin/mdconfig/tests/mdconfig.test head/sbin/mdconfig/tests/run.pl Modified: head/ObsoleteFiles.inc head/sbin/mdconfig/tests/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 27 06:00:27 2014 (r275169) +++ head/ObsoleteFiles.inc Thu Nov 27 06:04:00 2014 (r275170) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20141126: convert sbin/mdconfig/tests to ATF format tests +OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test +OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test +OLD_FILES+=usr/tests/sbin/mdconfig/run.pl # 20141126: remove xform_ipip decapsulation fallback OLD_FILES+=usr/include/netipsec/ipip_var.h # 20141109: faith/faithd removal Modified: head/sbin/mdconfig/tests/Makefile ============================================================================== --- head/sbin/mdconfig/tests/Makefile Thu Nov 27 06:00:27 2014 (r275169) +++ head/sbin/mdconfig/tests/Makefile Thu Nov 27 06:04:00 2014 (r275170) @@ -2,12 +2,9 @@ TESTSDIR= ${TESTSBASE}/sbin/mdconfig -TAP_TESTS_SH= legacy_test -TAP_TESTS_SH_SED_legacy_test= 's,__PERL__,${TAP_PERL_INTERPRETER},g' -TEST_METADATA.legacy_test+= required_programs="${TAP_PERL_INTERPRETER}" +ATF_TESTS_SH= mdconfig_test -FILESDIR= ${TESTSDIR} -FILES= mdconfig.test -FILES+= run.pl + +TEST_METADATA.mdconfig_test+= required_user="root" .include Added: head/sbin/mdconfig/tests/mdconfig_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/mdconfig/tests/mdconfig_test.sh Thu Nov 27 06:04:00 2014 (r275170) @@ -0,0 +1,281 @@ +# Copyright (c) 2012 Edward Tomasz NapieraÅ‚a +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +check_diskinfo() +{ + local md=$1 + local mediasize_in_bytes=$2 + local mediasize_in_sectors=$3 + local sectorsize=${4:-512} + local stripesize=${5:-0} + local stripeoffset=${6:-0} + + atf_check -s exit:0 \ + -o match:"/dev/$md *$sectorsize *$mediasize_in_bytes *$mediasize_in_sectors *$stripesize *$stripeoffset" \ + -x "diskinfo /dev/$md | expand" +} + +cleanup_common() +{ + if [ -f mdconfig.out ]; then + mdconfig -d -u $(sed -e 's/md//' mdconfig.out) + fi +} + +atf_test_case attach_vnode_non_explicit_type cleanup +attach_vnode_non_explicit_type_head() +{ + atf_set "descr" "Tests out -a / -f without -t" +} +attach_vnode_non_explicit_type_body() +{ + local md + local size_in_mb=1024 + + atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx" + atf_check -s exit:0 -o save:mdconfig.out -x 'mdconfig -af xxx' + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "1073741824" "2097152" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_vnode_non_explicit_type_cleanup() +{ + cleanup_common +} + +atf_test_case attach_vnode_implicit_a_f cleanup +attach_vnode_implicit_a_f_head() +{ + atf_set "descr" "Tests out implied -a / -f without -t" +} +attach_vnode_implicit_a_f_body() +{ + local md + local size_in_mb=1024 + + atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx" + atf_check -s exit:0 -o save:mdconfig.out -x 'mdconfig xxx' + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "1073741824" "2097152" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_vnode_implicit_a_f_cleanup() +{ + cleanup_common +} + +atf_test_case attach_vnode_explicit_type cleanup +attach_vnode_explicit_type_head() +{ + atf_set "descr" "Tests out implied -a / -f with -t vnode" +} +attach_vnode_explicit_type_body() +{ + local md + local size_in_mb=1024 + + atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx" + atf_check -s exit:0 -o save:mdconfig.out -x 'mdconfig -af xxx -t vnode' + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "1073741824" "2097152" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_vnode_explicit_type_cleanup() +{ + [ -f mdconfig.out ] && mdconfig -d -u $(sed -e 's/md//' mdconfig.out) + rm -f mdconfig.out xxx +} + +atf_test_case attach_vnode_smaller_than_file cleanup +attach_vnode_smaller_than_file_head() +{ + atf_set "descr" "Tests mdconfig -s with size less than the file size" +} +attach_vnode_smaller_than_file_body() +{ + local md + local size_in_mb=128 + + atf_check -s exit:0 -x "truncate -s 1024m xxx" + atf_check -s exit:0 -o save:mdconfig.out \ + -x "mdconfig -af xxx -s ${size_in_mb}m" + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "134217728" "262144" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_vnode_smaller_than_file_cleanup() +{ + cleanup_common +} + +atf_test_case attach_vnode_larger_than_file cleanup +attach_vnode_larger_than_file_head() +{ + atf_set "descr" "Tests mdconfig -s with size greater than the file size" +} +attach_vnode_larger_than_file_body() +{ + local md + local size_in_gb=128 + + atf_check -s exit:0 -x "truncate -s 1024m xxx" + atf_check -s exit:0 -o save:mdconfig.out \ + -x "mdconfig -af xxx -s ${size_in_gb}g" + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "137438953472" "268435456" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md vnode ${size_in_gb}G$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_vnode_larger_than_file_cleanup() +{ + cleanup_common +} + +atf_test_case attach_vnode_sector_size cleanup +attach_vnode_sector_size_head() +{ + atf_set "descr" "Tests mdconfig -s with size greater than the file size" +} +attach_vnode_sector_size_body() +{ + local md + local size_in_mb=1024 + + atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx" + atf_check -s exit:0 -o save:mdconfig.out \ + -x "mdconfig -af xxx -S 2048" + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "1073741824" "524288" "2048" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_vnode_sector_size_cleanup() +{ + cleanup_common +} + +atf_test_case attach_malloc cleanup +attach_malloc_head() +{ + atf_set "descr" "Tests mdconfig with -t malloc" +} +attach_malloc_body() +{ + local md + local size_in_mb=1024 + + atf_check -s exit:0 -o save:mdconfig.out \ + -x 'mdconfig -a -t malloc -s 1g' + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "1073741824" "2097152" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md malloc ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_malloc_cleanup() +{ + cleanup_common +} + +atf_test_case attach_swap cleanup +attach_swap_head() +{ + atf_set "descr" "Tests mdconfig with -t swap" +} +attach_swap_body() +{ + local md + local size_in_mb=1024 + + atf_check -s exit:0 -o save:mdconfig.out \ + -x 'mdconfig -a -t swap -s 1g' + md=$(cat mdconfig.out) + atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md" + check_diskinfo "$md" "1073741824" "2097152" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md swap ${size_in_mb}M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_swap_cleanup() +{ + cleanup_common +} + +atf_test_case attach_with_specific_unit_number cleanup +attach_with_specific_unit_number_head() +{ + atf_set "descr" "Tests mdconfig with a unit specified by -u" +} +attach_with_specific_unit_number_body() +{ + local md_unit=99 + local size_in_mb=10 + + local md="md${md_unit}" + + echo "$md" > mdconfig.out + + atf_check -s exit:0 -o empty \ + -x "mdconfig -a -t malloc -s ${size_in_mb}m -u $md_unit" + check_diskinfo "$md" "10485760" "20480" + # This awk strips the file path. + atf_check -s exit:0 -o match:"^$md malloc "$size_in_mb"M$" \ + -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'" +} +attach_with_specific_unit_number_cleanup() +{ + cleanup_common +} + +atf_init_test_cases() +{ + atf_add_test_case attach_vnode_non_explicit_type + atf_add_test_case attach_vnode_explicit_type + atf_add_test_case attach_vnode_smaller_than_file + atf_add_test_case attach_vnode_larger_than_file + atf_add_test_case attach_vnode_sector_size + atf_add_test_case attach_malloc + atf_add_test_case attach_swap + atf_add_test_case attach_with_specific_unit_number +} From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 06:42:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F051A772; Thu, 27 Nov 2014 06:42:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C266322D; Thu, 27 Nov 2014 06:42:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAR6gYqp042084; Thu, 27 Nov 2014 06:42:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAR6gYcO042083; Thu, 27 Nov 2014 06:42:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201411270642.sAR6gYcO042083@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 27 Nov 2014 06:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275171 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 06:42:35 -0000 Author: jhibbits Date: Thu Nov 27 06:42:34 2014 New Revision: 275171 URL: https://svnweb.freebsd.org/changeset/base/275171 Log: Fix hwpmc sampling for MPC74xxx (G4) processors. With this, hwpmc sampling now works correctly on these processors. MFC after: 3 weeks Relnotes: yes Modified: head/sys/dev/hwpmc/hwpmc_mpc7xxx.c Modified: head/sys/dev/hwpmc/hwpmc_mpc7xxx.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mpc7xxx.c Thu Nov 27 06:04:00 2014 (r275170) +++ head/sys/dev/hwpmc/hwpmc_mpc7xxx.c Thu Nov 27 06:42:34 2014 (r275171) @@ -578,9 +578,9 @@ mpc7xxx_pcpu_init(struct pmc_mdep *md, i } /* Clear the MMCRs, and set FC, to disable all PMCs. */ - mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE); + mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | + SPR_MMCR0_FCECE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE); mtspr(SPR_MMCR1, 0); - mtmsr(mfmsr() | PSL_PMM); return 0; } @@ -667,7 +667,6 @@ mpc7xxx_intr(int cpu, struct trapframe * uint32_t config; struct pmc *pm; struct powerpc_cpu *pac; - pmc_value_t v; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[powerpc,%d] out of range CPU %d", __LINE__, cpu)); @@ -679,8 +678,7 @@ mpc7xxx_intr(int cpu, struct trapframe * pac = powerpc_pcpu[cpu]; - config = mfspr(SPR_MMCR0); - mtspr(SPR_MMCR0, config | SPR_MMCR0_FC); + config = mfspr(SPR_MMCR0) & ~SPR_MMCR0_FC; /* * look for all PMCs that have interrupted: @@ -704,22 +702,22 @@ mpc7xxx_intr(int cpu, struct trapframe * if (pm->pm_state != PMC_STATE_RUNNING) continue; - /* Stop the PMC, reload count. */ - v = pm->pm_sc.pm_reloadcount; - mpc7xxx_pmcn_write(i, v); - - /* Restart the counter if logging succeeded. */ + /* Stop the counter if logging fails. */ error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, TRAPF_USERMODE(tf)); if (error != 0) mpc7xxx_stop_pmc(cpu, i); - atomic_add_int(retval ? &pmc_stats.pm_intr_processed : - &pmc_stats.pm_intr_ignored, 1); + /* reload count. */ + mpc7xxx_write_pmc(cpu, i, pm->pm_sc.pm_reloadcount); } + atomic_add_int(retval ? &pmc_stats.pm_intr_processed : + &pmc_stats.pm_intr_ignored, 1); + /* Re-enable PERF exceptions. */ - mtspr(SPR_MMCR0, config | SPR_MMCR0_PMXE); + if (retval) + mtspr(SPR_MMCR0, config | SPR_MMCR0_PMXE); return (retval); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 07:26:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9922124; Thu, 27 Nov 2014 07:26:41 +0000 (UTC) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A403F810; Thu, 27 Nov 2014 07:26:41 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id g10so4436726pdj.9 for ; Wed, 26 Nov 2014 23:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=stnCh7HPDx1MCzxXBs/XTjVuJhwxPD7FMgeqbgteins=; b=c01+dcKZkm/e/E+CwRLJ/J7cWdARdcIjaf1PINEAYxEv0V0S9XdI6Wt9o2/BRtldA/ kvAqBlaw/rH+yqXfBEZgGCRAaG9MNozPe5UqFDGD15mdf0G/EKrl1VPGm73VZqJzMHrC e/vDot2sNgi063aStLw2tKjzwp9VYca3tSd3REcxYmDmHxyYy/52xqpdEZ1VPN/SDN1g OZkjCbhwpO6kQLwxlv9OihDh7TAxjv7Zj5kyn9mge05LjPmiiPv53Aw+GSzkAGdqn0y2 bEp4nc8MjVwREXR4XtjMYkSuw4EWk9RAujpgVXC0vYsYXmcmD2XYkEP6l3zM2mMHxxkY ywkw== MIME-Version: 1.0 X-Received: by 10.70.23.99 with SMTP id l3mr60473942pdf.86.1417073201057; Wed, 26 Nov 2014 23:26:41 -0800 (PST) Sender: ermal.luci@gmail.com Received: by 10.70.91.232 with HTTP; Wed, 26 Nov 2014 23:26:40 -0800 (PST) In-Reply-To: <861torxt7j.fsf@nine.des.no> References: <201411191331.sAJDV9bH092190@svn.freebsd.org> <86tx1nvcy4.fsf@nine.des.no> <86ppcbvb04.fsf@nine.des.no> <86ioi3y0gb.fsf@nine.des.no> <861torxt7j.fsf@nine.des.no> Date: Thu, 27 Nov 2014 08:26:40 +0100 X-Google-Sender-Auth: QQhK8L8TIbPwmvvhfuPbQyPhQzs Message-ID: Subject: Re: svn commit: r274709 - head/sys/netpfil/pf From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 07:26:42 -0000 On Tue, Nov 25, 2014 at 3:14 PM, Dag-Erling Sm=C3=B8rgrav wrot= e: > Ermal Lu=C3=A7i writes: > > Also this only affects the traffic sourced by the host itself and not > > forwarded traffic and I think this patch will provide a regression for > > the issues that the committed patch does. > > How? > The code as it stands (after your commit) is incorrect and will trigger > an assertion in vtnet(4). You could argue that it is less incorrect > than the original, but the cure is worse than the disease. > > Let me come back to you in the following days with a better analysis. The existing sate of the world i think there will be checksum issues again especially in policy routing situations. I will come back with another patch to solve this, but am busy with some ${WORK} tasks. > My patch fixes the panic as well as two preexisting bugs (not taking the > IP checksum into account in the IPv4 path, and ignoring hardware > offloading). See https://bugs.freebsd.org/192013#c10 for an explanation > of what it does and why. > > DES > -- > Dag-Erling Sm=C3=B8rgrav - des@des.no > --=20 Ermal From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 09:17:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4E395B8; Thu, 27 Nov 2014 09:17:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1A1D2E1; Thu, 27 Nov 2014 09:17:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAR9HgWZ014198; Thu, 27 Nov 2014 09:17:42 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAR9Hg4s014197; Thu, 27 Nov 2014 09:17:42 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201411270917.sAR9Hg4s014197@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Thu, 27 Nov 2014 09:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275180 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 09:17:42 -0000 Author: n_hibma Date: Thu Nov 27 09:17:42 2014 New Revision: 275180 URL: https://svnweb.freebsd.org/changeset/base/275180 Log: clean_build is not always done (*), so move the mkdir to the first step that needs it and is always done: make.conf build. (*) In our build environment we actually never do a clean build unless instructed to do so, to make sure we do not accidentally delete the built world when on a tight schedule. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Nov 27 08:41:31 2014 (r275179) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Nov 27 09:17:42 2014 (r275180) @@ -213,13 +213,14 @@ clean_build ( ) ( chflags -R noschg ${MAKEOBJDIRPREFIX}/ nano_rm -r ${MAKEOBJDIRPREFIX}/ fi - mkdir -p ${MAKEOBJDIRPREFIX} - printenv > ${MAKEOBJDIRPREFIX}/_.env ) make_conf_build ( ) ( pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)" + mkdir -p ${MAKEOBJDIRPREFIX} + printenv > ${MAKEOBJDIRPREFIX}/_.env + echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD} echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD} ) From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 11:00:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F237FC9B; Thu, 27 Nov 2014 11:00:30 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id AF971113; Thu, 27 Nov 2014 11:00:30 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id B611BA195; Thu, 27 Nov 2014 11:00:28 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 268B21405; Thu, 27 Nov 2014 12:00:20 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ermal =?utf-8?Q?Lu=C3=A7i?= Subject: Re: svn commit: r274709 - head/sys/netpfil/pf References: <201411191331.sAJDV9bH092190@svn.freebsd.org> <86tx1nvcy4.fsf@nine.des.no> <86ppcbvb04.fsf@nine.des.no> <86ioi3y0gb.fsf@nine.des.no> <861torxt7j.fsf@nine.des.no> Date: Thu, 27 Nov 2014 12:00:20 +0100 In-Reply-To: ("Ermal =?utf-8?Q?Lu=C3=A7i=22's?= message of "Thu, 27 Nov 2014 08:26:40 +0100") Message-ID: <86sih4oqm3.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 11:00:31 -0000 Ermal Lu=C3=A7i writes: > The existing sate of the world i think there will be checksum issues > again especially in policy routing situations. You mean if a packet is destined for an interface that has offloading enabled, but pf decides to reroute it to an interface that doesn't? I don't know how these cases are currently handled, but the result of my patch will still be significantly better than the situation both before and after your commit, and your commit kills network performance. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 14:54:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62D74FFA; Thu, 27 Nov 2014 14:54:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43923E38; Thu, 27 Nov 2014 14:54:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAREsIUx074014; Thu, 27 Nov 2014 14:54:18 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAREsI9S074013; Thu, 27 Nov 2014 14:54:18 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201411271454.sAREsI9S074013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Thu, 27 Nov 2014 14:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275189 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 14:54:18 -0000 Author: maxim Date: Thu Nov 27 14:54:17 2014 New Revision: 275189 URL: https://svnweb.freebsd.org/changeset/base/275189 Log: o NetBSD 6.1.5, OpenBSD 5.6, FreeBSD 10.1, DragonFly 4.0.1 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Thu Nov 27 10:51:10 2014 (r275188) +++ head/share/misc/bsd-family-tree Thu Nov 27 14:54:17 2014 (r275189) @@ -296,30 +296,30 @@ FreeBSD 5.2 | | | \ | | | | | *--FreeBSD | | | NetBSD 6.1.3 | | | 10.0 | | | | | | - | | | | | | DragonFly 3.6.1 - | | | | | | | - | | | | | | | - | | | | | | DragonFly 3.6.2 - | | | | NetBSD 6.1.4 | | - | | | | | | - | | | | OpenBSD 5.5 | - | | | | | | - | | | | | DragonFly 3.8.0 - | | | | | | - | | | | | | - | | | | | DragonFly 3.8.1 - | | | | | | - | | | | | | - | | | | | DragonFly 3.6.3 - | | | | | | - | FreeBSD | | | | - | 9.3 | | | | - | | | | DragonFly 3.8.2 - | Mac OS X | | | - | 10.10 | | | - | | | | | - | | | | | - | | | | | + | | | | | | | DragonFly 3.6.1 + | | | | | | | | + | | | | | | | | + | | | | | | | DragonFly 3.6.2 + | | | | | NetBSD 6.1.4 | | + | | | | | | | | + | | | | | | OpenBSD 5.5 | + | | | | | | | | + | | | | | | | DragonFly 3.8.0 + | | | | | | | | + | | | | | | | | + | | | | | | | DragonFly 3.8.1 + | | | | | | | | + | | | | | | | | + | | | | | | | DragonFly 3.6.3 + | | | | | | | | + | | FreeBSD | | | | | + | | 9.3 | | | | | + | | | | NetBSD 6.1.5 | DragonFly 3.8.2 + | | Mac OS X | | | + | | 10.10 | | | + | | | | OpenBSD 5.6 | + | FreeBSD | | | | + | 10.1 | | | DragonFly 4.0.1 | | | | | | | | | | | | | | | @@ -655,7 +655,11 @@ DragonFly 3.8.1 2014-06-16 [DFB] DragonFly 3.6.3 2014-06-17 [DFB] FreeBSD 9.3 2014-07-05 [FBD] DragonFly 3.8.2 2014-08-08 [DFB] +NetBSD 6.1.5 2014-09-22 [NDB] Mac OS X 10.10 2014-10-16 [APL] +OpenBSD 5.6 2014-11-01 [OBD] +FreeBSD 10.1 2014-11-14 [FBD] +DragonFly 4.0.1 2014-11-25 [DFB] Bibliography ------------------------ From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 16:51:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9D91C45; Thu, 27 Nov 2014 16:51:06 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 660D5D8B; Thu, 27 Nov 2014 16:51:06 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hi2so8901880wib.11 for ; Thu, 27 Nov 2014 08:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=X5U1MZYctp+49mFQFy8xa/8W2kil2RGgmxHxxzoOwhM=; b=MOe3THq97voy7E7m/FOLxrZwKd+2P4nSqaj6X8Os5arq3h0J7tpT5VxWVQhCEtGld7 YRZfHted/wKg6PA+8mVRnE2yT8JRhqKChtZJfjjTas4BH19jZDmIalNBvDNzZLsz4C+Z aWghfDVFjx/wJXABbRVtcQX3JTO+8XiMZ+Hpk8fVeVBYwrmOOYaSWBZv84W0U4Y2bX6f BX7wGr7G6BAJhcKsXKDIPlDrXgGPri3g91pYqp4yR8R7dN2B718MzRgv4jHtfLDYK3y7 Xw2tfuNLa07ChzVeDxoxeopwMatAXKXoEPcTncarXOayrXOP+QaHYMD+6UnSMQ4h2Us5 WLtw== MIME-Version: 1.0 X-Received: by 10.194.85.83 with SMTP id f19mr62259300wjz.20.1417107064817; Thu, 27 Nov 2014 08:51:04 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Thu, 27 Nov 2014 08:51:04 -0800 (PST) In-Reply-To: <20141125173830.GA60905@bsdpad.com> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> <20141125122754.GA57252@bsdpad.com> <20141125152922.GX47144@FreeBSD.org> <20141125173830.GA60905@bsdpad.com> Date: Thu, 27 Nov 2014 08:51:04 -0800 X-Google-Sender-Auth: Z-OW9TJmzCbSggpMi9w3-ES3zhQ Message-ID: Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm From: Adrian Chadd To: Ruslan Bukin Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 16:51:07 -0000 Hi, Has there been any further progress with this? If there hasn't, then I'd like to see it backed out for the time being. I'm worried that this has introduced some subtle bugs and this isn't yet fully understood. Thanks, -adrian On 25 November 2014 at 09:38, Ruslan Bukin wrote: > On Tue, Nov 25, 2014 at 06:29:22PM +0300, Gleb Smirnoff wrote: >> R> Un-unioning helps partially: I receive much less panics and able to boot until login prompt in ~ 1/3 attempts with patch attached. >> >> What happens then? Same panic as w/o patch? >> > > Same random panics: > > [..] > Starting file system checks: > /dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% fragmentation) > MAP: No valid partition found at vtbd0 > MAP: No valid partition found at md0 > MAP: No valid partition found at md0 > panic: vm_page_insert_after: msucc doesn't succeed pindex > KDB: enter: panic > [ thread pid 53 tid 100030 ] > Stopped at kdb_enter+0x8c: lui at,0x0 > db> bt > Tracing pid 53 tid 100030 td 0x9800000000b8f000 > db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056d90f0 sz 16 > ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056d9100 sz 48 > ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056d9130 sz 192 > db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056d91f0 sz 16 > ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff80282338 sp c0000000056d9200 sz 816 > kdb_trap+188 (?,?,?,?) ra ffffffff804b10a4 sp c0000000056d9530 sz 64 > trap+1114 (?,?,?,?) ra ffffffff8049c63c sp c0000000056d9570 sz 288 > MipsKernGenException+154 (0,4,804f60d0,12f) ra ffffffff80281ed4 sp c0000000056d9690 sz 368 > kdb_enter+8c (?,?,?,?) ra ffffffff80234398 sp c0000000056d9800 sz 16 > ffffffff802341e8+1b0 (?,?,?,?) ra ffffffff802344c8 sp c0000000056d9810 sz 32 > kassert_panic+c8 (?,4,b82c00,3d7) ra ffffffff8047c580 sp c0000000056d9830 sz 96 > ffffffff8047c460+120 (?,?,?,?) ra ffffffff8047ff28 sp c0000000056d9890 sz 64 > vm_page_alloc+7f8 (?,?,?,?) ra ffffffff80464524 sp c0000000056d98d0 sz 80 > ffffffff80463a00+b24 (?,?,?,?) ra 0 sp c0000000056d9920 sz 272 > pid 53 > > Starting file system checks: > /dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% fragmentation) > MAP: No valid partition found at vtbd0 > MAP: No valid partition found at md0 > MAP: No valid partition found at md0 > panic: Bad link elm 0x9800000000bb3000 prev->next != elm > KDB: enter: panic > [ thread pid 44 tid 100030 ] > Stopped at kdb_enter+0x8c: lui at,0x0 > db> bt > Tracing pid 44 tid 100030 td 0x9800000000b8f000 > db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056d8ea0 sz 16 > ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056d8eb0 sz 48 > ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056d8ee0 sz 192 > db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056d8fa0 sz 16 > ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff80282338 sp c0000000056d8fb0 sz 816 > kdb_trap+188 (?,?,?,?) ra ffffffff804b10a4 sp c0000000056d92e0 sz 64 > trap+1114 (?,?,?,?) ra ffffffff8049c63c sp c0000000056d9320 sz 288 > MipsKernGenException+154 (0,4,804f60d0,12f) ra ffffffff80281ed4 sp c0000000056d9440 sz 368 > kdb_enter+8c (?,?,?,?) ra ffffffff80234398 sp c0000000056d95b0 sz 16 > ffffffff802341e8+1b0 (?,?,?,?) ra ffffffff80234400 sp c0000000056d95c0 sz 32 > panic+30 (?,bb3000,8051f738,8051f738) ra ffffffff804790c8 sp c0000000056d95e0 sz 96 > vm_object_deallocate+960 (?,?,?,?) ra ffffffff8046b184 sp c0000000056d9640 sz 96 > ffffffff8046b158+2c (?,?,?,?) ra ffffffff8046b2a4 sp c0000000056d96a0 sz 32 > ffffffff8046b1e8+bc (?,?,?,?) ra ffffffff8046b308 sp c0000000056d96c0 sz 32 > _vm_map_unlock+40 (?,?,?,?) ra ffffffff8046d990 sp c0000000056d96e0 sz 16 > vm_map_remove+98 (?,?,?,?) ra ffffffff801eb2e4 sp c0000000056d96f0 sz 32 > exec_new_vmspace+274 (?,?,?,?) ra ffffffff801c4ea0 sp c0000000056d9710 sz 80 > ffffffff801c4828+678 (?,?,?,?) ra ffffffff801eb81c sp c0000000056d9760 sz 304 > kern_execve+404 (?,?,?,?) ra ffffffff801ec6b4 sp c0000000056d9890 sz 784 > sys_execve+44 (?,?,?,?) ra ffffffff804b0a88 sp c0000000056d9ba0 sz 80 > trap+af8 (?,?,?,?) ra ffffffff8049c880 sp c0000000056d9bf0 sz 288 > MipsUserGenException+13c (?,?,?,600e30b4) ra 0 sp c0000000056d9d10 sz 0 > pid 44 > db> > > Ruslan > From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 18:39:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97D4273; Thu, 27 Nov 2014 18:39:24 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89353C93; Thu, 27 Nov 2014 18:39:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Xu3vZ-000Lpj-Ay; Thu, 27 Nov 2014 18:36:29 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Thu, 27 Nov 2014 18:36:29 +0000 (GMT) Date: Thu, 27 Nov 2014 18:36:29 +0000 From: Ruslan Bukin To: Adrian Chadd Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141127183629.GA83207@bsdpad.com> References: <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> <20141125122754.GA57252@bsdpad.com> <20141125152922.GX47144@FreeBSD.org> <20141125173830.GA60905@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 18:39:24 -0000 Hi, There is a theory that a problem is related to CPU caches, and it can be BERI-cpu specific only. And sorry I didn't realized virtio was still in the kernel when I was trying MDROOT (we do dcache operations in virtio). The workaround I found is to disable all the instruction cache invalidation calls (there are a few calls on cpu startup only). Ruslan On Thu, Nov 27, 2014 at 08:51:04AM -0800, Adrian Chadd wrote: > Hi, > > Has there been any further progress with this? > > If there hasn't, then I'd like to see it backed out for the time > being. I'm worried that this has introduced some subtle bugs and this > isn't yet fully understood. > > Thanks, > > > > -adrian > > > On 25 November 2014 at 09:38, Ruslan Bukin wrote: > > On Tue, Nov 25, 2014 at 06:29:22PM +0300, Gleb Smirnoff wrote: > >> R> Un-unioning helps partially: I receive much less panics and able to boot until login prompt in ~ 1/3 attempts with patch attached. > >> > >> What happens then? Same panic as w/o patch? > >> > > > > Same random panics: > > > > [..] > > Starting file system checks: > > /dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% fragmentation) > > MAP: No valid partition found at vtbd0 > > MAP: No valid partition found at md0 > > MAP: No valid partition found at md0 > > panic: vm_page_insert_after: msucc doesn't succeed pindex > > KDB: enter: panic > > [ thread pid 53 tid 100030 ] > > Stopped at kdb_enter+0x8c: lui at,0x0 > > db> bt > > Tracing pid 53 tid 100030 td 0x9800000000b8f000 > > db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056d90f0 sz 16 > > ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056d9100 sz 48 > > ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056d9130 sz 192 > > db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056d91f0 sz 16 > > ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff80282338 sp c0000000056d9200 sz 816 > > kdb_trap+188 (?,?,?,?) ra ffffffff804b10a4 sp c0000000056d9530 sz 64 > > trap+1114 (?,?,?,?) ra ffffffff8049c63c sp c0000000056d9570 sz 288 > > MipsKernGenException+154 (0,4,804f60d0,12f) ra ffffffff80281ed4 sp c0000000056d9690 sz 368 > > kdb_enter+8c (?,?,?,?) ra ffffffff80234398 sp c0000000056d9800 sz 16 > > ffffffff802341e8+1b0 (?,?,?,?) ra ffffffff802344c8 sp c0000000056d9810 sz 32 > > kassert_panic+c8 (?,4,b82c00,3d7) ra ffffffff8047c580 sp c0000000056d9830 sz 96 > > ffffffff8047c460+120 (?,?,?,?) ra ffffffff8047ff28 sp c0000000056d9890 sz 64 > > vm_page_alloc+7f8 (?,?,?,?) ra ffffffff80464524 sp c0000000056d98d0 sz 80 > > ffffffff80463a00+b24 (?,?,?,?) ra 0 sp c0000000056d9920 sz 272 > > pid 53 > > > > Starting file system checks: > > /dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% fragmentation) > > MAP: No valid partition found at vtbd0 > > MAP: No valid partition found at md0 > > MAP: No valid partition found at md0 > > panic: Bad link elm 0x9800000000bb3000 prev->next != elm > > KDB: enter: panic > > [ thread pid 44 tid 100030 ] > > Stopped at kdb_enter+0x8c: lui at,0x0 > > db> bt > > Tracing pid 44 tid 100030 td 0x9800000000b8f000 > > db_trace_thread+40 (?,?,?,?) ra ffffffff80117654 sp c0000000056d8ea0 sz 16 > > ffffffff801174c8+18c (0,?,ffffffff,?) ra ffffffff80116730 sp c0000000056d8eb0 sz 48 > > ffffffff801162a8+488 (?,?,?,?) ra ffffffff801169fc sp c0000000056d8ee0 sz 192 > > db_command_loop+f4 (?,?,?,?) ra ffffffff8011a570 sp c0000000056d8fa0 sz 16 > > ffffffff8011a3c8+1a8 (?,?,?,?) ra ffffffff80282338 sp c0000000056d8fb0 sz 816 > > kdb_trap+188 (?,?,?,?) ra ffffffff804b10a4 sp c0000000056d92e0 sz 64 > > trap+1114 (?,?,?,?) ra ffffffff8049c63c sp c0000000056d9320 sz 288 > > MipsKernGenException+154 (0,4,804f60d0,12f) ra ffffffff80281ed4 sp c0000000056d9440 sz 368 > > kdb_enter+8c (?,?,?,?) ra ffffffff80234398 sp c0000000056d95b0 sz 16 > > ffffffff802341e8+1b0 (?,?,?,?) ra ffffffff80234400 sp c0000000056d95c0 sz 32 > > panic+30 (?,bb3000,8051f738,8051f738) ra ffffffff804790c8 sp c0000000056d95e0 sz 96 > > vm_object_deallocate+960 (?,?,?,?) ra ffffffff8046b184 sp c0000000056d9640 sz 96 > > ffffffff8046b158+2c (?,?,?,?) ra ffffffff8046b2a4 sp c0000000056d96a0 sz 32 > > ffffffff8046b1e8+bc (?,?,?,?) ra ffffffff8046b308 sp c0000000056d96c0 sz 32 > > _vm_map_unlock+40 (?,?,?,?) ra ffffffff8046d990 sp c0000000056d96e0 sz 16 > > vm_map_remove+98 (?,?,?,?) ra ffffffff801eb2e4 sp c0000000056d96f0 sz 32 > > exec_new_vmspace+274 (?,?,?,?) ra ffffffff801c4ea0 sp c0000000056d9710 sz 80 > > ffffffff801c4828+678 (?,?,?,?) ra ffffffff801eb81c sp c0000000056d9760 sz 304 > > kern_execve+404 (?,?,?,?) ra ffffffff801ec6b4 sp c0000000056d9890 sz 784 > > sys_execve+44 (?,?,?,?) ra ffffffff804b0a88 sp c0000000056d9ba0 sz 80 > > trap+af8 (?,?,?,?) ra ffffffff8049c880 sp c0000000056d9bf0 sz 288 > > MipsUserGenException+13c (?,?,?,600e30b4) ra 0 sp c0000000056d9d10 sz 0 > > pid 44 > > db> > > > > Ruslan > > > From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 18:41:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8C53CB; Thu, 27 Nov 2014 18:41:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6258BCA4; Thu, 27 Nov 2014 18:41:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARIfF0B085794; Thu, 27 Nov 2014 18:41:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARIfFEt085793; Thu, 27 Nov 2014 18:41:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201411271841.sARIfFEt085793@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 27 Nov 2014 18:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275190 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 18:41:15 -0000 Author: jhibbits Date: Thu Nov 27 18:41:14 2014 New Revision: 275190 URL: https://svnweb.freebsd.org/changeset/base/275190 Log: Fix hwpmc sampling for ppc970 (G5-class) processors. With this, hwpmc sampling now works on these processors. MFC after: 3 weeks Relnotes: yes Modified: head/sys/dev/hwpmc/hwpmc_ppc970.c Modified: head/sys/dev/hwpmc/hwpmc_ppc970.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_ppc970.c Thu Nov 27 14:54:17 2014 (r275189) +++ head/sys/dev/hwpmc/hwpmc_ppc970.c Thu Nov 27 18:41:14 2014 (r275190) @@ -481,7 +481,6 @@ ppc970_intr(int cpu, struct trapframe *t { struct pmc *pm; struct powerpc_cpu *pac; - pmc_value_t v; uint32_t config; int i, error, retval; @@ -503,8 +502,7 @@ ppc970_intr(int cpu, struct trapframe *t * If found, we call a helper to process the interrupt. */ - config = mfspr(SPR_970MMCR0); - mtspr(SPR_970MMCR0, config | SPR_MMCR0_FC); + config = mfspr(SPR_970MMCR0) & ~SPR_MMCR0_FC; for (i = 0; i < PPC970_MAX_PMCS; i++) { if ((pm = pac->pc_ppcpmcs[i].phw_pmc) == NULL || !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { @@ -519,24 +517,21 @@ ppc970_intr(int cpu, struct trapframe *t if (pm->pm_state != PMC_STATE_RUNNING) continue; - /* Stop the PMC, reload count. */ - v = pm->pm_sc.pm_reloadcount; - - ppc970_pmcn_write(i, v); - - /* Restart the counter if logging succeeded. */ error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, TRAPF_USERMODE(tf)); - mtspr(SPR_970MMCR0, config); if (error != 0) ppc970_stop_pmc(cpu, i); - atomic_add_int(retval ? &pmc_stats.pm_intr_processed : - &pmc_stats.pm_intr_ignored, 1); + /* reload sampling count. */ + ppc970_write_pmc(cpu, i, pm->pm_sc.pm_reloadcount); } + atomic_add_int(retval ? &pmc_stats.pm_intr_processed : + &pmc_stats.pm_intr_ignored, 1); + /* Re-enable PERF exceptions. */ - mtspr(SPR_970MMCR0, mfspr(SPR_970MMCR0) | SPR_MMCR0_PMXE); + if (retval) + mtspr(SPR_970MMCR0, config | SPR_MMCR0_PMXE); return (retval); } @@ -572,10 +567,10 @@ ppc970_pcpu_init(struct pmc_mdep *md, in /* Clear the MMCRs, and set FC, to disable all PMCs. */ /* 970 PMC is not counted when set to 0x08 */ - mtspr(SPR_970MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE | - SPR_MMCR0_PMCNCE | SPR_970MMCR0_PMC1SEL(0x8) | SPR_970MMCR0_PMC2SEL(0x8)); + mtspr(SPR_970MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | + SPR_MMCR0_FCECE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE | + SPR_970MMCR0_PMC1SEL(0x8) | SPR_970MMCR0_PMC2SEL(0x8)); mtspr(SPR_970MMCR1, 0x4218420); - mtmsr(mfmsr() | PSL_PMM); return 0; } @@ -585,7 +580,6 @@ ppc970_pcpu_fini(struct pmc_mdep *md, in { register_t mmcr0 = mfspr(SPR_MMCR0); - mtmsr(mfmsr() & ~PSL_PMM); mmcr0 |= SPR_MMCR0_FC; mmcr0 &= ~SPR_MMCR0_PMXE; mtspr(SPR_MMCR0, mmcr0); From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 18:43:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAB4D55C; Thu, 27 Nov 2014 18:43:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6FD4D50; Thu, 27 Nov 2014 18:43:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARIhi8P087631; Thu, 27 Nov 2014 18:43:44 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARIhiIr087630; Thu, 27 Nov 2014 18:43:44 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201411271843.sARIhiIr087630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Thu, 27 Nov 2014 18:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275191 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 18:43:45 -0000 Author: rdivacky Date: Thu Nov 27 18:43:44 2014 New Revision: 275191 URL: https://svnweb.freebsd.org/changeset/base/275191 Log: Revert part of r275059. Comparing unsigned 8 bit value against -'0' is always false so the conditional block is optimized away. Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Thu Nov 27 18:41:14 2014 (r275190) +++ head/sys/boot/i386/boot2/boot2.c Thu Nov 27 18:43:44 2014 (r275191) @@ -394,9 +394,8 @@ parse() char *ep, *p, *q; const char *cp; unsigned int drv; - int c, j; + int c, i, j; size_t k; - uint8_t i; while ((c = *arg++)) { if (c == ' ' || c == '\t' || c == '\n') From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 19:28:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB7D0583; Thu, 27 Nov 2014 19:28:33 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AFB6183; Thu, 27 Nov 2014 19:28:33 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id z12so7261000wgg.15 for ; Thu, 27 Nov 2014 11:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=OHeE39O8jt7DedXfenp9DLvQ4GEF0ubKoWAhXhxUvCc=; b=ZvJAwbrc64V/HXH8PxesDNT2HkxMMeeKGq2yC6+MYT4cobyFAjFX+wz0dI7hbRfoCI 9YfoUyrMPVWkvmpMKYU+5HpQvs6nLEF51k7VMaumSPlfwv3jc56FtOOn8sHdsp2ZarpH DNXHwwzszVyv3gQPFTTw6PpUM8rnWXEvK9M2lIwcf59L+j0nP6q8sCTJzGNPdpWtcrqn xqfrJXPavVJz5uBOii1r4TSR6Htt5xmeAYcdKV9yb/mQ5B13FgkPyf5qE6pLAINpV7/A wEAyvmxW6K4zNPDxYJ368oj/dZDvf6xFjbW9IAVyJtwX7JL9XAUT70jJypWS8YsENrf8 RRJA== MIME-Version: 1.0 X-Received: by 10.180.240.201 with SMTP id wc9mr52977453wic.59.1417116512051; Thu, 27 Nov 2014 11:28:32 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Thu, 27 Nov 2014 11:28:31 -0800 (PST) In-Reply-To: <20141127183629.GA83207@bsdpad.com> References: <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> <20141125122754.GA57252@bsdpad.com> <20141125152922.GX47144@FreeBSD.org> <20141125173830.GA60905@bsdpad.com> <20141127183629.GA83207@bsdpad.com> Date: Thu, 27 Nov 2014 11:28:31 -0800 X-Google-Sender-Auth: fv2YlmiEWxushuxBsiiVR5Ph9ME Message-ID: Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm From: Adrian Chadd To: Ruslan Bukin Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 19:28:34 -0000 On 27 November 2014 at 10:36, Ruslan Bukin wrote: > Hi, > > There is a theory that a problem is related to CPU caches, and it can be BERI-cpu > specific only. > > And sorry I didn't realized virtio was still in the kernel when I was trying > MDROOT (we do dcache operations in virtio). > > The workaround I found is to disable all the instruction cache invalidation calls > (there are a few calls on cpu startup only). > Hm, can we test this on real MIPS hardware, just to be sure? I can spin this up on MIPS24k/MIPS74k hardware early next week. -adrian From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 20:12:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1991CB74; Thu, 27 Nov 2014 20:12:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 058F4828; Thu, 27 Nov 2014 20:12:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARKCDH1031144; Thu, 27 Nov 2014 20:12:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARKCDe5031143; Thu, 27 Nov 2014 20:12:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411272012.sARKCDe5031143@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 27 Nov 2014 20:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275192 - in head/contrib/elftoolchain: addr2line cxxfilt elfcopy libelftc nm size strings X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 20:12:14 -0000 Author: emaste Date: Thu Nov 27 20:12:13 2014 New Revision: 275192 URL: https://svnweb.freebsd.org/changeset/base/275192 Log: Copy elftoolchain binutils replacements from vendor branch Sponsored by: The FreeBSD Foundation Added: head/contrib/elftoolchain/addr2line/ - copied from r275191, vendor/elftoolchain/dist/addr2line/ head/contrib/elftoolchain/cxxfilt/ - copied from r275191, vendor/elftoolchain/dist/cxxfilt/ head/contrib/elftoolchain/elfcopy/ - copied from r275191, vendor/elftoolchain/dist/elfcopy/ head/contrib/elftoolchain/libelftc/ - copied from r275191, vendor/elftoolchain/dist/libelftc/ head/contrib/elftoolchain/nm/ - copied from r275191, vendor/elftoolchain/dist/nm/ head/contrib/elftoolchain/size/ - copied from r275191, vendor/elftoolchain/dist/size/ head/contrib/elftoolchain/strings/ - copied from r275191, vendor/elftoolchain/dist/strings/ From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 20:22:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46200E4F; Thu, 27 Nov 2014 20:22:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32F58958; Thu, 27 Nov 2014 20:22:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARKMlLl035887; Thu, 27 Nov 2014 20:22:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARKMlYK035886; Thu, 27 Nov 2014 20:22:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411272022.sARKMlYK035886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 27 Nov 2014 20:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275193 - head/gnu/usr.bin/binutils X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 20:22:47 -0000 Author: emaste Date: Thu Nov 27 20:22:46 2014 New Revision: 275193 URL: https://svnweb.freebsd.org/changeset/base/275193 Log: Put each SUBDIR on a separate line This makes it easier to review or merge changes that modify some subset of SUBDIRs. Modified: head/gnu/usr.bin/binutils/Makefile Modified: head/gnu/usr.bin/binutils/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/Makefile Thu Nov 27 20:12:13 2014 (r275192) +++ head/gnu/usr.bin/binutils/Makefile Thu Nov 27 20:22:46 2014 (r275193) @@ -1,7 +1,19 @@ # $FreeBSD$ -SUBDIR= libiberty libbfd libopcodes libbinutils \ - addr2line as ld nm objcopy objdump readelf \ - size strings strip doc +SUBDIR= libiberty \ + libbfd \ + libopcodes \ + libbinutils \ + addr2line \ + as \ + ld \ + nm \ + objcopy \ + objdump \ + readelf \ + size \ + strings \ + strip \ + doc .include From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 20:24:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1DF2FCF; Thu, 27 Nov 2014 20:24:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEBE8979; Thu, 27 Nov 2014 20:24:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARKOw5I036187; Thu, 27 Nov 2014 20:24:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARKOwIx036186; Thu, 27 Nov 2014 20:24:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411272024.sARKOwIx036186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 27 Nov 2014 20:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275194 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 20:24:59 -0000 Author: bapt Date: Thu Nov 27 20:24:58 2014 New Revision: 275194 URL: https://svnweb.freebsd.org/changeset/base/275194 Log: Remove leftovers readline being changed to an internallib Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 27 20:22:46 2014 (r275193) +++ head/ObsoleteFiles.inc Thu Nov 27 20:24:58 2014 (r275194) @@ -140,10 +140,12 @@ OLD_FILES+=usr/include/readline/chardefs OLD_FILES+=usr/include/readline/history.h OLD_FILES+=usr/include/readline/keymaps.h OLD_FILES+=usr/include/readline/readline.h +OLD_FILES+=usr/include/readline/tilde.h OLD_FILES+=usr/include/readline/rlconf.h OLD_FILES+=usr/include/readline/rlstdc.h OLD_FILES+=usr/include/readline/rltypedefs.h OLD_FILES+=usr/include/readline/rltypedefs.h +OLD_DIRS+=usr/include/readline OLD_FILES+=usr/share/info/readline.info.gz OLD_FILES+=usr/share/man/man3/readline.3.gz # 20140625: csup removal From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 20:28:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5096C1D0; Thu, 27 Nov 2014 20:28:19 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 100189A0; Thu, 27 Nov 2014 20:28:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Xu5d4-000M1a-F5; Thu, 27 Nov 2014 20:25:30 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Thu, 27 Nov 2014 20:25:30 +0000 (GMT) Date: Thu, 27 Nov 2014 20:25:30 +0000 From: Ruslan Bukin To: Adrian Chadd Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141127202530.GA84608@bsdpad.com> References: <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org> <20141125122754.GA57252@bsdpad.com> <20141125152922.GX47144@FreeBSD.org> <20141125173830.GA60905@bsdpad.com> <20141127183629.GA83207@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 20:28:19 -0000 On Thu, Nov 27, 2014 at 11:28:31AM -0800, Adrian Chadd wrote: > On 27 November 2014 at 10:36, Ruslan Bukin wrote: > > Hi, > > > > There is a theory that a problem is related to CPU caches, and it can be BERI-cpu > > specific only. > > > > And sorry I didn't realized virtio was still in the kernel when I was trying > > MDROOT (we do dcache operations in virtio). > > > > The workaround I found is to disable all the instruction cache invalidation calls > > (there are a few calls on cpu startup only). > > > > Hm, can we test this on real MIPS hardware, just to be sure? > > I can spin this up on MIPS24k/MIPS74k hardware early next week. > It can be helpfull. It is easy to test, just insert mips_dcache_wbinv_all() call in some driver and ensure mips_cache_ops.mco_sdcache_wbinv_all is not NULL on your hardware, so the dcache invalidation call will invalidate both primary and secondary data caches. With virtio we are calling mips_dcache_wbinv_all() a few times per second (the good idea here is supposed to be more selective with physical addresses invalidation, but it should not hurt to data consistent as it do both writeback and flush) Ruslan From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 20:50:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 147D05E0; Thu, 27 Nov 2014 20:50:28 +0000 (UTC) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id E9D97BB9; Thu, 27 Nov 2014 20:50:27 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 5145E5607B; Thu, 27 Nov 2014 14:50:26 -0600 (CST) Date: Thu, 27 Nov 2014 14:50:26 -0600 From: Mark Linimon To: Ed Maste Subject: Re: svn commit: r275192 - in head/contrib/elftoolchain: addr2line cxxfilt elfcopy libelftc nm size strings Message-ID: <20141127205026.GA26436@lonesome.com> References: <201411272012.sARKCDe5031143@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411272012.sARKCDe5031143@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 20:50:28 -0000 On Thu, Nov 27, 2014 at 08:12:13PM +0000, Ed Maste wrote: > Copy elftoolchain binutils replacements from vendor branch sweet! mcl From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 21:29:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5D02ED8; Thu, 27 Nov 2014 21:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B827DFA2; Thu, 27 Nov 2014 21:29:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARLTKt2064550; Thu, 27 Nov 2014 21:29:20 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARLTK2g064549; Thu, 27 Nov 2014 21:29:20 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411272129.sARLTK2g064549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 27 Nov 2014 21:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275195 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 21:29:21 -0000 Author: melifaro Date: Thu Nov 27 21:29:19 2014 New Revision: 275195 URL: https://svnweb.freebsd.org/changeset/base/275195 Log: Do not try to copy header to @dst and than back to ethernet in case of pseudo_AF_HDRCMPLT: we copy media header from mbuf to 'struct sockaddr' @dst in bpf_movein, so mbuf already contains valid info. Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Nov 27 20:24:58 2014 (r275194) +++ head/sys/net/if_ethersubr.c Thu Nov 27 21:29:19 2014 (r275195) @@ -147,7 +147,7 @@ ether_output(struct ifnet *ifp, struct m { short type; int error = 0, hdrcmplt = 0; - u_char esrc[ETHER_ADDR_LEN], edst[ETHER_ADDR_LEN]; + u_char edst[ETHER_ADDR_LEN]; struct llentry *lle = NULL; struct rtentry *rt0 = NULL; struct ether_header *eh; @@ -226,16 +226,12 @@ ether_output(struct ifnet *ifp, struct m #endif case pseudo_AF_HDRCMPLT: { - const struct ether_header *eh; - hdrcmplt = 1; - eh = (const struct ether_header *)dst->sa_data; - (void)memcpy(esrc, eh->ether_shost, sizeof (esrc)); /* FALLTHROUGH */ case AF_UNSPEC: loop_copy = 0; /* if this is for us, don't do it */ - eh = (const struct ether_header *)dst->sa_data; + eh = (struct ether_header *)dst->sa_data; (void)memcpy(edst, eh->ether_dhost, sizeof (edst)); type = eh->ether_type; break; @@ -258,15 +254,11 @@ ether_output(struct ifnet *ifp, struct m if (m == NULL) senderr(ENOBUFS); eh = mtod(m, struct ether_header *); - (void)memcpy(&eh->ether_type, &type, - sizeof(eh->ether_type)); - (void)memcpy(eh->ether_dhost, edst, sizeof (edst)); - if (hdrcmplt) - (void)memcpy(eh->ether_shost, esrc, - sizeof(eh->ether_shost)); - else - (void)memcpy(eh->ether_shost, IF_LLADDR(ifp), - sizeof(eh->ether_shost)); + if (hdrcmplt == 0) { + memcpy(&eh->ether_type, &type, sizeof(eh->ether_type)); + memcpy(eh->ether_dhost, edst, sizeof (edst)); + memcpy(eh->ether_shost, IF_LLADDR(ifp),sizeof(eh->ether_shost)); + } /* * If a simplex interface, and the packet is being sent to our From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 22:41:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EAD9AAB; Thu, 27 Nov 2014 22:41:43 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F124E924; Thu, 27 Nov 2014 22:41:42 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id tp5so4993933ieb.26 for ; Thu, 27 Nov 2014 14:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=vrBQQRqfwUJS9vjpX5obUVe0/MwSc7yMAmN4kU7dSKM=; b=rkl9h9xdycppdQb2/hFEs5AIPgAhIlb+JyxvFO8KZlefH+YGjxlISFRhIjx/fE3/k5 o4agXhldT8DSpeB5R3ZkTblHmy8xflPEQN5z9vy3w2kHq7B8D8xULC0/qO70npSjxvcs /WxY2jJ55JdP56VfNpHFovN07frbfJXeGanKfwRAVOCFIi8pYKy9Oru0f2Ffe1BpHixd sCqqtDTjz72jCux1ixBxReRsGHiTvTf+YDZg52nyz5CEkFFcEtUwp7BP2NDwE/qdV234 yVJZuYNg3nm54VD8jrpmXNxgcGphkO1cmYLPXMElQfL4WPzi3AONlmfQlbsXHioRvC6a KlnQ== X-Received: by 10.107.170.162 with SMTP id g34mr37207304ioj.2.1417128102354; Thu, 27 Nov 2014 14:41:42 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.29.141 with HTTP; Thu, 27 Nov 2014 14:41:22 -0800 (PST) In-Reply-To: <20141127205026.GA26436@lonesome.com> References: <201411272012.sARKCDe5031143@svn.freebsd.org> <20141127205026.GA26436@lonesome.com> From: Ed Maste Date: Thu, 27 Nov 2014 17:41:22 -0500 X-Google-Sender-Auth: 1IiNWL_hDjJhce-OxcHwhTf0IXU Message-ID: Subject: Re: svn commit: r275192 - in head/contrib/elftoolchain: addr2line cxxfilt elfcopy libelftc nm size strings To: Mark Linimon Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 22:41:43 -0000 On 27 November 2014 at 15:50, Mark Linimon wrote: > On Thu, Nov 27, 2014 at 08:12:13PM +0000, Ed Maste wrote: >> Copy elftoolchain binutils replacements from vendor branch > > sweet! It's not yet ready for a broad call for testing, but a WIP patch to use the elftoolchain versions is in review D1224 [1] if you want to take a look. I'm currently running it in an amd64 VM. [1] https://reviews.freebsd.org/D1224 - Ed From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 23:06:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C4F2FB4; Thu, 27 Nov 2014 23:06:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86910B13; Thu, 27 Nov 2014 23:06:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARN6TPb011296; Thu, 27 Nov 2014 23:06:29 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARN6Q9H011277; Thu, 27 Nov 2014 23:06:26 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411272306.sARN6Q9H011277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 27 Nov 2014 23:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275196 - in head/sys: net netinet netinet6 ofed/drivers/infiniband/core ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 23:06:29 -0000 Author: melifaro Date: Thu Nov 27 23:06:25 2014 New Revision: 275196 URL: https://svnweb.freebsd.org/changeset/base/275196 Log: Do not return unlocked/unreferenced lle in arpresolve/nd6_storelladdr - return lle flags IFF needed. Do not pass rte to arpresolve - pass is_gateway flag instead. Modified: head/sys/net/if_arcsubr.c head/sys/net/if_ethersubr.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c head/sys/net/if_iso88025subr.c head/sys/netinet/if_ether.c head/sys/netinet/if_ether.h head/sys/netinet/toecore.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/ofed/drivers/infiniband/core/addr.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/net/if_arcsubr.c Thu Nov 27 23:06:25 2014 (r275196) @@ -103,9 +103,7 @@ arc_output(struct ifnet *ifp, struct mbu u_int8_t atype, adst; int loop_copy = 0; int isphds; -#if defined(INET) || defined(INET6) - struct llentry *lle; -#endif + int is_gw; if (!((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING))) @@ -125,8 +123,11 @@ arc_output(struct ifnet *ifp, struct mbu else if (ifp->if_flags & IFF_NOARP) adst = ntohl(SIN(dst)->sin_addr.s_addr) & 0xFF; else { - error = arpresolve(ifp, ro ? ro->ro_rt : NULL, - m, dst, &adst, &lle); + is_gw = 0; + if (ro != NULL && ro->ro_rt != NULL && + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; + error = arpresolve(ifp, is_gw, m, dst, &adst, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); } @@ -164,7 +165,7 @@ arc_output(struct ifnet *ifp, struct mbu #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, &lle); + error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, NULL); if (error) return (error); atype = ARCTYPE_INET6; Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/net/if_ethersubr.c Thu Nov 27 23:06:25 2014 (r275196) @@ -154,11 +154,18 @@ ether_output(struct ifnet *ifp, struct m struct pf_mtag *t; int loop_copy = 1; int hlen; /* link layer header length */ + int is_gw = 0; + uint32_t pflags = 0; if (ro != NULL) { - if (!(m->m_flags & (M_BCAST | M_MCAST))) + if (!(m->m_flags & (M_BCAST | M_MCAST))) { lle = ro->ro_lle; + if (lle != NULL) + pflags = lle->la_flags; + } rt0 = ro->ro_rt; + if (rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; } #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); @@ -177,10 +184,10 @@ ether_output(struct ifnet *ifp, struct m switch (dst->sa_family) { #ifdef INET case AF_INET: - if (lle != NULL && (lle->la_flags & LLE_VALID)) + if (lle != NULL && (pflags & LLE_VALID) != 0) memcpy(edst, &lle->ll_addr.mac16, sizeof(edst)); else - error = arpresolve(ifp, rt0, m, dst, edst, &lle); + error = arpresolve(ifp, is_gw, m, dst, edst, &pflags); if (error) return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IP); @@ -215,10 +222,11 @@ ether_output(struct ifnet *ifp, struct m #endif #ifdef INET6 case AF_INET6: - if (lle != NULL && (lle->la_flags & LLE_VALID)) + if (lle != NULL && (pflags & LLE_VALID)) memcpy(edst, &lle->ll_addr.mac16, sizeof(edst)); else - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle); + error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, + &pflags); if (error) return error; type = htons(ETHERTYPE_IPV6); @@ -241,7 +249,7 @@ ether_output(struct ifnet *ifp, struct m senderr(EAFNOSUPPORT); } - if (lle != NULL && (lle->la_flags & LLE_IFADDR)) { + if ((pflags & LLE_IFADDR) != 0) { update_mbuf_csumflags(m, m); return (if_simloop(ifp, m, dst->sa_family, 0)); } Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/net/if_fddisubr.c Thu Nov 27 23:06:25 2014 (r275196) @@ -101,9 +101,7 @@ fddi_output(struct ifnet *ifp, struct mb int loop_copy = 0, error = 0, hdrcmplt = 0; u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN]; struct fddi_header *fh; -#if defined(INET) || defined(INET6) - struct llentry *lle; -#endif + int is_gw; #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); @@ -121,11 +119,11 @@ fddi_output(struct ifnet *ifp, struct mb switch (dst->sa_family) { #ifdef INET case AF_INET: { - struct rtentry *rt0 = NULL; - - if (ro != NULL) - rt0 = ro->ro_rt; - error = arpresolve(ifp, rt0, m, dst, edst, &lle); + is_gw = 0; + if (ro != NULL && ro->ro_rt != NULL && + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; + error = arpresolve(ifp, is_gw, m, dst, edst, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IP); @@ -161,7 +159,7 @@ fddi_output(struct ifnet *ifp, struct mb #endif /* INET */ #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle); + error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); if (error) return (error); /* Something bad happened */ type = htons(ETHERTYPE_IPV6); Modified: head/sys/net/if_fwsubr.c ============================================================================== --- head/sys/net/if_fwsubr.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/net/if_fwsubr.c Thu Nov 27 23:06:25 2014 (r275196) @@ -89,9 +89,7 @@ firewire_output(struct ifnet *ifp, struc struct mbuf *mtail; int unicast, dgl, foff; static int next_dgl; -#if defined(INET) || defined(INET6) - struct llentry *lle; -#endif + int is_gw; #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); @@ -140,7 +138,11 @@ firewire_output(struct ifnet *ifp, struc * doesn't fit into the arp model. */ if (unicast) { - error = arpresolve(ifp, ro ? ro->ro_rt : NULL, m, dst, (u_char *) destfw, &lle); + is_gw = 0; + if (ro != NULL && ro->ro_rt != NULL && + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; + error = arpresolve(ifp, is_gw, m, dst, (u_char *) destfw, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); } @@ -170,7 +172,7 @@ firewire_output(struct ifnet *ifp, struc case AF_INET6: if (unicast) { error = nd6_storelladdr(fc->fc_ifp, m, dst, - (u_char *) destfw, &lle); + (u_char *) destfw, NULL); if (error) return (error); } Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/net/if_iso88025subr.c Thu Nov 27 23:06:25 2014 (r275196) @@ -212,12 +212,13 @@ iso88025_output(struct ifnet *ifp, struc struct iso88025_header gen_th; struct sockaddr_dl *sdl = NULL; struct rtentry *rt0 = NULL; -#if defined(INET) || defined(INET6) - struct llentry *lle; -#endif + int is_gw = 0; - if (ro != NULL) + if (ro != NULL) { rt0 = ro->ro_rt; + if (rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; + } #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); @@ -257,7 +258,7 @@ iso88025_output(struct ifnet *ifp, struc switch (dst->sa_family) { #ifdef INET case AF_INET: - error = arpresolve(ifp, rt0, m, dst, edst, &lle); + error = arpresolve(ifp, is_gw, m, dst, edst, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); snap_type = ETHERTYPE_IP; @@ -292,7 +293,7 @@ iso88025_output(struct ifnet *ifp, struc #endif /* INET */ #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle); + error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); if (error) return (error); snap_type = ETHERTYPE_IPV6; Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/netinet/if_ether.c Thu Nov 27 23:06:25 2014 (r275196) @@ -286,19 +286,20 @@ arprequest(struct ifnet *ifp, const stru * Resolve an IP address into an ethernet address. * On input: * ifp is the interface we use - * rt0 is the route to the final destination (possibly useless) + * is_gw != if @dst represents gateway to some destination * m is the mbuf. May be NULL if we don't have a packet. * dst is the next hop, * desten is where we want the address. + * flags returns lle entry flags. * - * On success, desten is filled in and the function returns 0; + * On success, desten and flags are filled in and the function returns 0; * If the packet must be held pending resolution, we return EWOULDBLOCK * On other errors, we return the corresponding error code. * Note that m_freem() handles NULL. */ int -arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, - const struct sockaddr *dst, u_char *desten, struct llentry **lle) +arpresolve(struct ifnet *ifp, int is_gw, struct mbuf *m, + const struct sockaddr *dst, u_char *desten, uint32_t *pflags) { struct llentry *la = 0; u_int flags = 0; @@ -306,7 +307,9 @@ arpresolve(struct ifnet *ifp, struct rte struct mbuf *next = NULL; int error, renew; - *lle = NULL; + if (pflags != NULL) + *pflags = 0; + if (m != NULL) { if (m->m_flags & M_BCAST) { /* broadcast */ @@ -354,7 +357,8 @@ retry: la->la_preempt--; } - *lle = la; + if (pflags != NULL) + *pflags = la->la_flags; error = 0; goto done; } @@ -412,8 +416,7 @@ retry: if (la->la_asked < V_arp_maxtries) error = EWOULDBLOCK; /* First request. */ else - error = rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) ? - EHOSTUNREACH : EHOSTDOWN; + error = is_gw != 0 ? EHOSTUNREACH : EHOSTDOWN; if (renew) { int canceled; Modified: head/sys/netinet/if_ether.h ============================================================================== --- head/sys/netinet/if_ether.h Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/netinet/if_ether.h Thu Nov 27 23:06:25 2014 (r275196) @@ -112,11 +112,10 @@ struct sockaddr_inarp { extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN]; extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN]; -struct llentry; struct ifaddr; -int arpresolve(struct ifnet *ifp, struct rtentry *rt, struct mbuf *m, - const struct sockaddr *dst, u_char *desten, struct llentry **lle); +int arpresolve(struct ifnet *ifp, int is_gw, struct mbuf *m, + const struct sockaddr *dst, u_char *desten, uint32_t *pflags); void arprequest(struct ifnet *, const struct in_addr *, const struct in_addr *, u_char *); void arp_ifinit(struct ifnet *, struct ifaddr *); Modified: head/sys/netinet/toecore.c ============================================================================== --- head/sys/netinet/toecore.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/netinet/toecore.c Thu Nov 27 23:06:25 2014 (r275196) @@ -516,15 +516,12 @@ int toe_l2_resolve(struct toedev *tod, struct ifnet *ifp, struct sockaddr *sa, uint8_t *lladdr, uint16_t *vtag) { -#ifdef INET - struct llentry *lle; -#endif int rc; switch (sa->sa_family) { #ifdef INET case AF_INET: - rc = arpresolve(ifp, NULL, NULL, sa, lladdr, &lle); + rc = arpresolve(ifp, 0, NULL, sa, lladdr, NULL); break; #endif #ifdef INET6 Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/netinet6/nd6.c Thu Nov 27 23:06:25 2014 (r275196) @@ -2278,11 +2278,12 @@ nd6_rem_ifa_lle(struct in6_ifaddr *ia) */ int nd6_storelladdr(struct ifnet *ifp, struct mbuf *m, - const struct sockaddr *dst, u_char *desten, struct llentry **lle) + const struct sockaddr *dst, u_char *desten, uint32_t *pflags) { struct llentry *ln; - *lle = NULL; + if (pflags != NULL) + *pflags = 0; IF_AFDATA_UNLOCK_ASSERT(ifp); if (m != NULL && m->m_flags & M_MCAST) { int i; @@ -2334,7 +2335,8 @@ nd6_storelladdr(struct ifnet *ifp, struc } bcopy(&ln->ll_addr, desten, ifp->if_addrlen); - *lle = ln; + if (pflags != NULL) + *pflags = ln->la_flags; LLE_RUNLOCK(ln); /* * A *small* use after free race exists here Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/netinet6/nd6.h Thu Nov 27 23:06:25 2014 (r275196) @@ -418,7 +418,7 @@ int nd6_need_cache(struct ifnet *); int nd6_add_ifa_lle(struct in6_ifaddr *); void nd6_rem_ifa_lle(struct in6_ifaddr *); int nd6_storelladdr(struct ifnet *, struct mbuf *, - const struct sockaddr *, u_char *, struct llentry **); + const struct sockaddr *, u_char *, uint32_t *); /* nd6_nbr.c */ void nd6_na_input(struct mbuf *, int, int); Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Nov 27 23:06:25 2014 (r275196) @@ -347,14 +347,12 @@ static int addr_resolve(struct sockaddr struct sockaddr_in6 *sin6; struct ifaddr *ifa; struct ifnet *ifp; -#if defined(INET) || defined(INET6) - struct llentry *lle; -#endif struct rtentry *rte; in_port_t port; u_char edst[MAX_ADDR_LEN]; int multi; int bcast; + int is_gw = 0; int error = 0; /* @@ -430,6 +428,8 @@ static int addr_resolve(struct sockaddr RTFREE_LOCKED(rte); return -EHOSTUNREACH; } + if (rte->rt_flags & RTF_GATEWAY) + is_gw = 1; /* * If it's not multicast or broadcast and the route doesn't match the * requested interface return unreachable. Otherwise fetch the @@ -467,12 +467,12 @@ mcast: switch (dst_in->sa_family) { #ifdef INET case AF_INET: - error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle); + error = arpresolve(ifp, is_gw, NULL, dst_in, edst, NULL); break; #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst, &lle); + error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst,NULL); break; #endif default: Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Nov 27 21:29:19 2014 (r275195) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Nov 27 23:06:25 2014 (r275196) @@ -1259,13 +1259,15 @@ ipoib_output(struct ifnet *ifp, struct m struct llentry *lle = NULL; struct rtentry *rt0 = NULL; struct ipoib_header *eh; - int error = 0; + int error = 0, is_gw = 0; short type; if (ro != NULL) { if (!(m->m_flags & (M_BCAST | M_MCAST))) lle = ro->ro_lle; rt0 = ro->ro_rt; + if (rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; } #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); @@ -1292,7 +1294,7 @@ ipoib_output(struct ifnet *ifp, struct m else if (m->m_flags & M_MCAST) ip_ib_mc_map(((struct sockaddr_in *)dst)->sin_addr.s_addr, ifp->if_broadcastaddr, edst); else - error = arpresolve(ifp, rt0, m, dst, edst, &lle); + error = arpresolve(ifp, is_gw, m, dst, edst, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IP); @@ -1330,7 +1332,7 @@ ipoib_output(struct ifnet *ifp, struct m else if (m->m_flags & M_MCAST) ipv6_ib_mc_map(&((struct sockaddr_in6 *)dst)->sin6_addr, ifp->if_broadcastaddr, edst); else - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle); + error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); if (error) return error; type = htons(ETHERTYPE_IPV6); From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 23:10:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35D2C1D2; Thu, 27 Nov 2014 23:10:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21D69B2D; Thu, 27 Nov 2014 23:10:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sARNA4mW011809; Thu, 27 Nov 2014 23:10:04 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sARNA3JA011808; Thu, 27 Nov 2014 23:10:03 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411272310.sARNA3JA011808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 27 Nov 2014 23:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275197 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 23:10:04 -0000 Author: melifaro Date: Thu Nov 27 23:10:03 2014 New Revision: 275197 URL: https://svnweb.freebsd.org/changeset/base/275197 Log: Fix build broken by r275195. Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Nov 27 23:06:25 2014 (r275196) +++ head/sys/net/if_ethersubr.c Thu Nov 27 23:10:03 2014 (r275197) @@ -234,12 +234,14 @@ ether_output(struct ifnet *ifp, struct m #endif case pseudo_AF_HDRCMPLT: { + const struct ether_header *eh; + hdrcmplt = 1; /* FALLTHROUGH */ case AF_UNSPEC: loop_copy = 0; /* if this is for us, don't do it */ - eh = (struct ether_header *)dst->sa_data; + eh = (const struct ether_header *)dst->sa_data; (void)memcpy(edst, eh->ether_dhost, sizeof (edst)); type = eh->ether_type; break; From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 04:07:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25138F56; Fri, 28 Nov 2014 04:07:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1246FA5D; Fri, 28 Nov 2014 04:07:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAS4760U049531; Fri, 28 Nov 2014 04:07:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAS476kN049529; Fri, 28 Nov 2014 04:07:06 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201411280407.sAS476kN049529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 28 Nov 2014 04:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275199 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 04:07:07 -0000 Author: cy Date: Fri Nov 28 04:07:06 2014 New Revision: 275199 URL: https://svnweb.freebsd.org/changeset/base/275199 Log: Correctly define constants. MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_frag.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Thu Nov 27 23:42:32 2014 (r275198) +++ head/sys/contrib/ipfilter/netinet/fil.c Fri Nov 28 04:07:06 2014 (r275199) @@ -252,7 +252,7 @@ static const struct optlist ipopts[20] = }; #ifdef USE_INET6 -static struct optlist ip6exthdr[] = { +static const struct optlist ip6exthdr[] = { { IPPROTO_HOPOPTS, 0x000001 }, { IPPROTO_IPV6, 0x000002 }, { IPPROTO_ROUTING, 0x000004 }, Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_frag.c Thu Nov 27 23:42:32 2014 (r275198) +++ head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Nov 28 04:07:06 2014 (r275199) @@ -112,7 +112,7 @@ static void ipf_frag_free __P((ipf_frag_ static frentry_t ipfr_block; -ipftuneable_t ipf_tuneables[] = { +const ipftuneable_t ipf_tuneables[] = { { { (void *)offsetof(ipf_frag_softc_t, ipfr_size) }, "frag_size", 1, 0x7fffffff, stsizeof(ipf_frag_softc_t, ipfr_size), From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 09:32:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0B92CF; Fri, 28 Nov 2014 09:32:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD6E2B73; Fri, 28 Nov 2014 09:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAS9W7tb003752; Fri, 28 Nov 2014 09:32:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAS9W7gF003751; Fri, 28 Nov 2014 09:32:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411280932.sAS9W7gF003751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 28 Nov 2014 09:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275205 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 09:32:08 -0000 Author: hselasky Date: Fri Nov 28 09:32:07 2014 New Revision: 275205 URL: https://svnweb.freebsd.org/changeset/base/275205 Log: Style changes: - Move two IOCTL related defines to the top of the C-file - Add more comments describing the recently added IOCTL small size and small align macros Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Fri Nov 28 09:23:15 2014 (r275204) +++ head/sys/kern/sys_generic.c Fri Nov 28 09:32:07 2014 (r275205) @@ -75,6 +75,20 @@ __FBSDID("$FreeBSD$"); #include +/* + * The following macro defines how many bytes will be allocated from + * the stack instead of memory allocated when passing the IOCTL data + * structures from userspace and to the kernel. Some IOCTLs having + * small data structures are used very frequently and this small + * buffer on the stack gives a significant speedup improvement for + * those requests. The value of this define should be greater or equal + * to 64 bytes and should also be power of two. The data structure is + * currently hard-aligned to a 8-byte boundary on the stack. This + * should currently be sufficient for all supported platforms. + */ +#define SYS_IOCTL_SMALL_SIZE 128 /* bytes */ +#define SYS_IOCTL_SMALL_ALIGN 8 /* bytes */ + int iosize_max_clamp = 0; SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW, &iosize_max_clamp, 0, "Clamp max i/o size to INT_MAX"); @@ -646,10 +660,7 @@ struct ioctl_args { int sys_ioctl(struct thread *td, struct ioctl_args *uap) { -#ifndef SYS_IOCTL_SMALL_SIZE -#define SYS_IOCTL_SMALL_SIZE 128 -#endif - u_char smalldata[SYS_IOCTL_SMALL_SIZE] __aligned(8); + u_char smalldata[SYS_IOCTL_SMALL_SIZE] __aligned(SYS_IOCTL_SMALL_ALIGN); u_long com; int arg, error; u_int size; From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 10:20:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 566EFBD5; Fri, 28 Nov 2014 10:20:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43550F53; Fri, 28 Nov 2014 10:20:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sASAK1dJ023515; Fri, 28 Nov 2014 10:20:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sASAK1fd023514; Fri, 28 Nov 2014 10:20:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411281020.sASAK1fd023514@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 28 Nov 2014 10:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275206 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 10:20:01 -0000 Author: kib Date: Fri Nov 28 10:20:00 2014 New Revision: 275206 URL: https://svnweb.freebsd.org/changeset/base/275206 Log: Assert the state of the process lock and sigact mutex in kern_sigprocmask() and reschedule_signals(). Discussed with: rea Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Nov 28 09:32:07 2014 (r275205) +++ head/sys/kern/kern_sig.c Fri Nov 28 10:20:00 2014 (r275206) @@ -998,8 +998,12 @@ kern_sigprocmask(struct thread *td, int int error; p = td->td_proc; - if (!(flags & SIGPROCMASK_PROC_LOCKED)) + if ((flags & SIGPROCMASK_PROC_LOCKED) != 0) + PROC_LOCK_ASSERT(p, MA_OWNED); + else PROC_LOCK(p); + mtx_assert(&p->p_sigacts->ps_mtx, (flags & SIGPROCMASK_PS_LOCKED) != 0 + ? MA_OWNED : MA_NOTOWNED); if (oset != NULL) *oset = td->td_sigmask; @@ -2510,9 +2514,11 @@ reschedule_signals(struct proc *p, sigse int sig; PROC_LOCK_ASSERT(p, MA_OWNED); + ps = p->p_sigacts; + mtx_assert(&ps->ps_mtx, (flags & SIGPROCMASK_PS_LOCKED) != 0 ? + MA_OWNED : MA_NOTOWNED); if (SIGISEMPTY(p->p_siglist)) return; - ps = p->p_sigacts; SIGSETAND(block, p->p_siglist); while ((sig = sig_ffs(&block)) != 0) { SIGDELSET(block, sig); From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 11:45:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8097E9; Fri, 28 Nov 2014 11:45:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C47BDBF2; Fri, 28 Nov 2014 11:45:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sASBjrrF067333; Fri, 28 Nov 2014 11:45:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sASBjrA1067332; Fri, 28 Nov 2014 11:45:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201411281145.sASBjrA1067332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 28 Nov 2014 11:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275207 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 11:45:54 -0000 Author: andrew Date: Fri Nov 28 11:45:53 2014 New Revision: 275207 URL: https://svnweb.freebsd.org/changeset/base/275207 Log: We don't use the hypervisor interrupt, make it optional in the device tree. Submitted by: Julien Grall MFC after: 1 week Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Fri Nov 28 10:20:00 2014 (r275206) +++ head/sys/arm/arm/generic_timer.c Fri Nov 28 11:45:53 2014 (r275207) @@ -87,7 +87,7 @@ static struct resource_spec timer_spec[] { SYS_RES_IRQ, 0, RF_ACTIVE }, /* Secure */ { SYS_RES_IRQ, 1, RF_ACTIVE }, /* Non-secure */ { SYS_RES_IRQ, 2, RF_ACTIVE }, /* Virt */ - { SYS_RES_IRQ, 3, RF_ACTIVE }, /* Hyp */ + { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, /* Hyp */ { -1, 0 } }; From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 11:49:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70AB8260; Fri, 28 Nov 2014 11:49:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D431C12; Fri, 28 Nov 2014 11:49:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sASBnRAK067802; Fri, 28 Nov 2014 11:49:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sASBnREL067801; Fri, 28 Nov 2014 11:49:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201411281149.sASBnREL067801@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 28 Nov 2014 11:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275208 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 11:49:27 -0000 Author: andrew Date: Fri Nov 28 11:49:26 2014 New Revision: 275208 URL: https://svnweb.freebsd.org/changeset/base/275208 Log: Some device tree configurations place the generic timer under the root of the tree and not under simplebus. Update the driver to handle this. Submitted by: Julien Grall MFC after: 1 week Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Fri Nov 28 11:45:53 2014 (r275207) +++ head/sys/arm/arm/generic_timer.c Fri Nov 28 11:49:26 2014 (r275208) @@ -353,6 +353,8 @@ static devclass_t arm_tmr_devclass; EARLY_DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(timer, ofwbus, arm_tmr_driver, arm_tmr_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); void DELAY(int usec) From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 12:15:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C9BCC8E; Fri, 28 Nov 2014 12:15:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59252EDA; Fri, 28 Nov 2014 12:15:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sASCF0QQ081895; Fri, 28 Nov 2014 12:15:00 GMT (envelope-from rea@FreeBSD.org) Received: (from rea@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sASCF08A081894; Fri, 28 Nov 2014 12:15:00 GMT (envelope-from rea@FreeBSD.org) Message-Id: <201411281215.sASCF08A081894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rea set sender to rea@FreeBSD.org using -f From: Eygene Ryabinkin Date: Fri, 28 Nov 2014 12:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275209 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 12:15:00 -0000 Author: rea (ports committer) Date: Fri Nov 28 12:14:59 2014 New Revision: 275209 URL: https://svnweb.freebsd.org/changeset/base/275209 Log: DRM2: fix off-by-one overflow in ioctl processing Call to the driver-specific ioctl used to process ioctl number that will lead to the out-of-bounds access to the ioctl handler array. PR: 193367 Approved by: kib MFC after: 1 week Modified: head/sys/dev/drm2/drm_drv.c Modified: head/sys/dev/drm2/drm_drv.c ============================================================================== --- head/sys/dev/drm2/drm_drv.c Fri Nov 28 11:49:26 2014 (r275208) +++ head/sys/dev/drm2/drm_drv.c Fri Nov 28 12:14:59 2014 (r275209) @@ -905,7 +905,7 @@ int drm_ioctl(struct cdev *kdev, u_long if (ioctl->func == NULL && nr >= DRM_COMMAND_BASE) { /* The array entries begin at DRM_COMMAND_BASE ioctl nr */ nr -= DRM_COMMAND_BASE; - if (nr > dev->driver->max_ioctl) { + if (nr >= dev->driver->max_ioctl) { DRM_DEBUG("Bad driver ioctl number, 0x%x (of 0x%x)\n", nr, dev->driver->max_ioctl); return EINVAL; From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 14:51:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10589526; Fri, 28 Nov 2014 14:51:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1E78357; Fri, 28 Nov 2014 14:51:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sASEpo2A053936; Fri, 28 Nov 2014 14:51:50 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sASEpomG053933; Fri, 28 Nov 2014 14:51:50 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201411281451.sASEpomG053933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 28 Nov 2014 14:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275211 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 14:51:51 -0000 Author: bz Date: Fri Nov 28 14:51:49 2014 New Revision: 275211 URL: https://svnweb.freebsd.org/changeset/base/275211 Log: After r275196 unbreak NOIP and NOINET kernels by hiding an otherwise unused varibale under the proper #ifdef. Modified: head/sys/net/if_arcsubr.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Fri Nov 28 13:25:57 2014 (r275210) +++ head/sys/net/if_arcsubr.c Fri Nov 28 14:51:49 2014 (r275211) @@ -103,7 +103,9 @@ arc_output(struct ifnet *ifp, struct mbu u_int8_t atype, adst; int loop_copy = 0; int isphds; +#ifdef INET int is_gw; +#endif if (!((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING))) Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Fri Nov 28 13:25:57 2014 (r275210) +++ head/sys/net/if_fddisubr.c Fri Nov 28 14:51:49 2014 (r275211) @@ -101,7 +101,9 @@ fddi_output(struct ifnet *ifp, struct mb int loop_copy = 0, error = 0, hdrcmplt = 0; u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN]; struct fddi_header *fh; +#ifdef INET int is_gw; +#endif #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); Modified: head/sys/net/if_fwsubr.c ============================================================================== --- head/sys/net/if_fwsubr.c Fri Nov 28 13:25:57 2014 (r275210) +++ head/sys/net/if_fwsubr.c Fri Nov 28 14:51:49 2014 (r275211) @@ -89,7 +89,9 @@ firewire_output(struct ifnet *ifp, struc struct mbuf *mtail; int unicast, dgl, foff; static int next_dgl; +#ifdef INET int is_gw; +#endif #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); From owner-svn-src-head@FreeBSD.ORG Fri Nov 28 22:03:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAB1AAA6; Fri, 28 Nov 2014 22:03:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6566A02; Fri, 28 Nov 2014 22:03:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sASM3aQI055283; Fri, 28 Nov 2014 22:03:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sASM3agx055281; Fri, 28 Nov 2014 22:03:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411282203.sASM3agx055281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 28 Nov 2014 22:03:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275218 - in head/usr.sbin: cron fifolog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 22:03:37 -0000 Author: bapt Date: Fri Nov 28 22:03:35 2014 New Revision: 275218 URL: https://svnweb.freebsd.org/changeset/base/275218 Log: Readd Makefile.inc that were used to include upper level Makefile.inc and set (among other things) the destination where the binary should be installed Added: head/usr.sbin/cron/Makefile.inc (contents, props changed) head/usr.sbin/fifolog/Makefile.inc (contents, props changed) Added: head/usr.sbin/cron/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/cron/Makefile.inc Fri Nov 28 22:03:35 2014 (r275218) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/usr.sbin/fifolog/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/fifolog/Makefile.inc Fri Nov 28 22:03:35 2014 (r275218) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 00:45:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8738BAB4; Sat, 29 Nov 2014 00:45:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FE4DADB; Sat, 29 Nov 2014 00:45:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAT0jDBm031818; Sat, 29 Nov 2014 00:45:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAT0jAwd031798; Sat, 29 Nov 2014 00:45:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411290045.sAT0jAwd031798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 29 Nov 2014 00:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275223 - in head: contrib/libucl contrib/libucl/cmake contrib/libucl/doc contrib/libucl/include contrib/libucl/lua contrib/libucl/m4 contrib/libucl/src contrib/libucl/tests contrib/lib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 00:45:13 -0000 Author: bapt Date: Sat Nov 29 00:45:09 2014 New Revision: 275223 URL: https://svnweb.freebsd.org/changeset/base/275223 Log: Update libucl to latest version While here correctly link libucl to libm and register the dependency on libm for static building Added: head/contrib/libucl/COPYING - copied unchanged from r275222, vendor/libucl/dist/COPYING head/contrib/libucl/doc/lua_api.md - copied unchanged from r275222, vendor/libucl/dist/doc/lua_api.md head/contrib/libucl/include/lua_ucl.h - copied unchanged from r275222, vendor/libucl/dist/include/lua_ucl.h head/contrib/libucl/lua/ - copied from r275222, vendor/libucl/dist/lua/ head/contrib/libucl/m4/ - copied from r275222, vendor/libucl/dist/m4/ head/contrib/libucl/tests/basic/12.in - copied unchanged from r275222, vendor/libucl/dist/tests/basic/12.in head/contrib/libucl/tests/basic/12.res - copied unchanged from r275222, vendor/libucl/dist/tests/basic/12.res head/contrib/libucl/tests/basic/13.in - copied unchanged from r275222, vendor/libucl/dist/tests/basic/13.in head/contrib/libucl/tests/basic/13.res - copied unchanged from r275222, vendor/libucl/dist/tests/basic/13.res head/contrib/libucl/tests/basic/comments.in - copied unchanged from r275222, vendor/libucl/dist/tests/basic/comments.in head/contrib/libucl/tests/basic/comments.res - copied unchanged from r275222, vendor/libucl/dist/tests/basic/comments.res head/contrib/libucl/tests/basic/include_dir/ - copied from r275222, vendor/libucl/dist/tests/basic/include_dir/ Modified: head/contrib/libucl/ChangeLog.md head/contrib/libucl/Makefile.am head/contrib/libucl/Makefile.w32 head/contrib/libucl/README.md head/contrib/libucl/cmake/CMakeLists.txt head/contrib/libucl/configure.ac head/contrib/libucl/include/ucl.h head/contrib/libucl/libucl.pc.in head/contrib/libucl/src/ucl_emitter.c head/contrib/libucl/src/ucl_emitter_streamline.c head/contrib/libucl/src/ucl_emitter_utils.c head/contrib/libucl/src/ucl_hash.c head/contrib/libucl/src/ucl_hash.h head/contrib/libucl/src/ucl_internal.h head/contrib/libucl/src/ucl_parser.c head/contrib/libucl/src/ucl_util.c head/contrib/libucl/tests/Makefile.am head/contrib/libucl/tests/basic/4.res head/contrib/libucl/tests/generate.res head/contrib/libucl/tests/test_basic.c head/contrib/libucl/tests/test_generate.c head/contrib/libucl/tests/test_schema.c head/contrib/libucl/utils/objdump.c head/lib/libucl/Makefile head/share/mk/src.libnames.mk Directory Properties: head/contrib/libucl/ (props changed) Copied: head/contrib/libucl/COPYING (from r275222, vendor/libucl/dist/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libucl/COPYING Sat Nov 29 00:45:09 2014 (r275223, copy of r275222, vendor/libucl/dist/COPYING) @@ -0,0 +1,23 @@ +Copyright (c) 2013-2014, Vsevolod Stakhov +All rights reserved. + +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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. Modified: head/contrib/libucl/ChangeLog.md ============================================================================== --- head/contrib/libucl/ChangeLog.md Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/ChangeLog.md Sat Nov 29 00:45:09 2014 (r275223) @@ -4,3 +4,19 @@ - Streamline emitter has been added, so it is now possible to output partial `ucl` objects - Emitter now is more flexible due to emitter_context structure + +### 0.5.1 +- Fixed number of bugs and memory leaks + +### 0.5.2 + +- Allow userdata objects to be emitted and destructed +- Use userdata objects to store lua function references + +### Libucl 0.6 + +- Reworked macro interface + +### Libucl 0.6.1 + +- Various utilities fixes Modified: head/contrib/libucl/Makefile.am ============================================================================== --- head/contrib/libucl/Makefile.am Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/Makefile.am Sat Nov 29 00:45:09 2014 (r275223) @@ -4,4 +4,8 @@ EXTRA_DIST = uthash README.md pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libucl.pc -SUBDIRS = src tests utils doc +if LUA_SUB + LUA_SUBDIR = lua +endif + +SUBDIRS = src tests utils doc $(LUA_SUBDIR) \ No newline at end of file Modified: head/contrib/libucl/Makefile.w32 ============================================================================== --- head/contrib/libucl/Makefile.w32 Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/Makefile.w32 Sat Nov 29 00:45:09 2014 (r275223) @@ -33,6 +33,7 @@ OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ + $(OBJDIR)/ucl_emitter_utils.o \ $(OBJDIR)/ucl_schema.o \ $(OBJDIR)/xxhash.o @@ -51,6 +52,8 @@ $(OBJDIR)/ucl_parser.o: $(SRCDIR)/ucl_pa $(CC) -o $(OBJDIR)/ucl_parser.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_parser.c $(OBJDIR)/ucl_emitter.o: $(SRCDIR)/ucl_emitter.c $(HDEPS) $(CC) -o $(OBJDIR)/ucl_emitter.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_emitter.c +$(OBJDIR)/ucl_emitter_utils.o: $(SRCDIR)/ucl_emitter_utils.c $(HDEPS) + $(CC) -o $(OBJDIR)/ucl_emitter_utils.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_emitter_utils.c $(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash.c $(HDEPS) $(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c $(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS) @@ -61,7 +64,7 @@ $(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $ clean: $(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME) $(OBJDIR)/$(SONAME) $(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump $(OBJDIR)/test_generate $(RMDIR) $(OBJDIR) - + # Utils chargen: utils/chargen.c $(OBJDIR)/$(SONAME) @@ -75,7 +78,7 @@ test: $(OBJDIR) $(OBJDIR)/$(SONAME) $(OB run-test: test TEST_DIR=$(TESTDIR) $(TESTDIR)/run_tests.sh $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/test_generate - + $(OBJDIR)/test_basic: $(TESTDIR)/test_basic.c $(OBJDIR)/$(SONAME) $(CC) -o $(OBJDIR)/test_basic $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) $(LDFLAGS) $(TESTDIR)/test_basic.c $(LD_UCL_FLAGS) $(OBJDIR)/test_speed: $(TESTDIR)/test_speed.c $(OBJDIR)/$(SONAME) Modified: head/contrib/libucl/README.md ============================================================================== --- head/contrib/libucl/README.md Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/README.md Sat Nov 29 00:45:09 2014 (r275223) @@ -223,15 +223,57 @@ UCL supports external macros both multil .... }; ``` -There are two internal macros provided by UCL: -* `include` - read a file `/path/to/file` or an url `http://example.com/file` and include it to the current place of -UCL configuration; -* `try\_include` - try to read a file or url and include it but do not create a fatal error if a file or url is not accessible; -* `includes` - read a file or an url like the previous macro, but fetch and check the signature file (which is obtained -by `.sig` suffix appending). - -Public keys which are used for the last command are specified by the concrete UCL user. +Moreover, each macro can accept an optional list of arguments in braces. These +arguments themselves are the UCL object that is parsed and passed to a macro as +options: + +```nginx +.macro(param=value) "something"; +.macro(param={key=value}) "something"; +.macro(.include "params.conf") "something"; +.macro(#this is multiline macro +param = [value1, value2]) "something"; +.macro(key="()") "something"; +``` + +UCL also provide a convenient `include` macro to load content from another files +to the current UCL object. This macro accepts either path to file: + +```nginx +.include "/full/path.conf" +.include "./relative/path.conf" +.include "${CURDIR}/path.conf" +``` + +or URL (if ucl is built with url support provided by either `libcurl` or `libfetch`): + + .include "http://example.com/file.conf" + +`.include` macro supports a set of options: + +* `try` (default: **false**) - if this option is `true` than UCL treats errors on loading of +this file as non-fatal. For example, such a file can be absent but it won't stop the parsing +of the top-level document. +* `sign` (default: **false**) - if this option is `true` UCL loads and checks the signature for +a file from path named `.sig`. Trusted public keys should be provided for UCL API after +parser is created but before any configurations are parsed. +* `glob` (default: **false**) - if this option is `true` UCL treats the filename as GLOB pattern and load +all files that matches the specified pattern (normally the format of patterns is defined in `glob` manual page +for your operating system). This option is meaningless for URL includes. +* `url` (default: **true**) - allow URL includes. +* `priority` (default: 0) - specify priority for the include (see below). + +Priorities are used by UCL parser to manage the policy of objects rewriting during including other files +as following: + +* If we have two objects with the same priority then we form an implicit array +* If a new object has bigger priority then we overwrite an old one +* If a new object has lower priority then we ignore it + +By default, the priority of top-level object is set to zero (lowest priority). Currently, +you can define up to 16 priorities (from 0 to 15). Includes with bigger priorities will +rewrite keys from the objects with lower priorities as specified by the policy. ### Variables support @@ -317,7 +359,7 @@ ucl: emitted compact json in 0.0991 seco ucl: emitted yaml in 0.1354 seconds ``` -You can do your own benchmarks by running `make test` in libucl top directory. +You can do your own benchmarks by running `make check` in libucl top directory. ## Conclusion Modified: head/contrib/libucl/cmake/CMakeLists.txt ============================================================================== --- head/contrib/libucl/cmake/CMakeLists.txt Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/cmake/CMakeLists.txt Sat Nov 29 00:45:09 2014 (r275223) @@ -1,8 +1,8 @@ PROJECT(libucl C) SET(LIBUCL_VERSION_MAJOR 0) -SET(LIBUCL_VERSION_MINOR 2) -SET(LIBUCL_VERSION_PATCH 9) +SET(LIBUCL_VERSION_MINOR 5) +SET(LIBUCL_VERSION_PATCH 0) SET(LIBUCL_VERSION "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") @@ -86,6 +86,8 @@ INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOU SET(UCLSRC ../src/ucl_util.c ../src/ucl_parser.c ../src/ucl_emitter.c + ../src/ucl_emitter_streamline.c + ../src/ucl_emitter_utils.c ../src/ucl_hash.c ../src/ucl_schema.c ../src/xxhash.c) @@ -98,6 +100,18 @@ ENDIF (BUILD_SHARED_LIBS) ADD_LIBRARY(ucl ${LIB_TYPE} ${UCLSRC}) SET_TARGET_PROPERTIES(ucl PROPERTIES VERSION ${LIBUCL_VERSION} SOVERSION ${LIBUCL_VERSION_MAJOR}) +IF(WITH_LUA) + SET(UCL_LUA_SRC ../lua/lua_ucl.c) + ADD_LIBRARY(lua-ucl ${LIB_TYPE} ${UCL_LUA_SRC}) + IF(ENABLE_LUAJIT MATCHES "ON") + TARGET_LINK_LIBRARIES(lua-ucl "${LUAJIT_LIBRARY}") + ELSE(ENABLE_LUAJIT MATCHES "ON") + TARGET_LINK_LIBRARIES(lua-ucl "${LUA_LIBRARY}") + ENDIF(ENABLE_LUAJIT MATCHES "ON") + TARGET_LINK_LIBRARIES(lua-ucl ucl) + SET_TARGET_PROPERTIES(lua-ucl PROPERTIES VERSION ${LIBUCL_VERSION} SOVERSION ${LIBUCL_VERSION_MAJOR}) +ENDIF(WITH_LUA) + IF(HAVE_FETCH_H) TARGET_LINK_LIBRARIES(ucl fetch) ELSE(HAVE_FETCH_H) Modified: head/contrib/libucl/configure.ac ============================================================================== --- head/contrib/libucl/configure.ac Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/configure.ac Sat Nov 29 00:45:09 2014 (r275223) @@ -1,12 +1,13 @@ m4_define([maj_ver], [0]) -m4_define([med_ver], [5]) -m4_define([min_ver], [0]) -m4_define([so_version], [2:0:0]) +m4_define([med_ver], [6]) +m4_define([min_ver], [1]) +m4_define([so_version], [3:0:1]) m4_define([ucl_version], [maj_ver.med_ver.min_ver]) AC_INIT([libucl],[ucl_version],[https://github.com/vstakhov/libucl],[libucl]) AC_CONFIG_SRCDIR([configure.ac]) -AM_INIT_AUTOMAKE([1.11 foreign silent-rules -Wall -Wportability no-dist-gzip dist-xz]) +AM_INIT_AUTOMAKE([1.11 foreign -Wall -Wportability no-dist-gzip dist-xz]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) UCL_VERSION=ucl_version SO_VERSION=so_version @@ -57,6 +58,9 @@ AC_ARG_ENABLE([regex], AS_HELP_STRING([- AC_ARG_ENABLE([signatures], AS_HELP_STRING([--enable-signatures], [Enable signatures check (requires openssl) @<:@default=no@:>@]), [], [enable_signatures=no]) +AC_ARG_ENABLE([lua], AS_HELP_STRING([--enable-lua], + [Enable lua API build (requires lua libraries and headers) @<:@default=no@:>@]), [], + [enable_lua=no]) AC_ARG_ENABLE([utils], AS_HELP_STRING([--enable-utils], [Build and install utils @<:@default=no@:>@]), [case "${enableval}" in @@ -99,6 +103,21 @@ AS_IF([test "x$enable_regex" = "xyes"], ]) AC_SUBST(LIBREGEX_LIB) +AS_IF([test "x$enable_lua" = "xyes"], [ + AX_PROG_LUA([5.1], [], [ + AX_LUA_HEADERS([ + AX_LUA_LIBS([ + AC_DEFINE(HAVE_LUA, 1, [Define to 1 for lua support.]) + with_lua="yes" + ], [AC_MSG_ERROR([unable to find the lua libraries]) + ]) + ], [AC_MSG_ERROR([unable to find the lua header files]) + ]) + ], [AC_MSG_ERROR([unable to find the lua interpreter])]) +], [with_lua="no"]) + +AM_CONDITIONAL([LUA_SUB], [test "$with_lua" = "yes"]) + AS_IF([test "x$enable_urls" = "xyes"], [ AC_CHECK_HEADER([fetch.h], [ AC_DEFINE(HAVE_FETCH_H, 1, [Define to 1 if you have the header file.]) @@ -155,9 +174,11 @@ AC_LINK_IFELSE([ AC_CONFIG_FILES(Makefile \ src/Makefile \ + lua/Makefile tests/Makefile \ utils/Makefile \ doc/Makefile \ + lua/libucl.rockspec \ libucl.pc) AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) AC_OUTPUT Copied: head/contrib/libucl/doc/lua_api.md (from r275222, vendor/libucl/dist/doc/lua_api.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libucl/doc/lua_api.md Sat Nov 29 00:45:09 2014 (r275223, copy of r275222, vendor/libucl/dist/doc/lua_api.md) @@ -0,0 +1,194 @@ +## Module `ucl` + +This lua module allows to parse objects from strings and to store data into +ucl objects. It uses `libucl` C library to parse and manipulate with ucl objects. + +Example: + +~~~lua +local ucl = require("ucl") + +local parser = ucl.parser() +local res,err = parser:parse_string('{key=value}') + +if not res then + print('parser error: ' .. err) +else + local obj = parser:get_object() + local got = ucl.to_format(obj, 'json') +endif + +local table = { + str = 'value', + num = 100500, + null = ucl.null, + func = function () + return 'huh' + end + + +print(ucl.to_format(table, 'ucl')) +-- Output: +--[[ +num = 100500; +str = "value"; +null = null; +func = "huh"; +--]] +~~~ + +###Brief content: + +**Functions**: + +> [`ucl_object_push_lua(L, obj, allow_array)`](#function-ucl_object_push_lual-obj-allow_array) + +> [`ucl.to_format(var, format)`](#function-uclto_formatvar-format) + + + +**Methods**: + +> [`parser:parse_file(name)`](#method-parserparse_filename) + +> [`parser:parse_string(input)`](#method-parserparse_stringinput) + +> [`parser:get_object()`](#method-parserget_object) + + +## Functions + +The module `ucl` defines the following functions. + +### Function `ucl_object_push_lua(L, obj, allow_array)` + +This is a `C` function to push `UCL` object as lua variable. This function +converts `obj` to lua representation using the following conversions: + +- *scalar* values are directly presented by lua objects +- *userdata* values are converted to lua function objects using `LUA_REGISTRYINDEX`, +this can be used to pass functions from lua to c and vice-versa +- *arrays* are converted to lua tables with numeric indicies suitable for `ipairs` iterations +- *objects* are converted to lua tables with string indicies + +**Parameters:** + +- `L {lua_State}`: lua state pointer +- `obj {ucl_object_t}`: object to push +- `allow_array {bool}`: expand implicit arrays (should be true for all but partial arrays) + +**Returns:** + +- `{int}`: `1` if an object is pushed to lua + +Back to [module description](#module-ucl). + +### Function `ucl.to_format(var, format)` + +Converts lua variable `var` to the specified `format`. Formats supported are: + +- `json` - fine printed json +- `json-compact` - compacted json +- `config` - fine printed configuration +- `ucl` - same as `config` +- `yaml` - embedded yaml + +If `var` contains function, they are called during output formatting and if +they return string value, then this value is used for ouptut. + +**Parameters:** + +- `var {variant}`: any sort of lua variable (if userdata then metafield `__to_ucl` is searched for output) +- `format {string}`: any available format + +**Returns:** + +- `{string}`: string representation of `var` in the specific `format`. + +Example: + +~~~lua +local table = { + str = 'value', + num = 100500, + null = ucl.null, + func = function () + return 'huh' + end + + +print(ucl.to_format(table, 'ucl')) +-- Output: +--[[ +num = 100500; +str = "value"; +null = null; +func = "huh"; +--]] +~~~ + +Back to [module description](#module-ucl). + + +## Methods + +The module `ucl` defines the following methods. + +### Method `parser:parse_file(name)` + +Parse UCL object from file. + +**Parameters:** + +- `name {string}`: filename to parse + +**Returns:** + +- `{bool[, string]}`: if res is `true` then file has been parsed successfully, otherwise an error string is also returned + +Example: + +~~~lua +local parser = ucl.parser() +local res,err = parser:parse_file('/some/file.conf') + +if not res then + print('parser error: ' .. err) +else + -- Do something with object +end +~~~ + +Back to [module description](#module-ucl). + +### Method `parser:parse_string(input)` + +Parse UCL object from file. + +**Parameters:** + +- `input {string}`: string to parse + +**Returns:** + +- `{bool[, string]}`: if res is `true` then file has been parsed successfully, otherwise an error string is also returned + +Back to [module description](#module-ucl). + +### Method `parser:get_object()` + +Get top object from parser and export it to lua representation. + +**Parameters:** + + nothing + +**Returns:** + +- `{variant or nil}`: ucl object as lua native variable + +Back to [module description](#module-ucl). + + +Back to [top](#). + Copied: head/contrib/libucl/include/lua_ucl.h (from r275222, vendor/libucl/dist/include/lua_ucl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libucl/include/lua_ucl.h Sat Nov 29 00:45:09 2014 (r275223, copy of r275222, vendor/libucl/dist/include/lua_ucl.h) @@ -0,0 +1,69 @@ +/* Copyright (c) 2014, Vsevolod Stakhov + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED ''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 AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef LUA_UCL_H_ +#define LUA_UCL_H_ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include "ucl.h" + +/** + * Closure structure for lua function storing inside UCL + */ +struct ucl_lua_funcdata { + lua_State *L; + int idx; + char *ret; +}; + +/** + * Initialize lua UCL API + */ +UCL_EXTERN int luaopen_ucl (lua_State *L); + +/** + * Import UCL object from lua state + * @param L lua state + * @param idx index of object at the lua stack to convert to UCL + * @return new UCL object or NULL, the caller should unref object after using + */ +UCL_EXTERN ucl_object_t* ucl_object_lua_import (lua_State *L, int idx); + +/** + * Push an object to lua + * @param L lua state + * @param obj object to push + * @param allow_array traverse over implicit arrays + */ +UCL_EXTERN int ucl_object_push_lua (lua_State *L, + const ucl_object_t *obj, bool allow_array); + +UCL_EXTERN struct ucl_lua_funcdata* ucl_object_toclosure ( + const ucl_object_t *obj); + +#endif /* LUA_UCL_H_ */ Modified: head/contrib/libucl/include/ucl.h ============================================================================== --- head/contrib/libucl/include/ucl.h Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/include/ucl.h Sat Nov 29 00:45:09 2014 (r275223) @@ -147,7 +147,8 @@ typedef enum ucl_emitter { typedef enum ucl_parser_flags { UCL_PARSER_KEY_LOWERCASE = 0x1, /**< Convert all keys to lower case */ UCL_PARSER_ZEROCOPY = 0x2, /**< Parse input in zero-copy mode if possible */ - UCL_PARSER_NO_TIME = 0x4 /**< Do not parse time and treat time values as strings */ + UCL_PARSER_NO_TIME = 0x4, /**< Do not parse time and treat time values as strings */ + UCL_PARSER_NO_IMPLICIT_ARRAYS = 0x8 /** Create explicit arrays instead of implicit ones */ } ucl_parser_flags_t; /** @@ -171,9 +172,12 @@ typedef enum ucl_string_flags { * Basic flags for an object */ typedef enum ucl_object_flags { - UCL_OBJECT_ALLOCATED_KEY = 1, /**< An object has key allocated internally */ - UCL_OBJECT_ALLOCATED_VALUE = 2, /**< An object has a string value allocated internally */ - UCL_OBJECT_NEED_KEY_ESCAPE = 4 /**< The key of an object need to be escaped on output */ + UCL_OBJECT_ALLOCATED_KEY = 0x1, /**< An object has key allocated internally */ + UCL_OBJECT_ALLOCATED_VALUE = 0x2, /**< An object has a string value allocated internally */ + UCL_OBJECT_NEED_KEY_ESCAPE = 0x4, /**< The key of an object need to be escaped on output */ + UCL_OBJECT_EPHEMERAL = 0x8, /**< Temporary object that does not need to be freed really */ + UCL_OBJECT_MULTILINE = 0x10, /**< String should be displayed as multiline string */ + UCL_OBJECT_MULTIVALUE = 0x20 /**< Object is a key with multiple values */ } ucl_object_flags_t; /** @@ -195,14 +199,21 @@ typedef struct ucl_object_s { const char *key; /**< Key of an object */ struct ucl_object_s *next; /**< Array handle */ struct ucl_object_s *prev; /**< Array handle */ - unsigned char* trash_stack[2]; /**< Pointer to allocated chunks */ - unsigned keylen; /**< Lenght of a key */ - unsigned len; /**< Size of an object */ - enum ucl_type type; /**< Real type */ - uint16_t ref; /**< Reference count */ + uint32_t keylen; /**< Lenght of a key */ + uint32_t len; /**< Size of an object */ + uint32_t ref; /**< Reference count */ uint16_t flags; /**< Object flags */ + uint16_t type; /**< Real type */ + unsigned char* trash_stack[2]; /**< Pointer to allocated chunks */ } ucl_object_t; +/** + * Destructor type for userdata objects + * @param ud user specified data pointer + */ +typedef void (*ucl_userdata_dtor)(void *ud); +typedef const char* (*ucl_userdata_emitter)(void *ud); + /** @} */ /** @@ -239,6 +250,31 @@ UCL_EXTERN ucl_object_t* ucl_object_new UCL_EXTERN ucl_object_t* ucl_object_typed_new (ucl_type_t type) UCL_WARN_UNUSED_RESULT; /** + * Create new object with type and priority specified + * @param type type of a new object + * @param priority priority of an object + * @return new object + */ +UCL_EXTERN ucl_object_t* ucl_object_new_full (ucl_type_t type, unsigned priority) + UCL_WARN_UNUSED_RESULT; + +/** + * Create new object with userdata dtor + * @param dtor destructor function + * @return new object + */ +UCL_EXTERN ucl_object_t* ucl_object_new_userdata (ucl_userdata_dtor dtor, + ucl_userdata_emitter emitter) UCL_WARN_UNUSED_RESULT; + +/** + * Perform deep copy of an object copying everything + * @param other object to copy + * @return new object with refcount equal to 1 + */ +UCL_EXTERN ucl_object_t * ucl_object_copy (const ucl_object_t *other) + UCL_WARN_UNUSED_RESULT; + +/** * Return the type of an object * @return the object type */ @@ -293,7 +329,7 @@ UCL_EXTERN ucl_object_t* ucl_object_from /** * Insert a object 'elt' to the hash 'top' and associate it with key 'key' - * @param top destination object (will be created automatically if top is NULL) + * @param top destination object (must be of type UCL_OBJECT) * @param elt element to insert (must NOT be NULL) * @param key key to associate with this object (either const or preallocated) * @param keylen length of the key (or 0 for NULL terminated keys) @@ -306,7 +342,7 @@ UCL_EXTERN bool ucl_object_insert_key (u /** * Replace a object 'elt' to the hash 'top' and associate it with key 'key', old object will be unrefed, * if no object has been found this function works like ucl_object_insert_key() - * @param top destination object (will be created automatically if top is NULL) + * @param top destination object (must be of type UCL_OBJECT) * @param elt element to insert (must NOT be NULL) * @param key key to associate with this object (either const or preallocated) * @param keylen length of the key (or 0 for NULL terminated keys) @@ -317,6 +353,15 @@ UCL_EXTERN bool ucl_object_replace_key ( const char *key, size_t keylen, bool copy_key); /** + * Merge the keys from one object to another object. Overwrite on conflict + * @param top destination object (must be of type UCL_OBJECT) + * @param elt element to insert (must be of type UCL_OBJECT) + * @param copy copy rather than reference the elements + * @return true if all keys have been merged + */ +UCL_EXTERN bool ucl_object_merge (ucl_object_t *top, ucl_object_t *elt, bool copy); + +/** * Delete a object associated with key 'key', old object will be unrefered, * @param top object * @param key key associated to the object to remove @@ -335,8 +380,9 @@ UCL_EXTERN bool ucl_object_delete_key (u /** - * Delete key from `top` object returning the object deleted. This object is not - * released + * Removes `key` from `top` object, returning the object that was removed. This + * object is not released, caller must unref the returned object when it is no + * longer needed. * @param top object * @param key key to remove * @param keylen length of the key (or 0 for NULL terminated keys) @@ -346,8 +392,9 @@ UCL_EXTERN ucl_object_t* ucl_object_pop_ size_t keylen) UCL_WARN_UNUSED_RESULT; /** - * Delete key from `top` object returning the object deleted. This object is not - * released + * Removes `key` from `top` object returning the object that was removed. This + * object is not released, caller must unref the returned object when it is no + * longer needed. * @param top object * @param key key to remove * @return removed object or NULL if object has not been found @@ -356,9 +403,9 @@ UCL_EXTERN ucl_object_t* ucl_object_pop_ UCL_WARN_UNUSED_RESULT; /** - * Insert a object 'elt' to the hash 'top' and associate it with key 'key', if the specified key exist, - * try to merge its content - * @param top destination object (will be created automatically if top is NULL) + * Insert a object 'elt' to the hash 'top' and associate it with key 'key', if + * the specified key exist, try to merge its content + * @param top destination object (must be of type UCL_OBJECT) * @param elt element to insert (must NOT be NULL) * @param key key to associate with this object (either const or preallocated) * @param keylen length of the key (or 0 for NULL terminated keys) @@ -369,8 +416,8 @@ UCL_EXTERN bool ucl_object_insert_key_me const char *key, size_t keylen, bool copy_key); /** - * Append an element to the front of array object - * @param top destination object (will be created automatically if top is NULL) + * Append an element to the end of array object + * @param top destination object (must NOT be NULL) * @param elt element to append (must NOT be NULL) * @return true if value has been inserted */ @@ -379,7 +426,7 @@ UCL_EXTERN bool ucl_array_append (ucl_ob /** * Append an element to the start of array object - * @param top destination object (will be created automatically if top is NULL) + * @param top destination object (must NOT be NULL) * @param elt element to append (must NOT be NULL) * @return true if value has been inserted */ @@ -387,8 +434,19 @@ UCL_EXTERN bool ucl_array_prepend (ucl_o ucl_object_t *elt); /** - * Removes an element `elt` from the array `top`. Caller must unref the returned object when it is not - * needed. + * Merge all elements of second array into the first array + * @param top destination array (must be of type UCL_ARRAY) + * @param elt array to copy elements from (must be of type UCL_ARRAY) + * @param copy copy elements instead of referencing them + * @return true if arrays were merged + */ +UCL_EXTERN bool ucl_array_merge (ucl_object_t *top, ucl_object_t *elt, + bool copy); + +/** + * Removes an element `elt` from the array `top`, returning the object that was + * removed. This object is not released, caller must unref the returned object + * when it is no longer needed. * @param top array ucl object * @param elt element to remove * @return removed element or NULL if `top` is NULL or not an array @@ -411,35 +469,50 @@ UCL_EXTERN const ucl_object_t* ucl_array UCL_EXTERN const ucl_object_t* ucl_array_tail (const ucl_object_t *top); /** - * Removes the last element from the array `top`. Caller must unref the returned object when it is not - * needed. + * Removes the last element from the array `top`, returning the object that was + * removed. This object is not released, caller must unref the returned object + * when it is no longer needed. * @param top array ucl object * @return removed element or NULL if `top` is NULL or not an array */ UCL_EXTERN ucl_object_t* ucl_array_pop_last (ucl_object_t *top); /** - * Return object identified by an index of the array `top` - * @param obj object to get a key from (must be of type UCL_ARRAY) - * @param index index to return + * Removes the first element from the array `top`, returning the object that was + * removed. This object is not released, caller must unref the returned object + * when it is no longer needed. + * @param top array ucl object + * @return removed element or NULL if `top` is NULL or not an array + */ +UCL_EXTERN ucl_object_t* ucl_array_pop_first (ucl_object_t *top); + +/** + * Return object identified by index of the array `top` + * @param top object to get a key from (must be of type UCL_ARRAY) + * @param index array index to return * @return object at the specified index or NULL if index is not found */ UCL_EXTERN const ucl_object_t* ucl_array_find_index (const ucl_object_t *top, unsigned int index); /** - * Removes the first element from the array `top`. Caller must unref the returned object when it is not - * needed. - * @param top array ucl object - * @return removed element or NULL if `top` is NULL or not an array + * Replace an element in an array with a different element, returning the object + * that was replaced. This object is not released, caller must unref the + * returned object when it is no longer needed. + * @param top destination object (must be of type UCL_ARRAY) + * @param elt element to append (must NOT be NULL) + * @param index array index in destination to overwrite with elt + * @return object that was replaced or NULL if index is not found */ -UCL_EXTERN ucl_object_t* ucl_array_pop_first (ucl_object_t *top); +ucl_object_t * +ucl_array_replace_index (ucl_object_t *top, ucl_object_t *elt, + unsigned int index); /** * Append a element to another element forming an implicit array * @param head head to append (may be NULL) * @param elt new element - * @return true if element has been inserted + * @return the new implicit array */ UCL_EXTERN ucl_object_t * ucl_elt_append (ucl_object_t *head, ucl_object_t *elt); @@ -533,7 +606,7 @@ UCL_EXTERN const char* ucl_object_tolstr * Return object identified by a key in the specified object * @param obj object to get a key from (must be of type UCL_OBJECT) * @param key key to search - * @return object matched the specified key or NULL if key is not found + * @return object matching the specified key or NULL if key was not found */ UCL_EXTERN const ucl_object_t* ucl_object_find_key (const ucl_object_t *obj, const char *key); @@ -543,7 +616,7 @@ UCL_EXTERN const ucl_object_t* ucl_objec * @param obj object to get a key from (must be of type UCL_OBJECT) * @param key key to search * @param klen length of a key - * @return object matched the specified key or NULL if key is not found + * @return object matching the specified key or NULL if key was not found */ UCL_EXTERN const ucl_object_t* ucl_object_find_keyl (const ucl_object_t *obj, const char *key, size_t klen); @@ -575,6 +648,7 @@ UCL_EXTERN const char* ucl_object_keyl ( /** * Increase reference count for an object * @param obj object to ref + * @return the referenced object */ UCL_EXTERN ucl_object_t* ucl_object_ref (const ucl_object_t *obj); @@ -612,6 +686,21 @@ UCL_EXTERN void ucl_object_array_sort (u int (*cmp)(const ucl_object_t *o1, const ucl_object_t *o2)); /** + * Get the priority for specific UCL object + * @param obj any ucl object + * @return priority of an object + */ +UCL_EXTERN unsigned int ucl_object_get_priority (const ucl_object_t *obj); + +/** + * Set explicit priority of an object. + * @param obj any ucl object + * @param priority new priroity value (only 4 least significant bits are considred) + */ +UCL_EXTERN void ucl_object_set_priority (ucl_object_t *obj, + unsigned int priority); + +/** * Opaque iterator object */ typedef void* ucl_object_iter_t; @@ -640,11 +729,14 @@ UCL_EXTERN const ucl_object_t* ucl_itera * Macro handler for a parser * @param data the content of macro * @param len the length of content + * @param arguments arguments object * @param ud opaque user data * @param err error pointer * @return true if macro has been parsed */ -typedef bool (*ucl_macro_handler) (const unsigned char *data, size_t len, void* ud); +typedef bool (*ucl_macro_handler) (const unsigned char *data, size_t len, + const ucl_object_t *arguments, + void* ud); /* Opaque parser */ struct ucl_parser; @@ -702,13 +794,24 @@ UCL_EXTERN void ucl_parser_set_variables * @param parser parser structure * @param data the pointer to the beginning of a chunk * @param len the length of a chunk - * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_chunk (struct ucl_parser *parser, const unsigned char *data, size_t len); /** + * Load new chunk to a parser with the specified priority + * @param parser parser structure + * @param data the pointer to the beginning of a chunk + * @param len the length of a chunk + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_chunk_priority (struct ucl_parser *parser, + const unsigned char *data, size_t len, unsigned priority); + +/** * Load ucl object from a string * @param parser parser structure * @param data the pointer to the string @@ -835,7 +938,7 @@ struct ucl_emitter_context { /** A set of output operations */ const struct ucl_emitter_operations *ops; /** Current amount of indent tabs */ - unsigned int ident; + unsigned int indent; /** Top level object */ const ucl_object_t *top; /** The rest of context */ Modified: head/contrib/libucl/libucl.pc.in ============================================================================== --- head/contrib/libucl/libucl.pc.in Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/libucl.pc.in Sat Nov 29 00:45:09 2014 (r275223) @@ -7,5 +7,5 @@ Name: LibUCL Description: Universal configuration library Version: @UCL_VERSION@ Libs: -L${libdir} -lucl -Libs.private: @LIBS_EXTRA@ +Libs.private: @LIBS_EXTRA@ @LUA_LIB@ Cflags: -I${includedir}/ Modified: head/contrib/libucl/src/ucl_emitter.c ============================================================================== --- head/contrib/libucl/src/ucl_emitter.c Sat Nov 29 00:34:47 2014 (r275222) +++ head/contrib/libucl/src/ucl_emitter.c Sat Nov 29 00:45:09 2014 (r275223) @@ -130,6 +130,19 @@ ucl_emitter_print_key (bool print_key, s func->ucl_emitter_append_character (' ', 1, func->ud); } } + else if (ctx->id == UCL_EMIT_YAML) { + if (obj->keylen > 0 && (obj->flags & UCL_OBJECT_NEED_KEY_ESCAPE)) { + ucl_elt_string_write_json (obj->key, obj->keylen, ctx); + } + else if (obj->keylen > 0) { + func->ucl_emitter_append_len (obj->key, obj->keylen, func->ud); + } + else { + func->ucl_emitter_append_len ("null", 4, func->ud); + } + + func->ucl_emitter_append_len (": ", 2, func->ud); + } else { if (obj->keylen > 0) { ucl_elt_string_write_json (obj->key, obj->keylen, ctx); @@ -182,7 +195,7 @@ ucl_emitter_common_end_object (struct uc const struct ucl_emitter_functions *func = ctx->func; if (UCL_EMIT_IDENT_TOP_OBJ(ctx, obj)) { - ctx->ident --; + ctx->indent --; if (compact) { func->ucl_emitter_append_character ('}', 1, func->ud); } @@ -191,7 +204,7 @@ ucl_emitter_common_end_object (struct uc /* newline is already added for this format */ func->ucl_emitter_append_character ('\n', 1, func->ud); } - ucl_add_tabs (func, ctx->ident, compact); + ucl_add_tabs (func, ctx->indent, compact); func->ucl_emitter_append_character ('}', 1, func->ud); } } @@ -210,7 +223,7 @@ ucl_emitter_common_end_array (struct ucl { const struct ucl_emitter_functions *func = ctx->func; - ctx->ident --; + ctx->indent --; if (compact) { func->ucl_emitter_append_character (']', 1, func->ud); } @@ -219,7 +232,7 @@ ucl_emitter_common_end_array (struct ucl /* newline is already added for this format */ func->ucl_emitter_append_character ('\n', 1, func->ud); } - ucl_add_tabs (func, ctx->ident, compact); + ucl_add_tabs (func, ctx->indent, compact); func->ucl_emitter_append_character (']', 1, func->ud); } @@ -249,7 +262,7 @@ ucl_emitter_common_start_array (struct u func->ucl_emitter_append_len ("[\n", 2, func->ud); } - ctx->ident ++; + ctx->indent ++; if (obj->type == UCL_ARRAY) { /* explicit array */ @@ -294,7 +307,7 @@ ucl_emitter_common_start_object (struct else { func->ucl_emitter_append_len ("{\n", 2, func->ud); } - ctx->ident ++; + ctx->indent ++; } while ((cur = ucl_hash_iterate (obj->value.ov, &it))) { @@ -315,7 +328,7 @@ ucl_emitter_common_start_object (struct func->ucl_emitter_append_len (",\n", 2, func->ud); } } - ucl_add_tabs (func, ctx->ident, compact); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 06:53:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40545159; Sat, 29 Nov 2014 06:53:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D191F8E; Sat, 29 Nov 2014 06:53:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAT6r77J006456; Sat, 29 Nov 2014 06:53:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAT6r79A006455; Sat, 29 Nov 2014 06:53:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411290653.sAT6r79A006455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 29 Nov 2014 06:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275234 - head/usr.bin/vi/catalog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 06:53:07 -0000 Author: ngie Date: Sat Nov 29 06:53:06 2014 New Revision: 275234 URL: https://svnweb.freebsd.org/changeset/base/275234 Log: MF projects/building-blocks r275198: Use ${.TARGET} instead of hardcoding the name in the dump build rule Modified: head/usr.bin/vi/catalog/Makefile Directory Properties: head/ (props changed) Modified: head/usr.bin/vi/catalog/Makefile ============================================================================== --- head/usr.bin/vi/catalog/Makefile Sat Nov 29 05:28:40 2014 (r275233) +++ head/usr.bin/vi/catalog/Makefile Sat Nov 29 06:53:06 2014 (r275234) @@ -101,7 +101,7 @@ english.base: dump ${SCAN} #Makefile dump: dump.c - ${CC} -o dump ${.ALLSRC} + ${CC} -o ${.TARGET} ${.ALLSRC} CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2 From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 08:59:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B651722D; Sat, 29 Nov 2014 08:59:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8835BC53; Sat, 29 Nov 2014 08:59:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAT8xRwL063493; Sat, 29 Nov 2014 08:59:27 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAT8xRte063492; Sat, 29 Nov 2014 08:59:27 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201411290859.sAT8xRte063492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Sat, 29 Nov 2014 08:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275237 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 08:59:27 -0000 Author: rdivacky Date: Sat Nov 29 08:59:26 2014 New Revision: 275237 URL: https://svnweb.freebsd.org/changeset/base/275237 Log: Shrink boot2 a bit more by factoring out common pattern of printf();return(-1); This shrinks it by 8bytes using clang35 and by 12bytes using clang34. Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Sat Nov 29 08:33:54 2014 (r275236) +++ head/sys/boot/i386/boot2/boot2.c Sat Nov 29 08:59:26 2014 (r275237) @@ -501,6 +501,7 @@ dskread(void *buf, unsigned lba, unsigne char *sec; unsigned i; uint8_t sl; + const char *reason; if (!dsk_meta) { sec = dmadat->secbuf; @@ -525,8 +526,8 @@ dskread(void *buf, unsigned lba, unsigne if (sl != COMPATIBILITY_SLICE) dp += sl - BASE_SLICE; if (dp->dp_typ != DOSPTYP_386BSD) { - printf("Invalid %s\n", "slice"); - return -1; + reason = "slice"; + goto error; } dsk.start = dp->dp_start; } @@ -535,8 +536,8 @@ dskread(void *buf, unsigned lba, unsigne d = (void *)(sec + LABELOFFSET); if (d->d_magic != DISKMAGIC || d->d_magic2 != DISKMAGIC) { if (dsk.part != RAW_PART) { - printf("Invalid %s\n", "label"); - return -1; + reason = "label"; + goto error; } } else { if (!dsk.init) { @@ -546,14 +547,17 @@ dskread(void *buf, unsigned lba, unsigne } if (dsk.part >= d->d_npartitions || !d->d_partitions[dsk.part].p_size) { - printf("Invalid %s\n", "partition"); - return -1; + reason = "partition"; + goto error; } dsk.start += d->d_partitions[dsk.part].p_offset; dsk.start -= d->d_partitions[RAW_PART].p_offset; } } return drvread(buf, dsk.start + lba, nblk); +error: + printf("Invalid %s\n", reason); + return -1; } static void From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 09:27:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0938699A; Sat, 29 Nov 2014 09:27:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E986FED3; Sat, 29 Nov 2014 09:27:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAT9RI1g077605; Sat, 29 Nov 2014 09:27:18 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAT9RII2077604; Sat, 29 Nov 2014 09:27:18 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201411290927.sAT9RII2077604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 29 Nov 2014 09:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275239 - head/sys/boot/pc98/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 09:27:19 -0000 Author: nyan Date: Sat Nov 29 09:27:18 2014 New Revision: 275239 URL: https://svnweb.freebsd.org/changeset/base/275239 Log: MFi386: r275237 (by rdivacky) Shrink boot2 a bit more by factoring out common pattern of printf();return(-1); Modified: head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Sat Nov 29 09:09:54 2014 (r275238) +++ head/sys/boot/pc98/boot2/boot2.c Sat Nov 29 09:27:18 2014 (r275239) @@ -639,6 +639,7 @@ dskread(void *buf, unsigned lba, unsigne unsigned i; uint8_t sl; u_char *p; + const char *reason; if (!dsk_meta) { sec = dmadat->secbuf; @@ -660,8 +661,8 @@ dskread(void *buf, unsigned lba, unsigne if (sl != WHOLE_DISK_SLICE) { dp += sl - BASE_SLICE; if (dp->dp_mid != DOSMID_386BSD) { - printf("Invalid %s\n", "slice"); - return -1; + reason = "slice"; + goto error; } dsk.start = dp->dp_scyl * dsk.head * dsk.sec + dp->dp_shd * dsk.sec + dp->dp_ssect; @@ -671,14 +672,14 @@ dskread(void *buf, unsigned lba, unsigne d = (void *)(sec + LABELOFFSET); if (d->d_magic != DISKMAGIC || d->d_magic2 != DISKMAGIC) { if (dsk.part != RAW_PART) { - printf("Invalid %s\n", "label"); - return -1; + reason = "label"; + goto error; } } else { if (dsk.part >= d->d_npartitions || !d->d_partitions[dsk.part].p_size) { - printf("Invalid %s\n", "partition"); - return -1; + reason = "partition"; + goto error; } dsk.start += d->d_partitions[dsk.part].p_offset; dsk.start -= d->d_partitions[RAW_PART].p_offset; @@ -690,6 +691,9 @@ dskread(void *buf, unsigned lba, unsigne return i; } return 0; +error: + printf("Invalid %s\n", reason); + return -1; } static void From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 11:50:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1E60D97; Sat, 29 Nov 2014 11:50:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84842CD7; Sat, 29 Nov 2014 11:50:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATBoKx5043998; Sat, 29 Nov 2014 11:50:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATBoKiH043997; Sat, 29 Nov 2014 11:50:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411291150.sATBoKiH043997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 29 Nov 2014 11:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275240 - head/contrib/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 11:50:20 -0000 Author: bapt Date: Sat Nov 29 11:50:19 2014 New Revision: 275240 URL: https://svnweb.freebsd.org/changeset/base/275240 Log: Implement --no-fatal-warning for compatibility with newer ld what ever order the options are passed to ld(1) the --no-fatal-warning always disable --fatal-warning Modified: head/contrib/binutils/ld/lexsup.c Modified: head/contrib/binutils/ld/lexsup.c ============================================================================== --- head/contrib/binutils/ld/lexsup.c Sat Nov 29 09:27:18 2014 (r275239) +++ head/contrib/binutils/ld/lexsup.c Sat Nov 29 11:50:19 2014 (r275240) @@ -84,6 +84,7 @@ enum option_values OPTION_NO_KEEP_MEMORY, OPTION_NO_WARN_MISMATCH, OPTION_NO_WARN_SEARCH_MISMATCH, + OPTION_NO_WARN_FATAL, OPTION_NOINHIBIT_EXEC, OPTION_NON_SHARED, OPTION_NO_WHOLE_ARCHIVE, @@ -375,6 +376,9 @@ static const struct ld_option ld_options { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}, '\0', NULL, N_("Treat warnings as errors"), TWO_DASHES }, + { {"no-fatal-warnings", no_argument, NULL, OPTION_NO_WARN_FATAL}, + '\0', NULL, N_("Don't treat warnings as errors"), + TWO_DASHES }, { {"fini", required_argument, NULL, OPTION_FINI}, '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH }, { {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX}, @@ -568,6 +572,7 @@ parse_args (unsigned argc, char **argv) struct option *really_longopts; int last_optind; enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR; + int no_fatal_warnings = FALSE; shortopts = xmalloc (OPTION_COUNT * 3 + 2); longopts = xmalloc (sizeof (*longopts) * (OPTION_COUNT + 1)); @@ -1317,6 +1322,9 @@ parse_args (unsigned argc, char **argv) case OPTION_WARN_FATAL: config.fatal_warnings = TRUE; break; + case OPTION_NO_WARN_FATAL: + no_fatal_warnings = TRUE; + break; case OPTION_WARN_MULTIPLE_GP: config.warn_multiple_gp = TRUE; break; @@ -1438,6 +1446,8 @@ parse_args (unsigned argc, char **argv) break; } } + if (no_fatal_warnings) + config.fatal_warnings = FALSE; if (ingroup) lang_leave_group (); From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 12:22:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A71E4466; Sat, 29 Nov 2014 12:22:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B2E479; Sat, 29 Nov 2014 12:22:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATCMW76060918; Sat, 29 Nov 2014 12:22:32 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATCMWJv060917; Sat, 29 Nov 2014 12:22:32 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201411291222.sATCMWJv060917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 29 Nov 2014 12:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275241 - head/sys/boot/pc98/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 12:22:32 -0000 Author: nyan Date: Sat Nov 29 12:22:31 2014 New Revision: 275241 URL: https://svnweb.freebsd.org/changeset/base/275241 Log: MFi386: r275059, r275061, r275062 and r275191 (by rdivacky) Shrink boot2 by a couple more bytes. Modified: head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Sat Nov 29 11:50:19 2014 (r275240) +++ head/sys/boot/pc98/boot2/boot2.c Sat Nov 29 12:22:31 2014 (r275241) @@ -462,7 +462,8 @@ load(void) caddr_t p; ufs_ino_t ino; uint32_t addr; - int i, j; + int k; + uint8_t i, j; if (!(ino = lookup(kname))) { if (!ls) @@ -483,7 +484,7 @@ load(void) return; } else if (IS_ELF(hdr.eh)) { fs_off = hdr.eh.e_phoff; - for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) { + for (j = k = 0; k < hdr.eh.e_phnum && j < 2; k++) { if (xfsread(ino, ep + j, sizeof(ep[0]))) return; if (ep[j].p_type == PT_LOAD) @@ -533,6 +534,7 @@ parse() const char *cp; unsigned int drv; int c, i, j; + size_t k; while ((c = *arg++)) { if (c == ' ' || c == '\t' || c == '\n') @@ -555,7 +557,7 @@ parse() #if SERIAL } else if (c == 'S') { j = 0; - while ((unsigned int)(i = *arg++ - '0') <= 9) + while ((i = *arg++ - '0') <= 9) j = j * 10 + i; if (j > 0 && i == -'0') { comspeed = j; @@ -618,10 +620,10 @@ parse() dsk.daua = dsk.disk | dsk.unit; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i >= sizeof(knamebuf)) + if (k = ep - arg) { + if (k >= sizeof(knamebuf)) return -1; - memcpy(knamebuf, arg, i + 1); + memcpy(knamebuf, arg, k + 1); kname = knamebuf; } } @@ -754,8 +756,10 @@ drvread(void *buf, unsigned lba) head = x / dsk.sec; sec = x % dsk.sec; - if (!OPT_CHECK(RBX_QUIET)) - printf("%c\b", c = c << 8 | c >> 24); + if (!OPT_CHECK(RBX_QUIET)) { + xputc(c = c << 8 | c >> 24); + xputc('\b'); + } v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; v86.addr = READORG; /* call to read in boot1 */ v86.ecx = cyl; From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 13:49:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3451130; Sat, 29 Nov 2014 13:49:39 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id A7BBAA08; Sat, 29 Nov 2014 13:49:39 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 21002780C45; Sun, 30 Nov 2014 00:49:31 +1100 (AEDT) Date: Sun, 30 Nov 2014 00:49:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Takahashi Yoshihiro Subject: Re: svn commit: r275241 - head/sys/boot/pc98/boot2 In-Reply-To: <201411291222.sATCMWJv060917@svn.freebsd.org> Message-ID: <20141129235225.C1402@besplex.bde.org> References: <201411291222.sATCMWJv060917@svn.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=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=18GXijtb-ZROKZIxSG0A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 13:49:40 -0000 On Sat, 29 Nov 2014, Takahashi Yoshihiro wrote: > Log: > MFi386: r275059, r275061, r275062 and r275191 (by rdivacky) > > Shrink boot2 by a couple more bytes. These changes don't look too good to me. One is just a bug. > Modified: head/sys/boot/pc98/boot2/boot2.c > ============================================================================== > --- head/sys/boot/pc98/boot2/boot2.c Sat Nov 29 11:50:19 2014 (r275240) > +++ head/sys/boot/pc98/boot2/boot2.c Sat Nov 29 12:22:31 2014 (r275241) > ... > @@ -533,6 +534,7 @@ parse() > const char *cp; > unsigned int drv; > int c, i, j; > + size_t k; This still has a style bug (unsorting). > > while ((c = *arg++)) { > if (c == ' ' || c == '\t' || c == '\n') > @@ -555,7 +557,7 @@ parse() > #if SERIAL > } else if (c == 'S') { > j = 0; > - while ((unsigned int)(i = *arg++ - '0') <= 9) > + while ((i = *arg++ - '0') <= 9) > j = j * 10 + i; > if (j > 0 && i == -'0') { > comspeed = j; This used to work. The cast was an obfuscated way of checking for characters less than '0'. Removing the cast breaks the code. Garbage non-digits below '0' (including all characters below '\0') are now treated as digits. This still asks for the pessimization of promoting *arg++ to int before checking it. The compiler might be able to unpessimize this, but large code shouldn't be asked for. The following should be better: uint8_t uc; ... /* Check that the compiler generates 8-bit ops. */ while ((uc = *arg++ - '0') <= 9) j = j * 10 + uc; if (j > 0 && uc == (uint8_t)-'0') { comspeed = j; I don't see a correct way to avoid the second check of uc. Subtracting '0' and using the unsigned obfuscation to check for digits is used in several other places: drv = *arg - '0'; if (drv > 9) ...; This works since 'drv' is unsigned. Drive numbers above 9 are not supported, so uint8_t could be used here, saving 1 byte. At least 1 more byte can be saved in each of 'drv == -1' and 'if (drv == -1)'. 'drv' would probably need to be promoted before use; it is only used once to initialize dsk.drive. It can be promoted there using no extra bytes by statically initializing dsk.drive to 0 and storing only 8 bits from 'drv'. The total savings should be 4-5 bytes. dsk.unit = *arg - '0'; if (arg[1] != ',' || dsk.unit > 9) ...; dsk.unit is also unsigned. Unit numbers above 9 are not supported, so uint8_t should work here too, but since dsk.unit probably needs to be a 32-bit type and there is no local variable like 'drv', the savings are not as easy. dsk.slice = WHOLE_DISK_SLICE; ... dsk.slice = *arg - '0' + 1; if (dsk.slice > NDOSPART + 1) ...; Now disk.slice is already uint8_t, so this code should be optimal. However, when dsk.slice is used it has to be promoted and about 3 bytes are wasted there. To avoid this wastage, make disk.slice plain int (no need for unsigned hacks), initialize it all to 0, and store only the low 8 bits in the above. There are so many of these that it might be smaller to use a function that handles the general case. I suspect that this is not in fact smaller, since it would need complications like passing back the endptr (like strtol(), not atoi()). Bruce From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 14:30:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 776AA8BF; Sat, 29 Nov 2014 14:30:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64C6FD7B; Sat, 29 Nov 2014 14:30:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATEUeJI018047; Sat, 29 Nov 2014 14:30:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATEUeWT018046; Sat, 29 Nov 2014 14:30:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201411291430.sATEUeWT018046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 29 Nov 2014 14:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275242 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 14:30:40 -0000 Author: bapt Date: Sat Nov 29 14:30:39 2014 New Revision: 275242 URL: https://svnweb.freebsd.org/changeset/base/275242 Log: Ignore more warnings with external gcc Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Nov 29 12:22:31 2014 (r275241) +++ head/sys/conf/kern.mk Sat Nov 29 14:30:39 2014 (r275242) @@ -39,7 +39,8 @@ CWARNEXTRA?= -Wno-error-tautological-com CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ -Wno-error=array-bounds -Wno-error=address \ - -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes + -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ + -Wno-error=strict-overflow -Wno-error=overflow .endif # External compilers may not support our format extensions. Allow them From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 14:40:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 540D8B44; Sat, 29 Nov 2014 14:40:56 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14D6EED1; Sat, 29 Nov 2014 14:40:55 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8A77A1FE022; Sat, 29 Nov 2014 15:40:52 +0100 (CET) Message-ID: <5479DB0C.5010208@selasky.org> Date: Sat, 29 Nov 2014 15:41:16 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Takahashi Yoshihiro , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r275241 - head/sys/boot/pc98/boot2 References: <201411291222.sATCMWJv060917@svn.freebsd.org> In-Reply-To: <201411291222.sATCMWJv060917@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 14:40:56 -0000 On 11/29/14 13:22, Takahashi Yoshihiro wrote: > + if (k = ep - arg) { There is a missing set of parenthesis here, GCC will complain! > } else if (c == 'S') { > j = 0; > - while ((unsigned int)(i = *arg++ - '0') <= 9) > + while ((i = *arg++ - '0') <= 9) > j = j * 10 + i; > if (j > 0 && i == -'0') { > comspeed = j; Like Bruce said, this code does no longer handle negative values of "i" like before! BTW: If we want to squeeze more bytes out, we should consider something like compressing the code, perhaps using something like Farbraush ?? --HPS From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 15:56:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A14632B0; Sat, 29 Nov 2014 15:56:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC647EF; Sat, 29 Nov 2014 15:56:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATFusYU062711; Sat, 29 Nov 2014 15:56:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATFuqHa062699; Sat, 29 Nov 2014 15:56:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201411291556.sATFuqHa062699@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 29 Nov 2014 15:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275256 - head/lib/libc/arm/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 15:56:54 -0000 Author: andrew Date: Sat Nov 29 15:56:52 2014 New Revision: 275256 URL: https://svnweb.freebsd.org/changeset/base/275256 Log: Switch to the ARM unified assembly language as the clang integrated as only supports it. Binutils supports it when the ".syntax unified" directive is set. Sponsored by: ABT Systems Ltd Modified: head/lib/libc/arm/string/ffs.S head/lib/libc/arm/string/memcmp.S head/lib/libc/arm/string/memcpy_arm.S head/lib/libc/arm/string/memcpy_xscale.S head/lib/libc/arm/string/memmove.S head/lib/libc/arm/string/memset.S head/lib/libc/arm/string/strlen.S Modified: head/lib/libc/arm/string/ffs.S ============================================================================== --- head/lib/libc/arm/string/ffs.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/ffs.S Sat Nov 29 15:56:52 2014 (r275256) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); +.syntax unified + /* * ffs - find first set bit, this algorithm isolates the first set * bit, then multiplies the number by 0x0450fbaf which leaves the top @@ -60,7 +62,7 @@ ENTRY(ffs) rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */ /* now lookup in table indexed on top 6 bits of r0 */ - ldrneb r0, [ r2, r0, lsr #26 ] + ldrbne r0, [ r2, r0, lsr #26 ] RET .text; Modified: head/lib/libc/arm/string/memcmp.S ============================================================================== --- head/lib/libc/arm/string/memcmp.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/memcmp.S Sat Nov 29 15:56:52 2014 (r275256) @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); +.syntax unified + ENTRY(memcmp) mov ip, r0 #if defined(_KERNEL) && !defined(_STANDALONE) @@ -76,7 +78,7 @@ ENTRY(memcmp) /* Are both addresses aligned the same way? */ cmp r2, #0x00 - eornes r3, ip, r1 + eorsne r3, ip, r1 RETeq /* len == 0, or same addresses! */ tst r3, #0x03 subne r2, r2, #0x01 Modified: head/lib/libc/arm/string/memcpy_arm.S ============================================================================== --- head/lib/libc/arm/string/memcpy_arm.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/memcpy_arm.S Sat Nov 29 15:56:52 2014 (r275256) @@ -31,6 +31,9 @@ #include __FBSDID("$FreeBSD$"); + +.syntax unified + /* * This is one fun bit of code ... * Some easy listening music is suggested while trying to understand this @@ -91,8 +94,8 @@ ENTRY(memcpy) bge .Lmemcpy_loop32 cmn r2, #0x10 - ldmgeia r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ - stmgeia r0!, {r3, r4, r12, lr} + ldmiage r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ + stmiage r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 ldmia sp!, {r4} /* return r4 */ @@ -101,9 +104,9 @@ ENTRY(memcpy) /* blat 12 bytes at a time */ .Lmemcpy_loop12: - ldmgeia r1!, {r3, r12, lr} - stmgeia r0!, {r3, r12, lr} - subges r2, r2, #0x0c + ldmiage r1!, {r3, r12, lr} + stmiage r0!, {r3, r12, lr} + subsge r2, r2, #0x0c bge .Lmemcpy_loop12 .Lmemcpy_l12: @@ -113,26 +116,26 @@ ENTRY(memcpy) subs r2, r2, #4 ldrlt r3, [r1], #4 strlt r3, [r0], #4 - ldmgeia r1!, {r3, r12} - stmgeia r0!, {r3, r12} + ldmiage r1!, {r3, r12} + stmiage r0!, {r3, r12} subge r2, r2, #4 .Lmemcpy_l4: /* less than 4 bytes to go */ adds r2, r2, #4 #ifdef __APCS_26_ - ldmeqia sp!, {r0, pc}^ /* done */ + ldmiaeq sp!, {r0, pc}^ /* done */ #else - ldmeqia sp!, {r0, pc} /* done */ + ldmiaeq sp!, {r0, pc} /* done */ #endif /* copy the crud byte at a time */ cmp r2, #2 ldrb r3, [r1], #1 strb r3, [r0], #1 - ldrgeb r3, [r1], #1 - strgeb r3, [r0], #1 - ldrgtb r3, [r1], #1 - strgtb r3, [r0], #1 + ldrbge r3, [r1], #1 + strbge r3, [r0], #1 + ldrbgt r3, [r1], #1 + strbgt r3, [r0], #1 ldmia sp!, {r0, pc} /* erg - unaligned destination */ @@ -143,10 +146,10 @@ ENTRY(memcpy) /* align destination with byte copies */ ldrb r3, [r1], #1 strb r3, [r0], #1 - ldrgeb r3, [r1], #1 - strgeb r3, [r0], #1 - ldrgtb r3, [r1], #1 - strgtb r3, [r0], #1 + ldrbge r3, [r1], #1 + strbge r3, [r0], #1 + ldrbgt r3, [r1], #1 + strbgt r3, [r0], #1 subs r2, r2, r12 blt .Lmemcpy_l4 /* less the 4 bytes */ Modified: head/lib/libc/arm/string/memcpy_xscale.S ============================================================================== --- head/lib/libc/arm/string/memcpy_xscale.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/memcpy_xscale.S Sat Nov 29 15:56:52 2014 (r275256) @@ -38,6 +38,8 @@ #include __FBSDID("$FreeBSD$"); +.syntax unified + /* LINTSTUB: Func: void *memcpy(void *dst, const void *src, size_t len) */ ENTRY(memcpy) pld [r1] @@ -52,12 +54,12 @@ ENTRY(memcpy) ldrb ip, [r1], #0x01 sub r2, r2, #0x01 strb ip, [r3], #0x01 - ldrleb ip, [r1], #0x01 + ldrble ip, [r1], #0x01 suble r2, r2, #0x01 - strleb ip, [r3], #0x01 - ldrltb ip, [r1], #0x01 + strble ip, [r3], #0x01 + ldrblt ip, [r1], #0x01 sublt r2, r2, #0x01 - strltb ip, [r3], #0x01 + strblt ip, [r3], #0x01 /* Destination buffer is now word aligned */ .Lmemcpy_wordaligned: @@ -134,7 +136,7 @@ ENTRY(memcpy) .Lmemcpy_w_lessthan128: adds r2, r2, #0x80 /* Adjust for extra sub */ - ldmeqfd sp!, {r4-r9} + ldmfdeq sp!, {r4-r9} bxeq lr /* Return now if done */ subs r2, r2, #0x20 blt .Lmemcpy_w_lessthan32 @@ -159,7 +161,7 @@ ENTRY(memcpy) .Lmemcpy_w_lessthan32: adds r2, r2, #0x20 /* Adjust for extra sub */ - ldmeqfd sp!, {r4-r9} + ldmfdeq sp!, {r4-r9} bxeq lr /* Return now if done */ and r4, r2, #0x18 @@ -195,11 +197,11 @@ ENTRY(memcpy) addlt r2, r2, #0x04 ldrb ip, [r1], #0x01 cmp r2, #0x02 - ldrgeb r2, [r1], #0x01 + ldrbge r2, [r1], #0x01 strb ip, [r3], #0x01 - ldrgtb ip, [r1] - strgeb r2, [r3], #0x01 - strgtb ip, [r3] + ldrbgt ip, [r1] + strbge r2, [r3], #0x01 + strbgt ip, [r3] bx lr @@ -253,7 +255,7 @@ ENTRY(memcpy) bge .Lmemcpy_bad1_loop16 adds r2, r2, #0x10 - ldmeqfd sp!, {r4-r7} + ldmfdeq sp!, {r4-r7} bxeq lr /* Return now if done */ subs r2, r2, #0x04 sublt r1, r1, #0x03 @@ -314,7 +316,7 @@ ENTRY(memcpy) bge .Lmemcpy_bad2_loop16 adds r2, r2, #0x10 - ldmeqfd sp!, {r4-r7} + ldmfdeq sp!, {r4-r7} bxeq lr /* Return now if done */ subs r2, r2, #0x04 sublt r1, r1, #0x02 @@ -375,7 +377,7 @@ ENTRY(memcpy) bge .Lmemcpy_bad3_loop16 adds r2, r2, #0x10 - ldmeqfd sp!, {r4-r7} + ldmfdeq sp!, {r4-r7} bxeq lr /* Return now if done */ subs r2, r2, #0x04 sublt r1, r1, #0x01 @@ -404,11 +406,11 @@ ENTRY(memcpy) bxeq lr ldrb ip, [r1], #0x01 cmp r2, #0x02 - ldrgeb r2, [r1], #0x01 + ldrbge r2, [r1], #0x01 strb ip, [r3], #0x01 - ldrgtb ip, [r1] - strgeb r2, [r3], #0x01 - strgtb ip, [r3] + ldrbgt ip, [r1] + strbge r2, [r3], #0x01 + strbgt ip, [r3] bx lr @@ -440,7 +442,7 @@ ENTRY(memcpy) ldrb ip, [r1], #0x01 1: subs r2, r2, #0x01 strb ip, [r3], #0x01 - ldrneb ip, [r1], #0x01 + ldrbne ip, [r1], #0x01 bne 1b bx lr Modified: head/lib/libc/arm/string/memmove.S ============================================================================== --- head/lib/libc/arm/string/memmove.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/memmove.S Sat Nov 29 15:56:52 2014 (r275256) @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD$"); +.syntax unified + #ifndef _BCOPY /* LINTSTUB: Func: void *memmove(void *, const void *, size_t) */ ENTRY(memmove) @@ -86,8 +88,8 @@ ENTRY(bcopy) bge .Lmemmove_floop32 cmn r2, #0x10 - ldmgeia r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ - stmgeia r0!, {r3, r4, r12, lr} + ldmiage r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ + stmiage r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 ldmia sp!, {r4} /* return r4 */ @@ -96,9 +98,9 @@ ENTRY(bcopy) /* blat 12 bytes at a time */ .Lmemmove_floop12: - ldmgeia r1!, {r3, r12, lr} - stmgeia r0!, {r3, r12, lr} - subges r2, r2, #0x0c + ldmiage r1!, {r3, r12, lr} + stmiage r0!, {r3, r12, lr} + subsge r2, r2, #0x0c bge .Lmemmove_floop12 .Lmemmove_fl12: @@ -108,23 +110,23 @@ ENTRY(bcopy) subs r2, r2, #4 ldrlt r3, [r1], #4 strlt r3, [r0], #4 - ldmgeia r1!, {r3, r12} - stmgeia r0!, {r3, r12} + ldmiage r1!, {r3, r12} + stmiage r0!, {r3, r12} subge r2, r2, #4 .Lmemmove_fl4: /* less than 4 bytes to go */ adds r2, r2, #4 - ldmeqia sp!, {r0, pc} /* done */ + ldmiaeq sp!, {r0, pc} /* done */ /* copy the crud byte at a time */ cmp r2, #2 ldrb r3, [r1], #1 strb r3, [r0], #1 - ldrgeb r3, [r1], #1 - strgeb r3, [r0], #1 - ldrgtb r3, [r1], #1 - strgtb r3, [r0], #1 + ldrbge r3, [r1], #1 + strbge r3, [r0], #1 + ldrbgt r3, [r1], #1 + strbgt r3, [r0], #1 ldmia sp!, {r0, pc} /* erg - unaligned destination */ @@ -135,10 +137,10 @@ ENTRY(bcopy) /* align destination with byte copies */ ldrb r3, [r1], #1 strb r3, [r0], #1 - ldrgeb r3, [r1], #1 - strgeb r3, [r0], #1 - ldrgtb r3, [r1], #1 - strgtb r3, [r0], #1 + ldrbge r3, [r1], #1 + strbge r3, [r0], #1 + ldrbgt r3, [r1], #1 + strbgt r3, [r0], #1 subs r2, r2, r12 blt .Lmemmove_fl4 /* less the 4 bytes */ @@ -353,12 +355,12 @@ ENTRY(bcopy) .Lmemmove_bl32: cmn r2, #0x10 - ldmgedb r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ - stmgedb r0!, {r3, r4, r12, lr} + ldmdbge r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ + stmdbge r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 adds r2, r2, #0x14 - ldmgedb r1!, {r3, r12, lr} /* blat a remaining 12 bytes */ - stmgedb r0!, {r3, r12, lr} + ldmdbge r1!, {r3, r12, lr} /* blat a remaining 12 bytes */ + stmdbge r0!, {r3, r12, lr} subge r2, r2, #0x0c ldmia sp!, {r4, lr} @@ -368,8 +370,8 @@ ENTRY(bcopy) subs r2, r2, #4 ldrlt r3, [r1, #-4]! strlt r3, [r0, #-4]! - ldmgedb r1!, {r3, r12} - stmgedb r0!, {r3, r12} + ldmdbge r1!, {r3, r12} + stmdbge r0!, {r3, r12} subge r2, r2, #4 .Lmemmove_bl4: @@ -381,10 +383,10 @@ ENTRY(bcopy) cmp r2, #2 ldrb r3, [r1, #-1]! strb r3, [r0, #-1]! - ldrgeb r3, [r1, #-1]! - strgeb r3, [r0, #-1]! - ldrgtb r3, [r1, #-1]! - strgtb r3, [r0, #-1]! + ldrbge r3, [r1, #-1]! + strbge r3, [r0, #-1]! + ldrbgt r3, [r1, #-1]! + strbgt r3, [r0, #-1]! RET /* erg - unaligned destination */ @@ -394,10 +396,10 @@ ENTRY(bcopy) /* align destination with byte copies */ ldrb r3, [r1, #-1]! strb r3, [r0, #-1]! - ldrgeb r3, [r1, #-1]! - strgeb r3, [r0, #-1]! - ldrgtb r3, [r1, #-1]! - strgtb r3, [r0, #-1]! + ldrbge r3, [r1, #-1]! + strbge r3, [r0, #-1]! + ldrbgt r3, [r1, #-1]! + strbgt r3, [r0, #-1]! subs r2, r2, r12 blt .Lmemmove_bl4 /* less than 4 bytes to go */ ands r12, r1, #3 Modified: head/lib/libc/arm/string/memset.S ============================================================================== --- head/lib/libc/arm/string/memset.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/memset.S Sat Nov 29 15:56:52 2014 (r275256) @@ -69,6 +69,8 @@ #include __FBSDID("$FreeBSD$"); +.syntax unified + /* * memset: Sets a block of memory to the specified value * @@ -125,39 +127,39 @@ ENTRY(memset) .Lmemset_loop128: subs r1, r1, #0x80 #ifdef _ARM_ARCH_5E - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 -#else - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 +#else + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} #endif bgt .Lmemset_loop128 RETeq /* Zero length so just exit */ @@ -168,15 +170,15 @@ ENTRY(memset) .Lmemset_loop32: subs r1, r1, #0x20 #ifdef _ARM_ARCH_5E - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 -#else - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 +#else + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} #endif bgt .Lmemset_loop32 RETeq /* Zero length so just exit */ @@ -185,11 +187,11 @@ ENTRY(memset) /* Deal with 16 bytes or more */ #ifdef _ARM_ARCH_5E - strged r2, [ip], #0x08 - strged r2, [ip], #0x08 + strdge r2, [ip], #0x08 + strdge r2, [ip], #0x08 #else - stmgeia ip!, {r2-r3} - stmgeia ip!, {r2-r3} + stmiage ip!, {r2-r3} + stmiage ip!, {r2-r3} #endif RETeq /* Zero length so just exit */ @@ -212,17 +214,17 @@ ENTRY(memset) #endif strb r3, [ip], #0x01 /* Set 1 byte */ - strgeb r3, [ip], #0x01 /* Set another byte */ - strgtb r3, [ip] /* and a third */ + strbge r3, [ip], #0x01 /* Set another byte */ + strbgt r3, [ip] /* and a third */ RET /* Exit */ .Lmemset_wordunaligned: rsb r2, r2, #0x004 strb r3, [ip], #0x01 /* Set 1 byte */ cmp r2, #0x02 - strgeb r3, [ip], #0x01 /* Set another byte */ + strbge r3, [ip], #0x01 /* Set another byte */ sub r1, r1, r2 - strgtb r3, [ip], #0x01 /* and a third */ + strbgt r3, [ip], #0x01 /* and a third */ cmp r1, #0x04 /* More than 4 bytes left? */ bge .Lmemset_wordaligned /* Yup */ @@ -231,8 +233,8 @@ ENTRY(memset) RETeq /* Zero length so exit */ strb r3, [ip], #0x01 /* Set 1 byte */ cmp r1, #0x02 - strgeb r3, [ip], #0x01 /* Set another byte */ - strgtb r3, [ip] /* and a third */ + strbge r3, [ip], #0x01 /* Set another byte */ + strbgt r3, [ip] /* and a third */ RET /* Exit */ #ifdef _BZERO END(bzero) Modified: head/lib/libc/arm/string/strlen.S ============================================================================== --- head/lib/libc/arm/string/strlen.S Sat Nov 29 15:55:35 2014 (r275255) +++ head/lib/libc/arm/string/strlen.S Sat Nov 29 15:56:52 2014 (r275256) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +.syntax unified + ENTRY(strlen) mov r1, #0 /* Check that the pointer is aligned on 32 bits. */ @@ -53,23 +55,23 @@ ENTRY(strlen) addne r1, r1, #1 .Ldo_3: #ifndef __ARMEB__ - andnes r3, r2, #0x0000ff00 + andsne r3, r2, #0x0000ff00 #else - andnes r3, r2, #0x00ff0000 + andsne r3, r2, #0x00ff0000 #endif addne r1, r1, #1 .Ldo_2: #ifndef __ARMEB__ - andnes r3, r2, #0x00ff0000 + andsne r3, r2, #0x00ff0000 #else - andnes r3, r2, #0x0000ff00 + andsne r3, r2, #0x0000ff00 #endif addne r1, r1, #1 .Ldo_1: #ifndef __ARMEB__ - andnes r3, r2, #0xff000000 + andsne r3, r2, #0xff000000 #else - andnes r3, r2, #0x000000ff + andsne r3, r2, #0x000000ff #endif addne r1, r1, #1 bne .Loop From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 17:18:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 430DEC8; Sat, 29 Nov 2014 17:18:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1614BE90; Sat, 29 Nov 2014 17:18:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATHIK0L000475; Sat, 29 Nov 2014 17:18:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATHIKi8000474; Sat, 29 Nov 2014 17:18:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411291718.sATHIKi8000474@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 29 Nov 2014 17:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275260 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 17:18:21 -0000 Author: kib Date: Sat Nov 29 17:18:20 2014 New Revision: 275260 URL: https://svnweb.freebsd.org/changeset/base/275260 Log: Remove lock recursion for the pipe pair mutex, and disable the recursion on mutex initialization. The only places where the recursive acquire is performed are read and write filters, since knlist, which uses the pipe pair mutex as lock, is locked when filter is called. The recursion was added in r93296, and consistent locking for kn_fop->f_event() introduced in r133741. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sat Nov 29 16:07:15 2014 (r275259) +++ head/sys/kern/sys_pipe.c Sat Nov 29 17:18:20 2014 (r275260) @@ -318,7 +318,7 @@ pipe_zone_init(void *mem, int size, int pp = (struct pipepair *)mem; - mtx_init(&pp->pp_mtx, "pipe mutex", NULL, MTX_DEF | MTX_RECURSE); + mtx_init(&pp->pp_mtx, "pipe mutex", NULL, MTX_DEF); return (0); } @@ -1792,7 +1792,7 @@ filt_piperead(struct knote *kn, long hin struct pipe *wpipe = rpipe->pipe_peer; int ret; - PIPE_LOCK(rpipe); + PIPE_LOCK_ASSERT(rpipe, MA_OWNED); kn->kn_data = rpipe->pipe_buffer.cnt; if ((kn->kn_data == 0) && (rpipe->pipe_state & PIPE_DIRECTW)) kn->kn_data = rpipe->pipe_map.cnt; @@ -1801,11 +1801,9 @@ filt_piperead(struct knote *kn, long hin wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF)) { kn->kn_flags |= EV_EOF; - PIPE_UNLOCK(rpipe); return (1); } ret = kn->kn_data > 0; - PIPE_UNLOCK(rpipe); return ret; } @@ -1816,12 +1814,11 @@ filt_pipewrite(struct knote *kn, long hi struct pipe *wpipe; wpipe = kn->kn_hook; - PIPE_LOCK(wpipe); + PIPE_LOCK_ASSERT(wpipe, MA_OWNED); if (wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF)) { kn->kn_data = 0; kn->kn_flags |= EV_EOF; - PIPE_UNLOCK(wpipe); return (1); } kn->kn_data = (wpipe->pipe_buffer.size > 0) ? @@ -1829,7 +1826,6 @@ filt_pipewrite(struct knote *kn, long hi if (wpipe->pipe_state & PIPE_DIRECTW) kn->kn_data = 0; - PIPE_UNLOCK(wpipe); return (kn->kn_data >= PIPE_BUF); } From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 17:29:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 721E0294; Sat, 29 Nov 2014 17:29:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F54F60; Sat, 29 Nov 2014 17:29:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATHTWLO005259; Sat, 29 Nov 2014 17:29:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATHTV7O005256; Sat, 29 Nov 2014 17:29:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411291729.sATHTV7O005256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Nov 2014 17:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275261 - in head/sys: boot/common 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 17:29:32 -0000 Author: imp Date: Sat Nov 29 17:29:30 2014 New Revision: 275261 URL: https://svnweb.freebsd.org/changeset/base/275261 Log: The current limit of 100k for the linker hints file is getting a bit crowded as we now are at about 70k. Bump the limit to 1MB instead which is still quite a reasonable limit and allows for future growth of this file and possible future expansion to additional data. MFC After: 2 weeks Modified: head/sys/boot/common/module.c head/sys/kern/kern_linker.c head/sys/sys/linker.h Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Sat Nov 29 17:18:20 2014 (r275260) +++ head/sys/boot/common/module.c Sat Nov 29 17:29:30 2014 (r275261) @@ -938,7 +938,7 @@ moduledir_readhints(struct moduledir *md path = moduledir_fullpath(mdp, "linker.hints"); if (stat(path, &st) != 0 || st.st_size < (ssize_t)(sizeof(version) + sizeof(int)) || - st.st_size > 100 * 1024 || (fd = open(path, O_RDONLY)) < 0) { + st.st_size > LINKER_HINTS_MAX || (fd = open(path, O_RDONLY)) < 0) { free(path); mdp->d_flags |= MDIR_NOHINTS; return; Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Sat Nov 29 17:18:20 2014 (r275260) +++ head/sys/kern/kern_linker.c Sat Nov 29 17:29:30 2014 (r275261) @@ -1752,7 +1752,7 @@ linker_hints_lookup(const char *path, in /* * XXX: we need to limit this number to some reasonable value */ - if (vattr.va_size > 100 * 1024) { + if (vattr.va_size > LINKER_HINTS_MAX) { printf("hints file too large %ld\n", (long)vattr.va_size); goto bad; } Modified: head/sys/sys/linker.h ============================================================================== --- head/sys/sys/linker.h Sat Nov 29 17:18:20 2014 (r275260) +++ head/sys/sys/linker.h Sat Nov 29 17:29:30 2014 (r275261) @@ -228,6 +228,7 @@ void *linker_hwpmc_list_objects(void); #endif #define LINKER_HINTS_VERSION 1 /* linker.hints file version */ +#define LINKER_HINTS_MAX (1 << 20) /* Allow at most 1MB for linker.hints */ #ifdef _KERNEL From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 19:31:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDB26475; Sat, 29 Nov 2014 19:31:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B052BC9B; Sat, 29 Nov 2014 19:31:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATJVN2W065772; Sat, 29 Nov 2014 19:31:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATJVNCb065771; Sat, 29 Nov 2014 19:31:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201411291931.sATJVNCb065771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 29 Nov 2014 19:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275264 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 19:31:24 -0000 Author: andrew Date: Sat Nov 29 19:31:23 2014 New Revision: 275264 URL: https://svnweb.freebsd.org/changeset/base/275264 Log: Update _ENTRY to use _EENTRY to reduce the common code. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Sat Nov 29 19:27:43 2014 (r275263) +++ head/sys/arm/include/asm.h Sat Nov 29 19:31:23 2014 (r275264) @@ -58,6 +58,18 @@ #endif /* + * EENTRY()/EEND() mark "extra" entry/exit points from a function. + * The unwind info cannot handle the concept of a nested function, or a function + * with multiple .fnstart directives, but some of our assembler code is written + * with multiple labels to allow entry at several points. The EENTRY() macro + * defines such an extra entry point without a new .fnstart, so that it's + * basically just a label that you can jump to. The EEND() macro does nothing + * at all, except document the exit point associated with the same-named entry. + */ +#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: +#define _EEND(x) /* nothing */ + +/* * gas/arm uses @ as a single comment character and thus cannot be used here * Instead it recognised the # instead of an @ symbols in .type directives * We define a couple of macros so that assembly code will not be dependent @@ -66,22 +78,10 @@ #define _ASM_TYPE_FUNCTION #function #define _ASM_TYPE_OBJECT #object #define GLOBAL(X) .globl x -#define _ENTRY(x) \ - .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: _FNSTART +#define _ENTRY(x) \ + .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART #define _END(x) .size x, . - x; _FNEND -/* - * EENTRY()/EEND() mark "extra" entry/exit points from a function. - * The unwind info cannot handle the concept of a nested function, or a function - * with multiple .fnstart directives, but some of our assembler code is written - * with multiple labels to allow entry at several points. The EENTRY() macro - * defines such an extra entry point without a new .fnstart, so that it's - * basically just a label that you can jump to. The EEND() macro does nothing - * at all, except document the exit point associated with the same-named entry. - */ -#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: -#define _EEND(x) /* nothing */ - #ifdef GPROF # define _PROF_PROLOGUE \ mov ip, lr; bl __mcount From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 20:54:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A698AC1; Sat, 29 Nov 2014 20:54:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA495E6; Sat, 29 Nov 2014 20:54:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATKsYOW005822; Sat, 29 Nov 2014 20:54:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATKsXc4005812; Sat, 29 Nov 2014 20:54:33 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201411292054.sATKsXc4005812@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 29 Nov 2014 20:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275268 - in head/sys/powerpc: aim include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 20:54:35 -0000 Author: jhibbits Date: Sat Nov 29 20:54:33 2014 New Revision: 275268 URL: https://svnweb.freebsd.org/changeset/base/275268 Log: Add support for dtrace:fbt on modules for PowerPC Summary: Revert the initial FBT-with-KDB changes for trap_subr*.S, and instead use the db_trap filter function to handle dtrace trap filtering. With this, the MMU is enabled by the support code, simplifying the codepath altogether. Test Plan: Tested on my G4 PowerBook Reviewers: #powerpc, nwhitehorn Reviewed By: nwhitehorn Differential Revision: https://reviews.freebsd.org/D1207 MFC after: 3 weeks Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/trap.c head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/trap.h Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Sat Nov 29 20:24:18 2014 (r275267) +++ head/sys/powerpc/aim/machdep.c Sat Nov 29 20:54:33 2014 (r275268) @@ -757,6 +757,10 @@ db_trap_glue(struct trapframe *frame) || frame->exc == EXC_BPT || frame->exc == EXC_DSI)) { int type = frame->exc; + + /* Ignore DTrace traps. */ + if (*(uint32_t *)frame->srr0 == EXC_DTRACE) + return (0); if (type == EXC_PGM && (frame->srr1 & 0x20000)) { type = T_BREAKPOINT; } Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Sat Nov 29 20:24:18 2014 (r275267) +++ head/sys/powerpc/aim/trap.c Sat Nov 29 20:54:33 2014 (r275268) @@ -258,7 +258,8 @@ trap(struct trapframe *frame) if (frame->srr1 & EXC_PGM_TRAP) { #ifdef KDTRACE_HOOKS inst = fuword32((const void *)frame->srr0); - if (inst == 0x0FFFDDDD && dtrace_pid_probe_ptr != NULL) { + if (inst == 0x0FFFDDDD && + dtrace_pid_probe_ptr != NULL) { struct reg regs; fill_regs(td, ®s); (*dtrace_pid_probe_ptr)(®s); @@ -301,7 +302,7 @@ trap(struct trapframe *frame) #ifdef KDTRACE_HOOKS case EXC_PGM: if (frame->srr1 & EXC_PGM_TRAP) { - if (*(uint32_t *)frame->srr0 == 0x7c810808) { + if (*(uint32_t *)frame->srr0 == EXC_DTRACE) { if (dtrace_invop_jump_addr != NULL) { dtrace_invop_jump_addr(frame); return; Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Sat Nov 29 20:24:18 2014 (r275267) +++ head/sys/powerpc/aim/trap_subr32.S Sat Nov 29 20:54:33 2014 (r275268) @@ -890,8 +890,7 @@ CNAME(dblow): mfcr %r29 /* save CR in r29 */ mfsrr1 %r1 mtcr %r1 - bf 17,2f /* branch if privileged */ -1: + bf 17,1f /* branch if privileged */ /* Unprivileged case */ mtcr %r29 /* put the condition register back */ mfsprg2 %r29 /* ... and r29 */ @@ -900,19 +899,7 @@ CNAME(dblow): li %r1, 0 /* How to get the vector from LR */ bla generictrap /* and we look like a generic trap */ -2: -#ifdef KDTRACE_HOOKS - /* Privileged, so drop to KDB */ - mfsrr0 %r1 - mtsprg3 %r3 - lwz %r1,0(%r1) - /* Check if it's a DTrace trap. */ - li %r3,0x0808 - addis %r3,%r3,0x7c81 - cmplw %cr0,%r3,%r1 - mfsprg3 %r3 - beq %cr0,1b -#endif +1: /* Privileged, so drop to KDB */ GET_CPUINFO(%r1) stw %r28,(PC_DBSAVE+CPUSAVE_R28)(%r1) /* free r28 */ Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Sat Nov 29 20:24:18 2014 (r275267) +++ head/sys/powerpc/aim/trap_subr64.S Sat Nov 29 20:54:33 2014 (r275268) @@ -799,9 +799,8 @@ CNAME(dblow): mfcr %r29 /* save CR in r29 */ mfsrr1 %r1 mtcr %r1 - bf 17,2f /* branch if privileged */ + bf 17,1f /* branch if privileged */ -1: /* Unprivileged case */ mtcr %r29 /* put the condition register back */ mfsprg2 %r29 /* ... and r29 */ @@ -810,19 +809,7 @@ CNAME(dblow): li %r1, 0 /* How to get the vector from LR */ bla generictrap /* and we look like a generic trap */ -2: -#ifdef KDTRACE_HOOKS - /* Privileged, so drop to KDB */ - mfsrr0 %r1 - mtsprg3 %r3 - lwz %r1,0(%r1) - /* Check if it's a DTrace trap. */ - li %r3,0x0808 - addis %r3,%r3,0x7c81 - cmplw %cr0,%r3,%r1 - mfsprg3 %r3 - beq %cr0,1b -#endif +1: GET_CPUINFO(%r1) std %r27,(PC_DBSAVE+CPUSAVE_R27)(%r1) /* free r27 */ std %r28,(PC_DBSAVE+CPUSAVE_R28)(%r1) /* free r28 */ Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Sat Nov 29 20:24:18 2014 (r275267) +++ head/sys/powerpc/include/trap.h Sat Nov 29 20:54:33 2014 (r275268) @@ -120,6 +120,9 @@ #define EXC_PGM_PRIV (1UL << 18) #define EXC_PGM_TRAP (1UL << 17) +/* DTrace trap opcode. */ +#define EXC_DTRACE 0x7c810808 + #ifndef LOCORE struct trapframe; struct pcb; From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 22:26:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E4ED916; Sat, 29 Nov 2014 22:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AE7EDBE; Sat, 29 Nov 2014 22:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATMQaqS048373; Sat, 29 Nov 2014 22:26:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATMQaOP048372; Sat, 29 Nov 2014 22:26:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411292226.sATMQaOP048372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 29 Nov 2014 22:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275270 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 22:26:36 -0000 Author: ngie Date: Sat Nov 29 22:26:35 2014 New Revision: 275270 URL: https://svnweb.freebsd.org/changeset/base/275270 Log: etc/mail actually applies to MK_SENDMAIL, not MK_MAIL Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Nov 29 21:23:07 2014 (r275269) +++ head/etc/Makefile Sat Nov 29 22:26:35 2014 (r275270) @@ -292,7 +292,7 @@ distribution: cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ ${PPPCNF} ${DESTDIR}/etc/ppp .endif -.if ${MK_MAIL} != "no" +.if ${MK_SENDMAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 22:31:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19E2FA86; Sat, 29 Nov 2014 22:31:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07239E63; Sat, 29 Nov 2014 22:31:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATMVJ3s052514; Sat, 29 Nov 2014 22:31:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATMVJlx052513; Sat, 29 Nov 2014 22:31:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411292231.sATMVJlx052513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 29 Nov 2014 22:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275271 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 22:31:20 -0000 Author: ngie Date: Sat Nov 29 22:31:19 2014 New Revision: 275271 URL: https://svnweb.freebsd.org/changeset/base/275271 Log: Revert r275270 MK_MAIL applies to MK_SENDMAIL and a number of other knobs. r275270 incorrectly applied it to only MK_SENDMAIL Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Nov 29 22:26:35 2014 (r275270) +++ head/etc/Makefile Sat Nov 29 22:31:19 2014 (r275271) @@ -292,7 +292,7 @@ distribution: cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ ${PPPCNF} ${DESTDIR}/etc/ppp .endif -.if ${MK_SENDMAIL} != "no" +.if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \